Kaynağa Gözat

Merge branch 'master' into zonesp

haojianlong 5 yıl önce
ebeveyn
işleme
e10b608ee9
29 değiştirilmiş dosya ile 744 ekleme ve 258 silme
  1. 1 1
      package.json
  2. 12 0
      src/api/scan/request.js
  3. 91 7
      src/assets/style/iconfont/iconfont.css
  4. BIN
      src/assets/style/iconfont/iconfont.eot
  5. 124 61
      src/assets/style/iconfont/iconfont.svg
  6. BIN
      src/assets/style/iconfont/iconfont.ttf
  7. BIN
      src/assets/style/iconfont/iconfont.woff
  8. 1 1
      src/components/business_space/business/handsontable.vue
  9. 2 0
      src/components/business_space/newAddDialogs/addEquipDialog.vue
  10. 130 85
      src/components/business_space/newGraphy/graphy.vue
  11. 1 0
      src/components/common/myPagination.vue
  12. 18 2
      src/components/config_point/select_one.vue
  13. 129 40
      src/components/config_point/step3_point/3_temps.vue
  14. 20 7
      src/components/config_point/step3_point/steps3_main.vue
  15. 1 1
      src/components/point/dynamicdata/applyRulesDialog.vue
  16. 66 0
      src/components/point/dynamicdata/autoGroupRelaDialog.vue
  17. 4 4
      src/components/point/dynamicdata/delRelationDialog.vue
  18. 21 8
      src/components/point/dynamicdata/equipRules.vue
  19. 4 4
      src/components/point/dynamicdata/historyDialog.vue
  20. 11 2
      src/components/point/dynamicdata/partsRules.vue
  21. 11 2
      src/components/point/dynamicdata/spaceRules.vue
  22. 11 2
      src/components/point/dynamicdata/systemRules.vue
  23. 7 13
      src/components/point/report/historyChart.vue
  24. 53 9
      src/views/business_space/dataUtil/index.vue
  25. 1 1
      src/views/point/dynamicdata/addRelation/equipRela/index.vue
  26. 1 1
      src/views/point/dynamicdata/addRelation/partsRela/index.vue
  27. 1 1
      src/views/point/dynamicdata/addRelation/spaceRela/index.vue
  28. 1 1
      src/views/point/dynamicdata/addRelation/systemRela/index.vue
  29. 22 5
      src/views/point/dynamicdata/index.vue

+ 1 - 1
package.json

@@ -28,7 +28,7 @@
         "@saga-web/base": "2.1.8",
         "@saga-web/draw": "2.1.57",
         "@saga-web/graphy": "2.1.28",
