Sfoglia il codice sorgente

Merge branch 'dev' of http://39.106.8.246:3003/web/ibms into dev

shaun-sheep 5 anni fa
parent
commit
ced556c91d
37 ha cambiato i file con 1866 aggiunte e 864 eliminazioni
  1. 1 1
      config/prod.env.js
  2. 1 0
      package.json
  3. 48 0
      src/api/scan/request.js
  4. 1 0
      src/components/business_space/newGraphy/graphy.vue
  5. 29 9
      src/components/config_point/dictionaryCascader.vue
  6. 3 3
      src/components/config_point/step3_edit/auto_handle.vue
  7. 3 3
      src/components/config_point/step3_edit/enum_handle.vue
  8. 3 3
      src/components/config_point/step3_edit/formula_handle.vue
  9. 324 235
      src/components/config_point/step3_edit/index.vue
  10. 3 3
      src/components/config_point/step3_edit/no_handle.vue
  11. 296 245
      src/components/config_point/step3_point/3_temps.vue
  12. 1 1
      src/components/ledger/cenote/elevationMap.vue
  13. 1 2
      src/components/ledger/handsontables/device.vue
  14. 30 3
      src/components/point/dynamicdata/buildRules.vue
  15. 248 2
      src/components/point/dynamicdata/delRelationDialog.vue
  16. 1 1
      src/components/point/dynamicdata/dictionaryDevice.vue
  17. 41 4
      src/components/point/dynamicdata/equipRules.vue
  18. 33 3
      src/components/point/dynamicdata/floorRules.vue
  19. 98 24
      src/components/point/dynamicdata/locationCascader.vue
  20. 31 4
      src/components/point/dynamicdata/partsRules.vue
  21. 31 4
      src/components/point/dynamicdata/projectRules.vue
  22. 34 4
      src/components/point/dynamicdata/spaceRules.vue
  23. 31 4
      src/components/point/dynamicdata/systemRules.vue
  24. 38 3
      src/components/point/dynamicdata/tenantRules.vue
  25. 100 33
      src/components/point/report/objectInstance.vue
  26. 3 0
      src/main.js
  27. 5 1
      src/views/point/config_point/edit_origin/index.vue
  28. 18 11
      src/views/point/config_point/steps/step3.vue
  29. 39 36
      src/views/point/dynamicdata/addRelation/buildRela/index.vue
  30. 68 25
      src/views/point/dynamicdata/addRelation/equipRela/index.vue
  31. 50 39
      src/views/point/dynamicdata/addRelation/floorRela/index.vue
  32. 69 25
      src/views/point/dynamicdata/addRelation/partsRela/index.vue
  33. 31 36
      src/views/point/dynamicdata/addRelation/projectRela/index.vue
  34. 52 31
      src/views/point/dynamicdata/addRelation/spaceRela/index.vue
  35. 34 33
      src/views/point/dynamicdata/addRelation/systemRela/index.vue
  36. 65 32
      src/views/point/dynamicdata/addRelation/tenantRela/index.vue
  37. 2 1
      src/views/ready/buildfloor/drawGraphy/checkGraphy.vue

+ 1 - 1
config/prod.env.js

@@ -3,7 +3,7 @@ module.exports = {
     NODE_ENV: '"production"',
     BASE_URL: '"http://192.168.20.236"', //测试iframe地址
     SSO_SERVER: '"http://192.168.20.235:8081"', //测试环境
-    // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
+    // // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
     // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
     // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境

+ 1 - 0
package.json

@@ -21,6 +21,7 @@
   "dependencies": {
     "axios": "^0.18.0",
     "echarts": "^4.1.0",
+    "el-cascader-multi": "^1.1.8",
     "element-ui": "^2.11.0",
     "font-awesome": "^4.7.0",
     "handsontable-pro": "^3.0.0",

+ 48 - 0
src/api/scan/request.js

@@ -892,6 +892,12 @@ export function queryRentTableData(param, success) {
     http.postJson(url, param, success)
 }
 
+//查询租户信息
+export function queryTenant(param, success) {
+  let url = `${baseUrl}/datacenter/object/tenant/query`
+  http.postJson(url, param, success)
+}
+
 //创建租户信息
 export function createRentTableData(param, success) {
   let url = `${baseUrl}/datacenter/tenant/create`
@@ -1456,6 +1462,42 @@ export function dynamicAutoRelate(param, success) {
   http.postJson(url, param, success)
 }
 
+//动态数据关联-(2020改版新增接口)已关联实例查询
+export function dynamicRelatedObj(param, success) {
+  let url = `${baseUrl}/pointconfig/dynamic/query-related-objs`;
+  http.postJson(url, param, success)
+}
+
+//动态数据关联-带关联实例(设备)
+export function dynamicEquipQuery(param, success) {
+  let url = `${baseUrl}/equip-component/equip-query/zone-query`;
+  http.postJson(url, param, success)
+}
+
+//动态数据关联-带关联实例(部件)
+export function dynamicPartQuery(param, success) {
+  let url = `${baseUrl}/equip-component/equip-query/zone-component-query`;
+  http.postJson(url, param, success)
+}
+
+//动态数据关联-带关联实例(租户)
+export function dynamicTenantQuery(param, success) {
+  let url = `${baseUrl}/equip-component/tenant/zone-query`;
+  http.postJson(url, param, success)
+}
+
+//查询部件
+export function partsQuery(param, success) {
+  let url = `${baseUrl}/datacenter/object/component/query`;
+  http.postJson(url, param, success)
+}
+
+//查询项目信息
+export function projectQuery(param, success) {
+  let url = `${baseUrl}/datacenter/project/query`;
+  http.postJson(url, param, success)
+}
+
 //查询楼层信息
 export function floorQuery(param, success) {
   let url = `${baseUrl}/datacenter/floor/query`;
@@ -1533,6 +1575,12 @@ export function countZone(param, success) {
   http.postJson(url, data, success)
 }
 
+//查询所有空间信息
+export function queryAllZone(param, success) {
+  let url = `${baseUrl}/datacenter/object/zone/query`;
+  http.postJson(url, param, success)
+}
+
 //查询空间信息父类
 export function queryParentZone(param, success) {
     let url = `${baseUrl}/datacenter/zonespacebase/query`;

+ 1 - 0
src/components/business_space/newGraphy/graphy.vue

@@ -403,6 +403,7 @@ export default {
         this.scene.addZoneList(tempArr);
         this.scene.click(this, this.canvasClick);
         this.zoneList = this.scene.zoneList;
+        this.view._needDraw = true;
         this.canvasLoading = false;
       })
     },

+ 29 - 9
src/components/config_point/dictionaryCascader.vue

@@ -2,8 +2,9 @@
   <div>
     <el-form ref="form" :rules='rules' :model="form">
       <el-form-item prop="dict" class="cascader-container">
-        <el-cascader :options='options' v-model='form.dict' :props='props' filterable @change="changeSelect" ref="dictCas">
-        </el-cascader>
+        <el-cascader-multi :data='options' v-model='form.dict' :value-key='props.value' :label-key='props.label' :children-key='props.children'
+          filterable :popper-class="'select'" @change="changeSelect" ref="dictCas" :only-last="true" :no-data-text='"无数据"'>
+        </el-cascader-multi>
         <el-tooltip class="item" effect="dark" :content="`于${cacheTime}缓存,点击重新缓存`" placement="top">
           <el-button icon="el-icon-refresh" class="update-button" @click="getDictionary"></el-button>
         </el-tooltip>
@@ -47,14 +48,18 @@ export default {
     ...mapActions('project', ['getDictionary']),
     //获取物理世界所有设备类型
     getDictSuc(list) {
-      this.options = list;
+      this.options = this.transformList(list);
       this.changeSelect(this.form.dict);
     },
     changeSelect(val) {
       setTimeout(() => {
-        if (this.$refs.dictCas.getCheckedNodes()[0]) {
-          let labels = this.$refs.dictCas.getCheckedNodes()[0].pathLabels;
-          let data = this.$refs.dictCas.getCheckedNodes()[0].data;
+        if (this.$refs.dictCas) {
+          let labels = this.$refs.dictCas.selectedLabels;
+          let data = {};
+          this.$refs.dictCas.selectedNodes.forEach(t => {
+            let key = t.InfoPointCode;
+            data[key] = t;
+          });
           this.$emit('change', { val: val, labels: labels, data: data })
         }
       }, 500)
@@ -73,23 +78,38 @@ export default {
         }
       })
     },
+    transformList(list) {
+      let arr = [];
+      arr = list.map(t => {
+        if (t.Content) {
+          if (!t.Content.length) {
+            t.Content = [{ InfoPointName: '暂无可对应信息点', disabled: true }]
+          } else {
+            t.Content = this.transformList(t.Content);
+          }
+        }
+        return t;
+      })
+      return arr;
+    }
   }
 }
 </script>
 <style lang="less" scoped>
 .cascader-container.el-form-item--small.el-form-item {
   margin-bottom: 0;
-  /deep/ .el-cascader {
-    width: 89%;
+  .el-form-item__content div:nth-child(1) {
+    width: 89% !important;
     display: block;
     float: left;
-    .el-input .el-input__inner {
+    /deep/ .el-input .el-input__inner {
       border-radius: 4px 0 0 4px;
       vertical-align: bottom;
     }
   }
   .update-button {
     display: block;
+    height: 32px;
     float: left;
     border-left: 0;
     border-radius: 0 4px 4px 0;

+ 3 - 3
src/components/config_point/step3_edit/auto_handle.vue

@@ -1,8 +1,8 @@
 <template>
     <el-form ref='form' :rules='rules' :model='form' label-width='140px'>
-        <el-form-item v-if='devFlag' ref='form' label='对象标识' prop='EquipmentMark'>
+        <!-- <el-form-item v-if='devFlag' ref='form' label='对象标识' prop='EquipmentMark'>
             <el-input v-model='form.EquipmentMark'></el-input>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
             label='原始点位值单位'
             prop='unit'
@@ -31,7 +31,7 @@ export default {
                 unit: [],
             },
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
+                // EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
             }
         }
     },

+ 3 - 3
src/components/config_point/step3_edit/enum_handle.vue

@@ -1,9 +1,9 @@
 <template>
     <div class='edit-box'>
         <el-form ref='form' :rules='rules' :model='form' label-width='140px'>
-            <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
+            <!-- <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
                 <el-input v-model='form.EquipmentMark'></el-input>
-            </el-form-item>
+            </el-form-item> -->
 
             <ul class='point-box'>
                 <span class='left'>如果</span>
@@ -47,7 +47,7 @@ export default {
                 pointArr: [{ from: '', to: '' }]
             },
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
+                // EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
             }
         }
     },

+ 3 - 3
src/components/config_point/step3_edit/formula_handle.vue

@@ -1,9 +1,9 @@
 <template>
     <div class='edit-box'>
         <el-form ref='form' :rules='rules' :model='form' label-width='140px'>
-            <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
+            <!-- <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
                 <el-input v-model='form.EquipmentMark'></el-input>
-            </el-form-item>
+            </el-form-item> -->
         </el-form>
         <div class='formula-box'>
             <p>原始点位</p>
@@ -53,7 +53,7 @@ export default {
             },
             extract: true,
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
+                // EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
             },
             subStrVal: false,
             from: 1,

+ 324 - 235
src/components/config_point/step3_edit/index.vue

@@ -32,23 +32,32 @@
       <el-form class='form' :rules='rules' ref='form' :model='form' label-width='140px'>
         <el-form-item label='对应数据字典' prop='diction'>
           <dictionary-cas @change="changeDictionaryCas" ref="dictionaryCas"></dictionary-cas>
-          <div class='dict'>
+        </el-form-item>
+        <el-form-item label='对象标识' prop="EquipmentMark">
+          <el-input v-model='form.EquipmentMark'></el-input>
+        </el-form-item>
+        <template v-for="(it,index) in typeList">
+          <div class='dict' :key="index">
+            <label class="el-form-item__label" style="width:140px;">信息点名称:</label><span style="line-height:40px">{{it.name||''}}</span>
             <p class='btm'>
-              <el-input readonly type='textarea' :rows='2' placeholder='信息点的单位及值的说明' v-model='ValueDescription'></el-input>
+              <el-input readonly type='textarea' :rows='2' placeholder='信息点的单位及值的说明' v-model='it.ValueDescription'>
+              </el-input>
+              <el-form-item style="margin-top:15px;" label='值处理方式' prop='DataRuleType'>
+                <el-select v-model='it.DataRuleType' placeholder='请选择'>
+                  <el-option v-for='item in handleTypeArr' :key='item.value' :label='item.label' :value='item.value'></el-option>
+                </el-select>
+              </el-form-item>
             </p>
+            <!-- components -->
+            <no-handle :ref='"noHandle"+index' v-if='it.DataRuleType == "无需处理,直接使用"' :noHandleShow='noHandleShow'></no-handle>
+            <auto-handle :ref='"autoHandle"+index' v-else-if='it.DataRuleType == "需自动单位转换"' :unitObj='it' :autoHandleShow='autoHandleShow'>
+            </auto-handle>
+            <enum-handle :ref='"enumHandle"+index' v-else-if='it.DataRuleType == "需按设置枚举转换"' :enumHandleShow='enumHandleShow'></enum-handle>
+            <formula-handle :ref='"formulaHandle"+index' v-else-if='it.DataRuleType == "需按公式转换"' :formulaHandleShow='formulaHandleShow'>
+            </formula-handle>
+            <split-handle :ref='"splitHandle"+index' v-else-if='it.DataRuleType == "需拆分处理"' :splitHandleShow='splitHandleShow'></split-handle>
           </div>
-        </el-form-item>
-        <el-form-item label='值处理方式' prop='DataRuleType'>
-          <el-select v-model='form.DataRuleType' placeholder='请选择'>
-            <el-option v-for='item in handleTypeArr' :key='item.value' :label='item.label' :value='item.value'></el-option>
-          </el-select>
-        </el-form-item>
-        <!-- components -->
-        <no-handle ref='noHandle' v-if='form.DataRuleType == "无需处理,直接使用"' :noHandleShow='noHandleShow'></no-handle>
-        <auto-handle ref='autoHandle' v-else-if='form.DataRuleType == "需自动单位转换"' :unitObj='unitObj' :autoHandleShow='autoHandleShow'></auto-handle>
-        <enum-handle ref='enumHandle' v-else-if='form.DataRuleType == "需按设置枚举转换"' :enumHandleShow='enumHandleShow'></enum-handle>
-        <formula-handle ref='formulaHandle' v-else-if='form.DataRuleType == "需按公式转换"' :formulaHandleShow='formulaHandleShow'></formula-handle>
-        <split-handle ref='splitHandle' v-else-if='form.DataRuleType == "需拆分处理"' :splitHandleShow='splitHandleShow'></split-handle>
+        </template>
       </el-form>
       <div class='btn-box'>
         <el-button type='primary' @click='save'>保存</el-button>
