修改标签相关代码

This commit is contained in:
zhouxain01 2023-12-22 14:05:57 +08:00
parent f7ef5c629e
commit 8aa87bdec8
1 changed files with 20 additions and 9 deletions

View File

@ -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()
}
},