|
|
@@ -70,18 +70,17 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
schema: {
|
|
|
- condition: { status: State.READY },
|
|
|
+ condition: { status: State.SUBMITTED },
|
|
|
list: getOrders,
|
|
|
transform: this.transform,
|
|
|
cols: [
|
|
|
{ type: 'refresh' },
|
|
|
- { prop: 'device', label: '设备' },
|
|
|
- { prop: 'address', label: '位置' },
|
|
|
- { prop: 'date', label: '起始日期', 'min-width': 100 },
|
|
|
- { prop: 'day', label: '持续(天)', 'min-width': 90, align: 'right' },
|
|
|
- { prop: 'range', label: '时段', 'min-width': 100, align: 'right' },
|
|
|
- { prop: 'count', label: '每日(次)', 'min-width': 90, align: 'right' },
|
|
|
- { prop: 'price', label: '价格(元)', 'min-width': 100, align: 'right' },
|
|
|
+ { prop: 'deviceName', label: '设备', 'min-width': 100 },
|
|
|
+ { prop: 'startDate', label: '起始日期', align: 'right', 'min-width': 100 },
|
|
|
+ { prop: 'range', label: '时段', align: 'right', 'min-width': 100 },
|
|
|
+ { prop: 'freq', label: '频率', align: 'right', 'min-width': 140 },
|
|
|
+ { prop: 'price', label: '总价(元)', 'min-width': 100, align: 'right' },
|
|
|
+ { prop: 'createTime', label: '提交时间', 'min-width': 140, align: 'right' },
|
|
|
{ type: 'invoke', width: 160, render: [
|
|
|
{ label: '内容', on: this.onView },
|
|
|
{ label: '通过', on: this.onResolve },
|
|
|
@@ -101,32 +100,33 @@ export default {
|
|
|
adSchema: {
|
|
|
list: this.getSources,
|
|
|
cols: [
|
|
|
- { prop: 'file', type: 'asset', on: this.onViewAsset },
|
|
|
- { prop: 'filename', label: '', 'min-width': 100 },
|
|
|
- { prop: 'duration', label: '播放时长', align: 'right' },
|
|
|
- { prop: 'size', label: '大小', align: 'right' },
|
|
|
+ { prop: 'file', label: '缩略图', type: 'asset', on: this.onViewAsset },
|
|
|
+ { prop: 'adDuration', label: '播放时长', align: 'left' },
|
|
|
+ { prop: 'fileType', label: '文件类型', align: 'center' },
|
|
|
+ { prop: 'size', label: '文件大小' },
|
|
|
+ { prop: 'ratio', label: '分辨率' },
|
|
|
+ { prop: 'remark', label: '其他' },
|
|
|
+ { prop: 'statusTag', type: 'tag' },
|
|
|
{ type: 'invoke', render: [
|
|
|
- { label: '查看', on: this.onViewSource }
|
|
|
+ { label: '查看', render ({ file }) { return !!file }, on: this.onViewSource }
|
|
|
] }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- transform ({ order, devices, assets }) {
|
|
|
- const slot = order.scheduleType === 1 ? order.slot : {}
|
|
|
+ transform ({ id, price, status, createTime, auditTime, expand, orders, assets }) {
|
|
|
+ const { startDate, range, day, duration, count } = orders[0]
|
|
|
return {
|
|
|
- id: order.id,
|
|
|
- device: devices[0].name,
|
|
|
- address: devices[0].address,
|
|
|
- date: slot.startDate,
|
|
|
- day: slot.day,
|
|
|
- range: slot.range,
|
|
|
- count: slot.count,
|
|
|
- duration: parseDuration(order.duration),
|
|
|
- price: (order.price / 100).toFixed(2),
|
|
|
- status: order.status,
|
|
|
- expand: order.expand,
|
|
|
+ id,
|
|
|
+ deviceName: orders[0].name,
|
|
|
+ startDate,
|
|
|
+ range,
|
|
|
+ price: (price / 100).toFixed(2),
|
|
|
+ freq: `${day}天 x ${duration}秒 x ${count}次`,
|
|
|
+ remark: status === State.REJECTED ? expand : '-',
|
|
|
+ createTime,
|
|
|
+ auditTime,
|
|
|
assets
|
|
|
}
|
|
|
},
|
|
|
@@ -168,17 +168,36 @@ export default {
|
|
|
totalCount: sources.length
|
|
|
})
|
|
|
},
|
|
|
- transformSource ({ filename, type, duration, size, keyName }) {
|
|
|
- return {
|
|
|
- file: {
|
|
|
- type,
|
|
|
- url: keyName,
|
|
|
- thumbnail: type === AssetType.IMAGE ? keyName : ''
|
|
|
- },
|
|
|
- filename,
|
|
|
- duration: parseDuration(duration),
|
|
|
- size: parseByte(size)
|
|
|
- }
|
|
|
+ transformSource ({ keyName, type, adDuration, duration, size, width, height, thumb, status, reason }) {
|
|
|
+ const isImage = type === AssetType.IMAGE
|
|
|
+ return type
|
|
|
+ ? {
|
|
|
+ file: {
|
|
|
+ type,
|
|
|
+ url: keyName,
|
|
|
+ thumbnail: isImage ? keyName : thumb || null,
|
|
|
+ origin: !isImage
|
|
|
+ },
|
|
|
+ fileType: isImage ? '图片' : '视频',
|
|
|
+ adDuration: parseDuration(adDuration || duration),
|
|
|
+ ratio: width && height ? `${width}x${height}` : '-',
|
|
|
+ size: parseByte(size),
|
|
|
+ remark: duration ? parseDuration(duration) : '-',
|
|
|
+ status,
|
|
|
+ statusTag: {
|
|
|
+ type: ['', 'primay', 'success', 'danger'][status],
|
|
|
+ label: ['-', '待审核', '已审核', '驳回'][status],
|
|
|
+ msg: status === State.REJECTED ? reason : ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ fileType: '-',
|
|
|
+ adDuration: parseDuration(adDuration || duration),
|
|
|
+ ratio: '-',
|
|
|
+ size: '-',
|
|
|
+ remark: '素材已删除',
|
|
|
+ status
|
|
|
+ }
|
|
|
},
|
|
|
onViewSource ({ file }) {
|
|
|
this.onViewAsset(file)
|