发起变更保存和提交完成
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user