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") {