发起变更保存和提交完成

This commit is contained in:
2026-09-10 16:10:06 +08:00
parent db8100130a
commit 8e2bc84b02
5 changed files with 76 additions and 34 deletions
+22 -2
View File
@@ -4,6 +4,7 @@ import { computed, inject, ref } from 'vue';
import { storeToRefs } from 'pinia';
import { Icon } from '@iconify/vue'
import { useChangeStore } from '@/store/modules/change';
import { useAiAnalysisApi } from '@/service/api/change';
const changeStore = useChangeStore();
const { getStepsInfo, getFlowInfo } = storeToRefs(changeStore);
@@ -98,8 +99,27 @@ const setRegenerateLoading = (v: boolean) => {
// 确认标签内容
const confirmTab = async () => {
confirmed.value = !confirmed.value;
emit('confirmTab', props.type, confirmed.value);
let stepId = 0;
if(props.type==='form'){
stepId = 1;
}
if(props.type==='risk'){
stepId = 2;
}
if(props.type==='train'){
stepId = 3;
}
if(props.type==='pssr'){
stepId = 4;
}
if(props.type==='evaluation'){
stepId = 5;
}
const {error} = await useAiAnalysisApi(props.currentId, stepId, {action: !confirmed.value ? 'CONFIRM' : 'CANCEL'});
if(!error){
confirmed.value = !confirmed.value;
emit('confirmTab', props.type, confirmed.value);
}
}
// 保存
const saveDraft = async () => {