zhangyu il y a 4 ans
Parent
commit
5eaeb002bf

+ 3 - 3
config/dev.env.js

@@ -4,13 +4,13 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  // BASE_URL: '"http://192.168.64.14:8081"', //测试iframe地址
-  // BASE_URL: '"http://60.205.177.43:8081"', //测试iframe地址
+  // BASE_URL: '"http://192.168.64.14"', //测试iframe地址
+  // BASE_URL: '"http://60.205.177.43"', //测试iframe地址
   // SSO_SERVER: '"http://192.168.12.238:8081"', //测试环境
   // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
   // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
   // MQTT_SERVICE: '"ws://172.16.42.210:61614/stomp/"' //MQ测试环境地址
-  BASE_URL: '"http://192.168.64.14:8081"', //线上iframe地址
+  BASE_URL: '"http://192.168.64.14"', //线上iframe地址
   SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
   MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
 })

+ 3 - 3
config/index.js

@@ -12,14 +12,14 @@ module.exports = {
 
     proxyTable: {//正式环境
       '/admin': {
-        target: ' http://192.168.64.14:8080/',
+        target: 'http://192.168.64.14:8080/',
         changeOrigin: true,
         pathRewrite: {
           "^/admin": "/"
         }
       },
       '/api': {
-        target: ' http://192.168.64.14:8080/',
+        target: 'http://192.168.64.14:8080/',
         changeOrigin: true,
         pathRewrite: {
           "^/api": "/"
@@ -80,7 +80,7 @@ module.exports = {
       },
       '/image-service': {
         // 目标 API 地址
-        target: 'http://39.97.179.199:8888',
+        target: 'http://39.97.179.199:8891',
         changeOrigin: true,
         pathRewrite: {
           "^/image-service": "/image-service/"

+ 1 - 1
config/prod.env.js

@@ -1,7 +1,7 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
-  BASE_URL: '"http://192.168.64.14:8081"', //测试iframe地址
+  BASE_URL: '"http://192.168.64.14"', //测试iframe地址
   // SSO_SERVER: '"http://192.168.12.238:8081"', //测试环境
   // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
   // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境

+ 3 - 3
src/components/dialogs/list/picDialog.vue

@@ -136,11 +136,11 @@
         this.picArrs = []
         if (this.keysArr instanceof Array) {
           this.keysArr.map(item => {
-            if (item.type == 'panorama') {
+            if (item.Type == 'panorama') {
               this.panoramaArr.push(item)
-            } else if (item.type == "video") {
+            } else if (item.Type == "video") {
               this.videoArr.push(item)
-            } else if (item.type == 'image_video') {
+            } else if (item.Type == 'image_video') {
               this.videoPicArr.push(item)
             } else {
               this.picArrs.push(item)

+ 1 - 1
src/components/dialogs/list/supplierDialog.vue

@@ -144,7 +144,7 @@
 
             //分页改变
             changePage() {
-                this.pagination(this.page.currentPage, this.page.size, this.allData)
+                this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
             },
 
             //发生修改

+ 77 - 31
src/components/ledger/handsontables/device.vue

@@ -1095,56 +1095,102 @@
                 //品牌型号弹窗
                 case 'DPManufacturerID':
                     if (!this.onlyRead) {
-                        this.myDialog.firm = true
+                        const linkId = this.tableData[row.row].LinkId;
+                        if (linkId) { //关联资产
+                            this.myDialog.firm = true;
+                        } else { //未关联资产
+                            this.$message('请先关联资产再维护该信息!');
+                        }
                     }
                     return false
                 //供应商信息弹窗
                 case 'DPSupplierID':
                     if (!this.onlyRead) {
-                        this.myDialog.supplier = true
+                        const linkId = this.tableData[row.row].LinkId;
+                        if (linkId) { //关联资产
+                            this.myDialog.supplier = true;
+                        } else { //未关联资产
+                            this.$message('请先关联资产再维护该信息!');
+                        }
                     }
                     return false
                 //维修商信息弹窗
                 case 'DPMaintainerID':
                     if (!this.onlyRead) {
-                        this.myDialog.maintainer = true
+                        const linkId = this.tableData[row.row].LinkId;
+                        if (linkId) { //关联资产
+                            this.myDialog.maintainer = true;
+                        } else { //未关联资产
+                            this.$message('请先关联资产再维护该信息!');
+                        }
                     }
                     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('请先选择供应商')
+                        const linkId = this.tableData[row.row].LinkId;
+                        if (linkId) { //关联资产
+                            this.myDialog.insurer = true;
+                        } else { //未关联资产
+                            this.$message('请先关联资产再维护该信息!');
                         }
                     }
                     return false
-                //保险单号
-                case 'LedgerParam.InsuranceDoc.InsuranceNum':
+                /**
+                 * 供应合同编号
+                 * TODO:厂商库服务无人维护,故注释供应合同编号选择改为直接输入
+                 */
+                // 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
+                /** 
+                 * 保险单号
+                 * TODO:厂商库服务无人维护,故注释保险单号选择改为直接输入
+                 */
+                // 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 'flowBuild': //所属建筑楼层
+                case 'LedgerParam.EquipManufactor.ProductDate': //生产日期
+                case 'LedgerParam.EquipManufactor.SerialNum': //出厂编号
+                case 'LedgerParam.SupplyPurchase.AssetID': //资产编号
+                case 'LedgerParam.SupplyPurchase.PurchasePrice': //采购价格
+                case 'LedgerParam.InsuranceDoc.InsuranceNum': //保险单号
+                case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
                     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('请先选择保险商')
+                        const linkId = this.tableData[row.row].LinkId;
+                        if (!linkId) { //未关联资产
+                            this.$confirm('请先关联资产再维护该信息!', '提示', {
+                                confirmButtonText: '确定',
+                                showCancelButton: false,
+                                type: 'warning'
+                            }).then(() => {
+                                return false;
+                            });
                         }
                     }
                     return false

+ 3 - 3
src/components/ledger/lib/lookImages.vue

@@ -136,11 +136,11 @@
       this.picArrs = []
       if (this.keysArr instanceof Array) {
         this.keysArr.map(item => {
-          if (item.type == 'panorama') {
+          if (item.Type == 'panorama') {
             this.panoramaArr.push(item)
-          } else if (item.type == "video") {
+          } else if (item.Type == "video") {
             this.videoArr.push(item)
-          } else if (item.type == 'image_video') {
+          } else if (item.Type == 'image_video') {
             this.videoPicArr.push(item)
           } else {
             this.picArrs.push(item)

+ 48 - 7
src/views/ledger/cenotelist/index.vue

@@ -52,7 +52,7 @@ import showTools from "@/utils/handsontable/notShow"
 import text from "@/utils/handsontable/mainText"
 import cenoteType from "@/components/ledger/lib/cenoteType";
 import handsonTable from "@/components/common/handsontable";
-import { getDataDictionary, queryCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace, BeatchQueryParam } from "@/api/scan/request"
+import { getDataDictionary, queryCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace, BeatchQueryParam, buildingQuery } from "@/api/scan/request"
 import { mapGetters, mapActions } from "vuex";
 export default {
   components: {
@@ -83,17 +83,18 @@ export default {
       },
       tableData: [],
       copyTableData: [],
+      buildData: [], //建筑数据
       tableExample: null,
       myDialog: {
         update: false,//临时维护信息点
       },
       inputMap: {
-        flowBuild: {
-          InputMode: 'D1',
+        buildList: {
+          InputMode: 'D2',
           Editable:true,
-          InfoPointCode:"flowBuild",
-          InfoPointName:"建筑楼层",
-          Path:"flowBuild"
+          InfoPointCode:"buildList",
+          InfoPointName:"所属建筑",
+          Path:"buildList"
         }
       }, //信息点和输入方式映射表
       updateInputShow: false, //是否显示临时维护输入框
@@ -114,9 +115,13 @@ export default {
     }
   },
   created() {
-    this.getTableHeader()
+    this.getBuildData();
+    this.getTableHeader();
   },
   watch: {
+    projectId() {
+        this.getBuildData();
+    },
     showTypes: {
       handler(newName, oldName) {
         if (newName && newName[0] && newName[0].value) {
@@ -171,6 +176,27 @@ export default {
         }
       })
     },
+    async getBuildData() { //获取建筑数据
+        this.buildData = [];
+        const params = {
+            PageNumber: 1,
+            PageSize: 500,
+            Projection: [
+                "BuildID",
+                "BuildLocalName"
+            ]
+        }
+        buildingQuery(params, res => {
+            if (res.Result === "success") {
+                this.buildData = res.Content.map(item => {
+                    return {
+                        Code: item.BuildID,
+                        Name: item.BuildLocalName,
+                    }
+                })
+            }
+        })
+    },
     // 修改表格内容
     async updateTableData(data, change) {
       let param = {
@@ -298,6 +324,9 @@ export default {
       let arr = tools.copyArr(list)
       let data = showTools.headerTextFilter(arr, "shaft", this.onlyRead, this.showType)
       data.unshift("关联的业务空间", "其他关系");
+      if (this.showType == 'all') {
+          data.splice(4, 0, '所属建筑');
+      }
       return data;
     },
     formatHeaderType(list) {//格式化表头头映射的数据
@@ -321,6 +350,18 @@ export default {
         },
         readOnly: true
       })
+      if (this.showType == 'all') {
+        data.splice(4, 0, {
+            data: 'buildList',
+            renderer: tools.customDropdownRenderer,
+            editor: 'chosen',
+            chosenOptions: {
+                multiple: true,
+                data: this.buildData,
+            },
+            readOnly: this.onlyRead,
+        })
+      }
       return data;
     },
     initTable() {//实例化表格

+ 1 - 1
src/views/ledger/cenotelist/relatedSpace.vue

@@ -274,7 +274,7 @@ export default {
     },
     //更改业务空间类型
     changeSpace(val) {
-      this.ObjectType = val[0];
+      this.ObjectType = val[val.length - 1];
       this.floor = '';
       this.buildingList = [];
       this.building = '';

+ 81 - 35
src/views/ledger/facility/addfacility.vue

@@ -566,59 +566,105 @@ export default {
         //品牌型号弹窗
         case 'DPManufacturerID':
           if (!this.onlyRead) {
-            this.myDialog.firm = true;
+              const linkId = this.tableData[row.row].LinkId;
+              if (linkId) { //关联资产
+                this.myDialog.firm = true;
+              } else { //未关联资产
+                this.$message('请先关联资产后再维护该信息!');
+              }
           }
           break;
         //供应商信息弹窗
         case 'DPSupplierID':
           if (!this.onlyRead) {
-            this.myDialog.supplier = true;
+              const linkId = this.tableData[row.row].LinkId;
+              if (linkId) { //关联资产
+                this.myDialog.supplier = true;
+              } else { //未关联资产
+                this.$message('请先关联资产后再维护该信息!');
+              }
           }
           break;
         //维修商信息弹窗
         case 'DPMaintainerID':
           if (!this.onlyRead) {
-            this.myDialog.maintainer = true;
+              const linkId = this.tableData[row.row].LinkId;
+              if (linkId) { //关联资产
+                this.myDialog.maintainer = true;
+              } else { //未关联资产
+                this.$message('请先关联资产后再维护该信息!');
+              }
           }
           break;
         //保险公司信息
         case 'DPInsurerID':
           if (!this.onlyRead) {
-            this.myDialog.insurer = true;
-          }
-          break;
-        //供应合同编号
-        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("请先选择供应商");
-            }
+              const linkId = this.tableData[row.row].LinkId;
+              if (linkId) { //关联资产
+                this.myDialog.insurer = true;
+              } else { //未关联资产
+                this.$message('请先关联资产后再维护该信息!');
+              }
           }
           break;
-        //保险单号
-        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("请先选择保险商");
+        /**
+         * 供应合同编号
+         * TODO:厂商库服务无人维护,故注释供应合同编号选择改为直接输入
+         */
+        // 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("请先选择供应商");
+        //     }
+        //   }
+        //   break;
+        /** 
+         * 保险单号
+         * TODO:厂商库服务无人维护,故注释保险单号选择改为直接输入
+         */
+        // 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("请先选择保险商");
+        //     }
+        //   }
+        //   break;
+        case 'flowBuild': //所属建筑楼层
+        case 'LedgerParam.EquipManufactor.ProductDate': //生产日期
+        case 'LedgerParam.EquipManufactor.SerialNum': //出厂编号
+        case 'LedgerParam.SupplyPurchase.AssetID': //资产编号
+        case 'LedgerParam.SupplyPurchase.PurchasePrice': //采购价格
+        case 'LedgerParam.InsuranceDoc.InsuranceNum': //保险单号
+        case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
+            if (!this.onlyRead) {
+                const linkId = this.tableData[row.row].LinkId;
+                if (!linkId) { //未关联资产
+                    this.$confirm('请先关联资产后再维护该信息!', '提示', {
+                        confirmButtonText: '确定',
+                        showCancelButton: false,
+                        type: 'warning'
+                    }).then(() => {
+                        return false;
+                    });
+                }
             }
-          }
-          break;
+            return false
         //保险文件--设备文档--安装质检报告
         case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
         case 'LedgerParam.PhotoDoc.Archive': //设备文档

+ 43 - 33
src/views/ledger/facility/batchPoint.vue

@@ -4,7 +4,7 @@
 			<el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goback"></el-button>
 			<div id="buildFloor">
                 <span class="buildFloor">建筑楼层</span>
-                <el-cascader ref="floorCascader" placeholder="请选择" :props="props" :options="bfOptions" filterable size="small" @change="changeFloor"></el-cascader>
+                <el-cascader ref="floorCascader" placeholder="请选择" :props="props" v-model="floorValue" :options="bfOptions" filterable size="small" @change="changeFloor"></el-cascader>
             </div>
 			<my-cascader ref="cascader" @change="changeDevice"></my-cascader>
 			<el-button type="primary" size="mini" @click="handleClickSave" :disabled="!isChange" style="float:right;">确认</el-button>
@@ -110,6 +110,8 @@ export default {
             left: 0,
         },
         selectedIcon: null,
+        floorValue: "",
+        oldFloorValue: "",
 		buildId: "", //建筑Id
 		floorId: "", //楼层Id
 		floorMap: "", //楼层平面图地址
@@ -193,7 +195,7 @@ export default {
     goback() {
         this.confirm(() => {
             this.$router.push({ name: "facilityLedger" });
-        })
+        },() => {return false})
     },
     getCascader() {
       let param = {
@@ -220,7 +222,7 @@ export default {
       })
     },
     // 二次确认
-    confirm(callback) {
+    confirm(callback, cancel) {
         if (this.isChange) {
             this.$confirm('平面图数据未保存,此操作将不会保存修改数据!', '提示', {
                 confirmButtonText: '确定',
@@ -228,6 +230,8 @@ export default {
                 type: 'warning'
             }).then(() => {
                 callback();
+            }).catch(() => {
+                cancel();
             });
         } else {
             callback();
@@ -412,36 +416,42 @@ export default {
 	},
     //修改楼层
     changeFloor(value) {
-		this.showCanvas = false;
-		this.clearGraphy();
-		if (value[0]) {
-			this.buildId = value[0];
-        }
-		if (value[1]) {
-			this.floorId = value[1];
-            this.floorData = this.fIdToFloor[value[1]];
-		} else {
-            this.floorId = "";
-            this.floorData = {}
-		}
-		if (this.floorData.StructureInfo && this.floorData.StructureInfo.FloorMap) {
-			this.floorMap = this.floorData.StructureInfo.FloorMap;
-			this.showCanvas = true;
-			this.getGraphy();
-		} else {
-			this.initParams();
-			this.floorMap = "";
-        }
-        if (this.floorData.StructureInfo && this.floorData.StructureInfo.Height) {
-            this.maxHeight = this.floorData.StructureInfo.Height;
-        } else {
-            this.maxHeight = 99000;
-        }
-		if (this.floorData.Outline && this.floorData.Outline.length) {
-			this.floorOutline = this.floorData.Outline;
-		} else {
-			this.floorOutline = null;
-		}
+        this.confirm(() => {
+            this.oldFloorValue = value;
+            this.isChange = false;
+            this.showCanvas = false;
+            this.clearGraphy();
+            if (value[0]) {
+                this.buildId = value[0];
+            }
+            if (value[1]) {
+                this.floorId = value[1];
+                this.floorData = this.fIdToFloor[value[1]];
+            } else {
+                this.floorId = "";
+                this.floorData = {}
+            }
+            if (this.floorData.StructureInfo && this.floorData.StructureInfo.FloorMap) {
+                this.floorMap = this.floorData.StructureInfo.FloorMap;
+                this.showCanvas = true;
+                this.getGraphy();
+            } else {
+                this.initParams();
+                this.floorMap = "";
+            }
+            if (this.floorData.StructureInfo && this.floorData.StructureInfo.Height) {
+                this.maxHeight = this.floorData.StructureInfo.Height;
+            } else {
+                this.maxHeight = 99000;
+            }
+            if (this.floorData.Outline && this.floorData.Outline.length) {
+                this.floorOutline = this.floorData.Outline;
+            } else {
+                this.floorOutline = null;
+            }
+        }, () => {
+            this.floorValue = this.oldFloorValue;
+        })
 	},
     //修改设备族
     changeDevice(value) {