Bläddra i källkod

modify interface

haojianlong 5 år sedan
förälder
incheckning
cfe488a647

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

@@ -1,5 +1,5 @@
 <template>
-  <el-select v-model="Datasource" multiple collapse-tags placeholder="全部" filterable>
+  <el-select v-model="Datasource" multiple collapse-tags placeholder="全部" filterable @change="changeType">
     <el-option v-for="item in sourceList" :key="item" :label="item" :value="item"></el-option>
   </el-select>
 </template>

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

@@ -1,5 +1,5 @@
 <template>
-  <el-select v-model="LocationFlag" multiple collapse-tags placeholder="全部" filterable>
+  <el-select v-model="LocationFlag" multiple collapse-tags placeholder="全部" filterable @change="changeType">
     <el-option v-for="item in LocFlagList" :key="item" :label="item" :value="item"></el-option>
   </el-select>
 </template>

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

@@ -25,7 +25,7 @@
           <div class="query-item">
             <label>设备标识关键字</label>
             <el-input placeholder="请输入设备标识关键字" v-model="form.EquipmentMark" class="input-with-select">
-              <el-button slot="append" icon="el-icon-search"></el-button>
+              <el-button slot="append" icon="el-icon-search" @click="queryLeftTable"></el-button>
             </el-input>
           </div>
           <div class="query-item">
@@ -78,7 +78,7 @@
           <div class="query-item">
             <label>设备实例关键字</label>
             <el-input placeholder="请输入设备实例关键字" v-model="form.EquipLocalName" class="input-with-select">
-              <el-button slot="append" icon="el-icon-search"></el-button>
+              <el-button slot="append" icon="el-icon-search" @click="queryRightTable"></el-button>
             </el-input>
           </div>
           <div class="query-item">
