refactor(测试跟踪): 功能用例导出排版调整
--bug=1016306 --user=陈建星 基础字段展示模板中的系统字段,自定义字段展示模板中的非系统字段 https://www.tapd.cn/55049933/s/1233907
This commit is contained in:
parent
9148652f37
commit
be9431a7c4
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-loading="loading">
|
||||
<div class="export-title"
|
||||
@click="showSelect = !showSelect">
|
||||
<span>
|
||||
|
@ -62,7 +62,9 @@ export default {
|
|||
return {
|
||||
selectAll: false,
|
||||
showSelect: true,
|
||||
baseFields: [
|
||||
baseFields: [],
|
||||
loading: false,
|
||||
originBaseFields: [
|
||||
{
|
||||
id: 'ID',
|
||||
key: 'A',
|
||||
|
@ -173,14 +175,22 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.projectId = getCurrentProjectID();
|
||||
this.loading = true;
|
||||
getTestTemplate()
|
||||
.then((template) => {
|
||||
template.customFields.forEach(item => {
|
||||
item.enable = true;
|
||||
});
|
||||
this.customFields = template.customFields;
|
||||
// 系统字段排前面
|
||||
this.customFields.sort((a, b) => a.system && !b.system ? -1 : 1);
|
||||
this.customFields = [];
|
||||
this.baseFields = [...this.originBaseFields];
|
||||
template.customFields.forEach(item => {
|
||||
if (item.system) {
|
||||
this.baseFields.push(item);
|
||||
} else {
|
||||
this.customFields.push(item);
|
||||
}
|
||||
});
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in New Issue