From aa02c07d9b9b4eebb0771e5bdb97bc5d109c1ded Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Thu, 23 Jun 2022 14:33:11 +0800
Subject: [PATCH] 'lct'
---
src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue | 47 ++++++++++++++++++++++++++---------------------
1 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue b/src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue
index 4b84299..2ac04f1 100644
--- a/src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue
+++ b/src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue
@@ -20,13 +20,13 @@
<el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" @click="showMeasureDetail(scope.row)" v-show="ifEdit">详情</el-button>
- <el-button type="text" style="color:red;" @click="deleteById(scope.$index)">删除</el-button>
+ <el-button type="text" style="color:red;" @click="deleteById(scope.$index,scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog :visible.sync="controlActionVisible" append-to-body :close-on-click-modal="false" width="80%">
- <control-action ref="controlAction" @closeDialog="closeDialog" @giveRiskControlId="receiveRiskControlId"></control-action>
+ <control-action ref="controlAction" @closeDialog="closeDialog" @giveRiskControlId="receiveRiskControlId" @keepValue="keepValue"></control-action>
</el-dialog>
</div>
</template>
@@ -47,6 +47,7 @@
riskControlMeasureVisible:false,
riskControlMeasureForm:[],
inspectionPointData:[],
+ keepValueList:[],
controlActionForm:{
workId:'',
measureId:'',
@@ -60,36 +61,36 @@
showControlAction (){
this.controlActionVisible = true
setTimeout( () => {
- this.$refs.controlAction.ifShowButton()
+ this.$refs.controlAction.ifShowButton(this.inspectionPointData)
})
},
showMeasureDetail(val){
this.controlActionVisible = true
setTimeout( () => {
- this.$refs.controlAction.showMeasureDetail(val)
- this.$refs.controlAction.ifShowSelf = false
+ this.$refs.controlAction.showMeasureDetail(val)
+ this.$refs.controlAction.ifShowSelf = false
})
-
+
},
closeDialog(){
this.controlActionVisible = false
},
async receiveRiskControlId(value) {
- debugger
this.controlActionVisible = false
if(this.title === '新建巡检计划设定'){
if(value){
- // this.inspectionPointData = JSON.parse(JSON.stringify(value.map( item => {
- // return {
- // id:item.id,
- // content:item.riskMeasureDesc
- // }
- // })))
- if(this.inspectionPointData.findIndex(item => item.id === value.id) === -1) {
- this.inspectionPointData.push({id:value.id,content:value.troubleshootContent})
- this.$emit('giveToForm',this.inspectionPointData)
+ this.inspectionPointData = JSON.parse(JSON.stringify(value.map( item => {
+ return {
+ id:item.id,
+ content:item.troubleshootContent
}
- }
+ })))
+ this.$emit('giveToForm',this.inspectionPointData)
+ // if(this.inspectionPointData.findIndex(item => item.id === value.id) === -1) {
+ // this.inspectionPointData.push({id:value.id,content:value.troubleshootContent})
+ // this.$emit('giveToForm',this.inspectionPointData)
+ // }
+ }
}else{
this.controlActionForm.workId = JSON.stringify(this.inspectionTaskForm.workId)
this.controlActionForm.measureId =JSON.stringify(value.id)
@@ -108,9 +109,9 @@
message:res.data.message
})
}
- }
+ }
},
- deleteById(value){
+ deleteById(value,scope){
if(this.title === '新建巡检计划设定'){
this.inspectionPointData.splice(value,1)
}else{
@@ -119,7 +120,8 @@
cancelButtonText:'取消',
type:'warning',
}).then(()=> {
- deleteInspectionControlAction({workId:value.workId,measureId:value.measureId}).then( (res)=>{
+ debugger
+ deleteInspectionControlAction({workId:scope.workId,measureId:scope.measureId}).then( (res)=>{
if(res.data.code === '200'){
this.getControlActionList()
this.$notify({
@@ -129,7 +131,7 @@
duration:2000,
})
}
-
+
})
})
}
@@ -138,6 +140,9 @@
async getControlActionList(){
let res = await getInspectionControlAction(this.inspectionTaskForm.workId)
this.inspectionPointData = res.data.result.checkContents
+ },
+ keepValue(value){
+ this.keepValueList = value
}
}
}
--
Gitblit v1.9.2