refactor: 删除无用代码
This commit is contained in:
parent
0b38df4576
commit
62b02eeb81
|
@ -84,9 +84,4 @@ public class ProjectController {
|
|||
projectService.updateProject(Project);
|
||||
}
|
||||
|
||||
@PostMapping("/search")
|
||||
public List<ProjectDTO> searchProject(@RequestBody ProjectRequest projectRequest) {
|
||||
projectRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||
return projectService.getProjectList(projectRequest);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,16 +67,6 @@ export default {
|
|||
components: {SearchList, MsCreateTest, MsCreateButton, MsShowAll, MsRecentList, ProjectChange},
|
||||
data() {
|
||||
return {
|
||||
projectRecent: {
|
||||
title: this.$t('project.recent'),
|
||||
url: "/project/recent/5",
|
||||
index: function (item) {
|
||||
return '/api/test/list/' + item.id;
|
||||
},
|
||||
router: function (item) {
|
||||
return {name: 'ApiTestList', params: {projectId: item.id, projectName: item.name}}
|
||||
}
|
||||
},
|
||||
testRecent: {
|
||||
title: this.$t('load_test.recent'),
|
||||
url: "/api/recent/5",
|
||||
|
@ -101,19 +91,10 @@ export default {
|
|||
currentProject: ''
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// '$route'(to) {
|
||||
// this.init();
|
||||
// },
|
||||
// },
|
||||
methods: {
|
||||
registerEvents() {
|
||||
ApiEvent.$on(LIST_CHANGE, () => {
|
||||
// // todo 这里偶尔会有 refs 为空的情况
|
||||
// if (!this.$refs.projectRecent) {
|
||||
// return;
|
||||
// }
|
||||
// this.$refs.projectRecent.recent();
|
||||
this.$refs.testRecent.recent();
|
||||
this.$refs.reportRecent.recent();
|
||||
});
|
||||
|
@ -124,17 +105,6 @@ export default {
|
|||
this.isRouterAlive = true;
|
||||
});
|
||||
},
|
||||
// init() {
|
||||
// let path = this.$route.path;
|
||||
// if (path.indexOf("/api/test/list") >= 0 && !!this.$route.params.projectId) {
|
||||
// this.apiTestProjectPath = path;
|
||||
// //不激活项目菜单栏
|
||||
// this.isProjectActivation = false;
|
||||
// this.reload();
|
||||
// } else {
|
||||
// this.isProjectActivation = true;
|
||||
// }
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
this.registerEvents();
|
||||
|
|
|
@ -76,13 +76,6 @@ export default {
|
|||
})
|
||||
}
|
||||
},
|
||||
search() {
|
||||
if (hasRoles(ROLE_TEST_VIEWER, ROLE_TEST_USER, ROLE_TEST_MANAGER)) {
|
||||
this.result = this.$post("/project/search", {name: this.searchString},response => {
|
||||
this.items = response.data;
|
||||
})
|
||||
}
|
||||
},
|
||||
query(queryString) {
|
||||
this.items = queryString ? this.searchArray.filter(this.createFilter(queryString)) : this.searchArray;
|
||||
},
|
||||
|
|
|
@ -59,16 +59,6 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
projectRecent: {
|
||||
title: this.$t('project.recent'),
|
||||
url: "/project/recent/5",
|
||||
index(item) {
|
||||
return '/performance/test/' + item.id;
|
||||
},
|
||||
router(item) {
|
||||
return {name: 'perPlan', params: {projectId: item.id, projectName: item.name}}
|
||||
}
|
||||
},
|
||||
testRecent: {
|
||||
title: this.$t('load_test.recent'),
|
||||
url: "/performance/recent/5",
|
||||
|
@ -95,10 +85,6 @@ export default {
|
|||
registerEvents() {
|
||||
PerformanceEvent.$on(LIST_CHANGE, () => {
|
||||
// // todo 这里偶尔会有 refs 为空的情况
|
||||
// if (!this.$refs.projectRecent) {
|
||||
// return;
|
||||
// }
|
||||
// this.$refs.projectRecent.recent();
|
||||
this.$refs.testRecent.recent();
|
||||
this.$refs.reportRecent.recent();
|
||||
});
|
||||
|
|
|
@ -69,16 +69,6 @@ export default {
|
|||
testCaseProjectPath: '',
|
||||
isProjectActivation: true,
|
||||
currentProject: '',
|
||||
projectRecent: {
|
||||
title: this.$t('project.recent'),
|
||||
url: "/project/recent/5",
|
||||
index: function (item) {
|
||||
return '/track/case/' + item.id;
|
||||
},
|
||||
router: function (item) {
|
||||
return {name: 'testCase', params: {projectId: item.id, projectName: item.name}}
|
||||
}
|
||||
},
|
||||
caseRecent: {
|
||||
title: this.$t('test_track.recent_case'),
|
||||
url: "/test/case/recent/5",
|
||||
|
@ -126,14 +116,6 @@ export default {
|
|||
},
|
||||
init() {
|
||||
let path = this.$route.path;
|
||||
// if (path.indexOf("/track/case") >= 0 && !!this.$route.params.projectId) {
|
||||
// this.testCaseProjectPath = path;
|
||||
// //不激活项目菜单栏
|
||||
// this.isProjectActivation = false;
|
||||
// this.reload();
|
||||
// } else {
|
||||
// this.isProjectActivation = true;
|
||||
// }
|
||||
if (path.indexOf("/track/plan/view") >= 0) {
|
||||
this.testPlanViewPath = path;
|
||||
this.reload();
|
||||
|
@ -150,10 +132,6 @@ export default {
|
|||
registerEvents() {
|
||||
TrackEvent.$on(LIST_CHANGE, () => {
|
||||
// // todo 这里偶尔会有 refs 为空的情况
|
||||
// if (!this.$refs.projectRecent) {
|
||||
// return;
|
||||
// }
|
||||
// this.$refs.projectRecent.recent();
|
||||
this.$refs.planRecent.recent();
|
||||
this.$refs.caseRecent.recent();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue