|
@@ -64,12 +64,12 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
- macAddress: ''
|
|
|
+ macAddress: '' // 设备MAC地址
|
|
|
},
|
|
|
isOpenModal: false, // 默认弹窗关闭
|
|
|
itemDeviceCode: '', // 编辑行设备编号
|
|
|
- itemId: '',
|
|
|
- totalNum: '',
|
|
|
+ itemId: '', // 编辑行id
|
|
|
+ totalNum: '', // 总计条数
|
|
|
isQrCodeModal: false,
|
|
|
shName: '',
|
|
|
qrCode: '',
|
|
@@ -78,42 +78,10 @@ export default {
|
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 100, align: 'center' },
|
|
|
{ title: '设备MAC地址', dataIndex: 'macAddress', width: 100, align: 'center' },
|
|
|
- {
|
|
|
- title: '设备名称',
|
|
|
- dataIndex: 'deviceName',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: text => {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '设备编号',
|
|
|
- dataIndex: 'deviceCode',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: text => {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '设备型号',
|
|
|
- dataIndex: 'deviceModel',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: text => {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '生产厂家',
|
|
|
- dataIndex: 'manufacturer',
|
|
|
- width: 100,
|
|
|
- align: 'center',
|
|
|
- customRender: text => {
|
|
|
- return text || '--'
|
|
|
- }
|
|
|
- },
|
|
|
+ { title: '设备名称', dataIndex: 'deviceName', width: 100, align: 'center', ellipsis: true, customRender: text => { return text || '--' } },
|
|
|
+ { title: '设备编号', dataIndex: 'deviceCode', width: 100, align: 'center', ellipsis: true, customRender: text => { return text || '--' } },
|
|
|
+ { title: '设备型号', dataIndex: 'deviceModel', width: 100, align: 'center', ellipsis: true, customRender: text => { return text || '--' } },
|
|
|
+ { title: '生产厂家', dataIndex: 'manufacturer', width: 100, align: 'center', ellipsis: true, customRender: text => { return text || '--' } },
|
|
|
{ title: '操作', dataIndex: 'action', width: 100, align: 'center', scopedSlots: { customRender: 'action' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -139,7 +107,12 @@ export default {
|
|
|
downloadCode (item) {
|
|
|
const link = document.createElement('a')
|
|
|
link.href = this.qrCode
|
|
|
- link.download = this.shName + '.png'
|
|
|
+ if (this.shName) {
|
|
|
+ link.download = this.shName + '.png'
|
|
|
+ } else {
|
|
|
+ link.download = 'MAC地址二维码' + '.png'
|
|
|
+ }
|
|
|
+
|
|
|
link.click()
|
|
|
},
|
|
|
// 查看二维码
|