From 8f2ec3cc58fb6035c457e005d5827c9c23c6cb33 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Wed, 24 Jul 2024 17:54:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=88=87=E6=9A=82=E5=AD=98=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/SecondPhase/slitting/CacheClean.vue | 59 +++++++++++++++-------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/pages/SecondPhase/slitting/CacheClean.vue b/pages/SecondPhase/slitting/CacheClean.vue index def90ef..a1f734d 100644 --- a/pages/SecondPhase/slitting/CacheClean.vue +++ b/pages/SecondPhase/slitting/CacheClean.vue @@ -24,10 +24,13 @@ - - - + + + + + + @@ -45,64 +48,78 @@ title: '', val1: '', val2: '', - disabled: false, - disabled1: false, - disabled2: false + content: '', + type: '' }; }, onLoad (options) { this.title = options.title }, methods: { - async _toCleanCutCacheInventory () { - this.disabled = true + dialogConfirm () { + if (this.type === 1) { + this._toCleanCutCacheInventory() + } else if (this.type === 2) { + this._toSubvolumeBinding() + } else if (this.type === 3) { + this._toShaftBinding() + } + }, + toSure1 () { if (!this.val1) { - this.disabled = false return } + this.content = '确认是否清除点位数据?' + this.type = 1 + this.$refs.alertDialog.open() + }, + async _toCleanCutCacheInventory () { try { let res = await toCleanCutCacheInventory(this.val1) uni.showToast({ title: res.message, icon: 'none' }) - this.disabled = false } catch (e) { - this.disabled = false + console.log(e) } }, - async _toSubvolumeBinding () { - this.disabled1 = true + toSure2 () { if (!this.val1 || !this.val2) { - this.disabled1 = false return } + this.content = '确认是否绑定子卷?' + this.type = 2 + this.$refs.alertDialog.open() + }, + async _toSubvolumeBinding () { try { let res = await toSubvolumeBinding(this.val1, this.val2) uni.showToast({ title: res.message, icon: 'none' }) - this.disabled1= false } catch (e) { - this.disabled1 = false + console.log(e) } }, - async _toShaftBinding () { - this.disabled2 = true + toSure3 () { if (!this.val1 || !this.val2) { - this.disabled2 = false return } + this.content = '确认是否绑定气胀轴?' + this.type = 3 + this.$refs.alertDialog.open() + }, + async _toShaftBinding () { try { let res = await toShaftBinding(this.val1, this.val2) uni.showToast({ title: res.message, icon: 'none' }) - this.disabled2= false } catch (e) { - this.disabled2 = false + console.log(e) } }, clearUp () {