|
@@ -74,14 +74,24 @@
|
|
|
<el-table-column prop="position3Name" label="三级位置" width="180"></el-table-column>
|
|
|
<el-table-column prop="position4Name" label="四级位置" width="180"></el-table-column>
|
|
|
<el-table-column prop="position5Name" label="五级位置" width="180"></el-table-column>-->
|
|
|
- <el-table-column prop="remark" sort-by="remark_" label="备注"></el-table-column>
|
|
|
- <el-table-column label="操作" width="250" fixed="right">
|
|
|
+ <el-table-column prop="remark" sort-by="remark_" width="350" label="备注"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="290">
|
|
|
<template slot-scope="{row}">
|
|
|
<el-row>
|
|
|
<el-col>
|
|
|
<el-link type="primary" :underline="false" @click="handleEdit(row)">编辑</el-link>-
|
|
|
<el-link type="danger" :underline="false" @click="handleDelete(row)">删除</el-link>-
|
|
|
- <el-link type="primary" :underline="false" @click="bindDevice(row)">绑定设备</el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="bindDevice(row)">绑定设备</el-link>-
|
|
|
+ <el-popover
|
|
|
+ placement="left"
|
|
|
+ width="300"
|
|
|
+ trigger="click"
|
|
|
+ @show="openQRCode(row)"
|
|
|
+ @hide="closeQRCode(row)"
|
|
|
+ >
|
|
|
+ <div :id="row.id" ref="qrCodeDiv"></div>
|
|
|
+ <el-link type="primary" :underline="false" slot="reference">健康公示二维码</el-link>
|
|
|
+ </el-popover>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</template>
|
|
@@ -114,6 +124,7 @@ import companyInfoDetail from "./companyInfo-detail";
|
|
|
import companyDeviceRelationList from "./companyDeviceRelation-list";
|
|
|
import companyInfoApi from "@/api/base/companyInfo";
|
|
|
|
|
|
+import QRCode from "qrcodejs2";
|
|
|
import NProgress from "nprogress"; // progress bar
|
|
|
import "nprogress/nprogress.css"; // progress bar style
|
|
|
|
|
@@ -138,8 +149,9 @@ export default {
|
|
|
modalTitle: "",
|
|
|
businessKey: "",
|
|
|
tableHeight: "",
|
|
|
- showDeviceModal:false,
|
|
|
- companyId:""
|
|
|
+ showDeviceModal: false,
|
|
|
+ companyId: "",
|
|
|
+ qrCode: ""
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -273,6 +285,22 @@ export default {
|
|
|
//绑定设备
|
|
|
this.companyId = record.id;
|
|
|
this.showDeviceModal = true;
|
|
|
+ },
|
|
|
+ openQRCode(record) {
|
|
|
+ document.getElementById(record.id).innerHTML = "";
|
|
|
+ var self = this;
|
|
|
+ var qrtext = process.env.VUE_APP_COMPANY_HEALTH_URL + "?companyId=" + record.id;
|
|
|
+ var qr = new QRCode(record.id, {
|
|
|
+ text: qrtext,
|
|
|
+ width: 300,
|
|
|
+ height: 300,
|
|
|
+ colorDark: "#333333", //二维码颜色
|
|
|
+ colorLight: "#ffffff", //二维码背景色
|
|
|
+ correctLevel: QRCode.CorrectLevel.L //容错率,L/M/H
|
|
|
+ });
|
|
|
+ },
|
|
|
+ closeQRCode(record) {
|
|
|
+ document.getElementById(record.id).innerHTML = "";
|
|
|
}
|
|
|
},
|
|
|
mounted: function() {
|
|
@@ -280,7 +308,7 @@ export default {
|
|
|
},
|
|
|
components: {
|
|
|
"companyInfo-detail": companyInfoDetail,
|
|
|
- "companyDeviceRelation-list":companyDeviceRelationList
|
|
|
+ "companyDeviceRelation-list": companyDeviceRelationList
|
|
|
}
|
|
|
};
|
|
|
</script>
|