翻页处理

This commit is contained in:
faiz 2024-07-29 15:09:21 +08:00
parent a1c3902eb0
commit 2b05ec6853
1 changed files with 17 additions and 6 deletions

View File

@ -611,6 +611,7 @@ export default {
dialog2Visible: false, dialog2Visible: false,
applyVisible: false, applyVisible: false,
oss: [], oss: [],
isSynchronization: false,
item3: { item3: {
sn: null, sn: null,
backs: null, backs: null,
@ -637,15 +638,17 @@ export default {
this.setQuery("os_status"); this.setQuery("os_status");
this.setQuery("times"); this.setQuery("times");
await this.getList(); await this.getList();
this.$nextTick(() => { this.setOneClickRepair();
let arr = this.list.map((res) => {
return res.id;
});
this.onOneClickRepair({ id: arr.join() });
});
this.getShortcutContent(); this.getShortcutContent();
this.getAdminList(); this.getAdminList();
}, },
watch: {
"listQuery.page": function (res) {
console.log(this.isSynchronization);
this.isSynchronization = false;
this.setOneClickRepair();
},
},
methods: { methods: {
setQuery(key) { setQuery(key) {
if (this.$route.query.hasOwnProperty(key)) { if (this.$route.query.hasOwnProperty(key)) {
@ -654,7 +657,14 @@ export default {
this.listQuery[key] = ""; this.listQuery[key] = "";
} }
}, },
setOneClickRepair() {
let arr = this.list.map((res) => {
return res.id;
});
this.onOneClickRepair({ id: arr.join() });
},
async getList($is_excel) { async getList($is_excel) {
if (this.isSynchronization) return;
this.listQuery.excel = null; this.listQuery.excel = null;
if ($is_excel == 1) { if ($is_excel == 1) {
this.listQuery.excel = 1; this.listQuery.excel = 1;
@ -678,6 +688,7 @@ export default {
(this.timetype_arr = response.ext.timetype), (this.timetype_arr = response.ext.timetype),
(this.oss = response.ext.oss); (this.oss = response.ext.oss);
this.listLoading = false; this.listLoading = false;
this.isSynchronization = true;
}); });
}, },
objectToQuery(obj) { objectToQuery(obj) {