| | |
| | | </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> |
| | |
| | | riskControlMeasureVisible:false, |
| | | riskControlMeasureForm:[], |
| | | inspectionPointData:[], |
| | | keepValueList:[], |
| | | controlActionForm:{ |
| | | workId:'', |
| | | measureId:'', |
| | |
| | | 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) |
| | |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | deleteById(value){ |
| | | if(this.title === '新建巡检计划设定'){ |
| | |
| | | duration:2000, |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | | }) |
| | | } |
| | |
| | | async getControlActionList(){ |
| | | let res = await getInspectionControlAction(this.inspectionTaskForm.workId) |
| | | this.inspectionPointData = res.data.result.checkContents |
| | | }, |
| | | keepValue(value){ |
| | | debugger |
| | | this.keepValueList = value |
| | | } |
| | | } |
| | | } |