فهرست منبع

modify point delete

haojianlong 5 سال پیش
والد
کامیت
11b1a03f93

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

@@ -82,7 +82,7 @@ export default {
       };
       let o2 = {
         EquipmentMark: row.EquipmentMark,
-        TypeName: row.TypeName
+        SubTypeCode: row.SubTypeCode
       };
       let Objs = [];
       let Points = [];

+ 2 - 1
src/components/point/dynamicdata/equipRules.vue

@@ -184,7 +184,8 @@ export default {
     //刷新列表
     refresh() {
       this.page.pageNumber = 1;
-      this.getTypeNames();
+      this.$emit('refresh',this.typeName);
+      this.getTableData();
     },
     //数据字典设备类型修改
     changeDictionary(val) {

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

@@ -386,8 +386,8 @@ export default {
       this.getLeftData();
     },
     //返回
-    goback(){
-      this.$router.go(-1);
+    goback() {
+      this.$router.push({ path: '/point/dynamicdata', query: { typeName: this.typeName } })
     }
   },
   watch: {

+ 10 - 2
src/views/point/dynamicdata/index.vue

@@ -15,7 +15,7 @@
         </el-tooltip>
       </el-col>
     </el-row>
-    <equip-rules v-if="curType=='设备'" ref="equip" :typeName="curType"></equip-rules>
+    <equip-rules v-if="curType=='设备'" ref="equip" :typeName="curType" @refresh="equipRefresh"></equip-rules>
     <!-- <parts-rules v-if="!curType=='设备'" ref="parts" :typeName="'设备'"></parts-rules> -->
     <!-- 应用规则弹窗 -->
     <apply-rules-dialog ref="apply"></apply-rules-dialog>
@@ -62,6 +62,10 @@ export default {
     partsRules
   },
   created() {
+    let typeName = this.$route.query.typeName;
+    if(typeName){
+      this.curType = typeName
+    }
     this.init();
   },
   mounted() { },
@@ -107,7 +111,6 @@ export default {
             //记录上次操作的tab页
             this.curType =
               this.curType != 0 ? this.curType : this.typeList[0].Name;
-            // this.getTableData();
           } else {
             this.tableData = [];
           }
@@ -129,6 +132,11 @@ export default {
     },
     //现在执行
     nowDo() { },
+    //刷新设备类表
+    equipRefresh(val){
+      this.curType = val;
+      this.getTypeNames()
+    }
   },
   watch: {
     projectId() {