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 () {