add bar code

This commit is contained in:
lq 2024-07-19 16:39:17 +08:00
parent a2b981a72e
commit 3b23ffaf0c

View File

@ -1134,43 +1134,23 @@ export default {
],
onConfirm: payload => {
_this.flag = true
//console.log('eeeee', payload);
const type = payload.find(p => p.name === 'type')?.value
_this.imageType = type
//console.log('type', type)
_this.gageImage()
_this.startTimer()
}
})
},
startTimer() {
this.count = 9
this.timer = setInterval(() => {
// Vuecomputed
this.count--
if(this.count <= 0) {
this.clearTimer()
}
}, 1000);
},
clearTimer() {
clearInterval(this.timer)
this.timer = null
this.count = ''
this.flag = false
},
gageImage() {
const imageFileDom = document.querySelector('#image')
imageFileDom.click(function(event){
event.stopPropagation()
})
imageFileDom.click()
},
getSelectQrCode() {
const imageFileDom = document.querySelector('#qrCode')
imageFileDom.click()
},
selectImage(event) {
event.stopPropagation()
let _this = this
//console.log(event.target.files[0])
const imageFileDom = document.querySelector('#image')
@ -1192,7 +1172,6 @@ export default {
imageFileDom.value = ''
}
}
this.clearTimer()
},
selectQrCode(event) {
let _this = this