diff --git a/src/views/my/initiateChange/index.vue b/src/views/my/initiateChange/index.vue index 36cbedf..f9db046 100644 --- a/src/views/my/initiateChange/index.vue +++ b/src/views/my/initiateChange/index.vue @@ -59,6 +59,18 @@ const confirmed = ref<{[key: string]: boolean}>({ // 变更预分析表单数据 const changePreForm = ref(null) const changeApplyForm = ref(null) +// 当前申请表所选变更类型的文本编码(供 PSSR 等 AI 接口使用) +const applyTypeLabel = computed(() => typeList.value.find((t) => t.value === changeApplyForm.value?.change_type)?.label ?? ''); + +// AI 生成变更申请单(变更预识别页派发):回填申请表并切换标签 +const onApplyGenerated = (res: any) => { + if (res?.name) title.value = res.name; + changeApplyRef.value?.applyAiResult(res); + // 直接切 tab 不经过 tabChange,需同步捕获预识别表单供其他标签页 AI 接口使用 + changePreForm.value = changePreRef.value?.form; + tab.value = 'form'; + window.$message?.success("变更申请单已生成:AI 自动总结名称、预填内容,均可手动修改"); +} // **********************tab切换*********************** const TABS = [ @@ -289,6 +301,7 @@ onMounted(() => { :title="title" :currentId="currentId" @save="saveDraft" + @apply-generated="onApplyGenerated" /> @@ -306,7 +319,8 @@ onMounted(() => { :formInfo="changePreForm" @save="saveDraft" @submit="submitConfirm" - @confirmTab="confirmTab" + @confirmTab="confirmTab" + @update:title="(v: string) => title = v" /> @@ -330,7 +344,8 @@ onMounted(() => { :type="tab" :isAiOpen="aiEnabled" :title="title" - :currentId="currentId" + :currentId="currentId" + :formInfo="changePreForm" @save="saveDraft" @submit="submitConfirm" @confirmTab="confirmTab" @@ -343,7 +358,9 @@ onMounted(() => { :type="tab" :isAiOpen="aiEnabled" :title="title" - :currentId="currentId" + :currentId="currentId" + :formInfo="changePreForm" + :changeType="applyTypeLabel" @save="saveDraft" @submit="submitConfirm" @confirmTab="confirmTab" diff --git a/src/views/my/initiateChange/modules/changeApply.vue b/src/views/my/initiateChange/modules/changeApply.vue index eb21b47..08d49ec 100644 --- a/src/views/my/initiateChange/modules/changeApply.vue +++ b/src/views/my/initiateChange/modules/changeApply.vue @@ -1,782 +1,834 @@ - - - - - \ No newline at end of file diff --git a/src/views/my/initiateChange/modules/changePre.vue b/src/views/my/initiateChange/modules/changePre.vue index a442fd2..1f5883a 100644 --- a/src/views/my/initiateChange/modules/changePre.vue +++ b/src/views/my/initiateChange/modules/changePre.vue @@ -1,229 +1,206 @@ - - - - - \ No newline at end of file diff --git a/src/views/my/initiateChange/modules/changeTraining.vue b/src/views/my/initiateChange/modules/changeTraining.vue index 653268b..48bc4f8 100644 --- a/src/views/my/initiateChange/modules/changeTraining.vue +++ b/src/views/my/initiateChange/modules/changeTraining.vue @@ -1,74 +1,106 @@ - - - - - \ No newline at end of file diff --git a/src/views/my/initiateChange/modules/evaluation.vue b/src/views/my/initiateChange/modules/evaluation.vue index 31d0746..619201e 100644 --- a/src/views/my/initiateChange/modules/evaluation.vue +++ b/src/views/my/initiateChange/modules/evaluation.vue @@ -1,240 +1,295 @@ - - - - - \ No newline at end of file diff --git a/src/views/my/initiateChange/modules/footer.vue b/src/views/my/initiateChange/modules/footer.vue index 67e5750..8f15742 100644 --- a/src/views/my/initiateChange/modules/footer.vue +++ b/src/views/my/initiateChange/modules/footer.vue @@ -1,208 +1,212 @@ - - - -