Browse Source

adm:feat > 台账相关接口字段调整

shaun-sheep 4 years ago
parent
commit
9844fda1e4

+ 12 - 7
src/api/scan/request.js

@@ -1158,7 +1158,8 @@ export function setInfoPoint(param, success) {
 
 //设置项目数据字典显隐 --列表表头 api/dict
 export function setDataDictionary(param, success) {
-  let url = `${baseUrl}/datacenter/data-dictionary/project/setting-dic-project`;
+  // let url = `${baseUrl}/datacenter/data-dictionary/project/setting-dic-project`;
+  let url = `${baseUrl}/datacenter/dict/setting-dic-project`;
   http.postJson(url, param, success)
 }
 
@@ -1206,7 +1207,8 @@ export function createEquip(param, success) {
 
 //设备清单 - 创建设备-关联资产-关联系统
 export function createEquipAndProperty(param, success) {
-  let url = `${baseUrl}/equip-component/equip-query/creat-equip-pro`;
+  // let url = `${baseUrl}/equip-component/equip-query/creat-equip-pro`;
+  let url = `${baseUrl}/equip-componnet/equip-query/creat-equip-pro`;
   http.postJson(url, param, success)
 }
 
@@ -1285,9 +1287,10 @@ export function queryEquip(param, success) {
 // }
 //查询项目下的设备或部件-根据项目、建筑、楼层、设备或部件分类、业务空间实例筛选设备 然后通过计算匹配资产
 export function equipCategoryProperty(param, success) {
-  let url = `${baseUrl}/equip-component/equip-query/equip-category-property?category=${param.category}${param.spaceIdList ? param.spaceIdList : ''}`;
-  let data = param.data;
-  http.postJson(url, data, success)
+  // let url = `${baseUrl}/equip-component/equip-query/equip-category-property?category=${param.category}${param.spaceIdList ? param.spaceIdList : ''}`;
+  let url = `${baseUrl}/equip-componnet/equip-query/equip-category-property?category=${param.category}${param.spaceIdList ? param.spaceIdList : ''}`;
+  // let data = param.data;
+  http.postJson(url, param, success)
 }
 
 //批量添加设备和资产的关系
@@ -1337,7 +1340,8 @@ export function propertyLinkEq(param, success) {
 
 //查询设备或部件
 export function queryPartsDie(param, success) {
-  let url = `${baseUrl}/equip-component/equip-query/pagequery`;
+  // let url = `${baseUrl}/equip-component/equip-query/pagequery`;
+  let url = `${baseUrl}/equip-componnet/equip-query/pagequery`;
   http.postJson(url, param, success)
 }
 
@@ -1350,7 +1354,8 @@ export function TypePartsDie(success) {
 
 //根据条件查询项目下设备部件数量
 export function countPartsDie(param, success) {
-  let url = `${baseUrl}/equip-component/equip-query/count`;
+  // let url = `${baseUrl}/equip-component/equip-query/count`;
+  let url = `${baseUrl}/equip-componnet/equip-query/count`;
   http.postJson(url, param, success)
 }
 

+ 16 - 16
src/components/business_space/dialogs/changeRea.vue

@@ -174,24 +174,24 @@ export default {
     getCode() {
       getEquipmentFamily(res => {
         this.codeListCode = res.Content
-        this.getFloorList()
-      })
-    },
-    getFloorList() {
-      let param = {
-        secret: this.secret,
-        ProjId: this.projectId
-      }
-      getSpaceFloor(param).then(res => {
-        if (res.data.Result == "success") {
-          this.floorList = res.data.Content
-        } else {
-          this.$message.error("请求错误:" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求错误")
+        // this.getFloorList()
       })
     },
+    // getFloorList() { // 物理世界 已无接口
+    //   let param = {
+    //     secret: this.secret,
+    //     ProjId: this.projectId
+    //   }
+    //   getSpaceFloor(param).then(res => {
+    //     if (res.data.Result == "success") {
+    //       this.floorList = res.data.Content
+    //     } else {
+    //       this.$message.error("请求错误:" + res.data.ResultMsg)
+    //     }
+    //   }).catch(_ => {
+    //     this.$message.error("请求错误")
+    //   })
+    // },
     changeFloor(val) {
       this.mess = {
         buildId: val[0] || "",

+ 23 - 23
src/components/business_space/dialogs/noModelDialog.vue

@@ -64,7 +64,7 @@ export default {
         };
     },
     created() {
-        this.getNodes()
+        // this.getNodes()
     },
     methods: {
         //确定
@@ -126,28 +126,28 @@ export default {
             }
         },
         //点击节点懒加载
-        getNodes() {
-            let param = {
-                ProjId: this.projectId,
-                UserId: this.UserId,
-                secret: this.secret
-            };
-            getSpaceFloor(param).then(res => {
-                if (res.data.Result == 'success') {
-                    let data = this.changeArr(res.data.Content).map(item => {
-                        if (item.children && item.children.length) {
-                            item.children = tools.sortArr(item.children, "shunxu", false)
-                        }
-                        return item
-                    })
-                    this.data = data
-                } else {
-                    this.$message.error(res.data.ResultMsg)
-                }
-            }).catch(() => {
-                this.$message.error("请求出错")
-            })
-        },
+        // getNodes() { // 物理世界 已无接口
+        //     let param = {
+        //         ProjId: this.projectId,
+        //         UserId: this.UserId,
+        //         secret: this.secret
+        //     };
+        //     getSpaceFloor(param).then(res => {
+        //         if (res.data.Result == 'success') {
+        //             let data = this.changeArr(res.data.Content).map(item => {
+        //                 if (item.children && item.children.length) {
+        //                     item.children = tools.sortArr(item.children, "shunxu", false)
+        //                 }
+        //                 return item
+        //             })
+        //             this.data = data
+        //         } else {
+        //             this.$message.error(res.data.ResultMsg)
+        //         }
+        //     }).catch(() => {
+        //         this.$message.error("请求出错")
+        //     })
+        // },
 
         //子节点被点击
         floorClick(data) {

+ 33 - 33
src/components/business_space/lib/floorCascader.vue

@@ -43,43 +43,43 @@ export default {
     };
   },
   created() {
-    this.getData()
+    // this.getData()
   },
   mounted() { },
   methods: {
     //获取数据
-    getData() {
-      getSpaceFloor(this.param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content)
-          data.unshift({
-            value: "all",
-            label: "全部"
-          }, {
-              value: "noKnow",
-              label: "未明确建筑的设备"
-            })
-          data.map(item => {
-            if (!!item.children) {
-              item.children.unshift({
-                value: 'noKnow',
-                label: "未明确楼层的设备"
-              })
-              item.children.unshift({
-                value: "all",
-                label: "全部"
-              })
-            }
-            return item
-          })
-          this.options = data
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
+    // getData() { // 物理世界 已无接口
+    //   getSpaceFloor(this.param).then(res => {
+    //     if (res.data.Result == 'success') {
+    //       let data = this.changeArr(res.data.Content)
+    //       data.unshift({
+    //         value: "all",
+    //         label: "全部"
+    //       }, {
+    //           value: "noKnow",
+    //           label: "未明确建筑的设备"
+    //         })
+    //       data.map(item => {
+    //         if (!!item.children) {
+    //           item.children.unshift({
+    //             value: 'noKnow',
+    //             label: "未明确楼层的设备"
+    //           })
+    //           item.children.unshift({
+    //             value: "all",
+    //             label: "全部"
+    //           })
+    //         }
+    //         return item
+    //       })
+    //       this.options = data
+    //     } else {
+    //       this.$message.error(res.data.ResultMsg)
+    //     }
+    //   }).catch(() => {
+    //     this.$message.error("请求出错")
+    //   })
+    // },
     //将数组转换成optiosn格式
     changeArr(arr) {
       return arr.map(item => {

+ 34 - 34
src/components/business_space/table/addEquip.vue

@@ -153,7 +153,7 @@ export default {
   created() {
     // this.getData();
     this.getEqCode();
-    this.getFloor();
+    // this.getFloor();
   },
   methods: {
     getEqCode() {
@@ -200,38 +200,38 @@ export default {
         });
     },
     //获取楼层
-    getFloor() {
-      let param = {
-        ProjId: this.projectId,
-        UserId: this.userId,
-        secret: this.secret
-      };
-      getSpaceFloor(param)
-        .then(res => {
-          if (res.data.Result == "success") {
-            this.optionsWithDisabled = this.changeArr(res.data.Content);
-            this.optionsWithDisabled = this.optionsWithDisabled.map(item => {
-              if (item.children && item.children.length) {
-                item.children.unshift({
-                  value: "no",
-                  label: "未指定楼层的设备"
-                });
-              } else {
-                item.children = [{
-                  value: "no",
-                  label: "未指定楼层的设备"
-                }];
-              }
-              return item;
-            });
-          } else {
-            this.$message.error(res.data.ResultMsg);
-          }
-        })
-        .catch(() => {
-          this.$message.error("请求出错");
-        });
-    },
+    // getFloor() { // 物理世界 已无接口
+    //   let param = {
+    //     ProjId: this.projectId,
+    //     UserId: this.userId,
+    //     secret: this.secret
+    //   };
+    //   getSpaceFloor(param)
+    //     .then(res => {
+    //       if (res.data.Result == "success") {
+    //         this.optionsWithDisabled = this.changeArr(res.data.Content);
+    //         this.optionsWithDisabled = this.optionsWithDisabled.map(item => {
+    //           if (item.children && item.children.length) {
+    //             item.children.unshift({
+    //               value: "no",
+    //               label: "未指定楼层的设备"
+    //             });
+    //           } else {
+    //             item.children = [{
+    //               value: "no",
+    //               label: "未指定楼层的设备"
+    //             }];
+    //           }
+    //           return item;
+    //         });
+    //       } else {
+    //         this.$message.error(res.data.ResultMsg);
+    //       }
+    //     })
+    //     .catch(() => {
+    //       this.$message.error("请求出错");
+    //     });
+    // },
     getName(code) {
       let text = "",
         myClass = code.substring(0, 2),
@@ -564,4 +564,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 47 - 45
src/components/dialogs/addDialog/dialogAssets.vue

@@ -18,11 +18,11 @@
         <div v-if="isCenter">
           <div>
             <div class="hanson-bar">
-              <span>当前选择的设备族:{{deviceType.facility}}</span>
+              <span>当前选择的设备族:{{ deviceType.facility }}</span>
               <div style="width:350px;float:right;overflow:hidden;">
                 <span>增加</span>
                 <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
-                <span>个{{deviceType.facility}}</span>
+                <span>个{{ deviceType.facility }}</span>
                 <el-button size="small" @click="addMain">增加</el-button>
               </div>
               <div
@@ -99,6 +99,7 @@ import showTools from "@/utils/handsontable/notShow"
 import uuid from "@/utils/uuid";
 import { mapGetters, mapActions } from "vuex";
 import { getTableHeader, createProperty, getSpaceFloor, createAssetsList } from "@/api/scan/request";
+
 let table = function (num) {
   let main = []
   for (let i = 0; i < num; i++) {
@@ -181,19 +182,20 @@ export default {
       ajaxResult: true
     };
   },
-   computed: {
-      ...mapGetters("layout", [
-          "projectId",
-          "secret",
-          "userId"
-      ])
+  computed: {
+    ...mapGetters("layout", [
+      "projectId",
+      "secret",
+      "userId"
+    ])
   },
   created() {
     this.param.ProjId = this.projectId
     this.param.secret = this.secret
-    this.getFloorData()
+    // this.getFloorData()
+  },
+  mounted() {
   },
-  mounted() { },
   methods: {
     //设置默认选中数据
     setValue() {
@@ -202,38 +204,38 @@ export default {
       })
     },
     //获取楼层数据
-    getFloorData() {
-      getSpaceFloor(this.param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content), floorData = []
-          data.map(item => {
-            if (!!item.children) {
-              item.children.unshift({
-                value: '',
-                label: "未明确楼层的设备"
-              })
-            }
-            return item
-          })
-          data.map(item => {
-            if (!!item.children && item.children.length) {
-              item.children.map(child => {
-                floorData.push({
-                  Code: item.value + "-" + child.value,
-                  Name: item.label + "-" + child.label
-                })
-              })
-            }
-          })
-          this.floorData = floorData
-          //   this.options = data
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
+    // getFloorData() {  // 物理世界 已无接口
+    //   getSpaceFloor(this.param).then(res => {
+    //     if (res.data.Result == 'success') {
+    //       let data = this.changeArr(res.data.Content), floorData = []
+    //       data.map(item => {
+    //         if (!!item.children) {
+    //           item.children.unshift({
+    //             value: '',
+    //             label: "未明确楼层的设备"
+    //           })
+    //         }
+    //         return item
+    //       })
+    //       data.map(item => {
+    //         if (!!item.children && item.children.length) {
+    //           item.children.map(child => {
+    //             floorData.push({
+    //               Code: item.value + "-" + child.value,
+    //               Name: item.label + "-" + child.label
+    //             })
+    //           })
+    //         }
+    //       })
+    //       this.floorData = floorData
+    //       //   this.options = data
+    //     } else {
+    //       this.$message.error(res.data.ResultMsg)
+    //     }
+    //   }).catch(() => {
+    //     this.$message.error("请求出错")
+    //   })
+    // },
     //将数组转换成optiosn格式
     changeArr(arr) {
       return arr.map(item => {
@@ -502,7 +504,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: this.onlyRead ? false :{
+        contextMenu: this.onlyRead ? false : {
           items: {
             remove_row: {
               name: "删除该资产"
@@ -800,14 +802,14 @@ export default {
 
     //上传图片弹窗触发事件
     imgChange(keys) {
-       console.log(keys, "keys", this.messKey.split("."), this.row,'22222222222222')
+      console.log(keys, "keys", this.messKey.split("."), this.row, '22222222222222')
       this.setDataToMain(keys[0], this.messKey.split("."), this.row)
       tools.setItem(this.deviceType.code, this.main)
     },
 
     //设备图片弹窗改变事件
     changePics(keys) {
-        console.log(keys, "keys", this.messKey.split("."), this.row,'22222222222222')
+      console.log(keys, "keys", this.messKey.split("."), this.row, '22222222222222')
       this.setDataToMain(keys, this.messKey.split("."), this.row)
       tools.setItem(this.deviceType.code, this.main)
     },

+ 25 - 25
src/components/dialogs/list/systemType.vue

@@ -99,29 +99,29 @@ export default {
   mounted() { },
   methods: {
     //获取查询条件-建筑
-    getData() {
-      let param = {
-        ProjId: this.projectId,
-        secret: this.secret,
-      }
-      getSpaceFloor(param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content)
-          data.unshift({
-            value: "all",
-            label: "全部"
-          }, {
-              value: "noKnow",
-              label: "未明确建筑的设备"
-            })
-          this.options = data
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
+    // getData() { // 物理世界 已无接口
+    //   let param = {
+    //     ProjId: this.projectId,
+    //     secret: this.secret,
+    //   }
+    //   getSpaceFloor(param).then(res => {
+    //     if (res.data.Result == 'success') {
+    //       let data = this.changeArr(res.data.Content)
+    //       data.unshift({
+    //         value: "all",
+    //         label: "全部"
+    //       }, {
+    //           value: "noKnow",
+    //           label: "未明确建筑的设备"
+    //         })
+    //       this.options = data
+    //     } else {
+    //       this.$message.error(res.data.ResultMsg)
+    //     }
+    //   }).catch(err => {
+    //     this.$message.error(err)
+    //   })
+    // },
     //将数组转换成optiosn格式
     changeArr(arr) {
       return arr.map(item => {
@@ -233,7 +233,7 @@ export default {
       deep: true,
       handler () {
         if (this.dialog.systemType) {
-          this.getData()
+          // this.getData()
           if (this.type == 'read') {
             this.getLinkSystemData()
           } else {
@@ -245,7 +245,7 @@ export default {
     projectId() {
       this.buildId = 'all';
       this.options = [];
-      this.getData()
+      // this.getData()
     }
   }
 };

+ 23 - 23
src/components/dialogs/noModelDialog.vue

@@ -55,7 +55,7 @@ export default {
         this.param.ProjId = this.projectId
         this.param.secret = this.secret
         this.param.UserId = this.userId
-        this.getNodes()
+        // this.getNodes()
     },
     computed: {
         ...mapGetters("layout", [
@@ -124,28 +124,28 @@ export default {
             }
         },
         //点击节点懒加载
-        getNodes() {
-            let param = {
-                ProjId: this.param.ProjId,
-                UserId: this.param.UserId,
-                secret: this.param.secret
-            };
-            getSpaceFloor(param).then(res => {
-                if (res.data.Result == 'success') {
-                    let data = this.changeArr(res.data.Content).map(item => {
-                        if (item.children && item.children.length) {
-                            item.children = tools.sortArr(item.children, "shunxu", false)
-                        }
-                        return item
-                    })
-                    this.data = data
-                } else {
-                    this.$message.error(res.data.ResultMsg)
-                }
-            }).catch(() => {
-                this.$message.error("请求出错")
-            })
-        },
+        // getNodes() { // 物理世界 已无接口
+        //     let param = {
+        //         ProjId: this.param.ProjId,
+        //         UserId: this.param.UserId,
+        //         secret: this.param.secret
+        //     };
+        //     getSpaceFloor(param).then(res => {
+        //         if (res.data.Result == 'success') {
+        //             let data = this.changeArr(res.data.Content).map(item => {
+        //                 if (item.children && item.children.length) {
+        //                     item.children = tools.sortArr(item.children, "shunxu", false)
+        //                 }
+        //                 return item
+        //             })
+        //             this.data = data
+        //         } else {
+        //             this.$message.error(res.data.ResultMsg)
+        //         }
+        //     }).catch(() => {
+        //         this.$message.error("请求出错")
+        //     })
+        // },
 
         //子节点被点击
         floorClick(data) {

+ 33 - 33
src/components/ledger/addDialog/dialogAssets.vue

@@ -196,7 +196,7 @@ export default {
   created() {
     this.param.ProjId = this.projectId
     this.param.secret = this.secret
-    this.getFloorData()
+    // this.getFloorData()
   },
   mounted() { },
   methods: {
@@ -207,38 +207,38 @@ export default {
       })
     },
     //获取楼层数据
-    getFloorData() {
-      getSpaceFloor(this.param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content), floorData = []
-          data.map(item => {
-            if (!!item.children) {
-              item.children.unshift({
-                value: '',
-                label: "未明确楼层的设备"
-              })
-            }
-            return item
-          })
-          data.map(item => {
-            if (!!item.children && item.children.length) {
-              item.children.map(child => {
-                floorData.push({
-                  Code: item.value + "-" + child.value,
-                  Name: item.label + "-" + child.label
-                })
-              })
-            }
-          })
-          this.floorData = floorData
-          //   this.options = data
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
+    // getFloorData() { // 物理世界 已无接口
+    //   getSpaceFloor(this.param).then(res => {
+    //     if (res.data.Result == 'success') {
+    //       let data = this.changeArr(res.data.Content), floorData = []
+    //       data.map(item => {
+    //         if (!!item.children) {
+    //           item.children.unshift({
+    //             value: '',
+    //             label: "未明确楼层的设备"
+    //           })
+    //         }
+    //         return item
+    //       })
+    //       data.map(item => {
+    //         if (!!item.children && item.children.length) {
+    //           item.children.map(child => {
+    //             floorData.push({
+    //               Code: item.value + "-" + child.value,
+    //               Name: item.label + "-" + child.label
+    //             })
+    //           })
+    //         }
+    //       })
+    //       this.floorData = floorData
+    //       //   this.options = data
+    //     } else {
+    //       this.$message.error(res.data.ResultMsg)
+    //     }
+    //   }).catch(() => {
+    //     this.$message.error("请求出错")
+    //   })
+    // },
     //将数组转换成optiosn格式
     changeArr(arr) {
       return arr.map(item => {

+ 91 - 73
src/components/ledger/details/detail/cruxDialog.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog title="关键信息点" :visible.sync="dialogFormVisible" class="crux-dialog">
     <section v-for="(val,key,i) in checkList" :key="i">
-      <h4 class="base">{{key}}</h4>
+      <h4 class="base">{{ key == 'undefined' ? '基本信息' : key }}</h4>
       <el-checkbox
         v-for="(option,index) in val"
         :key="option+index"
@@ -17,94 +17,112 @@
 </template>
 
 <script>
-  import {setDataDictionary} from "@/api/scan/request";
+import { setDataDictionary } from "@/api/scan/request";
 
-  export default {
-    name: "cruxDialog",
-    props: ['crux', 'type'],
-    data() {
-      return {
-        dialogFormVisible: false,
-        checkList: {},
-        checkboxGroup: []
-      }
-    },
-    computed: {
-      allChecks() {
-        const tmp = [];
-        for (const key in this.checkList) {
-          if (this.checkList.hasOwnProperty(key)) {
-            const element = this.checkList[key];
-            tmp.push(...element);
-          }
+export default {
+  name: "cruxDialog",
+  props: ['crux', 'type'],
+  data() {
+    return {
+      dialogFormVisible: false,
+      checkList: {},
+      checkboxGroup: []
+    }
+  },
+  computed: {
+    allChecks() {
+      const tmp = [];
+      for (const key in this.checkList) {
+        if (this.checkList.hasOwnProperty(key)) {
+          const element = this.checkList[key];
+          tmp.push(...element);
         }
-        return tmp;
       }
-    },
+      return tmp;
+    }
+  },
 
-    watch: {
-      crux() {
-        this.changeList()
+  watch: {
+    crux() {
+      this.changeList()
+    }
+  },
+  methods: {
+    changeList() {
+      const tmp = {};
+      for (let key in this.crux) {
+        if (this.crux.hasOwnProperty(key)) {
+          const element = this.crux[key];
+          tmp[key] = [
+            ...element.paths.map(i => ({
+              InfoPointCode: i.InfoPointCode,
+              KeyWord: i.KeyWord,
+              type: i.type,
+              code: i.InfoPointCode,
+              classCode: i.classCode,
+              id: i.id,
+              groupCode: i.groupCode,
+              InfoPointName: i.InfoPointName
+            }))
+          ]
+        }
       }
+      this.checkList = tmp;
     },
-    methods: {
-      changeList() {
-        const tmp = {};
-        for (let key in this.crux) {
-          if (this.crux.hasOwnProperty(key)) {
-            const element = this.crux[key];
-            tmp[key] = [
-              ...element.paths.map(i => ({
-                InfoPointCode: i.InfoPointCode,
-                KeyWord: i.KeyWord,
-                Type: this.type,
-                InfoPointName: i.InfoPointName
-              }))
-            ]
-          }
+    dialogOpen() {
+      this.dialogFormVisible = true
+    },
+    save() {
+      console.log(this.allChecks, 'allChecks')
+      let arrLenght = this.allChecks.filter(i => i.KeyWord)
+      if (arrLenght.length > 6) {
+        this.$message.info('不可超过6个')
+        return false
+      } else {
+        let param = {
+          content: []
         }
-        this.checkList = tmp;
-      },
-      dialogOpen() {
-        this.dialogFormVisible = true
-      },
-      save() {
-        let arrLenght = this.allChecks.filter(i => i.KeyWord)
-        if (arrLenght.length > 6) {
-          this.$message.info('不可超过6个')
-          return false
-        } else {
-          let param = this.allChecks.map(i => {
-            if (i.InfoPointName) {
-              delete i.InfoPointName
-            }
-            return {...i}
-          })
+        param.content = this.allChecks.map(i => {
+          if (i.InfoPointName) {
+            delete i.InfoPointName
+          }
+          // return { ...i }
+          return {
+            keyWord: i.KeyWord,
+            // type: this.type,
+            type: i.type,
+            code: i.InfoPointCode,
+            classCode: i.classCode,
+            id: i.id,
+            groupCode: i.groupCode
+          }
+        })
 
-          setDataDictionary(param, res => {
-            this.dialogFormVisible = false
-            this.$emit('cruxSuccess')
-            this.$message('保存成功')
+        setDataDictionary(param, res => {
+          this.dialogFormVisible = false
+          this.$emit('cruxSuccess')
+          this.$message('保存成功')
 
-          });
+        });
 
-        }
+      }
 
 
-      }
     }
   }
+}
 </script>
 
 <style scoped lang="less">
-  .crux-dialog {
-    .el-checkbox{
-      display: inline-block;
-      width: 20%;
-    }
-    /deep/ .el-dialog__body {
-      height: 420px;
-      overflow: auto;
-    }
+.crux-dialog {
+  .el-checkbox {
+    display: inline-block;
+    width: 20%;
+  }
+
+  /deep/ .el-dialog__body {
+    height: 420px;
+    overflow: auto;
   }
+}
 </style>

+ 1 - 2
src/components/ledger/details/detail/exhibitionBaseInformation.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="exhibition-baseInformation">
     <section v-for="(val,key,i) in exhibitionBaseInformation.information">
-      <h4 class="base">{{ key || '信息' }}</h4>
+      <h4 class="base">{{ key == 'undefined' ? '基本信息' : key }}</h4>
       <div class="infoPoint-item" v-for="(value,keys,index) in val.paths">
         <span> {{ value.InfoPointName }}:</span>
         <el-popover
@@ -96,7 +96,6 @@ export default {
     return {}
   },
   created() {
-    console.log(this.exhibitionBaseInformation, 'exhibitionBaseInformation')
   },
   methods: {
     downloadFile(key) {

+ 2 - 2
src/components/ledger/details/detail/exhibitionCrux.vue

@@ -6,10 +6,10 @@
       <span class="icon-shezhi iconfont setting" @click="setting"></span></p>
     <div>
       <div v-if="exhibitionCrux.cruxArray.length">
-        <div class="crux-list" v-for="(item,index) in exhibitionCrux.cruxArray" :key="index">{{item.InfoPointName}}:
+        <div class="crux-list" v-for="(item,index) in exhibitionCrux.cruxArray" :key="index">{{item.name}}:
 
         <el-popover
-          v-if="item.Path == 'EquipQRCode' || item.Path == 'RoomQRCode' || item.Path == 'ShaftQRCode'"
+          v-if="item.Path == 'equipQRCode' || item.Path == 'roomQRCode' || item.Path == 'shaftQRCode'"
           placement="top"
           width="360"
           trigger="hover">

+ 6 - 7
src/components/ledger/handsontables/assets.vue

@@ -532,21 +532,20 @@ export default {
     //格式化条件
     formatFilter() {
       let param = {
-        Filters: `category='${this.numParams.category}';PropertyId isNull`
+        filters: `classCode='${this.numParams.category}';propertyId isNull`
       }
 
       if (this.numParams.buildId == "noKnow") {
-        param.Filters += `;buildingId isNull`
+        param.filters += `;buildingId isNull`
       } else if (this.numParams.buildId && this.numParams.buildId != "all") {
-        param.Filters += `;buildingId='${this.numParams.buildId}'`
+        param.filters += `;buildingId='${this.numParams.buildId}'`
       }
 
       if (this.numParams.floorId == "noKnow") {
-        param.Filters += `;floorId isNull`
+        param.filters += `;floorId isNull`
       } else if (this.numParams.floorId && this.numParams.floorId != "all") {
-        param.Filters += `;floorId='${this.numParams.floorId}'`
+        param.filters += `;floorId='${this.numParams.floorId}'`
       }
-
       return param
     },
     //批量添加
@@ -562,7 +561,7 @@ export default {
     getNumDie() {
       let param = this.formatFilter()
       countPartsDie(param, res => {
-        this.dieNum = res.Count
+        this.dieNum = res.count
       })
     },
     //查看详情

+ 1 - 1
src/components/ledger/handsontables/device.vue

@@ -1331,7 +1331,7 @@ export default {
         //关联系统()
         case "LinkSystem":
           this.curDevice = infos.EquipID;
-          this.systemList = this.tableData[row.row].LinkSystem || [];
+          this.systemList = this.tableData[row.row].linkSystem || [];
           this.myDialog.systemType = true;
           return false;
         //关联资产()

+ 0 - 4
src/components/ledger/lib/assets.vue

@@ -52,7 +52,6 @@ export default {
     };
   },
   created() {
-    debugger
     this.getData();
   },
   watch: {
@@ -76,7 +75,6 @@ export default {
       this.$emit("change", value)
     },
     getData() {
-      debugger
       let _this = this
       let param1 = {
         data: {
@@ -104,7 +102,6 @@ export default {
         })
       })
       Promise.all([promise1, promise2]).then((res) => {
-        debugger
         let allData = res[0], data = res[1]
         _this.options = _this.changeArr(allData.content)
         if (_this.value) {
@@ -138,7 +135,6 @@ export default {
       console.log(this.options,'=========================')
     },
     changeArr(arr) {
-      debugger
       let data = [];
       arr.map(item => {
         data.push({ code: item.family, facility: item.familyName, disabled: false })

+ 7 - 7
src/components/ledger/lib/partsDieList.vue

@@ -79,15 +79,15 @@ export default {
     //获取当前项目下的设备类型(只拿到编码-需要过滤)
     getData() {
       let param = {
-        Distinct: true,
-        PageNumber: 1,
-        PageSize: 500,
-        Projection: [
-          "Category"
+        distinct: true,
+        pageNumber: 1,
+        pageSize: 500,
+        projection: [
+          "classCode"
         ]
       }
       queryPartsDie(param, res => {
-        this.content = res.Content
+        this.content = res.content
         this.filterForOptions()
         let val = this.options.length ? this.options[0].code : ""
         this.changeVal(val)
@@ -126,7 +126,7 @@ export default {
     //过滤
     filterForOptions() {
       this.options = this.options.filter(item => {
-        if (this.content.find(value => value.Category == item.code)) {
+        if (this.content.find(value => value.classCode == item.code)) {
           return item
         }
       })

+ 1 - 1
src/utils/handsontable/notShow.js

@@ -1120,7 +1120,7 @@ const showTools = {
       item.inputMode == "L2" ||
       item.inputMode == "L" ||
       item.inputMode == "M") { //文本输入
-      console.log(item)
+      // console.log(item)
       return {
         data: item.path,
         readOnly: onlyRead

+ 2 - 2
src/views/data_admin/buildData/index-2.vue

@@ -487,8 +487,8 @@ export default {
       getEquipBelongs(pa, res => {
         this.AllFamily = res.content.map(t => {
           return {
-            Code: t.Family,
-            Name: t.FamilyName
+            Code: t.family,
+            Name: t.familyName
           }
         })
       })

+ 33 - 33
src/views/data_admin/buildGraphy/lib/floorCascader.vue

@@ -41,7 +41,7 @@ export default {
   created() {
     this.param.ProjId = this.projectId
     this.param.secret = this.secret
-    this.getData()
+    // this.getData()
   },
   computed: {
     ...mapGetters("layout", [
@@ -53,38 +53,38 @@ export default {
   mounted() { },
   methods: {
     //获取数据
-    getData() {
-      getSpaceFloor(this.param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content)
-          data.unshift({
-            value: "all",
-            label: "全部"
-          }, {
-              value: "noKnow",
-              label: "未明确建筑的设备"
-            })
-          data.map(item => {
-            if (!!item.children) {
-              item.children.unshift({
-                value: 'noKnow',
-                label: "未明确楼层的设备"
-              })
-              item.children.unshift({
-                value: "all",
-                label: "全部"
-              })
-            }
-            return item
-          })
-          this.options = data
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
+    // getData() {  // 物理世界 已无接口
+    //   getSpaceFloor(this.param).then(res => {
+    //     if (res.data.Result == 'success') {
+    //       let data = this.changeArr(res.data.Content)
+    //       data.unshift({
+    //         value: "all",
+    //         label: "全部"
+    //       }, {
+    //           value: "noKnow",
+    //           label: "未明确建筑的设备"
+    //         })
+    //       data.map(item => {
+    //         if (!!item.children) {
+    //           item.children.unshift({
+    //             value: 'noKnow',
+    //             label: "未明确楼层的设备"
+    //           })
+    //           item.children.unshift({
+    //             value: "all",
+    //             label: "全部"
+    //           })
+    //         }
+    //         return item
+    //       })
+    //       this.options = data
+    //     } else {
+    //       this.$message.error(res.data.ResultMsg)
+    //     }
+    //   }).catch(() => {
+    //     this.$message.error("请求出错")
+    //   })
+    // },
     //将数组转换成optiosn格式
     changeArr(arr) {
       return arr.map(item => {

+ 28 - 17
src/views/ledger/facility/addfacility.vue

@@ -108,8 +108,8 @@ export default {
       tableData: session.get("deviceAddData")
         ? session.get("deviceAddData").length
           ? session.get("deviceAddData")
-          : [{ Checked: 1 }]
-        : [{ Checked: 1 }],
+          : [{ checked: 1 }]
+        : [{ checked: 1 }],
       copyTableData: [],
       category: "", //当前设备类
       myDialog: {
@@ -164,7 +164,9 @@ export default {
         }
       }
       getEquipBelongs(params, res => {
-        this.firmId = res.content[0].family;
+        if (res.content.length) {
+          this.firmId = res.content[0].family
+        }
       })
     },
     //维护建筑
@@ -225,7 +227,6 @@ export default {
     },
     // 创建设备数据
     async handleCreateTableData() {
-      debugger
       let newData = this.tableData.filter(item => {
         let keys = Object.keys(item);
         keys.map(key => {
@@ -235,7 +236,7 @@ export default {
           }
         });
         let newK = Object.keys(item)
-        if ((item.Checked && newK.length > 1) || (!item.Checked && newK.length)) {
+        if ((item.checked && newK.length > 1) || (!item.checked && newK.length)) {
           return item;
         }
       });
@@ -245,7 +246,7 @@ export default {
       }
       let flag = false;
       newData.map(item => {
-        if (item.Checked && !item.localName) {
+        if (item.checked && !item.localName) {
           flag = true;
         }
         // 处理建筑-楼层
@@ -260,11 +261,12 @@ export default {
         if (item.LinkSystem && item.LinkSystem.length) {
           item.SystemList = []
           item.LinkSystem.map(t => {
-            item.SystemList.push(t.SysID)
+            // todo 测试 t.SysID === ? id
+            item.SystemList.push(t.id)
           })
         }
-        item.PropertyId = !!item.Checked;
-        item.Category = this.category.deviceId;
+        item.propertyId = !!item.checked;
+        item.classCode = this.category.deviceId;
       })
       if (flag) {
         this.$message.info("存在设备的本地名称为空,请检查")
@@ -302,8 +304,8 @@ export default {
       // }
       //待接口修改为关联创建即可修改
       let param = {
-        Cascade: [],
-        Content: newData
+        cascade: [],
+        content: newData
       }
       createEquipAndProperty(param, res => {
         this.$message.success('创建成功')
@@ -323,7 +325,7 @@ export default {
     handleAddTableRow() {
       let addRowLength = this.addNum;
       for (let i = 0; i < addRowLength; i++) {
-        this.tableData.push({ Checked: 1 });
+        this.tableData.push({ checked: 1 });
       }
       this.initTable();
       this.formaTableData();
@@ -527,7 +529,7 @@ export default {
       return dataArr || [];
     },
     getInfors(infos, row) {
-      console.log(infos, row)
+      console.log(infos, row, 'getInfos')
       let val = this.tableExample.colToProp(row.col);
       switch (val) {
         //操作
@@ -536,9 +538,18 @@ export default {
           this.$message("开发中...")
           break;
         //设备二维码图片
-        case 'EquipQRCode':
-          this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
-          if (!!this.qrcodeUrl) {
+        // case 'EquipQRCode':
+        //   this.qrcodeUrl = this.tableData[row.row].equipQRCode;
+        //
+        //   if (!!this.qrcodeUrl) {
+        //     this.myDialog.qrcode = true;
+        //   } else {
+        //     this.$message("此设备没有设备二维码");
+        //   }
+        //   break;
+        case "defaultQRCode":
+          this.qrcodeUrl = this.tableData[row.row][val];
+          if (this.qrcodeUrl) {
             this.myDialog.qrcode = true;
           } else {
             this.$message("此设备没有设备二维码");
@@ -547,7 +558,7 @@ export default {
         //关联系统
         case 'LinkSystem':
           if (!this.onlyRead) {
-            this.systemList = this.tableData[row.row].LinkSystem || [];
+            this.systemList = this.tableData[row.row].linkSystem || [];
             this.myDialog.systemType = true;
           }
           break;

+ 57 - 37
src/views/ledger/facility/batchlink.vue

@@ -3,25 +3,31 @@
     <div class="condition">
       <div class="header">
         <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
-        <span class="statistics-title">发现未关联资产的设备:<b>{{unlinkNumber}}</b></span>
-        <span class="statistics-title">可在此功能中批量关联的:<b>{{linkNumber}}</b></span>
+        <span class="statistics-title">发现未关联资产的设备:<b>{{ unlinkNumber }}</b></span>
+        <span class="statistics-title">可在此功能中批量关联的:<b>{{ linkNumber }}</b></span>
         <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">保存选定的设备资产关联关系</el-button>
-        <el-button v-show="Object.keys(radio).length" style="float:right;margin-top:1px;margin-right:15px;" @click="handleClickReset">重置</el-button>
+        <el-button v-show="Object.keys(radio).length" style="float:right;margin-top:1px;margin-right:15px;"
+                   @click="handleClickReset">重置
+        </el-button>
         <span style="float:right;margin-top:5px;font-size:12px;margin-right:10px;color:#999;">不能批量处理的请在设备台账列表中操作</span>
       </div>
       <div class="main">
-        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" :span-method="objectSpanMethod" :header-cell-style="headerStyle">
+        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%"
+                  :span-method="objectSpanMethod" :header-cell-style="headerStyle">
           <el-table-column prop="EquipLocalName" label="设备本地名称" show-overflow-tooltip width="150">
             <!-- <template slot-scope="scope">{{ scope.row.EquipLocalName?scope.row.EquipLocalName:scope.row.EquipName }}</template> -->
           </el-table-column>
           <el-table-column prop="EquipLocalID" label="设备本地编码" show-overflow-tooltip max-width="150">
             <!-- <template slot-scope="scope">{{ scope.row.EquipLocalID?scope.row.EquipLocalID:scope.row.EquipID }}</template> -->
           </el-table-column>
-          <el-table-column prop="EquipCategory.EquipName" label="设备类" show-overflow-tooltip width="100"></el-table-column>
+          <el-table-column prop="EquipCategory.EquipName" label="设备类" show-overflow-tooltip
+                           width="100"></el-table-column>
           <el-table-column prop="CADID" label="设计图纸中编码" show-overflow-tooltip max-width="150"></el-table-column>
           <el-table-column label="所属建筑楼层">
             <template slot-scope="scope">
-              {{ scope.row.Building?scope.row.Building.BuildLocalName:'' }}-{{ scope.row.Floor?scope.row.Floor.FloorLocalName:'' }}
+              {{
+                scope.row.Building ? scope.row.Building.BuildLocalName : ''
+              }}-{{ scope.row.Floor ? scope.row.Floor.FloorLocalName : '' }}
             </template>
           </el-table-column>
           <el-table-column prop="PropertyItem.EquipLocalName" label="资产本地名称" show-overflow-tooltip width="150">
@@ -30,16 +36,22 @@
           <el-table-column prop="PropertyItem.EquipLocalID" label="资产本地编码" show-overflow-tooltip max-width="150">
             <!-- <template slot-scope="scope">{{ scope.row.AssetsLocalId }}</template> -->
           </el-table-column>
-          <el-table-column prop="PropertyItem.FamilyName.Name" label="设备族" show-overflow-tooltip width="100"></el-table-column>
-          <el-table-column prop="PropertyItem.CADID" label="设计图纸中编码" show-overflow-tooltip max-width="150"></el-table-column>
+          <el-table-column prop="PropertyItem.FamilyName.Name" label="设备族" show-overflow-tooltip
+                           width="100"></el-table-column>
+          <el-table-column prop="PropertyItem.CADID" label="设计图纸中编码" show-overflow-tooltip
+                           max-width="150"></el-table-column>
           <el-table-column label="所属建筑楼层" show-overflow-tooltip width="200">
             <template slot-scope="scope">
-              {{ scope.row.PropertyItem.Building?scope.row.PropertyItem.Building.BuildLocalName:'' }}-{{ scope.row.PropertyItem.Floor?scope.row.PropertyItem.Floor.FloorLocalName:'' }}
+              {{
+                scope.row.PropertyItem.Building ? scope.row.PropertyItem.Building.BuildLocalName : ''
+              }}-{{ scope.row.PropertyItem.Floor ? scope.row.PropertyItem.Floor.FloorLocalName : '' }}
             </template>
           </el-table-column>
           <el-table-column prop="address" label="操作" width="100">
             <template slot-scope="scope">
-              <el-radio v-model="radio[scope.row.EquipID]" :label="scope.row.PropertyItem.EquipID" :disabled="scope.row.disabled" @change="handleChangeLink(scope.row)">&nbsp;</el-radio>
+              <el-radio v-model="radio[scope.row.EquipID]" :label="scope.row.PropertyItem.EquipID"
+                        :disabled="scope.row.disabled" @change="handleChangeLink(scope.row)">&nbsp;
+              </el-radio>
             </template>
           </el-table-column>
         </el-table>
@@ -67,9 +79,7 @@ import { mapGetters } from "vuex"
 import { countEquip, equipCategoryProperty, equipRproperty } from "@/api/scan/request";
 
 export default {
-  components: {
-    
-  },
+  components: {},
   computed: {
     ...mapGetters("layout", ["projectId", "userId", "secret"])
   },
@@ -104,23 +114,30 @@ export default {
     //获取表格数据
     getTableData(pageNum) {
       this.loading = true
-      let param = this.formatFilter(pageNum)
+      let fl = this.formatFilter(pageNum)
+      let param = {
+        category: fl.category || undefined,
+        spaceIdList: fl.spaceIdList || undefined,
+        orders: "createTime desc",
+        pageNumber: 1,
+        pageSize: 1000
+      }
       equipCategoryProperty(param, res => {
-        this.unlinkNumber = res.Total
-        this.linkNumber += res.Content.length
+        this.unlinkNumber = res.total
+        this.linkNumber += res.content.length
         // this.page.total = res.Total
-        this.contentData = this.contentData.concat(res.Content)
-        if (res.Total / (res.PageSize * res.PageNumber) > 1) {
-          this.getTableData(res.PageNumber + 1)
+        this.contentData = this.contentData.concat(res.content)
+        if (res.total / (res.pageSize * res.pageNumber) > 1) {
+          this.getTableData(res.pageNumber + 1)
         } else {
-          this.contentData.forEach(item =>{
-            if(item.PropertyList && item.PropertyList.length){
-              item.PropertyList.forEach((Assets, index) => {
-                let obj = JSON.parse(JSON.stringify(Object.assign(item, {PropertyItem: Assets, disabled: false})))
-                delete obj.PropertyList
+          this.contentData.forEach(item => {
+            if (item.propertyList && item.propertyList.length) {
+              item.propertyList.forEach((Assets, index) => {
+                let obj = JSON.parse(JSON.stringify(Object.assign(item, { PropertyItem: Assets, disabled: false })))
+                delete obj.propertyList
                 this.tableData.push(obj)
-                if(index == 0){
-                  this.mergeCol.push(item.PropertyList.length)
+                if (index == 0) {
+                  this.mergeCol.push(item.propertyList.length)
                 } else {
                   this.mergeCol.push(false)
                 }
@@ -135,7 +152,7 @@ export default {
     formatFilter(pageNum) {
       pageNum = pageNum ? pageNum : 1
       let param = {
-          data: {
+        data: {
           //   Cascade: [
           //   {
           //     Name: "equipCategory",
@@ -167,8 +184,8 @@ export default {
           param.data.Filters += `;floorId='${this.params.buildFloor[1]}'`
         }
       }
-      if(this.params.hasOwnProperty('spaceList')){
-        if(typeof this.params.spaceList == 'string'){
+      if (this.params.hasOwnProperty('spaceList')) {
+        if (typeof this.params.spaceList == 'string') {
           param.spaceIdList = `&spacrType=${this.params.spaceList}`
         } else {
           let spaceIdList = ''
@@ -199,9 +216,9 @@ export default {
     handleChangeLink(row) {
       this.tableData.forEach(item => {
         item.disabled = false
-        if(Object.keys(this.radio).length){
-          for(let key in this.radio){
-            if(item.EquipID != key && item.PropertyItem.EquipID == this.radio[key]){
+        if (Object.keys(this.radio).length) {
+          for (let key in this.radio) {
+            if (item.EquipID != key && item.PropertyItem.EquipID == this.radio[key]) {
               item.disabled = true
             }
           }
@@ -220,8 +237,8 @@ export default {
       let params = {
         Content: []
       }
-      if(Object.keys(this.radio).length){
-        for(let key in this.radio){
+      if (Object.keys(this.radio).length) {
+        for (let key in this.radio) {
           params.Content.push({
             EquipId: this.radio[key],
             EquipmentId: key
@@ -271,15 +288,18 @@ export default {
     flex-direction: column;
     border: 1px solid #dfe6ec;
     background: #fff;
-    .header{
+
+    .header {
       padding-bottom: 10px;
       border-bottom: 1px solid #bcbcbc;
-      .statistics-title{
+
+      .statistics-title {
         margin-left: 20px;
         line-height: 32px;
       }
     }
-    .main{
+
+    .main {
       margin-top: 10px;
       height: calc(100% - 46px);
     }

+ 93 - 87
src/views/ledger/facility/details/index.vue

@@ -103,7 +103,6 @@ export default {
     this.type = this.$route.query.type;
     this.list = this.$route.query.data;
     this.getData();
-    console.log(this.$route.query)
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"])
@@ -266,8 +265,8 @@ export default {
       let isList = this.pointData
       let isArr = []
       isList.map(j => {
-        if (this.instance.hasOwnProperty(j.Path)) {
-          j.value = this.instance[j.Path]
+        if (this.instance.hasOwnProperty(j.path)) {
+          j.value = this.instance[j.path]
           return j
         }
       })
@@ -278,19 +277,18 @@ export default {
     handleRadios(val) { //判断radio的值显示关键信息,基本信息,图片,文件
       let arr = []
       //关键信息点
-      console.log(this.pointData, 'pointttt')
-      this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.KeyWord)
+      this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.keyWord)
       this.exhibitionCrux.cruxArray.map(i => {
-        if (this.instance.hasOwnProperty(i.Path)) {
+        if (this.instance.hasOwnProperty(i.path)) {
           return {
             ...i,
-            value: this.instance[i.Path]
+            value: this.instance[i.path]
           }
         }
       })
 
       if (val == 1) { //需采集信息
-        arr = this.pointData.filter(i => i.Visible)
+        arr = this.pointData.filter(i => i.visible)
         // //  图片和的处理
         // this.handlePicList(arr)
         // //  文件处理
@@ -299,10 +297,10 @@ export default {
       } else if (val == 2) { //有值信息点
         let list = this.pointData
         list.map(j => {
-          if (this.instance.hasOwnProperty(j.Path)) {
+          if (this.instance.hasOwnProperty(j.path)) {
             return {
               ...j,
-              value: this.instance[j.Path]
+              value: this.instance[j.path]
             }
 
 
@@ -323,22 +321,22 @@ export default {
       let picObject = {}
       //处理数据格式
       arr.map(i => {
-        if (i.InputMode == 'F2') {
-          switch (i.Path) {
-            case 'LedgerParam.PhotoDoc.Drawing':
-            case 'LedgerParam.Siteinstall.InstallPic':
-            case 'LedgerParam.Siteinstall.InstallDrawing':
-            case 'LedgerParam.PhotoDoc.Nameplate':
-            case 'LedgerParam.PhotoDoc.Pic':
-            case 'Pic' :
-              if (this.instance.hasOwnProperty(i.Path)) {
-                i.PicList = this.instance[i.Path]
+        if (i.inputMode == 'F2') {
+          switch (i.path) {
+            case 'infos.drawing':
+            case 'infos.installPic':
+            case 'infos.installDrawing':
+            case 'infos.nameplate':
+            case 'infos.pic':
+            case 'pic' :
+              if (this.instance.hasOwnProperty(i.path)) {
+                i.PicList = this.instance[i.path]
               }
-              if (picObject[i.InfoPointName]) {
+              if (picObject[i.name]) {
               } else {
-                picObject[i.InfoPointName] = []
+                picObject[i.name] = []
               }
-              picObject[i.InfoPointName].push({
+              picObject[i.name].push({
                 ...i,
               })
               break;
@@ -372,20 +370,20 @@ export default {
       let picObject = {}
       //处理数据格式
       arr.map(i => {
-        if (i.InputMode == 'F2') {
-          switch (i.Path) {
-            case 'LedgerParam.InsuranceDoc.InsuranceFile':
-            case 'LedgerParam.PhotoDoc.Archive':
-            case 'LedgerParam.Siteinstall.CheckReport':
-              if (this.instance.hasOwnProperty(i.Path)) {
-                i.fileList = this.instance[i.Path]
+        if (i.inputMode == 'F2') {
+          switch (i.path) {
+            case 'infos.insuranceFile':
+            case 'infos.archive':
+            case 'infos.checkReport':
+              if (this.instance.hasOwnProperty(i.path)) {
+                i.fileList = this.instance[i.path]
               }
-              if (picObject[i.InfoPointName]) {
+              if (picObject[i.name]) {
 
               } else {
-                picObject[i.InfoPointName] = []
+                picObject[i.name] = []
               }
-              picObject[i.InfoPointName].push({
+              picObject[i.name].push({
                 ...i,
               })
               break
@@ -425,104 +423,112 @@ export default {
       }
     },
     displayData(arr) {//对数据进行处理传给组件展示
-      console.log(arr, 'arr')
       const result = {}
       const resultEnergy = {};
       arr.map(i => {
-        if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
-          i.value = this.instance[i.Path]
+        if (this.instance.hasOwnProperty(i.path) && this.currentRadio != 2) {
+          i.value = this.instance[i.path]
         }
-        if (i.InputMode == 'C5') {
-          if (this.instance.hasOwnProperty(i.Path)) {
-            let time = this.instance[i.Path]
+        if (i.inputMode == 'C5') {
+          if (this.instance.hasOwnProperty(i.path)) {
+            let time = this.instance[i.path]
             i.value = this.formatDate(time)
           }
         }
-        if (i.DataSource && i.DataSource.length) {
-          let source = JSON.parse(i.DataSource)
+        if (i.dataSource && i.dataSource.length) {
+          // let source = JSON.parse(i.dataSource)
+          let source = i.dataSource
           //判断输入类型
-          if (i.InputMode == 'D1L') {
-            let d1l = tools.formatDataSource(i.DataSource)
+          if (i.inputMode == 'D1L') {
+            let d1l = tools.formatDataSource(i.dataSource)
             d1l.forEach(k => {
-              if (k.Code == this.instance[i.Path]) {
-                i.value = k.Name
+              if (k.code == this.instance[i.path]) {
+                i.value = k.name
               }
             })
-          } else if (i.InputMode == 'D2' || i.InputMode == 'C6') {
-            if (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(',')
+          } else if (i.inputMode == 'D2' || i.inputMode == 'C6') {
+            if (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(',')
               }
             }
           }
           source.forEach(j => {
-            if (j.Code == this.instance[i.Path]) {
-              i.value = j.Name
+            if (j.code == this.instance[i.path]) {
+              i.value = j.name
             }
           })
         }
         // 动态信息点处理
-        switch (i.InputMode) {
+        switch (i.inputMode) {
           case "L":
           case "L1":
           case "L2":
           case "M":
-            if (resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
-              resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`].paths.push({
-                Path: i.Path,
-                InfoPointName: i.InfoPointName,
-                InfoPointCode: i.InfoPointCode,
+            if (resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
+              resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
+                Path: i.path,
+                InfoPointName: i.name,
+                InfoPointCode: i.code,
                 value: i.svalue,
-                Visible: i.Visible,
-                KeyWord: i.KeyWord,
-                InputMode: i.InputMode,
+                Visible: i.visible,
+                KeyWord: i.keyWord,
+                InputMode: i.inputMode,
                 data: i.data,
                 receivetime: i.receivetime,
                 error: i.error,
-                Unit: i.Unit,
-                FirstName: i.FirstName,
+                Unit: i.unit,
+                FirstName: i.firstName,
               })
             } else {
-              resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
+              resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
                 paths: [{
-                  Path: i.Path,
-                  InfoPointName: i.InfoPointName,
-                  InfoPointCode: i.InfoPointCode,
+                  Path: i.path,
+                  InfoPointName: i.name,
+                  InfoPointCode: i.code,
                   value: i.svalue,
-                  Visible: i.Visible,
-                  KeyWord: i.KeyWord,
-                  InputMode: i.InputMode,
+                  Visible: i.visible,
+                  KeyWord: i.keyWord,
+                  InputMode: i.inputMode,
                   data: i.data,
                   receivetime: i.receivetime,
                   error: i.error,
-                  Unit: i.Unit,
-                  FirstName: i.FirstName,
+                  Unit: i.unit,
+                  FirstName: i.firstName,
                 }]
               }
             }
             break;
           default:
-            if (result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
-              result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`].paths.push({
-                Path: i.Path,
-                InfoPointName: i.InfoPointName,
-                InfoPointCode: i.InfoPointCode,
+            if (result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
+              result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
+                Path: i.path,
+                InfoPointName: i.name,
+                InfoPointCode: i.code,
                 Value: i.value,
-                Visible: i.Visible,
-                KeyWord: i.KeyWord,
-                InputMode: i.InputMode
+                Visible: i.visible,
+                KeyWord: i.keyWord,
+                InputMode: i.inputMode,
+                classCode: i.classCode,
+                id: i.id,
+                groupCode: i.groupCode,
+                type: i.type
               })
             } else {
-              result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
+              result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
                 paths: [{
-                  Path: i.Path,
-                  InfoPointName: i.InfoPointName,
-                  InfoPointCode: i.InfoPointCode,
+                  Path: i.path,
+                  InfoPointName: i.name,
+                  InfoPointCode: i.code,
                   Value: i.value,
-                  Visible: i.Visible,
-                  KeyWord: i.KeyWord,
-                  InputMode: i.InputMode
+                  Visible: i.visible,
+                  KeyWord: i.keyWord,
+                  InputMode: i.inputMode,
+                  classCode: i.classCode,
+                  id: i.id,
+                  groupCode: i.groupCode,
+                  type: i.type
                 }]
               }
             }

+ 3 - 1
src/views/ledger/facility/partsmanage/addparts/index.vue

@@ -158,7 +158,9 @@ export default {
         }
       }
       getEquipBelongs(params, res => {
-        this.firmId = res.content[0].family;
+        if (res.content.length) {
+          this.firmId = res.content[0].family;
+        }
       })
     },
     // 获取表头数据(初始化表格)

+ 45 - 31
src/views/ledger/property/addpropertys.vue

@@ -9,20 +9,29 @@
         <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">创建已选</el-button>
       </div>
       <div class="main">
-        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" @selection-change="handleSelectionChange">
+        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%"
+                  @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column label="设备名称" width="200">
-            <template slot-scope="scope">{{ scope.row.EquipLocalName?scope.row.EquipLocalName:scope.row.EquipName }}</template>
+            <template slot-scope="scope">{{
+                scope.row.localName ? scope.row.localName : scope.row.name
+              }}
+            </template>
           </el-table-column>
           <el-table-column label="设备本地编码" show-overflow-tooltip>
-            <template slot-scope="scope">{{ scope.row.EquipLocalID?scope.row.EquipLocalID:scope.row.EquipID }}</template>
+            <template slot-scope="scope">{{
+                scope.row.localId ? scope.row.localId : scope.row.id
+              }}
+            </template>
           </el-table-column>
-          <el-table-column prop="EquipCategory.EquipName" label="设备类型" show-overflow-tooltip width="200"></el-table-column>
-          <el-table-column prop="Building.BuildLocalName" label="所属建筑"></el-table-column>
-          <el-table-column prop="Floor.FloorLocalName" label="所属楼层"></el-table-column>
+          <el-table-column prop="equipCategory.equipName" label="设备类型" show-overflow-tooltip
+                           width="200"></el-table-column>
+          <el-table-column prop="building.localName" label="所属建筑"></el-table-column>
+          <el-table-column prop="floor.localName" label="所属楼层"></el-table-column>
           <el-table-column prop="address" label="操作" width="100">
             <template slot-scope="scope">
-              <el-button @click.native.prevent="handleOpenDetail(scope.row, tableData)" type="text" size="small">详情</el-button>
+              <el-button @click.native.prevent="handleOpenDetail(scope.row, tableData)" type="text" size="small">详情
+              </el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -51,6 +60,7 @@ import floorCascader from "@/components/ledger/lib/floorCascader"
 import dieCascader from "@/components/ledger/lib/partsDieList"
 //api
 import { queryPartsDie, createPropertys } from "@/api/scan/request";
+
 export default {
   data() {
     return {
@@ -63,7 +73,7 @@ export default {
         total: 0
       },
       tableData: [],
-      multipleSelection:[]
+      multipleSelection: []
     }
   },
   computed: {
@@ -81,7 +91,7 @@ export default {
       this.$refs.dieCascader.setValue(this.params.category)
     }
     if (this.params.buildId && this.params.floorId) {
-      this.$refs.floorCascader.setValue([this.params.buildId,this.params.floorId])
+      this.$refs.floorCascader.setValue([this.params.buildId, this.params.floorId])
     } else if (this.params.buildId && !this.params.floorId) {
       this.$refs.floorCascader.setValue([this.params.buildId])
     } else {
@@ -89,7 +99,8 @@ export default {
     }
   },
   watch: {
-    projectId() {}
+    projectId() {
+    }
   },
   methods: {
     //返回
@@ -101,7 +112,7 @@ export default {
     },
     //选择设备或部件
     changeDevice(val) {
-      if(val.code) {
+      if (val.code) {
         this.params.category = val.code
       } else {
         this.params.category = ''
@@ -127,44 +138,44 @@ export default {
       this.loading = true
       let param = this.formatFilter()
       queryPartsDie(param, res => {
-        this.tableData = res.Content
-        this.page.total = res.Total
+        this.tableData = res.content
+        this.page.total = res.total
         this.loading = false
       })
     },
     //格式化条件
     formatFilter() {
       let param = {
-        Cascade: [
+        cascade: [
           {
-            Name: "equipCategory",
-            Projection: ["EquipCode", "EquipName"]
+            name: "equipCategory",
+            projection: ["equipCode", "equipName"]
           },
           {
-            Name: "building",
-            Projection: [ "BuildLocalName", "BuildName", "BuildID" ]
+            name: "building",
+            projection: ["localName", "name", "id"]
           },
           {
-            Name: "floor",
-            Projection: [ "FloorLocalName", "FloorName", "FloorID" ]
+            name: "floor",
+            projection: ["localName", "name", "id"]
           }
         ],
-        Filters: `category='${this.params.category}';PropertyId isNull`,
-        Orders: "createTime desc, EquipID asc",
-        PageNumber: this.page.pageNumber,
-        PageSize: this.page.pageSize
+        filters: `classCode='${this.params.category}';propertyId isNull`,
+        orders: "createTime desc, id asc",
+        pageNumber: this.page.pageNumber,
+        pageSize: this.page.pageSize
       }
 
       if (this.params.buildId == "noKnow") {
-        param.Filters += `;buildingId isNull`
+        param.filters += `;buildingId isNull`
       } else if (this.params.buildId && this.params.buildId != "all") {
-        param.Filters += `;buildingId='${this.params.buildId}'`
+        param.filters += `;buildingId='${this.params.buildId}'`
       }
 
       if (this.params.floorId == "noKnow") {
-        param.Filters += `;floorId isNull`
+        param.filters += `;floorId isNull`
       } else if (this.params.floorId && this.params.floorId != "all") {
-        param.Filters += `;floorId='${this.params.floorId}'`
+        param.filters += `;floorId='${this.params.floorId}'`
       }
 
       return param
@@ -218,15 +229,18 @@ export default {
     border: 1px solid #dfe6ec;
     background: #fff;
     margin-bottom: 10px;
-    .header{
+
+    .header {
       padding-bottom: 10px;
       border-bottom: 1px solid #bcbcbc;
     }
-    .main{
+
+    .main {
       margin-top: 10px;
       height: calc(100% - 96px);
     }
-    .footer{
+
+    .footer {
       margin-bottom: 10px;
     }
   }

+ 14 - 4
src/views/ready/collectsetting/index.vue

@@ -593,7 +593,6 @@ export default {
       this.searchVal = "";
       this.allFamily = [];
       this.isLoading = true;
-      console.log(this.value)
       // if (this.value == "property") {
       //   queryFamilyAll(res => {
       //     this.allFamily = res.Content.map((item) => {
@@ -671,7 +670,10 @@ export default {
         content: [{
           classCode: this.code,
           code: detail.InfoPointCode,
-          visible: detail.Visible
+          visible: detail.Visible,
+          groupCode: detail.groupCode,
+          id: detail.id,
+          type: detail.type
         }]
       }
       setDataDictionary(param, res => {
@@ -747,7 +749,11 @@ export default {
           InfoPointCode: item.code,
           Visible: item.visible,
           UnDisabled: item.unDisabled,
-          SecondName: item.secondName ? item.secondName : ''
+          SecondName: item.secondName ? item.secondName : '',
+          type: item.type,
+          classCode: item.classCode,
+          id: item.id,
+          groupCode: item.groupCode,
         })
       })
       //循环出第二级标签
@@ -766,7 +772,11 @@ export default {
             InfoPointName: item.InfoPointName,
             InfoPointCode: item.InfoPointCode,
             Visible: item.Visible,
-            UnDisabled: item.UnDisabled
+            UnDisabled: item.UnDisabled,
+            type: item.type,
+            classCode: item.classCode,
+            id: item.id,
+            groupCode: item.groupCode,
           })
         })
         sound.push(obj)