Quellcode durchsuchen

增加系统台账

qule vor 3 Jahren
Ursprung
Commit
82160cbbba

+ 1 - 1
public/systemConf.js

@@ -1,6 +1,6 @@
 var __systemConf = {
   //基础数据根域名
-  baseServiceUrl: '/api',
+  baseServiceUrl: '/baseService',
   //系统图服务域名
   sysGraphServiceUrl: '/sysGraphService',
   //导航菜单

+ 9 - 13
src/components/old-adm/dialogs/list/batchDialog.vue

@@ -118,8 +118,8 @@ import floorCascader from "@/components/old-adm/ledger/components/lib/floorCasca
 // import { queryUpdate, updateEquip } from "@/api/scan/request";
 // import { queryEquip } from "@/api/object/equip";
 import ScanController from "@/controller/old-adm/ScanController";
-import Equip from "@/controller/old-adm/equipController";
-import tools from "@/utils/toolUtils";
+import EquipController from "@/controller/old-adm/equipController";
+import { toolUtils } from "@/utils/toolUtils";
 import scanTools from "@/utils/old-adm/scan/tools";
 
 export default {
@@ -285,7 +285,7 @@ export default {
                 if (this.keycode != "") {
                     params.filters += `;localName contain '${this.keycode}' or localId contain '${this.keycode}' or infos.digitalDeliveryID contain '${this.keycode}'`;
                 }
-                Equip.queryEquip(params, (res) => {
+                EquipController.queryEquip(params).then((res) => {
                     this.multipleSelection = [];
                     this.allObject = res.content;
                     this.page.total = res.total;
@@ -328,13 +328,11 @@ export default {
             this.newEnclosure.forEach(({ path, value }) => (param[path] = value));
             let newValuable = [];
             this.newEnclosure.filter((i) => this.form[i.path] && i.value).forEach(({ code, value }) => (newValuable[code] = value));
-
-            console.log(newValuable, "多选信息");
-
+            console.log(this.radio)
             if (this.radio === 1) {
                 //组装数据,根据是覆盖该是增量,1是增量
                 //    1:单选数据
-                let formData = tools.formatData(this.formData);
+                let formData = toolUtils.formatData(this.formData);
                 let arr1 = this.deepCopy(arr).map((item) => ({
                     ...item,
                     ...formData,
@@ -349,7 +347,7 @@ export default {
                 let param = {};
                 this.newEnclosure.forEach(({ path, value }) => (param[path] = value));
                 let pa = Object.assign(param, this.formData);
-                pa = tools.formatData(pa);
+                pa = toolUtils.formatData(pa);
                 let arr3 = this.deepCopy(arr).map((item) => ({
                     ...item,
                     ...pa,
@@ -368,7 +366,7 @@ export default {
                 let filterParam = this.filterCheck(param, "sole");
                 let filterParam1 = this.filterCheck(param1, "multiple");
                 if (filterParam) {
-                    ScanController.updateEquip(param, (res) => {
+                    ScanController.updateEquip(param).then((res) => {
                         if (res.result === "success") {
                             this.loading = false;
                             this.$emit("upDataDevice");
@@ -385,7 +383,7 @@ export default {
                         return i;
                     });
                     setTimeout(() => {
-                        ScanController.queryUpdate(param1, (res) => {
+                        ScanController.queryUpdate(param1).then((res) => {
                             if (res.result === "success") {
                                 this.loading = false;
                                 this.$emit("upDataDevice");
@@ -403,10 +401,8 @@ export default {
             } else if (type === 2) {
                 //覆盖
                 let filterParams = this.filterCheck(param, "sole");
-                console.log("filterParams", filterParams);
-                console.log(param);
                 if (filterParams) {
-                    ScanController.updateEquip(param, (res) => {
+                    ScanController.updateEquip(param).then((res) => {
                         if (res.result === "success") {
                             this.loading = false;
                             this.$emit("upDataDevice");

+ 52 - 56
src/components/old-adm/ledger/components/handsontables/device.vue

@@ -142,18 +142,15 @@
     </div>
 </template>
 <script>
-// import { BeatchQueryParam, deleteEquip, getEquipBelongs, updateEquip } from "@/api/scan/request";
 import ScanController from "@/controller/old-adm/ScanController";
-// import { getEquipTableCon } from "@/api/object/equip";
-import Equip from "@/controller/old-adm/equipController";
-// import { getDataDictionary, deliveredInfos } from "@/api/dict";
-import Dic from "@/controller/old-adm/dicController";
+import EquipController from "@/controller/old-adm/equipController";
+import DicController from "@/controller/old-adm/dicController";
+
 import tools from "@/utils/old-adm/scan/tools";
 import handsonUtils from "@/utils/old-adm/hasontableUtils";
 import showTools from "@/utils/old-adm/handsontable/notShow";
 import text from "@/utils/old-adm/handsontable/mainText";
 import myCascader from "@/components/old-adm/ledger/components/lib/cascader";
-import buildFloor from "@/utils/old-adm/handsontable/buildFloorData";
 import BuildController from "@/controller/old-adm/buildController";
 import qrcode from "@/components/old-adm/ledger/components/lib/qrcode";
 import bimDialog from "@/components/old-adm/ledger/components/lib/bimDialog";
@@ -389,7 +386,7 @@ export default {
          * 查询已交付的信息点
          * @param classCode 设备类型
          */
-        getDeliveredInfos(classCode) {
+        async getDeliveredInfos(classCode) {
             let params = {
                 classCode: classCode,
                 objType: "equipment",
@@ -405,60 +402,58 @@ export default {
             } else if (this.mess.floorId && this.mess.floorId != "all") {
                 params.floorId = `${this.mess.floorId}`;
             }
-            Dic.deliveredInfos(params, (res) => {
-                this.tableHeader = res.content;
-                this.codeToDataSource = {};
-                this.tableHeader.forEach((item) => {
-                    if (item.path) {
-                        this.inputMap[item.path] = item;
-                    }
-                    if (item.dataSource) {
-                        try {
-                            this.codeToDataSource[item.code] = {};
-                            item.dataSource.forEach((dic) => {
-                                this.codeToDataSource[item.code][dic.code] = dic.name;
-                            });
-                        } catch (e) {
-                            console.log(e);
-                        }
+            const res = await DicController.deliveredInfos(params)
+            this.tableHeader = res.content;
+            this.codeToDataSource = {};
+            this.tableHeader.forEach((item) => {
+                if (item.path) {
+                    this.inputMap[item.path] = item;
+                }
+                if (item.dataSource) {
+                    try {
+                        this.codeToDataSource[item.code] = {};
+                        item.dataSource.forEach((dic) => {
+                            this.codeToDataSource[item.code][dic.code] = dic.name;
+                        });
+                    } catch (e) {
+                        console.log(e);
                     }
-                });
-                this.getTableData();
-                //  信息维护
-                this.newEnclosure = res.content.filter((i) => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
+                }
             });
+            this.getTableData();
+            //  信息维护
+            this.newEnclosure = res.content.filter((i) => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
         },
         /**
          * 查询全部信息点
          * @param classCode 设备类型
          */
-        getDataDictionary(classCode) {
+        async getDataDictionary(classCode) {
             let params = {
                 type: classCode,
                 orders: "sort asc, name desc",
             };
-            Dic.getDataDictionary(params, (res) => {
-                this.tableHeader = res.content;
-                this.codeToDataSource = {};
-                this.tableHeader.forEach((item) => {
-                    if (item.path) {
-                        this.inputMap[item.path] = item;
-                    }
-                    if (item.dataSource) {
-                        try {
-                            this.codeToDataSource[item.code] = {};
-                            item.dataSource.forEach((dic) => {
-                                this.codeToDataSource[item.code][dic.code] = dic.name;
-                            });
-                        } catch (e) {
-                            console.log(e);
-                        }
+            const res = await DicController.getDataDictionary(params)
+            this.tableHeader = res.content;
+            this.codeToDataSource = {};
+            this.tableHeader.forEach((item) => {
+                if (item.path) {
+                    this.inputMap[item.path] = item;
+                }
+                if (item.dataSource) {
+                    try {
+                        this.codeToDataSource[item.code] = {};
+                        item.dataSource.forEach((dic) => {
+                            this.codeToDataSource[item.code][dic.code] = dic.name;
+                        });
+                    } catch (e) {
+                        console.log(e);
                     }
-                });
-                this.getTableData();
-                //  信息维护
-                this.newEnclosure = res.content.filter((i) => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
+                }
             });
+            this.getTableData();
+            //  信息维护
+            this.newEnclosure = res.content.filter((i) => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
         },
         //关闭弹窗
         closeBIM(val) {
@@ -499,9 +494,10 @@ export default {
                     param.filters += `;localName contain '${this.mess.keyWord}' || localId contain '${this.mess.keyWord}' || cADID contain '${this.mess.keyWord}' || infos.digitalDeliveryID contain '${this.mess.keyWord}'`;
                 }
 
-                Equip.getEquipTableCon(param, (res) => {
+                EquipController.getEquipTableCon(param).then((res) => {
                     this.loading = false;
-                    this.showParts = res.message == "1" ? true : 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;
@@ -550,7 +546,7 @@ export default {
                 }
             });
             if (param.data.length) {
-                ScanController.BeatchQueryParam(param, (res) => {
+                ScanController.BeatchQueryParam(param).then((res) => {
                     if (!this.onlyRead) {
                         return false;
                     }
@@ -792,7 +788,7 @@ export default {
                 renderAllRows: true,
                 // colWidths: 200,
                 autoColumnSize: true,
-                language: "zh-CN",
+                // language: "zh-CN",
                 fillHandle: "vertical", //允许纵向填充
                 manualColumnResize: true,
                 manualColumnMove: true,
@@ -892,8 +888,8 @@ export default {
                 });
         },
         // 删除设备
-        async removeDevice(param) {
-            await ScanController.deleteEquip(param, (res) => {
+        removeDevice(param) {
+            ScanController.deleteEquip(param).then((res) => {
                 this.$message.success("删除成功");
                 this.$emit("close", { code: this.deleteCode });
                 // this.getTableData()
@@ -955,7 +951,7 @@ export default {
                     param.content.push(item);
                 }
             });
-            ScanController.updateEquip(param, (res) => {});
+            ScanController.updateEquip(param);
         },
         //修改设备类型
         changeCader() {
@@ -967,7 +963,7 @@ export default {
                         pageSize: 50,
                     },
                 };
-                ScanController.getEquipBelongs(param, (res) => {
+                ScanController.getEquipBelongs(param).then((res) => {
                     if (res.content.length) {
                         this.deviceType.assetType = res.content[0].family;
                         this.deviceType.assetName = res.content[0].familyName;

+ 4 - 20
src/components/old-adm/ledger/components/lib/cascader.vue

@@ -13,11 +13,8 @@
 </template>
 <script>
 import { mapGetters } from 'vuex';
-// import { queryEquip } from "@/api/object/equip";
-
-// import { queryPhysicsAllType } from "@/api/dict";
-import Dic from '@/controller/old-adm/dicController';
-import Equip from '@/controller/old-adm/equipController';
+import DicController from '@/controller/old-adm/dicController';
+import EquipController from '@/controller/old-adm/equipController';
 
 export default {
   name: "getCode",
@@ -74,7 +71,6 @@ export default {
       if (flag) {
         this.value = '';
       }
-      console.log(value)
       this.$emit("change", value)
     },
     //获取当前项目下的设备类型(只拿到编码-需要过滤)
@@ -101,26 +97,14 @@ export default {
         }
         param2.filters = param2.filters.slice(1)
       }
-      console.log(param2,'param2')
 
       let param1 = {
         type: "equipment"
       }
 
-      let promise2 = new Promise((resolve, reject) => {
-        Equip.queryEquip(param2, res => {
-          resolve(res)
-        })
-      })
-      let promise1 = new Promise((resolve, reject) => {
-        Dic.queryPhysicsAllType(param1, res => {
-          resolve(res)
-        })
-      })
-
-      Promise.all([promise1, promise2]).then((res) => {
+      Promise.all([EquipController.queryEquip(param2), DicController.queryPhysicsAllType(param1)]).then((res) => {
         let allData = res[0], data = res[1]
-        this.options = this.formatOptions(allData.content)
+        this.options = this.formatOptions(data.content)
         if (!this.all) {
           this.content = data.content.map(t => {
             return t.classCode

+ 5 - 8
src/components/old-adm/ledger/components/lib/dynamicDialog.vue

@@ -55,13 +55,10 @@
 </template>
 
 <script>
-// import storage from "@/framework/utils/storage";
 import storage from "@/utils/storageUtil";
-// import { baseUrl, dataCenter } from "@/api/scan/config.js";
-import ScanUtil from "@/utils/scanUtil";
-// import { queryDownloadsKey } from "@/api/scan/request";
 import ScanController from "@/controller/old-adm/ScanController";
 import { mapGetters } from "vuex";
+import { datacenter_pre } from "@/controller/old-adm/preTypes";
 
 export default {
     data() {
@@ -71,8 +68,8 @@ export default {
             messageKey: "",
             historyKey: "",
             activities: [],
-            baseUrl: ScanUtil.baseUrl,
-            dataCenter: ScanUtil.datacenter,
+            baseUrl: window.__systemConf.baseServiceUrl,
+            dataCenter: datacenter_pre,
         };
     },
     computed: {
@@ -99,7 +96,7 @@ export default {
                 orders: "createTime desc",
                 pageSize: 1,
             };
-            ScanController.queryDownloadsKey(params, (res) => {
+            ScanController.queryDownloadsKey(params).then((res) => {
                 if (res.result === "success" && res.content && res.content.length && res.content[0].key) {
                     this.historyKey = res.content[0].key;
                 } else {
@@ -222,7 +219,7 @@ export default {
         },
         error(event, file, fileList) {},
         download(key) {
-            const url = `${baseUrl}${dataCenter}/graphic/downloads/point?key=` + key;
+            const url = `${this.baseUrl}${datacenter_pre}/graphic/downloads/point?key=` + key;
             let a = document.createElement("a");
             a.href = url;
             a.download = `${key}.xlsx`;

+ 8 - 8
src/components/old-adm/ledger/components/lib/equipCascader.vue

@@ -86,7 +86,7 @@ export default {
             this.$emit("change", value);
         },
         //获取当前项目下的设备类型(只拿到编码-需要过滤)
-        getData(val) {
+        async getData(val) {
             let params = {
                 distinct: true,
                 pageNumber: 1,
@@ -107,13 +107,13 @@ export default {
                 }
                 params.filters = params.filters.slice(1);
             }
-            Dic.getEquipLkSys(params, (res) => {
-                if (res.content) {
-                    this.options = res.content;
-                } else {
-                    this.options = [];
-                }
-            });
+            const res = await Dic.getEquipLkSys(params)
+            if (res.content) {
+                this.options = res.content;
+            } else {
+                this.options = [];
+            }
+            
         },
     },
 };

+ 5 - 21
src/components/old-adm/ledger/components/lib/linkassets.vue

@@ -32,16 +32,10 @@
   </el-dialog>
 </template>
 <script>
-
-// import { zoneQuery, TypePartsDie } from '@/api/scan/request'
-// import { queryPhysicsAllType } from '@/api/dict'
-import Dic from '@/controller/old-adm/dicController'
-import Builder from '@/controller/old-adm/buildController'
-import Floor from '@/controller/old-adm/floorController'
+import DicController from '@/controller/old-adm/dicController'
+import BuilderController from '@/controller/old-adm/buildController'
+import FloorController from '@/controller/old-adm/floorController'
 import ScanController from '@/controller/old-adm/ScanController'
-// import { buildingQuery } from '@/api/object/build'
-// import { floorQuery } from '@/api/object/floor'
-
 import { mapGetters } from "vuex"
 
 export default {
@@ -115,17 +109,7 @@ export default {
           "floorSequenceID"
         ]
       }
-      let promise1 = new Promise((resolve, reject) => {
-        Builder.buildingQuery(buildParams, res => {
-          resolve(res)
-        })
-      })
-      let promise2 = new Promise((resolve, reject) => {
-        Floor.floorQuery(floorParams, res => {
-          resolve(res)
-        })
-      })
-      Promise.all([promise1, promise2]).then(values => {
+      Promise.all([BuilderController.buildingQuery(buildParams), FloorController.floorQuery(floorParams)]).then(values => {
         let builData = values[0].content, floorData = values[1].content
         data = builData.map(build => {
           return {
@@ -174,7 +158,7 @@ export default {
       let params = {
         type: "space"
       }
-      Dic.queryPhysicsAllType(params, res => {
+      DicController.queryPhysicsAllType(params).then(res => {
         if (res.content) {
 					this.zoneList = res.content.filter(item => {
 						if (item.name !== item.aliasName) {

+ 11 - 17
src/components/old-adm/ledger/components/lib/staticDialog.vue

@@ -55,13 +55,10 @@
 </template>
 
 <script>
-// import storage from "@/framework/utils/storage";
 import storage from "@/utils/storageUtil";
-// import { baseUrl, dataCenter } from "@/api/scan/config.js";
-import ScanUtil from "@/utils/scanUtil";
-// import { queryDownloadsKey, equipTemplate } from "@/api/scan/request";
 import ScanController from "@/controller/old-adm/ScanController";
 import { mapGetters } from "vuex";
+import { datacenter_pre, graphhic_pre } from "@/controller/old-adm/preTypes";
 
 export default {
     data() {
@@ -71,8 +68,8 @@ export default {
             messageKey: "",
             historyKey: "",
             activities: [],
-            baseUrl: ScanUtil.baseUrl,
-            dataCenter: ScanUtil.dataCenter,
+            baseUrl: window.__systemConf.baseServiceUrl,
+            dataCenter: datacenter_pre,
         };
     },
     computed: {
@@ -96,11 +93,11 @@ export default {
         getHistoryKey() {
             const params = {
                 filters: "type = 'static'",
-                orders: "createTime desc",
+                orders: "createTimse desc",
                 pageSize: 1,
             };
-            ScanController.queryDownloadsKey(params, (res) => {
-                ScanController.queryDownloadsKey(params, (res) => {
+            ScanController.queryDownloadsKey(params).then((res) => {
+                ScanController.queryDownloadsKey(params).then((res) => {
                     if (res.result === "success" && res.content && res.content.length && res.content[0].key) {
                         this.historyKey = res.content[0].key;
                     } else {
@@ -224,23 +221,20 @@ export default {
         },
         error(event, file, fileList) {},
         download(key) {
-            const url = `${baseUrl}${dataCenter}/graphic/downloads/point?key=` + key;
+            const url = `${this.baseUrl}${datacenter_pre}/graphic/downloads/point?key=` + key;
             let a = document.createElement("a");
             a.href = url;
             a.download = `${key}.xlsx`;
             a.click();
+
         },
         /**
          * 台账信息导入模板
          */
         downloadEquipTemplate() {
-            ScanController.equipTemplate(
-                {},
-                (res) => {
-                    console.log("下载台账信息导入模板");
-                },
-                "台账信息导入模板.xlsx"
-            );
+            // ScanController.equipTemplate();
+            // window.location.href = graphhic_pre + "/downloads/equip/template"
+            window.location.href =window.__systemConf.baseServiceUrl +graphhic_pre +"/downloads/equip/template";
         },
         handleCloseDialog() {
             this.messageKey = "";

+ 2 - 2
src/components/old-adm/ledger/components/lib/uploadFiles.vue

@@ -103,7 +103,7 @@ export default {
       download(item) {
         if (item.key) {
           let a = document.createElement("a");
-          a.href = `/image-service/common/file_get/${item.key}?systemId=dataPlatform`;
+          a.href = `${window.window.__systemConf.baseServiceUrl}/image-service/common/file_get/${item.key}?systemId=dataPlatform`;
           a.download = `${item.name}`;
           a.click();
           document.body.removeChild(a);
@@ -169,7 +169,7 @@ export default {
                 /* method */
                 "POST",
                 /* target url */
-                "/image-service/common/file_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true" + key
+                window.window.__systemConf.baseServiceUrl + "/image-service/common/file_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true" + key
                 /*, async, default to true */
               );
               //xhr.overrideMimeType("application/octet-stream");

+ 5 - 5
src/components/old-adm/ledger/components/tableTransfers.vue

@@ -174,7 +174,7 @@ export default {
           ]
         }
       }
-      ScanController.getEquipBelongs(param, res => {
+      ScanController.getEquipBelongs(param).then(res => {
         this.List = this.formatOptions(res.content)
       })
     },
@@ -246,7 +246,7 @@ export default {
       } else {
         delete param.data.Filters;
       }
-      ScanController.getEquipNotInSys(param, res => {
+      ScanController.getEquipNotInSys(param).then(res => {
         this.tableData = res.Content
         this.pages1.total = res.Total
         this.isLoading1 = false
@@ -264,7 +264,7 @@ export default {
       if (this.search2 != '') {
         param.Filters += `;EquipLocalName contain '${this.search2}' || EquipName contain '${this.search2}'`
       }
-      ScanController.getEquipInSys(param, res => {
+      ScanController.getEquipInSys(param).then(res => {
         this.table2Data = res.Content
         this.pages2.total = res.Total
         this.isLoading2 = false
@@ -294,7 +294,7 @@ export default {
           SysID: t.SysID
         }
       })
-      ScanController.sysUnlinkEquip(tempIDs, res => {
+      ScanController.sysUnlinkEquip(tempIDs).then(res => {
         this.$message.success('修改关联关系成功')
         this.getAllTable()
       })
@@ -305,7 +305,7 @@ export default {
         sysId: this.id,
         equipIdList: arr
       }
-      ScanController.sysLinkEquip(param, res => {
+      ScanController.sysLinkEquip(param).then(res => {
         this.$message.success('修改关联关系成功')
         this.getAllTable()
       })

+ 9 - 8
src/components/old-adm/ledger/facility/batchPoint.vue

@@ -88,13 +88,14 @@
   	</div>
 </template>
 <script>
-import floorCascader from "@/components/old-adm/ledger/lib/floorCascader";
-import myCascader from "@/components/old-adm/ledger/lib/cascader";
-import { queryEquip, updateEquip, buildingQuery } from '@/api/scan/request';
-import { LocationPointScene, FloorView, Opt, SpaceItem, ZoneItem } from "@saga-web/cad-engine/lib";
+import floorCascader from "@/components/old-adm/ledger/components/lib/floorCascader";
+import myCascader from "@/components/old-adm/ledger/components/lib/cascader";
+import EquipController from "@/controller/old-adm/equipController";
+import { LocationPointScene, FloorView, Opt } from "@saga-web/cad-engine/lib";
 import { SPoint, SColor } from "@saga-web/draw";
 import { mapGetters } from "vuex";
-import { SMathUtil } from "@saga-web/cad-engine/lib/utils/SMathUtil"
+import ScanController from "@/controller/old-adm/ScanController";
+import BuildController from "@/controller/old-adm/buildController";
 export default {
   components: {
     floorCascader,
@@ -207,7 +208,7 @@ export default {
         pageNumber: 1,
         pageSize: 50
       }
-      buildingQuery(param, res => {
+      BuildController.buildingQuery(param).then(res => {
         this.fIdToFloor = {}
         this.bfOptions = res.content.map(t => {
             if (t.floor && t.floor.length) {
@@ -345,7 +346,7 @@ export default {
 			}
 
 	        this.canvasLoading = true;
-			queryEquip(params, (res) => {
+			EquipController.queryEquip(params).then((res) => {
                 this.equipList = [];
 				this.equipList = this.equipList.concat(res.content.map(item => {item.selected = false; item.hasLocation = !!item.bimLocation; return item;}));
 				if (this.view && this.view.scene) {
@@ -484,7 +485,7 @@ export default {
                     })
                 }
             })
-            updateEquip(param, () => {
+            ScanController.updateEquip(param).then(() => {
                 this.$message({message: '保存成功!', type: 'success'});
             })
         }

+ 3 - 50
src/components/old-adm/ledger/facility/index.vue

@@ -30,7 +30,6 @@
             </div>
             <hanson-table @close="close" :graphyId="graphyId" ref="tableMain"></hanson-table>
         </div>
-        <!-- <table-transfers></table-transfers> -->
         <linkassets-dialog :dialog="dialog"></linkassets-dialog>
         <!-- 深化点表导入 -->
         <dynamic-dialog ref="dynamicDialog" @upDataDevice="upDataDevice"></dynamic-dialog>
@@ -43,11 +42,9 @@ import sagaTitle from "../components/lib/title";
 import floorCascader from "../components/lib/floorCascader";
 import myCascader from "../components/lib/equipCascader";
 import hansonTable from "../components/handsontables/device";
-import tableTransfers from "../components/tableTransfers";
 import linkassetsDialog from "../components/lib/linkassets";
-// import { countEquip } from "../api/object/equip";
-import Equip from "@/controller/old-adm/equipController";
-import { Facility } from "@/controller/old-adm/facilityController";
+
+import EquipController from "@/controller/old-adm/equipController";
 import dynamicDialog from "../components/lib/dynamicDialog";
 import staticDialog from "../components/lib/staticDialog";
 import { mapGetters } from "vuex";
@@ -58,7 +55,6 @@ export default {
         floorCascader,
         myCascader,
         hansonTable,
-        tableTransfers,
         linkassetsDialog,
         staticDialog,
         dynamicDialog,
@@ -102,12 +98,6 @@ export default {
         this.param.secret = this.secret;
         this.getProjName();
         this.getCount();
-        // let deviceId = this.$route.params.deviceId;
-        // if (deviceId) {
-        //     this.$nextTick(() => {
-        //         this.$refs.cascader.setValue(deviceId);
-        //     });
-        // }
     },
     activated() {
         if (!this.$route.meta.isBack) {
@@ -159,54 +149,17 @@ export default {
         },
         close(val) {
             this.getCount();
-            // if (val && this.$refs.cascader) {
-            //     this.$refs.cascader.changeVal(val.code);
-            // }
-            // this.$refs.cascader.getData(this.currentBuilding);
             this.$refs.tableMain.getTableData();
         },
-        // getEqCode() {
-        //   getEquipmentFamily(res => {
-        //     debugger
-        //     this.assetGroupList = res.Content
-        //     this.getGraphyId()
-        //   })
-        // },
         //获取统计数量
         async getCount() {
             let param = {
                 filters: "not propertyId isnull",
             };
-            let [res1, res2] = await Promise.all([Equip.countEquip({filters: ''}), Equip.countEquip(param)])
+            let [res1, res2] = await Promise.all([EquipController.countEquip({filters: ''}), EquipController.countEquip(param)])
             this.mess.name[0].num = res1.count
             this.mess.name[1].num = res2.count;
-            // await Equip.countEquip({}, (res) => {
-            //     console.log(res)
-            //     this.mess.name[0].num = res.count;
-            // });
-            // Equip.countEquip(param, (res) => {
-            //     this.mess.name[1].num = res.count;
-            // });
         },
-        // getGraphyId() {
-        //   let param = {
-        //     ProjId: this.param.ProjId,
-        //     secret: this.param.secret,
-        //     type: "SystemEquip"
-        //   }
-        //   getGraphyId(param).then(res => {
-        //     if (res.data.Result == "success") {
-        //       debugger
-        //       this.graphyId = res.data.graph_id
-        //       if (this.$refs.tableMain)
-        //         this.$refs.tableMain.setGraphyId(this.graphyId, this.assetGroupList);
-        //     } else {
-        //       this.$message.error("请求错误:" + res.data.ResultMsg)
-        //     }
-        //   }).catch(_ => {
-        //     this.$message.error("请求错误")
-        //   })
-        // },
         //修改楼层
         changeFloor(value) {
             if (value[0]) {

+ 10 - 14
src/controller/old-adm/ScanController.ts

@@ -4,16 +4,15 @@ class ScanController {
   
   static async getEquipNotInSys(params, fn) {
     const res = await ScanController.http.postRequest(`/equip-component/equip-query/equip-sys?sysId=${params.sysId}`, params)
-    fn(res);
+    return fn ? fn(res) : res
   }
   static async getEquipInSys(params, fn) {
     const res = await ScanController.http.postRequest(`/equip-component/equip-query/sys-equip`, params)
-    fn(res);
+    return fn ? fn(res) : res
   }
   static async sysLinkEquip(params, fn) {
     const res = await ScanController.http.postRequest(`/datacenter/rel/sy-in-eq/link-sy-eq`, params)
-    fn(res);
-    return res
+    return fn ? fn(res) : res
   }
   /**
     *@description: 获取设定参数和动态参数
@@ -25,7 +24,7 @@ class ScanController {
   static async BeatchQueryParam(params, fn) {
     let data = params.data
     const res = await ScanController.http.postRequest(`/rwd/iot/data/current?projectId=${params.projectId}&groupCode=${params.groupCode}&appId=${params.appId}`, data)
-    fn(res);
+    return fn ? fn(res) : res
   }
   /** 
 
@@ -151,11 +150,11 @@ class ScanController {
       url += `&floorId=${params.floorId}`
     }
     const res = await ScanController.http.postRequest(url, params);
-    fn(res);
+    return fn ? fn(res) : res
   }
   static async countGeneralSys(params: any, fn: any) {
     const res = await ScanController.http.postRequest('/datacenter/object/general-system/count', params)
-    fn(res);
+    return fn ? fn(res) : res
   }
   /**
   *@description: 获取楼层信息
@@ -175,7 +174,7 @@ class ScanController {
   }
   static async getAllProject(params, fn) {
     const res = await ScanController.http.postRequest('/datacenter/object/project/query/obj', params)
-    fn(res)
+    return fn ? fn(res) : res
   }
 
   /**
@@ -186,8 +185,7 @@ class ScanController {
    */  
   static async sysRelateBuild(params, fn) {
     const res = await ScanController.http.postRequest('/datacenter/rel/sy-in-bd/link-bd', params);
-    fn();
-    return res;
+    return fn ? fn(res) : res
   }
   /**
    * @description: 创建系统所在建筑关系,系统一对多,覆盖
@@ -197,8 +195,7 @@ class ScanController {
    */  
   static async sysRelateFloor(params, fn) {
     const res = await ScanController.http.postRequest('/datacenter/rel/sy-in-fl/link-fl', params);
-    fn();
-    return res;
+    return fn ? fn(res) : res
   }
 /**
  * @description: 设备清单 - 根据对象删除系统和设备的关系
@@ -207,8 +204,7 @@ class ScanController {
  */  
  static async sysUnlinkEquip(params, fn) {
   const res = await ScanController.http.postRequest('/datacenter/sy-in-eq/unlinks-sy-eq', params);
-  fn();
-  return res;
+  return fn ? fn(res) : res
 }
 
 }

+ 0 - 63
src/controller/old-adm/buildController.ts

@@ -32,24 +32,10 @@ class BuildController {
         pageSize: 1000,
         projection: ["buildingId", "id", "localName", "floorSequenceID"],
       };
-
-    // let promise1 = new Promise((resolve, reject) => {
-    //   this.buildingQuery(buildParams, res => {
-    //     resolve(res)
-    //   })
-    // })
-    // let promise2 = new Promise((resolve, reject) => {
-    //   floorQuery(floorParams, res => {
-    //     resolve(res)
-    //   })
-    // })
-
     Promise.all([
       this.buildingQuery(buildParams),
       FloorController.floorQuery(floorParams),
     ]).then(function (values: any) {
-      // console.log(values);
-      return;
       let builData = values[0].content,
         floorData = values[1].content;
       data = builData.map((build) => {
@@ -109,55 +95,6 @@ class BuildController {
         }
       });
     });
-    // buildingQuery(buildParams, res => {
-    //   let builData = res.Content
-    //   data = builData.map(build => {
-    //       return {
-    //           value: build.BuildID,
-    //           label: build.BuildLocalName
-    //       }
-    //   })
-    //   data.unshift({
-    //     value: "",
-    //     label: "未明确建筑的设备"
-    //   })
-    //   floorQuery(floorParams, res => {
-    //       let floorData = res.Content
-    //       data.forEach(build => {
-    //           floorData.forEach(floor => {
-    //               if (build.value == floor.BuildID && floor.FloorID && floor.FloorLocalName) {
-    //                   if (build.children) {
-    //                       build.children.push({
-    //                           value: floor.FloorID,
-    //                           label: floor.FloorLocalName
-    //                       })
-    //                   } else {
-    //                       build.children = []
-    //                       build.children.push({
-    //                           value: "",
-    //                           label: "未明确楼层的设备"
-    //                       })
-    //                   }
-    //               }
-    //           })
-    //       })
-    //       data.forEach(item => {
-    //         if (item.children && item.children.length) {
-    //           item.children.forEach(child => {
-    //             buildFloorData.push({
-    //               Code: item.value + "-" + child.value,
-    //               Name: item.label + "-" + child.label
-    //             })
-    //           })
-    //         } else {
-    //           buildFloorData.push({
-    //             Code: item.value,
-    //             Name: item.label
-    //           })
-    //         }
-    //       })
-    //   })
-    // })
   }
 }
 export default BuildController;

+ 2 - 2
src/controller/old-adm/dicController.ts

@@ -9,7 +9,7 @@ class Dic {
    */  
   static async getDataDictionary(params, fn) {
     const res = await Dic.http.postRequest(`/datacenter/dict/query`, params)
-    fn(res)
+    return fn ? fn(res) : res
   }
 
   /**
@@ -19,7 +19,7 @@ class Dic {
    */  
   static async deliveredInfos(params, fn) {
     const res = await Dic.http.postRequest('/equip-component/dict/delivered/infos', params)
-    fn(res)
+    return fn ? fn(res) : res
   }
   static async getEquipLkSys() {}
   

+ 20 - 6
src/controller/old-adm/equipController.ts

@@ -1,22 +1,36 @@
 import { baseHttpUtils } from "@/utils/http/baseHttpUtils";
 import { Count } from "@/models/equip";
+import { equipquery_pre, object_pre } from "./preTypes";
 
 /**
  * 设备相关接口
  */
-class Equip {
+class EquipController {
   static http = new baseHttpUtils();
-  static pre = "/datacenter/object";
-  static async getEquipTableCon() {}
-  static async queryEquip() {}
+  /**
+   * 查询设备关联资产部件数量
+   * @returns
+   */
+  static async getEquipTableCon(params) {
+    return await this.http.postRequest(
+      equipquery_pre + "/equip-components",
+      params
+    );
+  }
+  /**
+   * 设备清单 - 查询设备信息
+   */
+  static async queryEquip(params) {
+    return await this.http.postRequest(object_pre + "/equip/query", params);
+  }
   /**
    * 根据条件查询统计数量
    * @param {Count} params
    * @returns
    */
   static async countEquip(params: Count) {
-    return await this.http.postRequest(this.pre + "/equip/count", params);
+    return await this.http.postRequest(object_pre + "/equip/count", params);
   }
 }
 
-export default Equip;
+export default EquipController;

+ 10 - 0
src/controller/old-adm/preTypes.ts

@@ -0,0 +1,10 @@
+export const datacenter_pre = "/datacenter";
+export const dict_pre = `${datacenter_pre}/dict`;
+export const object_pre = `${datacenter_pre}/object`;
+export const rwd_pre = "/rwd";
+
+export const equipcomponent_pre = "/equip-component";
+export const equipquery_pre = `${equipcomponent_pre}/equip-query`;
+export const equipcomponentdic_pre = `${equipcomponent_pre}/dict`;
+
+export const graphhic_pre = `${datacenter_pre}/graphic`;

+ 15 - 1
src/router/system.js

@@ -10,6 +10,8 @@ import systemGraphEdit from "@/components/systemGraph/edit";
 import facilityLedger from "@/components/old-adm/ledger/facility/index";
 // 系统台账
 import systemLedger from '@/components/old-adm/ledger/system/index';
+import batchPointAssets from '@/components/old-adm/ledger/facility/batchPoint' //批量维护设备位置
+
 
 export default [
   {
@@ -33,8 +35,20 @@ export default [
       },
       {
         path: "/ledger/facility",
-        name: "设备台账",
+        name: "facilityLedger",
         component: facilityLedger,
+        meta: {keepAlive: true, isBack: false, breadcrumbs: [{label: '台账管理', path: '/ledger/facility'}, {label: '设备台账'}]}
+      },
+      {
+        path: '/ledger/batchPointAssets',
+        name: 'BatchPointAssets',
+        component: batchPointAssets,
+        meta: {keepAlive: false,
+          breadcrumbs: [{label: '台账管理', path: '/ledger/facility'}, {
+            label: '设备台账',
+            path: '/ledger/facility'
+          }, {label: '批量维护设备位置'}]
+        }
       },
       {
         path: "/ledger/list",

+ 2 - 2
vue.config.js

@@ -9,7 +9,7 @@ module.exports = {
   devServer: {
     port: 8081,
     proxy: {
-      '/api': {
+      '/baseService': {
         // 此处的写法,目的是为了 将 /2dapi/jsonz 替换target的值
         // target: 'http://apmstandard/',
         target: 'http://develop.ysbdtp.com',
@@ -17,7 +17,7 @@ module.exports = {
         changeOrigin: true,
         ws: true,
         pathRewrite: {
-          '^/api': ''
+          '^/baseService': ''
         }
       },
     }