refactor(测试跟踪): 用例列表页面显示效果优化
This commit is contained in:
parent
c8fa84042e
commit
45dcce3ec9
|
@ -257,7 +257,7 @@ import {
|
||||||
buildBatchParam,
|
buildBatchParam,
|
||||||
deepClone,
|
deepClone,
|
||||||
getCustomFieldBatchEditOption,
|
getCustomFieldBatchEditOption,
|
||||||
getCustomFieldValue,
|
getCustomFieldValue, getCustomTableHeader,
|
||||||
getCustomTableWidth,
|
getCustomTableWidth,
|
||||||
getLastTableSortField,
|
getLastTableSortField,
|
||||||
getPageInfo,
|
getPageInfo,
|
||||||
|
@ -479,7 +479,7 @@ export default {
|
||||||
testCaseTemplate: {},
|
testCaseTemplate: {},
|
||||||
members: [],
|
members: [],
|
||||||
page: getPageInfo(),
|
page: getPageInfo(),
|
||||||
fields: [],
|
fields: getCustomTableHeader('TRACK_TEST_CASE'),
|
||||||
fieldsWidth: getCustomTableWidth('TRACK_TEST_CASE'),
|
fieldsWidth: getCustomTableWidth('TRACK_TEST_CASE'),
|
||||||
memberMap: new Map(),
|
memberMap: new Map(),
|
||||||
rowCase: {},
|
rowCase: {},
|
||||||
|
@ -619,6 +619,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTemplateField() {
|
getTemplateField() {
|
||||||
|
this.page.result.loading = true;
|
||||||
let p1 = getProjectMember((data) => {
|
let p1 = getProjectMember((data) => {
|
||||||
this.members = data;
|
this.members = data;
|
||||||
this.members.forEach(item => {
|
this.members.forEach(item => {
|
||||||
|
@ -626,7 +627,7 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
let p2 = getTestTemplate();
|
let p2 = getTestTemplate();
|
||||||
this.page.result = Promise.all([p1, p2]).then((data) => {
|
Promise.all([p1, p2]).then((data) => {
|
||||||
let template = data[1];
|
let template = data[1];
|
||||||
this.testCaseTemplate = template;
|
this.testCaseTemplate = template;
|
||||||
this.fields = getTableHeaderWithCustomFields('TRACK_TEST_CASE', this.testCaseTemplate.customFields);
|
this.fields = getTableHeaderWithCustomFields('TRACK_TEST_CASE', this.testCaseTemplate.customFields);
|
||||||
|
@ -636,8 +637,9 @@ export default {
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$refs.table) {
|
if (this.$refs.table) {
|
||||||
this.$refs.table.reloadTable();
|
this.$refs.table.resetHeader();
|
||||||
}
|
}
|
||||||
|
this.page.result.loading = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import NodeTree from "../../common/NodeTree";
|
import NodeTree from "../../common/NodeTree";
|
||||||
import TestPlanTestCaseList from "./comonents/functional/FunctionalTestCaseList";
|
|
||||||
import SelectMenu from "../../common/SelectMenu";
|
import SelectMenu from "../../common/SelectMenu";
|
||||||
import MsContainer from "../../../common/components/MsContainer";
|
import MsContainer from "../../../common/components/MsContainer";
|
||||||
import MsAsideContainer from "../../../common/components/MsAsideContainer";
|
import MsAsideContainer from "../../../common/components/MsAsideContainer";
|
||||||
|
@ -64,7 +63,7 @@ export default {
|
||||||
TestPlanFunctional,
|
TestPlanFunctional,
|
||||||
MsTestPlanHeaderBar,
|
MsTestPlanHeaderBar,
|
||||||
MsMainContainer,
|
MsMainContainer,
|
||||||
MsAsideContainer, MsContainer, NodeTree, TestPlanTestCaseList, SelectMenu, TestPlanLoad
|
MsAsideContainer, MsContainer, NodeTree, SelectMenu, TestPlanLoad
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -292,7 +292,7 @@ import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
import {
|
import {
|
||||||
buildBatchParam,
|
buildBatchParam,
|
||||||
getCustomFieldValue, getCustomTableWidth, getLastTableSortField,
|
getCustomFieldValue, getCustomTableHeader, getCustomTableWidth, getLastTableSortField,
|
||||||
getTableHeaderWithCustomFields,
|
getTableHeaderWithCustomFields,
|
||||||
initCondition,
|
initCondition,
|
||||||
} from "@/common/js/tableUtils";
|
} from "@/common/js/tableUtils";
|
||||||
|
@ -323,7 +323,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
// updata: false,
|
// updata: false,
|
||||||
type: TEST_PLAN_FUNCTION_TEST_CASE,
|
type: TEST_PLAN_FUNCTION_TEST_CASE,
|
||||||
fields: [],
|
fields: getCustomTableHeader('TEST_PLAN_FUNCTION_TEST_CASE'),
|
||||||
fieldsWidth: getCustomTableWidth('TEST_PLAN_FUNCTION_TEST_CASE'),
|
fieldsWidth: getCustomTableWidth('TEST_PLAN_FUNCTION_TEST_CASE'),
|
||||||
screenHeight: 'calc(100vh - 275px)',
|
screenHeight: 'calc(100vh - 275px)',
|
||||||
tableLabel: [],
|
tableLabel: [],
|
||||||
|
@ -490,11 +490,12 @@ export default {
|
||||||
let p2 = getTestTemplate();
|
let p2 = getTestTemplate();
|
||||||
Promise.all([p1, p2]).then((data) => {
|
Promise.all([p1, p2]).then((data) => {
|
||||||
let template = data[1];
|
let template = data[1];
|
||||||
this.result.loading = true;
|
|
||||||
this.testCaseTemplate = template;
|
this.testCaseTemplate = template;
|
||||||
this.fields = getTableHeaderWithCustomFields(this.tableHeaderKey, this.testCaseTemplate.customFields);
|
this.fields = getTableHeaderWithCustomFields(this.tableHeaderKey, this.testCaseTemplate.customFields);
|
||||||
|
if (this.$refs.table) {
|
||||||
|
this.$refs.table.resetHeader();
|
||||||
|
}
|
||||||
this.result.loading = false;
|
this.result.loading = false;
|
||||||
if (this.$refs.table) this.$refs.table.reloadTable();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCustomFieldValue(row, field) {
|
getCustomFieldValue(row, field) {
|
||||||
|
|
Loading…
Reference in New Issue