소스 검색

修改查看二维码

zhangyu 5 년 전
부모
커밋
5ea47c1faf
3개의 변경된 파일16개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 1
      src/components/ledger/lib/qrcode.vue
  2. 6 2
      src/views/ledger/facility/parts/index.vue
  3. 6 2
      src/views/ledger/facility/partsmanage/index.vue

+ 4 - 1
src/components/ledger/lib/qrcode.vue

@@ -36,7 +36,10 @@ export default {
   data() {
     return {};
   },
-  created() { },
+  created() {
+    console.log(this.qrcodeUrl)
+    debugger
+   },
   mounted() {
   },
   methods: {

+ 6 - 2
src/views/ledger/facility/parts/index.vue

@@ -304,8 +304,12 @@ export default {
       let val = this.tableExample.colToProp(row.col);
       //设备二维码图片
       if (val == "EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
+        this.qrcodeUrl = this.tableData[row.row].EquipQRCode
+        if (!!this.qrcodeUrl) {
+          this.myDialog.qrcode = true;
+        } else {
+          this.$message("此设备没有设备二维码")
+        }
       }
       //关联系统
       if (val == "linkSystem") {

+ 6 - 2
src/views/ledger/facility/partsmanage/index.vue

@@ -588,8 +588,12 @@ export default {
       let val = this.tableExample.colToProp(row.col);
       //设备二维码图片
       if (val == "EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
+        this.qrcodeUrl = this.tableData[row.row].EquipQRCode
+        if (!!this.qrcodeUrl) {
+          this.myDialog.qrcode = true;
+        } else {
+          this.$message("此设备没有设备二维码")
+        }
       }
       //关联系统
       if (val == "linkSystem") {