浏览代码

feat(material): support display create time

adjust some styles and use small pagination
Casper Dai 2 年之前
父节点
当前提交
286fd72799

+ 2 - 2
src/components/dialog/DatasetConfigDialog/index.vue

@@ -68,7 +68,7 @@ export default {
           { label: '解绑', on: this.onUnbind }
         ],
         cols: [
-          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
+          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },
@@ -97,7 +97,7 @@ export default {
         singlePage: true,
         list: this.getAssets,
         cols: [
-          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
+          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },

+ 1 - 1
src/components/dialog/MaterialDialog/index.vue

@@ -60,7 +60,7 @@ export default {
         singlePage: true,
         list: this.getContentAssets,
         cols: [
-          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
+          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },

+ 1 - 2
src/components/dialog/MultiAssetTransferDialog/index.vue

@@ -199,8 +199,7 @@ export default {
     schema () {
       return {
         pagination: {
-          layout: 'prev,pager,next',
-          small: true
+          layout: 'prev,pager,next'
         },
         list: this.getAssetsByQuery,
         transform: this.transformAsset,

+ 2 - 2
src/components/dialog/SpacerConfigDialog/index.vue

@@ -34,8 +34,8 @@ export default {
           { type: 'add', label: '新增视频', on: this.onAddVideo }
         ],
         cols: [
-          { prop: 'tagInfo', label: '类', width: 80 },
-          { prop: 'typeInfo', label: '资源', align: 'center', width: 72 },
+          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
+          { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'sizeInfo', label: '资源大小', 'align': 'right' },
           { prop: 'diff', label: '其他', 'align': 'right' },

+ 1 - 1
src/components/service/EventTargetPicker/index.vue

@@ -174,7 +174,7 @@ export default {
         singlePage: true,
         list: this.getAssets,
         cols: [
-          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
+          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },

+ 1 - 1
src/components/service/Schedule/ScheduleSwiper/index.vue

@@ -104,7 +104,7 @@ export default {
         list: this.getEventPrograms,
         cols: [
           { prop: 'name', label: '节目名称' },
-          { prop: 'duration', label: '时长' },
+          { prop: 'duration', label: '时长', align: 'center' },
           { type: 'invoke', render: [
             { label: '查看', on: this.onView }
           ] }

+ 6 - 3
src/components/table/mixins/table.js

@@ -14,7 +14,7 @@ const ButtonConfig = {
 //   keepalive?: false,
 //   autoRefreshEachPage?: false,
 //   autoRefresh?: false, // 仅首页
-//   refreshInterval?: 5000,
+//   refreshInterval?: 10000,
 //   nonPagination?: false,
 //   singlePage?: false,
 //   pagination?: Object,
@@ -94,7 +94,10 @@ export default {
       return !this.schema.nonPagination
     },
     paginationConfig () {
-      return this.schema.pagination
+      return {
+        small: true,
+        ...this.schema.pagination
+      }
     },
     autoRefreshEachPage () {
       return this.schema.autoRefreshEachPage
@@ -103,7 +106,7 @@ export default {
       return this.schema.autoRefresh || this.autoRefreshEachPage
     },
     refreshInterval () {
-      return this.schema.refreshInterval || 5000
+      return this.schema.refreshInterval || 10000
     }
   },
   watch: {

+ 1 - 2
src/components/transfer/Transfer/index.vue

@@ -59,8 +59,7 @@ export default {
       const { cols, ...data } = this.schema
       return {
         pagination: {
-          layout: 'prev,pager,next',
-          small: true
+          layout: 'prev,pager,next'
         },
         ...data,
         cols: [

+ 8 - 0
src/scss/base/_cover.scss

@@ -56,6 +56,14 @@
   }
 }
 
+.el-table .el-table__fixed-body-wrapper {
+  bottom: 0;
+}
+
+.el-table__fixed-right .el-table__fixed-body-wrapper {
+  overflow-y: auto;
+}
+
 .el-tree--highlight-current {
   .el-tree-node.is-current > .el-tree-node__content {
     color: #fff;

+ 1 - 1
src/views/ad/applet/history/index.vue

@@ -65,7 +65,7 @@ export default {
         nonPagination: true,
         list: this.getAssets,
         cols: [
-          { prop: 'typeInfo', label: '资源', width: 100, align: 'center' },
+          { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'adDuration', label: '上播时长', align: 'center' },
           { prop: 'ratio', label: '分辨率', align: 'right' },

+ 2 - 2
src/views/ad/applet/review-asset/index.vue

@@ -67,8 +67,8 @@ export default {
         transform: this.transformAsset,
         condition: { status: State.SUBMITTED },
         cols: [
-          { prop: 'typeInfo', type: 'refresh', width: 80 },
-          { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
+          { prop: 'typeInfo', type: 'refresh', width: 72, align: 'center' },
+          { prop: 'file', label: '资源', type: 'asset', on: this.onViewAsset },
           { prop: 'size', label: '文件大小', align: 'right' },
           { prop: 'ratio', label: '分辨率', align: 'right' },
           { prop: 'diff', label: '其他', align: 'right' },

+ 1 - 1
src/views/ad/applet/review-order/index.vue

@@ -103,7 +103,7 @@ export default {
         nonPagination: true,
         list: this.getAssets,
         cols: [
-          { prop: 'typeInfo', label: '资源', width: 100, align: 'center' },
+          { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'adDuration', label: '上播时长', align: 'center' },
           { prop: 'ratio', label: '分辨率', align: 'right' },

+ 3 - 3
src/views/ad/applet/user/index.vue

@@ -75,8 +75,8 @@ export default {
           ] }
         ],
         cols: [
-          { prop: 'typeInfo', type: 'refresh', width: 80 },
-          { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
+          { prop: 'typeInfo', type: 'refresh', width: 72, align: 'center' },
+          { prop: 'file', label: '资源', type: 'asset', on: this.onViewAsset },
           { prop: 'size', label: '文件大小', align: 'right' },
           { prop: 'ratio', label: '分辨率', align: 'right' },
           { prop: 'diff', label: '其他', align: 'right' },
@@ -121,7 +121,7 @@ export default {
         nonPagination: true,
         list: this.getOrderAssets,
         cols: [
-          { prop: 'typeInfo', label: '资源', width: 100, align: 'center' },
+          { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'ratio', label: '分辨率', align: 'right' },
           { prop: 'adDuration', label: '上播时长', align: 'center' },

+ 1 - 1
src/views/ad/automation/contract/index.vue

@@ -223,7 +223,7 @@ export default {
         ],
         cols: [
           { type: 'selection' },
-          { prop: 'tagInfo', label: '类', width: 72, align: 'center' },
+          { prop: 'tagInfo', label: '类', width: 72, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },

+ 1 - 1
src/views/ad/automation/dataset/index.vue

@@ -130,7 +130,7 @@ export default {
         ],
         cols: [
           { type: 'selection' },
-          { prop: 'tagInfo', label: '类', width: 72, align: 'center' },
+          { prop: 'tagInfo', label: '类', width: 72, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },

+ 2 - 2
src/views/ad/automation/scheduling/index.vue

@@ -146,7 +146,7 @@ export default {
         singlePage: true,
         list: this.getContentAssets,
         cols: [
-          { prop: 'tagInfo', label: '类型', width: 100, align: 'center' },
+          { prop: 'tagInfo', label: '分类', width: 80, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },
@@ -166,7 +166,7 @@ export default {
         condition: { id: this.schedulingId },
         cols: [
           { prop: 'fromInfo', type: 'refresh', width: 80, align: 'center' },
-          { prop: 'dataTag', label: '类', width: 100, align: 'center' },
+          { prop: 'dataTag', label: '类', width: 100, align: 'center' },
           { prop: 'dataType', label: '', width: 80, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'originalName', label: '' },

+ 1 - 1
src/views/ad/automation/task/AssetTask.vue

@@ -229,7 +229,7 @@ export default {
         singlePage: true,
         list: this.getContentAssets,
         cols: [
-          { prop: 'tagInfo', label: '类型', width: 100, align: 'center' },
+          { prop: 'tagInfo', label: '分类', width: 80, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },

+ 1 - 1
src/views/ad/automation/task/ScreenTask.vue

@@ -225,7 +225,7 @@ export default {
         singlePage: true,
         list: this.getContentAssets,
         cols: [
-          { prop: 'tagInfo', label: '类型', width: 100, align: 'center' },
+          { prop: 'tagInfo', label: '分类', width: 80, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },

+ 1 - 2
src/views/ad/automation/task/components/AssetTaskDialog.vue

@@ -130,8 +130,7 @@ export default {
       const { cols, props, ...data } = this.isStream ? this.streamTableSchema : this.assetTableSchema
       return {
         pagination: {
-          layout: 'prev,pager,next',
-          small: true
+          layout: 'prev,pager,next'
         },
         props: {
           'row-class-name': 'u-pointer',

+ 4 - 4
src/views/dashboard/statistic/index.vue

@@ -27,13 +27,13 @@ export default {
         list: getAssetStatistic,
         transform: this.transform,
         filters: [
-          { key: 'tag', type: 'select', placeholder: '类', options: [
+          { key: 'tag', type: 'select', placeholder: '资源分类', options: [
             { value: AssetTag.AD, label: AssetTagInfo[AssetTag.AD] },
             { value: AssetTag.PUBLICITY, label: AssetTagInfo[AssetTag.PUBLICITY] },
             { value: AssetTag.LOCAL_PUBLICITY, label: AssetTagInfo[AssetTag.LOCAL_PUBLICITY] },
             { value: AssetTag.SHIM, label: AssetTagInfo[AssetTag.SHIM] }
           ] },
-          { key: 'type', type: 'select', placeholder: '文件类型', options: [
+          { key: 'type', type: 'select', placeholder: '资源类型', options: [
             { value: AssetType.IMAGE, label: AssetTypeInfo[AssetType.IMAGE] },
             { value: AssetType.VIDEO, label: AssetTypeInfo[AssetType.VIDEO] },
             { value: AssetType.STREAMING_MEDIA, label: AssetTypeInfo[AssetType.STREAMING_MEDIA] },
@@ -41,8 +41,8 @@ export default {
           ] }
         ],
         cols: [
-          { prop: 'tagInfo', type: 'refresh', align: 'center', width: 80 },
-          { prop: 'typeInfo', label: '资源', align: 'center', width: 72 },
+          { prop: 'tagInfo', type: 'refresh', width: 80, align: 'center' },
+          { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'deviceName', label: '播放设备' },
           { prop: 'time', label: '播放时间' }

+ 2 - 2
src/views/realm/settings/components/SpacerConfigDialog.vue

@@ -35,8 +35,8 @@ export default {
           { type: 'add', label: '新增视频', on: this.onAddVideo }
         ],
         cols: [
-          { prop: 'tagInfo', label: '类', width: 80 },
-          { prop: 'typeInfo', label: '资源', align: 'center', width: 72 },
+          { prop: 'tagInfo', label: '类', width: 80, align: 'center' },
+          { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'sizeInfo', label: '资源大小', 'align': 'right' },
           { prop: 'diff', label: '其他', 'align': 'right' },

+ 16 - 10
src/views/screen/material/media/index.vue

@@ -52,27 +52,29 @@ export default {
     schema () {
       return {
         props: {
-          'row-class-name': 'u-pointer'
+          'row-class-name': 'u-pointer',
+          size: 'small'
         },
         listeners: {
           'row-click': this.onToggleSelection,
           'selection-change': this.onSelectionChange
         },
+        autoRefreshEachPage: true,
+        refreshInterval: 30000,
         list: this.getAssetsByQuery,
         transform: this.transformAsset,
-        condition: { type: AssetType.IMAGE },
         buttons: [
           { type: 'add', label: '上传', on: this.onUpload },
           { type: 'del', on: this.onBatchDel }
         ],
         filters: [
-          { key: 'tag', type: 'select', placeholder: '类', options: [
+          { key: 'tag', type: 'select', placeholder: '资源分类', options: [
             { value: AssetTag.AD, label: AssetTagInfo[AssetTag.AD] },
             { value: AssetTag.PUBLICITY, label: AssetTagInfo[AssetTag.PUBLICITY] },
             { value: AssetTag.LOCAL_PUBLICITY, label: AssetTagInfo[AssetTag.LOCAL_PUBLICITY] },
             { value: AssetTag.SHIM, label: AssetTagInfo[AssetTag.SHIM] }
           ] },
-          { key: 'type', type: 'select', options: [
+          { key: 'type', type: 'select', placeholder: '资源类型', options: [
             { value: AssetType.IMAGE, label: AssetTypeInfo[AssetType.IMAGE] },
             { value: AssetType.VIDEO, label: AssetTypeInfo[AssetType.VIDEO] },
             { value: AssetType.AUDIO, label: AssetTypeInfo[AssetType.AUDIO] },
@@ -80,27 +82,30 @@ export default {
             { value: AssetType.PDF, label: AssetTypeInfo[AssetType.PDF] },
             { value: AssetType.DOC, label: AssetTypeInfo[AssetType.DOC] }
           ] },
-          { key: 'originalName', type: 'search', placeholder: '资源名称' }
+          { key: 'originalName', type: 'search', placeholder: '资源名称' },
+          { type: 'refresh' }
         ],
         cols: [
-          { type: 'selection', selectable: this.canDel },
-          { prop: 'tagInfo', type: 'refresh', width: 80 },
-          { prop: 'file', label: '资源', type: 'asset', on: this.onView },
+          { type: 'selection', selectable: this.canDel, fixed: true },
+          { prop: 'tagInfo', label: '分类', width: 72, 'align': 'center', fixed: true },
+          { prop: 'typeInfo', label: '资源', width: 72, 'align': 'center', fixed: true },
+          { prop: 'file', label: '', type: 'asset', on: this.onView, fixed: true },
           { render: (data, h) => h('edit-input', {
             props: {
               value: `${data.originalName}`
             },
             on: { edit: val => this.onEdit(data, val) }
-          }), 'class-name': 'c-edit-column', 'min-width': 120 },
+          }), 'class-name': 'c-edit-column', 'min-width': 120, fixed: true },
           { prop: 'ai', label: 'AI审核', type: 'tag' },
           // { prop: 'statusTag', type: 'tag' },
           { prop: 'size', label: '资源大小', 'align': 'right' },
           { prop: 'diff', label: '其他', 'align': 'right' },
           { prop: 'userName', label: '上传人', 'align': 'right' },
+          { prop: 'createTime', label: '上传时间', width: 140, 'align': 'right' },
           { type: 'invoke', render: [
             { label: '查看', allow: ({ file }) => !!file, on: this.onView },
             { label: '删除', allow: this.canDel, on: this.onDel }
-          ], width: 100 }
+          ], width: 100, fixed: 'right' }
         ]
       }
     }
@@ -138,6 +143,7 @@ export default {
     },
     transformAsset (asset) {
       asset.tagInfo = AssetTagInfo[asset.tag]
+      asset.typeInfo = AssetTypeInfo[asset.type]
       asset.size = parseByte(asset.size)
       asset.ai = getAIState(asset)
       // asset.statusTag = this.getStatusTag(asset)

+ 1 - 1
src/views/screen/material/stream/index.vue

@@ -64,7 +64,7 @@ export default {
         ],
         cols: [
           { type: 'selection' },
-          { prop: 'tagInfo', type: 'refresh', width: 80 },
+          { prop: 'tagInfo', type: 'refresh', width: 80, 'align': 'center' },
           { prop: 'file', label: '资源', type: 'asset', on: this.onView },
           { render: (data, h) => h('edit-input', {
             props: {

+ 1 - 1
src/views/screen/review/workflow/audit/index.vue

@@ -155,7 +155,7 @@ export default {
         },
         list: this.getAssets,
         cols: [
-          { prop: 'tagInfo', label: '类', width: 72, align: 'center' },
+          { prop: 'tagInfo', label: '类', width: 72, align: 'center' },
           { prop: 'typeInfo', label: '资源', width: 72, align: 'center' },
           { prop: 'file', label: '', type: 'asset', on: this.onViewAsset },
           { prop: 'name', label: '' },