|
|
@@ -1,5 +1,5 @@
|
|
|
import {
|
|
|
- getAssets,
|
|
|
+ getAssetsWithDel,
|
|
|
updateAsset,
|
|
|
deleteAsset,
|
|
|
submitAsset
|
|
|
@@ -50,15 +50,17 @@ export default {
|
|
|
const canEdit = this.active === `${State.READY}`
|
|
|
|
|
|
return {
|
|
|
- list: getAssets,
|
|
|
+ list: getAssetsWithDel,
|
|
|
transform: this.transform,
|
|
|
- filters: this.active === `${State.RESOLVED}` ? [
|
|
|
- { key: 'originalName', type: 'search', placeholder: '媒资名称' }
|
|
|
- ] : [],
|
|
|
+ filters: this.active === `${State.RESOLVED}`
|
|
|
+ ? [
|
|
|
+ { key: 'originalName', type: 'search', placeholder: '媒资名称' }
|
|
|
+ ]
|
|
|
+ : [],
|
|
|
cols: [
|
|
|
{ prop: 'file', type: 'asset', on: this.onViewAsset },
|
|
|
- { prop: 'name', 'min-width': 100, render: canEdit ? (data, h) => {
|
|
|
- return h('edit-input', {
|
|
|
+ { prop: 'name', 'min-width': 100, render: canEdit
|
|
|
+ ? (data, h) => h('edit-input', {
|
|
|
model: {
|
|
|
value: data.name,
|
|
|
callback (val) {
|
|
|
@@ -69,10 +71,11 @@ export default {
|
|
|
edit: () => this.onEdit(data)
|
|
|
}
|
|
|
})
|
|
|
- } : null },
|
|
|
+ : null },
|
|
|
this.isImage ? null : { prop: 'duration', label: '时长' },
|
|
|
{ prop: 'size', label: '文件大小' },
|
|
|
{ prop: 'createTime', label: '上传时间' },
|
|
|
+ { 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,
|
|
|
@@ -112,8 +115,50 @@ export default {
|
|
|
}
|
|
|
asset.duration = parseDuration(asset.duration)
|
|
|
asset.size = parseByte(asset.size)
|
|
|
+ asset.ai = this.getAIState(asset)
|
|
|
return asset
|
|
|
},
|
|
|
+ getAIState ({ aiAuditState: status, aiAuditMsg: msg }) {
|
|
|
+ switch (status) {
|
|
|
+ case 1:
|
|
|
+ return {
|
|
|
+ type: 'danger',
|
|
|
+ label: '不合规'
|
|
|
+ }
|
|
|
+ case 2:
|
|
|
+ return {
|
|
|
+ type: 'warning',
|
|
|
+ label: '疑似',
|
|
|
+ msg
|
|
|
+ }
|
|
|
+ case 3:
|
|
|
+ return {
|
|
|
+ type: 'info',
|
|
|
+ label: '审核失败',
|
|
|
+ msg
|
|
|
+ }
|
|
|
+ case 8:
|
|
|
+ return {
|
|
|
+ type: 'info',
|
|
|
+ label: '无法审核',
|
|
|
+ msg
|
|
|
+ }
|
|
|
+ case 4:
|
|
|
+ case 5:
|
|
|
+ case 6:
|
|
|
+ return {
|
|
|
+ type: 'primmary',
|
|
|
+ label: '审核中'
|
|
|
+ }
|
|
|
+ case 7:
|
|
|
+ return {
|
|
|
+ type: 'success',
|
|
|
+ label: '通过'
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ return null
|
|
|
+ }
|
|
|
+ },
|
|
|
to (type) {
|
|
|
if (this.type !== AssetType[type]) {
|
|
|
this.type = null
|