取放桶盖

This commit is contained in:
2023-06-26 10:29:58 +08:00
parent 2cf028927b
commit 61d3d8b06d

View File

@@ -57,8 +57,6 @@ export default {
}, },
data () { data () {
return { return {
interTime: this.$store.getters.setTime,
timer: null,
areaArr: [], areaArr: [],
pointArr: [], pointArr: [],
regobj: {}, regobj: {},
@@ -72,15 +70,7 @@ export default {
document.body.removeAttribute('class', 'login-bg') document.body.removeAttribute('class', 'login-bg')
this.initArea() this.initArea()
}, },
beforeDestroy () {
clearInterval(this.timer)
},
methods: { methods: {
refresh (e) {
this.timer = setInterval(() => {
this.initPonit(e)
}, this.interTime)
},
async initArea () { async initArea () {
let res = await handArea() let res = await handArea()
if (res.code === '1') { if (res.code === '1') {
@@ -110,7 +100,6 @@ export default {
} }
}, },
getPonit (e) { getPonit (e) {
clearInterval(this.timer)
this.areaArr.map(el => { this.areaArr.map(el => {
if (el.region_id !== e.region_id) { if (el.region_id !== e.region_id) {
el.checked = false el.checked = false
@@ -121,7 +110,6 @@ export default {
}) })
if (e.checked) { if (e.checked) {
this.initPonit(e) this.initPonit(e)
// this.refresh(e)
} }
}, },
setInfo (e) { setInfo (e) {
@@ -147,10 +135,8 @@ export default {
let res = await handTake(code, type) let res = await handTake(code, type)
if (res.code === '1') { if (res.code === '1') {
this.toast(res.desc) this.toast(res.desc)
clearInterval(this.timer)
setTimeout(() => { setTimeout(() => {
this.initPonit(this.regobj) this.initPonit(this.regobj)
this.refresh(this.regobj)
this.obj = {} this.obj = {}
this.active = false this.active = false
this.disabled1 = false this.disabled1 = false