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