diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index eac63f1e15..25c572e192 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -62,14 +62,14 @@ - - - - - - - - + + + + + + + + @@ -463,6 +463,9 @@ export default { } else if (this.form.type === 'performance' || this.form.type === 'api') { url = '/' + this.form.type + '/list/' + this.projectId } + if (!url) { + return; + } return new Promise((resolve, reject) => { this.$get(url).then(res => { console.log(res.data.data) @@ -475,7 +478,7 @@ export default { }).catch((err) => { reject(err) }) - }) + }); }, /* lazyLoad(node, resolve){ const { level } = node; @@ -769,7 +772,7 @@ export default { if (this.form.tags instanceof Array) { this.form.tags = JSON.stringify(this.form.tags); } - param.testId=JSON.stringify(this.form.selected) + param.testId = JSON.stringify(this.form.selected) param.tags = this.form.tags; param.type = 'functional' return param; diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index 0a62011f1f..e74a54cd16 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -206,7 +206,6 @@ import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-compon import ShowMoreBtn from "./ShowMoreBtn"; import BatchEdit from "./BatchEdit"; import {PROJECT_NAME, TEST_CASE_LIST, WORKSPACE_ID} from "@/common/js/constants"; -import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent"; import StatusTableItem from "@/business/components/track/common/tableItems/planview/StatusTableItem"; import TestCaseDetail from "./TestCaseDetail"; import ReviewStatus from "@/business/components/track/case/components/ReviewStatus"; @@ -500,8 +499,6 @@ export default { this.selectRows.clear(); this.$emit("refresh"); this.$success(this.$t('commons.delete_success')); - // 发送广播,刷新 head 上的最新列表 - TrackEvent.$emit(LIST_CHANGE); }); } } @@ -512,8 +509,6 @@ export default { this.$post('/test/case/delete/' + testCaseId, {}, () => { this.initTableData(); this.$success(this.$t('commons.delete_success')); - // 发送广播,刷新 head 上的最新列表 - TrackEvent.$emit(LIST_CHANGE); }); }, refresh() { @@ -607,8 +602,6 @@ export default { this.$post('/test/case/batch/edit', param, () => { this.$success(this.$t('commons.save_success')); this.refresh(); - // 发送广播,刷新 head 上的最新列表 - TrackEvent.$emit(LIST_CHANGE); }); }, filter(filters) { @@ -660,8 +653,6 @@ export default { this.result = this.$post('/test/case/batch/edit', param, () => { this.$success(this.$t('commons.save_success')); this.$refs.testBatchMove.close(); - // 发送广播,刷新 head 上的最新列表 - TrackEvent.$emit(LIST_CHANGE); this.refresh(); }); }