diff --git a/src/views/my/initiateChange/index.vue b/src/views/my/initiateChange/index.vue index 410fa81..50489dc 100644 --- a/src/views/my/initiateChange/index.vue +++ b/src/views/my/initiateChange/index.vue @@ -163,8 +163,7 @@ const getAllFormData = () => { return { title: title.value, precheck:{...changePreForm}, - apply_form:{...changeApplyData,level_score:newQuestions}, - approval_flow: {steps:flowList}, + apply_form:{...changeApplyData,level_score:newQuestions,approval_flow: {steps:flowList}}, risk_records:changeRiskForm, train:{...changeTrainingForm}, pssr:{items:allItems}, @@ -260,7 +259,7 @@ const getChangeDetail = async () => { // 解析时间戳 changeApplyForm.value.plan_use_date = anyToTimestamp(changeApplyForm.value.plan_use_date); changeApplyForm.value.restore_deadline = anyToTimestamp(changeApplyForm.value.restore_deadline); - + riskAnalysisForm.value = data.risk_records; changeTrainingForm.value = data.train; pssrForm.value = data.pssr; diff --git a/src/views/my/initiateChange/modules/changeApply.vue b/src/views/my/initiateChange/modules/changeApply.vue index d578e9a..b72b6c0 100644 --- a/src/views/my/initiateChange/modules/changeApply.vue +++ b/src/views/my/initiateChange/modules/changeApply.vue @@ -203,11 +203,16 @@ const filterMembersBySpecialties = (data: any, specialties: string[]) => { // 当前模板 const currentTemplate = computed(() => { - let template = props.templateList.find((item: any) => - item.level === form.value?.change_level && - item.category === form.value?.change_type && - item.duration === form.value?.duration_type - ) || null; + let template = null; + if(props.currentForm?.approval_flow?.steps && props.currentForm?.approval_flow?.steps.length){ + template = props.currentForm?.approval_flow; + }else{ + template = props.templateList.find((item: any) => + item.level === form.value?.change_level && + item.category === form.value?.change_type && + item.duration === form.value?.duration_type + ) || null; + } footerRef.value?.clearApprovers(); changeStore.setStepsInfo(template?template.steps:[]); return template?template:null;