소스 검색

modify point

haojianlong 5 년 전
부모
커밋
67c37393c7
3개의 변경된 파일40개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 0
      src/api/scan/request.js
  2. 33 5
      src/components/point/dynamicdata/delRelationDialog.vue
  3. 1 1
      src/views/point/dynamicdata/index.vue

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

@@ -1050,4 +1050,10 @@ export function dynamicPointTypeList(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/type-list`;
     let data = param;
     http.postJson(url, data, success)
+}
+
+//动态数据关联-查询对应关系(删除提示页)
+export function dynamicQueryPrompt(param, success) {
+    let url = `${baseUrl}/pointconfig/dynamic/query-prompt`;
+    http.postJson(url, param, success)
 }

+ 33 - 5
src/components/point/dynamicdata/delRelationDialog.vue

@@ -56,7 +56,7 @@
   </el-dialog>
 </template>
 <script>
-import { dynamicDeleteRelation } from "@/api/scan/request";
+import { dynamicDeleteRelation, dynamicQueryPrompt } from "@/api/scan/request";
 export default {
   data() {
     return {
@@ -177,10 +177,11 @@ export default {
       if (res[0].Objs.length > 1 || res[0].Points.length > 1) {
         this.dialogWidth = "60%";
       }
+      this.getDynamicQueryPrompt(row)
       console.log(this.ltableData);
       this.dialogVisible = true;
     },
-    handleClick() {},
+    handleClick() { },
     handleClose(done) {
       this.dialogVisible = false;
     },
@@ -196,10 +197,37 @@ export default {
       });
     },
     //表格中选择事件
-    changeSelection() {}
+    changeSelection() { },
+    //查询两边数据,同时拼删除param
+    getDynamicQueryPrompt(row) {
+      let p1 = {
+        Filters: `TypeCode='${row.TypeCode}';SubTypeCode='${row.SubTypeCode}';EquipmentMark='${row.EquipmentMark}'`,
+        PageNumber: 1,
+        PageSize: 500
+      }
+      //通过标识查询设备实例
+      let promise1 = new Promise((resolve, reject) => {
+        dynamicQueryPrompt(p1, res => {
+          resolve(res)
+        })
+      })
+      let p2 = {
+        Filters: `ObjectID='${row.ObjectID}'`,
+        PageNumber: 1,
+        PageSize: 500
+      }
+      let promise2 = new Promise((resolve, reject) => {
+        dynamicQueryPrompt(p2, res => {
+          resolve(res)
+        })
+      })
+      Promise.all([promise1, promise2]).then(res => {
+        console.log(res)
+      })
+    }
   },
-  mounted() {},
-  created() {}
+  mounted() { },
+  created() { }
 };
 </script>
 <style lang="scss" scoped>

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

@@ -9,7 +9,7 @@
         </el-tabs>
       </el-col>
       <el-col :span="7" style="text-align:right;">
-        <span style="margin-right:10px;">最后配置时间:{{lastUpdateTime}}</span>
+        <span style="margin-right:10px;" v-if="lastUpdateTime">最后配置时间:{{lastUpdateTime}}</span>
         <el-tooltip class="item" effect="dark" :content="tipCon" placement="left">
           <el-button size="small" type="primary" @click="apply" icon="el-icon-refresh" style="float:right;">配置</el-button>
         </el-tooltip>