-        "@saga-web/cad-engine": "2.0.292"
+        "@saga-web/cad-engine": "2.0.308"
     },
     "devDependencies": {
         "ajv": "^6.9.1",

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

@@ -1089,6 +1089,12 @@ export function dynamicClashConfirm(param, success) {
     http.postJson(url, param, success)
 }
 
+//子系统点位接入-第三部步骤3保存
+export function groupCreatePointRelation(param, success) {
+    let url = `${baseUrl}/pointconfig/relation/group-create`;
+    http.postJson(url, param, success)
+}
+
 //动态数据关联-查询数据源列表(P1&2)
 export function dynamicDataSource(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/datasource-list`;
@@ -1179,6 +1185,12 @@ export function dynamicPointTypeList(param, success) {
     http.postJson(url, param, success)
 }
 
+//动态数据关联-自动关联
+export function dynamicAutoRelate(param, success) {
+    let url = `${baseUrl}/pointconfig/dynamic/auto-relate`;
+    http.postJson(url, param, success)
+}
+
 //查询楼层信息
 export function floorQuery(param, success) {
     let url = `${baseUrl}/datacenter/floor/query`;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 91 - 7
src/assets/style/iconfont/iconfont.css


BIN
src/assets/style/iconfont/iconfont.eot


Dosya farkı çok büyük olduğundan ihmal edildi
+ 124 - 61
src/assets/style/iconfont/iconfont.svg


BIN
src/assets/style/iconfont/iconfont.ttf


BIN
src/assets/style/iconfont/iconfont.woff


+ 1 - 1
src/components/business_space/business/handsontable.vue

@@ -543,7 +543,7 @@ export default {
       return data;
     },
     myRenderer(instance, td, row, col, prop, value, cellProperties) {
-      if (value && value.length) {
+      if (value && value.length && value[0]) {
         td.innerHTML = "已关联"
       } else {
         td.innerHTML = "未关联"

+ 2 - 0
src/components/business_space/newAddDialogs/addEquipDialog.vue

@@ -156,6 +156,8 @@ export default {
       if (this.keycode != '') {
         pa.data.Filters += `;EquipName contain "${this.keycode}" or EquipLocalName contain "${this.keycode}" or EquipLocalID contain "${this.keycode}"`
       }
+      // 删除首尾分号
+      pa.data.Filters = pa.data.Filters.replace(/(^;)|(;$)/g,'');
       if (pa.data.Filters == '') {
         delete pa.data.Filters
       }

+ 130 - 85
src/components/business_space/newGraphy/graphy.vue

@@ -65,9 +65,9 @@
 <script>
 import canvasFun from "./canvasFun"
 import { mapGetters, mapActions } from "vuex";
-import { SGraphyView } from "@saga-web/graphy/lib";
 import { SColor, SPoint } from "@saga-web/draw/lib";
 import { DivideFloorScene, SpaceItem, ZoneItem } from "@saga-web/cad-engine/lib";
+import { FloorView } from "@saga-web/cad-engine/lib/FloorView";
 import unRelateBSP from "./unRelateBSP";
 import createBSP from "./createBSP";
 import {
@@ -105,7 +105,7 @@ export default {
       type: 1, // 默认操作模式
       search: '',//搜索
       num: 0, // 未关联空间的业务空间条数
-      buildFloor: [],
+      buildFloor: ['', ''],
       FloorObj: {}, //楼层对象
       FloorMap: '', //楼层底图
       tab: {},
@@ -123,6 +123,7 @@ export default {
       BIMIDToSID: {}, //bimid映射元空间id
       curZoneItem: {}, //当前选中的业务空间item
       allUnRelatISP: [], //
+      zoneList: [], // 业务空间-canvas图中
     }
   },
   computed: {
@@ -136,10 +137,21 @@ export default {
   },
   methods: {
     // 初始化
-    init() {
+    init(initType) {
       this.type = 1;
-      // 获取当前分区下的业务空间
-      this.getBusinessSpace();
+      if (this.scene) {
+        this.scene.isZoneSelectable = true;
+        this.scene.isSpaceSelectable = true;
+        this.scene.clearSpaceSelection();
+        this.scene.clearZoneSelection();
+      }
+      if (initType == 1) {
+        // 底图
+        this.getGraphy();
+      } else {
+        // 业务空间
+        this.getBusinessSpace();
+      }
       // 获取未关联平面图的业务空间统计
       this.getUnrelateCount();
       // 获取当前楼层的元空间
@@ -165,8 +177,8 @@ export default {
     },
     // 搜索
     querySearch(queryString, cb) {
-      var restaurants = this.zoneList;
-      var results = queryString ?
+      let restaurants = this.zoneList;
+      let results = queryString ?
         restaurants.filter(this.createFilter(queryString)) :
         restaurants;
       // 调用 callback 返回建议列表的数据
@@ -190,12 +202,16 @@ export default {
     },
     // 父组件调用
     getData(buildFloor, FloorObj, tab) {
+      let initType = 1;
+      if (FloorObj.FloorID == this.FloorObj.FloorID) {
+        initType = 2;
+      }
       this.buildFloor = buildFloor;
       this.FloorObj = FloorObj;
       this.FloorMap = FloorObj.StructureInfo ? FloorObj.StructureInfo.FloorMap : ''
       this.tab = tab;
       console.log(arguments)
-      this.init();
+      this.init(initType);
     },
     // 获取未关联平面图的业务空间统计
     getUnrelateCount() {
@@ -237,18 +253,6 @@ export default {
           return;
         }
         that.view.scene = that.scene;
-        // 绘制业务空间
-        let tempArr = this.BSPRelaISPList.map((t, i) => {
-          return {
-            RoomLocalName: t.RoomLocalName,
-            OutLine: t.Outline,
-            RoomID: t.RoomID,
-            Color: new SColor(colorArr[i % colorArr.length]),
-          }
-        })
-        that.scene.addZoneList(tempArr);
-        that.scene.click(that, that.canvasClick);
-        that.zoneList = that.scene.zoneList;
         // 蒙版
         if (this.FloorObj.Outline) {
           let newArr = this.FloorObj.Outline.map(t => {
@@ -256,6 +260,8 @@ export default {
           })
           this.scene.addSceneMark(newArr)
         }
+        // 绘制业务空间
+        that.getBusinessSpace();
         that.view.fitSceneToView();
         that.view.maxScale = that.view.scale * 10;
         that.view.minScale = that.view.scale;
@@ -264,20 +270,27 @@ export default {
         }
       })
     },
+    // 清空绘制业务空间
+    clearZoneCanvas() {
+      this.zoneList.map(t => {
+        this.scene.removeItem(t);
+      })
+    },
     // 获取当前分区下的业务空间
     getBusinessSpace() {
-      this.isLoading = true
+      this.canvasLoading = true
       let pa = {
         zone: this.tab.code,
         data: {
           Filters: ``,
           Orders: "createTime desc, RoomID asc",
-          PageSize: 500
+          PageSize: 1000
         }
       }
       if (this.buildFloor.length && this.buildFloor.length > 1) {
         pa.data.Filters = `BuildingId='${this.buildFloor[0]}';FloorId='${this.buildFloor[1]}'`
       }
+      this.clearZoneCanvas();
       queryZone(pa, res => {
         // 所有业务空间
         this.businessSpaceList = res.Content;
@@ -292,9 +305,20 @@ export default {
             this.BSPUnrelaISPList.push(t)
           }
         })
-        // 获取底图
-        this.getGraphy();
-        this.isLoading = false;
+        // 绘制业务空间
+        let tempArr = this.BSPRelaISPList.map((t, i) => {
+          return {
+            RoomLocalName: t.RoomLocalName,
+            OutLine: t.Outline,
+            RoomID: t.RoomID,
+            Color: new SColor(colorArr[i % colorArr.length]),
+          }
+        })
+        this.scene.zoneList = [];
+        this.scene.addZoneList(tempArr);
+        this.scene.click(this, this.canvasClick);
+        this.zoneList = this.scene.zoneList;
+        this.canvasLoading = false;
       })
     },
     // canvas点击事件
@@ -332,69 +356,77 @@ export default {
     },
     // 取消(所有取消公用)
     cancelGraphy() {
-      this.type = 1;
-      this.init();
+      this.init(2);
     },
     // 批量创建业务空间
     groupCreateBSpace() {
       let text = []
       let Spaces = this.allUnRelatISP.map(t => {
-        text.push(t.RoomLocalName || t.RoomName)
-        return {
-          IspaceId: t.RoomID,
-          RoomLocalName: t.RoomLocalName || t.RoomName,
-          Outline: [t.Outline],
-          BuildingId: this.buildFloor[0],
-          FloorId: this.buildFloor[1]
-        }
-      });
-      this.$confirm(
-        "<p>确定根据未关联业务空间的空间批量创建业务空间</p>" +
-        "<p>涉及的空间:</p>" +
-        "<p style='line-height:20px;max-height:60px;overflow-y:auto;'>" +
-        text.toString() +
-        "</p>",
-        "提示", {
-        dangerouslyUseHTMLString: true,
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }
-      ).then(() => {
-        let pa = {
-          zone: this.tab.code,
-          data: {
-            Content: Spaces
+        if (t.Outline) {
+          text.push(t.RoomLocalName || t.RoomName)
+          return {
+            IspaceId: t.RoomID,
+            RoomLocalName: t.RoomLocalName || t.RoomName,
+            Outline: [t.Outline],
+            BuildingId: this.buildFloor[0],
+            FloorId: this.buildFloor[1],
+            Height: t.Height || 0
           }
+        } else {
+          return undefined
         }
-        this.canvasLoading = true;
-        createZone(pa, res => {
-          res.EntityList.map(t => {
-            Spaces = Spaces.map(item => {
-              if (t.RoomLocalName == item.RoomLocalName) {
-                item.SpaceId = t.RoomID
-              }
-              return item;
-            })
-          })
-          let param = {
+      }).filter(item => item);
+      if (Spaces.length) {
+        this.$confirm(
+          "<p>确定根据未关联业务空间的空间批量创建业务空间</p>" +
+          "<p>涉及的空间:</p>" +
+          "<p style='line-height:20px;max-height:60px;overflow-y:auto;'>" +
+          text.toString() +
+          "</p>",
+          "提示", {
+          dangerouslyUseHTMLString: true,
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }
+        ).then(() => {
+          let pa = {
+            zone: this.tab.code,
             data: {
               Content: Spaces
-            },
-            type: this.tab.code
+            }
           }
-          groupCreRelaZoneAndISp(param, res => {
-            this.$message.success('创建成功')
-            this.canvasLoading = false;
-            this.init()
+          this.canvasLoading = true;
+          createZone(pa, res => {
+            res.EntityList.map(t => {
+              Spaces = Spaces.map(item => {
+                if (t.RoomLocalName == item.RoomLocalName) {
+                  item.SpaceId = t.RoomID
+                }
+                return item;
+              })
+            })
+            let param = {
+              data: {
+                Content: Spaces
+              },
+              type: this.tab.code
+            }
+            groupCreRelaZoneAndISp(param, res => {
+              this.$message.success('创建成功')
+              this.canvasLoading = false;
+              this.init(2)
+            })
           })
-        })
-      }).catch(() => {
-        this.$message({
-          type: "info",
-          message: "已取消批量创建"
+        }).catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消批量创建"
+          });
         });
-      });
+      } else {
+        this.$message('没有未关联的元空间')
+      }
     },
     // 创建新的业务空间
     createNewZone() {
@@ -412,10 +444,14 @@ export default {
     // 创建新的业务空间-弹窗返回确认创建
     createRoom(val) {
       let arr = this.scene.getSelectedSpaces();
-      let zoneObj = { Outline: [] }, IspaceIdList = [];
+      let zoneObj = { Outline: [], Height: 0 }, IspaceIdList = [];
       arr.map(t => {
         zoneObj.Outline.push(t.data.OutLine);
-        IspaceIdList.push(this.BIMIDToSID[t.data.SourceId])
+        IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
+        console.log(zoneObj.Height)
+        if (t.data.Height && (zoneObj.Height == 0 || t.data.Height < zoneObj.Height)) {
+          zoneObj.Height = t.data.Height;
+        }
       })
       zoneObj.RoomLocalName = val;
       zoneObj.BuildingId = this.buildFloor[0];
@@ -432,10 +468,14 @@ export default {
     },
     // 从未关联平面图的业务空间中选择--按钮返回关联信号
     createFromUnrelated(BSP) {
-      BSP.Outline = []
+      BSP.Outline = [];
+      BSP.Height = 0;
       let arr = this.scene.getSelectedSpaces();
       arr.map(t => {
         BSP.Outline.push(t.data.OutLine);
+        if (t.Height && (BSP.Height == 0 || t.Height < BSP.Height)) {
+          BSP.Height = t.Height;
+        }
       })
       let pa = {
         zone: BSP.ObjectType,
@@ -446,7 +486,7 @@ export default {
       }
       updateZone(pa, res => {
         this.$message.success('更新成功');
-        this.init();
+        this.init(2);
       })
     },
     // 编辑空间详情
@@ -460,6 +500,8 @@ export default {
     // 重新划分业务空间
     refactorBSP() {
       this.type = 4;
+      // 清空选中空间
+      this.scene.clearSpaceSelection();
       // 设置空间可选
       this.scene.isSpaceSelectable = true;
       // 将已关联的设置不可选,并将当前选的隐藏
@@ -469,10 +511,13 @@ export default {
     saveRefactorBSP() {
       let arr = this.scene.getSelectedSpaces();
       //更新业务空间
-      let zoneObj = { Outline: [] }, IspaceIdList = [];
+      let zoneObj = { Outline: [], Height: 0 }, IspaceIdList = [];
       arr.map(t => {
         zoneObj.Outline.push(t.data.OutLine);
-        IspaceIdList.push(this.BIMIDToSID[t.data.SourceId])
+        IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
+        if (t.Height && (zoneObj.Height == 0 || t.Height < zoneObj.Height)) {
+          zoneObj.Height = t.Height;
+        }
       })
       zoneObj.RoomID = this.curZoneItem.data.RoomID;
       if (!zoneObj.Outline.length) {
@@ -497,7 +542,7 @@ export default {
       }
       createRelateInZoneAndISp(pa, res => {
         this.$message.success('创建成功');
-        this.init();
+        this.init(2);
       })
     },
     // canvas 获取焦点
@@ -506,11 +551,11 @@ export default {
     },
     // 清除canvas
     clearGraphy() {
-      if (this.view) {
+      if (this.view && this.view.scene) {
         this.view.scene = null;
         return
       }
-      this.view = new SGraphyView('floorCanvas')
+      this.view = new FloorView('floorCanvas')
     },
     // 工具栏操作
     // 移动底图

+ 1 - 0
src/components/common/myPagination.vue

@@ -36,6 +36,7 @@ export default {
     //当前条数发生改变
     handleSizeChange(val) {
       this.page.size = val;
+      this.page.currentPage = 1;
       this.change()
     },
     //当前页发生改变

+ 18 - 2
src/components/config_point/select_one.vue

@@ -10,11 +10,11 @@
         <p>{{name}}</p>
         <ul v-if="renderData.length">
             <li v-for="(item,index) in renderData" :key="index">
-                <div @click="checkItem(item,index)" :class="index == active ? 'saga-active-select': ''" class="select-item border-bottom pointer">
+                <div @click="checkItem(item,index)" :class="{'saga-active-select': index == active,'disabled':item.RelationStatus=='Waiting'||item.RelationStatus=='Pending'}" class="select-item border-bottom pointer">
                     <!-- <span v-if="isSelected" :class="{'is-checked': item[isCheckInfo]}" class="el-checkbox__input">
                         <span class="el-checkbox__inner"></span>
                     </span> -->
-                    <span v-if="isSelected" :class="item[isCheckInfo] ? 'el-icon-success' : 'el-icon-error'" style="color:#409EFF;">
+                    <span v-if="isSelected" :class="item.RelationStatus=='Waiting'||item.RelationStatus=='Pending'?'iconfont icon-shenglvehao load-color':item[isCheckInfo] ? 'el-icon-success success-color' : 'el-icon-error error-color'">
                     </span>
                     {{overString(item[infosKey])}}
                     <i v-if="isDel" @click.stop="delItem(item)" class="el-icon-error saga-delete pointer"></i>
@@ -60,6 +60,10 @@
         mounted() {},
         methods: {
             checkItem(item, index) {
+                if(item.RelationStatus=='Waiting'||item.RelationStatus=='Pending'){
+                    this.$message('正在执行')
+                    return
+                }
                 this.$emit("check", item)
                 this.active = index
             },
@@ -123,6 +127,18 @@
     .select-item {
         height: 30px;
         line-height: 30px;
+        &.disabled{
+            background-color: #ccc;
+        }
+        .success-color{
+            color: #409EFF;
+        }
+        .error-color{
+            color: #F56C6C;
+        }
+        .load-color{
+            color: #909399;
+        }
     }
     .saga-delete {
         display: none;

+ 129 - 40
src/components/config_point/step3_point/3_temps.vue

@@ -56,11 +56,14 @@
     </div>
     <div class="collapse-item" v-if="activeName == 2">
       <div v-if="renderData.length" style="height:258px;">
-        <handsontable-component ref="handsontable"></handsontable-component>
+        <handsontable-component ref="handsontable" @change="changeTable"></handsontable-component>
       </div>
       <div v-if="!renderData.length" class="center" style="padding: 50px 0;box-sizing:border-box;">
         <i class="icon-wushuju iconfont"></i> 暂无数据
       </div>
+      <div v-if="pages.total>pages.size" class="right">
+        <pagination :page="pages" @change="changePage"></pagination>
+      </div>
       <div class="center">
         <el-button @click="undo">上一步</el-button>
         <el-button v-show="renderData.length" @click="save">保存</el-button>
@@ -77,6 +80,11 @@ import formulaHandle from '@/components/config_point/step3_edit/formula_handle'
 import splitHandle from '@/components/config_point/step3_edit/split_handle'
 import handsontableComponent from "@/components/common/handsontable"
 import dictionaryCas from '@/components/config_point/dictionaryCascader'
+import pagination from "@/components/common/myPagination"
+import handsonUtils from "@/utils/hasontableUtils"
+import {
+  groupCreatePointRelation
+} from "@/api/scan/request";
 import {
   mapGetters,
   mapActions
@@ -107,7 +115,9 @@ export default {
       default: function () {
         return []
       }
-    }
+    },
+    pages: Object,
+    queryParam: Object
   },
   data() {
     return {
@@ -168,21 +178,24 @@ export default {
     formulaHandle,
     splitHandle,
     handsontableComponent,
-    dictionaryCas
+    dictionaryCas,
+    pagination
   },
   methods: {
-    getMain(param) {
-      this.activeName = 0
-      this.dealType = {}
-      this.form1 = {
-        dict: 1
-      }
-      this.$refs.dictionaryCas.setCascaderVal([])
-      this.form2 = {
-        ValueDescription: '',
-        DataRuleType: '无需处理,直接使用'
+    getMain(param, pagechange) {
+      if (!pagechange) {
+        this.activeName = 0
+        this.dealType = {}
+        this.form1 = {
+          dict: 1
+        }
+        this.$refs.dictionaryCas.setCascaderVal([])
+        this.form2 = {
+          ValueDescription: '',
+          DataRuleType: '无需处理,直接使用'
+        }
+        this.unitObj = {}
       }
-      this.unitObj = {}
       let params = {
         data: {
           DataSourceId: this.datasourceId,
@@ -197,32 +210,41 @@ export default {
     },
     //保存
     save() {
-      let data = this.hot.getSourceData()
-      let params = data.map(item => {
-        let obj = Object.assign({}, {
-          DataSourceId: this.datasourceId,
-          PointId: item.Id,
-          EquipmentMark: item.EquipmentMark
-        })
-        return Object.assign(obj, this.dealType)
-      }),
-        sameFalg = false,
-        magFalg = false;
-      params.map((item, index) => {
-        if (!item.EquipmentMark) {
-          magFalg = true
-        }
-        params.map((child, childIndex) => {
-          if (childIndex != index && child.EquipmentMark == item.EquipmentMark) {
-            sameFalg = true
-          }
-        })
+      // let data = this.hot.getSourceData()
+      // let params = data.map(item => {
+      //   let obj = Object.assign({}, {
+      //     DataSourceId: this.datasourceId,
+      //     PointId: item.Id,
+      //     EquipmentMark: item.EquipmentMark
+      //   })
+      //   return Object.assign(obj, this.dealType)
+      // }),
+      //   sameFalg = false,
+      //   magFalg = false;
+      // params.map((item, index) => {
+      //   if (!item.EquipmentMark) {
+      //     magFalg = true
+      //   }
+      //   params.map((child, childIndex) => {
+      //     if (childIndex != index && child.EquipmentMark == item.EquipmentMark) {
+      //       sameFalg = true
+      //     }
+      //   })
+      // })
+      // if (sameFalg) {
+      //   this.confirm("点位中存在对象标识相同的点位,确认保存吗?", params)
+      // } 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")
       })
-      if (sameFalg) {
-        this.confirm("点位中存在对象标识相同的点位,确认保存吗?", params)
-      } else {
-        this.createParam(params)
-      }
     },
     confirm(assage, params) {
       this.$confirm(assage, { type: 'warning' }).then(_ => {
@@ -322,7 +344,7 @@ export default {
               this.activeName += 1
               let setting = {
                 data: this.renderData,
-                maxRows: this.renderData.length,
+                maxRows: 1000,
                 colHeaders: ['对象标识', '原始点位描述', '位置标签', '备注'],
                 columns: [{
                   data: 'EquipmentMark'
@@ -583,6 +605,73 @@ export default {
       this.infoDict = this.$refs.dictionaryCas.pointDataSource
       this.unitObj = this.infoDict[val[val.length - 1]]
       this.InfomationPoint = this.unitObj.InfoPointName || ''
+    },
+    //分页发生更改
+    changePage() {
+      this.$emit('changePage', this.queryParam);
+    },
+    // 修改table
+    changeTable(changeData, source) {
+      console.log(source)
+      if (source == 'edit' || source == 'Autofill.fill') {
+        let trimmedArr = this.trimmedRows();
+        let param = handsonUtils.getParam(changeData, source, this.hot, trimmedArr);
+        let updateParams = {
+          data: {
+            Content: []
+          },
+          type: this.protocolType
+        }
+        updateParams.data.Content = param.map(t => {
+          return {
+            Id: t.Id,
+            EquipmentMark: t.EquipmentMark
+          }
+        })
+        console.log(updateParams)
+        updatePoint(updateParams, data => {
+          this.$message.success("修改成功")
+        })
+      }
+    },
+    //获取被筛选掉的行号
+    trimmedRows() {
+      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
+      let dataLength = this.renderData.length;
+      let dataArr = new Array();
+      for (let i = 0; i < dataLength; i++) {
+        dataArr.push(i);
+      }
+      if (plugin.length <= 0) {
+        dataArr = undefined;
+      } else {
+        dataArr = this.array_diff(dataArr, plugin);
+      }
+      return dataArr || [];
+    },
+    //去除数组中相同的元素
+    array_diff(a, b) {
+      for (var i = 0; i < b.length; i++) {
+        for (var j = 0; j < a.length; j++) {
+          if (a[j] == b[i]) {
+            a.splice(j, 1);
+            j = j - 1;
+          }
+        }
+      }
+      return a;
+    },
+  },
+  watch: {
+    'renderData': {
+      handler(n, o) {
+        if (n.length && this.hot) {
+          this.hot.loadData(n);
+          console.log('load')
+        }
+      },
+      immediate: true,
+      deep: true
     }
   }
 }

+ 20 - 7
src/components/config_point/step3_point/steps3_main.vue

@@ -4,7 +4,7 @@
         <select-one @check="typeCheck" :renderData="typeArr" :isSelected="true" isCheckInfo="PhysicalRelated" infosKey="EquipmentType" :name="'原始点位描述中识别的对象类型'"></select-one>
         <select-one @check="paramCheck" :isDel="true" @deleteItem="deleteItem" :renderData="identifyArr" :isSelected="true" isCheckInfo="PhysicalRelated" infosKey="ownMess" :name="'原始点位描述中识别的对象参数'"></select-one>
         <div class="own-collape">
-            <temp-collape ref="ident" :renderData="identDataArr" @changed="changed"></temp-collape>
+            <temp-collape ref="ident" :renderData="identDataArr" @changed="changed" :pages="pages" @changePage="changePage" :queryParam="queryParam"></temp-collape>
         </div>
     </div>
 </template>
@@ -33,7 +33,14 @@
                 typeArr: [],
                 identifyArr: [],
                 KeyEquipmentType: "",
-                identDataArr: []
+                identDataArr: [],
+                pages: {
+                    size: 100,
+                    sizes: [50, 100, 200, 500],
+                    total: 0,
+                    currentPage: 0
+                },
+                queryParam:{}
             }
         },
         computed: {
@@ -105,8 +112,9 @@
                     this.typeArr = res.Content
                 })
             },
-            paramCheck(param) {
+            paramCheck(param,pagechange) {
                 console.log(param,'param')
+                this.queryParam = param
                 if(!!param &&!!param.PhysicalRelated){
                     this.$message("已完成设置,您可以重新设置")
                 }
@@ -120,7 +128,8 @@
                         type: this.protocolType
                     }, res => {
                         this.identDataArr = res.Content
-                        this.$refs.ident.getMain(param)
+                        this.pages.total = res.Total || 0;
+                        this.$refs.ident.getMain(param,pagechange)
                     })
                 } else {
                     //不是空的情况查询点位列表
@@ -136,14 +145,15 @@
                                     // KeyEquipmentParameter: '温度',
                                     // KeyEquipmentType: '冷机'
                                 },
-                                PageNumber: 1,
-                                PageSize: 1000
+                                PageNumber: this.pages.currentPage,
+                                PageSize: this.pages.size
                             },
                             type: this.protocolType
                         }, res => {
                             console.log(res, "reslist")
                             this.identDataArr = res.Content
-                            this.$refs.ident.getMain(param)
+                            this.pages.total = res.Total || 0
+                            this.$refs.ident.getMain(param,pagechange)
                         })
                     }
                 }
@@ -165,6 +175,9 @@
                         })
                     })
                 }
+            },
+            changePage(){
+                this.paramCheck(this.queryParam,'pagechange')
             }
         },
         components: {

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

@@ -38,7 +38,7 @@
       </el-table-column>
       <el-table-column label="设备实例本地名(本地编码)" class-name="bgf5" align="center">
         <template slot-scope="scope">
-          {{scope.row.ObjectLocalName}}({{scope.row.ObjectID}})
+          {{scope.row.ObjectLocalName}}({{scope.row.ObjectLocalCode}})
         </template>
       </el-table-column>
       <el-table-column label="信息点" prop="InfomationPoint" align="center"></el-table-column>

+ 66 - 0
src/components/point/dynamicdata/autoGroupRelaDialog.vue

@@ -0,0 +1,66 @@
+<template>
+  <el-dialog title="提示" :visible.sync="autoDialog" width="30%" @close="autoRelateClose">
+    <div id="autoRelate">
+      <p>请选择使用哪个信息点对应原始点位的设备标识:</p>
+      <p>
+        <el-radio v-model="autoType" label="objectLocalName">{{TypeName}}实本地名称</el-radio>
+      </p>
+      <p>
+        <el-radio v-model="autoType" label="objectLocalCode">{{TypeName}}本地编码</el-radio>
+      </p>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="autoRelateClose">取消</el-button>
+      <el-button size="small" type="primary" @click="confirm">确认</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import {
+  dynamicAutoRelate
+} from "@/api/scan/request"
+export default {
+  data() {
+    return {
+      autoDialog: false,
+      autoType: "objectLocalName",
+      TypeName: '',
+      TypeCode: ''
+    }
+  },
+  methods: {
+    showDialog(TypeName, TypeCode) {
+      this.TypeName = TypeName;
+      this.TypeCode = TypeCode;
+      this.autoDialog = true;
+    },
+    autoRelateClose() {
+      this.autoDialog = false;
+    },
+    confirm() {
+      let pa = {
+        MatchKey: this.autoType,
+        TypeName: this.TypeName
+      }
+      this.autoDialog = false;
+      this.$message('正在执行');
+      this.$emit('autoRelateSuc', this.TypeCode);
+      dynamicAutoRelate(pa, res => {
+        this.$message.success('匹配成功');
+      })
+    }
+  },
+}
+</script>
+<style lang="scss" scoped>
+#autoRelate {
+  /deep/ .el-radio__input.is-checked + .el-radio__label {
+    color: #000;
+  }
+  p {
+    font-size: 12px;
+    margin-bottom: 8px;
+    padding-left: 24px;
+  }
+}
+</style>

+ 4 - 4
src/components/point/dynamicdata/delRelationDialog.vue

@@ -91,24 +91,24 @@ export default {
       allHeaderData: {
         equip: [
           { label: '对象实例名称', prop: "ObjectLocalName" },
-          { label: '对象实例编码', prop: "ObjectID" },
+          { label: '对象本地编码', prop: "ObjectLocalCode" },
           { label: '所在建筑楼层', prop: "BuildLocalName" },
           { label: '所在业务空间', prop: "RoomLocalName" },
         ],
         parts: [
           { label: '对象实例名称', prop: "ObjectLocalName" },
-          { label: '对象实例编码', prop: "ObjectID" },
+          { label: '对象本地编码', prop: "ObjectLocalCode" },
           { label: '所在建筑楼层', prop: "BuildLocalName" },
           { label: '所在业务空间', prop: "RoomLocalName" },
           { label: '所属设备实例', prop: "CascadeEquipLocalName" },
         ],
         system: [
           { label: '对象实例名称', prop: "ObjectLocalName" },
-          { label: '对象实例编码', prop: "ObjectID" },
+          { label: '对象本地编码', prop: "ObjectLocalCode" },
         ],
         space: [
           { label: '对象实例名称', prop: "ObjectLocalName" },
-          { label: '对象实例编码', prop: "ObjectID" },
+          { label: '对象本地编码', prop: "ObjectLocalCode" },
           { label: '所在建筑楼层', prop: "BuildLocalName" },
         ]
       },

+ 21 - 8
src/components/point/dynamicdata/equipRules.vue

@@ -4,7 +4,7 @@
     <!-- 查询条件 -->
     <div class="query-area">
       <el-row>
-        <el-col :span="23">
+        <el-col :span="22">
           <el-form ref="form" :model="form" :inline="true">
             <el-row>
               <div class="query-item special">
@@ -26,9 +26,14 @@
             </el-row>
           </el-form>
         </el-col>
-        <el-col :span="1">
+        <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
-            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending"></el-button>
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending">
+            </el-button>
+          </el-tooltip>
+          <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
+            <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
+              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
           </el-tooltip>
         </el-col>
       </el-row>
@@ -50,12 +55,15 @@
         </el-table-column>
         <el-table-column prop="Datasource" label="数据源" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="SubTypeName" :label="`数字字典${typeName}类型`" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="ObjectLocalName" :label="`对应的${typeName}实例`" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
+        <el-table-column prop="ObjectLocalName" :label="`对应的${typeName}实例`" show-overflow-tooltip min-width="100" class-name="td-bl">
+        </el-table-column>
         <el-table-column label="实例所在建筑楼层" min-width="100">
           <template slot-scope="scope">
-            <el-tooltip :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
+            <el-tooltip
+              :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
               placement="top">
-              <div class="tool-tip">{{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
+              <div class="tool-tip">
+                {{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
               </div>
             </el-tooltip>
           </template>
@@ -64,8 +72,8 @@
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
             <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="isPending||scope.row.Related=='False'"
-                icon="el-icon-delete"></el-button>
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
+                :disabled="isPending||scope.row.Related=='False'" icon="el-icon-delete"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -123,6 +131,7 @@ export default {
         Datasource: [] //数据源
       }, //查询条件
       loading: false, //列表loading
+      autoLoading: false, //自动对应实例
     };
   },
   components: {
@@ -221,6 +230,10 @@ export default {
     queryTableData() {
       this.page.pageNumber = 1;
       this.getTableData();
+    },
+    //自动对应实例
+    autoGroupRela() {
+      this.$emit('autoGroupRela','equip');
     }
   },
   watch: {

+ 4 - 4
src/components/point/dynamicdata/historyDialog.vue

@@ -67,24 +67,24 @@ export default {
       tableHeader: {
         equip: [
           { label: '对象实例名称', prop: 'ObjectLocalName' },
-          { label: '对象实例编码', prop: 'ObjectID' },
+          { label: '对象本地编码', prop: 'ObjectLocalCode' },
           { label: '所在建筑楼层', prop: 'BuildLocalName' },
           { label: '所在业务空间', prop: 'RoomLocalName' },
         ],
         parts: [
           { label: '对象实例名称', prop: 'ObjectLocalName' },
-          { label: '对象实例编码', prop: 'ObjectID' },
+          { label: '对象本地编码', prop: 'ObjectLocalCode' },
           { label: '对象所属设备', prop: 'CascadeEquipLocalName' },
           { label: '所在建筑楼层', prop: 'BuildLocalName' },
           { label: '所在业务空间', prop: 'RoomLocalName' },
         ],
         system: [
           { label: '对象实例名称', prop: 'ObjectLocalName' },
-          { label: '对象实例编码', prop: 'ObjectID' }
+          { label: '对象本地编码', prop: 'ObjectLocalCode' }
         ],
         space:[
           { label: '对象实例名称', prop: "ObjectLocalName" },
-          { label: '对象实例编码', prop: "ObjectID" },
+          { label: '对象本地编码', prop: "ObjectLocalCode" },
           { label: '所在建筑楼层', prop: "BuildLocalName" },
         ]
       }, //所有类型列表头部

+ 11 - 2
src/components/point/dynamicdata/partsRules.vue

@@ -4,7 +4,7 @@
     <!-- 查询条件 -->
     <div class="query-area">
       <el-row>
-        <el-col :span="23">
+        <el-col :span="22">
           <el-form ref="form" :model="form" :inline="true">
             <el-row>
               <div class="query-item special">
@@ -26,10 +26,14 @@
             </el-row>
           </el-form>
         </el-col>
-        <el-col :span="1">
+        <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
             <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending"></el-button>
           </el-tooltip>
+          <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
+            <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
+              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+          </el-tooltip>
         </el-col>
       </el-row>
     </div>
@@ -124,6 +128,7 @@ export default {
         Datasource: [] //数据源
       }, //查询条件
       loading: false, //列表loading
+      autoLoading: false, //自动对应实例
     };
   },
   components: {
@@ -222,6 +227,10 @@ export default {
     queryTableData() {
       this.page.pageNumber = 1;
       this.getTableData();
+    },
+    //自动对应实例
+    autoGroupRela() {
+      this.$emit('autoGroupRela','parts');
     }
   },
   watch: {

+ 11 - 2
src/components/point/dynamicdata/spaceRules.vue

@@ -4,7 +4,7 @@
     <!-- 查询条件 -->
     <div class="query-area">
       <el-row>
-        <el-col :span="23">
+        <el-col :span="22">
           <el-form ref="form" :model="form" :inline="true">
             <el-row>
               <div class="query-item special">
@@ -26,10 +26,14 @@
             </el-row>
           </el-form>
         </el-col>
-        <el-col :span="1">
+        <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
             <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending"></el-button>
           </el-tooltip>
+          <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
+            <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
+              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+          </el-tooltip>
         </el-col>
       </el-row>
     </div>
@@ -124,6 +128,7 @@ export default {
         Datasource: [] //数据源
       }, //查询条件
       loading: false, //列表loading
+      autoLoading: false, //自动对应实例
     };
   },
   components: {
@@ -222,6 +227,10 @@ export default {
     queryTableData() {
       this.page.pageNumber = 1;
       this.getTableData();
+    },
+    //自动对应实例
+    autoGroupRela() {
+      this.$emit('autoGroupRela','space');
     }
   },
   watch: {

+ 11 - 2
src/components/point/dynamicdata/systemRules.vue

@@ -4,7 +4,7 @@
     <!-- 查询条件 -->
     <div class="query-area">
       <el-row>
-        <el-col :span="23">
+        <el-col :span="22">
           <el-form ref="form" :model="form" :inline="true">
             <el-row>
               <div class="query-item special">
@@ -26,10 +26,14 @@
             </el-row>
           </el-form>
         </el-col>
-        <el-col :span="1">
+        <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
             <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending"></el-button>
           </el-tooltip>
+          <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
+            <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
+              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+          </el-tooltip>
         </el-col>
       </el-row>
     </div>
@@ -124,6 +128,7 @@ export default {
         Datasource: [] //数据源
       }, //查询条件
       loading: false, //列表loading
+      autoLoading: false, //自动对应实例
     };
   },
   components: {
@@ -222,6 +227,10 @@ export default {
     queryTableData() {
       this.page.pageNumber = 1;
       this.getTableData();
+    },
+    //自动对应实例
+    autoGroupRela() {
+      this.$emit('autoGroupRela','system');
     }
   },
   watch: {

+ 7 - 13
src/components/point/report/historyChart.vue

@@ -139,19 +139,13 @@ export default {
     },
     //时间戳转string 例:标准时间 => 20190929120000
     date2String(d) {
-      let dateString = new Date(d).toLocaleString().split("/");
-      if (dateString[1].length == 1) {
-        dateString[1] = '0' + dateString[1];
-      }
-      dateString = dateString.toString();
-      dateString = dateString.split(/(\d\d)/);
-      var r = [];
-      dateString.map((value, key) => {
-        if (key % 2 != 0) {
-          r.push(value);
-        }
-      })
-      return r.join("");
+      let localeString = new Date(d).toLocaleString();
+      let timeString = new Date(d).toTimeString();
+      let localArr = localeString.match(/(\d\d|\/\d+)/g).slice(0, 4);
+      let timeArr = timeString.match(/(\d\d)/g).slice(0, 3);
+      localArr[2] = localArr[2].length == 2 ? `0${localArr[2].substring(1, 2)}` : localArr[2].substring(1, 3);
+      localArr[3] = localArr[3].length == 2 ? `0${localArr[3].substring(1, 2)}` : localArr[3].substring(1, 3);
+      return localArr.concat(timeArr).join('');
     },
     init() {
       this.lineChart = echarts.init(this.$refs.chart);

+ 53 - 9
src/views/business_space/dataUtil/index.vue

@@ -4,7 +4,7 @@
       <span style="padding-right:12px;color:#999999;">建筑楼层</span>
       <el-cascader :options="options" v-model="buildFloorSelectd" :props="props" @change="changeCascader"></el-cascader>
       <el-button @click="updateSpOutline">导入业务空间Outline</el-button>
-      <el-button @click="updateSiOutline">更新元空间Outline</el-button>
+      <el-button @click="updateSiOutline" v-show="0">更新元空间Outline,Height</el-button>
     </div>
   </div>
 </template>
@@ -52,17 +52,54 @@ export default {
           "Code": "LightingZone"
         },
         {
+          "Name": "网络分区",
+          "Rel_type": "3",
+          "Code": "NetworkZone"
+        },
+        {
+          "Code": "AirConditioningZone",
           "Name": "空调分区",
-          "Rel_type": "4",
-          "Code": "AirConditioningZone"
-        }, {
-          "Name": '租赁分区',
-          'Rel_type': '10',
-          "Code": 'TenantZone'
+          "Rel_type": "4"
+        },
+        {
+          "Name": "采暖分区",
+          "Rel_type": "5",
+          "Code": "HeatingZone"
+        },
+        {
+          "Name": "洁净分区",
+          "Rel_type": "6",
+          "Code": "CleanZone"
+        },
+        {
+          "Name": "生活给水分区",
+          "Rel_type": "7",
+          "Code": "DomesticWaterSupplyZone"
+        },
+        {
+          "Code": "FireZone",
+          "Name": "防火分区",
+          "Rel_type": "8"
+        },
+        {
+          "Name": "安防分区",
+          "Rel_type": "9",
+          "Code": "SecurityZone"
+        },
+        {
+          "Name": "租户分区",
+          "Rel_type": "10",
+          "Code": "TenantZone"
+        },
+        {
+          "Name": '功能分区',
+          'Rel_type': '11',
+          "Code": 'FunctionZone'
         }
       ],
       allSiListMap: {}, //Si id ->sourceid
       sourceIdToOutline: {}, //sourceid -> outline
+      sourceIdToHeight: {}, //sourceid -> height
       graphyId: '',
       allABC: [
         'Fl11010500011b85b9eeff8211e8b8b087ac5144d0ef20191010145313bim.jsonz',
@@ -372,6 +409,7 @@ export default {
           this.allSiListMap[t.RoomID] = arr[1];
         })
         console.log(this.allSiListMap)
+        this.updateSiOutline();
       })
     },
     // 获取业务空间与元空间的关系
@@ -452,18 +490,22 @@ export default {
       let pa = {
         data: {
           Content: [],
-          Projection: ['Outline']
+          Projection: ['Outline', 'Height']
         },
         zone: Code
       }
       relList.map(t => {
         let obj = {
           RoomID: t.id,
+          Height: 0,
           Outline: []
         }
         t.children.map(item => {
           if (this.sourceIdToOutline[this.allSiListMap[item]]) {
             obj.Outline.push(this.sourceIdToOutline[this.allSiListMap[item]]);
+            if (this.sourceIdToHeight[this.allSiListMap[item]] && (obj.Height == 0 || this.sourceIdToHeight[this.allSiListMap[item]] < obj.Height)) {
+              obj.Height = this.sourceIdToHeight[this.allSiListMap[item]] / 1000;
+            }
           }
         })
         pa.data.Content.push(obj);
@@ -525,6 +567,7 @@ export default {
           if (data.Spaces && data.Spaces.length) {
             data.Spaces.map(t => {
               _this.sourceIdToOutline[t.SourceId] = t.OutLine;
+              _this.sourceIdToHeight[t.SourceId] = t.Height;
             })
             // }
             // if (data.SpaceList && data.SpaceList.length) {
@@ -546,7 +589,7 @@ export default {
       let pa = {
         data: {
           Content: [],
-          Projection: ['Outline']
+          Projection: ['Outline', 'Height']
         },
         zone: 'Ispace'
       }
@@ -557,6 +600,7 @@ export default {
         }
         if (this.sourceIdToOutline[this.allSiListMap[key]]) {
           obj.Outline = this.sourceIdToOutline[this.allSiListMap[key]];
+          obj.Height = this.sourceIdToHeight[this.allSiListMap[key]] / 1000 || 0;
           pa.data.Content.push(obj);
         }
       }

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

@@ -102,7 +102,7 @@
               <el-table-column :label="`${typeName}实例名称`" width="200" class-name="bgf5" show-overflow-tooltip>
                 <template slot-scope="scope">{{ scope.row.ObjectLocalName }}</template>
               </el-table-column>
-              <el-table-column prop="ObjectID" :label="`${typeName}实例编码`" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="ObjectLocalCode" :label="`${typeName}本地编码`" show-overflow-tooltip></el-table-column>
               <el-table-column prop="SubTypeName" :label="`${typeName}类型`" show-overflow-tooltip></el-table-column>
               <el-table-column label="所在建筑楼层">
                 <template slot-scope="scope">

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

@@ -102,7 +102,7 @@
               <el-table-column :label="`${typeName}实例名称`" width="200" class-name="bgf5" show-overflow-tooltip>
                 <template slot-scope="scope">{{ scope.row.ObjectLocalName }}</template>
               </el-table-column>
-              <el-table-column prop="ObjectID" :label="`${typeName}实例编码`" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="ObjectLocalCode" :label="`${typeName}本地编码`" show-overflow-tooltip></el-table-column>
               <el-table-column prop="SubTypeName" :label="`${typeName}类型`" show-overflow-tooltip></el-table-column>
               <el-table-column prop="CascadeEquipLocalName" label="所属设备实例" show-overflow-tooltip></el-table-column>
               <el-table-column label="所在建筑楼层">

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

@@ -102,7 +102,7 @@
               <el-table-column :label="`${typeName}实例名称`" width="200" class-name="bgf5" show-overflow-tooltip>
                 <template slot-scope="scope">{{ scope.row.ObjectLocalName }}</template>
               </el-table-column>
-              <el-table-column prop="ObjectID" :label="`${typeName}实例编码`" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="ObjectLocalCode" :label="`${typeName}本地编码`" show-overflow-tooltip></el-table-column>
               <el-table-column prop="SubTypeName" :label="`${typeName}类型`" show-overflow-tooltip></el-table-column>
               <!-- <el-table-column prop="CascadeEquipLocalName" label="所属设备实例" show-overflow-tooltip></el-table-column> -->
               <el-table-column label="所在建筑楼层">

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

@@ -102,7 +102,7 @@
               <el-table-column :label="`${typeName}实例名称`" width="200" class-name="bgf5" show-overflow-tooltip>
                 <template slot-scope="scope">{{ scope.row.ObjectLocalName }}</template>
               </el-table-column>
-              <el-table-column prop="ObjectID" :label="`${typeName}实例编码`" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="ObjectLocalCode" :label="`${typeName}本地编码`" show-overflow-tooltip></el-table-column>
               <!-- <el-table-column prop="SubTypeName" :label="`${typeName}类型`" show-overflow-tooltip></el-table-column>
               <el-table-column prop="CascadeEquipLocalName" label="所属设备实例" show-overflow-tooltip></el-table-column>
               <el-table-column label="所在建筑楼层">

+ 22 - 5
src/views/point/dynamicdata/index.vue

@@ -28,13 +28,17 @@
     </el-row>
     <div v-show="typeList.length" style="height: calc(100% - 54px);">
       <!-- 设备 -->
-      <equipRules v-if="curType=='设备'" ref="equip" :typeName="curType" @refresh="refreshTabs" :isPending="isPending"></equipRules>
+      <equipRules v-if="curType=='设备'" ref="equip" :typeName="curType" @refresh="refreshTabs" :isPending="isPending" @autoGroupRela="autoGroupRela">
+      </equipRules>
       <!-- 部件 -->
-      <partsRules v-else-if="curType=='部件'" ref="parts" :typeName="curType" @refresh="refreshTabs" :isPending="isPending"></partsRules>
+      <partsRules v-else-if="curType=='部件'" ref="parts" :typeName="curType" @refresh="refreshTabs" :isPending="isPending"
+        @autoGroupRela="autoGroupRela"></partsRules>
       <!-- 系统 -->
-      <systemRules v-else-if="curType=='系统'" ref="system" :typeName="curType" @refresh="refreshTabs" :isPending="isPending"></systemRules>
+      <systemRules v-else-if="curType=='系统'" ref="system" :typeName="curType" @refresh="refreshTabs" :isPending="isPending"
+        @autoGroupRela="autoGroupRela"></systemRules>
       <!-- 空间 -->
-      <spaceRules v-else-if="curType=='空间'" ref="space" :typeName="curType" @refresh="refreshTabs" :isPending="isPending"></spaceRules>
+      <spaceRules v-else-if="curType=='空间'" ref="space" :typeName="curType" @refresh="refreshTabs" :isPending="isPending"
+        @autoGroupRela="autoGroupRela"></spaceRules>
       <!-- 开发中 -->
       <div v-else>开发中</div>
     </div>
@@ -70,6 +74,8 @@
         <el-button size="small" type="primary" @click="apply">确认</el-button>
       </span>
     </el-dialog>
+    <!-- 自动对应实例 -->
+    <autoGroupRelaDialog ref="autoGroupRelaDialog" @autoRelateSuc="autoRelateSuc"></autoGroupRelaDialog>
     <div v-if="!typeList.length" class="center" style="margin-top: 260px;">
       <i class="icon-wushuju iconfont"></i>
       暂无数据
@@ -86,6 +92,7 @@ import equipRules from "@/components/point/dynamicdata/equipRules";
 import partsRules from "@/components/point/dynamicdata/partsRules";
 import systemRules from "@/components/point/dynamicdata/systemRules";
 import spaceRules from "@/components/point/dynamicdata/spaceRules";
+import autoGroupRelaDialog from "@/components/point/dynamicdata/autoGroupRelaDialog";
 import {
   dynamicClashConfirm,
   dynamicPromptmessage,
@@ -118,7 +125,8 @@ export default {
     equipRules,
     partsRules,
     systemRules,
-    spaceRules
+    spaceRules,
+    autoGroupRelaDialog
   },
   created() {
     let typeName = this.$route.query.typeName;
@@ -271,6 +279,15 @@ export default {
     //接收是否有冲突
     getClash(length) {
       this.hasClash = !!length
+    },
+    //自动对应实例
+    autoGroupRela(typeCode) {
+      this.$refs.autoGroupRelaDialog.showDialog(this.curType, typeCode)
+    },
+    //自动对应成功
+    autoRelateSuc(type) {
+      this.$refs[type].autoLoading = true;
+
     }
   },
   watch: {