diff --git a/admin/src/views/order/index.vue b/admin/src/views/order/index.vue index 54cea3b4..ecc4c1b4 100644 --- a/admin/src/views/order/index.vue +++ b/admin/src/views/order/index.vue @@ -83,7 +83,7 @@ class="filter-item" type="primary" icon="el-icon-search" - @click="getMode" + @click="getList" > 搜索 @@ -92,7 +92,7 @@ class="filter-item" type="primary" icon="el-icon-search" - @click="getMode(1)" + @click="getList(1)" > 导出 @@ -315,7 +315,7 @@ :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" - @pagination="getList" + @pagination="setMode" /> @@ -638,18 +638,11 @@ export default { this.setQuery("os_status"); this.setQuery("times"); await this.getList(); - this.setOneClickRepair(); + await this.setOneClickRepair(); + await this.getList(); this.getShortcutContent(); this.getAdminList(); }, - watch: { - "listQuery.page": function () { - // console.log(this.isSynchronization); - this.isSynchronization = false; - this.setOneClickRepair(); - }, - deep: true, - }, methods: { setQuery(key) { if (this.$route.query.hasOwnProperty(key)) { @@ -658,18 +651,18 @@ export default { this.listQuery[key] = ""; } }, - setOneClickRepair() { + async setMode() { + await this.getList(); + await this.setOneClickRepair(); + await this.getList(); + }, + async setOneClickRepair() { let arr = this.list.map((res) => { return res.id; }); - this.onOneClickRepair({ id: arr.join() }); - }, - getMode(val) { - this.isSynchronization = false; - this.getList(val); + await this.onOneClickRepair({ id: arr.join() }); }, async getList($is_excel) { - if (this.isSynchronization) return; this.listQuery.excel = null; if ($is_excel == 1) { this.listQuery.excel = 1; @@ -858,7 +851,7 @@ export default { message: "同步完成", type: "success", }); - this.getList(); + // this.getList(); }) .catch((err) => { this.$notify.error({