fix(项目设置): 修复环境变量导出问题

--bug=1026542 --user=王孝刚
【项目设置】github#24607,环境配置中的通用配置无法全部导出,且选择每页展示数据为50后,再选择复选框,分页又展示为10条了
https://www.tapd.cn/55049933/s/1376246
This commit is contained in:
wxg0103 2023-05-26 15:10:42 +08:00 committed by fit2-zhao
parent fff9d25527
commit 43bebb1c73
1 changed files with 12 additions and 10 deletions

View File

@ -51,6 +51,8 @@
:highlightCurrentRow="true"
:page-size="pageSize"
:total="total"
enableSelection
:condition="condition"
@refresh="onChange"
ref="variableTable">
<ms-table-column prop="num" sortable label="ID" min-width="60" />
@ -234,6 +236,10 @@ export default {
{ text: this.$t('commons.api'), value: 'api' },
{ text: this.$t('commons.ui_test'), value: 'ui' },
],
condition: {
selectAll : false,
unSelectIds: [],
}
};
},
watch: {
@ -259,16 +265,12 @@ export default {
this.nextPage();
},
nextPage() {
if (
this.$refs.variableTable &&
this.$refs.variableTable.selectRows &&
this.$refs.variableTable.selectRows.size > 0
) {
return;
}
// 0pageSize
if (this.currentPage == 1) {
this.variables = this.allData.slice(0, this.pageSize);
this.variables.forEach((item) => {
item.showMore = false;
});
return;
}
let start = (this.currentPage - 1) * this.pageSize;
@ -499,6 +501,9 @@ export default {
let variablesJson = [];
let messages = '';
let rows = this.$refs.variableTable.selectRows;
if (this.condition.selectAll) {
rows = this.allData;
}
rows.forEach((row) => {
if (row.type === 'CSV') {
messages = this.$t('variables.csv_download');
@ -573,7 +578,4 @@ export default {
width: 60px;
}
:deep(.table-select-icon) {
display: none !important;
}
</style>