fix: 没选项目报错
This commit is contained in:
parent
8dff0e81f7
commit
a923a5b55e
|
@ -16,6 +16,7 @@ import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -28,18 +29,20 @@ public class ProjectController {
|
||||||
|
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
public List<ProjectDTO> listAll() {
|
public List<ProjectDTO> listAll() {
|
||||||
String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId();
|
// String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId();
|
||||||
ProjectRequest request = new ProjectRequest();
|
// ProjectRequest request = new ProjectRequest();
|
||||||
request.setWorkspaceId(currentWorkspaceId);
|
// request.setWorkspaceId(currentWorkspaceId);
|
||||||
return projectService.getProjectList(request);
|
// return projectService.getProjectList(request);
|
||||||
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*jenkins项目列表*/
|
/*jenkins项目列表*/
|
||||||
@GetMapping("/listAll/{workspaceId}")
|
@GetMapping("/listAll/{workspaceId}")
|
||||||
public List<ProjectDTO> jlistAll(@PathVariable String workspaceId) {
|
public List<ProjectDTO> jlistAll(@PathVariable String workspaceId) {
|
||||||
ProjectRequest request = new ProjectRequest();
|
// ProjectRequest request = new ProjectRequest();
|
||||||
request.setWorkspaceId(workspaceId);
|
// request.setWorkspaceId(workspaceId);
|
||||||
return projectService.getProjectList(request);
|
// return projectService.getProjectList(request);
|
||||||
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/recent/{count}")
|
@GetMapping("/recent/{count}")
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 79343a2763b014355f91fc21b2356a95ae437973
|
Subproject commit 9f4a9bbf46fc1333dbcccea21f83e27e3ec10b1f
|
|
@ -51,6 +51,7 @@
|
||||||
import {getUUID} from "@/common/js/utils";
|
import {getUUID} from "@/common/js/utils";
|
||||||
import MsApiScenarioModule from "@/business/components/api/automation/scenario/ApiScenarioModule";
|
import MsApiScenarioModule from "@/business/components/api/automation/scenario/ApiScenarioModule";
|
||||||
import MsEditApiScenario from "./scenario/EditApiScenario";
|
import MsEditApiScenario from "./scenario/EditApiScenario";
|
||||||
|
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiAutomation",
|
name: "ApiAutomation",
|
||||||
|
@ -70,6 +71,10 @@
|
||||||
watch: {},
|
watch: {},
|
||||||
methods: {
|
methods: {
|
||||||
addTab(tab) {
|
addTab(tab) {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (tab.name === 'add') {
|
if (tab.name === 'add') {
|
||||||
let label = this.$t('api_test.automation.add_scenario');
|
let label = this.$t('api_test.automation.add_scenario');
|
||||||
let name = getUUID().substring(0, 8);
|
let name = getUUID().substring(0, 8);
|
||||||
|
|
|
@ -160,10 +160,9 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search() {
|
search() {
|
||||||
this.loading = true;
|
|
||||||
this.condition.filters = ["Prepare", "Underway", "Completed"];
|
this.condition.filters = ["Prepare", "Underway", "Completed"];
|
||||||
this.condition.moduleIds = this.selectNodeIds;
|
this.condition.moduleIds = this.selectNodeIds;
|
||||||
|
|
||||||
if (this.trashEnable) {
|
if (this.trashEnable) {
|
||||||
this.condition.filters = ["Trash"];
|
this.condition.filters = ["Trash"];
|
||||||
this.condition.moduleIds = [];
|
this.condition.moduleIds = [];
|
||||||
|
@ -174,17 +173,20 @@
|
||||||
}
|
}
|
||||||
this.selection = [];
|
this.selection = [];
|
||||||
let url = "/api/automation/list/" + this.currentPage + "/" + this.pageSize;
|
let url = "/api/automation/list/" + this.currentPage + "/" + this.pageSize;
|
||||||
this.$post(url, this.condition, response => {
|
if (this.condition.projectId) {
|
||||||
let data = response.data;
|
this.loading = true;
|
||||||
this.total = data.itemCount;
|
this.$post(url, this.condition, response => {
|
||||||
this.tableData = data.listObject;
|
let data = response.data;
|
||||||
this.tableData.forEach(item => {
|
this.total = data.itemCount;
|
||||||
if (item.tags && item.tags.length > 0) {
|
this.tableData = data.listObject;
|
||||||
item.tags = JSON.parse(item.tags);
|
this.tableData.forEach(item => {
|
||||||
}
|
if (item.tags && item.tags.length > 0) {
|
||||||
})
|
item.tags = JSON.parse(item.tags);
|
||||||
this.loading = false;
|
}
|
||||||
});
|
});
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleCommand(cmd) {
|
handleCommand(cmd) {
|
||||||
let table = this.$refs.scenarioTable;
|
let table = this.$refs.scenarioTable;
|
||||||
|
|
|
@ -182,6 +182,10 @@
|
||||||
this.$emit("refreshTable");
|
this.$emit("refreshTable");
|
||||||
},
|
},
|
||||||
addScenario() {
|
addScenario() {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$refs.basisScenario.open(this.currentModule);
|
this.$refs.basisScenario.open(this.currentModule);
|
||||||
},
|
},
|
||||||
enableTrash() {
|
enableTrash() {
|
||||||
|
|
|
@ -149,6 +149,7 @@
|
||||||
import MsDeleteConfirm from "../../../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../../../common/components/MsDeleteConfirm";
|
||||||
import {TEST_PLAN_CONFIGS} from "../../../../common/components/search/search-components";
|
import {TEST_PLAN_CONFIGS} from "../../../../common/components/search/search-components";
|
||||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||||
|
import {getCurrentProjectID} from "../../../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanList",
|
name: "TestPlanList",
|
||||||
|
@ -217,6 +218,10 @@
|
||||||
if (this.selectNodeIds && this.selectNodeIds.length > 0) {
|
if (this.selectNodeIds && this.selectNodeIds.length > 0) {
|
||||||
this.condition.nodeIds = this.selectNodeIds;
|
this.condition.nodeIds = this.selectNodeIds;
|
||||||
}
|
}
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
|
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
|
|
|
@ -180,6 +180,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleTabAdd(e) {
|
handleTabAdd(e) {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
let api = {
|
let api = {
|
||||||
status: "Underway", method: "GET", userId: getCurrentUser().id,
|
status: "Underway", method: "GET", userId: getCurrentUser().id,
|
||||||
url: "", protocol: this.currentProtocol, environmentId: ""
|
url: "", protocol: this.currentProtocol, environmentId: ""
|
||||||
|
@ -211,6 +215,10 @@
|
||||||
this.refresh();
|
this.refresh();
|
||||||
},
|
},
|
||||||
handleTabsEdit(targetName, action, api) {
|
handleTabsEdit(targetName, action, api) {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (targetName === undefined || targetName === null) {
|
if (targetName === undefined || targetName === null) {
|
||||||
targetName = this.$t('api_test.definition.request.title');
|
targetName = this.$t('api_test.definition.request.title');
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,10 +244,12 @@
|
||||||
if (this.currentProtocol != null) {
|
if (this.currentProtocol != null) {
|
||||||
this.condition.protocol = this.currentProtocol;
|
this.condition.protocol = this.currentProtocol;
|
||||||
}
|
}
|
||||||
this.result = this.$post(this.getListUrl() + this.currentPage + "/" + this.pageSize, this.condition, response => {
|
if (this.condition.projectId) {
|
||||||
this.total = response.data.itemCount;
|
this.result = this.$post(this.getListUrl() + this.currentPage + "/" + this.pageSize, this.condition, response => {
|
||||||
this.tableData = response.data.listObject;
|
this.total = response.data.itemCount;
|
||||||
});
|
this.tableData = response.data.listObject;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
buildCondition(condition) {
|
buildCondition(condition) {
|
||||||
if (this.isPlanModel) {
|
if (this.isPlanModel) {
|
||||||
|
|
|
@ -224,10 +224,12 @@
|
||||||
if (this.currentProtocol != null) {
|
if (this.currentProtocol != null) {
|
||||||
this.condition.protocol = this.currentProtocol;
|
this.condition.protocol = this.currentProtocol;
|
||||||
}
|
}
|
||||||
this.result = this.$post("/api/definition/list/" + this.currentPage + "/" + this.pageSize, this.condition, response => {
|
if (this.condition.projectId) {
|
||||||
this.total = response.data.itemCount;
|
this.result = this.$post("/api/definition/list/" + this.currentPage + "/" + this.pageSize, this.condition, response => {
|
||||||
this.tableData = response.data.listObject;
|
this.total = response.data.itemCount;
|
||||||
});
|
this.tableData = response.data.listObject;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getMaintainerOptions() {
|
getMaintainerOptions() {
|
||||||
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
||||||
|
|
|
@ -42,6 +42,7 @@ import {OPTIONS} from "../../model/JsonData";
|
||||||
import MsAddBasisApi from "../basis/AddBasisApi";
|
import MsAddBasisApi from "../basis/AddBasisApi";
|
||||||
import ApiImport from "../import/ApiImport";
|
import ApiImport from "../import/ApiImport";
|
||||||
import ModuleTrashButton from "./ModuleTrashButton";
|
import ModuleTrashButton from "./ModuleTrashButton";
|
||||||
|
import {getCurrentProjectID} from "../../../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiModuleHeader",
|
name: "ApiModuleHeader",
|
||||||
|
@ -83,14 +84,26 @@ export default {
|
||||||
case "add-module":
|
case "add-module":
|
||||||
break;
|
break;
|
||||||
case "import":
|
case "import":
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$refs.apiImport.open(this.currentModule);
|
this.$refs.apiImport.open(this.currentModule);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$emit('exportAPI');
|
this.$emit('exportAPI');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addApi() {
|
addApi() {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$refs.basisApi.open(this.currentModule);
|
this.$refs.basisApi.open(this.currentModule);
|
||||||
},
|
},
|
||||||
saveAsEdit(data) {
|
saveAsEdit(data) {
|
||||||
|
|
|
@ -93,7 +93,7 @@ import MsTablePagination from "../../common/pagination/TablePagination";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsPerformanceReportStatus from "./PerformanceReportStatus";
|
import MsPerformanceReportStatus from "./PerformanceReportStatus";
|
||||||
import {_filter, _sort} from "../../../../common/js/utils";
|
import {_filter, _sort, getCurrentProjectID} from "../../../../common/js/utils";
|
||||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||||
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
||||||
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
||||||
|
@ -163,6 +163,9 @@ export default {
|
||||||
if (this.testId !== 'all') {
|
if (this.testId !== 'all') {
|
||||||
this.condition.testId = this.testId;
|
this.condition.testId = this.testId;
|
||||||
}
|
}
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
|
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
|
|
|
@ -84,6 +84,7 @@ import {_filter, _sort} from "@/common/js/utils";
|
||||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||||
|
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -148,12 +149,13 @@ export default {
|
||||||
if (this.projectId !== 'all') {
|
if (this.projectId !== 'all') {
|
||||||
this.condition.projectId = this.projectId;
|
this.condition.projectId = this.projectId;
|
||||||
}
|
}
|
||||||
|
if (this.condition.projectId) {
|
||||||
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
|
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
this.tableData = data.listObject;
|
this.tableData = data.listObject;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
search(combine) {
|
search(combine) {
|
||||||
this.initTableData(combine);
|
this.initTableData(combine);
|
||||||
|
@ -211,6 +213,10 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$router.push('/performance/test/create');
|
this.$router.push('/performance/test/create');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ import TestCaseMove from "./components/TestCaseMove";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsAsideContainer from "../../common/components/MsAsideContainer";
|
import MsAsideContainer from "../../common/components/MsAsideContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import {checkoutTestManagerOrTestUser, hasRoles} from "../../../../common/js/utils";
|
import {checkoutTestManagerOrTestUser, getCurrentProjectID, hasRoles} from "../../../../common/js/utils";
|
||||||
import BatchMove from "./components/BatchMove";
|
import BatchMove from "./components/BatchMove";
|
||||||
import TestCaseNodeTree from "../common/TestCaseNodeTree";
|
import TestCaseNodeTree from "../common/TestCaseNodeTree";
|
||||||
|
|
||||||
|
@ -94,6 +94,10 @@ export default {
|
||||||
this.testCaseReadOnly = true;
|
this.testCaseReadOnly = true;
|
||||||
}
|
}
|
||||||
let caseId = this.$route.params.caseId;
|
let caseId = this.$route.params.caseId;
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.openRecentTestCaseEditDialog(caseId);
|
this.openRecentTestCaseEditDialog(caseId);
|
||||||
this.$router.push('/track/case/all');
|
this.$router.push('/track/case/all');
|
||||||
}
|
}
|
||||||
|
|
|
@ -404,9 +404,17 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
importTestCase() {
|
importTestCase() {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$refs.testCaseImport.open();
|
this.$refs.testCaseImport.open();
|
||||||
},
|
},
|
||||||
exportTestCase() {
|
exportTestCase() {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
let ids = Array.from(this.selectRows).map(row => row.id);
|
let ids = Array.from(this.selectRows).map(row => row.id);
|
||||||
let config = {
|
let config = {
|
||||||
url: '/test/case/export/testcase',
|
url: '/test/case/export/testcase',
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||||
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
||||||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||||
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "RelatedTestPlanList",
|
name: "RelatedTestPlanList",
|
||||||
components: {MsTableOperator, PlanStageTableItem, PlanStatusTableItem, HomeBaseComponent},
|
components: {MsTableOperator, PlanStageTableItem, PlanStatusTableItem, HomeBaseComponent},
|
||||||
|
@ -88,7 +89,10 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTableData() {
|
initTableData() {
|
||||||
this.result = this.$post('/test/plan/list/all/relate', this.condition, response => {
|
if (!getCurrentProjectID()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.result = this.$post('/test/plan/list/all/relate', {}, response => {
|
||||||
this.tableData = response.data;
|
this.tableData = response.data;
|
||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
let path = "/test/plan/project/name/" + this.tableData[i].id;
|
let path = "/test/plan/project/name/" + this.tableData[i].id;
|
||||||
|
|
|
@ -69,6 +69,7 @@ import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem"
|
||||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||||
import HomeBaseComponent from "./HomeBaseComponent";
|
import HomeBaseComponent from "./HomeBaseComponent";
|
||||||
import MsTableButton from "../../../common/components/MsTableButton";
|
import MsTableButton from "../../../common/components/MsTableButton";
|
||||||
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ReviewList",
|
name: "ReviewList",
|
||||||
|
@ -93,6 +94,9 @@ export default {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
type = 'reviewer'
|
type = 'reviewer'
|
||||||
}
|
}
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.result = this.$get('/test/case/review/list/all/relate/' + type, response => {
|
this.result = this.$get('/test/case/review/list/all/relate/' + type, response => {
|
||||||
this.tableData = response.data;
|
this.tableData = response.data;
|
||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
import StatusTableItem from "../../common/tableItems/planview/StatusTableItem";
|
import StatusTableItem from "../../common/tableItems/planview/StatusTableItem";
|
||||||
import TypeTableItem from "../../common/tableItems/planview/TypeTableItem";
|
import TypeTableItem from "../../common/tableItems/planview/TypeTableItem";
|
||||||
import PriorityTableItem from "../../common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../common/tableItems/planview/PriorityTableItem";
|
||||||
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseSideList",
|
name: "TestCaseSideList",
|
||||||
components: {PriorityTableItem, TypeTableItem, StatusTableItem, HomeBaseComponent},
|
components: {PriorityTableItem, TypeTableItem, StatusTableItem, HomeBaseComponent},
|
||||||
|
@ -80,6 +81,9 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTableData() {
|
initTableData() {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.result = this.$post('/test/plan/case/recent/10', {}, response => {
|
this.result = this.$post('/test/plan/case/recent/10', {}, response => {
|
||||||
this.tableData = response.data;
|
this.tableData = response.data;
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
import TestPlanEdit from './components/TestPlanEdit';
|
import TestPlanEdit from './components/TestPlanEdit';
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
|
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlan",
|
name: "TestPlan",
|
||||||
|
@ -36,6 +37,10 @@
|
||||||
watch: {
|
watch: {
|
||||||
'$route'(to, from) {
|
'$route'(to, from) {
|
||||||
if (to.path.indexOf("/track/plan/create") >= 0){
|
if (to.path.indexOf("/track/plan/create") >= 0){
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.openTestPlanEditDialog();
|
this.openTestPlanEditDialog();
|
||||||
this.$router.push('/track/plan/all');
|
this.$router.push('/track/plan/all');
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,6 +159,7 @@ import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
||||||
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
|
||||||
import {TEST_PLAN_CONFIGS} from "../../../common/components/search/search-components";
|
import {TEST_PLAN_CONFIGS} from "../../../common/components/search/search-components";
|
||||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||||
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanList",
|
name: "TestPlanList",
|
||||||
|
@ -216,6 +217,9 @@ export default {
|
||||||
if (this.selectNodeIds && this.selectNodeIds.length > 0) {
|
if (this.selectNodeIds && this.selectNodeIds.length > 0) {
|
||||||
this.condition.nodeIds = this.selectNodeIds;
|
this.condition.nodeIds = this.selectNodeIds;
|
||||||
}
|
}
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
|
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
|
@ -236,6 +240,10 @@ export default {
|
||||||
return path + "/" + this.currentPage + "/" + this.pageSize;
|
return path + "/" + this.currentPage + "/" + this.pageSize;
|
||||||
},
|
},
|
||||||
testPlanCreate() {
|
testPlanCreate() {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$emit('openTestPlanEditDialog');
|
this.$emit('openTestPlanEditDialog');
|
||||||
},
|
},
|
||||||
handleEdit(testPlan) {
|
handleEdit(testPlan) {
|
||||||
|
|
|
@ -18,6 +18,7 @@ import TestCaseReviewList from "./components/TestCaseReviewList";
|
||||||
import TestCaseReviewEdit from "./components/TestCaseReviewEdit";
|
import TestCaseReviewEdit from "./components/TestCaseReviewEdit";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
|
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseReview",
|
name: "TestCaseReview",
|
||||||
|
@ -41,6 +42,10 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
'$route'(to) {
|
'$route'(to) {
|
||||||
if (to.path.indexOf("/track/review/create") >= 0){
|
if (to.path.indexOf("/track/review/create") >= 0){
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.openCaseReviewEditDialog();
|
this.openCaseReviewEditDialog();
|
||||||
this.$router.push('/track/review/all');
|
this.$router.push('/track/review/all');
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,13 @@ import MsDialogFooter from "../../../common/components/MsDialogFooter";
|
||||||
import MsTableHeader from "../../../common/components/MsTableHeader";
|
import MsTableHeader from "../../../common/components/MsTableHeader";
|
||||||
import MsCreateBox from "../../../settings/CreateBox";
|
import MsCreateBox from "../../../settings/CreateBox";
|
||||||
import MsTablePagination from "../../../common/pagination/TablePagination";
|
import MsTablePagination from "../../../common/pagination/TablePagination";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser, getCurrentWorkspaceId} from "../../../../../common/js/utils";
|
import {
|
||||||
|
_filter,
|
||||||
|
_sort,
|
||||||
|
checkoutTestManagerOrTestUser,
|
||||||
|
getCurrentProjectID,
|
||||||
|
getCurrentWorkspaceId
|
||||||
|
} from "../../../../../common/js/utils";
|
||||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -133,6 +139,9 @@ export default {
|
||||||
initTableData() {
|
initTableData() {
|
||||||
let lastWorkspaceId = getCurrentWorkspaceId();
|
let lastWorkspaceId = getCurrentWorkspaceId();
|
||||||
this.condition.workspaceId = lastWorkspaceId;
|
this.condition.workspaceId = lastWorkspaceId;
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.result = this.$post("/test/case/review/list/" + this.currentPage + "/" + this.pageSize, this.condition, response => {
|
this.result = this.$post("/test/case/review/list/" + this.currentPage + "/" + this.pageSize, this.condition, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
|
@ -160,6 +169,10 @@ export default {
|
||||||
this.$router.push('/track/review/view/' + row.id);
|
this.$router.push('/track/review/view/' + row.id);
|
||||||
},
|
},
|
||||||
testCaseReviewCreate() {
|
testCaseReviewCreate() {
|
||||||
|
if (!getCurrentProjectID()) {
|
||||||
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$emit('openCaseReviewEditDialog');
|
this.$emit('openCaseReviewEditDialog');
|
||||||
},
|
},
|
||||||
handleEdit(caseReview) {
|
handleEdit(caseReview) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8cda5c873cd9985c97adb34efacf507167fa4182
|
Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433
|
|
@ -126,6 +126,7 @@ export default {
|
||||||
modifier: '修改人',
|
modifier: '修改人',
|
||||||
validate: "校验",
|
validate: "校验",
|
||||||
batch_add: "批量添加",
|
batch_add: "批量添加",
|
||||||
|
check_project_tip: "请先创建或选择项目",
|
||||||
date: {
|
date: {
|
||||||
select_date: '选择日期',
|
select_date: '选择日期',
|
||||||
start_date: '开始日期',
|
start_date: '开始日期',
|
||||||
|
|
Loading…
Reference in New Issue