|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
props: {
|
|
|
status: {
|
|
|
type: Number,
|
|
|
- default: State.READY
|
|
|
+ default: State.AVAILABLE_ASSET
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
|
@@ -26,20 +26,17 @@ export default {
|
|
|
type: AssetType.IMAGE,
|
|
|
active: `${this.status}`,
|
|
|
[AssetType.IMAGE]: {
|
|
|
- [State.READY]: createListOptions({ type: AssetType.IMAGE, status: State.READY }),
|
|
|
- [State.SUBMITTED]: createListOptions({ type: AssetType.IMAGE, status: State.SUBMITTED }),
|
|
|
+ [State.AVAILABLE_ASSET]: createListOptions({ type: AssetType.IMAGE, status: State.AVAILABLE_ASSET }),
|
|
|
[State.RESOLVED]: createListOptions({ type: AssetType.IMAGE, status: State.RESOLVED, originalName: '' }),
|
|
|
[State.REJECTED]: createListOptions({ type: AssetType.IMAGE, status: State.REJECTED })
|
|
|
},
|
|
|
[AssetType.VIDEO]: {
|
|
|
- [State.READY]: createListOptions({ type: AssetType.VIDEO, status: State.READY }),
|
|
|
- [State.SUBMITTED]: createListOptions({ type: AssetType.VIDEO, status: State.SUBMITTED }),
|
|
|
+ [State.AVAILABLE_ASSET]: createListOptions({ type: AssetType.VIDEO, status: State.AVAILABLE_ASSET }),
|
|
|
[State.RESOLVED]: createListOptions({ type: AssetType.VIDEO, status: State.RESOLVED, originalName: '' }),
|
|
|
[State.REJECTED]: createListOptions({ type: AssetType.VIDEO, status: State.REJECTED })
|
|
|
},
|
|
|
[AssetType.AUDIO]: {
|
|
|
- [State.READY]: createListOptions({ type: AssetType.AUDIO, status: State.READY }),
|
|
|
- [State.SUBMITTED]: createListOptions({ type: AssetType.AUDIO, status: State.SUBMITTED }),
|
|
|
+ [State.AVAILABLE_ASSET]: createListOptions({ type: AssetType.AUDIO, status: State.AVAILABLE_ASSET }),
|
|
|
[State.RESOLVED]: createListOptions({ type: AssetType.AUDIO, status: State.RESOLVED, originalName: '' }),
|
|
|
[State.REJECTED]: createListOptions({ type: AssetType.AUDIO, status: State.REJECTED })
|
|
|
}
|
|
|
@@ -47,8 +44,6 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
schema () {
|
|
|
- const canEdit = this.active === `${State.READY}`
|
|
|
-
|
|
|
return {
|
|
|
list: getAssetsWithDel,
|
|
|
transform: this.transform,
|
|
|
@@ -59,29 +54,31 @@ export default {
|
|
|
: [],
|
|
|
cols: [
|
|
|
{ prop: 'file', type: 'asset', on: this.onViewAsset },
|
|
|
- { prop: 'name', 'min-width': 100, render: canEdit
|
|
|
- ? (data, h) => h('edit-input', {
|
|
|
- model: {
|
|
|
- value: data.name,
|
|
|
- callback (val) {
|
|
|
- data.name = typeof val === 'string' ? val.trim() : val
|
|
|
+ { prop: 'name', 'min-width': 100, render: this.active === `${State.AVAILABLE_ASSET}`
|
|
|
+ ? (data, h) => data.del
|
|
|
+ ? h('edit-input', {
|
|
|
+ model: {
|
|
|
+ value: data.name,
|
|
|
+ callback (val) {
|
|
|
+ data.name = typeof val === 'string' ? val.trim() : val
|
|
|
+ }
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ edit: () => this.onEdit(data)
|
|
|
}
|
|
|
- },
|
|
|
- on: {
|
|
|
- edit: () => this.onEdit(data)
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ : data.name
|
|
|
: null },
|
|
|
+ this.active === `${State.REJECTED}` ? { prop: 'remark', label: '驳回原因' } : null,
|
|
|
this.isImage ? null : { prop: 'duration', label: '时长' },
|
|
|
{ prop: 'size', label: '文件大小' },
|
|
|
{ prop: 'createTime', label: '上传时间' },
|
|
|
- this.active === `${State.REJECTED}` ? { prop: 'remark', label: '驳回原因' } : null,
|
|
|
{ prop: 'ai', label: 'AI审核', type: 'tag', width: 100 },
|
|
|
{ type: 'invoke', align: 'center', width: 140, render: [
|
|
|
{ label: '查看', on: this.onView },
|
|
|
// canEdit ? { label: '提交', on: this.onSubmit } : null,
|
|
|
{ label: '删除', render ({ del }) { return del }, on: this.onDel }
|
|
|
- ].filter(Boolean) }
|
|
|
+ ] }
|
|
|
]
|
|
|
}
|
|
|
},
|