refactor(测试跟踪): 功能用例导出排版调整

--bug=1016306 --user=陈建星 基础字段展示模板中的系统字段,自定义字段展示模板中的非系统字段 https://www.tapd.cn/55049933/s/1233907
This commit is contained in:
chenjianxing 2022-08-25 16:13:02 +08:00 committed by jianxing
parent 9148652f37
commit be9431a7c4
1 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div v-loading="loading">
<div class="export-title" <div class="export-title"
@click="showSelect = !showSelect"> @click="showSelect = !showSelect">
<span> <span>
@ -62,7 +62,9 @@ export default {
return { return {
selectAll: false, selectAll: false,
showSelect: true, showSelect: true,
baseFields: [ baseFields: [],
loading: false,
originBaseFields: [
{ {
id: 'ID', id: 'ID',
key: 'A', key: 'A',
@ -173,14 +175,22 @@ export default {
}, },
created() { created() {
this.projectId = getCurrentProjectID(); this.projectId = getCurrentProjectID();
this.loading = true;
getTestTemplate() getTestTemplate()
.then((template) => { .then((template) => {
template.customFields.forEach(item => { template.customFields.forEach(item => {
item.enable = true; item.enable = true;
}); });
this.customFields = template.customFields; this.customFields = [];
// this.baseFields = [...this.originBaseFields];
this.customFields.sort((a, b) => a.system && !b.system ? -1 : 1); template.customFields.forEach(item => {
if (item.system) {
this.baseFields.push(item);
} else {
this.customFields.push(item);
}
});
this.loading = false;
}); });
}, },
methods: { methods: {