|
@@ -2375,11 +2375,16 @@
|
|
|
justify-content: flex-end;
|
|
|
"
|
|
|
>
|
|
|
- <canvas
|
|
|
+ <!-- <canvas
|
|
|
:id="'qrCodeUrl' + index"
|
|
|
ref="qrCodeUrl"
|
|
|
style="width: 100px; height: 100px"
|
|
|
- ></canvas>
|
|
|
+ ></canvas> -->
|
|
|
+ <img
|
|
|
+ :id="'ewm' + index"
|
|
|
+ src="null"
|
|
|
+ style="width: 148px; height: 148px"
|
|
|
+ />
|
|
|
</div>
|
|
|
</Row>
|
|
|
</div>
|
|
@@ -2455,7 +2460,12 @@
|
|
|
}}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <canvas :id="'qrCodeUrl' + index" class="ewmBox"></canvas>
|
|
|
+ <!-- <canvas :id="'qrCodeUrl' + index" class="ewmBox"></canvas> -->
|
|
|
+ <img
|
|
|
+ :id="'ewm' + index"
|
|
|
+ src="null"
|
|
|
+ style="width: 148px; height: 148px"
|
|
|
+ />
|
|
|
</div>
|
|
|
</Col>
|
|
|
<Col
|
|
@@ -2665,7 +2675,12 @@
|
|
|
</Row>
|
|
|
<Row type="flex" justify="end" align="middle">
|
|
|
<Col>
|
|
|
- <canvas :id="'qrCodeUrl' + index" class="ewmBox"></canvas>
|
|
|
+ <!-- <canvas :id="'qrCodeUrl' + index" class="ewmBox"></canvas> -->
|
|
|
+ <img
|
|
|
+ :id="'ewm' + index"
|
|
|
+ src="null"
|
|
|
+ style="width: 148px; height: 148px"
|
|
|
+ />
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</div>
|
|
@@ -2753,7 +2768,12 @@
|
|
|
</Col>
|
|
|
<Col span="24" style="padding: 10px; position: relative">
|
|
|
<div style="position: absolute; top: 95px; right: 50px">
|
|
|
- <canvas :id="'qrCodeUrl' + index" class="ewmBox"></canvas>
|
|
|
+ <!-- <canvas :id="'qrCodeUrl' + index" class="ewmBox"></canvas> -->
|
|
|
+ <img
|
|
|
+ :id="'ewm' + index"
|
|
|
+ src="null"
|
|
|
+ style="width: 148px; height: 148px"
|
|
|
+ />
|
|
|
</div>
|
|
|
<p style="font-size: 18px; font-weight: 600">温馨提示:</p>
|
|
|
<p style="font-size: 18px; font-weight: 600">
|
|
@@ -5287,20 +5307,36 @@ export default {
|
|
|
}
|
|
|
this.xkzModal = true;
|
|
|
setTimeout(() => {
|
|
|
+ // res.data.forEach((site, index) => {
|
|
|
+ // QRCode.width = 100;
|
|
|
+ // QRCode.height = 100;
|
|
|
+ // QRCode.toCanvas(
|
|
|
+ // document.getElementById("qrCodeUrl" + index),
|
|
|
+ // site.deviceNumber,
|
|
|
+ // {
|
|
|
+ // width: 100,
|
|
|
+ // height: 100,
|
|
|
+ // },
|
|
|
+ // function (error) {
|
|
|
+ // console.log(error);
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ // });
|
|
|
res.data.forEach((site, index) => {
|
|
|
- QRCode.width = 100;
|
|
|
- QRCode.height = 100;
|
|
|
- QRCode.toCanvas(
|
|
|
- document.getElementById("qrCodeUrl" + index),
|
|
|
- site.deviceNumber,
|
|
|
- {
|
|
|
- width: 100,
|
|
|
- height: 100,
|
|
|
- },
|
|
|
- function (error) {
|
|
|
- console.log(error);
|
|
|
- }
|
|
|
- );
|
|
|
+ QRCode.width = 148;
|
|
|
+ QRCode.height = 148;
|
|
|
+ // QRCode.toCanvas(document.getElementById('ewm'+index), site.deviceNumber, function (error) {
|
|
|
+ // console.log(error)
|
|
|
+ // })
|
|
|
+ QRCode.toDataURL(site.deviceNumber)
|
|
|
+ .then((url) => {
|
|
|
+ document
|
|
|
+ .getElementById("ewm" + index)
|
|
|
+ .setAttribute("src", url);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
});
|
|
|
}, 150);
|
|
|
} else {
|
|
@@ -5523,14 +5559,30 @@ export default {
|
|
|
};
|
|
|
this.xkzModal = true;
|
|
|
setTimeout(() => {
|
|
|
+ // res.data.forEach((site, index) => {
|
|
|
+ // QRCode.toCanvas(
|
|
|
+ // document.getElementById("ewm" + index),
|
|
|
+ // site.deviceNumber,
|
|
|
+ // function (error) {
|
|
|
+ // console.log(error);
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ // });
|
|
|
res.data.forEach((site, index) => {
|
|
|
- QRCode.toCanvas(
|
|
|
- document.getElementById("ewm" + index),
|
|
|
- site.deviceNumber,
|
|
|
- function (error) {
|
|
|
- console.log(error);
|
|
|
- }
|
|
|
- );
|
|
|
+ QRCode.width = 148;
|
|
|
+ QRCode.height = 148;
|
|
|
+ // QRCode.toCanvas(document.getElementById('ewm'+index), site.deviceNumber, function (error) {
|
|
|
+ // console.log(error)
|
|
|
+ // })
|
|
|
+ QRCode.toDataURL(site.deviceNumber)
|
|
|
+ .then((url) => {
|
|
|
+ document
|
|
|
+ .getElementById("ewm" + index)
|
|
|
+ .setAttribute("src", url);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
});
|
|
|
}, 100);
|
|
|
} else {
|