refactor: 自定义表头支持拖拽
This commit is contained in:
parent
2a7ccf7b24
commit
1edc8f1644
|
@ -489,7 +489,7 @@ public class ApiAutomationService {
|
|||
|
||||
List<String> ids = request.getIds();
|
||||
//检查是否有正在执行中的情景
|
||||
this.checkScenarioIsRunnng(ids);
|
||||
this.checkScenarioIsRunning(ids);
|
||||
List<ApiScenarioWithBLOBs> apiScenarios = extApiScenarioMapper.selectIds(ids);
|
||||
|
||||
String runMode = ApiRunMode.SCENARIO.name();
|
||||
|
@ -506,7 +506,7 @@ public class ApiAutomationService {
|
|||
return request.getId();
|
||||
}
|
||||
|
||||
public void checkScenarioIsRunnng(List<String> ids) {
|
||||
public void checkScenarioIsRunning(List<String> ids) {
|
||||
List<ApiScenarioReport> lastReportStatusByIds = apiReportService.selectLastReportByIds(ids);
|
||||
for (ApiScenarioReport report : lastReportStatusByIds) {
|
||||
if (StringUtils.equals(report.getStatus(), APITestStatus.Running.name())) {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
"diffable-html": "^4.0.0",
|
||||
"echarts": "^4.6.0",
|
||||
"el-table-infinite-scroll": "^1.0.10",
|
||||
"el-tree-transfer": "^2.4.7",
|
||||
"element-ui": "^2.13.0",
|
||||
"generate-schema": "^2.6.0",
|
||||
"html2canvas": "^1.0.0-rc.7",
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column v-if="item.prop == 'num'" prop="num" label="ID"
|
||||
<el-table-column v-if="item.id == 'num'" prop="num" label="ID"
|
||||
sortable="custom"
|
||||
min-width="120px"
|
||||
show-overflow-tooltip :key="index">
|
||||
|
@ -39,14 +39,14 @@
|
|||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'name'" prop="name"
|
||||
<el-table-column v-if="item.id == 'name'" prop="name"
|
||||
sortable="custom"
|
||||
:label="$t('api_test.automation.scenario_name')"
|
||||
show-overflow-tooltip
|
||||
min-width="120px"
|
||||
:key="index"
|
||||
/>
|
||||
<el-table-column v-if="item.prop == 'level'" prop="level"
|
||||
<el-table-column v-if="item.id == 'level'" prop="level"
|
||||
sortable="custom"
|
||||
column-key="level"
|
||||
:filters="levelFilters"
|
||||
|
@ -57,7 +57,7 @@
|
|||
<priority-table-item :value="scope.row.level"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'status'" prop="status" :label="$t('test_track.plan.plan_status')"
|
||||
<el-table-column v-if="item.id == 'status'" prop="status" :label="$t('test_track.plan.plan_status')"
|
||||
sortable="custom"
|
||||
column-key="status"
|
||||
:filters="statusFilters"
|
||||
|
@ -66,7 +66,7 @@
|
|||
<plan-status-table-item :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'tags'" prop="tags" min-width="120px"
|
||||
<el-table-column v-if="item.id == 'tags'" prop="tags" min-width="120px"
|
||||
:label="$t('api_test.automation.tag')" :key="index">
|
||||
<template v-slot:default="scope">
|
||||
<div v-for="(itemName,index) in scope.row.tags" :key="index">
|
||||
|
@ -74,24 +74,24 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'userId'" prop="userId" min-width="120px"
|
||||
<el-table-column v-if="item.id == 'userId'" prop="userId" min-width="120px"
|
||||
:label="$t('api_test.automation.creator')"
|
||||
:filters="userFilters"
|
||||
column-key="user_id"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
:key="index"/>
|
||||
<el-table-column v-if="item.prop == 'updateTime'" prop="updateTime"
|
||||
<el-table-column v-if="item.id == 'updateTime'" prop="updateTime"
|
||||
:label="$t('api_test.automation.update_time')" sortable="custom" min-width="180px"
|
||||
:key="index">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'stepTotal'" prop="stepTotal" :label="$t('api_test.automation.step')"
|
||||
<el-table-column v-if="item.id == 'stepTotal'" prop="stepTotal" :label="$t('api_test.automation.step')"
|
||||
min-width="80px"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
<el-table-column v-if="item.prop == 'lastResult'" prop="lastResult"
|
||||
<el-table-column v-if="item.id == 'lastResult'" prop="lastResult"
|
||||
:label="$t('api_test.automation.last_result')"
|
||||
:filters="resultFilters"
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
|||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'passRate'" prop="passRate"
|
||||
<el-table-column v-if="item.id == 'passRate'" prop="passRate"
|
||||
:label="$t('api_test.automation.passing_rate')"
|
||||
min-width="120px"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
|
@ -186,7 +186,7 @@
|
|||
import {PROJECT_NAME} from "../../../../../common/js/constants";
|
||||
import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect";
|
||||
import BatchMove from "../../../track/case/components/BatchMove";
|
||||
import {_sort} from "@/common/js/tableUtils";
|
||||
import {_sort, getLabel} from "@/common/js/tableUtils";
|
||||
import {Api_Scenario_List} from "@/business/components/common/model/JsonData";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
import {
|
||||
|
@ -365,7 +365,7 @@
|
|||
},
|
||||
search() {
|
||||
this.selectRows = new Set();
|
||||
this.getLabel()
|
||||
getLabel(this, API_SCENARIO_LIST);
|
||||
this.condition.moduleIds = this.selectNodeIds;
|
||||
if (this.trashEnable) {
|
||||
this.condition.filters = {status: ["Trash"]};
|
||||
|
@ -415,24 +415,6 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = API_SCENARIO_LIST
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCommand(cmd) {
|
||||
let table = this.$refs.scenarioTable;
|
||||
switch (cmd) {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column v-if="item.prop == 'num'" prop="num" label="ID" min-width="120px" show-overflow-tooltip
|
||||
<el-table-column v-if="item.id == 'num'" prop="num" label="ID" min-width="120px" show-overflow-tooltip
|
||||
:key="index">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip content="编辑">
|
||||
|
@ -43,11 +43,11 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="item.prop == 'name'" prop="name" min-width="160px" :label="$t('test_track.case.name')"
|
||||
<el-table-column v-if="item.id == 'name'" prop="name" min-width="160px" :label="$t('test_track.case.name')"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'priority'"
|
||||
v-if="item.id == 'priority'"
|
||||
prop="priority"
|
||||
:filters="priorityFilters"
|
||||
column-key="priority"
|
||||
|
@ -61,7 +61,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'custom'"
|
||||
v-if="item.id == 'custom'"
|
||||
sortable="custom"
|
||||
prop="path"
|
||||
min-width="180px"
|
||||
|
@ -69,7 +69,7 @@
|
|||
show-overflow-tooltip
|
||||
:key="index"/>
|
||||
|
||||
<el-table-column v-if="item.prop=='tags'" prop="tags" min-width="120px" :label="$t('commons.tag')"
|
||||
<el-table-column v-if="item.id=='tags'" prop="tags" min-width="120px" :label="$t('commons.tag')"
|
||||
:key="index">
|
||||
<template v-slot:default="scope">
|
||||
<div v-for="(itemName,index) in scope.row.tags" :key="index">
|
||||
|
@ -79,14 +79,14 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='createUser'"
|
||||
v-if="item.id=='createUser'"
|
||||
prop="createUser"
|
||||
:label="'创建人'"
|
||||
show-overflow-tooltip
|
||||
:key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='custom'"
|
||||
v-if="item.id=='custom'"
|
||||
sortable="custom"
|
||||
min-width="160"
|
||||
:label="$t('api_test.definition.api_last_time')"
|
||||
|
@ -162,7 +162,7 @@ import {parseEnvironment} from "@/business/components/api/test/model/Environment
|
|||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import {_filter, _handleSelect, _handleSelectAll, _sort,} from "@/common/js/tableUtils";
|
||||
import {_filter, _handleSelect, _handleSelectAll, _sort, getLabel,} from "@/common/js/tableUtils";
|
||||
import {API_CASE_LIST, API_LIST, API_SCENARIO_LIST, TEST_CASE_LIST} from "@/common/js/constants";
|
||||
import {Api_Case_List, Api_List, Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
|
@ -307,7 +307,7 @@ export default {
|
|||
this.$emit("activeDomChange", tabType);
|
||||
},
|
||||
initTable() {
|
||||
this.getLabel()
|
||||
getLabel(this, API_CASE_LIST);
|
||||
this.selectRows = new Set();
|
||||
this.condition.status = "";
|
||||
this.condition.moduleIds = this.selectNodeIds;
|
||||
|
@ -351,24 +351,6 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = API_CASE_LIST
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
open() {
|
||||
this.$refs.searchBar.open();
|
||||
},
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
</el-table-column>
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column
|
||||
v-if="item.prop == 'num'"
|
||||
v-if="item.id == 'num'"
|
||||
prop="num"
|
||||
label="ID"
|
||||
show-overflow-tooltip
|
||||
|
@ -50,7 +50,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'name'"
|
||||
v-if="item.id == 'name'"
|
||||
prop="name"
|
||||
:label="$t('api_test.definition.api_name')"
|
||||
show-overflow-tooltip
|
||||
|
@ -58,7 +58,7 @@
|
|||
min-width="120px"
|
||||
:key="index"/>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'status'"
|
||||
v-if="item.id == 'status'"
|
||||
prop="status"
|
||||
column-key="status"
|
||||
sortable="custom"
|
||||
|
@ -74,7 +74,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'method'"
|
||||
v-if="item.id == 'method'"
|
||||
prop="method"
|
||||
sortable="custom"
|
||||
column-key="method"
|
||||
|
@ -92,7 +92,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'userName'"
|
||||
v-if="item.id == 'userName'"
|
||||
prop="userName"
|
||||
sortable="custom"
|
||||
:filters="userFilters"
|
||||
|
@ -103,7 +103,7 @@
|
|||
:key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'path'"
|
||||
v-if="item.id == 'path'"
|
||||
prop="path"
|
||||
min-width="120px"
|
||||
:label="$t('api_test.definition.api_path')"
|
||||
|
@ -111,7 +111,7 @@
|
|||
:key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'tags'"
|
||||
v-if="item.id == 'tags'"
|
||||
prop="tags"
|
||||
:label="$t('commons.tag')"
|
||||
min-width="80px"
|
||||
|
@ -125,7 +125,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'updateTime'"
|
||||
v-if="item.id == 'updateTime'"
|
||||
width="160"
|
||||
:label="$t('api_test.definition.api_last_time')"
|
||||
sortable="custom"
|
||||
|
@ -138,7 +138,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'caseTotal'"
|
||||
v-if="item.id == 'caseTotal'"
|
||||
prop="caseTotal"
|
||||
min-width="80px"
|
||||
:label="$t('api_test.definition.api_case_number')"
|
||||
|
@ -146,7 +146,7 @@
|
|||
:key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'caseStatus'"
|
||||
v-if="item.id == 'caseStatus'"
|
||||
prop="caseStatus"
|
||||
min-width="80px"
|
||||
:label="$t('api_test.definition.api_case_status')"
|
||||
|
@ -154,7 +154,7 @@
|
|||
:key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'casePassingRate'"
|
||||
v-if="item.id == 'casePassingRate'"
|
||||
prop="casePassingRate"
|
||||
:width="100"
|
||||
min-width="100px"
|
||||
|
@ -235,7 +235,7 @@ import CaseBatchMove from "@/business/components/api/definition/components/basis
|
|||
import ApiListContainerWithDoc from "@/business/components/api/definition/components/list/ApiListContainerWithDoc";
|
||||
import {
|
||||
_handleSelect,
|
||||
_handleSelectAll,
|
||||
_handleSelectAll, getLabel,
|
||||
getSelectDataCounts, initCondition,
|
||||
setUnSelectIds, toggleAllSelection
|
||||
} from "@/common/js/tableUtils";
|
||||
|
@ -403,7 +403,7 @@ export default {
|
|||
this.$emit("activeDomChange",tabType);
|
||||
},
|
||||
initTable() {
|
||||
this.getLabel()
|
||||
getLabel(this, API_LIST);
|
||||
this.selectRows = new Set();
|
||||
initCondition(this.condition);
|
||||
this.selectDataCounts = 0;
|
||||
|
@ -450,25 +450,6 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = API_LIST
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
genProtocalFilter(protocalType) {
|
||||
if (protocalType === "HTTP") {
|
||||
this.methodFilters = [
|
||||
|
|
|
@ -1,40 +1,31 @@
|
|||
<template>
|
||||
<el-dialog title="表头显示字段" :visible.sync="dialogTableVisible" :append-to-body="true">
|
||||
<template>
|
||||
<el-transfer
|
||||
:titles="['待选字段', '已选字段']"
|
||||
v-model="value"
|
||||
:props="{
|
||||
key: 'prop',
|
||||
label: 'label'
|
||||
}"
|
||||
:data="optionalField"
|
||||
style="margin-left: 10%"
|
||||
></el-transfer>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<ms-dialog-footer
|
||||
@cancel="close"
|
||||
@confirm="saveHeader"
|
||||
/>
|
||||
</template>
|
||||
<tree-transfer :title="['待选字段', '已选字段']"
|
||||
:from_data='optionalFields'
|
||||
:draggable="true"
|
||||
:to_data='fieldSelected'
|
||||
:defaultProps="{label:'label'}"
|
||||
:mode='mode' height='540px' filter openAll/>
|
||||
<template v-slot:footer>
|
||||
<ms-dialog-footer @cancel="close" @confirm="saveHeader"/>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MsDialogFooter from "@/business/components/common/components/MsDialogFooter";
|
||||
import {getCurrentUser} from "@/common/js/utils";
|
||||
import {TEST_CASE_LIST} from "@/common/js/constants";
|
||||
import {Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||
import treeTransfer from 'el-tree-transfer'
|
||||
|
||||
export default {
|
||||
name: "HeaderCustom",
|
||||
components: {MsDialogFooter},
|
||||
components: {MsDialogFooter, treeTransfer},
|
||||
data() {
|
||||
return {
|
||||
dialogTableVisible: false,
|
||||
optionalField: this.optionalFields,
|
||||
value: [],
|
||||
fieldSelected: []
|
||||
fieldSelected: [],
|
||||
mode: "transfer", // transfer addressList
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -55,7 +46,7 @@ export default {
|
|||
let param = {
|
||||
userId: getCurrentUser().id,
|
||||
type: this.type,
|
||||
props: JSON.stringify(this.value)
|
||||
props: JSON.stringify(this.fieldSelected)
|
||||
}
|
||||
this.$post("/system/save/header", param, response => {
|
||||
this.$success(this.$t("commons.save_success"));
|
||||
|
@ -63,9 +54,39 @@ export default {
|
|||
this.initTableData()
|
||||
})
|
||||
},
|
||||
removeAt(idx) {
|
||||
this.list.splice(idx, 1);
|
||||
},
|
||||
close() {
|
||||
this.dialogTableVisible = false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 切换模式 现有树形穿梭框模式transfer 和通讯录模式addressList
|
||||
// changeMode() {
|
||||
// if (this.mode == "transfer") {
|
||||
// this.mode = "addressList";
|
||||
// } else {
|
||||
// this.mode = "transfer";
|
||||
// }
|
||||
// },
|
||||
// // 监听穿梭框组件添加
|
||||
// add(fromData, toData, obj){
|
||||
// // 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
|
||||
// // 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
|
||||
// console.log("fromData:", fromData);
|
||||
// console.log("toData:", toData);
|
||||
// console.log("obj:", obj);
|
||||
// },
|
||||
// // 监听穿梭框组件移除
|
||||
// remove(fromData, toData, obj){
|
||||
// // 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
|
||||
// // 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
|
||||
// console.log("fromData:", fromData);
|
||||
// console.log("toData:", toData);
|
||||
// console.log("obj:", obj);
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -2,132 +2,132 @@ import i18n from '../../../../i18n/i18n'
|
|||
//自定义默认表头
|
||||
//测试用例
|
||||
export const Track_Test_Case = [
|
||||
{prop: 'num', label: i18n.t('commons.id')},
|
||||
{prop: 'name', label: i18n.t('commons.name')},
|
||||
{prop: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{prop: 'type', label: i18n.t('test_track.case.type')},
|
||||
{prop: 'method', label: i18n.t('test_track.case.method')},
|
||||
{prop: 'reviewStatus', label: i18n.t('test_track.case.status')},
|
||||
{prop: 'tags', label: i18n.t('commons.tag')},
|
||||
{prop: 'nodePath', label: i18n.t('test_track.case.module')},
|
||||
{prop: 'updateTime', label: i18n.t('commons.update_time')},
|
||||
{id: 'num', label: i18n.t('commons.id')},
|
||||
{id: 'name', label: i18n.t('commons.name')},
|
||||
{id: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{id: 'type', label: i18n.t('test_track.case.type')},
|
||||
{id: 'method', label: i18n.t('test_track.case.method')},
|
||||
{id: 'reviewStatus', label: i18n.t('test_track.case.status')},
|
||||
{id: 'tags', label: i18n.t('commons.tag')},
|
||||
{id: 'nodePath', label: i18n.t('test_track.case.module')},
|
||||
{id: 'updateTime', label: i18n.t('commons.update_time')},
|
||||
]
|
||||
//用例评审-测试用例
|
||||
export const Test_Case_Review = [
|
||||
{prop: 'name', label: i18n.t('test_track.review.review_name')},
|
||||
{prop: 'reviewer', label: i18n.t('test_track.review.reviewer')},
|
||||
{prop: 'projectName', label: i18n.t('test_track.review.review_project')},
|
||||
{prop: 'creatorName', label: i18n.t('test_track.review.review_creator')},
|
||||
{prop: 'status', label: i18n.t('test_track.review.review_status')},
|
||||
{prop: 'createTime', label: i18n.t('commons.create_time')},
|
||||
{prop: 'endTime', label: i18n.t('test_track.review.end_time')},
|
||||
{id: 'name', label: i18n.t('test_track.review.review_name')},
|
||||
{id: 'reviewer', label: i18n.t('test_track.review.reviewer')},
|
||||
{id: 'projectName', label: i18n.t('test_track.review.review_project')},
|
||||
{id: 'creatorName', label: i18n.t('test_track.review.review_creator')},
|
||||
{id: 'status', label: i18n.t('test_track.review.review_status')},
|
||||
{id: 'createTime', label: i18n.t('commons.create_time')},
|
||||
{id: 'endTime', label: i18n.t('test_track.review.end_time')},
|
||||
]
|
||||
//测试计划-测试用例
|
||||
export const Test_Plan_List = [
|
||||
{prop: 'name', label: i18n.t('commons.name')},
|
||||
{prop: 'userName', label: i18n.t('test_track.plan.plan_principal')},
|
||||
{prop: 'status', label: i18n.t('test_track.plan.plan_status')},
|
||||
{prop: 'stage', label: i18n.t('test_track.plan.plan_stage')},
|
||||
{prop: 'testRate', label: i18n.t('test_track.home.test_rate')},
|
||||
{prop: 'projectName', label: i18n.t('test_track.plan.plan_project')},
|
||||
{prop: 'plannedStartTime', label: i18n.t('test_track.plan.planned_start_time')},
|
||||
{prop: 'plannedEndTime', label: i18n.t('test_track.plan.planned_end_time')},
|
||||
{prop: 'actualStartTime', label: i18n.t('test_track.plan.actual_start_time')},
|
||||
{prop: 'actualEndTime', label: i18n.t('test_track.plan.actual_end_time')},
|
||||
{id: 'name', label: i18n.t('commons.name')},
|
||||
{id: 'userName', label: i18n.t('test_track.plan.plan_principal')},
|
||||
{id: 'status', label: i18n.t('test_track.plan.plan_status')},
|
||||
{id: 'stage', label: i18n.t('test_track.plan.plan_stage')},
|
||||
{id: 'testRate', label: i18n.t('test_track.home.test_rate')},
|
||||
{id: 'projectName', label: i18n.t('test_track.plan.plan_project')},
|
||||
{id: 'plannedStartTime', label: i18n.t('test_track.plan.planned_start_time')},
|
||||
{id: 'plannedEndTime', label: i18n.t('test_track.plan.planned_end_time')},
|
||||
{id: 'actualStartTime', label: i18n.t('test_track.plan.actual_start_time')},
|
||||
{id: 'actualEndTime', label: i18n.t('test_track.plan.actual_end_time')},
|
||||
]
|
||||
//接口定义-api列表
|
||||
export const Api_List = [
|
||||
{prop: 'num', label: "ID"},
|
||||
{prop: 'name', label: i18n.t('api_test.definition.api_name')},
|
||||
{prop: 'method', label: i18n.t('api_test.definition.api_type')},
|
||||
{prop: 'userName', label: i18n.t('api_test.definition.api_principal')},
|
||||
{prop: 'path', label: i18n.t('api_test.definition.api_path')},
|
||||
{prop: 'tags', label: i18n.t('commons.tag')},
|
||||
{prop: 'updateTime', label: i18n.t('api_test.definition.api_last_time')},
|
||||
{prop: 'caseTotal', label: i18n.t('api_test.definition.api_case_number')},
|
||||
{prop: 'caseStatus', label: i18n.t('api_test.definition.api_case_status')},
|
||||
{prop: 'casePassingRate', label: i18n.t('api_test.definition.api_case_passing_rate')},
|
||||
{id: 'num', label: "ID"},
|
||||
{id: 'name', label: i18n.t('api_test.definition.api_name')},
|
||||
{id: 'method', label: i18n.t('api_test.definition.api_type')},
|
||||
{id: 'userName', label: i18n.t('api_test.definition.api_principal')},
|
||||
{id: 'path', label: i18n.t('api_test.definition.api_path')},
|
||||
{id: 'tags', label: i18n.t('commons.tag')},
|
||||
{id: 'updateTime', label: i18n.t('api_test.definition.api_last_time')},
|
||||
{id: 'caseTotal', label: i18n.t('api_test.definition.api_case_number')},
|
||||
{id: 'caseStatus', label: i18n.t('api_test.definition.api_case_status')},
|
||||
{id: 'casePassingRate', label: i18n.t('api_test.definition.api_case_passing_rate')},
|
||||
]
|
||||
//接口定义-case列表
|
||||
export const Api_Case_List = [
|
||||
{prop: 'num', label: "ID"},
|
||||
{prop: 'name', label: i18n.t('test_track.case.name')},
|
||||
{prop: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{prop: 'path', label: i18n.t('api_test.definition.api_path')},
|
||||
{prop: 'tags', label: i18n.t('commons.tag')},
|
||||
{prop: 'createUser', label: "创建人"},
|
||||
{prop: 'updateTime', label: i18n.t('api_test.definition.api_last_time')},
|
||||
{id: 'num', label: "ID"},
|
||||
{id: 'name', label: i18n.t('test_track.case.name')},
|
||||
{id: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{id: 'path', label: i18n.t('api_test.definition.api_path')},
|
||||
{id: 'tags', label: i18n.t('commons.tag')},
|
||||
{id: 'createUser', label: "创建人"},
|
||||
{id: 'updateTime', label: i18n.t('api_test.definition.api_last_time')},
|
||||
]
|
||||
//接口自动化-场景列表
|
||||
export const Api_Scenario_List = [
|
||||
{prop: 'num', label: "ID"},
|
||||
{prop: 'name', label: i18n.t('test_track.case.name')},
|
||||
{prop: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{prop: 'path', label: i18n.t('api_test.definition.api_path')},
|
||||
{prop: 'tags', label: i18n.t('commons.tag')},
|
||||
{prop: 'createUser', label: '创建人'},
|
||||
{prop: 'updateTime', label: i18n.t('api_test.definition.api_last_time')},
|
||||
{id: 'num', label: "ID"},
|
||||
{id: 'name', label: i18n.t('test_track.case.name')},
|
||||
{id: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{id: 'path', label: i18n.t('api_test.definition.api_path')},
|
||||
{id: 'tags', label: i18n.t('commons.tag')},
|
||||
{id: 'createUser', label: '创建人'},
|
||||
{id: 'updateTime', label: i18n.t('api_test.definition.api_last_time')},
|
||||
]
|
||||
//测试评审-测试用例
|
||||
export const Test_Case_Review_Case_List = [
|
||||
{prop: 'num', label: i18n.t('commons.id')},
|
||||
{prop: 'name', label: i18n.t('commons.name')},
|
||||
{prop: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{prop: 'type', label: i18n.t('test_track.case.type')},
|
||||
{prop: 'method', label: i18n.t('test_track.case.method')},
|
||||
{prop: 'nodePath', label: i18n.t('test_track.case.module')},
|
||||
{prop: 'projectName', label: i18n.t('test_track.review.review_project')},
|
||||
{prop: 'reviewerName', label: i18n.t('test_track.review.reviewer')},
|
||||
{prop: 'reviewStatus', label: i18n.t('test_track.case.status')},
|
||||
{prop: 'updateTime', label: i18n.t('commons.update_time')},
|
||||
{id: 'num', label: i18n.t('commons.id')},
|
||||
{id: 'name', label: i18n.t('commons.name')},
|
||||
{id: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{id: 'type', label: i18n.t('test_track.case.type')},
|
||||
{id: 'method', label: i18n.t('test_track.case.method')},
|
||||
{id: 'nodePath', label: i18n.t('test_track.case.module')},
|
||||
{id: 'projectName', label: i18n.t('test_track.review.review_project')},
|
||||
{id: 'reviewerName', label: i18n.t('test_track.review.reviewer')},
|
||||
{id: 'reviewStatus', label: i18n.t('test_track.case.status')},
|
||||
{id: 'updateTime', label: i18n.t('commons.update_time')},
|
||||
]
|
||||
//测试计划-功能用例
|
||||
export const Test_Plan_Function_Test_Case = [
|
||||
{prop: 'num', label: i18n.t('commons.id')},
|
||||
{prop: 'name', label: i18n.t('commons.name')},
|
||||
{prop: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{prop: 'type', label: i18n.t('test_track.case.type')},
|
||||
{prop: 'tags', label: i18n.t('commons.tag')},
|
||||
{prop: 'method', label: i18n.t('test_track.case.method')},
|
||||
{prop: 'nodePath', label: i18n.t('test_track.case.module')},
|
||||
{prop: 'projectName', label: i18n.t('test_track.review.review_project')},
|
||||
{prop: 'issuesContent', label: i18n.t('test_track.issue.issue')},
|
||||
{prop: 'executorName', label: i18n.t('test_track.plan_view.executor')},
|
||||
{prop: 'status', label: i18n.t('test_track.plan_view.execute_result')},
|
||||
{prop: 'updateTime', label: i18n.t('commons.update_time')},
|
||||
{id: 'num', label: i18n.t('commons.id')},
|
||||
{id: 'name', label: i18n.t('commons.name')},
|
||||
{id: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{id: 'type', label: i18n.t('test_track.case.type')},
|
||||
{id: 'tags', label: i18n.t('commons.tag')},
|
||||
{id: 'method', label: i18n.t('test_track.case.method')},
|
||||
{id: 'nodePath', label: i18n.t('test_track.case.module')},
|
||||
{id: 'projectName', label: i18n.t('test_track.review.review_project')},
|
||||
{id: 'issuesContent', label: i18n.t('test_track.issue.issue')},
|
||||
{id: 'executorName', label: i18n.t('test_track.plan_view.executor')},
|
||||
{id: 'status', label: i18n.t('test_track.plan_view.execute_result')},
|
||||
{id: 'updateTime', label: i18n.t('commons.update_time')},
|
||||
]
|
||||
//测试计划-api用例
|
||||
export const Test_Plan_Api_Case = [
|
||||
{prop: 'num', label: i18n.t('commons.id')},
|
||||
{prop: 'name', label: i18n.t('commons.name')},
|
||||
{prop: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{prop: 'path', label: i18n.t('api_test.definition.api_path')},
|
||||
{prop: 'createUser', label: '创建人'},
|
||||
{prop: 'custom', label: i18n.t('api_test.definition.api_last_time')},
|
||||
{prop: 'tags', label: i18n.t('commons.tag')},
|
||||
{prop: 'execResult', label: '执行状态'},
|
||||
{id: 'num', label: i18n.t('commons.id')},
|
||||
{id: 'name', label: i18n.t('commons.name')},
|
||||
{id: 'priority', label: i18n.t('test_track.case.priority')},
|
||||
{id: 'path', label: i18n.t('api_test.definition.api_path')},
|
||||
{id: 'createUser', label: '创建人'},
|
||||
{id: 'custom', label: i18n.t('api_test.definition.api_last_time')},
|
||||
{id: 'tags', label: i18n.t('commons.tag')},
|
||||
{id: 'execResult', label: '执行状态'},
|
||||
]
|
||||
//测试计划-性能用例
|
||||
export const Test_Plan_Load_Case = [
|
||||
{prop: 'num', label: i18n.t('commons.id')},
|
||||
{prop: 'caseName', label: i18n.t('commons.name')},
|
||||
{prop: 'projectName', label: i18n.t('load_test.project_name')},
|
||||
{prop: 'userName', label: i18n.t('load_test.user_name')},
|
||||
{prop: 'createTime', label: i18n.t('commons.create_time')},
|
||||
{prop: 'status', label: i18n.t('commons.status')},
|
||||
{prop: 'caseStatus', label: i18n.t('test_track.plan.load_case.execution_status')},
|
||||
{prop: 'loadReportId', label: i18n.t('test_track.plan.load_case.view_report')},
|
||||
{id: 'num', label: i18n.t('commons.id')},
|
||||
{id: 'caseName', label: i18n.t('commons.name')},
|
||||
{id: 'projectName', label: i18n.t('load_test.project_name')},
|
||||
{id: 'userName', label: i18n.t('load_test.user_name')},
|
||||
{id: 'createTime', label: i18n.t('commons.create_time')},
|
||||
{id: 'status', label: i18n.t('commons.status')},
|
||||
{id: 'caseStatus', label: i18n.t('test_track.plan.load_case.execution_status')},
|
||||
{id: 'loadReportId', label: i18n.t('test_track.plan.load_case.view_report')},
|
||||
]
|
||||
//测试计划-场景用例
|
||||
export const Test_Plan_Scenario_Case = [
|
||||
{prop: 'num', label: i18n.t('commons.id')},
|
||||
{prop: 'name', label: i18n.t('commons.name')},
|
||||
{prop: 'level', label: i18n.t('api_test.automation.case_level')},
|
||||
{prop: 'tagNames', label: i18n.t('api_test.automation.tag')},
|
||||
{prop: 'userId', label: i18n.t('api_test.automation.creator')},
|
||||
{prop: 'updateTime', label: i18n.t('api_test.automation.update_time')},
|
||||
{prop: 'stepTotal', label: i18n.t('api_test.automation.success')},
|
||||
{prop: 'lastResult', label: i18n.t('api_test.automation.fail')},
|
||||
{prop: 'passRate', label: i18n.t('api_test.automation.passing_rate')},
|
||||
{id: 'num', label: i18n.t('commons.id')},
|
||||
{id: 'name', label: i18n.t('commons.name')},
|
||||
{id: 'level', label: i18n.t('api_test.automation.case_level')},
|
||||
{id: 'tagNames', label: i18n.t('api_test.automation.tag')},
|
||||
{id: 'userId', label: i18n.t('api_test.automation.creator')},
|
||||
{id: 'updateTime', label: i18n.t('api_test.automation.update_time')},
|
||||
{id: 'stepTotal', label: i18n.t('api_test.automation.success')},
|
||||
{id: 'lastResult', label: i18n.t('api_test.automation.fail')},
|
||||
{id: 'passRate', label: i18n.t('api_test.automation.passing_rate')},
|
||||
]
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<template v-for="(item, index) in tableLabel">
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'num'"
|
||||
v-if="item.id == 'num'"
|
||||
prop="num"
|
||||
sortable="custom"
|
||||
:label="$t('commons.id')"
|
||||
|
@ -60,7 +60,7 @@
|
|||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'name'"
|
||||
v-if="item.id == 'name'"
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
show-overflow-tooltip
|
||||
|
@ -81,7 +81,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'priority'"
|
||||
v-if="item.id == 'priority'"
|
||||
prop="priority"
|
||||
:filters="priorityFilters"
|
||||
column-key="priority"
|
||||
|
@ -94,7 +94,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'type'"
|
||||
v-if="item.id == 'type'"
|
||||
prop="type"
|
||||
:filters="typeFilters"
|
||||
column-key="type"
|
||||
|
@ -106,7 +106,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='method'"
|
||||
v-if="item.id=='method'"
|
||||
prop="method"
|
||||
column-key="method"
|
||||
:filters="methodFilters"
|
||||
|
@ -120,7 +120,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='status'"
|
||||
v-if="item.id=='status'"
|
||||
:filters="statusFilters"
|
||||
column-key="status"
|
||||
min-width="100px"
|
||||
|
@ -133,7 +133,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="item.prop=='tags'" prop="tags" :label="$t('commons.tag')" :key="index">
|
||||
<el-table-column v-if="item.id=='tags'" prop="tags" :label="$t('commons.tag')" :key="index">
|
||||
<template v-slot:default="scope">
|
||||
<div v-for="(itemName,index) in scope.row.tags" :key="index">
|
||||
<ms-tag type="success" effect="plain" :content="itemName"/>
|
||||
|
@ -142,7 +142,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='nodePath'"
|
||||
v-if="item.id=='nodePath'"
|
||||
prop="nodePath"
|
||||
:label="$t('test_track.case.module')"
|
||||
min-width="150px"
|
||||
|
@ -151,7 +151,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='updateTime'"
|
||||
v-if="item.id=='updateTime'"
|
||||
prop="updateTime"
|
||||
sortable="custom"
|
||||
:label="$t('commons.update_time')"
|
||||
|
@ -224,7 +224,7 @@ import {
|
|||
_filter,
|
||||
_handleSelect,
|
||||
_handleSelectAll,
|
||||
_sort,
|
||||
_sort, getLabel,
|
||||
getSelectDataCounts, initCondition,
|
||||
setUnSelectIds,
|
||||
toggleAllSelection
|
||||
|
@ -378,27 +378,9 @@ export default {
|
|||
// param.nodeIds = this.selectNodeIds;
|
||||
this.condition.nodeIds = this.selectNodeIds;
|
||||
}
|
||||
this.getLabel()
|
||||
getLabel(this, TEST_CASE_LIST);
|
||||
this.getData();
|
||||
},
|
||||
getLabel(){
|
||||
let param={}
|
||||
param.userId=getCurrentUser().id;
|
||||
param.type=TEST_CASE_LIST
|
||||
this.result=this.$post('/system/header/info',param,response=> {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
if (this.projectId) {
|
||||
this.condition.projectId = this.projectId;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
$END$
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "TestcaseMinder"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -16,21 +16,21 @@
|
|||
@row-click="intoPlan">
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column
|
||||
v-if="item.prop == 'name'"
|
||||
v-if="item.id == 'name'"
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'userName'"
|
||||
v-if="item.id == 'userName'"
|
||||
prop="userName"
|
||||
:label="$t('test_track.plan.plan_principal')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'status'"
|
||||
v-if="item.id == 'status'"
|
||||
prop="status"
|
||||
column-key="status"
|
||||
:filters="statusFilters"
|
||||
|
@ -61,7 +61,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'stage'"
|
||||
v-if="item.id == 'stage'"
|
||||
prop="stage"
|
||||
column-key="stage"
|
||||
:filters="stageFilters"
|
||||
|
@ -73,7 +73,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'testRate'"
|
||||
v-if="item.id == 'testRate'"
|
||||
prop="testRate"
|
||||
:label="$t('test_track.home.test_rate')"
|
||||
min-width="100"
|
||||
|
@ -84,14 +84,14 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-colum
|
||||
v-if="item.prop == 'projectName'"
|
||||
v-if="item.id == 'projectName'"
|
||||
prop="projectName"
|
||||
:label="$t('test_track.plan.plan_project')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-colum>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'plannedStartTime'"
|
||||
v-if="item.id == 'plannedStartTime'"
|
||||
sortable
|
||||
prop="plannedStartTime"
|
||||
:label="$t('test_track.plan.planned_start_time')"
|
||||
|
@ -102,7 +102,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'plannedEndTime'"
|
||||
v-if="item.id == 'plannedEndTime'"
|
||||
sortable
|
||||
prop="plannedEndTime"
|
||||
:label="$t('test_track.plan.planned_end_time')"
|
||||
|
@ -113,7 +113,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'actualStartTime'"
|
||||
v-if="item.id == 'actualStartTime'"
|
||||
sortable
|
||||
prop="actualStartTime"
|
||||
:label="$t('test_track.plan.actual_start_time')"
|
||||
|
@ -124,7 +124,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'actualEndTime'"
|
||||
v-if="item.id == 'actualEndTime'"
|
||||
sortable
|
||||
prop="actualEndTime"
|
||||
:label="$t('test_track.plan.actual_end_time')"
|
||||
|
@ -201,7 +201,7 @@ import {TEST_PLAN_CONFIGS} from "../../../common/components/search/search-compon
|
|||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||
import MsScheduleMaintain from "@/business/components/api/automation/schedule/ScheduleMaintain"
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
import {_filter, _sort, getLabel} from "@/common/js/tableUtils";
|
||||
import {TEST_CASE_LIST, TEST_PLAN_LIST} from "@/common/js/constants";
|
||||
import {Test_Plan_List, Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
|
@ -265,7 +265,7 @@ export default {
|
|||
this.$refs.headerCustom.open(this.tableLabel)
|
||||
},
|
||||
initTableData() {
|
||||
this.getLabel()
|
||||
getLabel(this, TEST_PLAN_LIST);
|
||||
if (this.planId) {
|
||||
this.condition.planId = this.planId;
|
||||
}
|
||||
|
@ -289,24 +289,6 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = TEST_PLAN_LIST
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
buildPagePath(path) {
|
||||
return path + "/" + this.currentPage + "/" + this.pageSize;
|
||||
},
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column v-if="item.prop == 'num'" prop="num" sortable="custom" label="ID" show-overflow-tooltip
|
||||
<el-table-column v-if="item.id == 'num'" prop="num" sortable="custom" label="ID" show-overflow-tooltip
|
||||
:key="index"/>
|
||||
<el-table-column v-if="item.prop == 'name'" prop="name" sortable="custom"
|
||||
<el-table-column v-if="item.id == 'name'" prop="name" sortable="custom"
|
||||
:label="$t('api_test.definition.api_name')" show-overflow-tooltip :key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'priority'"
|
||||
v-if="item.id == 'priority'"
|
||||
prop="priority"
|
||||
:filters="priorityFilters"
|
||||
sortable="custom"
|
||||
|
@ -46,14 +46,14 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'path'"
|
||||
v-if="item.id == 'path'"
|
||||
prop="path"
|
||||
:label="$t('api_test.definition.api_path')"
|
||||
show-overflow-tooltip
|
||||
:key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'createUser'"
|
||||
v-if="item.id == 'createUser'"
|
||||
prop="createUser"
|
||||
column-key="user_id"
|
||||
sortable="custom"
|
||||
|
@ -63,7 +63,7 @@
|
|||
:key="index"/>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'custom'"
|
||||
v-if="item.id == 'custom'"
|
||||
sortable="custom"
|
||||
width="160"
|
||||
:label="$t('api_test.definition.api_last_time')"
|
||||
|
@ -75,7 +75,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'tags'"
|
||||
v-if="item.id == 'tags'"
|
||||
prop="tags"
|
||||
:label="$t('commons.tag')"
|
||||
:key="index">
|
||||
|
@ -86,7 +86,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="item.prop == 'execResult'" :label="'执行状态'" min-width="130" align="center" :key="index">
|
||||
<el-table-column v-if="item.id == 'execResult'" :label="'执行状态'" min-width="130" align="center" :key="index">
|
||||
<template v-slot:default="scope">
|
||||
<div v-loading="rowLoading === scope.row.id">
|
||||
<el-link type="danger"
|
||||
|
@ -161,7 +161,7 @@ import TestPlanApiCaseResult from "./TestPlanApiCaseResult";
|
|||
import TestPlan from "../../../../../api/definition/components/jmeter/components/test-plan";
|
||||
import ThreadGroup from "../../../../../api/definition/components/jmeter/components/thread-group";
|
||||
import {TEST_CASE_LIST, TEST_PLAN_API_CASE, WORKSPACE_ID} from "@/common/js/constants";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
import {_filter, _sort, getLabel} from "@/common/js/tableUtils";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
import {Test_Plan_Api_Case, Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||
|
||||
|
@ -307,7 +307,7 @@ export default {
|
|||
this.$emit('isApiListEnableChange', data);
|
||||
},
|
||||
initTable() {
|
||||
this.getLabel()
|
||||
getLabel(this, TEST_PLAN_API_CASE);
|
||||
this.selectRows = new Set();
|
||||
this.condition.status = "";
|
||||
this.condition.moduleIds = this.selectNodeIds;
|
||||
|
@ -335,25 +335,6 @@ export default {
|
|||
})
|
||||
});
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = TEST_PLAN_API_CASE
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelect(selection, row) {
|
||||
row.hashTree = [];
|
||||
if (this.selectRows.has(row)) {
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
</el-table-column>
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column
|
||||
v-if="item.prop == 'num'"
|
||||
v-if="item.id == 'num'"
|
||||
prop="num"
|
||||
label="ID"
|
||||
:key="index"/>
|
||||
<el-table-column v-if="item.prop == 'name'" prop="name" :label="$t('api_test.automation.scenario_name')"
|
||||
<el-table-column v-if="item.id == 'name'" prop="name" :label="$t('api_test.automation.scenario_name')"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
<el-table-column v-if="item.prop == 'level'" prop="level" :label="$t('api_test.automation.case_level')"
|
||||
<el-table-column v-if="item.id == 'level'" prop="level" :label="$t('api_test.automation.case_level')"
|
||||
show-overflow-tooltip :key="index">
|
||||
<template v-slot:default="scope">
|
||||
<ms-tag v-if="scope.row.level == 'P0'" type="info" effect="plain" content="P0"/>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'tagNames'" prop="tagNames" :label="$t('api_test.automation.tag')"
|
||||
<el-table-column v-if="item.id == 'tagNames'" prop="tagNames" :label="$t('api_test.automation.tag')"
|
||||
width="200px" :key="index">
|
||||
<template v-slot:default="scope">
|
||||
<div v-for="(itemName,index) in scope.row.tags" :key="index">
|
||||
|
@ -42,17 +42,17 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'userId'" prop="userId" :label="$t('api_test.automation.creator')"
|
||||
<el-table-column v-if="item.id == 'userId'" prop="userId" :label="$t('api_test.automation.creator')"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
<el-table-column v-if="item.prop == 'updateTime'" prop="updateTime"
|
||||
<el-table-column v-if="item.id == 'updateTime'" prop="updateTime"
|
||||
:label="$t('api_test.automation.update_time')" width="180" :key="index">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'stepTotal'" prop="stepTotal" :label="$t('api_test.automation.step')"
|
||||
<el-table-column v-if="item.id == 'stepTotal'" prop="stepTotal" :label="$t('api_test.automation.step')"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
<el-table-column v-if="item.prop == 'lastResult'" prop="lastResult"
|
||||
<el-table-column v-if="item.id == 'lastResult'" prop="lastResult"
|
||||
:label="$t('api_test.automation.last_result')" :key="index">
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="success" @click="showReport(row)" v-if="row.lastResult === 'Success'">
|
||||
|
@ -63,7 +63,7 @@
|
|||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.prop == 'passRate'" prop="passRate"
|
||||
<el-table-column v-if="item.id == 'passRate'" prop="passRate"
|
||||
:label="$t('api_test.automation.passing_rate')"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
</template>
|
||||
|
@ -108,7 +108,7 @@ import MsTableMoreBtn from "../../../../../api/automation/scenario/TableMoreBtn"
|
|||
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
||||
import MsTestPlanList from "../../../../../api/automation/scenario/testplan/TestPlanList";
|
||||
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
|
||||
import {_handleSelect, _handleSelectAll} from "../../../../../../../common/js/tableUtils";
|
||||
import {_handleSelect, _handleSelectAll, getLabel} from "../../../../../../../common/js/tableUtils";
|
||||
import MsTableOperatorButton from "../../../../../common/components/MsTableOperatorButton";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
import {TEST_CASE_LIST, TEST_PLAN_SCENARIO_CASE} from "@/common/js/constants";
|
||||
|
@ -186,7 +186,7 @@ export default {
|
|||
this.$refs.headerCustom.open(this.tableLabel)
|
||||
},
|
||||
search() {
|
||||
this.getLabel()
|
||||
getLabel(this, TEST_PLAN_SCENARIO_CASE);
|
||||
this.selectRows = new Set();
|
||||
this.loading = true;
|
||||
this.condition.moduleIds = this.selectNodeIds;
|
||||
|
@ -212,25 +212,6 @@ export default {
|
|||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = TEST_PLAN_SCENARIO_CASE
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
reductionApi(row) {
|
||||
row.scenarioDefinition = null;
|
||||
let rows = [row];
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</el-table-column>
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column
|
||||
v-if="item.prop == 'num'"
|
||||
v-if="item.id == 'num'"
|
||||
prop="num"
|
||||
sortable="custom"
|
||||
:label="$t('commons.id')"
|
||||
|
@ -56,7 +56,7 @@
|
|||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='name'"
|
||||
v-if="item.id=='name'"
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
min-width="120px"
|
||||
|
@ -64,7 +64,7 @@
|
|||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='priority'"
|
||||
v-if="item.id=='priority'"
|
||||
prop="priority"
|
||||
:filters="priorityFilters"
|
||||
column-key="priority"
|
||||
|
@ -77,7 +77,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='type'"
|
||||
v-if="item.id=='type'"
|
||||
prop="type"
|
||||
:filters="typeFilters"
|
||||
column-key="type"
|
||||
|
@ -90,7 +90,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="item.prop=='tags'" prop="tags" :label="$t('commons.tag')" min-width="120px"
|
||||
<el-table-column v-if="item.id=='tags'" prop="tags" :label="$t('commons.tag')" min-width="120px"
|
||||
:key="index"
|
||||
>
|
||||
<template v-slot:default="scope">
|
||||
|
@ -101,7 +101,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='method'"
|
||||
v-if="item.id=='method'"
|
||||
prop="method"
|
||||
:filters="methodFilters"
|
||||
column-key="method"
|
||||
|
@ -115,7 +115,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='nodePath'"
|
||||
v-if="item.id=='nodePath'"
|
||||
prop="nodePath"
|
||||
:label="$t('test_track.case.module')"
|
||||
min-width="120px"
|
||||
|
@ -124,7 +124,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='projectName'"
|
||||
v-if="item.id=='projectName'"
|
||||
prop="projectName"
|
||||
:label="$t('test_track.plan.plan_project')"
|
||||
min-width="120px"
|
||||
|
@ -133,7 +133,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='issuesContent'"
|
||||
v-if="item.id=='issuesContent'"
|
||||
:label="$t('test_track.issue.issue')"
|
||||
min-width="80px"
|
||||
show-overflow-tooltip
|
||||
|
@ -167,7 +167,7 @@
|
|||
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'executorName'"
|
||||
v-if="item.id == 'executorName'"
|
||||
prop="executorName"
|
||||
:filters="executorFilters"
|
||||
min-width="100px"
|
||||
|
@ -177,7 +177,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'status'"
|
||||
v-if="item.id == 'status'"
|
||||
prop="status"
|
||||
:filters="statusFilters"
|
||||
column-key="status"
|
||||
|
@ -212,7 +212,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'updateTime'"
|
||||
v-if="item.id == 'updateTime'"
|
||||
|
||||
sortable
|
||||
prop="updateTime"
|
||||
|
@ -291,7 +291,7 @@ import BatchEdit from "../../../../case/components/BatchEdit";
|
|||
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||
import {hub} from "@/business/components/track/plan/event-bus";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
import {_filter, _sort, getLabel} from "@/common/js/tableUtils";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
import {Test_Plan_Function_Test_Case} from "@/business/components/common/model/JsonData";
|
||||
|
||||
|
@ -422,7 +422,7 @@ export default {
|
|||
},
|
||||
|
||||
initTableData() {
|
||||
this.getLabel()
|
||||
getLabel(this, TEST_PLAN_FUNCTION_TEST_CASE);
|
||||
if (this.planId) {
|
||||
// param.planId = this.planId;
|
||||
this.condition.planId = this.planId;
|
||||
|
@ -467,24 +467,6 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = TEST_PLAN_FUNCTION_TEST_CASE
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
showDetail(row, event, column) {
|
||||
this.isReadOnly = true;
|
||||
this.$refs.testPlanTestCaseEdit.openTestCaseEdit(row);
|
||||
|
|
|
@ -24,30 +24,30 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column v-if="item.prop == 'num'" prop="num" label="ID" show-overflow-tooltip :key="index"/>
|
||||
<el-table-column v-if="item.id == 'num'" prop="num" label="ID" show-overflow-tooltip :key="index"/>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'caseName'"
|
||||
v-if="item.id == 'caseName'"
|
||||
prop="caseName"
|
||||
:label="$t('commons.name')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'projectName'"
|
||||
v-if="item.id == 'projectName'"
|
||||
prop="projectName"
|
||||
:label="$t('load_test.project_name')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'userName'"
|
||||
v-if="item.id == 'userName'"
|
||||
prop="userName"
|
||||
:label="$t('load_test.user_name')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'createTime'"
|
||||
v-if="item.id == 'createTime'"
|
||||
sortable
|
||||
prop="createTime"
|
||||
:label="$t('commons.create_time')"
|
||||
|
@ -57,7 +57,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'status'"
|
||||
v-if="item.id == 'status'"
|
||||
prop="status"
|
||||
column-key="status"
|
||||
:filters="statusFilters"
|
||||
|
@ -68,7 +68,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'caseStatus'"
|
||||
v-if="item.id == 'caseStatus'"
|
||||
prop="caseStatus"
|
||||
:label="$t('test_track.plan.load_case.execution_status')"
|
||||
:key="index">
|
||||
|
@ -86,7 +86,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'loadReportId'"
|
||||
v-if="item.id == 'loadReportId'"
|
||||
:label="$t('test_track.plan.load_case.report')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
|
@ -133,7 +133,7 @@ import MsTablePagination from "@/business/components/common/pagination/TablePagi
|
|||
import MsPerformanceTestStatus from "@/business/components/performance/test/PerformanceTestStatus";
|
||||
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
||||
import LoadCaseReport from "@/business/components/track/plan/view/comonents/load/LoadCaseReport";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
import {_filter, _sort, getLabel} from "@/common/js/tableUtils";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
import {TEST_CASE_LIST, TEST_PLAN_LOAD_CASE} from "@/common/js/constants";
|
||||
import {Test_Plan_Load_Case, Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||
|
@ -211,7 +211,7 @@ export default {
|
|||
this.$refs.headerCustom.open(this.tableLabel)
|
||||
},
|
||||
initTable() {
|
||||
this.getLabel()
|
||||
getLabel(this, TEST_PLAN_LOAD_CASE);
|
||||
this.selectRows = new Set();
|
||||
this.condition.testPlanId = this.planId;
|
||||
if (this.selectProjectId && this.selectProjectId !== 'root') {
|
||||
|
@ -232,24 +232,6 @@ export default {
|
|||
this.tableData = listObject;
|
||||
})
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = TEST_PLAN_LOAD_CASE
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
refreshStatus() {
|
||||
this.refreshScheduler = setInterval(() => {
|
||||
// 如果有状态不是最终状态则定时查询
|
||||
|
|
|
@ -16,28 +16,28 @@
|
|||
@row-click="intoReview">
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column
|
||||
v-if="item.prop=='name'"
|
||||
v-if="item.id=='name'"
|
||||
prop="name"
|
||||
:label="$t('test_track.review.review_name')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='reviewer'"
|
||||
v-if="item.id=='reviewer'"
|
||||
prop="reviewer"
|
||||
:label="$t('test_track.review.reviewer')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='projectName'"
|
||||
v-if="item.id=='projectName'"
|
||||
prop="projectName"
|
||||
:label="$t('test_track.review.review_project')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='creatorName'"
|
||||
v-if="item.id=='creatorName'"
|
||||
prop="creatorName"
|
||||
:label="$t('test_track.review.review_creator')"
|
||||
show-overflow-tooltip
|
||||
|
@ -45,7 +45,7 @@
|
|||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='status'"
|
||||
v-if="item.id=='status'"
|
||||
prop="status"
|
||||
column-key="status"
|
||||
:label="$t('test_track.review.review_status')"
|
||||
|
@ -59,7 +59,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='createTime'"
|
||||
v-if="item.id=='createTime'"
|
||||
prop="createTime"
|
||||
:label="$t('commons.create_time')"
|
||||
show-overflow-tooltip
|
||||
|
@ -70,7 +70,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop=='endTime'"
|
||||
v-if="item.id=='endTime'"
|
||||
prop="endTime"
|
||||
:label="$t('test_track.review.end_time')"
|
||||
show-overflow-tooltip
|
||||
|
@ -118,7 +118,7 @@ import {
|
|||
getCurrentProjectID, getCurrentUser,
|
||||
getCurrentWorkspaceId
|
||||
} from "../../../../../common/js/utils";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
import {_filter, _sort, getLabel} from "@/common/js/tableUtils";
|
||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||
import {Test_Case_Review} from "@/business/components/common/model/JsonData";
|
||||
import {TEST_CASE_LIST, TEST_CASE_REVIEW_LIST} from "@/common/js/constants";
|
||||
|
@ -173,7 +173,7 @@ export default {
|
|||
},
|
||||
|
||||
initTableData() {
|
||||
this.getLabel()
|
||||
getLabel(this, TEST_CASE_REVIEW_LIST);
|
||||
let lastWorkspaceId = getCurrentWorkspaceId();
|
||||
this.condition.workspaceId = lastWorkspaceId;
|
||||
if (!getCurrentProjectID()) {
|
||||
|
@ -201,24 +201,6 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = TEST_CASE_REVIEW_LIST
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
intoReview(row) {
|
||||
this.$router.push('/track/review/view/' + row.id);
|
||||
},
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</el-table-column>
|
||||
<template v-for="(item, index) in tableLabel">
|
||||
<el-table-column
|
||||
v-if="item.prop == 'num'"
|
||||
v-if="item.id == 'num'"
|
||||
prop="num"
|
||||
sortable="custom"
|
||||
:label="$t('commons.id')"
|
||||
|
@ -52,7 +52,7 @@
|
|||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'name'"
|
||||
v-if="item.id == 'name'"
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
show-overflow-tooltip
|
||||
|
@ -60,7 +60,7 @@
|
|||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.prop == 'priority'"
|
||||
v-if="item.id == 'priority'"
|
||||
prop="priority"
|
||||
:filters="priorityFilters"
|
||||
column-key="priority"
|
||||
|
@ -72,7 +72,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop == 'type'"
|
||||
v-if="item.id == 'type'"
|
||||
prop="type"
|
||||
:filters="typeFilters"
|
||||
column-key="type"
|
||||
|
@ -85,7 +85,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='method'"
|
||||
v-if="item.id=='method'"
|
||||
prop="method"
|
||||
:filters="methodFilters"
|
||||
column-key="method"
|
||||
|
@ -98,7 +98,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='nodePath'"
|
||||
v-if="item.id=='nodePath'"
|
||||
prop="nodePath"
|
||||
:label="$t('test_track.case.module')"
|
||||
show-overflow-tooltip
|
||||
|
@ -107,7 +107,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='projectName'"
|
||||
v-if="item.id=='projectName'"
|
||||
prop="projectName"
|
||||
:label="$t('test_track.review.review_project')"
|
||||
show-overflow-tooltip
|
||||
|
@ -115,7 +115,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='reviewerName'"
|
||||
v-if="item.id=='reviewerName'"
|
||||
prop="reviewerName"
|
||||
:label="$t('test_track.review.reviewer')"
|
||||
show-overflow-tooltip
|
||||
|
@ -124,7 +124,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='reviewStatus'"
|
||||
v-if="item.id=='reviewStatus'"
|
||||
:filters="statusFilters"
|
||||
column-key="status"
|
||||
:label="$t('test_track.review_view.execute_result')"
|
||||
|
@ -137,7 +137,7 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.prop=='updateTime'"
|
||||
v-if="item.id=='updateTime'"
|
||||
sortable
|
||||
prop="updateTime"
|
||||
:label="$t('commons.update_time')"
|
||||
|
@ -212,7 +212,7 @@ import {
|
|||
} from "../../../../../../common/js/constants";
|
||||
import TestReviewTestCaseEdit from "./TestReviewTestCaseEdit";
|
||||
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
import {_filter, _sort, getLabel} from "@/common/js/tableUtils";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
import {Test_Case_Review_Case_List, Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||
|
||||
|
@ -309,7 +309,7 @@ export default {
|
|||
this.$refs.headerCustom.open(this.tableLabel)
|
||||
},
|
||||
initTableData() {
|
||||
this.getLabel()
|
||||
getLabel(this, TEST_CASE_REVIEW_CASE_LIST);
|
||||
if (this.reviewId) {
|
||||
this.condition.reviewId = this.reviewId;
|
||||
}
|
||||
|
@ -323,24 +323,6 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
getLabel() {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = TEST_CASE_REVIEW_CASE_LIST
|
||||
this.result = this.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
let arry = eval(response.data.props);
|
||||
let obj = {};
|
||||
for (let key in arry) {
|
||||
obj[key] = arry[key];
|
||||
}
|
||||
let newObj = Object.keys(obj).map(val => ({
|
||||
prop: obj[val]
|
||||
}))
|
||||
this.tableLabel = newObj
|
||||
}
|
||||
})
|
||||
},
|
||||
showDetail(row, event, column) {
|
||||
this.isReadOnly = true;
|
||||
this.$refs.testReviewTestCaseEdit.openTestCaseEdit(row);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {humpToLine} from "@/common/js/utils";
|
||||
import {getCurrentUser, humpToLine} from "@/common/js/utils";
|
||||
import {TEST_CASE_LIST} from "@/common/js/constants";
|
||||
|
||||
export function _handleSelectAll(component, selection, tableData, selectRows) {
|
||||
if (selection.length > 0) {
|
||||
|
@ -106,6 +107,17 @@ export function initCondition(condition) {
|
|||
condition.unSelectIds = [];
|
||||
}
|
||||
|
||||
export function getLabel(vueObj, type) {
|
||||
let param = {}
|
||||
param.userId = getCurrentUser().id;
|
||||
param.type = type;
|
||||
vueObj.result = vueObj.$post('/system/header/info', param, response => {
|
||||
if (response.data != null) {
|
||||
vueObj.tableLabel = eval(response.data.props);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue