|
|
@@ -30,7 +30,7 @@ export default {
|
|
|
nonPagination: true,
|
|
|
list: this.getSpacers,
|
|
|
buttons: [
|
|
|
- { type: 'add', label: '新增图片', on: this.onAddImage },
|
|
|
+ // { type: 'add', label: '新增图片', on: this.onAddImage },
|
|
|
{ type: 'add', label: '新增视频', on: this.onAddVideo }
|
|
|
],
|
|
|
cols: [
|
|
|
@@ -62,6 +62,21 @@ export default {
|
|
|
)
|
|
|
},
|
|
|
onAddVideo () {
|
|
|
+ const { error, totalCount } = this.$refs.dialog.getTable().info()
|
|
|
+ if (error) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先获取数据'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (totalCount >= 1) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '暂仅支持单个垫片'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$refs.assetDialog.show(
|
|
|
AssetType.VIDEO,
|
|
|
this.directoryOption
|
|
|
@@ -81,6 +96,10 @@ export default {
|
|
|
]
|
|
|
}).then(() => {
|
|
|
this.$refs.dialog.getTable().pageTo(1)
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '设置将在设备重启后生效'
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
onDel (spacer) {
|