refactor: 删除无用代码

This commit is contained in:
shiziyuan9527 2020-12-16 14:38:13 +08:00
parent 0b38df4576
commit 62b02eeb81
5 changed files with 0 additions and 78 deletions

View File

@ -84,9 +84,4 @@ public class ProjectController {
projectService.updateProject(Project); projectService.updateProject(Project);
} }
@PostMapping("/search")
public List<ProjectDTO> searchProject(@RequestBody ProjectRequest projectRequest) {
projectRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
return projectService.getProjectList(projectRequest);
}
} }

View File

@ -67,16 +67,6 @@ export default {
components: {SearchList, MsCreateTest, MsCreateButton, MsShowAll, MsRecentList, ProjectChange}, components: {SearchList, MsCreateTest, MsCreateButton, MsShowAll, MsRecentList, ProjectChange},
data() { data() {
return { 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: { testRecent: {
title: this.$t('load_test.recent'), title: this.$t('load_test.recent'),
url: "/api/recent/5", url: "/api/recent/5",
@ -101,19 +91,10 @@ export default {
currentProject: '' currentProject: ''
} }
}, },
// watch: {
// '$route'(to) {
// this.init();
// },
// },
methods: { methods: {
registerEvents() { registerEvents() {
ApiEvent.$on(LIST_CHANGE, () => { ApiEvent.$on(LIST_CHANGE, () => {
// // todo refs // // todo refs
// if (!this.$refs.projectRecent) {
// return;
// }
// this.$refs.projectRecent.recent();
this.$refs.testRecent.recent(); this.$refs.testRecent.recent();
this.$refs.reportRecent.recent(); this.$refs.reportRecent.recent();
}); });
@ -124,17 +105,6 @@ export default {
this.isRouterAlive = true; 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() { mounted() {
this.registerEvents(); this.registerEvents();

View File

@ -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) { query(queryString) {
this.items = queryString ? this.searchArray.filter(this.createFilter(queryString)) : this.searchArray; this.items = queryString ? this.searchArray.filter(this.createFilter(queryString)) : this.searchArray;
}, },

View File

@ -59,16 +59,6 @@ export default {
}, },
data() { data() {
return { 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: { testRecent: {
title: this.$t('load_test.recent'), title: this.$t('load_test.recent'),
url: "/performance/recent/5", url: "/performance/recent/5",
@ -95,10 +85,6 @@ export default {
registerEvents() { registerEvents() {
PerformanceEvent.$on(LIST_CHANGE, () => { PerformanceEvent.$on(LIST_CHANGE, () => {
// // todo refs // // todo refs
// if (!this.$refs.projectRecent) {
// return;
// }
// this.$refs.projectRecent.recent();
this.$refs.testRecent.recent(); this.$refs.testRecent.recent();
this.$refs.reportRecent.recent(); this.$refs.reportRecent.recent();
}); });

View File

@ -69,16 +69,6 @@ export default {
testCaseProjectPath: '', testCaseProjectPath: '',
isProjectActivation: true, isProjectActivation: true,
currentProject: '', 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: { caseRecent: {
title: this.$t('test_track.recent_case'), title: this.$t('test_track.recent_case'),
url: "/test/case/recent/5", url: "/test/case/recent/5",
@ -126,14 +116,6 @@ export default {
}, },
init() { init() {
let path = this.$route.path; 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) { if (path.indexOf("/track/plan/view") >= 0) {
this.testPlanViewPath = path; this.testPlanViewPath = path;
this.reload(); this.reload();
@ -150,10 +132,6 @@ export default {
registerEvents() { registerEvents() {
TrackEvent.$on(LIST_CHANGE, () => { TrackEvent.$on(LIST_CHANGE, () => {
// // todo refs // // todo refs
// if (!this.$refs.projectRecent) {
// return;
// }
// this.$refs.projectRecent.recent();
this.$refs.planRecent.recent(); this.$refs.planRecent.recent();
this.$refs.caseRecent.recent(); this.$refs.caseRecent.recent();
}); });