mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
添加设备二维码
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"version": "3.8.0",
|
"version": "3.8.0",
|
||||||
"description": "物美智能-物联网平台",
|
"description": "物美智能-物联网平台",
|
||||||
"author": "kerwincui",
|
"author": "kerwincui",
|
||||||
"license": "MIT",
|
"license": "GPL3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
"build:prod": "vue-cli-service build",
|
"build:prod": "vue-cli-service build",
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
"vue-cropper": "0.5.5",
|
"vue-cropper": "0.5.5",
|
||||||
"vue-json-viewer": "^2.2.21",
|
"vue-json-viewer": "^2.2.21",
|
||||||
"vue-meta": "2.4.0",
|
"vue-meta": "2.4.0",
|
||||||
|
"vue-qr": "^4.0.9",
|
||||||
"vue-router": "3.4.9",
|
"vue-router": "3.4.9",
|
||||||
"vuedraggable": "2.24.3",
|
"vuedraggable": "2.24.3",
|
||||||
"vuex": "3.6.0"
|
"vuex": "3.6.0"
|
||||||
|
|||||||
@@ -139,16 +139,25 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<!-- 设备配置JSON -->
|
<!-- 设备配置JSON -->
|
||||||
<el-dialog title="摘要(设备上传的只读数据)" :visible.sync="openSummary" width="600px" append-to-body>
|
<el-dialog title="摘要(设备上传的只读数据)" :visible.sync="openSummary" width="700px" append-to-body>
|
||||||
<div style="border:1px solid #ccc;margin-top:-15px;height:400px; overflow:scroll;">
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="14">
|
||||||
|
<div style="border:1px solid #ccc;margin-top:-15px;height:350px;width:360px; overflow:scroll;">
|
||||||
<json-viewer :value="summary" :expand-depth=10 copyable>
|
<json-viewer :value="summary" :expand-depth=10 copyable>
|
||||||
<template v-slot:copy>
|
<template v-slot:copy>
|
||||||
复制
|
复制
|
||||||
</template>
|
</template>
|
||||||
</json-viewer>
|
</json-viewer>
|
||||||
</div>
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<div style="border:1px solid #ccc;width:200px;text-align: center;margin-left:20px;margin-top:-10px;">
|
||||||
|
<vue-qr :text="qrText" :size="200" ></vue-qr>
|
||||||
|
<div style="padding-bottom:10px;">设备二维码</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
|
||||||
<el-button type="info" @click="closeSummaryDialog">关 闭</el-button>
|
<el-button type="info" @click="closeSummaryDialog">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -165,6 +174,7 @@ import deviceUser from './device-user';
|
|||||||
import runningStatus from './running-status';
|
import runningStatus from './running-status';
|
||||||
import deviceStatistic from './device-statistic'
|
import deviceStatistic from './device-statistic'
|
||||||
import deviceTimer from './device-timer'
|
import deviceTimer from './device-timer'
|
||||||
|
import vueQr from 'vue-qr'
|
||||||
import {
|
import {
|
||||||
loadBMap
|
loadBMap
|
||||||
} from '@/utils/map.js'
|
} from '@/utils/map.js'
|
||||||
@@ -187,6 +197,7 @@ export default {
|
|||||||
productList,
|
productList,
|
||||||
deviceTimer,
|
deviceTimer,
|
||||||
JsonViewer,
|
JsonViewer,
|
||||||
|
vueQr
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
activeName(val) {
|
activeName(val) {
|
||||||
@@ -220,6 +231,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// 二维码内容
|
||||||
|
qrText:'wumei-smart',
|
||||||
// 打开设备配置对话框
|
// 打开设备配置对话框
|
||||||
openSummary: false,
|
openSummary: false,
|
||||||
// 是否加载完成
|
// 是否加载完成
|
||||||
@@ -365,7 +378,7 @@ export default {
|
|||||||
this.$modal.alertError(response.msg);
|
this.$modal.alertError(response.msg);
|
||||||
} else {
|
} else {
|
||||||
this.$modal.alertSuccess("修改成功");
|
this.$modal.alertSuccess("修改成功");
|
||||||
this.form=JSON.parse(JSON.stringify(this.form));
|
this.form = JSON.parse(JSON.stringify(this.form));
|
||||||
this.loadMap();
|
this.loadMap();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -403,6 +416,13 @@ export default {
|
|||||||
},
|
},
|
||||||
/**关闭物模型 */
|
/**关闭物模型 */
|
||||||
openSummaryDialog() {
|
openSummaryDialog() {
|
||||||
|
let json={
|
||||||
|
type:1,// 1=扫码关联设备
|
||||||
|
deviceNumber:this.form.serialNumber,
|
||||||
|
productId:this.form.productId,
|
||||||
|
productName:this.form.productName,
|
||||||
|
};
|
||||||
|
this.qrText=JSON.stringify(json);
|
||||||
this.openSummary = true;
|
this.openSummary = true;
|
||||||
},
|
},
|
||||||
/**关闭物模型 */
|
/**关闭物模型 */
|
||||||
|
|||||||
Reference in New Issue
Block a user