|
|
@@ -127,6 +127,12 @@ export default {
|
|
|
],
|
|
|
filters: [
|
|
|
{ key: 'productId', type: 'select', placeholder: '配置', ...productSelectSchema },
|
|
|
+ { key: 'boundFlag', type: 'select', placeholder: '使用情况', options: [
|
|
|
+ { value: 0, label: '已使用' },
|
|
|
+ { value: 1, label: '未使用' }
|
|
|
+ ] },
|
|
|
+ { key: 'serialNumber', type: 'search', placeholder: '序列号' },
|
|
|
+ { key: 'mac', type: 'search', placeholder: 'MAC' },
|
|
|
{ key: 'name', type: 'search', placeholder: '设备名称' }
|
|
|
],
|
|
|
cols: [
|
|
|
@@ -154,12 +160,15 @@ export default {
|
|
|
: { type: 'danger', label: '离线' }
|
|
|
: { type: 'warning', label: '未激活' },
|
|
|
on: this.onTagClick },
|
|
|
+ { label: '使用情况', type: 'tag', render: ({ bound }) => bound
|
|
|
+ ? { type: 'success', label: '已使用' }
|
|
|
+ : { type: 'primary', label: '未使用' } },
|
|
|
{ type: 'invoke', render: [
|
|
|
{ label: '配置', render: ({ isMaster }) => isMaster, on: this.onSettingDevice },
|
|
|
- !__SUB_DEVICE__ && { label: '添加备份', render: ({ isMaster }) => isMaster, on: this.onAddSubDevice },
|
|
|
- { label: '所属网点', render: ({ isMaster }) => isMaster, on: this.onViewMesh },
|
|
|
+ __SUB_DEVICE__ && { label: '添加备份', render: ({ isMaster }) => isMaster, on: this.onAddSubDevice },
|
|
|
+ { label: '所属网点', render: ({ isMaster }) => isMaster, allow: ({ bound }) => bound, on: this.onViewMesh },
|
|
|
{ label: '删除', render: ({ empty }) => !empty, on: this.onDelDevice }
|
|
|
- ].filter(Boolean), width: 240 }
|
|
|
+ ].filter(Boolean), width: __SUB_DEVICE__ ? 240 : 180 }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
@@ -271,7 +280,13 @@ export default {
|
|
|
...data
|
|
|
}).then(() => {
|
|
|
done()
|
|
|
- this.$refs.table.resetCondition({ name: this.currObj.name, productId: this.currObj.productId })
|
|
|
+ this.$refs.table.resetCondition({
|
|
|
+ boundFlag: 0,
|
|
|
+ name: this.currObj.name,
|
|
|
+ productId: this.currObj.productId,
|
|
|
+ serialNumber: this.currObj.serialNumber,
|
|
|
+ mac: this.currObj.mac
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
}
|