Merge branch 'main' of http://18.167.251.121:10003/aidlab/FiDA_Front
This commit is contained in:
@@ -16,10 +16,18 @@ export const useProjectStore = defineStore('project', () => {
|
|||||||
state.value.id = id
|
state.value.id = id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const clearProject = ()=>{
|
||||||
|
state.value = {
|
||||||
|
id: '',
|
||||||
|
nodeId: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
state,
|
state,
|
||||||
setProject,
|
setProject,
|
||||||
setId
|
setId,
|
||||||
|
clearProject
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ const getVersionTree = ()=>{
|
|||||||
versionTree({
|
versionTree({
|
||||||
projectId: projectStore.state.id
|
projectId: projectStore.state.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
if(!res)return
|
||||||
setVersionsList([res])
|
setVersionsList([res])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
() => proJectId.value,
|
() => proJectId.value,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
|
projectStore.clearProject()
|
||||||
projectStore.setId(newVal)
|
projectStore.setId(newVal)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user