Browse Source

Merge remote-tracking branch 'origin/dev' into dev

shaun-sheep 4 years ago
parent
commit
b91e1b5b8e

+ 2 - 2
src/components/business_space/business/handsontable.vue

@@ -263,9 +263,9 @@ export default {
     //查询空间信息
     getZoneMessage(param) {
       let params = param
-      params.Orders = "createTime desc, id asc, localName desc, id desc"
+      params.Orders = "createTime desc,sort asc,localName desc,id desc"
       zoneQuery(params, res => {
-        this.page.total = res.Total;
+        this.page.total = res.total;
         this.main = res.content.map((item) => {
           if (item.hasOwnProperty("buildingId") && item.hasOwnProperty("floorId")) {
             item.flowBuild = item.buildingId + "-" + item.floorId

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

@@ -246,7 +246,7 @@
         zone: 'Ispace',
         data: {
           // Filters: `FloorId='${this.buildFloor[1]}'`,
-          pageSize: 1000,
+          pageSize: 2000,
           floorId: this.buildFloor[1]
         }
       }
@@ -430,7 +430,7 @@
           // 绘制业务空间
           let tempArr = this.BSPRelaISPList.map((t, i) => {
             return {
-              RoomLocalName: t.localName,
+              RoomLocalName: t.localName || t.name,
               OutLine: t.outline,
               RoomID: t.id,
               Color: colorArr[i % colorArr.length],

+ 2 - 2
src/components/model/file/versionDialog.vue

@@ -36,7 +36,7 @@
                 obj.FloorName || "无"
               }}】;设备全局id:【{{ obj.ObjId || "无" }}】;BIMID:【{{ obj.BimId || "无" }}】;设备本地编码:【{{
                 obj.LocalId || "无"
-              }}】;设备本地名称:【{{ obj.LocalName || "无" }}】;CADID:【{{ obj.CadId || "无" }}】;</p>
+              }}】;设备本地名称:【{{ obj.LocalName || "无" }}】;CADID:【{{ obj.CADID || "无" }}】;</p>
           </div>
           <!-- 删除设备 -->
           <el-divider v-if="Object.keys(versionData.deleteData).length">删除设备</el-divider>
@@ -47,7 +47,7 @@
                 obj.FloorName || "无"
               }}】;设备全局id:【{{ obj.ObjId || "无" }}】;BIMID:【{{ obj.BimId || "无" }}】;设备本地编码:【{{
                 obj.LocalId || "无"
-              }}】;设备本地名称:【{{ obj.LocalName || "无" }}】;CADID:【{{ obj.CadId || "无" }}】;</p>
+              }}】;设备本地名称:【{{ obj.LocalName || "无" }}】;CADID:【{{ obj.CADID || "无" }}】;</p>
           </div>
           <!-- 新增实体墙 -->
           <el-divider v-if="versionData.createWall.length">新增实体墙</el-divider>

+ 30 - 24
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -198,7 +198,8 @@ export default {
       })
     },
     // 获取楼层
-    getFloorData() {
+    // 标识 无值:初始化进入 有值'next': 下一步进入
+    getFloorData(flag) {
       let floorParam = {
         pageSize: 1000,
         filters: `buildingId='${this.BuildID}'`,
@@ -207,8 +208,10 @@ export default {
       floorQueryAndSign(floorParam, (res) => {
         this.floorList = res.content.filter(t => t.infos && t.infos.floorMap || t.id == this.FloorID);
         // todo
-        this.floorRadio = this.floorList[0];
-        this.loadOtherImg(this.floorRadio)
+        if (flag && flag == 'next') {
+          this.floorRadio = this.floorList[0];
+          this.loadOtherImg(this.floorRadio)
+        }
         this.alreadyRelatedModel = res.content.map((t) => {
           if (t.floorID != this.FloorID) return t.modelId
           this.sign = t.Sign > 0
@@ -330,7 +333,7 @@ export default {
         this.step = 1;
         this.$refs.drawFloor.scaleItem.hide();
         // 获取楼层列表
-        this.getFloorData()
+        this.getFloorData('next')
       } else if (this.step == 1) {
         // 保存
         this.updateFloorKey();
@@ -368,29 +371,32 @@ export default {
     // 加载其他楼层图片
     loadOtherImg(v){
       if (v.infos && v.infos.floorMap) {
-        const url = this.imgService + v.infos.floorMap
-        this.curImgItem = new SImageItem(null, url);
-        this.curImgItem.enabled = false;
-        this.curImgItem.showType = SImageShowType.AutoFit;
-        if (v.properties) {
-          try {
-            // 计算两个比例尺差距
-            const scaleItem = this.$refs.drawFloor.scaleItem
-            this.curImgItem.zOrder = scaleItem.zOrder - 1;
-            const r = this.calScaleGap(v.properties, scaleItem);
-            if (r != 1) {
-              this.$message.warning('比例尺相差较大,可以返回上一步修改比例尺')
+        const temp = this.modelId.split('.');
+        if (temp[1] && (temp[1].toLowerCase() == 'png' || temp[1].toLowerCase() == 'jpg')) {
+          const url = this.imgService + v.infos.floorMap
+          this.curImgItem = new SImageItem(null, url);
+          this.curImgItem.enabled = false;
+          this.curImgItem.showType = SImageShowType.AutoFit;
+          if (v.properties) {
+            try {
+              // 计算两个比例尺差距
+              const scaleItem = this.$refs.drawFloor.scaleItem
+              this.curImgItem.zOrder = scaleItem.zOrder - 1;
+              const r = this.calScaleGap(v.properties, scaleItem);
+              if (r != 1) {
+                this.$message.warning('比例尺相差较大,可以返回上一步修改比例尺')
+              }
+              this.curImgItem.showType == SImageShowType.Full;
+              this.curImgItem.moveTo(v.properties.x, v.properties.y);
+              // this.curImgItem.width = v.Properties.width;
+              // this.curImgItem.height = v.Properties.height;
+            } catch (err) {
+              console.log(err);
             }
-            this.curImgItem.showType == SImageShowType.Full;
-            this.curImgItem.moveTo(v.properties.x, v.properties.y);
-            // this.curImgItem.width = v.Properties.width;
-            // this.curImgItem.height = v.Properties.height;
-          } catch (err) {
-            console.log(err);
           }
+          this.$refs.drawFloor.drawMainScene.addItem(this.curImgItem);
+          this.$refs.drawFloor.fit()
         }
-        this.$refs.drawFloor.drawMainScene.addItem(this.curImgItem);
-        this.$refs.drawFloor.fit()
       }
     },
     // 清除上一张底图