From e8d946a82907aa530ff086987d3ec7d2c04a90d2 Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: 星期二, 15 十一月 2022 13:09:55 +0800
Subject: [PATCH] 默认更改列表

---
 src/views/doublePreventAction/riskLevelManage/controlAction/index.vue |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/src/views/doublePreventAction/riskLevelManage/controlAction/index.vue b/src/views/doublePreventAction/riskLevelManage/controlAction/index.vue
index 036fb74..23439bc 100644
--- a/src/views/doublePreventAction/riskLevelManage/controlAction/index.vue
+++ b/src/views/doublePreventAction/riskLevelManage/controlAction/index.vue
@@ -21,7 +21,7 @@
             <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button>
             <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showRiskControlMeasureForm('','新增')" v-show="showCurrent">新增</el-button>
             <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary"  @click="showImportDialog()">导入</el-button>
-            <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="exportToExcel">导出</el-button>
+<!--            <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="exportToExcel">导出</el-button>-->
         </div>
         <div class="table_content">
             <el-table
@@ -318,15 +318,15 @@
             },
 
             changeClassifyTwoList(){
-                if(this.riskControlMeasureForm.classify1 === '工程技术'){
+                if(this.riskControlMeasureForm.classify1 === 1){
                     this.classifyTwoList = this.classifyOneList[0].subClassify
                     this.riskControlMeasureForm.classify2 = ''
                     this.riskControlMeasureForm.classify3 = ''
-                }else if(this.riskControlMeasureForm.classify1 === '维护保养') {
+                }else if(this.riskControlMeasureForm.classify1 === 2) {
                     this.classifyTwoList = this.classifyOneList[1].subClassify
                     this.riskControlMeasureForm.classify2 = ''
                     this.riskControlMeasureForm.classify3 = ''
-                }else if(this.riskControlMeasureForm.classify1 === '操作行为') {
+                }else if(this.riskControlMeasureForm.classify1 === 3) {
                     this.classifyTwoList = this.classifyOneList[2].subClassify
                     this.riskControlMeasureForm.classify2 = ''
                     this.riskControlMeasureForm.classify3 = ''
@@ -366,6 +366,9 @@
                     }
                 }else{
                     this.title = '修改'
+                    debugger
+                    this.riskControlMeasureForm.classify1 = JSON.parse(JSON.stringify(value)).classify1
+                    this.changeClassifyTwoList()
                     for( let key in this.riskControlMeasureForm){
                         this.riskControlMeasureForm[key] = JSON.parse(JSON.stringify(value))[key]
                     }
@@ -426,14 +429,22 @@
                     cancelButtonText:'取消',
                     type:'warning',
                 }).then(()=> {
-                    deleteRiskControlMeasure({id:val.id}).then( ()=>{
-                        this.getRiskControlMeasureData()
-                        this.$notify({
-                            title:'成功',
-                            message:'删除成功',
-                            type:'success',
-                            duration:2000,
-                        })
+                    deleteRiskControlMeasure({id:val.id}).then( (res)=>{
+                        if(res.data.code === '200'){
+                            this.getRiskControlMeasureData()
+                            this.$notify({
+                                title:'成功',
+                                message:'删除成功',
+                                type:'success',
+                                duration:2000,
+                            })
+                        }else{
+                            this.$message({
+                                type:'warning',
+                                message:res.data.message
+                            })
+                        }
+
                     })
                 })
             },
@@ -551,7 +562,6 @@
             },
 
             giveValue(value){
-                debugger
                 this.$emit('giveRiskControlId',this.riskControlMeasureIdList)
                 // this.$emit('giveRiskControlId',value)
             },

--
Gitblit v1.9.2