Browse Source

Merge branch 'dev'

zhangyu 5 years ago
parent
commit
c0b8c6a597
28 changed files with 692 additions and 697 deletions
  1. 2 2
      package.json
  2. 6 0
      src/api/model/file.js
  3. 9 8
      src/components/business_space/business/handsontable.vue
  4. 2 2
      src/components/business_space/newGraphy/graphy.vue
  5. 1 1
      src/components/ledger/cenote/elevationMap.vue
  6. 1 1
      src/components/ledger/details/detail/exhibitionEnergy.vue
  7. 16 13
      src/components/ledger/details/detail/lookFile.vue
  8. 11 18
      src/components/ledger/details/detail/lookImage.vue
  9. 451 415
      src/components/ledger/handsontables/device.vue
  10. 18 3
      src/components/ledger/lib/cenoteGraphy.vue
  11. 3 2
      src/components/ledger/lib/floorCascader.vue
  12. 6 10
      src/components/ledger/lib/system.vue
  13. 8 5
      src/components/ready/buildfloor/addBuild.vue
  14. 4 2
      src/utils/scan/tools.js
  15. 24 148
      src/views/business_space/dataUtil/topology.vue
  16. 6 1
      src/views/data_admin/buildData/index.vue
  17. 10 6
      src/views/ledger/facility/details/index.vue
  18. 4 1
      src/views/ledger/facility/details/index_old.vue
  19. 4 1
      src/views/ledger/property/details/index.vue
  20. 4 1
      src/views/ledger/property/details/index_old.vue
  21. 14 3
      src/views/ledger/rentlist/manageTenantZone.vue
  22. 27 20
      src/views/ledger/spacelist/spaceDetail/index.vue
  23. 4 1
      src/views/ledger/system/systemDetail/index.vue
  24. 20 16
      src/views/ready/buildfloor/addFloor/index.vue
  25. 2 1
      src/views/ready/buildfloor/drawGraphy/drawFloor.vue
  26. 20 9
      src/views/ready/buildfloor/index.vue
  27. 7 3
      src/views/ready/buildfloor/repetitionGraphy.vue
  28. 8 4
      src/views/screen/splitscreen/equipledger/index.vue

+ 2 - 2
package.json

@@ -20,10 +20,10 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.9",
-    "@saga-web/cad-engine": "2.0.547",
+    "@saga-web/cad-engine": "2.0.548",
     "@saga-web/draw": "2.1.75",
     "@saga-web/graphy": "2.1.42",
-    "@saga-web/topology": "1.0.1",
+    "@saga-web/topology": "1.0.41",
     "axios": "^0.18.0",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",

+ 6 - 0
src/api/model/file.js

