发起变更提交参数修改
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!-- 变更申请表 -->
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, h } from 'vue';
|
||||
import { ref, computed, h, watch } from 'vue';
|
||||
import { Icon } from '@iconify/vue'
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { tagTextColor, tagBgColor, tagBorderColor } from '@/utils/common';
|
||||
@@ -17,9 +17,23 @@ import 'vue3-office-preview/lib/style.css'
|
||||
const themeStore = useThemeStore();
|
||||
const changeStore = useChangeStore();
|
||||
|
||||
const props = defineProps(['type','orgTree','templateList','typeList','levelList','isAiOpen','title','currentId','formInfo'])
|
||||
const props = defineProps(['type','orgTree','templateList','typeList','levelList','isAiOpen','title','currentId','formInfo', 'currentForm', 'confirmed'])
|
||||
const emit = defineEmits(['save','submit','confirmTab','update:title']);
|
||||
|
||||
watch(() => props.currentForm, (newVal:any) => {
|
||||
// 过滤出需要的字段
|
||||
const {
|
||||
approval_flow,
|
||||
attachments,
|
||||
change_id,
|
||||
created_at,
|
||||
id,
|
||||
updated_at,
|
||||
...rest
|
||||
} = newVal;
|
||||
form.value = rest;
|
||||
})
|
||||
|
||||
const aiFail = (e: any) => {
|
||||
if (e instanceof AiError) window.$message?.warning(`AI 分析失败:${e.message},可手动填写`);
|
||||
else window.$message?.warning("AI 分析失败,可手动填写");
|
||||
@@ -671,6 +685,7 @@ defineExpose({form, questions, applyAiResult, generateLevel: useAiLevel})
|
||||
:title="props.title"
|
||||
:isAiOpen="props.isAiOpen"
|
||||
:currentForm="form"
|
||||
:confirmed="props.confirmed"
|
||||
@save="saveDraft"
|
||||
@submit="submitConfirm"
|
||||
@confirmTab="confirmTab"
|
||||
|
||||
Reference in New Issue
Block a user