From 7d7621c76d725e8a1fba689cba9b512c22748abe Mon Sep 17 00:00:00 2001
From: cqf <2252655793@qq.com>
Date: 星期三, 11 五月 2022 11:33:58 +0800
Subject: [PATCH] 导入接口对接

---
 src/views/hiddenDangerManagement/index.vue |   40 ++++++++++++++++++++++++++++++++++++----
 1 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/src/views/hiddenDangerManagement/index.vue b/src/views/hiddenDangerManagement/index.vue
index bff6334..79a9d4e 100644
--- a/src/views/hiddenDangerManagement/index.vue
+++ b/src/views/hiddenDangerManagement/index.vue
@@ -99,7 +99,7 @@
         <el-row class="title-center">
             <el-col :span="7">
                 <el-radio-group v-model="listQuery.form.alter_status">
-                    <el-radio-button v-for="item in statusList" :label="item.value" :key="item.value"></el-radio-button>
+                    <el-radio-button v-for="item in statusList" :label="item.value"  :key="item.value" @change.native="getPageList"></el-radio-button>
                 </el-radio-group>
             </el-col>
             <el-col :span="10">
@@ -121,6 +121,7 @@
                                 type="primary"
                                 class="btns"
                                 size="small"
+                                v-show="buttomShow"
                                 icon="el-icon-bottom"
                             >导入
                             </el-button
@@ -131,6 +132,7 @@
                             type="primary"
                             class="btns"
                             size="small"
+                            v-show="buttomShow"
                             icon="el-icon-download"
                         >下载模板
                         </el-button
@@ -143,6 +145,7 @@
                     class="btns"
                     type="primary"
                     size="small"
+                    v-show="buttomShow"
                     @click="fillRectification()"
                 >填写整改
                 </el-button
@@ -155,11 +158,20 @@
                 >填写督查
                 </el-button
                 >
-                <el-button class="btns" type="primary" icon="el-icon-plus" @click="jump" size="small"
+                <el-button
+                    class="btns"
+                    type="primary"
+                    size="small"
+                    v-show="!buttomShow"
+                    @click="cancel()"
+                >撤销
+                </el-button
+                >
+                <el-button class="btns" type="primary" icon="el-icon-plus" @click="jump" size="small" v-show="buttomShow"
                 >添加
                 </el-button
                 >
-                <el-button size="small" @click="deleteBath"
+                <el-button size="small" @click="deleteBath" v-show="buttomShow"
                 >批量删除
                 </el-button
                 >
@@ -232,6 +244,7 @@
 export default {
     data() {
         return {
+            buttomShow:true,
             fileList: [],
             statusList: [],
             options: [],
@@ -266,6 +279,16 @@
         this.initBC()
         this.initJCLB()
         this.initReformStatus()
+    },
+    watch:{
+        "listQuery.form.alter_status":function (newVal,oldVal) {
+            console.log(newVal)
+            if(newVal == "整改完成"){
+                this.buttomShow = false;
+            }else{
+                this.buttomShow = true;
+            }
+        }
     },
     methods: {
         initReformStatus() {
@@ -477,10 +500,19 @@
             }
             return true
         },
+
+        cancel(){
+            var checkData = this.$refs.dataTable.selection;
+            if (checkData.length < 1) {
+                this.$message({type: 'warn', message: "请勾选需要撤销的数据!", duration: 3000})
+                return;
+            }
+        },
+
         deleteBath() {
             var checkData = this.$refs.dataTable.selection;
             if (checkData.length < 1) {
-                this.$message({type: 'warn', message: "请选择勾选需要删除的数据!", duration: 3000})
+                this.$message({type: 'warn', message: "请勾选需要删除的数据!", duration: 3000})
                 return;
             }
             var deleteIds = "";

--
Gitblit v1.9.2