@@ -323,4 +323,10 @@ export function countSyncLogCount(param, success) {
 export function querySyncLogCount(param, success) {
     let url = `${baseUrl}/sync-log/query`;
     httputils.postJson(url, param, success)
+}
+
+// 查询模型文件
+export function queryFileByModelId(param, success) {
+    let url = `${baseUrl}/model-file/query`;
+    httputils.postJson(url, param, success)
 }

+ 9 - 8
src/components/business_space/business/handsontable.vue

@@ -195,9 +195,10 @@ export default {
         this.getZoneMessage(this.zoneParam)
       } else {
         // 其他分区类型查询表数据接口
-        if (localStorage.getItem('otherZone')) {
-          this.OtherValue = (localStorage.getItem('otherZone'))
-        }
+        // if (localStorage.getItem('otherZone')) {
+        //   // this.OtherValue = (localStorage.getItem('otherZone'))
+        //   localStorage.removeItem('otherZone')
+        // }
         if (this.OtherValue) {
           this.zoneParam.ZoneType = this.OtherValue;
           this.getZoneMessage(this.zoneParam)
@@ -827,11 +828,11 @@ export default {
     changeOtherZone(val) {
       this.zoneParam.ZoneType = val;
       this.getZoneMessage(this.zoneParam);
-      if (localStorage.getItem('otherZone')) {
-        localStorage.setItem('otherZone', val)
-      } else {
-        localStorage.setItem('otherZone', val)
-      }
+      // if (localStorage.getItem('otherZone')) {
+      //   localStorage.setItem('otherZone', val)
+      // } else {
+      //   localStorage.setItem('otherZone', val)
+      // }
       console.log(val)
     },
   },

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

@@ -295,7 +295,7 @@ export default {
         // 其他分区
         this.showOtherFlag = true
         this.getOtherType();
-        this.OtherValue = (localStorage.getItem('otherZone')) || ''
+        // this.OtherValue = (localStorage.getItem('otherZone')) || ''
       } else {
         this.showOtherFlag = false;
       }
@@ -322,7 +322,7 @@ export default {
     // 其他类型下拉change
     changeOtherZone(val) {
       this.init(2);
-      localStorage.setItem('otherZone', val)
+      // localStorage.setItem('otherZone', val)
     },
     // 获取未绑定业务空间的元空间
     getISPSPUnrelaBSP() {

+ 1 - 1
src/components/ledger/cenote/elevationMap.vue

@@ -29,7 +29,7 @@
     </div>
     <div v-else class="saga-center">
       <i class="icon-wushuju iconfont"></i>
-      数据暂无
+      暂无数据
     </div>
   </div>
 </template>

+ 1 - 1
src/components/ledger/details/detail/exhibitionEnergy.vue

@@ -13,7 +13,7 @@
             </div>
           </div>
         </div>
-        <!-- <div v-else style="text-align: center;margin-top: 200px">暂无数据</div> -->
+         <div v-else style="text-align: center;margin-top: 200px">暂无数据</div>
       </section>
     </div>
   </div>

+ 16 - 13
src/components/ledger/details/detail/lookFile.vue

@@ -17,14 +17,16 @@
                   </div>
                 </div>
                 <div class="file-box-center">
-                  <p style="margin-top: 20px"> {{delFile(item.Name)}}</p>
-                  <p> {{delFile(item.CreateTime)}}</p>
+                  <p style="margin-top: 20px" :title="item.Name"> {{delFile(item.Name)}}</p>
+                  <p> {{item.CreateTime}}</p>
                 </div>
                 <div class="file-box-right ">
-                  <span
-                    style="height: 88px;"
+                  <a
+                    style="height: 88px;cursor: pointer;color: #555"
                     class="iconfont icon-download1 df fs20"
-                    @click="download(item.Key)"/>
+                    :href="`/image-service/common/file_get/${item.Key}?systemId=dataPlatform`"
+                    :download="item.Name"
+                  />
                 </div>
               </div>
 
@@ -49,17 +51,10 @@
     created() {
     },
     methods: {
-
       //处理地址
       delFile(name) {
-        return name && name.length > 20 ? name.substring(0, 20) + "..." : name
-      },
-      //点击下载
-      download(key) {
-        console.log(key)
-        window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
+        return name && name.length > 14 ? name.substring(0, 14) + "..." : name
       },
-
       //删除图片
       deleteFile(i, key) {
         this.filesArr.splice(i, 1);
@@ -139,6 +134,11 @@
 
 <style lang="less" scoped>
   .exhibition-file {
+    .icon-download1:hover {
+      color: #409eff;
+      cursor: pointer;
+    }
+
     .title {
       /*border-left: 8px solid black;*/
       margin: 10px;
@@ -191,6 +191,9 @@
         width: 19%;
         height: 100%;
         overflow: hidden;
+        a:hover {
+          color: #409eff !important;
+        }
       }
     }
 

+ 11 - 18
src/components/ledger/details/detail/lookImage.vue

@@ -22,7 +22,7 @@
       </div>
       <div style="text-align: center" v-else>暂无数据</div>
     </div>
-    <details-dialog :title="'图片'" :iframeSrc="iframeSrc" :dialog="dialog" :setData="imagesArr"></details-dialog>
+    <details-dialog :title="'图片'" :iframeSrc="iframeSrc" :dialog="dialog" :setData="exhibitionImage.arr"></details-dialog>
   </div>
 </template>
 <script>
@@ -57,13 +57,6 @@
 
       //上传
       uploadAndSubmit(item, key) {
-        // var form = document.forms["demoForm"];
-
-        // if (form["file"].files.length > 0) {
-        // 寻找表单域中的 <input type="file" ... /> 标签
-        // var file = form["file"].files[0];
-
-        console.log("lalala", item)
         let file = item.file;
         // try sending
         let reader = new FileReader();
@@ -118,7 +111,7 @@
                     });
                   }
                   if (type == 'mp4') {
-                    vm.imagesArr.push({
+                    vm.videoPicArr.push({
                       Name: uploadKey + '',
                       Key: uploadKey + "." + type,
                       SystemId: "dataPlatform",
@@ -127,15 +120,15 @@
                     });
                     vm.creatImg(vm.imageGetUrl + "&key=" + uploadKey + "." + type, uploadKey)
                   }
-                  if (vm.type == "video" && type == "png") {
-                    vm.videoPicArr.push({
-                      Name: uploadKey + '',
-                      Key: uploadKey + "." + type,
-                      SystemId: "dataPlatform",
-                      Type: "image_video",
-                      CreateTime
-                    })
-                  }
+                  // if (vm.type == "video" && type == "png") {
+                  //   vm.videoPicArr.push({
+                  //     Name: uploadKey + '',
+                  //     Key: uploadKey + "." + type,
+                  //     SystemId: "dataPlatform",
+                  //     Type: "image_video",
+                  //     CreateTime
+                  //   })
+                  // }
                   vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);
                 }
               }

+ 451 - 415
src/components/ledger/handsontables/device.vue

@@ -281,7 +281,8 @@
         deviceType: {}, //族3位编码及名称
         floorData: [],
         curDevice: '',//当前点击的设备id
-        addData: {}, //添加设备选择的设备类型
+        addData: {}, //
+        showParts: false,
         inputMap: {
           flowBuild: 'D1'
         }, //信息点和输入方式映射表
@@ -407,6 +408,7 @@
           }
           getEquipTableCon(param, res => {
             this.loading = false;
+            this.showParts = res.Message == "1"?true:false;// 判断是否显示包含的部件列
             this.tableData = res.Content.map((item) => {
               if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
                 item.flowBuild = item.BuildingId + "-" + item.FloorId
@@ -613,9 +615,15 @@
       formatHeaderData(list) {
         let arr = tools.copyArr(list)
         let data = showTools.headerTextFilter(arr, 'equipment', this.onlyRead, this.showType, true)
-        data.unshift("操作", "当前关联的资产", "所属系统实例", "包含的部件");
-        if (this.showType == "all") {
+        if (this.showParts) {
+          data.unshift("操作", "当前关联的资产", "所属系统实例", "包含的部件");
+        } else {
+          data.unshift("操作", "当前关联的资产", "所属系统实例");
+        }
+        if (this.showType == "all" && this.showParts) {
           data.splice(6, 0, "所属建筑楼层")
+        } else if (this.showType == "all" && !this.showParts) {
+          data.splice(5, 0, "所属建筑楼层")
         }
         return data;
       },
@@ -623,27 +631,46 @@
       formatHeaderType(list) {
         let arr = tools.copyArr(list)
         let data = showTools.headerTypeFilter(arr, 'equipment', this.onlyRead, this.showType, true)
-        data.unshift(
-          {
-            data: "caozuo",
-            renderer: tools.lookDetails,
-            readOnly: true
-          },
-          {
-            data: "LinkEquipLocalName",
-            readOnly: true,
-            renderer: tools.LinkEquipLocalName
-          }, {
-            data: "LinkSystem",
-            renderer: text.systemList,
-            readOnly: true
-          }, {
-            data: "Count",
-            readOnly: true,
-            renderer: tools.lookDetails
-          }
-        );
-        if (this.showType == "all") {
+        if (this.showParts) {
+          data.unshift(
+            {
+              data: "caozuo",
+              renderer: tools.lookDetails,
+              readOnly: true
+            },
+            {
+              data: "LinkEquipLocalName",
+              readOnly: true,
+              renderer: tools.LinkEquipLocalName
+            }, {
+              data: "LinkSystem",
+              renderer: text.systemList,
+              readOnly: true
+            }, {
+              data: "Count",
+              readOnly: true,
+              renderer: tools.lookDetails
+            }
+          );
+        } else {
+          data.unshift(
+            {
+              data: "caozuo",
+              renderer: tools.lookDetails,
+              readOnly: true
+            },
+            {
+              data: "LinkEquipLocalName",
+              readOnly: true,
+              renderer: tools.LinkEquipLocalName
+            }, {
+              data: "LinkSystem",
+              renderer: text.systemList,
+              readOnly: true
+            }
+          );
+        }
+        if (this.showType == "all" && this.showParts) {
           data.splice(6, 0, {
             data: "flowBuild",
             renderer: tools.customDropdownRenderer,
@@ -653,6 +680,16 @@
             },
             readOnly: this.onlyRead
           })
+        } else if (this.showType == "all" && !this.showParts) {
+          data.splice(5, 0, {
+            data: "flowBuild",
+            renderer: tools.customDropdownRenderer,
+            editor: "chosen",
+            chosenOptions: {
+              data: this.buildFloorData
+            },
+            readOnly: this.onlyRead
+          })
         }
         return data;
       },
@@ -666,7 +703,7 @@
         }
         this.hot = new Handsontable(container, {
           data: this.tableData,
-          fixedColumnsLeft: 6,
+          fixedColumnsLeft: this.showParts?6:5,
           colHeaders: this.formatHeaderData(this.tableHeader), //表头文案
           columns: this.formatHeaderType(this.tableHeader), //数据显示格式
           filters: true,
@@ -930,417 +967,416 @@
             break;
         }
       },
-
-        //获取到了正确的信息
-        getInfors(infos, row, el) {
-            let val = this.hot.colToProp(row.col);
-            let inputMode = this.inputMap[val];
-            this.row = row.row;
-            this.messKey = val;
-            this.firmDataType = 'row'
-            lStorage.set('screen_data', { path: this.$route.path, data: { equip: infos } })
-            switch (val) {
-                //操作
-                case 'caozuo':
-                    // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
-                    // this.$message("开发中...")
-                    this.$router.push({
-                      path: "deviceDetails",
-                      query: {
-                        type: this.mess.deviceId,
-                        equipId: infos.EquipID,
-                        equipName: infos.EquipLocalName?infos.EquipLocalName:infos.EquipName?infos.EquipName:'',
-                        equipCode: infos.EquipLocalID?infos.EquipLocalID:'',
-                        data: this.tableData.map(item => {
-                          return {
-                            value: item.EquipID,
-                            label: item.EquipLocalName?item.EquipLocalName:item.EquipName?item.EquipName:''
-                          }
-                        })
-                      }
-                    })
-                    return false
-                //设备二维码图片
-                case 'EquipQRCode':
-                    this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
-                    if (!!this.qrcodeUrl) {
-                        this.myDialog.qrcode = true;
-                    } else {
-                        this.$message("此设备没有设备二维码");
-                    }
-                    return false
-                //关联系统
-                case 'LinkSystem':
-                    if (!this.onlyRead) {
-                        this.curDevice = infos.EquipID;
-                        this.systemList = this.tableData[row.row].LinkSystem || [];
-                        this.myDialog.systemType = true;
-                    }
-                    return false
-                //关联资产
-                case 'LinkEquipLocalName':
-                    if (!this.onlyRead) {
-                        this.myDialog.changeRea = true;
-                    }
-                    return false
-                //品牌型号弹窗
-                case 'DPManufacturerID':
-                    if (!this.onlyRead) {
-                        this.myDialog.firm = true;
-                    }
-                    return false
-                //供应商信息弹窗
-                case 'DPSupplierID':
-                    if (!this.onlyRead) {
-                        this.myDialog.supplier = true;
-                    }
-                    return false
-                //维修商信息弹窗
-                case 'DPMaintainerID':
-                    if (!this.onlyRead) {
-                        this.myDialog.maintainer = true;
-                    }
-                    return false
-                //保险公司信息
-                case 'DPInsurerID':
-                    if (!this.onlyRead) {
-                        this.myDialog.insurer = true;
-                    }
-                    return false
-                //供应合同编号
-                case 'LedgerParam.SupplyPurchase.SupplierContractID':
-                    if (!this.onlyRead) {
-                        let ContractIDflag = null;
-                        let DPSdata = this.tableData[row.row].DPSupplierID;
-                        if (DPSdata) {
-                            ContractIDflag = DPSdata.split("-")[0];
+      //获取到了正确的信息
+      getInfors(infos, row, el) {
+          let val = this.hot.colToProp(row.col);
+          let inputMode = this.inputMap[val];
+          this.row = row.row;
+          this.messKey = val;
+          this.firmDataType = 'row'
+          lStorage.set('screen_data', { path: this.$route.path, data: { equip: infos } })
+          switch (val) {
+              //操作
+              case 'caozuo':
+                  // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
+                  // this.$message("开发中...")
+                  this.$router.push({
+                    path: "deviceDetails",
+                    query: {
+                      type: this.mess.deviceId,
+                      equipId: infos.EquipID,
+                      equipName: infos.EquipLocalName?infos.EquipLocalName:infos.EquipName?infos.EquipName:'',
+                      equipCode: infos.EquipLocalID?infos.EquipLocalID:'',
+                      data: this.tableData.map(item => {
+                        return {
+                          value: item.EquipID,
+                          label: item.EquipLocalName?item.EquipLocalName:item.EquipName?item.EquipName:''
                         }
-                        if (!!ContractIDflag) {
-                            this.id = ContractIDflag;
-                            this.myDialog.supply = true;
-                        } else {
-                            this.$message("请先选择供应商");
-                        }
-                    }
-                    return false
-                //保险单号
-                case 'LedgerParam.InsuranceDoc.InsuranceNum':
-                    if (!this.onlyRead) {
-                        let DPInsurerIDflag = null;
-                        let DPIdata = this.tableData[row.row].DPInsurerID;
-                        if (DPIdata) {
-                            DPInsurerIDflag = DPIdata.split("-")[0];
-                        }
-                        if (!!DPInsurerIDflag) {
-                            this.id = DPInsurerIDflag;
-                            this.myDialog.guarantee = true;
-                        } else {
-                            this.$message("请先选择保险商");
-                        }
-                    }
-                    return false
-                //保险文件--设备文档--安装质检报告
-                case 'LedgerParam.InsuranceDoc.InsuranceFile':
-                case 'LedgerParam.PhotoDoc.Archive':
-                case 'LedgerParam.Siteinstall.CheckReport':
-                    let IPSdata = tools.dataForKey(this.tableData[row.row], val);
-                    this.filesArr = IPSdata ? IPSdata : [];
-                    if (!this.onlyRead || this.filesArr.length) {
-                        this.myDialog.uploadFiles = true;
-                    }
-                    return false
-                //安装照片--安装图纸--设备铭牌照片--设备图纸
-                case 'LedgerParam.Siteinstall.InstallPic':
-                case 'LedgerParam.Siteinstall.InstallDrawing':
-                case 'LedgerParam.PhotoDoc.Nameplate':
-                case 'LedgerParam.PhotoDoc.Drawing':
-                    let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
-                    this.imgsArr = SSPPdata ? SSPPdata : [];
-                    if (!this.onlyRead || this.imgsArr.length) {
-                        this.myDialog.uploadImgs = true;
-                    }
-                    return false
-                //设备照片
-                case 'LedgerParam.PhotoDoc.Pic':
-                    let Pdata = tools.dataForKey(this.tableData[row.row], val);
-                    this.picsArr = Pdata ? Pdata : [];
-                    if (!this.onlyRead || this.picsArr.length) {
-                        this.myDialog.pic = true;
-                    }
-                    return false
-                //包含的部件字段
-                case 'Count':
-                    let countUrl = this.onlyRead ? '/ledger/parts' : '/ledger/partsmanage';
-                    this.$router.push({path: countUrl, query: {
-                        deviceId: infos.EquipID,
-                        typeId: this.mess.deviceId,
-                        pageNo: this.page.currentPage,
-                        pageSize: this.page.size
-                    }});
-                    return false
-                default:
-                    break;
-            }
-            if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
-                this.updateInfoPoint = val
-                this.updateInput = tools.dataForKey(this.tableData[row.row], val)
-                this.myDialog.update = true
-            }
-        },
-        //关闭临时维护弹窗回调
-        handleCloseUpdate() {
-            this.updateInputShow = false
-            this.updateInfoPoint = ''
-            this.updateInput = ''
-        },
-        //更新临时维护信息点
-        handleClickUpdate() {
-            tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
-            this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
-            this.updateInputShow = false
-            this.myDialog.update = false
-            this.updateInput = ''
-        },
-        //获取被筛选掉的行号
-        trimmedRows() {
-            var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-            let dataLength = this.tableData.length;
-            let dataArr = new Array();
-            for (let i = 0; i < dataLength; i++) {
-                dataArr.push(i);
-            }
-            if (plugin.length <= 0) {
-                dataArr = undefined;
-            } else {
-                dataArr = this.array_diff(dataArr, plugin);
-            }
-            return dataArr || [];
-        },
-        //去除数组中相同的元素
-        array_diff(a, b) {
-            for (var i = 0; i < b.length; i++) {
-                for (var j = 0; j < a.length; j++) {
-                    if (a[j] == b[i]) {
-                        a.splice(j, 1);
-                        j = j - 1;
+                      })
                     }
-                }
-            }
-            return a;
-        },
-        //如果选择供应商之后
-        supplierChange(data, type) {
-            if (type === 'dialog') {
-                let firm = {...data, num: 8}
-                this.firmName = firm
-            } else {
-                tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
-                tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
-                this.handleUpdataTable(
-                    [
-                        [this.row, "DPSupplierID", null, data.venderId],
-                        [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
-                    ],
-                    "edit"
-                )
-                // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
-            }
-
+                  })
+                  return false
+              //设备二维码图片
+              case 'EquipQRCode':
+                  this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
+                  if (!!this.qrcodeUrl) {
+                      this.myDialog.qrcode = true;
+                  } else {
+                      this.$message("此设备没有设备二维码");
+                  }
+                  return false
+              //关联系统
+              case 'LinkSystem':
+                  if (!this.onlyRead) {
+                      this.curDevice = infos.EquipID;
+                      this.systemList = this.tableData[row.row].LinkSystem || [];
+                      this.myDialog.systemType = true;
+                  }
+                  return false
+              //关联资产
+              case 'LinkEquipLocalName':
+                  if (!this.onlyRead) {
+                      this.myDialog.changeRea = true;
+                  }
+                  return false
+              //品牌型号弹窗
+              case 'DPManufacturerID':
+                  if (!this.onlyRead) {
+                      this.myDialog.firm = true;
+                  }
+                  return false
+              //供应商信息弹窗
+              case 'DPSupplierID':
+                  if (!this.onlyRead) {
+                      this.myDialog.supplier = true;
+                  }
+                  return false
+              //维修商信息弹窗
+              case 'DPMaintainerID':
+                  if (!this.onlyRead) {
+                      this.myDialog.maintainer = true;
+                  }
+                  return false
+              //保险公司信息
+              case 'DPInsurerID':
+                  if (!this.onlyRead) {
+                      this.myDialog.insurer = true;
+                  }
+                  return false
+              //供应合同编号
+              case 'LedgerParam.SupplyPurchase.SupplierContractID':
+                  if (!this.onlyRead) {
+                      let ContractIDflag = null;
+                      let DPSdata = this.tableData[row.row].DPSupplierID;
+                      if (DPSdata) {
+                          ContractIDflag = DPSdata.split("-")[0];
+                      }
+                      if (!!ContractIDflag) {
+                          this.id = ContractIDflag;
+                          this.myDialog.supply = true;
+                      } else {
+                          this.$message("请先选择供应商");
+                      }
+                  }
+                  return false
+              //保险单号
+              case 'LedgerParam.InsuranceDoc.InsuranceNum':
+                  if (!this.onlyRead) {
+                      let DPInsurerIDflag = null;
+                      let DPIdata = this.tableData[row.row].DPInsurerID;
+                      if (DPIdata) {
+                          DPInsurerIDflag = DPIdata.split("-")[0];
+                      }
+                      if (!!DPInsurerIDflag) {
+                          this.id = DPInsurerIDflag;
+                          this.myDialog.guarantee = true;
+                      } else {
+                          this.$message("请先选择保险商");
+                      }
+                  }
+                  return false
+              //保险文件--设备文档--安装质检报告
+              case 'LedgerParam.InsuranceDoc.InsuranceFile':
+              case 'LedgerParam.PhotoDoc.Archive':
+              case 'LedgerParam.Siteinstall.CheckReport':
+                  let IPSdata = tools.dataForKey(this.tableData[row.row], val);
+                  this.filesArr = IPSdata ? IPSdata : [];
+                  if (!this.onlyRead || this.filesArr.length) {
+                      this.myDialog.uploadFiles = true;
+                  }
+                  return false
+              //安装照片--安装图纸--设备铭牌照片--设备图纸
+              case 'LedgerParam.Siteinstall.InstallPic':
+              case 'LedgerParam.Siteinstall.InstallDrawing':
+              case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Drawing':
+                  let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
+                  this.imgsArr = SSPPdata ? SSPPdata : [];
+                  if (!this.onlyRead || this.imgsArr.length) {
+                      this.myDialog.uploadImgs = true;
+                  }
+                  return false
+              //设备照片
+              case 'LedgerParam.PhotoDoc.Pic':
+                  let Pdata = tools.dataForKey(this.tableData[row.row], val);
+                  this.picsArr = Pdata ? Pdata : [];
+                  if (!this.onlyRead || this.picsArr.length) {
+                      this.myDialog.pic = true;
+                  }
+                  return false
+              //包含的部件字段
+              case 'Count':
+                  let countUrl = this.onlyRead ? '/ledger/parts' : '/ledger/partsmanage';
+                  this.$router.push({path: countUrl, query: {
+                      deviceId: infos.EquipID,
+                      typeId: this.mess.deviceId,
+                      pageNo: this.page.currentPage,
+                      pageSize: this.page.size
+                  }});
+                  return false
+              default:
+                  break;
+          }
+          if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+              this.updateInfoPoint = val
+              this.updateInput = tools.dataForKey(this.tableData[row.row], val)
+              this.myDialog.update = true
+          }
       },
-      //供应合同编号
-      supplyChange(data) {
-        tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", {id: data})
+      //关闭临时维护弹窗回调
+      handleCloseUpdate() {
+          this.updateInputShow = false
+          this.updateInfoPoint = ''
+          this.updateInput = ''
       },
-      //保险单号-保险文件
-      guaranteeChange(data) {
-        for (let key in data) {
-          this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
-          if (key == "contractFile") {
-            if (!!data[key]) {
-              data[key] = [data[key]]
-            }
+      //更新临时维护信息点
+      handleClickUpdate() {
+          tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+          this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+          this.updateInputShow = false
+          this.myDialog.update = false
+          this.updateInput = ''
+      },
+      //获取被筛选掉的行号
+      trimmedRows() {
+          var plugin = this.hot.getPlugin("trimRows").trimmedRows;
+          let dataLength = this.tableData.length;
+          let dataArr = new Array();
+          for (let i = 0; i < dataLength; i++) {
+              dataArr.push(i);
           }
-          this.utilToKey(key, "contractFile", data, "InsuranceFile")
-        }
+          if (plugin.length <= 0) {
+              dataArr = undefined;
+          } else {
+              dataArr = this.array_diff(dataArr, plugin);
+          }
+          return dataArr || [];
+      },
+      //去除数组中相同的元素
+      array_diff(a, b) {
+          for (var i = 0; i < b.length; i++) {
+              for (var j = 0; j < a.length; j++) {
+                  if (a[j] == b[i]) {
+                      a.splice(j, 1);
+                      j = j - 1;
+                  }
+              }
+          }
+          return a;
       },
-      //选择型号修改
-      firmChange(data, type) {
-        if (type === 'dialog') { // 如果是批量信息维护
-          let venderName = data.venderName ? data.venderName : '空'
-          let brandName = data.brandName ? data.brandName : '空'
-          let name = data.name ? data.name : '空'
-          let firm = {
-            ...data,
-            num: 2,
-            Specification: data.name,
-            name: `${venderName}/${brandName}/${name}`
+      //如果选择供应商之后
+      supplierChange(data, type) {
+          if (type === 'dialog') {
+              let firm = {...data, num: 8}
+              this.firmName = firm
+          } else {
+              tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
+              tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
+              this.handleUpdataTable(
+                  [
+                      [this.row, "DPSupplierID", null, data.venderId],
+                      [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
+                  ],
+                  "edit"
+              )
+              // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
+          }
+
+    },
+    //供应合同编号
+    supplyChange(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", {id: data})
+    },
+    //保险单号-保险文件
+    guaranteeChange(data) {
+      for (let key in data) {
+        this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
+        if (key == "contractFile") {
+          if (!!data[key]) {
+            data[key] = [data[key]]
           }
-          this.firmName = firm //批量维护dialog显示对象的字段
-        } else {  //如果是表格操作
-          tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)//生产商ID
-          tools.setDataForKey(this.tableData[this.row], "DPBrandID", data.brandId)//品牌ID
-          tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)//型号ID
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName)
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brandName)
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
-          this.handleUpdataTable(
-            [
-              [this.row, "DPManufacturerID", null, data.venderId],
-              [this.row, "DPBrandID", null, data.brandId],
-              [this.row, "DPSpecificationID", null, data.specificationId],
-              [this.row, "LedgerParam.EquipManufactor.Manufacturer", null, data.venderName],
-              [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brandName],
-              [this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]
-            ],
-            "edit"
-          )
-          // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
-          // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
         }
-      },
-      //保险商变更
-      changeInsurer(data, type) {
-        if (type === 'dialog') {
-          let firm = {...data, num: 42}
-          this.firmName = firm
-        } else {
-          tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
-          this.handleUpdataTable(
-            [
-              [this.row, "DPInsurerID", null, data.venderId],
-              [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
-            ],
-            "edit"
-          )
-          // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
+        this.utilToKey(key, "contractFile", data, "InsuranceFile")
+      }
+    },
+    //选择型号修改
+    firmChange(data, type) {
+      if (type === 'dialog') { // 如果是批量信息维护
+        let venderName = data.venderName ? data.venderName : '空'
+        let brandName = data.brandName ? data.brandName : '空'
+        let name = data.name ? data.name : '空'
+        let firm = {
+          ...data,
+          num: 2,
+          Specification: data.name,
+          name: `${venderName}/${brandName}/${name}`
         }
+        this.firmName = firm //批量维护dialog显示对象的字段
+      } else {  //如果是表格操作
+        tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)//生产商ID
+        tools.setDataForKey(this.tableData[this.row], "DPBrandID", data.brandId)//品牌ID
+        tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)//型号ID
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName)
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brandName)
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
+        this.handleUpdataTable(
+          [
+            [this.row, "DPManufacturerID", null, data.venderId],
+            [this.row, "DPBrandID", null, data.brandId],
+            [this.row, "DPSpecificationID", null, data.specificationId],
+            [this.row, "LedgerParam.EquipManufactor.Manufacturer", null, data.venderName],
+            [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brandName],
+            [this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]
+          ],
+          "edit"
+        )
+        // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
+        // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
+      }
+    },
+    //保险商变更
+    changeInsurer(data, type) {
+      if (type === 'dialog') {
+        let firm = {...data, num: 42}
+        this.firmName = firm
+      } else {
+        tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
+        this.handleUpdataTable(
+          [
+            [this.row, "DPInsurerID", null, data.venderId],
+            [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
+          ],
+          "edit"
+        )
+        // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
+      }
 
-      },
-      //维修商变更
-      changeMaintainer(data, type) {
-        if (type === 'dialog') {
-          let firm = {...data, num: 35}
-          this.firmName = firm
-        } else {
-          tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
-          this.handleUpdataTable(
-            [
-              [this.row, "DPMaintainerID", null, data.venderId],
-              [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
-            ],
-            "edit"
-          )
-          // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
-        }
+    },
+    //维修商变更
+    changeMaintainer(data, type) {
+      if (type === 'dialog') {
+        let firm = {...data, num: 35}
+        this.firmName = firm
+      } else {
+        tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
+        this.handleUpdataTable(
+          [
+            [this.row, "DPMaintainerID", null, data.venderId],
+            [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
+          ],
+          "edit"
+        )
+        // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
+      }
 
-      },
-      //修改关联的资产
-      changeProperty(val) {
-        this.setDataToMain(val.PropertyId, 'PropertyId', this.row);
-        this.setDataToMain(val.LinkEquipLocalName, 'LinkEquipLocalName', this.row);
-      },
-      //上传文件弹窗触发事件
-      fileChange(keys, type) {
-        if (type === 'dialog') {
-          this.information = keys
-        } else {
-          this.setDataToMain(keys, this.messKey, this.row);
-        }
-      },
-      //上传图片弹窗触发事件
-      imgChange(keys, type) {
-        if (type === 'dialog') {
-          this.information = keys
-        } else {
-          this.setDataToMain(keys, this.messKey, this.row);
+    },
+    //修改关联的资产
+    changeProperty(val) {
+      this.setDataToMain(val.PropertyId, 'PropertyId', this.row);
+      this.setDataToMain(val.LinkEquipLocalName, 'LinkEquipLocalName', this.row);
+    },
+    //上传文件弹窗触发事件
+    fileChange(keys, type) {
+      if (type === 'dialog') {
+        this.information = keys
+      } else {
+        this.setDataToMain(keys, this.messKey, this.row);
+      }
+    },
+    //上传图片弹窗触发事件
+    imgChange(keys, type) {
+      if (type === 'dialog') {
+        this.information = keys
+      } else {
+        this.setDataToMain(keys, this.messKey, this.row);
 
-        }
-      },
-      //关联系统更改
-      changeSystemType(data) {
-        tools.setDataForKey(this.tableData[this.row], "LinkSystem", data)
-      },
-      //设备图片弹窗改变事件
-      changePics(keys, type) {
-        if (type === 'dialog') {
-          this.information = keys
+      }
+    },
+    //关联系统更改
+    changeSystemType(data) {
+      tools.setDataForKey(this.tableData[this.row], "LinkSystem", data)
+    },
+    //设备图片弹窗改变事件
+    changePics(keys, type) {
+      if (type === 'dialog') {
+        this.information = keys
+      } else {
+        this.setDataToMain(keys, this.messKey, this.row);
+      }
+    },
+    utilToKey(key, name, data, messName) {
+      if (key == name) {
+        this.setDataToMain(data[key], messName, this.row)
+      }
+    },
+    //判断是否有值,有值赋值
+    setDataToMain(data, key, row) {
+      if (!!data && data != '--') {
+        if (!!this.tableData[row]) {
+          tools.setDataForKey(this.tableData[row], key, data);
+          this.handleUpdataTable([[row, key, null, data]], "edit");
         } else {
-          this.setDataToMain(keys, this.messKey, this.row);
+          this.tableData[row] = {};
+          tools.setDataForKey(this.tableData[row], key, data);
         }
-      },
-      utilToKey(key, name, data, messName) {
-        if (key == name) {
-          this.setDataToMain(data[key], messName, this.row)
-        }
-      },
-      //判断是否有值,有值赋值
-      setDataToMain(data, key, row) {
-        if (!!data && data != '--') {
-          if (!!this.tableData[row]) {
-            tools.setDataForKey(this.tableData[row], key, data);
-            this.handleUpdataTable([[row, key, null, data]], "edit");
-          } else {
-            this.tableData[row] = {};
-            tools.setDataForKey(this.tableData[row], key, data);
-          }
-        } else {
-          tools.setDataForKey(this.tableData[row], key, "");
+      } else {
+        tools.setDataForKey(this.tableData[row], key, "");
+      }
+    },
+    //    批量信息维护
+    Batch() {
+      this.firmDataType = 'dialog'
+      this.$refs.batchDialogs.batchDialog = true
+    },
+    upDataDevice(type, data1, data2) {
+      let param = {Content: data1}
+      let param1 = {Content: data2}
+      if (type === 1) { //增量
+        //LedgerParam
+        let filterParam = this.filterCheck(param, 'sole')
+        let filterParam1 = this.filterCheck(param1, 'multiple')
+        if (filterParam) {
+          updateEquip(param, res => {
+          });
         }
-      },
-      //    批量信息维护
-      Batch() {
-        this.firmDataType = 'dialog'
-        this.$refs.batchDialogs.batchDialog = true
-      },
-      upDataDevice(type, data1, data2) {
-        let param = {Content: data1}
-        let param1 = {Content: data2}
-        if (type === 1) { //增量
-          //LedgerParam
-          let filterParam = this.filterCheck(param, 'sole')
-          let filterParam1 = this.filterCheck(param1, 'multiple')
-          if (filterParam) {
-            updateEquip(param, res => {
-            });
-          }
-          if (filterParam1) {
-            setTimeout(() => {
-              queryUpdate(param1, res => {
-              })
+        if (filterParam1) {
+          setTimeout(() => {
+            queryUpdate(param1, res => {
             })
+          })
 
-          }
         }
-        if (type === 2) {//覆盖
-          let filterParams = this.filterCheck(param, 'sole')
-          if (filterParams) {
-            updateEquip(param, res => {
-            });
-          }
+      }
+      if (type === 2) {//覆盖
+        let filterParams = this.filterCheck(param, 'sole')
+        if (filterParams) {
+          updateEquip(param, res => {
+          });
         }
-        setTimeout(() => {
-          this.getTableData()
-          this.getAllData()
-        }, 10)
-      },
-      filterCheck(arr, type) {
-        if (type === 'sole') {
-          for (let i of arr.Content) {
-            return Object.keys(i.LedgerParam).length
-          }
-        } else if (type === 'multiple') {
-          let  nArr = [];
-          arr.Content.forEach(i => {
-            let {EquipID, ...value} = i
-            nArr.push({LedgerParam: value})
-          })
-          for (let j of nArr) {
-            return Object.keys(j.LedgerParam).length
-          }
+      }
+      setTimeout(() => {
+        this.getTableData()
+        this.getAllData()
+      }, 10)
+    },
+    filterCheck(arr, type) {
+      if (type === 'sole') {
+        for (let i of arr.Content) {
+          return Object.keys(i.LedgerParam).length
+        }
+      } else if (type === 'multiple') {
+        let  nArr = [];
+        arr.Content.forEach(i => {
+          let {EquipID, ...value} = i
+          nArr.push({LedgerParam: value})
+        })
+        for (let j of nArr) {
+          return Object.keys(j.LedgerParam).length
         }
       }
+    }
     },
     watch: {
       projectId() {

+ 18 - 3
src/components/ledger/lib/cenoteGraphy.vue

@@ -19,7 +19,7 @@
 <script>
 import canvasFun from "@/components/business_space/newGraphy/canvasFun";
 import { SColor, SPoint } from "@saga-web/draw/lib";
-import { DivideFloorScene, SpaceItem, ZoneItem } from "@saga-web/cad-engine/lib";
+import { DivideFloorScene, SpaceItem, ZoneItem, Opt } from "@saga-web/cad-engine/lib";
 import { FloorView } from "@saga-web/cad-engine/lib/FloorView";
 import { colorArr } from '@/utils/spaceColor';
 import { getFloorMsgByFloorID, shaftSpaceQuery, shaftZoneLinkReplace, zoneQuery } from '@/api/scan/request';
@@ -44,6 +44,7 @@ export default {
         isEdit: false,
         groupSelect: true
       },
+      sceneMarkList: []
     }
   },
   mounted() {
@@ -54,7 +55,7 @@ export default {
     canvasFun
   },
   created() {
-
+    Opt.sceneMarkColor = new SColor('#ffffff');
   },
   methods: {
     //获取楼层map
@@ -67,6 +68,12 @@ export default {
         getFloorMsgByFloorID(pa, res => {
           this.floorMap = res.Content[0].StructureInfo ? res.Content[0].StructureInfo.FloorMap : '';
           this.space = space;
+          // 蒙版
+          if (res.Content[0].Outline) {
+            this.sceneMarkList = res.Content[0].Outline.map(t => {
+              return new SPoint(t.X, t.Y);
+            })
+          }
           this.getGraphy();
         })
       }
@@ -87,6 +94,7 @@ export default {
     getGraphy() {
       let that = this;
       that.clearGraphy()
+      if (!this.floorMap) return
       that.scene = new DivideFloorScene();
       that.canvasLoading = true;
       that.scene.loadUrl(`/image-service/common/file_get?systemId=revit&key=${this.floorMap}`).then(res => {
@@ -97,10 +105,13 @@ export default {
           return;
         }
         that.view.scene = that.scene;
+        if (that.sceneMarkList.length) {
+          that.scene.addSceneMark(that.sceneMarkList)
+        }
         that.scene.isSpaceSelectable = false;
         // 绘制业务空间
         that.getBusinessSpace();
-        that.view.fitSceneToView();
+        that.fit();
         that.view.minScale = that.view.scale;
         if (that.$refs.canvasFun) {
           that.$refs.canvasFun.everyScale = that.view.scale;
@@ -244,6 +255,10 @@ export default {
     },
     // 适配底图到窗口
     fit() {
+      if (this.scene.sceneMark) {
+        this.view.fitItemToView([this.scene.sceneMark])
+        return
+      }
       this.view.fitSceneToView()
     },
     // 缩放

+ 3 - 2
src/components/ledger/lib/floorCascader.vue

@@ -63,7 +63,8 @@
             getData() {
                 let data, buildParams = {
                     PageNumber: 1,
-                    PageSize: 500,
+                    PageSize: 1000,
+                    Orders: "BuildLocalName asc",
                     Projection: [
                         "BuildID",
                         "BuildLocalName"
@@ -71,7 +72,7 @@
                 }, floorParams = {
                     Orders: "FloorSequenceID desc",
                     PageNumber: 1,
-                    PageSize: 500,
+                    PageSize: 1000,
                     Projection: [
                         "BuildID",
                         "FloorID",

+ 6 - 10
src/components/ledger/lib/system.vue

@@ -10,7 +10,7 @@
 </template>
 <script>
 import { mapGetters } from 'vuex';
-import { queryLinkSys, getEqCode } from "@/api/scan/request";
+import { queryLinkSys, queryPhysicsAllType } from "@/api/scan/request";
 export default {
   name: "getCode",
   props: {
@@ -72,7 +72,7 @@ export default {
       let param = {
         Distinct: true,
         PageNumber: 1,
-        PageSize: 500,
+        PageSize: 1000,
         Projection: [
           "Category", "CategoryName"
         ]
@@ -85,8 +85,8 @@ export default {
       })
     },
     getAllData() {
-      getEqCode().then(res => {
-        this.options = this.changeArr(res.data.Content)
+      queryPhysicsAllType('System', res => {
+        this.options = this.changeArr(res.Content)
         if (this.value) {
           this.changeVal(this.value)
         }
@@ -94,12 +94,8 @@ export default {
     },
     changeArr(arr) {
       let data = [];
-      arr.map(item => {
-        if (item.content && item.content.length) {
-          return item.content.map(children => {
-            data.push({ Category: children.code, CategoryName: children.system });
-          });
-        }
+      arr.forEach(item => {
+        data.push({ Category: item.Code, CategoryName: item.Name });
       });
       return data;
     }

+ 8 - 5
src/components/ready/buildfloor/addBuild.vue

@@ -117,7 +117,7 @@
       class="dialog-footer"
       slot="footer">
     <el-button @click="buildDialogVis = false">取 消</el-button>
-    <el-button @click="submitForm('ruleForm')" type="primary">确 定</el-button>
+    <el-button @click="submitForm('ruleForm')" type="primary" :disabled="buildDisabled">确 定</el-button>
   </span>
     <el-dialog :visible.sync="dialogVisible">
       <img width="100%" :src="dialogImageUrl" alt="">
@@ -171,16 +171,17 @@
           ]
         },
         buildData: {},
+        buildDisabled: false,
       }
     },
     components: {uploadFiles, uploadImgs},
     props: ['buildTitle', 'buildMessage', 'currentBuild'],
-    computed: {
-    },
+    computed: {},
     mounted() {
 
 
     },
+    watch: {},
     methods: {
       deepCopy(obj) {
         return JSON.parse(JSON.stringify(obj))
@@ -224,7 +225,7 @@
       submitForm(formName) {
         this.$refs[formName].validate((valid) => {
           if (valid) {
-            console.log(this.form);
+            this.buildDisabled = true
             for (let key in this.buildMessage) {
               let arr = this.buildMessage[key];
               if (Array.isArray(arr)) {
@@ -239,7 +240,9 @@
               }
             }
             this.$emit('handleBuild', this.form)
-
+            setTimeout(() => {
+              this.buildDisabled = false
+            }, 2500)
           } else {
             return false;
           }

+ 4 - 2
src/utils/scan/tools.js

@@ -313,9 +313,10 @@ tools.hasRelation = function (instance, td, row, col, prop, value, cellPropertie
 //关联的资产
 tools.LinkEquipLocalName = function (instance, td, row, col, prop, value, cellProperties) {
   if (value) {
-    td.innerHTML = value;
+    td.innerHTML = value == 'null'?'':value;
   } else {
-    td.innerHTML = instance.getDataAtRowProp(row, 'LinkEquipName');
+    let html = instance.getDataAtRowProp(row, 'LinkEquipName');
+    td.innerHTML = html == 'null'?'':html;
   }
   return td;
 }
@@ -554,6 +555,7 @@ tools.setDataForKey = function (data, key, value) {
   }
 }
 tools.flattenKeys = function (obj) {
+  if(obj == undefined) return
   let res = {}
 
   function isObject(val) {

+ 24 - 148
src/views/business_space/dataUtil/topology.vue

@@ -2,39 +2,14 @@
   <!-- 拓扑图demo -->
   <el-container>
     <el-aside width="200px" class="el-scrollbar">
-      <div style="height: 300px;">
-        <el-input type="textarea" v-model="ModelID" placeholder='输入业务空间轮廓线,三维数组,X,Y,Z均为大写;或者模型ID' style="height: 100%;"></el-input>
-      </div>
-      <div title="上传json文件">
-        <el-button size="mini" @click="clickInputFile" icon="el-icon-upload"></el-button>
-        <input type="file" @change="filechange" ref="file">
+      <div title="划线">
+        <el-button size="mini" @click="drawline" icon="el-icon-crop"></el-button>
       </div>
       <div title="适配底图">
         <el-button size="mini" @click="fitClick" icon="el-icon-crop"></el-button>
       </div>
-      <div title="切割">
-        <el-button size="mini" @click="cut" icon="el-icon-edit"></el-button>
-      </div>
-      <div title="清除">
-        <el-button size="mini" @click="clear" icon="el-icon-refresh-left"></el-button>
-      </div>
-      <div title="定位">
-        <el-button size="mini" @click="location" icon="el-icon-position"></el-button>
-      </div>
-      <div title="开启/关闭吸附">
-        <el-button size="mini" @click="absorb" icon="el-icon-price-tag"></el-button>
-      </div>
-      <div title="矩形选择">
-        <el-button size="mini" @click="rectSelection" icon="el-icon-mouse"></el-button>
-      </div>
-      <div title="通过模型ID生成平面图">
-        <el-button size="mini" icon="el-icon-s-promotion" @click="modelChange"></el-button>
-      </div>
-      <div title="通过轮廓线生成业务空间">
-        <el-button size="mini" @click="showOutline" icon="el-icon-magic-stick"></el-button>
-      </div>
-      <div title="打印">
-        <el-button size="mini" @click="console" icon="el-icon-printer"></el-button>
+      <div title="添加item">
+        <el-button size="mini" @click="additem" icon="el-icon-crop"></el-button>
       </div>
     </el-aside>
     <el-main>
@@ -47,20 +22,15 @@
 </template>
 <script>
 
-import { SGraphyScene } from "@saga-web/graphy/lib/";
-import { DivideFloorScene, LocationPointScene } from "@saga-web/cad-engine/lib";
-import { FloorView } from "@saga-web/cad-engine/lib/FloorView";
+import { TopoScene, TopoView } from "@saga-web/topology/lib";
 export default {
   data() {
     return {
       view: null,
       scene: null,
-      flag: undefined,
-      show: true,
       loading: false,
       canvasWidth: 800,
       canvasHeight: 800,
-      ModelID: "4cea832a217c11ea962ac576d98e7540"
     }
   },
   mounted() {
@@ -94,22 +64,9 @@ export default {
   },
   methods: {
     createGraphy() {
-      let that = this;
-      // this.disableRightButton()
-      this.clearGraphy()
-      that.scene = new DivideFloorScene();
-      this.loading = true;
-      that.scene.getFloorData('/modelapi/base-graph/query', { ModelId: this.ModelID }).then(res => {
-        if (res.Result == 'failure') {
-          this.$message.warning(res.Message)
-        }
-        console.log(res)
-        that.view.scene = that.scene;
-        that.view.fitSceneToView();
-        this.loading = false;
-      }).catch(err => {
-        console.log(err)
-      })
+      this.clearGraphy();
+      this.scene = new TopoScene()
+      this.view.scene = this.scene;
     },
     // 清除canvas
     clearGraphy() {
@@ -117,109 +74,28 @@ export default {
         this.view.scene = null;
         return
       }
-      this.view = new FloorView('bg')
+      this.view = new TopoView('bg')
     },
     fitClick() {
       this.view.fitSceneToView();
     },
-    showSpace() {
-      this.show = !this.show
-      // this.scene.isShowDoor = this.show
-      // this.scene.isShowSpace = this.show
-      this.scene.spaceList.map(t => {
-        if (!t.selected) {
-          t.visible = false;
-        }
-      })
-      this.scene.isShowColumn = this.show
-      // Opt.spaceColor = new SColor(100,100,100,100);
-    },
-    disableRightButton() {
-      this.$refs.canvas.addEventListener('contextmenu', (e) => {
-        console.log(e)
-        e.preventDefault();
-      })
-      this.scene.isShowSpace = false
-    },
-    cut() {
-      this.scene.isMarking = true;
-      console.log(this.scene)
-    },
-    console() {
-      console.log(this.scene.getSelectedSpaces())
-      this.scene.isShowColumn = false
-      this.scene.isShowWall = false
-    },
-    clear() {
-      this.scene.clearSceneMark()
-    },
-    location() {
-      // console.log(this)
-      this.view.fitSelectedToView()
-    },
-    move() {
-      this.view.isMoving = !this.view.isMoving;
-    },
-    absorb() {
-      this.scene.isAbsorbing = !this.scene.isAbsorbing;
-    },
-    rectSelection() {
-      this.scene.isRectSelection = 1;
-      console.log(this.scene)
-    },
-    showOutline() {
-      try {
-        let outline = JSON.parse(this.ModelID)
-        console.log(outline)
-        let obj = {
-          RoomLocalName: '哈哈哈哈',
-          OutLine: outline,
-          RoomID: 12312,
-          Color: "#006bd6",
-          Height: 5000,
-          HeightLightFlag: true
-        }
-        this.scene.removeAllZone()
-        this.scene.addZone(obj);
-        this.scene.zoneList[0].selected = true;
-        this.view.fitSelectedToView();
-      } catch (err) {
-        alert('格式不正确')
+    additem() {
+      let equipdata = {
+        ID: this.uuid(),
+        Size: {
+          Width: 100,
+          Height: 50
+        },
+        Pos:{},
+        AnchorList: [{ FaceType: 0, Pos: {} }, { FaceType: 1, Pos: {} }, { FaceType: 2, Pos: {} }, { FaceType: 3, Pos: {} }]
       }
+      this.scene.createItem(equipdata)
+      this.scene.grabItem.moveable = true
+      console.log(this.scene)
+      console.log(this.view)
     },
-    filechange(e) {
-      let file = e.target.files[0]
-      this.read(file)
-    },
-    read(f) {
-      let rd = new FileReader();
-      this.loading = true;
-      rd.onload = e => {
-        //this.readAsArrayBuffer函数内,会回调this.onload函数。在这里处理结果
-        let cont = rd.reading({ encode: 'UTF-8' });
-        let res = JSON.parse(cont);
-        this.JSON = res;
-        this.loadRes()
-      };
-      rd.readAsBinaryString(f);
-    },
-    loadRes() {
-      if (this.JSON) {
-        this.view.scene = null;
-        this.scene = new DivideFloorScene();
-        this.scene.addBaseMapItem(this.JSON.EntityList[0].Elements)
-        this.view.scene = this.scene;
-        console.log(this.scene)
-        this.view.fitSceneToView();
-      }
-      this.loading = false;
-    },
-    modelChange() {
-      console.log(this.ModelID)
-      this.createGraphy();
-    },
-    clickInputFile() {
-      this.$refs.file.click()
+    drawline() {
+      this.scene.isLining = true;
     },
     uuid(len, radix) {
       var chars = '0123456789abcdef'.split('');

+ 6 - 1
src/views/data_admin/buildData/index.vue

@@ -598,7 +598,12 @@
             },
             //获取建筑列表
             getBuilding() {
-                buildingQuery({}, res => {
+                buildingQuery({
+                    PageNumber: 1,
+                    PageSize: 1000,
+                    Orders: "BuildLocalName asc",
+                    Projection: [ "BuildID", "BuildLocalName" ]
+                }, res => {
                     this.buildList = res.Content;
                 });
             },

+ 10 - 6
src/views/ledger/facility/details/index.vue

@@ -156,16 +156,17 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
           list: []
         },
         instance: {},//实例信息处理
-        isShowImage: true,
-        isShowVideo: true,
-        isShowFile: true,
+        isShowImage: false,
+        isShowVideo: false,
+        isShowFile: false,
       }
     },
     methods: {
@@ -324,6 +325,7 @@
               case 'LedgerParam.Siteinstall.InstallPic':
               case 'LedgerParam.Siteinstall.InstallDrawing':
               case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Pic':
                 if (this.instance.hasOwnProperty(i.Path)) {
                   i.PicList = this.instance[i.Path]
                 }
@@ -354,7 +356,10 @@
             })
           }
         }
+        this.exhibitionImage.arr = isArray
+
         let video = isArray.filter(i => i.Type != 'image' &&i.type != 'image' )
+        console.log(video,'video')
         this.exhibitionVideo.list = video
           //判断是否显示图片组件
           this.isShowImage = isArray.length ? true : false
@@ -367,13 +372,12 @@
         //处理数据格式
         arr.map(i => {
           if (i.InputMode == 'F2') {
-            console.log(i.Path, 'ppp')
+
             switch (i.Path) {
               case 'LedgerParam.InsuranceDoc.InsuranceFile':
               case 'LedgerParam.PhotoDoc.Archive':
               case 'LedgerParam.Siteinstall.CheckReport':
                 if (this.instance.hasOwnProperty(i.Path)) {
-                  debugger
                   i.fileList = this.instance[i.Path]
                 }
                 if (picObject[i.InfoPointName]) {

+ 4 - 1
src/views/ledger/facility/details/index_old.vue

@@ -148,7 +148,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -310,6 +311,7 @@
               case 'LedgerParam.Siteinstall.InstallPic':
               case 'LedgerParam.Siteinstall.InstallDrawing':
               case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Pic':
                 if (this.instance.hasOwnProperty(i.Path)) {
                   i.PicList = this.instance[i.Path]
                 }
@@ -340,6 +342,7 @@
             })
           }
         }
+        this.exhibitionImage.arr = isArray
         let video = isArray.filter(i => i.Type != 'image' &&i.type != 'image' )
         this.exhibitionVideo.list = video
           //判断是否显示图片组件

+ 4 - 1
src/views/ledger/property/details/index.vue

@@ -138,7 +138,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -255,6 +256,7 @@
               case 'LedgerParam.Siteinstall.InstallPic':
               case 'LedgerParam.Siteinstall.InstallDrawing':
               case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Pic':
                 if (this.instance.hasOwnProperty(i.Path)) {
                   i.PicList = this.instance[i.Path]
                 }
@@ -285,6 +287,7 @@
             })
           }
         }
+        this.exhibitionImage.arr = isArray
         let video = isArray.filter(i => i.Type =='video' && i.type == 'video' )
         this.exhibitionVideo.list = video
         //判断是否显示图片组件

+ 4 - 1
src/views/ledger/property/details/index_old.vue

@@ -127,7 +127,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -244,6 +245,7 @@
               case 'LedgerParam.Siteinstall.InstallPic':
               case 'LedgerParam.Siteinstall.InstallDrawing':
               case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Pic':
                 if (this.instance.hasOwnProperty(i.Path)) {
                   i.PicList = this.instance[i.Path]
                 }
@@ -274,6 +276,7 @@
             })
           }
         }
+        this.exhibitionImage.arr = isArray
         let video = isArray.filter(i => i.Type =='video' && i.type == 'video' )
         this.exhibitionVideo.list = video
         //判断是否显示图片组件

+ 14 - 3
src/views/ledger/rentlist/manageTenantZone.vue

@@ -83,7 +83,7 @@
 import canvasFun from "@/components/business_space/newGraphy/canvasFun";
 import { mapGetters, mapActions } from "vuex";
 import { SColor, SPoint } from "@saga-web/draw/lib";
-import { DivideFloorScene, SpaceItem, ZoneItem, FloorView } from "@saga-web/cad-engine/lib";
+import { DivideFloorScene, SpaceItem, ZoneItem, FloorView, Opt } from "@saga-web/cad-engine/lib";
 import { colorArr } from "@/utils/spaceColor"
 import { buildingQuery, queryTnRelateFloor, queryRentTableData, tnRelateZone, zoneQuery } from '@/api/scan/request'
 export default {
@@ -100,7 +100,7 @@ export default {
       buildSelect: 0,
       activeFloor: 0,
       activeTentanIndex: 0,
-      canvasLoading: true,
+      canvasLoading: false,
       isEdit: false,
       view: '',
       scene: '',
@@ -125,6 +125,7 @@ export default {
   created() {
     this.onlyRead = this.$route.query.onlyRead;
     this.init();
+    Opt.sceneMarkColor = new SColor('#ffffff');
   },
   mounted() {
     this.canvasWidth = this.$refs.graphy.offsetWidth;
@@ -140,6 +141,10 @@ export default {
     },
     // 适配底图到窗口
     fit() {
+      if (this.scene.sceneMark) {
+        this.view.fitItemToView([this.scene.sceneMark])
+        return
+      }
       this.view.fitSceneToView()
     },
     // 缩放
@@ -376,10 +381,16 @@ export default {
             return;
           }
           this.view.scene = this.scene;
+          if (this.floorList[index].Outline) {
+            let newArr = this.floorList[index].Outline.map(t => {
+              return new SPoint(t.X, t.Y);
+            })
+            this.scene.addSceneMark(newArr)
+          }
           this.scene.isSpaceSelectable = false;
           // 绘制业务空间
           this.getBusinessSpace();
-          this.view.fitSceneToView();
+          this.fit();
           this.view.minScale = this.view.scale;
           if (this.$refs.canvasFun) {
             this.$refs.canvasFun.everyScale = this.view.scale;

+ 27 - 20
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -42,9 +42,9 @@
                 <exhibitionMaintain :exhibitionMaintain="exhibitionMaintain"/>
               </div>
               <div class="content-media">
-                <exhibitionImage :exhibitionImage="exhibitionImage" v-show="isShowImage"/>
-                <exhibitionVideo :exhibitionVideo="exhibitionVideo" v-show="isShowVideo"/>
-                <exhibitionFile :exhibitionFile="exhibitionFile" v-show="isShowFile"/>
+                <exhibitionImage :exhibitionImage="exhibitionImage" v-if="isShowImage"/>
+                <exhibitionVideo :exhibitionVideo="exhibitionVideo" v-if="isShowVideo"/>
+                <exhibitionFile :exhibitionFile="exhibitionFile" v-if="isShowFile"/>
               </div>
             </div>
           </div>
@@ -62,7 +62,7 @@
 <script>
   import {mapGetters} from "vuex";
   import tools from "@/utils/scan/tools";
-  import {zoneDelete, getDataDictionary, zoneQuery} from '@/api/scan/request';
+  import {getDataDictionary, zoneDelete, zoneQuery} from '@/api/scan/request';
 
   import eqToSpaceTable from '@/components/business_space/newTables/eqToSpaceTable';
   import syInSpaceTable from '@/components/business_space/newTables/syInSpaceTable';
@@ -133,15 +133,16 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
           list: {}
         },
-        isShowImage: true,
-        isShowVideo: true,
-        isShowFile: true,
+        isShowImage: false,
+        isShowVideo: false,
+        isShowFile: false,
       }
   },
   computed: {
@@ -209,8 +210,8 @@
       Promise.all([promise1, promise2]).then(values => {
         this.pointData = values[0].Content;
         this.exampleData = values[1].Content[0];
+        let obj = values[1].Content[0] ? this.deepCopy(values[1].Content[0]) :values[1].Content[0];
 
-        let obj = this.deepCopy(values[1].Content[0]);
         obj = tools.flattenKeys(obj);
         this.instance = obj;
         this.handleRadios(this.currentRadio)
@@ -261,7 +262,7 @@
       let isList = this.pointData
       let isArr = []
       isList.map(j => {
-        if (this.instance.hasOwnProperty(j.Path)) {
+        if (this.instance &&this.instance.hasOwnProperty(j.Path)) {
           j.value = this.instance[j.Path]
           return j
         }
@@ -275,7 +276,7 @@
       //关键信息点
       this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.KeyWord)
       this.exhibitionCrux.cruxArray.map(i => {
-        if (this.instance.hasOwnProperty(i.Path)) {
+        if (this.instance &&this.instance.hasOwnProperty(i.Path)) {
           return {
             ...i,
             value: this.instance[i.Path]
@@ -292,7 +293,7 @@
       } else if (val == 2) { //有值信息点
         let list = this.pointData
         list.map(j => {
-          if (this.instance.hasOwnProperty(j.Path)) {
+          if (this.instance && this.instance.hasOwnProperty(j.Path)) {
             return {
               ...j,
               value: this.instance[j.Path]
@@ -314,13 +315,17 @@
       //处理数据格式
       arr.map(i => {
         if (i.InputMode == 'F2') {
+          console.log(i.Path)
           switch (i.Path) {
             case 'LedgerParam.PhotoDoc.Drawing':
             case 'LedgerParam.Siteinstall.InstallPic':
             case 'LedgerParam.Siteinstall.InstallDrawing':
             case 'LedgerParam.PhotoDoc.Nameplate':
-              if (this.instance.hasOwnProperty(i.Path)) {
+            case 'Pic' :
+
+              if (this.instance &&this.instance.hasOwnProperty(i.Path)) {
                 i.PicList = this.instance[i.Path]
+
               }
               if (picObject[i.InfoPointName]) {
 
@@ -349,10 +354,13 @@
           })
         }
       }
+      this.exhibitionImage.arr = isArray
       let video = isArray.filter(i => i.Type != 'image' &&i.type != 'image' )
       this.exhibitionVideo.list = video
+
       //判断是否显示图片组件
-      this.isShowImage = isArray.length ? true : false
+      this.isShowImage = isArray.length  ? true : false
+
       //判断是否显示video组件
       this.isShowVideo = video.length ? true : false
     },
@@ -365,7 +373,7 @@
             case 'LedgerParam.InsuranceDoc.InsuranceFile':
             case 'LedgerParam.PhotoDoc.Archive':
             case 'LedgerParam.Siteinstall.CheckReport':
-              if (this.instance.hasOwnProperty(i.Path)) {
+              if (this.instance &&this.instance.hasOwnProperty(i.Path)) {
                 i.fileList = this.instance[i.Path]
               }
               if (picObject[i.InfoPointName]) {
@@ -416,11 +424,11 @@
     displayData(arr) {//对数据进行处理传给组件展示
       const result = {}
       arr.forEach(i => {
-        if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
+        if (this.instance && this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
           i.value = this.instance[i.Path]
         }
         if (i.InputMode == 'C5') {
-          if (this.instance.hasOwnProperty(i.Path)) {
+          if (this.instance && this.instance.hasOwnProperty(i.Path)) {
             let time = this.instance[i.Path]
             i.value = this.formatDate(time)
           }
@@ -436,7 +444,7 @@
               }
             })
           } else if (i.InputMode == 'D2' || i.InputMode == 'C6') {
-            if (this.instance.hasOwnProperty(i.Path)) {
+            if (this.instance &&this.instance.hasOwnProperty(i.Path)) {
               if (!Array.isArray(this.instance[i.Path])) {
                 let transArray = this.instance[i.Path].split(',')
                 i.value = source.filter(item => transArray.includes(item.Code)).map(item => item.Name).join(',')
@@ -444,8 +452,7 @@
             }
           }
           source.forEach(j => {
-            if (j.Code == this.instance[i.Path]) {
-              console.log(j.Name, '===name===')
+            if (this.instance && j.Code == this.instance[i.Path]) {
               i.value = j.Name
             }
           })

+ 4 - 1
src/views/ledger/system/systemDetail/index.vue

@@ -133,7 +133,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -295,6 +296,7 @@
             case 'LedgerParam.Siteinstall.InstallPic':
             case 'LedgerParam.Siteinstall.InstallDrawing':
             case 'LedgerParam.PhotoDoc.Nameplate':
+            case 'LedgerParam.PhotoDoc.Pic':
               if (this.instance.hasOwnProperty(i.Path)) {
                 i.PicList = this.instance[i.Path]
               }
@@ -325,6 +327,7 @@
           })
         }
       }
+      this.exhibitionImage.arr = isArray
       let video = isArray.filter(i => i.Type != 'image' &&i.type != 'image' )
       this.exhibitionVideo.list = video
       //判断是否显示图片组件

+ 20 - 16
src/views/ready/buildfloor/addFloor/index.vue

@@ -5,26 +5,26 @@
     </el-row>
     <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="dialogVisible=false">取消</el-button>
-      <el-button size="small" type="primary" @click="confirm">确认</el-button>
+      <el-button size="small" type="primary" @click="confirm" :disabled="disabled">确认</el-button>
     </span>
   </el-dialog>
 </template>
 <script>
-    import {manageCreateFloor, manageUpdateFloor} from "@/api/scan/request";
-    import formItems from "@/components/ready/buildfloor/formItems";
-    import tools from "@/utils/buildfloor/tools";
+  import {manageCreateFloor, manageUpdateFloor} from "@/api/scan/request";
+  import formItems from "@/components/ready/buildfloor/formItems";
+  import tools from "@/utils/buildfloor/tools";
 
-    export default {
-      props: {
-        title: {
-          default: '提示'
-        },
-        type: {
-          default: 'Floor'
-        },
-        curBuildId: {
-          default: ''
-        },
+  export default {
+    props: {
+      title: {
+        default: '提示'
+      },
+      type: {
+        default: 'Floor'
+      },
+      curBuildId: {
+        default: ''
+      },
         curFloorId: {
           default: ''
         }
@@ -35,7 +35,8 @@
       data() {
         return {
           dialogVisible: false, //弹窗显示与隐藏
-          floorData: {}
+          floorData: {},
+          disabled: false
         };
       },
       methods: {
@@ -61,6 +62,7 @@
         handleClose() { },
         //创建
         confirm() {
+          this.disabled = true
           this.$refs.formItems.submitForm(this.save)
         },
         save() {
@@ -75,12 +77,14 @@
               this.$message.success('更新成功')
               this.$emit('refresh')
               this.dialogVisible = false;
+              this.disabled = false
             })
           } else {
             manageCreateFloor(Param, res => {
               this.$message.success('创建成功')
               this.$emit('refresh')
               this.dialogVisible = false;
+              this.disabled = false
             })
           }
         }

+ 2 - 1
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -64,7 +64,7 @@ export default {
   },
   methods: {
     //
-    init(){
+    init() {
       this.getFloorData();
     },
     // 初始化canvas
@@ -143,6 +143,7 @@ export default {
           }
         });
         this.drawMainScene.addAllShade(this.shadeList);
+        this.$emit('changeSign', this.shadeList.length > 0);
       });
     },
     // 清空平面图

+ 20 - 9
src/views/ready/buildfloor/index.vue

@@ -105,11 +105,18 @@
       @handleBuild="handleBuild"
     />
     <!-- 删除建筑-删除楼层 -->
-    <el-dialog :visible.sync="delDialogVis" @close="handleClose" id="messageDialog" title="提示" width="20%">
+    <el-dialog
+      :visible.sync="delDialogVis"
+      @close="handleClose"
+      id="messageDialog"
+      title="提示"
+      width="20%"
+
+    >
       <div>确定要删除该{{delText}}?</div>
       <span class="dialog-footer" slot="footer">
         <el-button @click="delDialogVis=false" size="small">取消</el-button>
-        <el-button @click="confirmDel" size="small" type="primary">确认</el-button>
+        <el-button @click="confirmDel" size="small" type="primary"  :disabled="buildDisabled">确认</el-button>
       </span>
     </el-dialog>
     <!-- 添加贯通关系弹窗 -->
@@ -151,6 +158,7 @@
         floorTitle: "添加楼层",
         buildTitle: "添加建筑",
         delDialogVis: false,
+        buildDisabled: false,
         delText: "建筑",
         headerStyle: {
           backgroundColor: "#d9d9d9",
@@ -354,28 +362,31 @@
       },
       // 确认删除(删除建筑-楼层公用)
       confirmDel() {
+        this.buildDisabled = true
         if (this.delText == "楼层") {
           let delParam = [{FloorID: this.curFloorId}];
+          this.$message.success("删除成功");
+          this.delDialogVis = false;
           manageDeleteFloor(delParam, res => {
-            this.$message.success("删除成功");
-            this.delDialogVis = false;
+            this.buildDisabled = false
             this.init();
           });
         } else {
-          //todo
           // 删除建筑
           if (this.tableData && this.tableData.length) {
             this.$message.error("当前建筑中包含楼层,不可删除");
             this.delDialogVis = false;
+            this.buildDisabled = false
           } else {
             let param = [{BuildId: this.curBuildId}];
+            this.$message.success("删除成功");
+            this.delDialogVis = false;
             objectDeleteBuild(param, res => {
-              setTimeout(() => {
-                this.handleBuildQuery()
-                this.init()
-              })
               this.$message.success("删除成功");
+              this.buildDisabled = false
               this.delDialogVis = false;
+              this.handleBuildQuery()
+              this.init()
             })
           }
 

+ 7 - 3
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -4,14 +4,14 @@
     <div class="buttons">
       <el-button icon="el-icon-back" size="mini" @click="backRouter"></el-button>
       <el-button v-if="!isEdit" size="mini" @click="changeGraphy">替换平面图</el-button>
-      <el-button v-if="sign&&!isEdit" size="mini" @click="editGraphy">编辑平面图</el-button>
+      <el-button v-if="(sign||otherSign)&&!isEdit" size="mini" @click="editGraphy">编辑平面图</el-button>
       <el-button v-if="isEdit" size="mini" @click="cancel">取消</el-button>
       <el-button v-if="isEdit" size="mini" @click="confirm" type="primary">确认</el-button>
       <span style="float:right;" v-if="file.FolderName">当前对应的模型文件:{{file.FolderName}} - {{file.FloorName}}</span>
     </div>
     <!-- 展示图片 -->
     <div class="drawImg">
-      <drawFloor ref="drawFloor" :isEdit="isEdit" :showTools="true" :id="1"></drawFloor>
+      <drawFloor ref="drawFloor" :isEdit="isEdit" :showTools="true" :id="1" @changeSign="changeSign"></drawFloor>
     </div>
     <!-- 查看图片弹窗 -->
     <checkGraphy ref="checkGraphy" @refresh="refresh" :alreadyRelatedModel='alreadyRelatedModel'></checkGraphy>
@@ -33,7 +33,8 @@ export default {
       isEdit: false, // 是否编辑模式
       file: {},
       alreadyRelatedModel: [],
-      sign: false
+      sign: false,
+      otherSign: false
     };
   },
   created() {
@@ -123,6 +124,9 @@ export default {
         }).filter(t => t);
       });
     },
+    changeSign(flag){
+      this.otherSign = flag
+    }
   },
   watch: {
     modelId(n, o) {

+ 8 - 4
src/views/screen/splitscreen/equipledger/index.vue

@@ -22,7 +22,7 @@
 
 <script>
 import { LocationPointScene, FloorView } from "@saga-web/cad-engine";
-import { getFileNameById } from "@/api/model/file";
+import { getFileNameById, queryFileByModelId } from "@/api/model/file";
 
 export default {
   data() {
@@ -48,7 +48,11 @@ export default {
       if (this.equip.ModelId && this.equip.BIMLocation) {
         this.showCanvas = true;
         this.getGraphy();
-        this.getFileName();
+        queryFileByModelId({ Filters: `Id='${this.equip.ModelId}'` }, res => {
+          if (res.Content.length) {
+            this.getFileName(res.Content[0].FloorModelId);
+          }
+        });
       } else {
         this.showCanvas = false;
       }
@@ -77,8 +81,8 @@ export default {
       return new Date().getTime();
     },
     // 获取文件夹及文件名称
-    getFileName() {
-      let pa = { Id: this.equip.ModelId }
+    getFileName(id) {
+      let pa = { Id: id }
       getFileNameById(pa, res => {
         this.file = res
       })