refactor(测试跟踪): 用例列表页面显示效果优化

This commit is contained in:
CaptainB 2022-04-12 14:18:11 +08:00 committed by 刘瑞斌
parent c8fa84042e
commit 45dcce3ec9
3 changed files with 12 additions and 10 deletions

View File

@ -257,7 +257,7 @@ import {
buildBatchParam,
deepClone,
getCustomFieldBatchEditOption,
getCustomFieldValue,
getCustomFieldValue, getCustomTableHeader,
getCustomTableWidth,
getLastTableSortField,
getPageInfo,
@ -479,7 +479,7 @@ export default {
testCaseTemplate: {},
members: [],
page: getPageInfo(),
fields: [],
fields: getCustomTableHeader('TRACK_TEST_CASE'),
fieldsWidth: getCustomTableWidth('TRACK_TEST_CASE'),
memberMap: new Map(),
rowCase: {},
@ -619,6 +619,7 @@ export default {
},
methods: {
getTemplateField() {
this.page.result.loading = true;
let p1 = getProjectMember((data) => {
this.members = data;
this.members.forEach(item => {
@ -626,7 +627,7 @@ export default {
});
});
let p2 = getTestTemplate();
this.page.result = Promise.all([p1, p2]).then((data) => {
Promise.all([p1, p2]).then((data) => {
let template = data[1];
this.testCaseTemplate = template;
this.fields = getTableHeaderWithCustomFields('TRACK_TEST_CASE', this.testCaseTemplate.customFields);
@ -636,8 +637,9 @@ export default {
this.$nextTick(() => {
if (this.$refs.table) {
this.$refs.table.reloadTable();
this.$refs.table.resetHeader();
}
this.page.result.loading = false;
});
});
},

View File

@ -42,7 +42,6 @@
<script>
import NodeTree from "../../common/NodeTree";
import TestPlanTestCaseList from "./comonents/functional/FunctionalTestCaseList";
import SelectMenu from "../../common/SelectMenu";
import MsContainer from "../../../common/components/MsContainer";
import MsAsideContainer from "../../../common/components/MsAsideContainer";
@ -64,7 +63,7 @@ export default {
TestPlanFunctional,
MsTestPlanHeaderBar,
MsMainContainer,
MsAsideContainer, MsContainer, NodeTree, TestPlanTestCaseList, SelectMenu, TestPlanLoad
MsAsideContainer, MsContainer, NodeTree, SelectMenu, TestPlanLoad
},
data() {
return {

View File

@ -292,7 +292,7 @@ import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import MsTag from "@/business/components/common/components/MsTag";
import {
buildBatchParam,
getCustomFieldValue, getCustomTableWidth, getLastTableSortField,
getCustomFieldValue, getCustomTableHeader, getCustomTableWidth, getLastTableSortField,
getTableHeaderWithCustomFields,
initCondition,
} from "@/common/js/tableUtils";
@ -323,7 +323,7 @@ export default {
return {
// updata: false,
type: TEST_PLAN_FUNCTION_TEST_CASE,
fields: [],
fields: getCustomTableHeader('TEST_PLAN_FUNCTION_TEST_CASE'),
fieldsWidth: getCustomTableWidth('TEST_PLAN_FUNCTION_TEST_CASE'),
screenHeight: 'calc(100vh - 275px)',
tableLabel: [],
@ -490,11 +490,12 @@ export default {
let p2 = getTestTemplate();
Promise.all([p1, p2]).then((data) => {
let template = data[1];
this.result.loading = true;
this.testCaseTemplate = template;
this.fields = getTableHeaderWithCustomFields(this.tableHeaderKey, this.testCaseTemplate.customFields);
if (this.$refs.table) {
this.$refs.table.resetHeader();
}
this.result.loading = false;
if (this.$refs.table) this.$refs.table.reloadTable();
});
},
getCustomFieldValue(row, field) {