Skip to content

Commit

Permalink
refactor: 缺陷列表样式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
AgAngle committed Jul 21, 2021
1 parent 5178c5b commit 2b7109a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export default {
this.tableData.splice(index, 1);
},
refreshTable() {
this.$refs.table.reloadTable();
},
appendData(customFieldIds) {
let condition = {};
Expand All @@ -148,7 +149,4 @@ export default {
</script>

<style scoped>
/*.default-value-item >>> .custom-with {*/
/* width: 207px;*/
/*}*/
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
field-key="CUSTOM_FIELD"
:screen-height="tableHeight"
@handlePageChange="getCustomFields"
@refresh="getCustomFields">
@refresh="getCustomFields"
ref="table">

<div v-for="(item) in fields" :key="item.key">

Expand Down Expand Up @@ -200,6 +201,7 @@ export default {
let data = response.data;
this.total = data.itemCount;
this.tableData = data.listObject;
this.$refs.table.reloadTable();
});
},
handleEdit(data) {
Expand Down Expand Up @@ -232,7 +234,4 @@ export default {
</script>

<style scoped>
/deep/ .el-table__fixed-body-wrapper {
top: 47PX !IMPORTANT;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export default {
let data = response.data;
this.total = data.itemCount;
this.tableData = data.listObject;
this.$refs.table.reloadTable();
});
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export default {
}
this.templateContainIds.add(item.fieldId);
});
this.$refs.customFieldFormList.refreshTable();
});
} else {
this.appendDefaultFiled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
:screen-height="tableHeight"
:enable-selection="false"
@handlePageChange="initTableData"
@refresh="initTableData">
@refresh="initTableData"
ref="table">

<ms-table-column
:label="$t('commons.name')"
Expand Down Expand Up @@ -147,6 +148,7 @@ export default {
let data = response.data;
this.total = data.itemCount;
this.tableData = data.listObject;
this.$refs.table.reloadTable();
});
},
handleEdit(data) {
Expand Down Expand Up @@ -178,7 +180,4 @@ export default {
</script>

<style scoped>
/deep/ .el-table__fixed-body-wrapper {
top: 47PX !IMPORTANT;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
:screen-height="tableHeight"
:enable-selection="false"
@handlePageChange="initTableData"
@refresh="initTableData">
@refresh="initTableData"
ref="table">

<ms-table-column
:label="$t('commons.name')"
Expand Down Expand Up @@ -155,6 +156,7 @@ export default {
let data = response.data;
this.total = data.itemCount;
this.tableData = data.listObject;
this.$refs.table.reloadTable();
});
},
handleEdit(data) {
Expand Down Expand Up @@ -186,7 +188,4 @@ export default {
</script>

<style scoped>
/deep/ .el-table__fixed-body-wrapper {
top: 47PX !IMPORTANT;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<el-row class="custom-field-row">
<el-col :span="8" v-if="hasTapdId">
<el-form-item :label="$t('test_track.issue.tapd_current_owner')" prop="tapdUsers">
<el-form-item :label-width="formLabelWidth" :label="$t('test_track.issue.tapd_current_owner')" prop="tapdUsers">
<el-select v-model="form.tapdUsers" multiple filterable
:placeholder="$t('test_track.issue.please_choose_current_owner')">
<el-option v-for="(userInfo, index) in tapdUsers" :key="index" :label="userInfo.user"
Expand All @@ -33,7 +33,7 @@
</el-form-item>
</el-col>
<el-col :span="8" v-if="hasZentaoId">
<el-form-item :label="$t('test_track.issue.zentao_bug_build')" prop="zentaoBuilds">
<el-form-item :label-width="formLabelWidth" :label="$t('test_track.issue.zentao_bug_build')" prop="zentaoBuilds">
<el-select v-model="form.zentaoBuilds" multiple filterable
:placeholder="$t('test_track.issue.zentao_bug_build')">
<el-option v-for="(build, index) in Builds" :key="index" :label="build.name"
Expand All @@ -42,7 +42,7 @@
</el-form-item>
</el-col>
<el-col :span="8" v-if="hasZentaoId">
<el-form-item :label="$t('test_track.issue.zentao_bug_assigned')" prop="zentaoAssigned">
<el-form-item :label-width="formLabelWidth" :label="$t('test_track.issue.zentao_bug_assigned')" prop="zentaoAssigned">
<el-select v-model="form.zentaoAssigned" filterable
:placeholder="$t('test_track.issue.please_choose_current_owner')">
<el-option v-for="(userInfo, index) in zentaoUsers" :key="index" :label="userInfo.name"
Expand Down Expand Up @@ -96,7 +96,7 @@ export default {
result: {},
relateFields: [],
isFormAlive: true,
formLabelWidth: "100px",
formLabelWidth: "150px",
issueTemplate: {},
customFieldForm: {},
customFieldRules: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default {
this.tableData.forEach(item => {
this.testCaseContainIds.add(item.id);
});
this.$refs.table.reloadTable();
});
}
},
Expand Down

0 comments on commit 2b7109a

Please sign in to comment.