Your Name
2022-08-11 988558aaa309068fd393cc654be537434b0a15ea
src/views/contingencyManagement/emergencyDrill/drillImplementationEvaluation/component/approvalProgress.vue
@@ -6,6 +6,7 @@
        width="900px"
        draggable
        :fullscreen="full"
        @close="resetForm(ruleFormRef)"
    >
      <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
      <el-form
@@ -433,7 +434,7 @@
    const ruleFormRef = ref<FormInstance>()
    //定义表单
    const ruleForm = ref ({
      drillPlanId: '',
      drillExecuteId: '',
      suitable: '',
      sufficient: '',
      arrival: '',
@@ -450,10 +451,29 @@
      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: [
      ]
@@ -504,18 +524,28 @@
                    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+';'
                      }
                    }
                  }
                });
@@ -530,19 +560,31 @@
                    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+';'
                    }
                    }
                  }
                });
      }
@@ -623,6 +665,34 @@
    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++){
@@ -634,7 +704,7 @@
          if (valid) {
            // console.log(ruleForm.value)
            emergencyDrillEvaluationApi()
                    .editEmergencyDrillEvaluation(ruleForm.value)
                    .editEmergencyDrillEvaluation(realRuleForm.value)
            // emergencyDrillExecuteApi()
            //         .editEmergencyDrillExecute(ruleForm.value)
                    .then((res) => {
@@ -709,6 +779,7 @@
        )
        ruleForm.value.evaluationUserListString+=e[a].realName+';'
      }
      console.log(ruleForm.value.evaluationUserList)
    }
    //el-tree-select回显
    const propse = {
@@ -789,7 +860,8 @@
      department,
      newTreeList,
      selectUser,
      submitForm
      submitForm,
      realRuleForm
    };
  },
});