Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
5642c7b70c
|
@ -23,8 +23,10 @@ public class ProjectController {
|
||||||
|
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
public List<Project> listAll() {
|
public List<Project> listAll() {
|
||||||
// todo: 限制workspace和org
|
String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId();
|
||||||
return projectService.listAll();
|
ProjectRequest request = new ProjectRequest();
|
||||||
|
request.setWorkspaceId(currentWorkspaceId);
|
||||||
|
return projectService.getProjectList(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
|
|
|
@ -54,10 +54,10 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
organizationList: [
|
organizationList: [
|
||||||
{ index: '7-1', name: '组织1'},
|
{index: '7-1', name: '组织1'},
|
||||||
],
|
],
|
||||||
workspaceList: [
|
workspaceList: [
|
||||||
{ index: '2-1', name: '无工作空间'},
|
{index: '2-1', name: '无工作空间'},
|
||||||
],
|
],
|
||||||
currentUserInfo: {},
|
currentUserInfo: {},
|
||||||
currentUserId: JSON.parse(Cookies.get(TokenKey)).id,
|
currentUserId: JSON.parse(Cookies.get(TokenKey)).id,
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initMenuData() {
|
initMenuData() {
|
||||||
this.$get("/organization/list/userorg/" + this.currentUserId,response => {
|
this.$get("/organization/list/userorg/" + this.currentUserId, response => {
|
||||||
this.organizationList = response.data;
|
this.organizationList = response.data;
|
||||||
})
|
})
|
||||||
this.$get("/workspace/list/userworkspace/" + this.currentUserId, response => {
|
this.$get("/workspace/list/userworkspace/" + this.currentUserId, response => {
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
let user = {};
|
let user = {};
|
||||||
user.id = this.currentUserInfo.id;
|
user.id = this.currentUserInfo.id;
|
||||||
user.lastSourceId = data.id;
|
user.lastSourceId = data.id;
|
||||||
this.$post("/user/update", user);
|
this.$post("/user/switch/source/" + user.lastSourceId, {});
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue