renkang
2025-01-24 d492850f1cc64ddcfaf43798af9c76c2505414fd
h5/pages/operation/device.vue
@@ -84,7 +84,7 @@
      uploadUrl,
      ywDevicePost,
      ywDeviceCreate,
      getPointRecordByCode
      getFindByCode
   } from '@/api'
   import dayjs from 'dayjs';
   import {
@@ -285,15 +285,14 @@
                        qrbox: 280 //设置二维码扫描框大小
                     },
                     (decodeText, decodeResult) => {
                        if (decodeText) { //这里decodeText就是通过扫描二维码得到的内容
                           this.$set(this.param, 'deviceCode', decodeText)
                        if (decodeText) { //这里decodeText就是通过扫描二维码得到的内容
                           this.stopScan(); //关闭扫码功能
                           getPointRecordByCode({
                              // taskId: this.id,
                              pointCode: decodeText
                           }).then(ress => {
                           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('未匹配到巡检点,请重新扫描')
                              }