当前设备
@@ -110,12 +110,14 @@ export default {
obj: {},
batch: '',
disabled1: false,
- disabled2: false
+ disabled2: false,
+ disabled: false
}
},
mounted () {
document.body.removeAttribute('class', 'login-bg')
this.initArea()
+ this.initHandMatrial()
},
beforeDestroy () {
clearInterval(this.timer)
@@ -226,47 +228,43 @@ export default {
if (res.code === '1') {
this.toast(res.desc)
clearInterval(this.timer)
- var that = this
setTimeout(() => {
- that.initPonit(this.regobj)
+ this.initPonit(this.regobj)
this.refresh(this.regobj)
- this.value = ''
- this.batch = ''
- this.disabled1 = false
- this.disabled2 = false
- }, 2000)
+ }, 200)
} else {
this.Dialog(res.desc)
- this.value = ''
- this.batch = ''
- this.disabled1 = false
- this.disabled2 = false
}
+ this.msgCancle()
+ this.disabled1 = false
+ this.disabled2 = false
} catch (err) {
- console.log(err)
- this.value = ''
- this.batch = ''
+ this.msgCancle()
this.disabled1 = false
this.disabled2 = false
}
},
cancle () {
this.active = false
+ this.obj = {}
+ this.value = ''
+ this.batch = ''
},
async toSure () {
this.disabled = true
try {
- let res = await handpointPut(this.obj.device_code, '1')
+ let res = await handpointPut(this.obj.device_code, '2')
if (res.code === '1') {
- clearInterval(this.timer)
this.toast(res.desc)
- this.initPonit(this.reg)
- this.refresh(this.reg)
- this.obj = {}
+ clearInterval(this.timer)
+ setTimeout(() => {
+ this.initPonit(this.regobj)
+ this.refresh(this.regobj)
+ }, 200)
} else {
this.Dialog(res.desc)
}
- this.active = false
+ this.cancle()
this.disabled = false
} catch (e) {
this.active = false
@@ -280,17 +278,17 @@ export default {