| | |
| | | width="900px" |
| | | draggable |
| | | :fullscreen="full" |
| | | @close="resetForm(ruleFormRef)" |
| | | > |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-form |
| | |
| | | const ruleFormRef = ref<FormInstance>() |
| | | //定义表单 |
| | | const ruleForm = ref ({ |
| | | drillPlanId: '', |
| | | drillExecuteId: '', |
| | | suitable: '', |
| | | sufficient: '', |
| | | arrival: '', |
| | |
| | | questionAndImprove: '', |
| | | modifyContent: '', |
| | | fileList: [ |
| | | { |
| | | fileName: 'name', |
| | | fileUrl: 'url', |
| | | } |
| | | ], |
| | | userList: [ |
| | | ] |
| | | }); |
| | | //定义表单 |
| | | const realRuleForm = ref ({ |
| | | drillExecuteId: '', |
| | | suitable: '', |
| | | sufficient: '', |
| | | arrival: '', |
| | | supplies: '', |
| | | protection: '', |
| | | whole: '', |
| | | division: '', |
| | | effect: '', |
| | | report: '', |
| | | safety: '', |
| | | rescue: '', |
| | | evacuate: '', |
| | | needModify: '', |
| | | questionAndImprove: '', |
| | | modifyContent: '', |
| | | fileList: [ |
| | | ], |
| | | userList: [ |
| | | ] |
| | |
| | | ruleForm.value.chargeUserListString='' |
| | | ruleForm.value.executeUserListString='' |
| | | ruleForm.value.evaluationUserListString='' |
| | | if(res.data.data.planUserList){ |
| | | for(var a = 0;a<res.data.data.planUserList.length;a++){ |
| | | ruleForm.value.planUserListString += res.data.data.planUserList[a].userName+';' |
| | | } |
| | | } |
| | | |
| | | if(res.data.data.planChargeUserList){ |
| | | for(var a = 0;a<res.data.data.planChargeUserList.length;a++){ |
| | | ruleForm.value.chargeUserListString += res.data.data.planChargeUserList[a].userName+';' |
| | | } |
| | | } |
| | | |
| | | if(res.data.data.executeUserList){ |
| | | for(var a = 0;a<res.data.data.executeUserList.length;a++){ |
| | | ruleForm.value.executeUserListString += res.data.data.executeUserList[a].userName+';' |
| | | } |
| | | } |
| | | //演练负责人(评价) |
| | | if(res.data.data.evaluationUserList){ |
| | | for(var a = 0;a<res.data.data.evaluationUserList.length;a++){ |
| | | ruleForm.value.evaluationUserListString += res.data.data.evaluationUserList[a].userName+';' |
| | | } |
| | | } |
| | | } |
| | | }); |
| | |
| | | ruleForm.value.chargeUserListString='' |
| | | ruleForm.value.executeUserListString='' |
| | | ruleForm.value.evaluationUserListString='' |
| | | |
| | | if(res.data.data.planUserList){ |
| | | for(var a = 0;a<res.data.data.planUserList.length;a++){ |
| | | ruleForm.value.planUserListString += res.data.data.planUserList[a].userName+';' |
| | | } |
| | | } |
| | | |
| | | if(res.data.data.planChargeUserList){ |
| | | for(var a = 0;a<res.data.data.planChargeUserList.length;a++){ |
| | | ruleForm.value.chargeUserListString += res.data.data.planChargeUserList[a].userName+';' |
| | | } |
| | | } |
| | | |
| | | if(res.data.data.executeUserList){ |
| | | for(var a = 0;a<res.data.data.executeUserList.length;a++){ |
| | | ruleForm.value.executeUserListString += res.data.data.executeUserList[a].userName+';' |
| | | } |
| | | } |
| | | //演练负责人(评价) |
| | | if(res.data.data.evaluationUserList){ |
| | | for(var a = 0;a<res.data.data.evaluationUserList.length;a++){ |
| | | ruleForm.value.evaluationUserListString += res.data.data.evaluationUserList[a].userName+';' |
| | | } |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | const submitForm = async (title: string, formEl: FormInstance | undefined) => { |
| | | //演练负责人(评价) |
| | | ruleForm.value.userList = ruleForm.value.evaluationUserList |
| | | |
| | | |
| | | |
| | | realRuleForm.value.drillExecuteId=ruleForm.value.drillExecuteId |
| | | realRuleForm.value.suitable=ruleForm.value.suitable |
| | | realRuleForm.value.sufficient=ruleForm.value.sufficient |
| | | realRuleForm.value.arrival=ruleForm.value.arrival |
| | | realRuleForm.value.supplies=ruleForm.value.supplies |
| | | realRuleForm.value.protection=ruleForm.value.protection |
| | | realRuleForm.value.whole=ruleForm.value.whole |
| | | realRuleForm.value.division=ruleForm.value.division |
| | | realRuleForm.value.effect=ruleForm.value.effect |
| | | realRuleForm.value.report=ruleForm.value.report |
| | | realRuleForm.value.safety=ruleForm.value.safety |
| | | realRuleForm.value.rescue=ruleForm.value.rescue |
| | | realRuleForm.value.evacuate=ruleForm.value.evacuate |
| | | realRuleForm.value.needModify=ruleForm.value.needModify |
| | | realRuleForm.value.questionAndImprove=ruleForm.value.questionAndImprove |
| | | realRuleForm.value.modifyContent=ruleForm.value.modifyContent |
| | | realRuleForm.value.fileList=ruleForm.value.fileList |
| | | if(ruleForm.value.userList){ |
| | | for(var a = 0;a<ruleForm.value.userList.length;a++){ |
| | | realRuleForm.value.userList.push({ |
| | | userUid:ruleForm.value.userList[a].userUid, |
| | | userName:ruleForm.value.userList[a].userName |
| | | }) |
| | | } |
| | | } |
| | | // console.log(ruleForm.value.evaluationUserList) |
| | | // ruleForm.value.userList=[] |
| | | // for(var a = 0;a<ruleForm.value.evaluationUserList.length;a++){ |
| | |
| | | if (valid) { |
| | | // console.log(ruleForm.value) |
| | | emergencyDrillEvaluationApi() |
| | | .editEmergencyDrillEvaluation(ruleForm.value) |
| | | .editEmergencyDrillEvaluation(realRuleForm.value) |
| | | // emergencyDrillExecuteApi() |
| | | // .editEmergencyDrillExecute(ruleForm.value) |
| | | .then((res) => { |
| | |
| | | ) |
| | | ruleForm.value.evaluationUserListString+=e[a].realName+';' |
| | | } |
| | | console.log(ruleForm.value.evaluationUserList) |
| | | } |
| | | //el-tree-select回显 |
| | | const propse = { |
| | |
| | | department, |
| | | newTreeList, |
| | | selectUser, |
| | | submitForm |
| | | submitForm, |
| | | realRuleForm |
| | | }; |
| | | }, |
| | | }); |