|
|
@ -1,12 +1,12 @@ |
|
|
|
<template> |
|
|
|
<el-dialog title="提示" :visible.sync="dialogVisible" width="1370px" :before-close="handleCancle"> |
|
|
|
<div class="dialog-h-content"> |
|
|
|
<span slot="title"> |
|
|
|
<span slot="title"> |
|
|
|
<span v-if="pageType == 'add'">新增</span> |
|
|
|
<span v-if="pageType == 'edit'">修改</span> |
|
|
|
<span v-if="pageType == 'view'">查看</span> |
|
|
|
<span v-if="pageType == 'patrol'">巡查记录</span> |
|
|
|
</span> |
|
|
|
<div class="dialog-h-content"> |
|
|
|
<div class="div_form"> |
|
|
|
<el-form :inline="true" :model="formData" ref="form" :rules="dataRule" :label-width="'90px'" |
|
|
|
v-if="pageType != 'patrol'"> |
|
|
@ -160,10 +160,10 @@ |
|
|
|
</el-row> |
|
|
|
<el-row v-if="(checkResultFlag === 1 || tableData.length === 0) && patrolForm.checkResultFlag === '0'"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="整改意见" prop="principalName" |
|
|
|
<el-form-item label="整改要求" prop="rectificationOpinion" |
|
|
|
style="white-space: nowrap;overflow: hidden;"> |
|
|
|
<el-input v-model="patrolForm.rectificationOpinion" rows="3" size="small" |
|
|
|
placeholder="请输入整改意见"></el-input> |
|
|
|
placeholder="请输入整改要求"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -204,7 +204,7 @@ |
|
|
|
style="color: #888; ">{{item.flag?'已整改隐患':'隐患明细'}}: </span> |
|
|
|
<div v-if="item.hiddenDangeList"> |
|
|
|
<p style="margin-left: 60px;" |
|
|
|
v-for="(itemC,index) in item.hiddenDangeList.filter(item=>item.hazardStatus ==1)"> |
|
|
|
v-for="(itemC,index) in item.hiddenDangeList.filter(itemF=>itemF.hazardStatus ==item.flag?1:0)"> |
|
|
|
{{index+1}}.{{itemC.hazardDesc}}</p> |
|
|
|
</div> |
|
|
|
<span v-else>--</span> |
|
|
@ -555,7 +555,7 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if(this.pageType === 'patrol'){ |
|
|
|
if(this.checkboxOptions.length > 0 && this.hiddenDangeArr.length === 0 && this.checkResultFlag != '1'){ |
|
|
|
if(this.checkboxOptions.length > 0 && this.hiddenDangeArr.length != 0 && this.checkResultFlag != '1' && this.this.patrolForm.checkResultFlag != '1'){ |
|
|
|
this.checkboxMessageFlag = true; |
|
|
|
}else if(this.patrolForm.checkResultFlag == '0'&& this.inputList[0].hazardDesc === '' && this.checkResultFlag == '1'){ |
|
|
|
this.inputMessageFlag = true; |
|
|
@ -590,7 +590,7 @@ export default { |
|
|
|
}else{ |
|
|
|
item.hazardStatus = '0'; |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
for (let i in this.inputList) { |
|
|
|
let option = this.inputList[i]; |
|
|
@ -604,10 +604,16 @@ export default { |
|
|
|
...this.inputList.filter(item => item.hazardDesc.trim() !== ''), |
|
|
|
...this.checkboxOptions |
|
|
|
]; |
|
|
|
if(this.patrolForm.rectificationOpinion){ |
|
|
|
params.hiddenDangeList.push({ |
|
|
|
hazardStatus:'2', |
|
|
|
hazardDesc:this.patrolForm.rectificationOpinion |
|
|
|
}) |
|
|
|
delete params.rectificationOpinion; |
|
|
|
} |
|
|
|
params.companyId = this.detailId; |
|
|
|
params.attachmentUrls = this.fileList; |
|
|
|
} |
|
|
|
console.log(params); |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.$message.success('操作成功'); |
|
|
|