Browse Source

fix cancel close dialog

haojianlong 5 years ago
parent
commit
84d0ababa7

+ 6 - 2
src/components/point/dynamicdata/applyRulesDialog.vue

@@ -54,7 +54,7 @@
     </el-table>
     <span slot="footer" class="dialog-footer">
       <span style="font-size:12px;color:red;" v-show="finished">请处理所有冲突</span>
-      <el-button size="small">取消</el-button>
+      <el-button size="small" @click="handleClose">取消</el-button>
       <el-button size="small" type="primary" @click="userSelected">使用选择的表号功能号</el-button>
     </span>
   </el-dialog>
@@ -75,6 +75,7 @@ export default {
       tableData: [],
       activeName: "first", //当前所在tab页
       finished: false, //未处理所有冲突提示文字
+      force: false, //请求冲突-默认false
     };
   },
   methods: {
@@ -87,7 +88,10 @@ export default {
       }
     },
     handleClick() { },
-    handleClose(done) { },
+    handleClose() {
+      this.dialogVisible = false;
+      this.$emit('cancel')
+    },
     //检查是否处理完所有冲突
     userSelected() {
       let flag = true;

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

@@ -29,7 +29,7 @@
     <equip-rules v-if="curType=='设备'" ref="equip" :typeName="curType" @refresh="equipRefresh" :isPending="isPending"></equip-rules>
     <!-- <parts-rules v-if="!curType=='设备'" ref="parts" :typeName="'设备'"></parts-rules> -->
     <!-- 应用规则弹窗 -->
-    <apply-rules-dialog ref="apply" @refresh="getExecuteFeedback"></apply-rules-dialog>
+    <apply-rules-dialog ref="apply" @refresh="getExecuteFeedback" @cancel="cancelApply"></apply-rules-dialog>
     <!-- 规则更新提示 -->
     <el-dialog title="提示" :visible.sync="ruleDialogShow" width="25%" @close="rulesClose">
       <span>{{tipCon}}</span>
@@ -207,6 +207,11 @@ export default {
           }, 2500)
         }
       })
+    },
+    //取消执行
+    cancelApply(){
+      this.isPending = false;
+      this.getPrompt()
     }
   },
   watch: {