From fc772ac629241b55a377ef8eb2c1e94b69bb3e53 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期一, 15 七月 2024 12:09:51 +0800 Subject: [PATCH] 提交 --- admin/src/views/timer/timer.vue | 102 +++++++++++++++++++++++++------------------------- 1 files changed, 51 insertions(+), 51 deletions(-) diff --git a/admin/src/views/timer/timer.vue b/admin/src/views/timer/timer.vue index 912f85c..91e4b1e 100644 --- a/admin/src/views/timer/timer.vue +++ b/admin/src/views/timer/timer.vue @@ -70,7 +70,7 @@ import TableLayout from '@/layouts/TableLayout' import Pagination from '@/components/common/Pagination' import OperaTimerWindow from '@/views/timer/components/OperaTimerWindow' -import {runOnceById} from "@/api/timer/timer"; +import {pauseById, resumeById, runOnceById} from '@/api/timer/timer' export default { name: 'Devices', extends: BaseTable, @@ -83,13 +83,13 @@ beanName: '', module: '' }, - pausing:false, - running:false, - resuming:false, + pausing: false, + running: false, + resuming: false, room: [] } }, - provide() { + provide () { return { room: () => this.room } @@ -107,61 +107,61 @@ pauseById (row) { this.__checkApi() this.$dialog.actionConfirm('纭鏆傚仠璇ヤ换鍔″悧?') - .then(() => { - this.pausing = true - this.api.paustById(row.id) - .then(() => { - this.$message.info('鏆傚仠鎴愬姛') - this.search() - }) - .catch(e => { - // this.$tip.apiFailed(e) - }) - .finally(() => { - this.pausing = false - }) - }) - .catch(() => {}) + .then(() => { + this.pausing = true + this.api.pauseById(row.id) + .then(() => { + this.$message.info('鏆傚仠鎴愬姛') + this.search() + }) + .catch(e => { + // this.$tip.apiFailed(e) + }) + .finally(() => { + this.pausing = false + }) + }) + .catch(() => {}) }, resumeById (row) { this.__checkApi() this.$dialog.actionConfirm('纭鎭㈠璇ヤ换鍔″悧?') - .then(() => { - this.resuming = true - this.api.resumeById(row.id) - .then(() => { - this.$message.info('鎭㈠鎴愬姛') - this.search() - }) - .catch(e => { - // this.$tip.apiFailed(e) - }) - .finally(() => { - this.resuming = false - }) - }) - .catch(() => {}) + .then(() => { + this.resuming = true + this.api.resumeById(row.id) + .then(() => { + this.$message.info('鎭㈠鎴愬姛') + this.search() + }) + .catch(e => { + // this.$tip.apiFailed(e) + }) + .finally(() => { + this.resuming = false + }) + }) + .catch(() => {}) }, runById (row) { this.__checkApi() this.$dialog.actionConfirm('纭鎵ц涓�娆¤浠诲姟鍚�?') - .then(() => { - this.running = true - this.api.runOnceById(row.id) - .then(() => { - this.$message.info('鎵ц鎴愬姛') - this.search() - }) - .catch(e => { - // this.$tip.apiFailed(e) - }) - .finally(() => { - this.running = false - }) - }) - .catch(() => {}) + .then(() => { + this.running = true + this.api.runOnceById(row.id) + .then(() => { + this.$message.info('鎵ц鎴愬姛') + this.search() + }) + .catch(e => { + // this.$tip.apiFailed(e) + }) + .finally(() => { + this.running = false + }) + }) + .catch(() => {}) } - }, + } } </script> -- Gitblit v1.9.3