forked from github/dataease
fix: 插件国际化 表格记忆select
This commit is contained in:
parent
d97a127f05
commit
d90a49716c
@ -25,7 +25,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { log } from '@antv/g2plot/lib/utils';
|
||||
import tableBody from "./tableBody";
|
||||
export default {
|
||||
components: { tableBody },
|
||||
@ -112,6 +111,9 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toggleRowSelection(row) {
|
||||
this.$refs.table.toggleRowSelection(row, true);
|
||||
},
|
||||
handlerSelected(multipleSelection) {
|
||||
this.multipleSelectionCach = [
|
||||
...this.multipleSelectionCach,
|
||||
|
@ -445,7 +445,7 @@ export default {
|
||||
cost: 'cost',
|
||||
developer: 'developer',
|
||||
edition: 'edition',
|
||||
installation_time: 'Installation time:'
|
||||
installation_time: 'Install time'
|
||||
},
|
||||
table: {
|
||||
dynamicTips1: 'Fixed header, sorted by header order',
|
||||
|
@ -1389,6 +1389,14 @@ div:focus {
|
||||
width: 2px;
|
||||
background: #3370ff;
|
||||
}
|
||||
|
||||
.explain {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
margin-left: 8px;
|
||||
color: var(--deTextSecondary, #646a73);
|
||||
}
|
||||
}
|
||||
|
||||
.de-foot {
|
||||
|
@ -104,6 +104,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
ref="multipleTable"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column
|
||||
@ -507,11 +508,18 @@ export default {
|
||||
const { currentPage, pageSize } = this.paginationConfig;
|
||||
datasetTaskList(currentPage, pageSize, param, showLoading).then(
|
||||
(response) => {
|
||||
const multipleSelection = this.multipleSelection.map(ele => ele.id)
|
||||
this.data = response.data.listObject;
|
||||
// this.data.forEach((item) => {
|
||||
// this.taskStatus(item);
|
||||
// });
|
||||
this.paginationConfig.total = response.data.itemCount;
|
||||
if (multipleSelection.length) {
|
||||
this.$nextTick(() => {
|
||||
this.data.forEach(row => {
|
||||
if (multipleSelection.includes(row.id)) {
|
||||
this.$refs.multipleTable.toggleRowSelection(row);
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user