From f409d959d32336927273283d3e20387b1eec4b5d Mon Sep 17 00:00:00 2001 From: shj <1790240199@qq.com> Date: 星期五, 12 八月 2022 11:47:35 +0800 Subject: [PATCH] 对接 --- src/views/contingencyManagement/panManagement/component/openAdd.vue | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/views/contingencyManagement/panManagement/component/openAdd.vue b/src/views/contingencyManagement/panManagement/component/openAdd.vue index 92eff4d..6a6bd50 100644 --- a/src/views/contingencyManagement/panManagement/component/openAdd.vue +++ b/src/views/contingencyManagement/panManagement/component/openAdd.vue @@ -198,6 +198,20 @@ .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) + } + } + } }); } @@ -254,7 +268,7 @@ console.log(ruleForm); }; //定义树形下拉框 - const responsibleDepartment = ref(); + const responsibleDepartment = ref([]); const data = ref(); const submitForm = async (title: string, formEl: FormInstance | undefined) => { @@ -263,7 +277,7 @@ await formEl.validate((valid, fields) => { if (valid) { isShowDialog.value = false; - delete ruleForm.value.teamName + delete ruleForm.value.teamName emergencyPlanApi() .addEmergencyPlan(ruleForm.value) .then((res) => { -- Gitblit v1.9.2