round完成

This commit is contained in:
2023-06-28 21:02:31 +08:00
parent 1063053510
commit 67cb0df5b9
12 changed files with 198 additions and 35 deletions

View File

@@ -70,7 +70,7 @@ const useUserStore = defineStore("user", {
return loginAPI
.login(form)
.then((res) => {
if (res.success) {
if (res.data.success === true) {
this.setToken(res.data.token)
return true
} else {

View File

@@ -14,10 +14,16 @@ const useTreeDataStore = defineStore("treeDataStore", {
async initTreeData(projectId) {
if (this.treeData.length === 0) {
const roundData = await projectApi.getRoundInfo(projectId)
this.treeData = roundData
this.originTreeData = roundData
this.treeData = roundData.data
this.originTreeData = roundData.data
}
},
// 用于新增轮次后显示
async resetTreeData(projectId) {
const roundData = await projectApi.getRoundInfo(projectId)
this.treeData = roundData.data
this.originTreeData = roundData.data
},
setCurrentNode(nodeKey) {
this.currentNode = nodeKey
}