Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
19508c3254
|
@ -1,5 +1,5 @@
|
|||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
|
|
|
@ -457,6 +457,8 @@ public class TestCaseService {
|
|||
}
|
||||
|
||||
private List<TestCaseExcelData> generateTestCaseExcel(TestCaseBatchRequest request) {
|
||||
ServiceUtils.getSelectAllIds(request, request.getCondition(),
|
||||
(query) -> extTestCaseMapper.selectIds(query));
|
||||
List<OrderRequest> orderList = ServiceUtils.getDefaultOrder(request.getOrders());
|
||||
OrderRequest order = new OrderRequest();
|
||||
order.setName("sort");
|
||||
|
|
|
@ -236,7 +236,7 @@ import CaseBatchMove from "@/business/components/api/definition/components/basis
|
|||
import ApiListContainerWithDoc from "@/business/components/api/definition/components/list/ApiListContainerWithDoc";
|
||||
import {
|
||||
_handleSelect,
|
||||
_handleSelectAll, getLabel,
|
||||
_handleSelectAll, buildBatchParam, getLabel,
|
||||
getSelectDataCounts, initCondition,
|
||||
setUnSelectIds, toggleAllSelection
|
||||
} from "@/common/js/tableUtils";
|
||||
|
@ -555,7 +555,7 @@ export default {
|
|||
confirmButtonText: this.$t('commons.confirm'),
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
this.$post('/api/definition/deleteBatchByParams/', this.buildBatchParam(), () => {
|
||||
this.$post('/api/definition/deleteBatchByParams/', buildBatchParam(this), () => {
|
||||
this.selectRows.clear();
|
||||
this.initTable();
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
|
@ -568,7 +568,7 @@ export default {
|
|||
confirmButtonText: this.$t('commons.confirm'),
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
this.$post('/api/definition/removeToGcByParams/', this.buildBatchParam(), () => {
|
||||
this.$post('/api/definition/removeToGcByParams/', buildBatchParam(this), () => {
|
||||
this.selectRows.clear();
|
||||
this.initTable();
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
|
@ -592,20 +592,13 @@ export default {
|
|||
this.$refs.batchEdit.open();
|
||||
},
|
||||
batchEdit(form) {
|
||||
let param = this.buildBatchParam();
|
||||
let param = buildBatchParam(this);
|
||||
param[form.type] = form.value;
|
||||
this.$post('/api/definition/batch/editByParams', param, () => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.initTable();
|
||||
});
|
||||
},
|
||||
buildBatchParam() {
|
||||
let param = {};
|
||||
param.ids = Array.from(this.selectRows).map(row => row.id);
|
||||
param.projectId = getCurrentProjectID();
|
||||
param.condition = this.condition;
|
||||
return param;
|
||||
},
|
||||
moveSave(param) {
|
||||
let arr = Array.from(this.selectRows);
|
||||
let ids = arr.map(row => row.id);
|
||||
|
@ -686,7 +679,7 @@ export default {
|
|||
return ids;
|
||||
},
|
||||
exportApi() {
|
||||
let param = this.buildBatchParam();
|
||||
let param = buildBatchParam(this);
|
||||
param.protocol = this.currentProtocol;
|
||||
if (param.ids === undefined || param.ids.length < 1) {
|
||||
this.$warning(this.$t("api_test.definition.check_select"));
|
||||
|
|
|
@ -178,9 +178,10 @@
|
|||
</el-table-column>
|
||||
<header-custom ref="headerCustom" :initTableData="initTableData" :optionalFields=headerItems
|
||||
:type=type></header-custom>
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
</el-table>
|
||||
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
</el-card>
|
||||
|
||||
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
||||
|
@ -209,18 +210,18 @@ import MsTableButton from "../../../common/components/MsTableButton";
|
|||
import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-components";
|
||||
import ShowMoreBtn from "./ShowMoreBtn";
|
||||
import BatchEdit from "./BatchEdit";
|
||||
import {TEST_CASE_LIST, WORKSPACE_ID} from "@/common/js/constants";
|
||||
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";
|
||||
import {getCurrentProjectID, getCurrentUser} from "../../../../../common/js/utils";
|
||||
import {downloadFile, getCurrentProjectID, getCurrentUser} from "../../../../../common/js/utils";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
import {
|
||||
_filter,
|
||||
_handleSelect,
|
||||
_handleSelectAll,
|
||||
_sort, getLabel,
|
||||
_sort, buildBatchParam, getLabel,
|
||||
getSelectDataCounts, initCondition,
|
||||
setUnSelectIds,
|
||||
toggleAllSelection
|
||||
|
@ -490,16 +491,21 @@ export default {
|
|||
this.$warning(this.$t('commons.check_project_tip'));
|
||||
return;
|
||||
}
|
||||
let ids = Array.from(this.selectRows).map(row => row.id);
|
||||
|
||||
let config = {
|
||||
url: '/test/case/export/testcase',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
// data: {ids: [...this.selectIds]}
|
||||
data: {ids: ids, projectId: this.projectId}
|
||||
data: buildBatchParam(this)
|
||||
};
|
||||
|
||||
if (config.data.ids === undefined || config.data.ids.length < 1) {
|
||||
this.$warning(this.$t("test_track.case.check_select"));
|
||||
return;
|
||||
}
|
||||
|
||||
this.result = this.$request(config).then(response => {
|
||||
const filename = this.$t('test_track.case.test_case') + ".xlsx";
|
||||
const filename = "Metersphere_case_" + localStorage.getItem(PROJECT_NAME) + ".xlsx";
|
||||
const blob = new Blob([response.data]);
|
||||
if ("download" in document.createElement("a")) {
|
||||
let aTag = document.createElement('a');
|
||||
|
@ -515,14 +521,7 @@ export default {
|
|||
handleBatch(type) {
|
||||
if (this.selectRows.size < 1) {
|
||||
if (type === 'export') {
|
||||
this.$alert(this.$t('test_track.case.export_all_cases'), '', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
this.exportTestCase();
|
||||
}
|
||||
}
|
||||
})
|
||||
this.exportTestCase();
|
||||
return;
|
||||
} else {
|
||||
this.$warning(this.$t('test_track.plan_view.select_manipulate'));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {getCurrentUser, humpToLine} from "@/common/js/utils";
|
||||
import {getCurrentProjectID, getCurrentUser, humpToLine} from "@/common/js/utils";
|
||||
import {TEST_CASE_LIST} from "@/common/js/constants";
|
||||
|
||||
export function _handleSelectAll(component, selection, tableData, selectRows) {
|
||||
|
@ -119,5 +119,12 @@ export function getLabel(vueObj, type) {
|
|||
}
|
||||
|
||||
|
||||
export function buildBatchParam(vueObj) {
|
||||
let param = {};
|
||||
param.ids = Array.from(vueObj.selectRows).map(row => row.id);
|
||||
param.projectId = getCurrentProjectID();
|
||||
param.condition = vueObj.condition;
|
||||
return param;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1052,6 +1052,7 @@ export default {
|
|||
cancel_relevance_success: "Unlinked successfully",
|
||||
switch_project: "Switch project",
|
||||
case: {
|
||||
check_select: "Please check the case",
|
||||
export_all_cases: 'Are you sure you want to export all use cases?',
|
||||
input_test_case: 'Please enter the associated case name',
|
||||
test_name: 'TestName',
|
||||
|
|
|
@ -1056,6 +1056,7 @@ export default {
|
|||
cancel_relevance_success: "取消关联成功",
|
||||
switch_project: "切换项目",
|
||||
case: {
|
||||
check_select: "请勾选用例",
|
||||
export_all_cases: '确定要导出全部用例吗?',
|
||||
input_test_case: '请输入关联用例名称',
|
||||
test_name: '测试名称',
|
||||
|
|
|
@ -1054,6 +1054,7 @@ export default {
|
|||
cancel_relevance_success: "取消關聯成功",
|
||||
switch_project: "切換項目",
|
||||
case: {
|
||||
check_select: "請勾選用例",
|
||||
export_all_cases: '確定要導出全部用例嗎?',
|
||||
input_test_case: '請輸入關聯用例名稱',
|
||||
test_name: '測試名稱',
|
||||
|
|
Loading…
Reference in New Issue