@@ -82,14 +91,16 @@ export default {
       dataDict: {}, //数据字典
       InfomationPoint: null, //信息点
       unitObj: {}, //传给自动单位转换的obj
-      ValueDescription: '', //值/点位描述
+      ValueDescription: {}, //值/点位描述
       form: {
         diction: '1',//占位
-        DataRuleType: '无需处理,直接使用'
+        DataRuleType: '无需处理,直接使用',
+        EquipmentMark: ''
       },
       rules: {
         DataRuleType: [{ required: true, message: '请选择值处理方式', trigger: 'change' }],
-        diction: [{ required: true }]
+        diction: [{ required: true }],
+        EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
       },
       handleTypeArr: [
         {
@@ -119,7 +130,8 @@ export default {
       enumHandleShow: {},
       formulaHandleShow: {},
       splitHandleShow: {},
-      dictionaryData: []
+      dictionaryData: [],
+      typeList: []
     }
   },
   props: {
@@ -139,209 +151,240 @@ export default {
   methods: {
     //保存
     save() {
+      if (!this.form.EquipmentMark) {
+        this.errMsg();
+        return false;
+      }
       this.$refs.dictionaryCas.validate(valid => {
         if (valid) {
-          var flag = this.form.DataRuleType
-          switch (flag) {
-            case '无需处理,直接使用':
-              this.$refs['noHandle'].getForm(noHandle => {
-                if (noHandle) {
-                  this.saveForm(this.form, noHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
-            case '需自动单位转换':
-              this.$refs['autoHandle'].getForm(autoHandle => {
-                if (autoHandle) {
-                  this.saveForm(this.form, autoHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
-            case '需按设置枚举转换':
-              this.$refs['enumHandle'].getForm(enumHandle => {
-                if (enumHandle) {
-                  this.saveForm(this.form, enumHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
-            case '需按公式转换':
-              this.$refs['formulaHandle'].getForm(formulaHandle => {
-                if (formulaHandle) {
-                  this.saveForm(this.form, formulaHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
-            case '需拆分处理':
-              this.$refs['splitHandle'].getForm(splitHandle => {
-                if (splitHandle) {
-                  this.saveForm(this.form, splitHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
+          for (let i = 0; i < this.typeList.length; i++) {
+            let flag = this.typeList[i].DataRuleType
+            switch (flag) {
+              case '无需处理,直接使用':
+                let componnoHandle = `noHandle${i}`
+                this.$refs[componnoHandle][0].getForm(noHandle => {
+                  if (noHandle) {
+                    this.typeList[i].other = noHandle
+                    // this.saveForm(this.form, noHandle)
+                  } else {
+                    this.errMsg();
+                    return false;
+                  }
+                })
+                break
+              case '需自动单位转换':
+                let componautoHandle = `autoHandle${i}`
+                this.$refs[componautoHandle][0].getForm(autoHandle => {
+                  if (autoHandle) {
+                    this.typeList[i].other = autoHandle
+                    // this.saveForm(this.form, autoHandle)
+                  } else {
+                    this.errMsg()
+                    return false;
+                  }
+                })
+                break
+              case '需按设置枚举转换':
+                let componenumHandle = `enumHandle${i}`
+                this.$refs[componenumHandle][0].getForm(enumHandle => {
+                  if (enumHandle) {
+                    this.typeList[i].other = enumHandle
+                    // this.saveForm(this.form, enumHandle)
+                  } else {
+                    this.errMsg()
+                    return false;
+                  }
+                })
+                break
+              case '需按公式转换':
+                let componformulaHandle = `formulaHandle${i}`
+                this.$refs[componformulaHandle][0].getForm(formulaHandle => {
+                  if (formulaHandle) {
+                    this.typeList[i].other = formulaHandle
+                    // this.saveForm(this.form, formulaHandle)
+                  } else {
+                    this.errMsg()
+                    return false;
+                  }
+                })
+                break
+              case '需拆分处理':
+                let componsplitHandle = `splitHandle${i}`
+                this.$refs[componsplitHandle][0].getForm(splitHandle => {
+                  if (splitHandle) {
+                    this.typeList[i].other = formulaHandle
+                    // this.saveForm(this.form, splitHandle)
+                  } else {
+                    this.errMsg()
+                    return false;
+                  }
+                })
+                break
+            }
           }
+          this.saveForm()
         } else {
           this.errMsg()
           return false
         }
       })
     },
-    saveForm(basic, other) {
-      let type = basic.DataRuleType
-      let basicParams = {
-        InfomationPointCode: this.dictionaryData[this.dictionaryData.length - 1], //信息点code
-        InfomationPoint: this.dictionaryNames[this.dictionaryNames.length - 1], //信息点名称
-        DataRuleType: basic.DataRuleType, //值处理方式
-        DataSourceId: this.datasourceId, //数据源id
-        PointId: this.editData.Point.Id, //点位ID
-        Type: this.dictionaryNames[0], //一级分类名称
-        TypeCode: this.dictionaryData[0], //一级分类code
-      }
-      if (this.dictionaryData.length == 3) {
-        //设备-部件-空间
-        basicParams.EquipmentTypeCode = this.dictionaryData[1]
-        basicParams.EquipmentType = this.dictionaryNames[1]
-      } else if (this.dictionaryData.length == 4) { //专业系统
-        basicParams.SpecialtyCode = this.dictionaryData[1]
-        basicParams.Specialty = this.dictionaryNames[1]
-        basicParams.SystemCode = this.dictionaryData[2]
-        basicParams.System = this.dictionaryNames[2]
-        basicParams.EquipmentTypeCode = basicParams.SystemCode  //为了配置从动参取值存储
-        basicParams.EquipmentType = basicParams.System
-      }
+    saveForm() {
       let updateParams = {
         data: {
           Content: [{ Id: this.editData.Point.Id }]
         },
         type: this.protocolType
       }
-      let otherParams = {}
-      switch (type) {
-        case '无需处理,直接使用':
-          otherParams = {
-            EquipmentMark: other.EquipmentMark
-          }
-          updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
-          break
-        case '需自动单位转换':
-          let DataRuleContent1 = JSON.stringify([
-            {
-              seq: 1,
-              ruletype: 'type1',
-              content: [
-                {
-                  from: other.unit[0] + '-' + other.unit[1],
-                  to: this.unitObj.unit
-                }
-              ]
+      let params = this.typeList.map((t, i) => {
+        let temp = this.dictionaryData[i],
+          tempNames = t.name.split('-');
+        let eachData = {
+          InfomationPointCode: temp[temp.length - 1],
+          InfomationPoint: tempNames[tempNames.length - 1],
+          DataRuleType: t.DataRuleType,
+          DataSourceId: this.datasourceId, //数据源id
+          PointId: this.editData.Point.Id, //点位ID
+          TypeCode: temp[0],
+          Type: tempNames[0],
+          EquipmentMark: this.form.EquipmentMark
+        }
+        if (temp.length == 3) {
+          //设备-部件-空间
+          eachData.EquipmentTypeCode = temp[1]
+          eachData.EquipmentType = tempNames[1]
+        } else if (temp.length == 4) {
+          eachData.SpecialtyCode = temp[1]
+          eachData.Specialty = tempNames[1]
+          eachData.SystemCode = temp[2]
+          eachData.System = tempNames[2]
+          eachData.EquipmentTypeCode = eachData.SystemCode  //为了配置从动参取值存储
+          eachData.EquipmentType = eachData.System
+        }
+        let type = t.DataRuleType;
+        updateParams.data.Content[0].EquipmentMark = eachData.EquipmentMark
+        switch (type) {
+          case '无需处理,直接使用':
+            // otherParams = {
+            //   EquipmentMark: other.EquipmentMark
+            // }
+            // updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
+            break
+          case '需自动单位转换':
+            let DataRuleContent1 = JSON.stringify([
+              {
+                seq: 1,
+                ruletype: 'type1',
+                content: [
+                  {
+                    from: t.other.unit[0] + '-' + t.other.unit[1],
+                    to: this.unitObj[eachData.InfomationPointCode].unit
+                  }
+                ]
+              }
+            ])
+            eachData.DataRuleContent = DataRuleContent1;
+            // otherParams = {
+            //   DataRuleContent: DataRuleContent1,
+            //   EquipmentMark: other.EquipmentMark
+            // }
+            // updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
+            break
+          case '需按设置枚举转换':
+            let DataRuleContent2 = t.other.pointArr.length
+              ? JSON.stringify([{ seq: 1, ruletype: 'type2', content: t.other.pointArr }])
+              : undefined
+            // otherParams = {
+            //   EquipmentMark: other.EquipmentMark,
+            //   DataRuleContent: DataRuleContent2
+            // }
+            eachData.DataRuleContent = DataRuleContent2;
+            // updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
+            break
+          case '需按公式转换':
+            let subRule = t.other.from
+              ? {
+                seq: 1,
+                ruletype: 'type4',
+                content: [
+                  {
+                    from: t.other.from,
+                    to: t.other.to
+                  }
+                ]
+              }
+              : undefined
+            let extractRule = {
+              seq: 2,
+              ruletype: 'type5',
+              content: t.other.extract
+                ? [
+                  {
+                    extract: 'number'
+                  }
+                ]
+                : []
             }
-          ])
-          otherParams = {
-            DataRuleContent: DataRuleContent1,
-            EquipmentMark: other.EquipmentMark
-          }
-          updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
-          break
-        case '需按设置枚举转换':
-          let DataRuleContent2 = other.pointArr.length
-            ? JSON.stringify([{ seq: 1, ruletype: 'type2', content: other.pointArr }])
-            : undefined
-          otherParams = {
-            EquipmentMark: other.EquipmentMark,
-            DataRuleContent: DataRuleContent2
-          }
-          updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
-          break
-        case '需按公式转换':
-          let subRule = other.from
-            ? {
-              seq: 1,
-              ruletype: 'type4',
-              content: [
-                {
-                  from: other.from,
-                  to: other.to
-                }
-              ]
+            let countRule = t.other.mark
+              ? {
+                seq: 3,
+                ruletype: 'type6',
+                content: [
+                  {
+                    calculationtype: t.other.mark,
+                    value: t.other.markValue
+                  }
+                ]
+              }
+              : undefined
+
+            let DataRuleContent3 = []
+            if (subRule) {
+              DataRuleContent3.push(subRule)
             }
-            : undefined
-          let extractRule = {
-            seq: 2,
-            ruletype: 'type5',
-            content: other.extract
-              ? [
-                {
-                  extract: 'number'
-                }
-              ]
-              : []
-          }
-          let countRule = other.mark
-            ? {
-              seq: 3,
-              ruletype: 'type6',
-              content: [
-                {
-                  calculationtype: other.mark,
-                  value: other.markValue
-                }
-              ]
+            DataRuleContent3.push(extractRule)
+            if (countRule) {
+              DataRuleContent3.push(countRule)
             }
-            : undefined
-
-          let DataRuleContent3 = []
-          if (subRule) {
-            DataRuleContent3.push(subRule)
-          }
-          DataRuleContent3.push(extractRule)
-          if (countRule) {
-            DataRuleContent3.push(countRule)
-          }
-          DataRuleContent3 = DataRuleContent3.length ? JSON.stringify(DataRuleContent3) : undefined
-          otherParams = {
-            EquipmentMark: other.EquipmentMark,
-            DataRuleContent: DataRuleContent3
-          }
-          updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
-          break
-        case '需拆分处理':
-          let SplitPoints = other.devArr.length ? other.devArr : undefined
-          let DataRuleContent4 = undefined
-          var enum5 = null
-          if (other.tranfVal) {
-            enum5 = { seq: 2, ruletype: 'type2', content: other.pointArr }
-          } else {
-            enum5 = { seq: 2, ruletype: 'type2', content: [] }
-          }
-          SplitPoints.forEach(ele => {
-            let cutStr = {
-              seq: 1,
-              ruletype: 'type4',
-              content: [
-                {
-                  from: ele.SplitStart,
-                  to: ele.SplitEnd
-                }
-              ]
+            DataRuleContent3 = DataRuleContent3.length ? JSON.stringify(DataRuleContent3) : undefined
+            eachData.DataRuleContent = DataRuleContent3;
+            // otherParams = {
+            //   EquipmentMark: other.EquipmentMark,
+            //   DataRuleContent: DataRuleContent3
+            // }
+            // updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
+            break
+          case '需拆分处理':
+            let SplitPoints = t.other.devArr.length ? t.other.devArr : undefined
+            let DataRuleContent4 = undefined
+            var enum5 = null
+            if (t.other.tranfVal) {
+              enum5 = { seq: 2, ruletype: 'type2', content: t.other.pointArr }
+            } else {
+              enum5 = { seq: 2, ruletype: 'type2', content: [] }
             }
-            ele.DataRuleContent = JSON.stringify([cutStr, enum5])
-          })
-          otherParams = {
-            SplitPoints: SplitPoints
-          }
-          updateParams.data.Content[0].EquipmentMark = other.eqMark
-          break
-      }
-      let params = [Object.assign(basicParams, otherParams)]
+            SplitPoints.forEach(ele => {
+              let cutStr = {
+                seq: 1,
+                ruletype: 'type4',
+                content: [
+                  {
+                    from: ele.SplitStart,
+                    to: ele.SplitEnd
+                  }
+                ]
+              }
+              ele.DataRuleContent = JSON.stringify([cutStr, enum5])
+            })
+            eachData.SplitPoints = SplitPoints;
+            // otherParams = {
+            // SplitPoints: SplitPoints
+            // }
+            updateParams.data.Content[0].EquipmentMark = t.other.eqMark
+            break
+        }
+        return eachData;
+      })
       updatePoint(updateParams, res => { this.create(params) })
     },
     create(params) {
@@ -367,7 +410,7 @@ export default {
     },
     handleItemChange(val, cb) {
       if (val.length == 3) {
-        if(val[2]!='null'){
+        if (val[2] != 'null') {
           let params = { type: val[2] }
           getQueryProperty(params, res => {
             if (res.Result == 'success') {
@@ -435,46 +478,61 @@ export default {
     },
     init() {
       //获取所有的设备
-      this.getEqAll()
+      // this.getEqAll()
     },
     //回显数值
     async showValue(val) {
       // await this.getEqAll()
       let length = val.RelationList.length
       let eqMark = this.editData.Point.EquipmentMark
+      this.form.EquipmentMark = eqMark;
+      console.log('-------------')
+      console.log(val)
       if (length) {
         var data = val.RelationList[0]
         let dict = [data.SpecialtyCode, data.SystemCode, data.EquipmentTypeCode]
         //回显字典
-        let tempArr = []
-        if (data.TypeCode == 'Eq' || data.TypeCode == 'Ec' || data.TypeCode == 'Sp') {
-          tempArr = [data.TypeCode, data.EquipmentTypeCode, data.InfomationPointCode]
-        } else if (data.TypeCode == 'Sy') {
-          tempArr = [data.TypeCode, data.SpecialtyCode, data.SystemCode, data.InfomationPointCode]
-        } else {
-          tempArr = [data.TypeCode, data.InfomationPointCode]
-        }
+        let tempArr = val.RelationList.map(t => {
+          let eachData = [];
+          if (t.TypeCode == 'Eq' || t.TypeCode == 'Ec' || t.TypeCode == 'Sp') {
+            eachData = [t.TypeCode, t.EquipmentTypeCode, t.InfomationPointCode]
+          } else if (t.TypeCode == 'Sy') {
+            eachData = [t.TypeCode, t.SpecialtyCode, t.SystemCode, t.InfomationPointCode]
+          } else {
+            eachData = [t.TypeCode, t.InfomationPointCode]
+          }
+          return eachData;
+        })
         this.$nextTick(() => {
-          this.$refs.dictionaryCas.setCascaderVal(tempArr)
+          this.$refs.dictionaryCas.setCascaderVal(tempArr);
         })
-
-          this.form.DataRuleType = data.DataRuleType
+        this.typeList = val.RelationList.map(t => {
+          if (t.TypeCode == 'Eq' || t.TypeCode == 'Ec' || t.TypeCode == 'Sp') {
+            t.name = `${t.Type}-${t.EquipmentType}-${t.InfomationPoint}`
+          } else if (t.TypeCode == 'Sy') {
+            t.name = `${t.Type}-${t.Specialty}-${t.System}-${t.InfomationPoint}`
+          } else {
+            t.name = `${t.Type}-${t.InfomationPoint}`
+          }
+          return t;
+        });
+        this.form.DataRuleType = data.DataRuleType
         // this.handleItemChange(dict, () => {
-          // this.unitObj = this.infoDict[data.InfomationPointCode]
-          // this.InfomationPoint = this.unitObj.infoPointName || '--'
-          // if (typeof this.unitObj.dataSource == 'string') {
-          //   if (this.unitObj.dataSource.length) {
-          //     this.ValueDescription = this.unitObj.dataSource
-          //   } else {
-          //     this.ValueDescription = '无信息点单位及值说明'
-          //   }
-          // } else {
-          //   let str = ''
-          //   this.unitObj.dataSource.forEach(ele => {
-          //     str += ele.code + '.' + ele.name + ' '
-          //   })
-          //   this.ValueDescription = str
-          // }
+        // this.unitObj = this.infoDict[data.InfomationPointCode]
+        // this.InfomationPoint = this.unitObj.infoPointName || '--'
+        // if (typeof this.unitObj.dataSource == 'string') {
+        //   if (this.unitObj.dataSource.length) {
+        //     this.ValueDescription = this.unitObj.dataSource
+        //   } else {
+        //     this.ValueDescription = '无信息点单位及值说明'
+        //   }
+        // } else {
+        //   let str = ''
+        //   this.unitObj.dataSource.forEach(ele => {
+        //     str += ele.code + '.' + ele.name + ' '
+        //   })
+        //   this.ValueDescription = str
+        // }
         // })
         if (length == 1) {
           let flag = data.DataRuleType
@@ -585,11 +643,41 @@ export default {
     //对应数据字典变化
     changeDictionaryCas({ val, labels, data }) {
       this.dictionaryData = val;
-      this.dictionaryNames = labels
+      this.dictionaryNames = labels || '';
+      this.unitObj = data || {}
+      if (this.typeList.length) {
+        this.typeList = this.typeList.map(t => {
+          if (labels.indexOf(t.name) < 0) {
+            return undefined
+          }
+          return t;
+        }).filter(item => item)
+        let temp = this.typeList.map(t => {
+          return t.name;
+        })
+        for (let i = 0; i < labels.length; i++) {
+          if (temp.indexOf(labels[i]) < 0) {
+            this.typeList.push({
+              name: labels[i],
+              DataRuleType: '无需处理,直接使用'
+            })
+          }
+        }
+      } else {
+        this.typeList = labels.map(t => {
+          return {
+            name: t,
+            DataRuleType: '无需处理,直接使用'
+          }
+        })
+      }
+      this.typeList = this.typeList.map((t, i) => {
+        t.ValueDescription = this.delDataSource(data[val[i][val[i].length - 1]].DataSource)
+        return t;
+      })
       // this.infoDict = this.$refs.dictionaryCas.pointDataSource
-      this.unitObj = data
-      this.InfomationPoint = this.unitObj.InfoPointName || ''
-      this.ValueDescription = this.delDataSource(this.unitObj.DataSource)
+      // this.InfomationPoint = this.unitObj.InfoPointName || ''
+      // this.ValueDescription = this.delDataSource(this.unitObj.DataSource)
     }
   },
   mounted() {
@@ -626,7 +714,7 @@ export default {
       span:nth-of-type(2) {
         width: calc(100% - 120px);
         overflow: hidden;
-        text-overflow:ellipsis;
+        text-overflow: ellipsis;
         white-space: nowrap;
       }
     }
@@ -644,6 +732,7 @@ export default {
         }
         .btm {
           margin-top: 5px;
+          margin-left: 140px;
         }
       }
     }

+ 3 - 3
src/components/config_point/step3_edit/no_handle.vue

@@ -1,8 +1,8 @@
 <template>
     <el-form ref='form' :model='form' :rules='rules' label-width='140px'>
-        <el-form-item v-if='devFlag' label='对象标识' prop="EquipmentMark">
+        <!-- <el-form-item v-if='devFlag' label='对象标识' prop="EquipmentMark">
             <el-input v-model='form.EquipmentMark'></el-input>
-        </el-form-item>
+        </el-form-item> -->
     </el-form>
 </template>
 
@@ -15,7 +15,7 @@ export default {
                 EquipmentMark: ''
             },
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
+                // EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
             }
         }
     },

+ 296 - 245
src/components/config_point/step3_point/3_temps.vue

@@ -11,14 +11,16 @@
           <dictionary-cas @change="changeDictionaryCas" ref="dictionaryCas"></dictionary-cas>
         </el-form-item>
       </el-form>
-      <div class="flex-around">
-        <div class="point-despoint">
-          <p class="center">原始点位说明</p>
-          <p class="p10">{{pointDes}}</p>
-        </div>
-        <div class="point-despoint">
-          <p class="center">数据字典值说明</p>
-          <p class="content-view p10">{{delDataSource(unitObj.DataSource)}}</p>
+      <div>
+        <div class="flex-around" v-for="(it,ind) in typeList" :key="ind">
+          <div class="point-despoint">
+            <p class="center">原始点位说明</p>
+            <p class="p10">{{pointDes}}</p>
+          </div>
+          <div class="point-despoint">
+            <p class="center">数据字典值说明</p>
+            <p class="content-view p10">{{delDataSource(it.unitObj.DataSource)}}</p>
+          </div>
         </div>
       </div>
       <div class="center" style="margin-top:20px;">
@@ -26,29 +28,31 @@
       </div>
     </div>
     <div class="collapse-item" v-if="activeName == 1">
-      <div class="flex-around">
-        <div class="point-despoint">
-          <p class="center">原始点位说明</p>
-          <p class="p10">{{pointDes}}</p>
-        </div>
-        <div class="point-despoint">
-          <p class="center">数据字典值说明</p>
-          <p class="content-view p10">{{delDataSource(unitObj.DataSource)}}</p>
+      <div v-for="(it,ind) in typeList" :key="ind">
+        <div class="flex-around">
+          <div class="point-despoint">
+            <p class="center">原始点位说明</p>
+            <p class="p10">{{pointDes}}</p>
+          </div>
+          <div class="point-despoint">
+            <p class="center">数据字典值说明</p>
+            <p class="content-view p10">{{delDataSource(it.unitObj.DataSource)}}</p>
+          </div>
         </div>
+        <el-form class="form" :rules="rules" ref="form2" :model="form2" label-width="140px">
+          <el-form-item label='值处理方式' prop='DataRuleType'>
+            <el-select v-model='it.DataRuleType' placeholder='请选择'>
+              <el-option v-for='item in handleTypeArr' :key='item.value' :label='item.label' :value='item.value'></el-option>
+            </el-select>
+          </el-form-item>
+          <!-- components -->
+          <div :ref='"noHandle"+ind' v-if='it.DataRuleType == "无需处理,直接使用"'></div>
+          <auto-handle :devFlag="false" :ref='"autoHandle"+ind' v-else-if='it.DataRuleType == "需自动单位转换"' :unitObj='it.unitObj'></auto-handle>
+          <enum-handle :devFlag="false" :ref='"enumHandle"+ind' v-else-if='it.DataRuleType == "需按设置枚举转换"'></enum-handle>
+          <formula-handle :devFlag="false" :ref='"formulaHandle"+ind' v-else-if='it.DataRuleType == "需按公式转换"'></formula-handle>
+          <!-- <split-handle :devFlag="false" ref='splitHandle' v-else-if='form2.DataRuleType == "需按拆分枚举转换"'></split-handle> -->
+        </el-form>
       </div>
-      <el-form class="form" :rules="rules" ref="form2" :model="form2" label-width="140px">
-        <el-form-item label='值处理方式' prop='DataRuleType'>
-          <el-select v-model='form2.DataRuleType' placeholder='请选择'>
-            <el-option v-for='item in handleTypeArr' :key='item.value' :label='item.label' :value='item.value'></el-option>
-          </el-select>
-        </el-form-item>
-        <!-- components -->
-        <div ref='noHandle' v-if='form2.DataRuleType == "无需处理,直接使用"'></div>
-        <auto-handle :devFlag="false" ref='autoHandle' v-else-if='form2.DataRuleType == "需自动单位转换"' :unitObj='unitObj'></auto-handle>
-        <enum-handle :devFlag="false" ref='enumHandle' v-else-if='form2.DataRuleType == "需按设置枚举转换"'></enum-handle>
-        <formula-handle :devFlag="false" ref='formulaHandle' v-else-if='form2.DataRuleType == "需按公式转换"'></formula-handle>
-        <!-- <split-handle :devFlag="false" ref='splitHandle' v-else-if='form2.DataRuleType == "需按拆分枚举转换"'></split-handle> -->
-      </el-form>
       <div class="center" style="margin-top:20px;">
         <el-button @click="undo">上一步</el-button>
         <el-button @click="next">下一步</el-button>
@@ -151,7 +155,7 @@ export default {
         //     value: '需按拆分枚举转换'
         // }
       ],
-      dealType: {}, //处理方式
+      dealType: [], //处理方式
       form2: {
         ValueDescription: '',
         DataRuleType: '无需处理,直接使用'
@@ -164,7 +168,8 @@ export default {
         }],
         dict: [{ required: true }]
       },
-      pointDes: ""
+      pointDes: "",
+      typeList: []
     }
   },
   created() { },
@@ -185,7 +190,7 @@ export default {
     getMain(param, pagechange) {
       if (!pagechange) {
         this.activeName = 0
-        this.dealType = {}
+        this.dealType = []
         this.form1 = {
           dict: 1
         }
@@ -236,14 +241,18 @@ export default {
       // } else {
       //   this.createParam(params)
       // }
-      let pa = Object.assign({
-        DataSourceId: this.queryParam.DataSourceId,
-        KeyEquipmentParameter: this.queryParam.EquipmentParameter,
-        KeyEquipmentType: this.queryParam.EquipmentType,
-      }, this.dealType);
-      groupCreatePointRelation(pa, res => {
-        this.$message.success("处理成功")
-        this.$emit("changed")
+      this.dealType.forEach((t, i) => {
+        let pa = Object.assign({
+          DataSourceId: this.queryParam.DataSourceId,
+          KeyEquipmentParameter: this.queryParam.EquipmentParameter,
+          KeyEquipmentType: this.queryParam.EquipmentType,
+        }, t);
+        groupCreatePointRelation(pa, res => {
+          if (i == this.dealType.length - 1) {
+            this.$message.success("处理成功")
+            this.$emit("changed")
+          }
+        })
       })
     },
     confirm(assage, params) {
@@ -291,221 +300,235 @@ export default {
           }
         })
       } else if (this.activeName == 1) {
-        this.$refs.form2.validate(valid => {
-          if (valid) {
-            var flag = this.form2.DataRuleType
-            var isNext = true;
-            switch (flag) {
-              case '无需处理,直接使用':
-                this.saveForm(this.form2, {})
-                break
-              case '需自动单位转换':
-                this.$refs.autoHandle.getForm(autoHandle => {
-                  if (autoHandle) {
-                    this.saveForm(this.form2, autoHandle)
-                  } else {
-                    isNext = false
-                    this.errMsg()
-                  }
-                })
-                break
-              case '需按设置枚举转换':
-                this.$refs.enumHandle.getForm(enumHandle => {
-                  if (enumHandle) {
-                    this.saveForm(this.form2, enumHandle)
-                  } else {
-                    isNext = false
-                    this.errMsg()
-                  }
-                })
-                break
-              case '需按公式转换':
-                this.$refs.formulaHandle.getForm(formulaHandle => {
-                  if (formulaHandle) {
-                    this.saveForm(this.form2, formulaHandle)
-                  } else {
-                    isNext = false
-                    this.errMsg()
-                  }
-                })
-                break
-              // case '需按拆分枚举转换':
-              //     this.$refs.splitHandle.getForm(splitHandle => {
-              //         if (splitHandle) {
-              //             this.saveForm(this.form2, splitHandle)
-              //         } else {
-              //             isNext = false
-              //             this.errMsg()
-              //         }
-              //     })
-              //     break
-            }
-            if (isNext) {
-              this.activeName += 1
-              let setting = {
-                data: this.renderData,
-                maxRows: 1000,
-                colHeaders: ['对象标识', '原始点位描述', '位置标签', '备注'],
-                columns: [{
-                  data: 'EquipmentMark'
-                },
-                {
-                  data: 'Description',
-                  readOnly: true
-                },
-                {
-                  data: 'LocationFlag',
-                  readOnly: true
-                },
-                {
-                  data: 'Remarks',
-                  readOnly: true
+        let isNext = true;
+        for (let i = 0; i < this.typeList.length; i++) {
+          let flag = this.typeList[i].DataRuleType
+          let compon = '';
+          switch (flag) {
+            case '无需处理,直接使用':
+              this.typeList[i].other = {}
+              // this.saveForm(this.form2, {})
+              break
+            case '需自动单位转换':
+              compon = `autoHandle${i}`
+              this.$refs[compon][0].getForm(autoHandle => {
+                if (autoHandle) {
+                  this.typeList[i].other = autoHandle;
+                  // this.saveForm(this.form2, autoHandle)
+                } else {
+                  isNext = false
+                  this.errMsg()
                 }
-                ]
-              }
-              if (this.renderData.length) {
-                this.$nextTick(_ => {
-                  this.hot = this.$refs.handsontable.init(setting)
-                })
-              }
+              })
+              break
+            case '需按设置枚举转换':
+              compon = `enumHandle${i}`
+              this.$refs[compon][0].getForm(enumHandle => {
+                if (enumHandle) {
+                  this.typeList[i].other = enumHandle;
+                  // this.saveForm(this.form2, enumHandle)
+                } else {
+                  isNext = false
+                  this.errMsg()
+                }
+              })
+              break
+            case '需按公式转换':
+              compon = `formulaHandle${i}`
+              this.$refs[compon][0].getForm(formulaHandle => {
+                if (formulaHandle) {
+                  this.typeList[i].other = formulaHandle;
+                  // this.saveForm(this.form2, formulaHandle)
+                } else {
+                  isNext = false
+                  this.errMsg()
+                }
+              })
+              break
+            // case '需按拆分枚举转换':
+            //     this.$refs.splitHandle.getForm(splitHandle => {
+            //         if (splitHandle) {
+            //             this.saveForm(this.form2, splitHandle)
+            //         } else {
+            //             isNext = false
+            //             this.errMsg()
+            //         }
+            //     })
+            //     break
+          }
+        }
+        if (isNext) {
+          this.saveForm();
+          this.activeName += 1
+          let setting = {
+            data: this.renderData,
+            maxRows: 1000,
+            colHeaders: ['对象标识', '原始点位描述', '位置标签', '备注'],
+            columns: [{
+              data: 'EquipmentMark'
+            },
+            {
+              data: 'Description',
+              readOnly: true
+            },
+            {
+              data: 'LocationFlag',
+              readOnly: true
+            },
+            {
+              data: 'Remarks',
+              readOnly: true
             }
-
-          } else {
-            this.errMsg()
-            return false
+            ]
           }
-        })
+          if (this.renderData.length) {
+            this.$nextTick(_ => {
+              this.hot = this.$refs.handsontable.init(setting)
+            })
+          }
+        }
       }
     },
-    saveForm(basic, other) {
-      let type = basic.DataRuleType
-      let basicParams = {
-        InfomationPointCode: this.dictionaryData[this.dictionaryData.length - 1], //信息点code
-        InfomationPoint: this.dictionaryNames[this.dictionaryNames.length - 1], //信息点名称
-        DataRuleType: basic.DataRuleType, //值处理方式
-        Type: this.dictionaryNames[0], //一级分类名称
-        TypeCode: this.dictionaryData[0], //一级分类code
-      }
-      if (this.dictionaryData.length == 3) {
-        //设备-部件-空间
-        basicParams.EquipmentTypeCode = this.dictionaryData[1]
-        basicParams.EquipmentType = this.dictionaryNames[1]
-      } else if (this.dictionaryData.length == 4) { //专业系统
-        basicParams.SpecialtyCode = this.dictionaryData[1]
-        basicParams.Specialty = this.dictionaryNames[1]
-        basicParams.SystemCode = this.dictionaryData[2]
-        basicParams.System = this.dictionaryNames[2]
-        basicParams.EquipmentTypeCode = basicParams.SystemCode //为了配置从动参取值存储
-        basicParams.EquipmentType = basicParams.System
-      }
-      let otherParams = {}
-      switch (type) {
-        case '无需处理,直接使用':
-          otherParams = {
-            // EquipmentMark: other.EquipmentMark
-          }
-          break
-        case '需自动单位转换':
-          let DataRuleContent1 = JSON.stringify([{
-            seq: 1,
-            ruletype: 'type1',
-            content: [{
-              from: other.unit[0] + '-' + other.unit[1],
-              to: this.unitObj.unit
-            }]
-          }])
-          otherParams = {
-            DataRuleContent: DataRuleContent1,
+    saveForm() {
+      let params = this.typeList.map((t, i) => {
+        let temp = this.dictionaryData[i],
+          tempNames = t.name.split('-');
+        let eachData = {
+          InfomationPointCode: temp[temp.length - 1],
+          InfomationPoint: tempNames[tempNames.length - 1],
+          DataRuleType: t.DataRuleType,
+          // DataSourceId: this.datasourceId, //数据源id
+          // PointId: this.editData.Point.Id, //点位ID
+          TypeCode: temp[0],
+          Type: tempNames[0],
+          // EquipmentMark: this.form.EquipmentMark
+        }
+        if (temp.length == 3) {
+          //设备-部件-空间
+          eachData.EquipmentTypeCode = temp[1]
+          eachData.EquipmentType = tempNames[1]
+        } else if (temp.length == 4) {
+          eachData.SpecialtyCode = temp[1]
+          eachData.Specialty = tempNames[1]
+          eachData.SystemCode = temp[2]
+          eachData.System = tempNames[2]
+          eachData.EquipmentTypeCode = eachData.SystemCode  //为了配置从动参取值存储
+          eachData.EquipmentType = eachData.System
+        }
+        let type = t.DataRuleType;
+        switch (type) {
+          case '无需处理,直接使用':
+            // otherParams = {
             // EquipmentMark: other.EquipmentMark
-          }
-          break
-        case '需按设置枚举转换':
-          let DataRuleContent2 = other.pointArr.length ?
-            JSON.stringify([{
+            // }
+            break
+          case '需自动单位转换':
+            let DataRuleContent1 = JSON.stringify([{
               seq: 1,
-              ruletype: 'type2',
-              content: other.pointArr
-            }]) :
-            undefined
-          otherParams = {
-            // EquipmentMark: other.EquipmentMark,
-            DataRuleContent: DataRuleContent2
-          }
-          break
-        case '需按公式转换':
-          let subRule = other.from ? {
-            seq: 1,
-            ruletype: 'type4',
-            content: [{
-              from: other.from,
-              to: other.to
-            }]
-          } :
-            undefined
-          let extractRule = {
-            seq: 2,
-            ruletype: 'type5',
-            content: other.extract ? [{
-              extract: 'number'
-            }] : []
-          }
-          let countRule = other.mark ? {
-            seq: 3,
-            ruletype: 'type6',
-            content: [{
-              calculationtype: other.mark,
-              value: other.markValue
-            }]
-          } :
-            undefined
-          let DataRuleContent3 = []
-          if (subRule) {
-            DataRuleContent3.push(subRule)
-          }
-          DataRuleContent3.push(extractRule)
-          if (countRule) {
-            DataRuleContent3.push(countRule)
-          }
-          DataRuleContent3 = DataRuleContent3.length ? JSON.stringify(DataRuleContent3) : undefined
-          otherParams = {
+              ruletype: 'type1',
+              content: [{
+                from: other.unit[0] + '-' + other.unit[1],
+                to: this.unitObj.unit
+              }]
+            }])
+            eachData.DataRuleContent = DataRuleContent1;
+            // otherParams = {
+            // DataRuleContent: DataRuleContent1,
+            // EquipmentMark: other.EquipmentMark
+            // }
+            break
+          case '需按设置枚举转换':
+            let DataRuleContent2 = other.pointArr.length ?
+              JSON.stringify([{
+                seq: 1,
+                ruletype: 'type2',
+                content: other.pointArr
+              }]) :
+              undefined
+            eachData.DataRuleContent = DataRuleContent2;
+            // otherParams = {
             // EquipmentMark: other.EquipmentMark,
-            DataRuleContent: DataRuleContent3
-          }
-          break
-        case '需拆分处理':
-          let SplitPoints = other.devArr.length ? other.devArr : undefined
-          let DataRuleContent4 = undefined
-          var enum5 = null
-          if (other.tranfVal) {
-            enum5 = {
-              seq: 2,
-              ruletype: 'type2',
-              content: other.pointArr
-            }
-          } else {
-            enum5 = {
-              seq: 2,
-              ruletype: 'type2',
-              content: []
-            }
-          }
-          SplitPoints.forEach(ele => {
-            let cutStr = {
+            // DataRuleContent: DataRuleContent2
+            // }
+            break
+          case '需按公式转换':
+            let subRule = other.from ? {
               seq: 1,
               ruletype: 'type4',
               content: [{
-                from: ele.SplitStart,
-                to: ele.SplitEnd
+                from: other.from,
+                to: other.to
               }]
+            } :
+              undefined
+            let extractRule = {
+              seq: 2,
+              ruletype: 'type5',
+              content: other.extract ? [{
+                extract: 'number'
+              }] : []
             }
-            ele.DataRuleContent = JSON.stringify([cutStr, enum5])
-          })
-          otherParams = {
-            SplitPoints: SplitPoints
-          }
-          break
-      }
-      this.dealType = Object.assign(basicParams, otherParams)
+            let countRule = other.mark ? {
+              seq: 3,
+              ruletype: 'type6',
+              content: [{
+                calculationtype: other.mark,
+                value: other.markValue
+              }]
+            } :
+              undefined
+            let DataRuleContent3 = []
+            if (subRule) {
+              DataRuleContent3.push(subRule)
+            }
+            DataRuleContent3.push(extractRule)
+            if (countRule) {
+              DataRuleContent3.push(countRule)
+            }
+            DataRuleContent3 = DataRuleContent3.length ? JSON.stringify(DataRuleContent3) : undefined
+            eachData.DataRuleContent = DataRuleContent3;
+            // otherParams = {
+            // EquipmentMark: other.EquipmentMark,
+            // DataRuleContent: DataRuleContent3
+            // }
+            break
+          case '需拆分处理':
+            let SplitPoints = other.devArr.length ? other.devArr : undefined
+            let DataRuleContent4 = undefined
+            var enum5 = null
+            if (other.tranfVal) {
+              enum5 = {
+                seq: 2,
+                ruletype: 'type2',
+                content: other.pointArr
+              }
+            } else {
+              enum5 = {
+                seq: 2,
+                ruletype: 'type2',
+                content: []
+              }
+            }
+            SplitPoints.forEach(ele => {
+              let cutStr = {
+                seq: 1,
+                ruletype: 'type4',
+                content: [{
+                  from: ele.SplitStart,
+                  to: ele.SplitEnd
+                }]
+              }
+              ele.DataRuleContent = JSON.stringify([cutStr, enum5])
+            })
+            eachData.SplitPoints = SplitPoints;
+            // otherParams = {
+            //   SplitPoints: SplitPoints
+            // }
+            break
+        }
+        return eachData;
+      })
+      this.dealType = params
       // this.create(params)
     },
     validateDict(rule, value, cb) {
@@ -601,10 +624,38 @@ export default {
     //对应数据字典变化
     changeDictionaryCas({ val, labels, data }) {
       this.dictionaryData = val;
-      this.dictionaryNames = labels
-      // this.infoDict = this.$refs.dictionaryCas.pointDataSource
+      this.dictionaryNames = labels;
       this.unitObj = data
-      this.InfomationPoint = this.unitObj.InfoPointName || ''
+      if (this.typeList.length) {
+        this.typeList = this.typeList.map(t => {
+          if (labels.indexOf(t.name) < 0) {
+            return undefined
+          }
+          return t;
+        }).filter(item => item)
+        let temp = this.typeList.map(t => {
+          return t.name;
+        })
+        for (let i = 0; i < labels.length; i++) {
+          if (temp.indexOf(labels[i]) < 0) {
+            this.typeList.push({
+              name: labels[i],
+              DataRuleType: '无需处理,直接使用'
+            })
+          }
+        }
+      } else {
+        this.typeList = labels.map(t => {
+          return {
+            name: t,
+            DataRuleType: '无需处理,直接使用'
+          }
+        })
+      }
+      this.typeList = this.typeList.map((t, i) => {
+        t.unitObj = data[val[i][val[i].length - 1]];
+        return t;
+      })
     },
     //分页发生更改
     changePage() {

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

@@ -41,7 +41,7 @@
       elevationData: [],
       groupWidth: {},
       checkedList: [],
-      load: true
+      load: false,
     }
   },
   computed: {

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

@@ -16,8 +16,7 @@
       </el-select>
       <!-- <el-button size="small" style='width: 80px;' @click="download" icon="iconfont icon-xiazai">下载</el-button> -->
       <el-button size="small" style='width: 80px;' @click="addDevice">添加设备</el-button>
-      <el-button size="small" @click="Batch" v-show="!onlyRead" :disabled="!(tableData && tableData.length)">批量维护信息点
-      </el-button>
+      <el-button size="small" @click="Batch" v-show="!onlyRead" :disabled="!(tableData && tableData.length)">批量维护信息点</el-button>
       <el-button size="small" style='width: 80px;' @click="reset">刷新</el-button>
       <el-button size="small" style='width: 80px;' v-show="!onlyRead" @click="undo">撤销</el-button>
     </div>

+ 30 - 3
src/components/point/dynamicdata/buildRules.vue

@@ -102,7 +102,8 @@ import {
   dynamicExecute,
   dynamicQuery,
   dynamicQueryPoint,
-  dynamicPointTypeList
+  dynamicPointTypeList,
+  buildingQuery, //数据中心建筑查询
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -198,8 +199,34 @@ export default {
       this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
-        this.loading = false;
-        this.tableData = res.Content;
+        let dyData = res.Content;
+        let tempArr = dyData.map(t => {
+          if (t.Related == 'True') {
+            t.BuildID = t.TypeCode + t.ProjectId + t.ObjectID;
+            return t.BuildID;
+          }
+          return undefined;
+        }).filter(item => item);
+        if (tempArr.length) {
+          buildingQuery({
+            PageSize: this.page.pageSize,
+            Filters: `BuildID in ${JSON.stringify(tempArr)}`
+          }, response => {
+            let Data = response.Content;
+            dyData.forEach(item => {
+              Data.forEach(t => {
+                if (t.BuildID == item.BuildID) {
+                  item.ObjectLocalName = t.BuildLocalName;
+                }
+              })
+            })
+            this.loading = false;
+            this.tableData = dyData;
+          })
+        } else {
+            this.loading = false;
+            this.tableData = dyData;
+        }
         this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
       });
     },

+ 248 - 2
src/components/point/dynamicdata/delRelationDialog.vue

@@ -76,7 +76,18 @@
   </el-dialog>
 </template>
 <script>
-import { dynamicDeleteRelation, dynamicQueryPrompt } from "@/api/scan/request";
+import {
+  dynamicDeleteRelation,
+  dynamicQueryPrompt,
+  queryEquip, //数据中心设备查询
+  floorQuery, //数据中心查询楼层
+  buildingQuery, //数据中心建筑查询
+  projectQuery, //数据中心查询项目信息
+  queryAllZone, //数据中心所有空间实例
+  queryLinkSys, //数据中心系统查询
+  queryTenant, //数据中心查询租户
+  partsQuery, //数据中心部件查询
+} from "@/api/scan/request";
 export default {
   data() {
     return {
@@ -186,7 +197,242 @@ export default {
       //通过标识查询对象实例
       let promise1 = new Promise((resolve, reject) => {
         dynamicQueryPrompt(p1, res => {
-          resolve(res)
+          let dyData = res.Content;
+          let name = this.typeName;
+          if (name == 'equip') {
+            let tempArr = dyData.map(t => {
+              if (t.Related == 'True') {
+                t.EquipID = t.TypeCode + t.ProjectId + t.ObjectID;
+                return t.EquipID;
+              }
+              return undefined;
+            }).filter(item => item);
+            if (tempArr.length) {
+              queryEquip({
+                PageSize: 500,
+                Filters: `EquipID in ${JSON.stringify(tempArr)}`,
+                Cascade: [{ Name: "zoneSpaceInBase" }, { Name: 'building' }, { Name: 'floor' }]
+              }, response => {
+                let Data = response.Content;
+                dyData.forEach(item => {
+                  Data.forEach(t => {
+                    if (t.EquipID == item.EquipID) {
+                      item.ObjectLocalName = t.EquipLocalName;
+                      item.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
+                      item.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+                      item.RoomLocalName = '';
+                      if (t.ZoneSpaceBaseIn) {
+                        t.ZoneSpaceBaseIn.forEach(it => {
+                          item.RoomLocalName += it.RoomLocalName + ',';
+                        })
+                        item.RoomLocalName = item.RoomLocalName.substring(0, item.RoomLocalName.length - 1);
+                      }
+                    }
+                  })
+                })
+                resolve(res);
+              })
+            } else {
+              resolve(res);
+            }
+          } else if (name == 'parts') {
+            let tempArr = dyData.map(t => {
+              if (t.Related == 'True') {
+                t.EquipID = t.TypeCode + t.ProjectId + t.ObjectID;
+                return t.EquipID;
+              }
+              return undefined;
+            }).filter(item => item);
+            if (tempArr.length) {
+              partsQuery({
+                PageSize: 500,
+                Filters: `EquipID in ${JSON.stringify(tempArr)}`
+              }, response => {
+                let Data = response.Content;
+                dyData.forEach(item => {
+                  Data.forEach(t => {
+                    if (t.EquipID == item.EquipID) {
+                      item.ObjectLocalName = t.EquipLocalName;
+                    }
+                  })
+                })
+                resolve(res);
+              })
+            } else {
+              resolve(res);
+            }
+          } else if (name == 'system') {
+            let tempArr = dyData.map(t => {
+              if (t.Related == 'True') {
+                t.SysID = t.TypeCode + t.ProjectId + t.ObjectID;
+                return t.SysID;
+              }
+              return undefined;
+            }).filter(item => item);
+            if (tempArr.length) {
+              queryLinkSys({
+                PageSize: 500,
+                Filters: `SysID in ${JSON.stringify(tempArr)}`
+              }, response => {
+                let Data = response.Content;
+                dyData.forEach(item => {
+                  Data.forEach(t => {
+                    if (t.SysID == item.SysID) {
+                      item.ObjectLocalName = t.SysLocalName;
+                    }
+                  })
+                })
+                resolve(res);
+              })
+            } else {
+              resolve(res);
+            }
+          } else if (name == 'space') {
+            let tempArr = dyData.map(t => {
+              if (t.Related == 'True') {
+                t.RoomID = t.TypeCode + t.ProjectId + t.ObjectID;
+                return t.RoomID;
+              }
+              return undefined;
+            }).filter(item => item);
+            if (tempArr.length) {
+              queryAllZone({
+                PageSize: 500,
+                Filters: `RoomID in ${JSON.stringify(tempArr)}`,
+                Cascade: [{ Name: 'building' }, { Name: 'floor' }],
+              }, response => {
+                let Data = response.Content;
+                dyData.forEach(item => {
+                  Data.forEach(t => {
+                    if (t.RoomID == item.RoomID) {
+                      item.ObjectLocalName = t.RoomLocalName;
+                      item.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+                      item.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
+                    }
+                  })
+                })
+                resolve(res);
+              })
+            } else {
+              resolve(res);
+            }
+          } else if (name == 'build') {
+            let tempArr = dyData.map(t => {
+              if (t.Related == 'True') {
+                t.BuildID = t.TypeCode + t.ProjectId + t.ObjectID;
+                return t.BuildID;
+              }
+              return undefined;
+            }).filter(item => item);
+            if (tempArr.length) {
+              buildingQuery({
+                PageSize: 500,
+                Filters: `BuildID in ${JSON.stringify(tempArr)}`
+              }, response => {
+                let Data = response.Content;
+                dyData.forEach(item => {
+                  Data.forEach(t => {
+                    if (t.BuildID == item.BuildID) {
+                      item.ObjectLocalName = t.BuildLocalName;
+                    }
+                  })
+                })
+                resolve(res);
+              })
+            } else {
+              this.loading = false;
+              this.tableData = dyData;
+            }
+          } else if (name == 'floor') {
+            let tempArr = dyData.map(t => {
+              if (t.Related == 'True') {
+                t.FloorID = t.TypeCode + t.ProjectId + t.ObjectID;
+                return t.FloorID;
+              }
+              return undefined;
+            }).filter(item => item);
+            if (tempArr.length) {
+              floorQuery({
+                PageSize: 500,
+                Cascade: [{ Name: 'building' }],
+                Filters: `FloorID in ${JSON.stringify(tempArr)}`
+              }, response => {
+                let Data = response.Content;
+                dyData.forEach(item => {
+                  Data.forEach(t => {
+                    if (t.FloorID == item.FloorID) {
+                      item.ObjectLocalName = t.FloorLocalName;
+                      item.ObjectSequenceID = t.FloorSequenceID;
+                      item.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+                    }
+                  })
+                })
+                resolve(res)
+              })
+            } else {
+              resolve(res)
+            }
+          } else if (name == 'tenant') {
+            let tempArr = dyData.map(t => {
+              if (t.Related == 'True') {
+                t.TenantID = t.TypeCode + t.ProjectId + t.ObjectID;
+                return t.TenantID;
+              }
+              return undefined;
+            }).filter(item => item);
+            if (tempArr.length) {
+              queryTenant({
+                PageSize: 500,
+                Cascade: [{ Name: 'zoneTenantList' }],
+                Filters: `TenantID in ${JSON.stringify(tempArr)}`
+              }, response => {
+                let Data = response.Content;
+                dyData.forEach(item => {
+                  Data.forEach(t => {
+                    if (t.TenantID == item.TenantID) {
+                      item.ObjectLocalName = t.TenantLocalName;
+                      item.RoomLocalName = '';
+                      if (t.ZoneTenantList) {
+                        t.ZoneTenantList.forEach(it => {
+                          item.RoomLocalName += it.RoomLocalName + ',';
+                        });
+                        item.RoomLocalName = item.RoomLocalName.substring(0, item.RoomLocalName.length - 1);
+                      }
+                    }
+                  })
+                })
+                resolve(res);
+              })
+            } else {
+              resolve(res);
+            }
+          } else if (name == 'project') {
+            let tempArr = dyData.map(t => {
+              if (t.Related == 'True') {
+                t.ProjID = t.TypeCode + t.ProjectId;
+                return t.ProjID;
+              }
+              return undefined;
+            }).filter(item => item);
+            if (tempArr.length) {
+              projectQuery({
+                PageSize: 500,
+                Filters: `ProjID in ${JSON.stringify(tempArr)}`
+              }, response => {
+                let Data = response.Content;
+                dyData.forEach(item => {
+                  Data.forEach(t => {
+                    if (t.ProjID == item.ProjID) {
+                      item.ObjectLocalName = t.ProjLocalName;
+                    }
+                  })
+                })
+                resolve(res)
+              })
+            } else {
+              resolve(res)
+            }
+          }
         })
       })
       let p2 = {

+ 1 - 1
src/components/point/dynamicdata/dictionaryDevice.vue

@@ -3,7 +3,7 @@
     <el-form>
       <el-form-item :label="`数据字典${typeName}类型`">
         <el-select v-model="SubTypeName" multiple collapse-tags placeholder="全部" filterable @change="changeType">
-          <el-option v-for="item in DynEquipList" :key="item" :label="item" :value="item"></el-option>
+          <el-option v-for="item in DynEquipList" :key="item.SubTypeCode" :label="item.SubTypeName" :value="item.SubTypeCode"></el-option>
         </el-select>
       </el-form-item>
     </el-form>

+ 41 - 4
src/components/point/dynamicdata/equipRules.vue

@@ -102,7 +102,8 @@ import {
   dynamicExecute,
   dynamicQuery,
   dynamicQueryPoint,
-  dynamicPointTypeList
+  dynamicPointTypeList,
+  queryEquip, //数据中心设备查询
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -187,7 +188,7 @@ export default {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        param.SubTypeCodeList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
         param.LocationFlagList = this.form.LocationFlag;
@@ -198,8 +199,44 @@ export default {
       this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
-        this.loading = false;
-        this.tableData = res.Content;
+        let dyData = res.Content;
+        let tempArr = dyData.map(t => {
+          if (t.Related == 'True') {
+            t.EquipID = t.TypeCode + t.ProjectId + t.ObjectID;
+            return t.EquipID;
+          }
+          return undefined;
+        }).filter(item => item);
+        if (tempArr.length) {
+          queryEquip({
+            PageSize: this.page.pageSize,
+            Filters: `EquipID in ${JSON.stringify(tempArr)}`,
+            Cascade: [{ Name: "zoneSpaceInBase" }, { Name: 'building' }, { Name: 'floor' }]
+          }, response => {
+            let Data = response.Content;
+            dyData.forEach(item => {
+              Data.forEach(t => {
+                if (t.EquipID == item.EquipID) {
+                  item.ObjectLocalName = t.EquipLocalName;
+                  item.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
+                  item.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+                  item.RoomLocalName = '';
+                  if (t.ZoneSpaceBaseIn) {
+                    t.ZoneSpaceBaseIn.forEach(it => {
+                      item.RoomLocalName += it.RoomLocalName + ',';
+                    })
+                    item.RoomLocalName = item.RoomLocalName.substring(0, item.RoomLocalName.length - 1);
+                  }
+                }
+              })
+            })
+            this.loading = false;
+            this.tableData = dyData;
+          })
+        } else {
+            this.loading = false;
+            this.tableData = dyData;
+        }
         this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
       });
     },

+ 33 - 3
src/components/point/dynamicdata/floorRules.vue

@@ -110,7 +110,8 @@ import {
   dynamicExecute,
   dynamicQuery,
   dynamicQueryPoint,
-  dynamicPointTypeList
+  dynamicPointTypeList,
+  floorQuery, //数据中心查询楼层
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -206,8 +207,37 @@ export default {
       this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
-        this.loading = false;
-        this.tableData = res.Content;
+        let dyData = res.Content;
+        let tempArr = dyData.map(t => {
+          if (t.Related == 'True') {
+            t.FloorID = t.TypeCode + t.ProjectId + t.ObjectID;
+            return t.FloorID;
+          }
+          return undefined;
+        }).filter(item => item);
+        if (tempArr.length) {
+          floorQuery({
+            PageSize: this.page.pageSize,
+            Cascade: [{ Name: 'building' }],
+            Filters: `FloorID in ${JSON.stringify(tempArr)}`
+          }, response => {
+            let Data = response.Content;
+            dyData.forEach(item => {
+              Data.forEach(t => {
+                if (t.FloorID == item.FloorID) {
+                  item.ObjectLocalName = t.FloorLocalName;
+                  item.ObjectSequenceID = t.FloorSequenceID;
+                  item.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+                }
+              })
+            })
+            this.loading = false;
+            this.tableData = dyData;
+          })
+        } else {
+          this.loading = false;
+          this.tableData = dyData;
+        }
         this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
       });
     },

+ 98 - 24
src/components/point/dynamicdata/locationCascader.vue

@@ -3,18 +3,80 @@
     :props="props" clearable class="location"></el-cascader>
 </template>
 <script>
-import { dynamicLocationList } from "@/api/scan/request";
+import {
+  // dynamicLocationList,
+  buildingQuery, //数据中心查询建筑
+  floorQuery, //数据中型查询楼层
+  queryDictionaryHead, //数据中心查询分区类型
+  queryAllZone, //数据中心查询所有空间
+} from "@/api/scan/request";
 import { mapGetters, mapActions } from "vuex";
 export default {
   data() {
+    const that = this;
     return {
       LocationList: [],
       value: [],
       timer: null,
       props: {
-        value: 'Name',
-        label: 'Name',
-        children: 'List'
+        lazy: this.isFloor ? false : true,
+        lazyLoad(node, resolve) {
+          console.log(node)
+          if (node.level == 1) {
+            if (node.value == 'unknowBuild') {
+              resolve()
+            } else {
+              let pa = {
+                Filters: `BuildID='${node.value}'`
+              }
+              floorQuery(pa, res => {
+                const nodes = res.Content.map(t => {
+                  t.value = t.FloorID;
+                  t.label = t.FloorLocalName;
+                  t.leaf = that.isSpace;
+                  return t;
+                })
+                nodes.unshift({ value: 'unknowFloor', label: '未明确楼层', leaf: true })
+                resolve(nodes);
+              })
+            }
+          } else if (node.level == 2) {
+            if (that.isSpace) {
+              resolve();
+            } else {
+              let pa = {
+                Filters: "parentId='Space'"
+              }
+              queryDictionaryHead(pa, res => {
+                const nodes = res.Content.map(t => {
+                  if (t.Code == 'Ispace') {
+                    return undefined;
+                  }
+                  t.value = t.Code;
+                  t.label = t.Name;
+                  return t;
+                }).filter(item => item);
+                resolve(nodes);
+              })
+            }
+          } else if (node.level == 3) {
+            let pa = {
+              PageSize: 1000,
+              Filters: `BuildingId='${node.path[0]}';FloorId='${node.path[1]}';ObjectType='${node.path[2]}'`
+            };
+            queryAllZone(pa, res => {
+              const nodes = res.Content.map(t => {
+                t.value = t.RoomID;
+                t.label = t.RoomLocalName;
+                t.leaf = true;
+                return t;
+              })
+              resolve(nodes);
+            })
+          } else {
+            resolve();
+          }
+        }
       }
     };
   },
@@ -26,6 +88,9 @@ export default {
     typeName: {},
     isFloor: {
       default: false
+    },
+    isSpace: {
+      default: false
     }
   },
   computed: {
@@ -33,26 +98,35 @@ export default {
   },
   methods: {
     init() {
-      let param = { Related: this.Related, TypeName: this.typeName };
-      dynamicLocationList(param, res => {
-        this.LocationList = res.Content[0].List;
-        //添加未明确对象
-        this.LocationList = this.delNullItems(this.LocationList)
-        this.LocationList.map(item => {
-          if (this.isFloor) {
-            delete item.List;
-          }
-          if (item.List) {
-            item.List.map(child => {
-              if (child.List) {
-                child.List.unshift({ Name: '未明确业务空间' })
-              }
-            })
-            item.List.unshift({ Name: '未明确楼层' })
-          }
-        })
-        this.LocationList.unshift({ Name: '未明确建筑' })
-      });
+      // let param = { Related: this.Related, TypeName: this.typeName };
+      // dynamicLocationList(param, res => {
+      //   this.LocationList = res.Content[0].List;
+      //   //添加未明确对象
+      //   this.LocationList = this.delNullItems(this.LocationList)
+      //   this.LocationList.map(item => {
+      //     if (this.isFloor) {
+      //       delete item.List;
+      //     }
+      //     if (item.List) {
+      //       item.List.map(child => {
+      //         if (child.List) {
+      //           child.List.unshift({ Name: '未明确业务空间' })
+      //         }
+      //       })
+      //       item.List.unshift({ Name: '未明确楼层' })
+      //     }
+      //   })
+      //   this.LocationList.unshift({ Name: '未明确建筑' })
+      // });
+      let pa = {}
+      buildingQuery(pa, res => {
+        this.LocationList = res.Content.map(item => {
+          item.value = item.BuildID;
+          item.label = item.BuildLocalName;
+          return item;
+        });
+        this.LocationList.unshift({ value: 'unknowBuild', label: '未明确建筑', leaf: true })
+      })
     },
     delNullItems(arr) {
       let tempArr = JSON.parse(JSON.stringify(arr))

+ 31 - 4
src/components/point/dynamicdata/partsRules.vue

@@ -101,7 +101,8 @@ import {
   dynamicExecute,
   dynamicQuery,
   dynamicQueryPoint,
-  dynamicPointTypeList
+  dynamicPointTypeList,
+  partsQuery, //数据中心部件查询
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -186,7 +187,7 @@ export default {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        param.SubTypeCodeList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
         param.LocationFlagList = this.form.LocationFlag;
@@ -197,8 +198,34 @@ export default {
       this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
-        this.loading = false;
-        this.tableData = res.Content;
+        let dyData = res.Content;
+        let tempArr = dyData.map(t => {
+          if (t.Related == 'True') {
+            t.EquipID = t.TypeCode + t.ProjectId + t.ObjectID;
+            return t.EquipID;
+          }
+          return undefined;
+        }).filter(item => item);
+        if (tempArr.length) {
+          partsQuery({
+            PageSize: this.page.pageSize,
+            Filters: `EquipID in ${JSON.stringify(tempArr)}`
+          }, response => {
+            let Data = response.Content;
+            dyData.forEach(item => {
+              Data.forEach(t => {
+                if (t.EquipID == item.EquipID) {
+                  item.ObjectLocalName = t.EquipLocalName;
+                }
+              })
+            })
+            this.loading = false;
+            this.tableData = dyData;
+          })
+        } else {
+          this.loading = false;
+          this.tableData = dyData;
+        }
         this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
       });
     },

+ 31 - 4
src/components/point/dynamicdata/projectRules.vue

@@ -84,7 +84,7 @@
       :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
       :total="page.total"></el-pagination>
     <!-- 清除对应关系弹窗 -->
-    <del-relation-dialog ref="del" @refresh="refresh" :typeName="'space'"></del-relation-dialog>
+    <del-relation-dialog ref="del" @refresh="refresh" :typeName="'project'"></del-relation-dialog>
   </div>
 </template>
 <script>
@@ -104,7 +104,8 @@ import {
   dynamicPointTypeList,
   dynamicPendingobjs,
   dynamicCreateRelation,
-  dynamicDeleteRelation
+  dynamicDeleteRelation,
+  projectQuery, //数据中心查询项目信息
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -203,8 +204,34 @@ export default {
       this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
-        this.loading = false;
-        this.tableData = res.Content;
+        let dyData = res.Content;
+        let tempArr = dyData.map(t => {
+          if (t.Related == 'True') {
+            t.ProjID = t.TypeCode + t.ProjectId;
+            return t.ProjID;
+          }
+          return undefined;
+        }).filter(item => item);
+        if (tempArr.length) {
+          projectQuery({
+            PageSize: this.page.pageSize,
+            Filters: `ProjID in ${JSON.stringify(tempArr)}`
+          }, response => {
+            let Data = response.Content;
+            dyData.forEach(item => {
+              Data.forEach(t => {
+                if (t.ProjID == item.ProjID) {
+                  item.ObjectLocalName = t.ProjLocalName;
+                }
+              })
+            })
+            this.loading = false;
+            this.tableData = dyData;
+          })
+        } else {
+          this.loading = false;
+          this.tableData = dyData;
+        }
         this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
       });
     },

+ 34 - 4
src/components/point/dynamicdata/spaceRules.vue

@@ -101,7 +101,8 @@ import {
   dynamicExecute,
   dynamicQuery,
   dynamicQueryPoint,
-  dynamicPointTypeList
+  dynamicPointTypeList,
+  queryAllZone, //数据中心所有空间实例
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -186,7 +187,7 @@ export default {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        param.SubTypeCodeList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
         param.LocationFlagList = this.form.LocationFlag;
@@ -197,8 +198,37 @@ export default {
       this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
-        this.loading = false;
-        this.tableData = res.Content;
+        let dyData = res.Content;
+        let tempArr = dyData.map(t => {
+          if (t.Related == 'True') {
+            t.RoomID = t.TypeCode + t.ProjectId + t.ObjectID;
+            return t.RoomID;
+          }
+          return undefined;
+        }).filter(item => item);
+        if (tempArr.length) {
+          queryAllZone({
+            PageSize: this.page.pageSize,
+            Filters: `RoomID in ${JSON.stringify(tempArr)}`,
+            Cascade: [{ Name: 'building' }, { Name: 'floor' }],
+          }, response => {
+            let Data = response.Content;
+            dyData.forEach(item => {
+              Data.forEach(t => {
+                if (t.RoomID == item.RoomID) {
+                  item.ObjectLocalName = t.RoomLocalName;
+                  item.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+                  item.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
+                }
+              })
+            })
+            this.loading = false;
+            this.tableData = dyData;
+          })
+        } else {
+          this.loading = false;
+          this.tableData = dyData;
+        }
         this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
       });
     },

+ 31 - 4
src/components/point/dynamicdata/systemRules.vue

@@ -99,7 +99,8 @@ import {
   dynamicExecute,
   dynamicQuery,
   dynamicQueryPoint,
-  dynamicPointTypeList
+  dynamicPointTypeList,
+  queryLinkSys, //数据中心系统查询
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -184,7 +185,7 @@ export default {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        param.SubTypeCodeList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
         param.LocationFlagList = this.form.LocationFlag;
@@ -195,8 +196,34 @@ export default {
       this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
-        this.loading = false;
-        this.tableData = res.Content;
+        let dyData = res.Content;
+        let tempArr = dyData.map(t => {
+          if (t.Related == 'True') {
+            t.SysID = t.TypeCode + t.ProjectId + t.ObjectID;
+            return t.SysID;
+          }
+          return undefined;
+        }).filter(item => item);
+        if (tempArr.length) {
+          queryLinkSys({
+            PageSize: this.page.pageSize,
+            Filters: `SysID in ${JSON.stringify(tempArr)}`
+          }, response => {
+            let Data = response.Content;
+            dyData.forEach(item => {
+              Data.forEach(t => {
+                if (t.SysID == item.SysID) {
+                  item.ObjectLocalName = t.SysLocalName;
+                }
+              })
+            })
+            this.loading = false;
+            this.tableData = dyData;
+          })
+        } else {
+          this.loading = false;
+          this.tableData = dyData;
+        }
         this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
       });
     },

+ 38 - 3
src/components/point/dynamicdata/tenantRules.vue

@@ -101,7 +101,8 @@ import {
   dynamicExecute,
   dynamicQuery,
   dynamicQueryPoint,
-  dynamicPointTypeList
+  dynamicPointTypeList,
+  queryTenant, //数据中心查询租户
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -197,8 +198,42 @@ export default {
       this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
-        this.loading = false;
-        this.tableData = res.Content;
+        let dyData = res.Content;
+        let tempArr = dyData.map(t => {
+          if (t.Related == 'True') {
+            t.TenantID = t.TypeCode + t.ProjectId + t.ObjectID;
+            return t.TenantID;
+          }
+          return undefined;
+        }).filter(item => item);
+        if (tempArr.length) {
+          queryTenant({
+            PageSize: this.page.pageSize,
+            Cascade: [{ Name: 'zoneTenantList' }],
+            Filters: `TenantID in ${JSON.stringify(tempArr)}`
+          }, response => {
+            let Data = response.Content;
+            dyData.forEach(item => {
+              Data.forEach(t => {
+                if (t.TenantID == item.TenantID) {
+                  item.ObjectLocalName = t.TenantLocalName;
+                  item.RoomLocalName = '';
+                  if (t.ZoneTenantList) {
+                    t.ZoneTenantList.forEach(it => {
+                      item.RoomLocalName += it.RoomLocalName + ',';
+                    });
+                    item.RoomLocalName = item.RoomLocalName.substring(0, item.RoomLocalName.length - 1);
+                  }
+                }
+              })
+            })
+            this.loading = false;
+            this.tableData = dyData;
+          })
+        } else {
+          this.loading = false;
+          this.tableData = dyData;
+        }
         this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
       });
     },

+ 100 - 33
src/components/point/report/objectInstance.vue

@@ -38,7 +38,17 @@ import { SGraphyView } from "@saga-web/graphy/lib";
 import { LocationPointScene, DivideFloorScene } from "@saga-web/cad-engine"
 import { SColor } from "@saga-web/draw/lib";
 
-import { getTabFunNumObjInstance, queryEquip, floorQuery, queryZone } from '@/api/scan/request'
+import {
+  getTabFunNumObjInstance,
+  queryEquip, //数据中心设备查询
+  floorQuery, //数据中心查询楼层
+  buildingQuery, //数据中心建筑查询
+  projectQuery, //数据中心查询项目信息
+  queryAllZone, //数据中心所有空间实例
+  queryLinkSys, //数据中心系统查询
+  queryTenant, //数据中心查询租户
+  partsQuery, //数据中心部件查询
+} from '@/api/scan/request'
 
 export default {
   data() {
@@ -49,7 +59,7 @@ export default {
       loading: true,
       refreshCanvas: '',//重载canvas组件
       drawCanvas: false,//是否画canvas,
-      canvasWidth:450
+      canvasWidth: 450
     }
   },
   methods: {
@@ -68,13 +78,11 @@ export default {
           //存在实例ID
           if (item.ObjectID) {
             that.forms[key].instanceId = item.ObjectID;
-            //设备或者组件
-            if (item.TypeCode == 'Eq' || item.TypeCode == 'Ec') {
-              let pa = {
-                Filters: `EquipID='${item.TypeCode + this.projectId.substring(2) + item.ObjectID}'`
-              }
+            if (item.TypeCode == 'Eq') {
               //获取设备信息
-              queryEquip(pa, equipMsg => {
+              queryEquip({
+                Filters: `EquipID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
+              }, equipMsg => {
                 if (equipMsg.Content[0] && equipMsg.Content[0].LocationJson && equipMsg.Content[0].FloorId) {
                   let canvasOption = {
                     /** 标记的id  */
@@ -86,34 +94,93 @@ export default {
                     /** Y坐标 */
                     Y: -equipMsg.Content[0].LocationJson.Y
                   }
+                  that.forms[key].ObjectLocalName = res.Content[0].EquipLocalName
+                  that.forms[key].ObjectLocalCode = res.Content[0].EquipLocalID
                   this.loadDataToInstanceByFloorID(equipMsg.Content[0].FloorId, key, item.TypeCode, canvasOption);
                 }
               })
-            }
-            //空间
-            else if (item.TypeCode == 'Sp') {
-              if(item.SubTypeCode){
-                let pa = {
-                  data: {
-                    Filters: `RoomID='${item.TypeCode + this.projectId.substring(2) + item.ObjectID}'`
-                  },
-                  zone: item.SubTypeCode
+            } else if (item.TypeCode == 'Sp') {
+              //获取空间信息
+              queryAllZone({
+                Filters: `RoomID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
+              }, zoneMsg => {
+                if (zoneMsg.Content[0] && zoneMsg.Content[0].Outline) {
+                  let canvasOption = {
+                    RoomLocalName: zoneMsg.Content[0].RoomLocalName,
+                    OutLine: zoneMsg.Content[0].Outline,
+                    RoomID: zoneMsg.Content[0].RoomID,
+                    Color: '#F9C3C3'
+                  }
+                  that.forms[key].ObjectLocalName = res.Content[0].RoomLocalName
+                  that.forms[key].ObjectLocalCode = res.Content[0].RoomLocalID
+                  this.loadDataToInstanceByFloorID(zoneMsg.Content[0].FloorId, key, item.TypeCode, canvasOption);
                 }
-                //获取空间信息
-                queryZone(pa, zoneMsg => {
-                  if (zoneMsg.Content[0] && zoneMsg.Content[0].Outline) {
-                    let canvasOption = {
-                      RoomLocalName: zoneMsg.Content[0].RoomLocalName,
-                      OutLine: zoneMsg.Content[0].Outline,
-                      RoomID: zoneMsg.Content[0].RoomID,
-                      Color: new SColor('#F9C3C3')
-                    }
-                    this.loadDataToInstanceByFloorID(zoneMsg.Content[0].FloorId, key, item.TypeCode, canvasOption);
+              });
+            } else if (item.TypeCode == 'Ec') {
+              partsQuery({
+                Filters: `EquipID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
+              }, equipMsg => {
+                if (equipMsg.Content[0] && equipMsg.Content[0].LocationJson && equipMsg.Content[0].FloorId) {
+                  let canvasOption = {
+                    /** 标记的id  */
+                    Id: equipMsg.Content[0].EquipID,
+                    /** 标记的名称  */
+                    Name: equipMsg.Content[0].EquipName,
+                    /** X坐标 */
+                    X: equipMsg.Content[0].LocationJson.X,
+                    /** Y坐标 */
+                    Y: -equipMsg.Content[0].LocationJson.Y
                   }
-                });
-              } else {
-                this.$message.error('缺少空间分区类型字段!')
-              }
+                  that.forms[key].ObjectLocalName = res.Content[0].EquipLocalName
+                  that.forms[key].ObjectLocalCode = res.Content[0].EquipLocalID
+                  this.loadDataToInstanceByFloorID(equipMsg.Content[0].FloorId, key, item.TypeCode, canvasOption);
+                }
+              })
+            } else if (item.TypeCode == 'Sy') {
+              queryLinkSys({
+                Filters: `SysID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
+              }, res => {
+                if (res.Content.length) {
+                  that.forms[key].ObjectLocalName = res.Content[0].SysLocalName
+                  that.forms[key].ObjectLocalCode = res.Content[0].SysLocalID
+                }
+              })
+            } else if (item.TypeCode == 'Bd') {
+              buildingQuery({
+                Filters: `BuildID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
+              }, res => {
+                if (res.Content.length) {
+                  that.forms[key].ObjectLocalName = res.Content[0].BuildLocalName
+                  that.forms[key].ObjectLocalCode = res.Content[0].BuildLocalID
+                }
+              })
+            } else if (item.TypeCode == 'Fl') {
+              floorQuery({
+                Filters: `FloorID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
+              }, res => {
+                if (res.Content.length) {
+                  that.forms[key].ObjectLocalName = res.Content[0].FloorLocalName
+                  that.forms[key].ObjectLocalCode = res.Content[0].FloorLocalID
+                }
+              })
+            } else if (item.TypeCode == 'VOTn') {
+              queryTenant({
+                Filters: `TenantID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
+              }, res => {
+                if (res.Content.length) {
+                  that.forms[key].ObjectLocalName = res.Content[0].TenantLocalName
+                  that.forms[key].ObjectLocalCode = res.Content[0].TenantLocalID
+                }
+              })
+            } else if (item.TypeCode == 'Pj') {
+              projectQuery({
+                Filters: `ProjID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
+              }, res => {
+                if (res.Content.length) {
+                  that.forms[key].ObjectLocalName = res.Content[0].ProjLocalName
+                  that.forms[key].ObjectLocalCode = res.Content[0].ProjLocalID
+                }
+              })
             }
           }
         });
@@ -156,7 +223,7 @@ export default {
             that.views[key].fitSceneToView();
           })
         }
-        else{
+        else {
           that.drawCanvas = false;
         }
       });
@@ -192,7 +259,7 @@ export default {
 }
 .obj-item {
   margin: 15px 10px;
-  box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.2);
+  box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.2);
   background-color: white;
   padding: 10px 10px;
   height: 600px;

+ 3 - 0
src/main.js

@@ -23,6 +23,9 @@ import './utils/scan/directive' //自定义指令
 import componentsPlugin from '@/framework/plugins/components'
 Vue.use(componentsPlugin)
 
+import elCascaderMulti from "el-cascader-multi";
+Vue.use(elCascaderMulti); //级联多选
+
 Vue.config.productionTip = false
 Vue.config.devtools = true;
 /* eslint-disable no-new */

+ 5 - 1
src/views/point/config_point/edit_origin/index.vue

@@ -31,6 +31,9 @@
                 <el-form-item label="属性详情" v-if="formData.ProtocolType == 'common'">
                     <el-input type="textarea" :autosize="{ minRows: 8, maxRows: 8}" v-model="ProtocolInfo"  placeholder="请输入json格式数据" style="display:inline-block;width:400px;"> </el-input>
                 </el-form-item>
+                <el-form-item label="采集间隔时间">
+                    <el-input-number v-model="formData.CollectInterval" controls-position="right" @change="handleChange" :min="10"></el-input-number>s
+                </el-form-item>
             </el-form>
         </div>
     </div>
@@ -68,7 +71,8 @@
                         Password: "", //密码
                         ProgId: "", //progId
                     },
-                    Description: ""
+                    Description: "",
+                    CollectInterval: 10
                 },
                 ProtocolInfo:"",//自定义协议信息
                 options: [{

+ 18 - 11
src/views/point/config_point/steps/step3.vue

@@ -160,17 +160,24 @@
                     let content = res.Content.map(item => {
                         if (item.RelationList.length) {
                             item.Point.DataRuleType = item.RelationList[0].DataRuleType
-                            item.Point.PhysicalRelated = item.RelationList[0].Type
-                            //设备-部件-空间
-                            if(item.RelationList[0].TypeCode == 'Eq' || item.RelationList[0].TypeCode == 'Ec' || item.RelationList[0].TypeCode == 'Sp'){
-                                item.Point.PhysicalRelated += '-' + item.RelationList[0].EquipmentType
-                            }
-                            //系统
-                            if(item.RelationList[0].TypeCode == 'Sy'){
-                                item.Point.PhysicalRelated += '-' + item.RelationList[0].Specialty
-                                item.Point.PhysicalRelated += '-' + item.RelationList[0].System
-                            }
-                            item.Point.PhysicalRelated += '-' + item.RelationList[0].InfomationPoint
+                            item.Point.PhysicalRelated = '';
+                            item.RelationList.forEach(t => {
+                                if (item.Point.PhysicalRelated) {
+                                    item.Point.PhysicalRelated += '/' + t.Type;
+                                } else {
+                                    item.Point.PhysicalRelated = t.Type;
+                                }
+                                //设备-部件-空间
+                                if(t.TypeCode == 'Eq' || t.TypeCode == 'Ec' || t.TypeCode == 'Sp'){
+                                    item.Point.PhysicalRelated += '-' + t.EquipmentType
+                                }
+                                //系统
+                                if(t.TypeCode == 'Sy'){
+                                    item.Point.PhysicalRelated += '-' + t.Specialty
+                                    item.Point.PhysicalRelated += '-' + t.System
+                                }
+                                item.Point.PhysicalRelated += '-' + t.InfomationPoint
+                            })
                         }
                         return item
                     })

+ 39 - 36
src/views/point/dynamicdata/addRelation/buildRela/index.vue

@@ -155,12 +155,14 @@ import dataSource from "@/components/point/dynamicdata/dataSource";
 import locationFlag from "@/components/point/dynamicdata/locationFlag";
 import { mapGetters, mapActions } from "vuex";
 import {
-  dynamicPendingobjs,
+  // dynamicPendingobjs,
   dynamicPendingPoint,
   dynamicCreateRelation,
   dynamicDeleteRelation,
   dynamicPointTypeList,
-  dynamicQueryAI
+  dynamicQueryAI,
+  buildingQuery, //数据中心建筑查询
+  dynamicRelatedObj
 } from "@/api/scan/request";
 export default {
   components: {
@@ -389,46 +391,40 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
+        Filters: 'not BuildID isNull'
       };
       //处理查询条件
       if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
-        param.ObjectLocalName = this.form.ObjectLocalName;
-      }
-      if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
-      }
-      if (this.form.locationVal.length > 0) {
-        param.BuildLocalName = this.form.locationVal[0];
-      }
-      if (this.form.locationVal.length > 1) {
-        param.FloorLocalName = this.form.locationVal[1];
-      }
-      if (this.form.locationVal.length > 2) {
-        param.SpaceType = this.form.locationVal[2];
-      }
-      if (this.form.locationVal.length > 3) {
-        param.RoomLocalName = this.form.locationVal[3];
-      }
-      if (!this.form.locationVal.length) {
-        delete param.BuildLocalName
-        delete param.FloorLocalName
-        delete param.SpaceType
-        delete param.RoomLocalName
+        pa.Filters += `;BuildLocalName contain '${this.form.ObjectLocalName}'`;
       }
       this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
-        if (this.rPage.pageNumber == 1) {
-          this.RtableData = res.Content;
-        } else {
-          this.RtableData = this.RtableData.concat(res.Content);
-        }
-        this.rTableLoading = false;
-      });
+      dynamicRelatedObj({ Filters: `TypeName='${this.typeName}'` },
+        response => {
+          const tempArr = response.Content.map(t => {
+            return t.TypeCode + t.ProjectId + t.ObjectID
+          })
+          if (tempArr.length) {
+            pa.Filters += `;not BuildID in ${JSON.stringify(tempArr)}`
+          }
+          buildingQuery(pa, res => {
+            this.rPage.total = res.Total;
+            let tempArr = res.Content.map(t => {
+              t.ObjectID = t.BuildID.substr(12);
+              t.ObjectLocalName = t.BuildLocalName;
+              t.ObjectLocalCode = t.BuildLocalID;
+              return t;
+            });
+            if (this.rPage.pageNumber == 1) {
+              this.RtableData = tempArr;
+            } else {
+              this.RtableData = this.RtableData.concat(tempArr);
+            }
+            this.rTableLoading = false;
+          });
+        })
     },
     //清除对应关系成功
     deleteSuc() {
@@ -529,7 +525,14 @@ export default {
           let param = []
           n.map(item => {
             param.push({
-              Objs: [item],
+              Objs: [{
+                ObjectID: item.ObjectID,
+                TypeCode: 'Bd',
+                ProjectId: item.ProjectID.substring(2),
+                ObjectLocalCode: item.ObjectLocalCode,
+                ObjectLocalName: item.ObjectLocalName,
+                SubTypeCode: 'null'
+              }],
               Top: 3,
               Proximity: 0.5
             })

+ 68 - 25
src/views/point/dynamicdata/addRelation/equipRela/index.vue

@@ -155,12 +155,15 @@ import dataSource from "@/components/point/dynamicdata/dataSource";
 import locationFlag from "@/components/point/dynamicdata/locationFlag";
 import { mapGetters, mapActions } from "vuex";
 import {
-  dynamicPendingobjs,
+  // dynamicPendingobjs,
   dynamicPendingPoint,
   dynamicCreateRelation,
   dynamicDeleteRelation,
   dynamicPointTypeList,
-  dynamicQueryAI
+  dynamicQueryAI,
+  queryEquip, //数据中心设备查询
+  dynamicRelatedObj,
+  dynamicEquipQuery
 } from "@/api/scan/request";
 export default {
   components: {
@@ -368,7 +371,7 @@ export default {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        param.SubTypeCodeList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
         param.LocationFlagList = this.form.LocationFlag;
@@ -389,46 +392,79 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
+        Filters: 'not EquipID isNull',
+        Cascade: [{ Name: "zoneSpaceInBase" }, { Name: 'building' }, { Name: 'floor' }, { Name: 'equipCategory' }]
       };
       //处理查询条件
       if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
-        param.ObjectLocalName = this.form.ObjectLocalName;
+        pa.Filters += `;EquipLocalName contain "${this.form.ObjectLocalName}"`;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        pa.Filters += `;Category in ${JSON.stringify(this.form.SubTypeName)}`;
       }
       if (this.form.locationVal.length > 0) {
-        param.BuildLocalName = this.form.locationVal[0];
+        if (this.form.locationVal[0] == 'unknowBuild') {
+          pa.Filters += `;BuildingId isNull`;
+        } else {
+          pa.Filters += `;BuildingId='${this.form.locationVal[0]}'`;
+        }
       }
       if (this.form.locationVal.length > 1) {
-        param.FloorLocalName = this.form.locationVal[1];
+        if (this.form.locationVal[1] == 'unknowFloor') {
+          pa.Filters += `;FloorId isNull`;
+        } else {
+          pa.Filters += `;FloorId='${this.form.locationVal[1]}'`;
+        }
       }
       if (this.form.locationVal.length > 2) {
-        param.SpaceType = this.form.locationVal[2];
+        pa.ZoneType = this.form.locationVal[2];
       }
       if (this.form.locationVal.length > 3) {
-        param.RoomLocalName = this.form.locationVal[3];
+        pa.ZoneId = this.form.locationVal[3];
       }
-      if (!this.form.locationVal.length) {
-        delete param.BuildLocalName
-        delete param.FloorLocalName
-        delete param.SpaceType
-        delete param.RoomLocalName
+      let pa2 = {
+        Filters: `TypeName='${this.typeName}'`
+      }
+      if (this.form.SubTypeName.length) {
+        pa2.Filters += `;SubTypeCode in ${JSON.stringify(this.form.SubTypeName)}`
       }
       this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
-        if (this.rPage.pageNumber == 1) {
-          this.RtableData = res.Content;
-        } else {
-          this.RtableData = this.RtableData.concat(res.Content);
+      dynamicRelatedObj(pa2, response => {
+        const tempArr = response.Content.map(t => {
+          return t.TypeCode + t.ProjectId + t.ObjectID
+        })
+        if (tempArr.length) {
+          pa.Filters += `;not EquipID in ${JSON.stringify(tempArr)}`
         }
-        this.rTableLoading = false;
-      });
+        dynamicEquipQuery(pa, res => {
+          this.rPage.total = res.Total;
+          let tempArr = res.Content.map(t => {
+            t.ObjectID = t.EquipID.substr(12);
+            t.ObjectLocalName = t.EquipLocalName;
+            t.ObjectLocalCode = t.EquipLocalID;
+            t.SubTypeName = t.EquipCategory ? t.EquipCategory.EquipName : '';
+            t.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+            t.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
+            t.RoomLocalName = '';
+            if (t.ZoneSpaceBaseIn) {
+              t.ZoneSpaceBaseIn.forEach(item => {
+                t.RoomLocalName += item.RoomLocalName + ',';
+              })
+              t.RoomLocalName = t.RoomLocalName.substring(0, t.RoomLocalName.length - 1);
+            }
+            return t;
+          });
+          if (this.rPage.pageNumber == 1) {
+            this.RtableData = tempArr;
+          } else {
+            this.RtableData = this.RtableData.concat(tempArr);
+          }
+          this.rTableLoading = false;
+        });
+      })
     },
     //清除对应关系成功
     deleteSuc() {
@@ -529,7 +565,14 @@ export default {
           let param = []
           n.map(item => {
             param.push({
-              Objs: [item],
+              Objs: [{
+                ObjectID: item.ObjectID,
+                TypeCode: 'Eq',
+                ProjectId: item.ProjectId.substring(2),
+                ObjectLocalCode: item.ObjectLocalCode,
+                ObjectLocalName: item.ObjectLocalName,
+                SubTypeCode: item.Category
+              }],
               Top: 3,
               Proximity: 0.5
             })

+ 50 - 39
src/views/point/dynamicdata/addRelation/floorRela/index.vue

@@ -106,10 +106,8 @@
               <el-table-column prop="ObjectLocalCode" :label="`${typeName}本地编码`" show-overflow-tooltip></el-table-column>
               <el-table-column :label="`${typeName}顺序号`" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <el-tooltip :content="(scope.row.ObjectSequenceID&&scope.row.ObjectSequenceID!='null')?scope.row.ObjectSequenceID:''"
-                    placement="top">
-                    <div class="tool-tip">
-                      {{(scope.row.ObjectSequenceID&&scope.row.ObjectSequenceID!='null')?scope.row.ObjectSequenceID:''}}</div>
+                  <el-tooltip :content="scope.row.ObjectSequenceID+''" placement="top">
+                    <div class="tool-tip">{{scope.row.ObjectSequenceID+''}}</div>
                   </el-tooltip>
                 </template>
               </el-table-column>
@@ -167,7 +165,9 @@ import {
   dynamicCreateRelation,
   dynamicDeleteRelation,
   dynamicPointTypeList,
-  dynamicQueryAI
+  dynamicQueryAI,
+  floorQuery, //数据中心查询楼层
+  dynamicRelatedObj
 } from "@/api/scan/request";
 export default {
   components: {
@@ -396,46 +396,50 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
+        Cascade: [{ Name: 'building' }],
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
-      };
+        Filters: `not FloorID isNull`
+      }
       //处理查询条件
       if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
-        param.ObjectLocalName = this.form.ObjectLocalName;
-      }
-      if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
-      }
-      if (this.form.locationVal.length > 0) {
-        param.BuildLocalName = this.form.locationVal[0];
-      }
-      if (this.form.locationVal.length > 1) {
-        param.FloorLocalName = this.form.locationVal[1];
+        pa.Filters += `;FloorLocalName contain '${this.form.ObjectLocalName}'`;
       }
-      if (this.form.locationVal.length > 2) {
-        param.SpaceType = this.form.locationVal[2];
-      }
-      if (this.form.locationVal.length > 3) {
-        param.RoomLocalName = this.form.locationVal[3];
-      }
-      if (!this.form.locationVal.length) {
-        delete param.BuildLocalName
-        delete param.FloorLocalName
-        delete param.SpaceType
-        delete param.RoomLocalName
-      }
-      this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
-        if (this.rPage.pageNumber == 1) {
-          this.RtableData = res.Content;
+      if (this.form.locationVal.length) {
+        if (this.form.locationVal[0] != 'unknowBuild') {
+          pa.Filters += `;BuildID='${this.form.locationVal[0]}'`;
         } else {
-          this.RtableData = this.RtableData.concat(res.Content);
+          pa.Filters += `;BuildID isNull`;
         }
-        this.rTableLoading = false;
-      });
+      }
+      this.rTableLoading = true;
+      dynamicRelatedObj({ Filters: `TypeName='${this.typeName}'` },
+        response => {
+          const tempArr = response.Content.map(t => {
+            return t.TypeCode + t.ProjectId + t.ObjectID
+          })
+          if (tempArr.length) {
+            pa.Filters += `;not FloorID in ${JSON.stringify(tempArr)}`
+          }
+          floorQuery(pa, res => {
+            this.rPage.total = res.Total;
+            let tempArr = res.Content.map(t => {
+              t.ObjectID = t.FloorID.substr(12);
+              t.ObjectLocalName = t.FloorLocalName;
+              t.ObjectLocalCode = t.FloorLocalID;
+              t.ObjectSequenceID = t.FloorSequenceID;
+              t.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+              return t;
+            });
+            if (this.rPage.pageNumber == 1) {
+              this.RtableData = tempArr;
+            } else {
+              this.RtableData = this.RtableData.concat(tempArr);
+            }
+            this.rTableLoading = false;
+          })
+        })
     },
     //清除对应关系成功
     deleteSuc() {
@@ -536,7 +540,14 @@ export default {
           let param = []
           n.map(item => {
             param.push({
-              Objs: [item],
+              Objs: [{
+                ObjectID: item.ObjectID,
+                TypeCode: 'Fl',
+                ProjectId: item.ProjectID.substring(2),
+                ObjectLocalCode: item.ObjectLocalCode,
+                ObjectLocalName: item.ObjectLocalName,
+                SubTypeCode: 'null'
+              }],
               Top: 3,
               Proximity: 0.5
             })

+ 69 - 25
src/views/point/dynamicdata/addRelation/partsRela/index.vue

@@ -156,12 +156,15 @@ import dataSource from "@/components/point/dynamicdata/dataSource";
 import locationFlag from "@/components/point/dynamicdata/locationFlag";
 import { mapGetters, mapActions } from "vuex";
 import {
-  dynamicPendingobjs,
+  // dynamicPendingobjs,
   dynamicPendingPoint,
   dynamicCreateRelation,
   dynamicDeleteRelation,
   dynamicPointTypeList,
-  dynamicQueryAI
+  dynamicQueryAI,
+  dynamicRelatedObj,
+  partsQuery, //数据中心部件查询
+  dynamicPartQuery
 } from "@/api/scan/request";
 export default {
   components: {
@@ -369,7 +372,7 @@ export default {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        param.SubTypeCodeList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
         param.LocationFlagList = this.form.LocationFlag;
@@ -390,46 +393,80 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
+        Filters: 'not EquipID isNull',
+        Cascade: [{ Name: "zoneSpaceInBase" }, { Name: 'building' }, { Name: 'floor' }, { Name: 'equipCategory' }, { Name: 'belongedEquipment' }]
       };
       //处理查询条件
       if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
-        param.ObjectLocalName = this.form.ObjectLocalName;
+        pa.Filters += `;EquipLocalName contain "${this.form.ObjectLocalName}"`;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        pa.Filters += `;Category in ${JSON.stringify(this.form.SubTypeName)}`;
       }
       if (this.form.locationVal.length > 0) {
-        param.BuildLocalName = this.form.locationVal[0];
+        if (this.form.locationVal[0] == 'unknowBuild') {
+          pa.Filters += `;BuildingId isNull`;
+        } else {
+          pa.Filters += `;BuildingId='${this.form.locationVal[0]}'`;
+        }
       }
       if (this.form.locationVal.length > 1) {
-        param.FloorLocalName = this.form.locationVal[1];
+        if (this.form.locationVal[1] == 'unknowFloor') {
+          pa.Filters += `;FloorId isNull`;
+        } else {
+          pa.Filters += `;FloorId='${this.form.locationVal[1]}'`;
+        }
       }
       if (this.form.locationVal.length > 2) {
-        param.SpaceType = this.form.locationVal[2];
+        pa.ZoneType = this.form.locationVal[2];
       }
       if (this.form.locationVal.length > 3) {
-        param.RoomLocalName = this.form.locationVal[3];
+        pa.ZoneId = this.form.locationVal[3];
       }
-      if (!this.form.locationVal.length) {
-        delete param.BuildLocalName
-        delete param.FloorLocalName
-        delete param.SpaceType
-        delete param.RoomLocalName
+      let pa2 = {
+        Filters: `TypeName='${this.typeName}'`
+      }
+      if (this.form.SubTypeName.length) {
+        pa2.Filters += `;SubTypeCode in ${JSON.stringify(this.form.SubTypeName)}`
       }
       this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
-        if (this.rPage.pageNumber == 1) {
-          this.RtableData = res.Content;
-        } else {
-          this.RtableData = this.RtableData.concat(res.Content);
+      dynamicRelatedObj(pa2, response => {
+        const tempArr = response.Content.map(t => {
+          return t.TypeCode + t.ProjectId + t.ObjectID
+        })
+        if (tempArr.length) {
+          pa.Filters += `;not EquipID in ${JSON.stringify(tempArr)}`
         }
-        this.rTableLoading = false;
-      });
+        dynamicPartQuery(pa, res => {
+          this.rPage.total = res.Total;
+          let tempArr = res.Content.map(t => {
+            t.ObjectID = t.EquipID.substr(12);
+            t.ObjectLocalName = t.EquipLocalName;
+            t.ObjectLocalCode = t.EquipLocalID;
+            t.SubTypeName = t.EquipCategory ? t.EquipCategory.EquipName : '';
+            t.CascadeEquipLocalName = t.BelongedEquipment ? t.BelongedEquipment.EquipLocalName : '';
+            t.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+            t.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
+            t.RoomLocalName = '';
+            if (t.ZoneSpaceInBase) {
+              t.ZoneSpaceInBase.forEach(item => {
+                t.RoomLocalName += item.RoomLocalName + ',';
+              })
+              t.RoomLocalName = t.RoomLocalName.substring(0, t.RoomLocalName.length - 1);
+            }
+            return t;
+          });
+          if (this.rPage.pageNumber == 1) {
+            this.RtableData = tempArr;
+          } else {
+            this.RtableData = this.RtableData.concat(tempArr);
+          }
+          this.rTableLoading = false;
+        });
+      })
     },
     //清除对应关系成功
     deleteSuc() {
@@ -530,7 +567,14 @@ export default {
           let param = []
           n.map(item => {
             param.push({
-              Objs: [item],
+              Objs: [{
+                ObjectID: item.ObjectID,
+                TypeCode: 'Ec',
+                ProjectId: item.ProjectId.substring(2),
+                ObjectLocalCode: item.ObjectLocalCode,
+                ObjectLocalName: item.ObjectLocalName,
+                SubTypeCode: item.Category
+              }],
               Top: 3,
               Proximity: 0.5
             })

+ 31 - 36
src/views/point/dynamicdata/addRelation/projectRela/index.vue

@@ -9,8 +9,8 @@
         </div> -->
       </el-col>
       <el-col :span="12" class="text-right">
-        <el-switch @change="changeType" v-model="isSwitch"></el-switch>
-        <span style="padding:0 5px;">AI辅助</span>
+        <!-- <el-switch @change="changeType" v-model="isSwitch"></el-switch>
+        <span style="padding:0 5px;">AI辅助</span> -->
         <el-button size="medium" @click="showHistory" class="ani-his-plus">
           本次对应记录 {{num}}
           <span v-if="showPlus" :class="{'plusOne':true,'startAni':showPlus}">+1</span>
@@ -156,12 +156,14 @@ import dataSource from "@/components/point/dynamicdata/dataSource";
 import locationFlag from "@/components/point/dynamicdata/locationFlag";
 import { mapGetters, mapActions } from "vuex";
 import {
-  dynamicPendingobjs,
+  // dynamicPendingobjs,
   dynamicPendingPoint,
   dynamicCreateRelation,
   dynamicDeleteRelation,
   dynamicPointTypeList,
-  dynamicQueryAI
+  dynamicQueryAI,
+  projectQuery, //数据中心查询项目信息
+  dynamicRelatedObj
 } from "@/api/scan/request";
 export default {
   components: {
@@ -390,46 +392,39 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
+        Filters: 'not ProjID isNull'
       };
       //处理查询条件
       if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
-        param.ObjectLocalName = this.form.ObjectLocalName;
-      }
-      if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
-      }
-      if (this.form.locationVal.length > 0) {
-        param.BuildLocalName = this.form.locationVal[0];
-      }
-      if (this.form.locationVal.length > 1) {
-        param.FloorLocalName = this.form.locationVal[1];
-      }
-      if (this.form.locationVal.length > 2) {
-        param.SpaceType = this.form.locationVal[2];
-      }
-      if (this.form.locationVal.length > 3) {
-        param.RoomLocalName = this.form.locationVal[3];
-      }
-      if (!this.form.locationVal.length) {
-        delete param.BuildLocalName
-        delete param.FloorLocalName
-        delete param.SpaceType
-        delete param.RoomLocalName
+        pa.Filters += `;ProjLocalName contain '${this.form.ObjectLocalName}'`;
       }
       this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
-        if (this.rPage.pageNumber == 1) {
-          this.RtableData = res.Content;
-        } else {
-          this.RtableData = this.RtableData.concat(res.Content);
+      dynamicRelatedObj({ Filters: `TypeName='${this.typeName}'` }, response => {
+        const tempArr = response.Content.map(t => {
+          return t.TypeCode + t.ProjectId + t.ObjectID
+        })
+        if (tempArr.length) {
+          pa.Filters += `;not ProjID in ${JSON.stringify(tempArr)}`
         }
-        this.rTableLoading = false;
-      });
+        projectQuery(pa, res => {
+          this.rPage.total = res.Total;
+          let tempArr = res.Content.map(t => {
+            t.ObjectID = t.ProjID.substr(2);
+            t.ObjectLocalName = t.ProjLocalName;
+            t.ObjectLocalCode = t.ProjLocalID;
+            return t;
+          });
+          if (this.rPage.pageNumber == 1) {
+            this.RtableData = tempArr;
+          } else {
+            this.RtableData = this.RtableData.concat(tempArr);
+          }
+          this.rTableLoading = false;
+        });
+      })
     },
     //清除对应关系成功
     deleteSuc() {

+ 52 - 31
src/views/point/dynamicdata/addRelation/spaceRela/index.vue

@@ -91,7 +91,7 @@
           </div>
           <div class="query-item">
             <label>所在位置</label>
-            <location-cas @change="changeLocation" :Related="false" :typeName="typeName"></location-cas>
+            <location-cas @change="changeLocation" :Related="false" :typeName="typeName" :isSpace="true"></location-cas>
           </div>
         </div>
         <!-- 右侧列表 -->
@@ -156,12 +156,14 @@ import dataSource from "@/components/point/dynamicdata/dataSource";
 import locationFlag from "@/components/point/dynamicdata/locationFlag";
 import { mapGetters, mapActions } from "vuex";
 import {
-  dynamicPendingobjs,
+  // dynamicPendingobjs,
   dynamicPendingPoint,
   dynamicCreateRelation,
   dynamicDeleteRelation,
   dynamicPointTypeList,
-  dynamicQueryAI
+  dynamicQueryAI,
+  queryAllZone, //数据中心所有空间实例
+  dynamicRelatedObj, //动参-查询已关联实例
 } from "@/api/scan/request";
 export default {
   components: {
@@ -369,7 +371,7 @@ export default {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        param.SubTypeCodeList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
         param.LocationFlagList = this.form.LocationFlag;
@@ -390,46 +392,58 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
+        Cascade: [{ Name: 'building' }, { Name: 'floor' }, { Name: 'zoneName' }],
+        Filters: 'not RoomID isNull'
       };
       //处理查询条件
-      if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
-        param.ObjectLocalName = this.form.ObjectLocalName;
-      }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        pa.Filters += `;ObjectType in ${JSON.stringify(this.form.SubTypeName)}`
+      }
+      if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
+        pa.Filters += `;RoomLocalName contain "${this.form.ObjectLocalName}"`;
       }
       if (this.form.locationVal.length > 0) {
-        param.BuildLocalName = this.form.locationVal[0];
+        pa.Filters += `;BuildingId="${this.form.locationVal[0]}"`;
       }
       if (this.form.locationVal.length > 1) {
-        param.FloorLocalName = this.form.locationVal[1];
-      }
-      if (this.form.locationVal.length > 2) {
-        param.SpaceType = this.form.locationVal[2];
+        pa.Filters += `;FloorId="${this.form.locationVal[1]}"`;
       }
-      if (this.form.locationVal.length > 3) {
-        param.RoomLocalName = this.form.locationVal[3];
+      let pa2 = {
+        Filters: `TypeName='${this.typeName}'`
       }
-      if (!this.form.locationVal.length) {
-        delete param.BuildLocalName
-        delete param.FloorLocalName
-        delete param.SpaceType
-        delete param.RoomLocalName
+      if (this.form.SubTypeName.length) {
+        pa2.Filters += `;SubTypeCode in ${JSON.stringify(this.form.SubTypeName)}`
       }
       this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
-        if (this.rPage.pageNumber == 1) {
-          this.RtableData = res.Content;
-        } else {
-          this.RtableData = this.RtableData.concat(res.Content);
+      dynamicRelatedObj(pa2, response => {
+        const tempArr = response.Content.map(t => {
+          return t.TypeCode + t.ProjectId + t.ObjectID
+        })
+        if (tempArr.length) {
+          pa.Filters += `;not RoomID in ${JSON.stringify(tempArr)}`
         }
-        this.rTableLoading = false;
-      });
+        queryAllZone(pa, res => {
+          this.rPage.total = res.Total;
+          let tempArr = res.Content.map(t => {
+            t.ObjectID = t.RoomID.substr(12);
+            t.ObjectLocalName = t.RoomLocalName;
+            t.ObjectLocalCode = t.RoomLocalID;
+            t.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
+            t.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
+            t.SubTypeName = t.DClassDef ? t.DClassDef.Name : '';
+            return t;
+          });
+          if (this.rPage.pageNumber == 1) {
+            this.RtableData = tempArr;
+          } else {
+            this.RtableData = this.RtableData.concat(tempArr);
+          }
+          this.rTableLoading = false;
+        });
+      })
     },
     //清除对应关系成功
     deleteSuc() {
@@ -530,7 +544,14 @@ export default {
           let param = []
           n.map(item => {
             param.push({
-              Objs: [item],
+              Objs: [{
+                ObjectID: item.ObjectID,
+                TypeCode: 'Sp',
+                ProjectId: item.ProjectId.substring(2),
+                ObjectLocalCode: item.ObjectLocalCode,
+                ObjectLocalName: item.ObjectLocalName,
+                SubTypeCode: item.ObjectType
+              }],
               Top: 3,
               Proximity: 0.5
             })

+ 34 - 33
src/views/point/dynamicdata/addRelation/systemRela/index.vue

@@ -155,12 +155,14 @@ import dataSource from "@/components/point/dynamicdata/dataSource";
 import locationFlag from "@/components/point/dynamicdata/locationFlag";
 import { mapGetters, mapActions } from "vuex";
 import {
-  dynamicPendingobjs,
+  // dynamicPendingobjs,
   dynamicPendingPoint,
   dynamicCreateRelation,
   dynamicDeleteRelation,
   dynamicPointTypeList,
-  dynamicQueryAI
+  dynamicQueryAI,
+  queryLinkSys, //数据中心系统查询
+  dynamicRelatedObj
 } from "@/api/scan/request";
 export default {
   components: {
@@ -368,7 +370,7 @@ export default {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
+        param.SubTypeCodeList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
         param.LocationFlagList = this.form.LocationFlag;
@@ -389,46 +391,45 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
+        Filters: 'not SysID isNull'
       };
       //处理查询条件
-      if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
-        param.ObjectLocalName = this.form.ObjectLocalName;
-      }
       if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
-      }
-      if (this.form.locationVal.length > 0) {
-        param.BuildLocalName = this.form.locationVal[0];
-      }
-      if (this.form.locationVal.length > 1) {
-        param.FloorLocalName = this.form.locationVal[1];
-      }
-      if (this.form.locationVal.length > 2) {
-        param.SpaceType = this.form.locationVal[2];
+        pa.Filters += `;Category in ${JSON.stringify(this.form.SubTypeName)}`
       }
-      if (this.form.locationVal.length > 3) {
-        param.RoomLocalName = this.form.locationVal[3];
+      let pa2 = {
+        Filters: `TypeName='${this.typeName}'`
       }
-      if (!this.form.locationVal.length) {
-        delete param.BuildLocalName
-        delete param.FloorLocalName
-        delete param.SpaceType
-        delete param.RoomLocalName
+      if (this.form.SubTypeName.length) {
+        pa2.Filters += `;SubTypeCode in ${JSON.stringify(this.form.SubTypeName)}`
       }
       this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
-        if (this.rPage.pageNumber == 1) {
-          this.RtableData = res.Content;
-        } else {
-          this.RtableData = this.RtableData.concat(res.Content);
+      dynamicRelatedObj(pa2, response => {
+        const tempArr = response.Content.map(t => {
+          return t.TypeCode + t.ProjectId + t.ObjectID
+        })
+        if (tempArr.length) {
+          pa.Filters += `;not SysID in ${JSON.stringify(tempArr)}`
         }
-        this.rTableLoading = false;
-      });
+        queryLinkSys(pa, res => {
+          this.rPage.total = res.Total;
+          let tempArr = res.Content.map(t => {
+            t.ObjectID = t.SysID.substr(12);
+            t.ObjectLocalName = t.SysLocalName;
+            t.ObjectLocalCode = t.SysLocalID;
+            return t;
+          });
+          if (this.rPage.pageNumber == 1) {
+            this.RtableData = tempArr;
+          } else {
+            this.RtableData = this.RtableData.concat(tempArr);
+          }
+          this.rTableLoading = false;
+        });
+      })
     },
     //清除对应关系成功
     deleteSuc() {

+ 65 - 32
src/views/point/dynamicdata/addRelation/tenantRela/index.vue

@@ -156,12 +156,15 @@ import dataSource from "@/components/point/dynamicdata/dataSource";
 import locationFlag from "@/components/point/dynamicdata/locationFlag";
 import { mapGetters, mapActions } from "vuex";
 import {
-  dynamicPendingobjs,
+  // dynamicPendingobjs,
   dynamicPendingPoint,
   dynamicCreateRelation,
   dynamicDeleteRelation,
   dynamicPointTypeList,
-  dynamicQueryAI
+  dynamicQueryAI,
+  queryTenant, //数据中心查询租户
+  dynamicRelatedObj,
+  dynamicTenantQuery
 } from "@/api/scan/request";
 export default {
   components: {
@@ -390,46 +393,69 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
+        Cascade: [{ Name: 'zoneTenantList' }],
+        Filters: 'not TenantID isNull',
+        Cascade: [{ Name: "zoneTenantList" }]
       };
       //处理查询条件
       if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
-        param.ObjectLocalName = this.form.ObjectLocalName;
-      }
-      if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
-      }
-      if (this.form.locationVal.length > 0) {
-        param.BuildLocalName = this.form.locationVal[0];
-      }
-      if (this.form.locationVal.length > 1) {
-        param.FloorLocalName = this.form.locationVal[1];
+        pa.Filters += `;TenantLocalName contain "${this.form.ObjectLocalName}"`;
       }
+      // if (this.form.locationVal.length > 0) {
+      //   if (this.form.locationVal[0] == 'unknowBuild') {
+      //     pa.Filters += `;BuildingId isNull`;
+      //   } else {
+      //     pa.Filters += `;BuildingId='${this.form.locationVal[0]}'`;
+      //   }
+      // }
+      // if (this.form.locationVal.length > 1) {
+      //   if (this.form.locationVal[1] == 'unknowFloor') {
+      //     pa.Filters += `;FloorId isNull`;
+      //   } else {
+      //     pa.Filters += `;FloorId='${this.form.locationVal[1]}'`;
+      //   }
+      // }
       if (this.form.locationVal.length > 2) {
-        param.SpaceType = this.form.locationVal[2];
+        pa.ZoneType = this.form.locationVal[2];
       }
       if (this.form.locationVal.length > 3) {
-        param.RoomLocalName = this.form.locationVal[3];
-      }
-      if (!this.form.locationVal.length) {
-        delete param.BuildLocalName
-        delete param.FloorLocalName
-        delete param.SpaceType
-        delete param.RoomLocalName
+        pa.ZoneId = this.form.locationVal[3];
       }
       this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
-        if (this.rPage.pageNumber == 1) {
-          this.RtableData = res.Content;
-        } else {
-          this.RtableData = this.RtableData.concat(res.Content);
-        }
-        this.rTableLoading = false;
-      });
+      dynamicRelatedObj({ Filters: `TypeName='${this.typeName}'` },
+        response => {
+          const tempArr = response.Content.map(t => {
+            return t.TypeCode + t.ProjectId + t.ObjectID
+          })
+          if (tempArr.length) {
+            pa.Filters += `;not TenantID in ${JSON.stringify(tempArr)}`
+          }
+          dynamicTenantQuery(pa, res => {
+            this.rPage.total = res.Total;
+            let tempArr = res.Content.map(t => {
+              t.ObjectID = t.TenantID.substr(14);
+              t.ObjectLocalName = t.TenantLocalName;
+              t.ObjectLocalCode = t.TenantLocalID;
+              t.RoomLocalName = '';
+              if (t.ZoneTenantList) {
+                t.ZoneTenantList.forEach(item => {
+                  t.RoomLocalName += item.RoomLocalName + ',';
+                });
+                t.RoomLocalName = t.RoomLocalName.substring(0, t.RoomLocalName.length - 1);
+              }
+              return t;
+            });
+            if (this.rPage.pageNumber == 1) {
+              this.RtableData = tempArr;
+            } else {
+              this.RtableData = this.RtableData.concat(tempArr);
+            }
+            this.rTableLoading = false;
+          });
+        })
     },
     //清除对应关系成功
     deleteSuc() {
@@ -530,7 +556,14 @@ export default {
           let param = []
           n.map(item => {
             param.push({
-              Objs: [item],
+              Objs: [{
+                ObjectID: item.ObjectID,
+                TypeCode: 'VOTn',
+                ProjectId: item.ProjectId.substring(2),
+                ObjectLocalCode: item.ObjectLocalCode,
+                ObjectLocalName: item.ObjectLocalName,
+                SubTypeCode: 'VOTn'
+              }],
               Top: 3,
               Proximity: 0.5
             })

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

@@ -70,7 +70,8 @@ export default {
       let pa = {
         FloorId: this.floor.FloorID,
         Id: this.modelIdToFloorId[this.jsonKey],
-        BuildingId: this.floor.BuildID
+        BuildingId: this.floor.BuildID,
+        Cover: true
       };
       bindFloorModel(pa, res => {
         this.$message.success("更新成功");