| | |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ruleForm.value = res.data.data; |
| | | ruleForm.value.teamName = '' |
| | | responsibleDepartment.value = [] |
| | | if(res.data.data.teamList){ |
| | | for(var a = 0;a<res.data.data.teamList.length;a++){ |
| | | ruleForm.value.teamName+=res.data.data.teamList[a].teamName+';' |
| | | } |
| | | } |
| | | if(res.data.data.deptList){ |
| | | for(var a = 0;a<res.data.data.deptList.length;a++){ |
| | | |
| | | responsibleDepartment.value.push(res.data.data.deptList[a].departmentId) |
| | | } |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | console.log(ruleForm); |
| | | }; |
| | | //定义树形下拉框 |
| | | const responsibleDepartment = ref(); |
| | | const responsibleDepartment = ref([]); |
| | | const data = ref(); |
| | | |
| | | const submitForm = async (title: string, formEl: FormInstance | undefined) => { |
| | |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | isShowDialog.value = false; |
| | | delete ruleForm.value.teamName |
| | | delete ruleForm.value.teamName |
| | | emergencyPlanApi() |
| | | .addEmergencyPlan(ruleForm.value) |
| | | .then((res) => { |