Bläddra i källkod

Merge branch 'msg-sever' of http://39.106.8.246:3003/web/ibms into msg-sever

LXXXY 5 år sedan
förälder
incheckning
84d190230a

+ 7 - 1
src/components/business_space/business/handsontable.vue

@@ -252,9 +252,15 @@ export default {
     getInfors(infos, row) {
       let val = this.hot.colToProp(row.col);
       if (val == "point") {
+        let query = {
+          RoomID: infos.RoomID,
+          zone: this.zoneCode,
+          isMyTab: 2,
+          buildFloorSelectd: this.buildFloorSelectd
+        }
         this.$router.push({
           path: "/ledger/spaceDetail",
-          query: { RoomID: infos.RoomID, zone: this.zoneCode, isMyTab: 2 }
+          query: query
         })
       } else if (val == "RoomQRCode") {
         this.qrcodeUrl = this.main[row.row].RoomQRCode

+ 2 - 1
src/components/business_space/newAddDialogs/addEquipDialog.vue

@@ -139,6 +139,7 @@ export default {
           Filters: '',
           PageNumber: this.page.pageNumber,
           PageSize: this.page.pageSize,
+          Orders: 'EquipID asc'
         },
         type: this.zone,
         spaceId: this.spaceId
@@ -157,7 +158,7 @@ export default {
         pa.data.Filters += `;EquipName contain "${this.keycode}" or EquipLocalName contain "${this.keycode}" or EquipLocalID contain "${this.keycode}"`
       }
       // 删除首尾分号
-      pa.data.Filters = pa.data.Filters.replace(/(^;)|(;$)/g,'');
+      pa.data.Filters = pa.data.Filters.replace(/(^;)|(;$)/g, '');
       if (pa.data.Filters == '') {
         delete pa.data.Filters
       }

+ 1 - 0
src/components/business_space/newAddDialogs/addSystemDialog.vue

@@ -87,6 +87,7 @@ export default {
       let pa = {
         data: {
           PageSize: 200,
+          Orders: 'SysID asc'
         },
         type: this.zone,
         spaceId: this.spaceId

+ 8 - 2
src/components/business_space/newGraphy/graphy.vue

@@ -520,9 +520,15 @@ export default {
     // 编辑空间详情
     editeSpaceDetail() {
       let item = this.curZoneItem.data;
+        let query = {
+          RoomID: item.RoomID,
+          zone: this.tab.code,
+          isMyTab: 1,
+          buildFloorSelectd: this.buildFloor
+        }
       this.$router.push({
         path: "/ledger/spaceDetail",
-        query: { RoomID: item.RoomID, zone: this.tab.code, isMyTab: 1 }
+        query: query
       })
     },
     // 重新划分业务空间
@@ -723,7 +729,7 @@ export default {
     },
     // 清除canvas
     clearGraphy() {
-      if (this.view && this.view.scene) {
+      if (this.view) {
         this.view.scene = null;
         return
       }

+ 1 - 1
src/components/business_space/newGraphy/unRelateBSP.vue

@@ -123,7 +123,7 @@ export default {
           t.Floor.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确楼层' })
           return t;
         })
-        this.options.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确楼层' })
+        this.options.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确建筑' })
       })
     },
     // 查询未关联平面图的业务空间(项目下+当前分区)

+ 1 - 1
src/components/business_space/newTables/eqToSpaceTable.vue

@@ -150,7 +150,7 @@ export default {
     },
     // 添加设备
     add() {
-      this.$refs.addEqDialog.floor = [this.params.BuildingId, this.params.FloorId];
+      this.$refs.addEqDialog.floor = this.params.buildFloorSelectd;
       this.$refs.addEqDialog.showDialog()
     }
   },

+ 24 - 64
src/views/data_admin/buildData/index.vue

@@ -7,12 +7,12 @@
             <!-- 建筑选择 -->
             <span style="padding-right:12px;color:#999;vertical-align: middle;">建筑名称</span>
             <el-select v-model="buildId" style="margin-right:10px;" placeholder="请选择" @change="changeBuild">
-                <el-option v-for="item in buildList" :key="item.BuildId" :label="item.BuildLocalName" :value="item.BuildId"></el-option>
+                <el-option v-for="item in buildList" :key="item.BuildID" :label="item.BuildLocalName" :value="item.BuildID"></el-option>
             </el-select>
             <!-- 楼层选择 -->
             <span style="padding-right:12px;color:#999;">楼层</span>
             <el-select v-model="floorId" placeholder="请选择" @change="changeFloor">
-                <el-option v-for="item in floorList" :key="item.FloorId" :label="item.FloorLocalName" :value="item.FloorId"></el-option>
+                <el-option v-for="item in floorList" :key="item.FloorID" :label="item.FloorLocalName" :value="item.FloorID"></el-option>
             </el-select>
             <!-- 选择时间插件 -->
             <build-time :timeArr="timeArr" @checkTime="checkTime"></build-time>
@@ -332,6 +332,8 @@
         defaultFloor, //获取默认楼层
         getdelMain, //获取过滤掉后的表格主体
         getBasicMatch, //获取完全匹配的厂商库id
+        buildingQuery, //数据中心-建筑查询
+        floorQuery, //数据中心-楼层查询
     } from "@/api/scan/request";
     import { mapGetters, mapActions } from "vuex"
     export default {
@@ -596,20 +598,8 @@
             },
             //获取建筑列表
             getBuilding() {
-                let param = {
-                    ProjId: this.projectId,
-                    UserId: this.userId
-                };
-                getBuildSelect(param).then(result => {
-                    if (result.data.Result == "success" && result.data.BuildList) {
-                        this.buildList = result.data.BuildList;
-                        //获取建筑下列数据后请求默认楼层建筑数据
-                        this.getDefaultFloor();
-                    } else {
-                        // this.dialogVisible = true;
-                        // this.ajaxMsg = "请求出错";
-                        this.$message.error("请求出错")
-                    }
+                buildingQuery({}, res => {
+                    this.buildList = res.Content;
                 });
             },
             //获取点位标签详情
@@ -684,21 +674,23 @@
                 }
                 return list;
             },
-            //获取默认楼层
-            getDefaultFloor() {
+            //获取楼层列表
+            getFloorData() {
                 let param = {
-                    ProjId: this.projectId,
-                    UserId: this.userId
+                    Filters: `BuildID='${this.buildId}'`,
+                    Orders: 'FloorSequenceID desc'
                 };
-                defaultFloor(param).then(result => {
-                    //将默认建筑id赋予标签绑定
-                    // this.buildId = result.data.BuildId;
-                    //存储默认楼层,等待楼层下拉列表出现后赋予
-                    // this.defaultFloorData = result.data.FloorId;
-                    //请求楼层下拉数据
-                    if (this.buildId) {
-                        this.getFloorData();
-                    }
+                floorQuery(param, res => {
+                    this.floorList = res.Content
+                    this.floorList.unshift({
+                    FloorName: "全部",
+                    FloorLocalName: "全部",
+                    FloorID: "all"
+                    }, {
+                        FloorName: "未明确楼层",
+                        FloorLocalName: "未明确楼层",
+                        FloorID: "noKnow"
+                    })
                 });
             },
             //保存点位标签详情的修改
@@ -744,41 +736,6 @@
                     }
                 });
             },
-            //获取楼层列表
-            getFloorData() {
-                let param = {
-                    BuildId: this.buildId,
-                    ProjId: this.projectId,
-                    UserId: this.userId
-                };
-                getFloor(param).then(res => {
-                    if (res.data.Result == "success") {
-                        this.floorList = tools.sortArr(res.data.FloorList, "FloorSequenceId", false);
-                        // this.floorId = this.defaultFloorData;
-                        for (let i = 0; i < this.floorList.length; i++) {
-                            if (this.floorId == this.floorList[i].FloorId) {
-                                this.floorName = this.floorList[i].FloorLocalName;
-                            }
-                        }
-                        this.floorList.unshift({
-                            FloorName: "全部",
-                            FloorLocalName: "全部",
-                            FloorId: "all"
-                        },{
-                            FloorName: "未明确楼层",
-                            FloorLocalName: "未明确楼层",
-                            FloorId: "noKnow"
-                        })
-                        if (this.defaultFloorData) {
-                            this.getPT();
-                        }
-                    } else {
-                        // this.dialogVisible = true;
-                        // this.ajaxMsg = "请求出错";
-                        this.$message.error("请求出错")
-                    }
-                });
-            },
             //保存设备资产的更新
             upDateTableMain(paramList) {
                 let param = {
@@ -1496,6 +1453,9 @@
             },
             //创建表格实例
             createHot(variableNum, data, headerArr) {
+                if(!headerArr){
+                    return
+                }
                 let maxRow = "";
                 //当当前页数*当前页个数小于总个数时,当前表格行数为当前页数
                 if (

+ 6 - 4
src/views/ledger/spacelist/index.vue

@@ -13,7 +13,7 @@
     <div class="saga-title">
       <div class="saga-build-mess">
         <!-- <span style="padding-right:12px;color:#999999;">建筑楼层</span> -->
-        <floorCascader @change="changeCascader"></floorCascader>
+        <floorCascader @change="changeCascader" ref="floorCascader"></floorCascader>
         <!-- <el-cascader :options="options" v-model="buildFloorSelectd" :props="props" @change="changeCascader"></el-cascader> -->
       </div>
       <div class="saga-build-tab">
@@ -112,7 +112,7 @@ export default {
         children: "Floor"
       },
       floorToMap: {}, //楼层及其对应的模型图
-      FloorMap: "", //当前选中的楼层对象
+      FloorMap: {}, //当前选中的楼层对象
       buildFloorSelectd: ['all'], //当前所选的建筑楼层
       childBackParam: {}
     };
@@ -149,7 +149,8 @@ export default {
           return t;
         })
         if (this.childBackParam.zone) {
-          this.changeCascader(this.buildFloorSelectd)
+          this.changeCascader(this.buildFloorSelectd);
+          this.$refs.floorCascader.setValue(this.buildFloorSelectd)
         }
       })
     },
@@ -171,7 +172,7 @@ export default {
         }).filter(item => item);
         if (this.childBackParam.zone) {
           this.activeName = this.childBackParam.zone;
-          // this.buildFloorSelectd = [this.childBackParam.BuildingId, this.childBackParam.FloorId];
+          this.buildFloorSelectd = this.childBackParam.buildFloorSelectd;
           this.isMyTab = this.childBackParam.isMyTab;
         } else {
           this.activeName = 'GeneralZone';
@@ -199,6 +200,7 @@ export default {
       // 如果选择的是全部或者未明确
       if (val.indexOf('noKnow') > -1 || val.indexOf('all') > -1) {
         this.isMyTab = 2;
+        this.FloorMap = {}
       } else {
         // 选择的是具体某个楼层
         if (!this.floorToMap[val[1]].StructureInfo || !this.floorToMap[val[1]].StructureInfo.FloorMap) {

+ 0 - 2
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -83,8 +83,6 @@ export default {
       }
       queryZone(pa, res => {
         this.spaceDetails = res.Content[0];
-        // this.params.BuildingId = this.spaceDetails.BuildingId;
-        // this.params.FloorId = this.spaceDetails.FloorId;
       })
     },
     // 设置iframe