Browse Source

动参关联 待关联系统实例查询(差查询已关联实例)

haojianlong 5 years ago
parent
commit
68ccbccccd
1 changed files with 15 additions and 31 deletions
  1. 15 31
      src/views/point/dynamicdata/addRelation/systemRela/index.vue

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

@@ -155,12 +155,13 @@ 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, //数据中心系统查询
 } from "@/api/scan/request";
 export default {
   components: {
@@ -389,43 +390,26 @@ export default {
     },
     //获取待关联实例-右侧
     getRightData() {
-      let param = {
+      let pa = {
         PageNumber: this.rPage.pageNumber,
-        PageSize: this.rPage.pageSize,
-        TypeNameList: [this.typeName]
+        PageSize: this.rPage.pageSize
       };
       //处理查询条件
-      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 = `CategoryName in ${JSON.stringify(this.form.SubTypeName)}`
       }
       this.rTableLoading = true;
-      dynamicPendingobjs(param, res => {
-        this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
+      queryLinkSys(pa, res => {
+        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 = res.Content;
+          this.RtableData = tempArr;
         } else {
-          this.RtableData = this.RtableData.concat(res.Content);
+          this.RtableData = this.RtableData.concat(tempArr);
         }
         this.rTableLoading = false;
       });