Просмотр исходного кода

feat: remove the resolution limit when publishing

Casper Dai 3 лет назад
Родитель
Сommit
5f37ef9bd4

+ 5 - 1
src/scss/bem/_object.scss

@@ -201,8 +201,12 @@
 
 .o-info {
   padding: 0 $spacing;
-  color: $gray;
+  color: $info--dark;
   line-height: normal;
+
+  & > div + div {
+    margin-top: 4px;
+  }
 }
 
 .o-expand-icon {

+ 4 - 1
src/views/broadcast/template/index.vue

@@ -225,7 +225,10 @@ export default {
       }
     },
     onDel ({ templateId, templateName }) {
-      this.$confirm(`删除模板${templateName}?`, { type: 'warning' }).then(() => {
+      this.$confirm(
+        `删除模板${templateName}?`,
+        { type: 'warning' }
+      ).then(() => {
         delBroadcastTemplate(templateId).then(() => {
           this.$message({
             type: 'success',

+ 4 - 3
src/views/dashboard/v0/DeviceInfo.vue

@@ -139,9 +139,10 @@ export default {
         })
         return
       }
-      this.$confirm(`立即${open ? '开机' : '关机'}?`, {
-        type: 'warning'
-      }).then(() => {
+      this.$confirm(
+        `立即${open ? '开机' : '关机'}?`,
+        { type: 'warning' }
+      ).then(() => {
         this.sendTopic(open ? 'bootDevice' : 'shutdownDevice')
       })
     },

+ 14 - 7
src/views/screen/deploy/index.vue

@@ -38,7 +38,7 @@
       />
       <template v-if="active > 0">
         <div class="c-list has-padding u-overflow-y--auto">
-          <div class="c-list__item u-bold">{{ resolutionRatio }}</div>
+          <!-- <div class="c-list__item u-bold">{{ resolutionRatio }}</div> -->
           <div
             v-for="device in selectedDevices"
             :key="device.id"
@@ -87,11 +87,11 @@
               </div>
             </div>
           </div>
+          <!-- :ratio="resolutionRatio" -->
           <event-picker
             v-show="isEvent"
             ref="picker"
             class="c-list__item"
-            :ratio="resolutionRatio"
             vertical
             @choosen="onChoosenProgram"
           />
@@ -249,14 +249,21 @@ export default {
       }
       const resolutionRatio = this.resolutionRatio
       if (devices.some(device => device.resolutionRatio !== resolutionRatio)) {
-        return this.onError('选择的设备分辨率不一致')
+        this.$confirm(
+          '发布的内容可能无法完全适配,继续下一步?',
+          '选择的设备分辨率不一致',
+          { type: 'warning' }
+        ).then(() => {
+          this.active += 1
+        })
+        return false
+        // return this.onError('选择的设备分辨率不一致')
       }
       this.eventOptions = this.createEventOptions()
       return true
     },
     createEventOptions () {
       return {
-        ratio: this.resolutionRatio,
         type: PublishType.CALENDAR,
         schedule: null,
         program: null
@@ -266,7 +273,7 @@ export default {
       this.eventOptions.program = val
     },
     onChooseSchedule () {
-      this.$refs.scheduleDialog.show({ resolutionRatio: this.resolutionRatio })
+      this.$refs.scheduleDialog.show(/* { resolutionRatio: this.resolutionRatio } */)
     },
     onChoosenSchedule ({ value: { id, name }, done }) {
       done()
@@ -305,8 +312,8 @@ export default {
           devices.map(device => device.id),
           eventTarget,
           {
-            programCalendarName: this.eventTarget.name,
-            resolutionRatio: this.resolutionRatio
+            programCalendarName: this.eventTarget.name/* ,
+            resolutionRatio: this.resolutionRatio */
           }
         ))
       })

+ 5 - 5
src/views/screen/review/history/index.vue

@@ -41,15 +41,15 @@ export default {
             return h('div', {
               staticClass: 'o-info'
             }, [
-              h('div', null, data.desc),
+              h('div', null, `发布人:${data.createBy}`),
+              h('div', null, `发布时间${data.createTime}`),
               h('div', null, `设备:${data.device}`)
             ])
           } },
           { prop: 'type', label: '类型', align: 'center', width: 100 },
           { prop: 'name', label: '', 'min-width': 100 },
-          { prop: 'createBy', label: '发布人' },
-          { prop: 'createTime', label: '发布时间' },
-          { type: 'tag', render ({ status }) {
+          { prop: 'desc', label: '时间', 'min-width': 180 },
+          { type: 'tag', width: 100, render ({ status }) {
             if (status === State.CANCEL) {
               return {
                 type: 'danger',
@@ -106,7 +106,7 @@ export default {
       }
     },
     getDesc (target) {
-      if (target.type === PublishType.EVENT && target.detail.priority === EventPriority.INSERTED) {
+      if (target.type === PublishType.EVENT) {
         return getEventDescription(target.detail)
       }
       return ''

+ 2 - 2
src/views/screen/review/single/components/ReviewAsset.vue

@@ -33,7 +33,7 @@ export default {
           { prop: 'file', type: 'asset', on: this.onViewAsset },
           { prop: 'originalName', label: '' },
           { prop: 'size', label: '文件大小' },
-          { prop: 'duration', label: '其他' },
+          { prop: 'remark', label: '其他' },
           { prop: 'ai', label: 'AI审核', type: 'tag', width: 100 },
           { prop: 'createBy', label: '申请人' },
           { prop: 'createTime', label: '提交时间', 'min-width': 100 },
@@ -59,7 +59,7 @@ export default {
           return { type, url: keyName }
         })
       }
-      asset.duration = parseDuration(asset.duration)
+      asset.remark = parseDuration(asset.duration)
       asset.size = parseByte(asset.size)
       asset.ai = this.getAIState(asset)
       asset.createBy = asset.userName || asset.createBy

+ 0 - 1
src/views/screen/review/single/components/ReviewProgram.vue

@@ -26,7 +26,6 @@ export default {
         transform: this.transform,
         cols: [
           { prop: 'name', label: '节目名称', 'min-width': 100 },
-          { prop: 'resolutionRatio', label: '分辨率' },
           { prop: 'createBy', label: '申请人' },
           { prop: 'createTime', label: '提交时间' },
           { type: 'invoke', width: 160, render: [

+ 0 - 1
src/views/screen/review/single/components/ReviewProgramRecur.vue

@@ -31,7 +31,6 @@ export default {
         list: getSchedules,
         cols: [
           { prop: 'name', label: '轮播名称', 'min-width': 100 },
-          { prop: 'resolutionRatio', label: '分辨率' },
           { prop: 'createBy', label: '申请人' },
           { prop: 'createTime', label: '提交时间' },
           { type: 'invoke', width: 160, render: [

+ 0 - 1
src/views/screen/review/single/components/ReviewSchedule.vue

@@ -31,7 +31,6 @@ export default {
         list: getSchedules,
         cols: [
           { prop: 'name', label: '排期名称', 'min-width': 100 },
-          { prop: 'resolutionRatio', label: '分辨率' },
           { prop: 'createBy', label: '申请人' },
           { prop: 'createTime', label: '提交时间' },
           { type: 'invoke', width: 160, render: [

+ 2 - 2
src/views/screen/review/workflow/detail/components/ReviewAssets.vue

@@ -44,8 +44,8 @@ export default {
           { prop: 'typeName', label: '类型', align: 'center', width: 80 },
           { prop: 'file', type: 'asset', on: this.onViewAsset },
           { prop: 'originalName', label: '' },
-          { prop: 'duration', label: '时长' },
           { prop: 'size', label: '文件大小' },
+          { prop: 'remark', label: '其他' },
           { prop: 'ai', label: 'AI审核', type: 'tag', width: 100 },
           ...this.reviewCol
         ]
@@ -86,7 +86,7 @@ export default {
             return { type, url: keyName }
           })
         },
-        duration: parseDuration(asset.duration),
+        remark: parseDuration(asset.duration),
         size: parseByte(asset.size),
         ai: this.getAIState(asset),
         status: asset.status

+ 0 - 2
src/views/screen/review/workflow/detail/components/ReviewPrograms.vue

@@ -36,7 +36,6 @@ export default {
         cols: [
           { prop: 'file', label: '缩略图', type: 'asset', on: this.onView },
           { prop: 'name', label: '节目名称' },
-          { prop: 'resolutionRatio', label: '分辨率' },
           ...this.reviewCol
         ]
       }
@@ -58,7 +57,6 @@ export default {
         id: program.id,
         file: program.img ? { id: program.id, thumbnail: program.img } : null,
         name: program.name,
-        resolutionRatio: program.resolutionRatio,
         status: program.status
       }
     },

+ 5 - 7
src/views/screen/review/workflow/detail/components/ReviewPublish.vue

@@ -39,13 +39,12 @@ export default {
             return h('div', {
               staticClass: 'o-info'
             }, [
-              h('div', null, data.desc),
+              h('div', null, `内容:${data.name}`),
               h('div', null, `设备:${data.device}`)
             ])
           } },
-          { prop: 'type', label: '类型' },
-          { prop: 'name', label: '名称' },
-          { prop: 'resolutionRatio', label: '分辨率' },
+          { prop: 'type', label: '类型', width: 100 },
+          { prop: 'desc', label: '时间', 'min-width': 120 },
           ...this.reviewCol
         ]
       }
@@ -66,12 +65,11 @@ export default {
       const diff = this.getDiff(item)
       return { ...same, ...diff }
     },
-    getSame ({ id, status, programCalendarName, resolutionRatio, createBy, createByUsername, createTime, calendarReleaseDeviceList }) {
+    getSame ({ id, status, programCalendarName, createBy, createByUsername, createTime, calendarReleaseDeviceList }) {
       return {
         pass: status !== State.SUBMITTED,
         id,
         name: programCalendarName,
-        resolutionRatio,
         createBy: createByUsername || createBy,
         createTime,
         device: calendarReleaseDeviceList?.map(item => item.deviceName).join(',')
@@ -97,7 +95,7 @@ export default {
       }
     },
     getDesc (target) {
-      if (target.type === PublishType.EVENT && target.detail.priority === EventPriority.INSERTED) {
+      if (target.type === PublishType.EVENT) {
         return getEventDescription(target.detail)
       }
       return ''

+ 2 - 3
src/views/screen/review/workflow/detail/components/ReviewRecurPrograms.vue

@@ -35,7 +35,6 @@ export default {
         list: this.getList,
         cols: [
           { prop: 'name', label: '轮播名称' },
-          { prop: 'resolutionRatio', label: '分辨率' },
           ...this.reviewCol
         ]
       }
@@ -51,10 +50,10 @@ export default {
     transform (arr) {
       return arr.map(this.transformItem)
     },
-    transformItem ({ id, status, name, resolutionRatio }) {
+    transformItem ({ id, status, name }) {
       return {
         pass: status !== State.SUBMITTED,
-        id, status, name, resolutionRatio
+        id, status, name
       }
     },
     onView ({ id }) {

+ 2 - 3
src/views/screen/review/workflow/detail/components/ReviewSchedule.vue

@@ -23,7 +23,6 @@ export default {
         list: this.getList,
         cols: [
           { prop: 'name', label: '排期名称' },
-          { prop: 'resolutionRatio', label: '分辨率' },
           ...this.reviewCol
         ]
       }
@@ -39,8 +38,8 @@ export default {
     transform (arr) {
       return arr.map(this.transformItem)
     },
-    transformItem ({ id, status, name, resolutionRatio }) {
-      return { pass: status !== State.SUBMITTED, id, status, name, resolutionRatio }
+    transformItem ({ id, status, name }) {
+      return { pass: status !== State.SUBMITTED, id, status, name }
     },
     onView ({ id }) {
       this.$refs.scheduleDialog.show(id)

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

@@ -239,7 +239,10 @@ export default {
         this.$refs.rejectDialog.show()
         return
       }
-      this.$confirm(`确定${type === 'calendar' ? '发布' : '通过'}?`, { type: 'warning' }).then(() => {
+      this.$confirm(
+        `确定${type === 'calendar' ? '发布' : '通过'}?`,
+        { type: 'warning' }
+      ).then(() => {
         if (type === 'calendar') {
           this.onResolve()
         } else {

+ 4 - 4
src/views/screen/review/workflow/index.vue

@@ -36,14 +36,14 @@ export default {
             return h('div', {
               staticClass: 'o-info'
             }, [
-              h('div', null, data.desc),
+              h('div', null, `内容:${data.name}`),
               h('div', null, `设备:${data.device}`)
             ])
           } },
           { prop: 'type', label: '类型', align: 'center', width: 100 },
-          { prop: 'name', label: '', 'min-width': 100 },
+          { prop: 'desc', label: '时间', 'min-width': 180 },
           { prop: 'createBy', label: '申请人' },
-          { prop: 'updateTime', label: '提交时间' },
+          { prop: 'updateTime', label: '提交时间', 'min-width': 120 },
           { type: 'invoke', render: [
             { label: '审核', on: this.onReview }
           ] }
@@ -99,7 +99,7 @@ export default {
       }
     },
     getDesc (target) {
-      if (target.type === PublishType.EVENT && target.detail.priority === EventPriority.INSERTED) {
+      if (target.type === PublishType.EVENT) {
         return getEventDescription(target.detail)
       }
       return ''

+ 3 - 4
src/views/screen/review/workflow/mine/index.vue

@@ -85,9 +85,8 @@ export default {
           { type: 'expand', refresh: true, render: this.renderRelative },
           { prop: 'type', label: '类型', align: 'center', width: 100 },
           { prop: 'name', label: '', 'min-width': 100 },
-          { prop: 'updateTime', label: this.active === `${State.SUBMITTED}` ? '提交时间' : '审批时间' },
-          isRejected ? { prop: 'reason', label: '驳回原因', 'min-width': 100 } : null,
-          { type: 'invoke', width: isRejected ? 200 : 120, render: [
+          isRejected ? { prop: 'reason', label: '驳回原因', 'min-width': 100 } : { prop: 'updateTime', label: this.active === `${State.SUBMITTED}` ? '提交时间' : '审批时间', 'min-width': 100 },
+          { type: 'invoke', width: 200, render: [
             isRejected ? { label: '编辑', render: ({ canResubmit }) => canResubmit, on: this.onEdit } : { label: '查看', on: this.onView },
             isRejected ? { label: '重提交', render: ({ canResubmit }) => canResubmit, on: this.onResubmit } : null,
             { label: '历史', on: this.onViewHistory },
@@ -241,7 +240,7 @@ export default {
       }
     },
     getDesc (target) {
-      if (target.type === PublishType.EVENT && target.detail.priority === EventPriority.INSERTED) {
+      if (target.type === PublishType.EVENT) {
         return getEventDescription(target.detail)
       }
       return ''