fix(测试跟踪): 测试计划关联用例,切换项目,过滤选项未更新
--bug=1014251 --user=陈建星 【测试跟踪】测试计划关联接口用例表头字段,切换项目后没有同步更新 https://www.tapd.cn/55049933/s/1186998
This commit is contained in:
parent
eb4d89fb4d
commit
e76e2e8382
|
@ -179,6 +179,13 @@ public class UserController {
|
|||
return userService.getProjectMemberList(request);
|
||||
}
|
||||
|
||||
@GetMapping("/project/member/{projectId}")
|
||||
public List<User> getProjectMembers(@PathVariable String projectId) {
|
||||
QueryMemberRequest request = new QueryMemberRequest();
|
||||
request.setProjectId(projectId);
|
||||
return userService.getProjectMemberList(request);
|
||||
}
|
||||
|
||||
@GetMapping("/project/member/option")
|
||||
public List<User> getProjectMemberOption() {
|
||||
return userService.getProjectMemberOption(SessionUtils.getCurrentProjectId());
|
||||
|
|
|
@ -125,7 +125,7 @@ import PriorityTableItem from "../../../../track/common/tableItems/planview/Prio
|
|||
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
||||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||
import {getProtocolFilter} from "@/business/components/api/definition/api-definition";
|
||||
import {getProjectMember} from "@/network/user";
|
||||
import {getProjectMemberById} from "@/network/user";
|
||||
import TableSelectCountBar from "@/business/components/api/automation/scenario/api/TableSelectCountBar";
|
||||
import {hasLicense} from "@/common/js/utils";
|
||||
import MsSearch from "@/business/components/common/components/search/MsSearch";
|
||||
|
@ -186,11 +186,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created: function () {
|
||||
getProjectMember((data) => {
|
||||
this.userFilters = data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
this.getUserFilter();
|
||||
this.getProtocolFilter();
|
||||
this.checkVersionEnable();
|
||||
},
|
||||
|
@ -200,6 +196,7 @@ export default {
|
|||
},
|
||||
projectId() {
|
||||
this.checkVersionEnable();
|
||||
this.getUserFilter();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -255,6 +252,13 @@ export default {
|
|||
this.versionEnable = response.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
getUserFilter() {
|
||||
getProjectMemberById(this.projectId, (data) => {
|
||||
this.userFilters = data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -72,8 +72,9 @@ import MsTablePagination from "@/business/components/common/pagination/TablePagi
|
|||
import {TEST_CASE_RELEVANCE_API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
import {getCurrentProjectID, hasLicense} from "@/common/js/utils";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsSearch from "@/business/components/common/components/search/MsSearch";
|
||||
import {getVersionFilters} from "@/network/project";
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {};
|
||||
|
||||
|
@ -137,6 +138,7 @@ export default {
|
|||
},
|
||||
projectId() {
|
||||
this.condition.versionId = null;
|
||||
this.getVersionOptions();
|
||||
this.initTable();
|
||||
}
|
||||
},
|
||||
|
@ -196,13 +198,9 @@ export default {
|
|||
}
|
||||
},
|
||||
getVersionOptions() {
|
||||
if (hasLicense()) {
|
||||
this.$get('/project/version/get-project-versions/' + getCurrentProjectID(), response => {
|
||||
this.versionFilters = response.data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
getVersionFilters(this.projectId, (data) => {
|
||||
this.versionFilters = data;
|
||||
});
|
||||
},
|
||||
changeVersion(currentVersion) {
|
||||
this.condition.versionId = currentVersion || null;
|
||||
|
|
|
@ -81,8 +81,8 @@ import MsTableAdvSearchBar from "@/business/components/common/components/search/
|
|||
import {TEST_CASE_RELEVANCE_LOAD_CASE} from "@/business/components/common/components/search/search-components";
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {};
|
||||
import {hasLicense, getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsSearch from "@/business/components/common/components/search/MsSearch";
|
||||
import {getVersionFilters} from "@/network/project";
|
||||
|
||||
export default {
|
||||
name: "TestCaseRelateLoadList",
|
||||
|
@ -124,6 +124,7 @@ export default {
|
|||
watch: {
|
||||
projectId() {
|
||||
this.condition.versionId = null;
|
||||
this.getVersionOptions();
|
||||
this.initTable();
|
||||
}
|
||||
},
|
||||
|
@ -171,14 +172,9 @@ export default {
|
|||
}
|
||||
},
|
||||
getVersionOptions() {
|
||||
if (hasLicense()) {
|
||||
this.$get('/project/version/get-project-versions/' + getCurrentProjectID(), response => {
|
||||
this.versionOptions = response.data;
|
||||
this.versionFilters = response.data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
getVersionFilters(this.projectId, (data) => {
|
||||
this.versionFilters = data;
|
||||
});
|
||||
},
|
||||
changeVersion(currentVersion) {
|
||||
this.condition.versionId = currentVersion || null;
|
||||
|
|
|
@ -84,8 +84,8 @@ import PlanStatusTableItem from "@/business/components/track/common/tableItems/p
|
|||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
import {TEST_CASE_RELEVANCE_API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import {hasLicense, getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsSearch from "@/business/components/common/components/search/MsSearch";
|
||||
import {getVersionFilters} from "@/network/project";
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {};
|
||||
|
||||
|
@ -140,6 +140,7 @@ export default {
|
|||
},
|
||||
projectId() {
|
||||
this.condition.versionId = null;
|
||||
this.getVersionOptions();
|
||||
this.initTable();
|
||||
}
|
||||
},
|
||||
|
@ -193,14 +194,9 @@ export default {
|
|||
}
|
||||
},
|
||||
getVersionOptions() {
|
||||
if (hasLicense()) {
|
||||
this.$get('/project/version/get-project-versions/' + getCurrentProjectID(), response => {
|
||||
this.versionOptions = response.data;
|
||||
this.versionFilters = response.data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
getVersionFilters(this.projectId, (data) => {
|
||||
this.versionFilters = data;
|
||||
});
|
||||
},
|
||||
changeVersion(currentVersion) {
|
||||
this.condition.versionId = currentVersion || null;
|
||||
|
|
|
@ -107,8 +107,8 @@ import {
|
|||
TEST_PLAN_RELEVANCE_API_SCENARIO_CONFIGS
|
||||
} from "@/business/components/common/components/search/search-components";
|
||||
import {ENV_TYPE} from "@/common/js/constants";
|
||||
import {getCurrentProjectID, hasLicense} from "@/common/js/utils";
|
||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
import {getVersionFilters} from "@/network/project";
|
||||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {};
|
||||
|
@ -179,6 +179,7 @@ export default {
|
|||
projectId() {
|
||||
this.condition.versionId = null;
|
||||
this.search();
|
||||
this.getVersionOptions();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
@ -268,13 +269,9 @@ export default {
|
|||
this.search();
|
||||
},
|
||||
getVersionOptions() {
|
||||
if (hasLicense()) {
|
||||
this.$get('/project/version/get-project-versions/' + getCurrentProjectID(), response => {
|
||||
this.versionFilters = response.data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
getVersionFilters(this.projectId, (data) => {
|
||||
this.versionFilters = data;
|
||||
});
|
||||
},
|
||||
filter(field) {
|
||||
this.condition.filters = field || null;
|
||||
|
|
|
@ -64,7 +64,7 @@ import TestCaseRelevanceBase from "../base/TestCaseRelevanceBase";
|
|||
import MsApiModule from "../../../../../api/definition/components/module/ApiModule";
|
||||
import RelevanceApiList from "../../../../../api/automation/scenario/api/RelevanceApiList";
|
||||
import RelevanceCaseList from "../../../../../api/automation/scenario/api/RelevanceCaseList";
|
||||
import {getCurrentProjectID, hasLicense} from "@/common/js/utils";
|
||||
import {getVersionFilters} from "@/network/project";
|
||||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {};
|
||||
|
@ -106,6 +106,9 @@ export default {
|
|||
planId() {
|
||||
this.condition.planId = this.planId;
|
||||
},
|
||||
projectId() {
|
||||
this.getVersionOptions();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getVersionOptions();
|
||||
|
@ -220,14 +223,9 @@ export default {
|
|||
});
|
||||
},
|
||||
getVersionOptions() {
|
||||
if (hasLicense()) {
|
||||
this.$get('/project/version/get-project-versions/' + getCurrentProjectID(), response => {
|
||||
this.versionOptions = response.data;
|
||||
this.versionFilters = response.data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
getVersionFilters(this.projectId, (data) => {
|
||||
this.versionFilters = data;
|
||||
});
|
||||
},
|
||||
changeVersion(currentVersion, type) {
|
||||
if (type == 'api') {
|
||||
|
|
|
@ -76,6 +76,9 @@ export default {
|
|||
planId() {
|
||||
this.condition.planId = this.planId;
|
||||
},
|
||||
projectId() {
|
||||
this.getVersionOptions();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
|
|
|
@ -109,6 +109,7 @@ import MsTag from "@/business/components/common/components/MsTag";
|
|||
import {getCurrentProjectID, hasLicense} from "@/common/js/utils";
|
||||
import MsCreateTimeColumn from "@/business/components/common/components/table/MsCreateTimeColumn";
|
||||
import MsUpdateTimeColumn from "@/business/components/common/components/table/MsUpdateTimeColumn";
|
||||
import {getVersionFilters} from "@/network/project";
|
||||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {};
|
||||
|
@ -191,6 +192,7 @@ export default {
|
|||
this.getProjectNode();
|
||||
this.getTestCases();
|
||||
this.getCustomNum();
|
||||
this.getVersionOptions();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -258,14 +260,9 @@ export default {
|
|||
this.getNodeTree(this);
|
||||
},
|
||||
getVersionOptions() {
|
||||
if (hasLicense()) {
|
||||
this.$get('/project/version/get-project-versions/' + getCurrentProjectID(), response => {
|
||||
this.versionOptions = response.data;
|
||||
this.versionFilters = response.data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
getVersionFilters(this.projectId, (data) => {
|
||||
this.versionFilters = data;
|
||||
});
|
||||
},
|
||||
changeVersion(currentVersion) {
|
||||
this.page.condition.versionId = currentVersion || null;
|
||||
|
|
|
@ -108,8 +108,8 @@ import MsPerformanceTestStatus from "@/business/components/performance/test/Perf
|
|||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import {_filter, buildBatchParam} from "@/common/js/tableUtils";
|
||||
import {TEST_PLAN_RELEVANCE_LOAD_CASE} from "@/business/components/common/components/search/search-components";
|
||||
import {getCurrentProjectID, hasLicense} from "@/common/js/utils";
|
||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
import {getVersionFilters} from "@/network/project";
|
||||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {};
|
||||
|
@ -175,6 +175,10 @@ export default {
|
|||
reviewId() {
|
||||
this.condition.reviewId = this.reviewId;
|
||||
},
|
||||
projectId() {
|
||||
this.condition.versionId = null;
|
||||
this.getVersionOptions();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getVersionOptions();
|
||||
|
@ -188,7 +192,6 @@ export default {
|
|||
this.$refs.baseRelevance.open();
|
||||
},
|
||||
setProject(projectId) {
|
||||
this.condition.versionId = null;
|
||||
this.projectId = projectId;
|
||||
this.condition.projectId = this.projectId;
|
||||
this.getProjectNode();
|
||||
|
@ -318,14 +321,9 @@ export default {
|
|||
this.selectNodeIds = [];
|
||||
},
|
||||
getVersionOptions() {
|
||||
if (hasLicense()) {
|
||||
this.$get('/project/version/get-project-versions/' + getCurrentProjectID(), response => {
|
||||
this.versionOptions = response.data;
|
||||
this.versionFilters = response.data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
getVersionFilters(this.projectId, (data) => {
|
||||
this.versionFilters = data;
|
||||
});
|
||||
},
|
||||
changeVersion(currentVersion) {
|
||||
this.condition.versionId = currentVersion || null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {baseGet} from "@/network/base-network";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import {getCurrentProjectID, hasLicense} from "@/common/js/utils";
|
||||
|
||||
export function getProject(projectId, callback) {
|
||||
return projectId ? baseGet('/project/get/' + projectId, callback) : {};
|
||||
|
@ -8,3 +8,15 @@ export function getProject(projectId, callback) {
|
|||
export function getCurrentProject(callback) {
|
||||
return getProject(getCurrentProjectID(), callback);
|
||||
}
|
||||
|
||||
export function getVersionFilters(projectId, callback) {
|
||||
return hasLicense() && projectId ?
|
||||
baseGet('/project/version/get-project-versions/' + projectId, data => {
|
||||
let versionFilters = data.map(u => {
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
if (callback) {
|
||||
callback(versionFilters);
|
||||
}
|
||||
}) : {};
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@ export function getProjectMember(callBack) {
|
|||
});
|
||||
}
|
||||
|
||||
export function getProjectMemberById(projectId, callback) {
|
||||
return projectId ? baseGet('/user/project/member/' + projectId, callback) : {};
|
||||
}
|
||||
|
||||
export function logout() {
|
||||
axios.get("/signout").then(response => {
|
||||
if (response.data.success) {
|
||||
|
|
Loading…
Reference in New Issue