处理请求历史版本时,id获取不到的bug
This commit is contained in:
parent
95b186d312
commit
fa891f6f38
@ -66,15 +66,16 @@ watch(
|
||||
async (newVal) => {
|
||||
if (newVal) { // 确保值有效
|
||||
try {
|
||||
const { data, error } = await fetchWorkflowHistory(newVal.id);
|
||||
console.log(error)
|
||||
if (!error) {
|
||||
syncOptions.value = data.map(item => ({
|
||||
label: 'v' + item.version,
|
||||
key: item.id+'_'+item.version
|
||||
}));
|
||||
} else {
|
||||
// window.$message?.error('获取工作流历史版本失败');
|
||||
if(newVal.id !== undefined){
|
||||
const { data, error } = await fetchWorkflowHistory(newVal.id);
|
||||
if (!error) {
|
||||
syncOptions.value = data.map(item => ({
|
||||
label: 'v' + item.version,
|
||||
key: item.id+'_'+item.version
|
||||
}));
|
||||
} else {
|
||||
// window.$message?.error('获取工作流历史版本失败');
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('请求失败:', error);
|
||||
@ -150,7 +151,6 @@ const syncOptions = ref([
|
||||
// };
|
||||
|
||||
const handleSyncSelect = async (id: string) => {
|
||||
console.log('id==='+id)
|
||||
if(id =='-1'){
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user