@@ -185,7 +185,7 @@ export default {
         pageNumber: 1,
         pageSize: 50,
         total: 0
-      },
+      }
     };
   },
   created() {
@@ -237,7 +237,6 @@ export default {
   },
   methods: {
     init() {
-      let param = { Related: false };
       //对象类型
       this.getTypeNames();
     },
@@ -267,11 +266,11 @@ export default {
     selectAI(i, l) {
       //i 索引 l 左侧AI or 右侧AI
       if (l == "l") {
-        this.leftRecoList[i].checked = !this.leftRecoList[i].checked;
+        this.leftRecoList[i].checked = true;
         this.lArray = [];
         this.lArray.push(this.leftRecoList[i]);
       } else {
-        this.rightRecoList[i].checked = !this.rightRecoList[i].checked;
+        this.rightRecoList[i].checked = true;
         this.rArray = [];
         this.rArray.push(this.rightRecoList[i]);
       }
@@ -292,7 +291,8 @@ export default {
         this.showPlus = false;
       }, 800);
       //重新获取数据
-      this.refresh();
+      this.queryLeftTable();
+      this.queryRightTable();
     },
     //表格中的选中事件
     leftSelectionChange(selection) {
@@ -301,25 +301,35 @@ export default {
     rightSelectionChange(selection) {
       this.rArray = selection;
     },
+    //查询左侧列表
+    queryLeftTable() {
+      this.lPage.pageNumber = 1;
+      this.getLeftData();
+    },
+    //查询右侧列表
+    queryRightTable() {
+      this.rPage.pageNumber = 1;
+      this.getRightData();
+    },
     //获取待关联点位-左侧
     getLeftData() {
       let param = {
         PageNumber: this.lPage.pageNumber,
         PageSize: this.lPage.pageSize,
-        TypeName: this.curType
+        TypeNameList: [this.curType]
       };
       //处理查询条件(目前只是单个查,需后台支持)
       if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeName = this.form.SubTypeName.toString();
+        param.SubTypeNameList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
-        param.LocationFlag = this.form.LocationFlag.toString();
+        param.LocationFlagList = this.form.LocationFlag;
       }
       if (this.form.Datasource.length) {
-        param.Datasource = this.form.Datasource.toString();
+        param.DatasourceList = this.form.Datasource;
       }
       this.lTableLoading = true;
       dynamicPendingPoint(param, res => {
@@ -337,24 +347,24 @@ export default {
       let param = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeName: this.curType
+        TypeNameList: [this.curType]
       };
       //处理查询条件(目前只是单个查,需后台支持)
       if (this.form.EquipLocalName && this.form.EquipLocalName.length) {
         param.EquipLocalName = this.form.EquipLocalName;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeName = this.form.SubTypeName.toString();
+        param.SubTypeNameList = this.form.SubTypeName;
+      }
+      if (this.locationVal.length == 1) {
+        param.BuildLocalName = this.locationVal[0];
+      } else if (this.locationVal.length == 2) {
+        param.FloorLocalName = this.locationVal[1];
+      } else if (this.locationVal.length == 3) {
+        param.RoomLocalName = this.locationVal[2];
+      } else if (this.locationVal.length == 4) {
+        param.SpaceType = this.locationVal[3];
       }
-      // if (this.locationVal.length == 1) {
-      //   param.BuildLocalName = this.locationVal[0];
-      // } else if (this.locationVal.length == 2) {
-      //   param.FloorLocalName = this.locationVal[1];
-      // } else if (this.locationVal.length == 3) {
-      //   param.RoomLocalName = this.locationVal[2];
-      // } else if (this.locationVal.length == 4) {
-      //   param.SpaceType = this.locationVal[3];
-      // }
       this.rTableLoading = true;
       dynamicPendingobjs(param, res => {
         this.rPage.total = res.Total;
@@ -366,17 +376,11 @@ export default {
         this.rTableLoading = false;
       });
     },
-    //刷新列表
-    refresh() {
-      this.lPage.pageNumber = 1;
-      this.rPage.pageNumber = 1;
-      this.getLeftData();
-      this.getRightData();
-    },
     //清除对应关系成功
     deleteSuc() {
       this.num--;
-      this.refresh();
+      this.queryLeftTable();
+      this.queryRightTable();
     },
     //所在位置修改
     changeLocation(val) {

+ 16 - 8
src/views/point/dynamicdata/index.vue

@@ -25,7 +25,7 @@
           <el-col :span="4">
             <el-form-item>
               <el-input placeholder="请输入设备标识关键字" v-model="form.EquipmentMark" class="input-with-select">
-                <el-button slot="append" icon="el-icon-search"></el-button>
+                <el-button slot="append" icon="el-icon-search" @click="queryTableData"></el-button>
               </el-input>
             </el-form-item>
           </el-col>
@@ -45,7 +45,7 @@
     </div>
     <!-- 列表区域 -->
     <div class="table-area">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-show="1">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-show="1" v-loading="loading">
         <el-table-column label="点位表中出现的所有设备">
           <el-table-column prop="EquipmentMark" label="设备标识" show-overflow-tooltip></el-table-column>
           <el-table-column prop="LocationFlag" label="位置标签" show-overflow-tooltip>
@@ -131,7 +131,8 @@ export default {
       lastUpdateTime: "", //最后更新时间
       tipsType: 1, //提示信息种类
       ruleDialogShow: false, //规则提示执行弹窗
-      ruleDialogStr: "" //规则提示执行弹窗文字
+      ruleDialogStr: "", //规则提示执行弹窗文字
+      loading: false //列表loading
     };
   },
   components: {
@@ -230,23 +231,25 @@ export default {
       let param = {
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize,
-        TypeName: this.curType
+        TypeNameList: [this.curType]
       };
-      //处理查询条件(目前只是单个查,需后台支持)
+      //处理查询条件
       if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
         param.EquipmentMark = this.form.EquipmentMark;
       }
       if (this.form.SubTypeName.length) {
-        param.SubTypeName = this.form.SubTypeName.toString();
+        param.SubTypeNameList = this.form.SubTypeName;
       }
       if (this.form.LocationFlag.length) {
-        param.LocationFlag = this.form.LocationFlag.toString();
+        param.LocationFlagList = this.form.LocationFlag;
       }
       if (this.form.Datasource.length) {
-        param.Datasource = this.form.Datasource.toString();
+        param.DatasourceList = this.form.Datasource;
       }
+      this.loading = true;
       // 查询对应关系(P1)
       dynamicQuery(param, res => {
+        this.loading = false;
         if (res.Result == "success") {
           this.tableData = res.Content;
           this.page.total = res.Total;
@@ -281,6 +284,11 @@ export default {
       this.page.pageNumber = 1;
       this.form.LocationFlag = val;
       this.getTableData();
+    },
+    //查询列表
+    queryTableData() {
+      this.page.pageNumber = 1;
+      this.getTableData();
     }
   },
   watch: {