|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<div id="handsontable" v-loading="isLoading">
|
|
|
<el-row class="left">
|
|
|
- <div style="display: inline-block" v-show="!onlyRead && zoneCode === 'OtherZone'">
|
|
|
- <!-- <div v-show="!onlyRead && zoneCode === 'other'">-->
|
|
|
+ <div style="display: inline-block" v-show="zoneCode === 'OtherZone'">
|
|
|
+ <!-- <div style="display: inline-block" v-show="!onlyRead && zoneCode === 'OtherZone'">-->
|
|
|
<el-button @click="addZoneBtn" type="primary">添加分区</el-button>
|
|
|
<el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
|
|
|
<el-option v-for="item in OtherList" :key="item.value" :label="item.label" :value="item.value">
|
|
@@ -44,43 +44,43 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- // 引用handsontable插件
|
|
|
- import "@/assets/js/chosen.jquery.min";
|
|
|
- import tools from "@/utils/scan/tools";
|
|
|
- import "@/assets/js/handsontable-chosen-editor";
|
|
|
- import lStorage from '@/utils/localStorage'
|
|
|
- import myPagination from "@/components/common/myPagination";
|
|
|
- import addBusiness from "@/components/business_space/dialogs/addDialog/businessDialog"
|
|
|
- import showTools from "@/utils/handsontable/notShow"
|
|
|
- import handsonUtils from "@/utils/hasontableUtils"
|
|
|
- import Handsontable from "handsontable-pro"
|
|
|
- import buildFloor from '@/utils/handsontable/buildFloorData'
|
|
|
- import 'handsontable-pro/dist/handsontable.full.css'
|
|
|
- import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
|
|
|
- import qrcode from "@/components/ledger/lib/qrcode";
|
|
|
- import {
|
|
|
- BeatchQueryParam,
|
|
|
- zoneDelete,
|
|
|
- zoneUpdate,
|
|
|
- handleZoneUpdateBd,
|
|
|
- queryAllZoneType,
|
|
|
- zoneQuery,
|
|
|
- zoneCreate
|
|
|
- } from "@/api/scan/request";
|
|
|
- import {mapGetters} from "vuex";
|
|
|
- import dialogZone from "../../ledger/addDialog/dialogZone";
|
|
|
+// 引用handsontable插件
|
|
|
+import "@/assets/js/chosen.jquery.min";
|
|
|
+import tools from "@/utils/scan/tools";
|
|
|
+import "@/assets/js/handsontable-chosen-editor";
|
|
|
+import lStorage from '@/utils/localStorage'
|
|
|
+import myPagination from "@/components/common/myPagination";
|
|
|
+import addBusiness from "@/components/business_space/dialogs/addDialog/businessDialog"
|
|
|
+import showTools from "@/utils/handsontable/notShow"
|
|
|
+import handsonUtils from "@/utils/hasontableUtils"
|
|
|
+import Handsontable from "handsontable-pro"
|
|
|
+import buildFloor from '@/utils/handsontable/buildFloorData'
|
|
|
+import 'handsontable-pro/dist/handsontable.full.css'
|
|
|
+import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
|
|
|
+import qrcode from "@/components/ledger/lib/qrcode";
|
|
|
+import {
|
|
|
+ BeatchQueryParam,
|
|
|
+ handleZoneUpdateBd,
|
|
|
+ queryAllZoneType,
|
|
|
+ zoneCreate,
|
|
|
+ zoneDelete,
|
|
|
+ zoneQuery,
|
|
|
+ zoneUpdate
|
|
|
+} from "@/api/scan/request";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import dialogZone from "../../ledger/addDialog/dialogZone";
|
|
|
|
|
|
- export default {
|
|
|
- props: {
|
|
|
- id: {},
|
|
|
- zoneCode: {}
|
|
|
- },
|
|
|
- components: {
|
|
|
- qrcode, //二维码页面
|
|
|
- myPagination,
|
|
|
- addBusiness,
|
|
|
- uploadImgDialog,
|
|
|
- dialogZone,
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ id: {},
|
|
|
+ zoneCode: {}
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ qrcode, //二维码页面
|
|
|
+ myPagination,
|
|
|
+ addBusiness,
|
|
|
+ uploadImgDialog,
|
|
|
+ dialogZone,
|
|
|
|
|
|
},
|
|
|
computed: {
|
|
@@ -88,7 +88,7 @@
|
|
|
showTypes() {
|
|
|
return this.onlyRead ?
|
|
|
[{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
|
|
|
- [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
|
|
|
+ [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -131,7 +131,7 @@
|
|
|
uploadImgs: false, //上传图片弹窗
|
|
|
},
|
|
|
imgsArr: [], //空间图片
|
|
|
- OtherList:[],//其他分区筛选框
|
|
|
+ OtherList: [],//其他分区筛选框
|
|
|
OtherValue: '',
|
|
|
};
|
|
|
},
|
|
@@ -156,49 +156,53 @@
|
|
|
},
|
|
|
|
|
|
getData() {
|
|
|
- if (this.zoneCode != 'OtherZone') {
|
|
|
- this.isLoading = true
|
|
|
- this.zoneParam = {
|
|
|
- ZoneType: this.zoneCode,
|
|
|
- PageNumber: 1,
|
|
|
- PageSize: 50,
|
|
|
- Orders: "createTime desc, RoomID asc"
|
|
|
+ this.zoneParam = {
|
|
|
+ ZoneType: this.zoneCode,
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 50,
|
|
|
+ Orders: "createTime desc, RoomID asc"
|
|
|
+ }
|
|
|
+ if (this.buildFloorSelectd.length === 1) {
|
|
|
+ switch (this.buildFloorSelectd[0]) {
|
|
|
+ case 'noKnow':
|
|
|
+ this.zoneParam.BuildingId = 'isnull';
|
|
|
+ break;
|
|
|
+ case 'all':
|
|
|
+ // params.BuildingId = '';
|
|
|
+ break
|
|
|
}
|
|
|
+ } else if (this.buildFloorSelectd.length === 2) {
|
|
|
+ switch (this.buildFloorSelectd[1]) {
|
|
|
+ case 'noKnow':
|
|
|
+ this.zoneParam.BuildingId = this.buildFloorSelectd[0];
|
|
|
+ this.zoneParam.FloorId = 'isnull';
|
|
|
+ break;
|
|
|
+ case 'all':
|
|
|
+ this.zoneParam.BuildingId = this.buildFloorSelectd[0];
|
|
|
+ // params.FloorId = '';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ this.zoneParam.BuildingId = this.buildFloorSelectd[0];
|
|
|
+ this.zoneParam.FloorId = this.buildFloorSelectd[1]
|
|
|
|
|
|
- if (this.buildFloorSelectd.length === 1) {
|
|
|
- switch (this.buildFloorSelectd[0]) {
|
|
|
- case 'noKnow':
|
|
|
- this.zoneParam.BuildingId = 'isnull';
|
|
|
- break;
|
|
|
- case 'all':
|
|
|
- // params.BuildingId = '';
|
|
|
- break
|
|
|
- }
|
|
|
- } else if (this.buildFloorSelectd.length === 2) {
|
|
|
- switch (this.buildFloorSelectd[1]) {
|
|
|
- case 'noKnow':
|
|
|
- this.zoneParam.BuildingId = this.buildFloorSelectd[0];
|
|
|
- this.zoneParam.FloorId = 'isnull';
|
|
|
- break;
|
|
|
- case 'all' :
|
|
|
- this.zoneParam.BuildingId = this.buildFloorSelectd[0];
|
|
|
- // params.FloorId = '';
|
|
|
- break;
|
|
|
- default:
|
|
|
- this.zoneParam.BuildingId = this.buildFloorSelectd[0];
|
|
|
- this.zoneParam.FloorId = this.buildFloorSelectd[1]
|
|
|
-
|
|
|
- }
|
|
|
}
|
|
|
+ }
|
|
|
+ if (this.zoneItemID) {
|
|
|
+ this.zoneParam.Filters = `RoomID="${this.zoneItemID}"`
|
|
|
+ }
|
|
|
+ if (this.zoneCode != 'OtherZone') {
|
|
|
+ this.isLoading = true
|
|
|
this.getZoneMessage(this.zoneParam)
|
|
|
} else {
|
|
|
// 其他分区类型查询表数据接口
|
|
|
+ if (localStorage.getItem('otherZone')) {
|
|
|
+ this.OtherValue = (localStorage.getItem('otherZone'))
|
|
|
+ }
|
|
|
if (this.OtherValue) {
|
|
|
this.zoneParam.ZoneType = this.OtherValue;
|
|
|
this.getZoneMessage(this.zoneParam)
|
|
|
} else {
|
|
|
this.main = []
|
|
|
-
|
|
|
}
|
|
|
this.isLoading = false
|
|
|
this.getOtherType();
|
|
@@ -310,7 +314,7 @@
|
|
|
columns: this.getType(this.headers), //数据显示格式
|
|
|
filters: true,
|
|
|
fixedColumnsLeft: 4,
|
|
|
- maxRows: this.main ? this.main.length:'',
|
|
|
+ maxRows: this.main ? this.main.length : '',
|
|
|
height: winHeight - 100 - 50 - 176,
|
|
|
columnSorting: true, //添加排序
|
|
|
sortIndicator: true, //添加排序
|
|
@@ -436,7 +440,7 @@
|
|
|
let param = []
|
|
|
params.map(item => {
|
|
|
if (item.RoomID)
|
|
|
- param.push({ RoomID: item.RoomID })
|
|
|
+ param.push({ RoomID: item.RoomID })
|
|
|
})
|
|
|
params.map(i => i.ObjectType = this.zoneParam.ZoneType ? this.zoneParam.ZoneType : i.ObjectType);
|
|
|
this.$confirm("此操作将删除业务空间,是否继续?", "提示", {
|
|
@@ -800,15 +804,15 @@
|
|
|
addZoneBtn() {
|
|
|
this.$refs.zone.dialogFormVisible = true
|
|
|
},
|
|
|
- // 其他分区类型查询
|
|
|
+ // 其他分区类型查询
|
|
|
getOtherType() {
|
|
|
let param = {
|
|
|
Cascade: [{ Name: 'zoneType' }],
|
|
|
Filters: `Code="OtherZone"`
|
|
|
}
|
|
|
- queryAllZoneType(param,res=> {
|
|
|
- if(res.Content[0].ZoneType && res.Content[0].ZoneType.length) {
|
|
|
- this.OtherList = res.Content[0].ZoneType.map(t=> {
|
|
|
+ queryAllZoneType(param, res => {
|
|
|
+ if (res.Content[0].ZoneType && res.Content[0].ZoneType.length) {
|
|
|
+ this.OtherList = res.Content[0].ZoneType.map(t => {
|
|
|
t.value = t.Code
|
|
|
t.label = t.Name
|
|
|
return t
|
|
@@ -822,6 +826,11 @@
|
|
|
changeOtherZone(val) {
|
|
|
this.zoneParam.ZoneType = val;
|
|
|
this.getZoneMessage(this.zoneParam);
|
|
|
+ if (localStorage.getItem('otherZone')) {
|
|
|
+ localStorage.setItem('otherZone', val)
|
|
|
+ } else {
|
|
|
+ localStorage.setItem('otherZone', val)
|
|
|
+ }
|
|
|
console.log(val)
|
|
|
},
|
|
|
},
|
|
@@ -851,7 +860,7 @@
|
|
|
#handsontable {
|
|
|
padding: 0 10px;
|
|
|
.left {
|
|
|
- padding:0;
|
|
|
+ padding: 0;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
|