liukangdong
2025-02-07 17d7043f10d55429db919238fe639bff1b51ec0e
h5/pages/operation/device.vue
@@ -83,7 +83,8 @@
   import {
      uploadUrl,
      ywDevicePost,
      ywDeviceCreate
      ywDeviceCreate,
      getFindByCode
   } from '@/api'
   import dayjs from 'dayjs';
   import {
@@ -122,7 +123,7 @@
         },
         handleP() {
            const {
               param,
               param,
               fileList
            } = this
            ywDeviceCreate({
@@ -284,9 +285,19 @@
                        qrbox: 280 //设置二维码扫描框大小
                     },
                     (decodeText, decodeResult) => {
                        if (decodeText) { //这里decodeText就是通过扫描二维码得到的内容
                           this.$set(this.param, 'deviceCode', decodeText)
                           this.stopScan(); //关闭扫码功能
                        if (decodeText) { //这里decodeText就是通过扫描二维码得到的内容
                           this.stopScan(); //关闭扫码功能
                           getFindByCode(decodeText).then(ress => {
                              if (ress.data) {
                                 console.log('ress', ress.data);
                                 this.$set(this.param, 'deviceCode', ress.data.code)
                                 this.$set(this.param, 'deviceId', ress.data.id)
                                 this.$set(this.param, 'deviceName', ress.data.name)
                              } else {
                                 this.showToast('未匹配到巡检点,请重新扫描')
                              }
                           })
                        }
                     },
                     (err) => {