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