修改标签相关代码
This commit is contained in:
parent
f7ef5c629e
commit
8aa87bdec8
|
|
@ -50,9 +50,9 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定状态" prop="status">
|
||||
<el-form-item label="绑定状态" prop="isBind">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.isBind"
|
||||
placeholder="请选择绑定状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
|
|
@ -213,7 +213,10 @@
|
|||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button> -->
|
||||
<!-- status 未绑定0 已绑定1 已解绑2 -->
|
||||
<!-- isBind 不展示解绑0 展示解绑1 -->
|
||||
<el-button
|
||||
v-if="scope.row.isBind == 1"
|
||||
:disabled="scope.row.status == 0"
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
@ -412,9 +415,9 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
labelType: undefined,
|
||||
labelCode: undefined,
|
||||
status: undefined
|
||||
// labelType: undefined,
|
||||
// labelCode: undefined,
|
||||
// status: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -450,7 +453,8 @@ export default {
|
|||
qrcodeArr: [],
|
||||
codeVal: "",
|
||||
codeId: true,
|
||||
isShowQrCode: -1
|
||||
isShowQrCode: -1,
|
||||
labelmaCode: '',
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -528,6 +532,7 @@ export default {
|
|||
this.form.id = this.ids[0].id;
|
||||
this.form.typeId = this.ids[0].typeId;
|
||||
this.form.maId = this.ids[0].maId;
|
||||
this.form.labelId = this.ids[0].labelId;
|
||||
this.form.labelType = this.ids[0].labelType;
|
||||
this.form.labelCode = this.ids[0].labelCode;
|
||||
},
|
||||
|
|
@ -641,7 +646,7 @@ export default {
|
|||
width: width, // 二维码的宽
|
||||
height: height, // 二维码的高
|
||||
// 二维码扫描出来的数据
|
||||
text: element.labelCode + element.maCode, // 二维码地址
|
||||
text: element.maCode, // 二维码地址
|
||||
// text: element.maCode + "-" + element.addr + "-" + element.room, // 二维码地址
|
||||
colorDark: "#000", // 二维码颜色
|
||||
colorLight: "#fff" // 二维码背景色
|
||||
|
|
@ -717,14 +722,20 @@ export default {
|
|||
},
|
||||
|
||||
labelUploadCode(row) {
|
||||
if (row.maCode == null) {
|
||||
this.$message.error('当前设备没有设备编码');
|
||||
return
|
||||
}
|
||||
this.labelCodeName = ''
|
||||
this.rowObj = row
|
||||
this.uploadOpen = true;
|
||||
this.title = "二维码查看";
|
||||
this.labelmaCode = row.maCode
|
||||
this.$nextTick(() => {
|
||||
// this.selectionList.forEach((item, index) => {
|
||||
this.$refs.codeItem.innerHTML = "";
|
||||
var qrcode = new QRCode(this.$refs.codeItem, {
|
||||
text: row.labelCode + row.maCode, //二维码内容
|
||||
text: row.maCode, //二维码内容
|
||||
width: 256,
|
||||
height: 256,
|
||||
colorDark: '#000000',
|
||||
|
|
@ -741,7 +752,7 @@ export default {
|
|||
imgSrc = this.CanvasToImage(canvas).getAttribute('src')
|
||||
const alink = document.createElement('a')
|
||||
alink.href = imgSrc
|
||||
alink.download = 'qrcode.png'
|
||||
alink.download = this.labelmaCode
|
||||
alink.click()
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue