Răsfoiți Sursa

fix(deploy): device default playback

daigang 3 ani în urmă
părinte
comite
64e17d9d25

+ 3 - 3
src/components/dialog/EventTargetDialog/index.vue

@@ -36,10 +36,10 @@ export default {
         condition: { type: EventTarget.PROGRAM, name: '' },
         filters: [
           { key: 'type', type: 'select', options: [
-            { value: EventTarget.PROGRAM, label: '节目' },
+            { value: EventTarget.PROGRAM, label: '节目' },
             { value: EventTarget.RECUR, label: '轮播' }
           ] },
-          { key: 'name', type: 'search', placeholder: '节目名称' }
+          { key: 'name', type: 'search', placeholder: '名称' }
         ],
         cols: [
           { label: '缩略图', type: 'asset', render ({ img }) {
@@ -47,7 +47,7 @@ export default {
               ? { thumb: img }
               : null
           }, on: this.onView },
-          { prop: 'name', label: '节目名称' },
+          { prop: 'name', label: '名称' },
           { type: 'invoke', render: [
             { label: '查看', on: this.onView }
           ] }

+ 9 - 0
src/constant.js

@@ -99,6 +99,15 @@ export const EventPriorityDescription = {
   [EventPriority.EMERGENT]: '紧急'
 }
 
+export const EventPriorityInfo = {
+  [EventPriority.SHIM]: `${EventPriority.SHIM} ${EventPriorityDescription[EventPriority.SHIM]}`,
+  [EventPriority.SCHEDULING]: `${EventPriority.SCHEDULING} ${EventPriorityDescription[EventPriority.SCHEDULING]}`,
+  [EventPriority.INSERTED]: `${EventPriority.INSERTED} ${EventPriorityDescription[EventPriority.INSERTED]}`,
+  [EventPriority.AUTO_PROGRAMME]: `${EventPriority.AUTO_PROGRAMME} ${EventPriorityDescription[EventPriority.AUTO_PROGRAMME]}`,
+  [EventPriority.EMBEDDED]: `${EventPriority.EMBEDDED} ${EventPriorityDescription[EventPriority.EMBEDDED]}`,
+  [EventPriority.EMERGENT]: `${EventPriority.EMERGENT} ${EventPriorityDescription[EventPriority.EMERGENT]}`
+}
+
 export const EventFreq = {
   ONCE: 'ONCE',
   WEEKLY: 'WEEKLY'

+ 2 - 2
src/router/index.js

@@ -64,14 +64,14 @@ export const asyncRoutes = [
   {
     path: '/am',
     component: Layout,
-    meta: { title: '素材管理', icon: 'am' },
+    meta: { title: '内容管理', icon: 'am' },
     children: [
       {
         name: 'media-list',
         path: 'media',
         component: () => import('@/views/screen/material/media/index'),
         access: [Access.MANAGE_CALENDAR, Access.MANAGE_GROUP],
-        meta: { title: '资' }
+        meta: { title: '资' }
       },
       {
         name: 'program-list',

+ 2 - 2
src/views/dashboard/components/Device.vue

@@ -86,7 +86,7 @@
 
 <script>
 import { getTimeline } from '@/api/device'
-import { EventPriorityDescription } from '@/constant'
+import { EventPriorityInfo } from '@/constant'
 import {
   listen,
   unlisten
@@ -291,7 +291,7 @@ export default {
       const target = event.target
       return {
         target,
-        name: target.name || EventPriorityDescription[event.priority],
+        name: target.name || EventPriorityInfo[event.priority],
         startDate: parseTime(startDate, '{y}.{m}.{d}'),
         startTime: parseTime(startDate, '{h}:{i}:{s}'),
         endDate: endDate ? parseTime(endDate, '{y}.{m}.{d}') : '',

+ 2 - 2
src/views/dashboard/v0/DeviceCalender.vue

@@ -43,7 +43,7 @@
 
 <script>
 import { getTimelines } from './api'
-import { EventPriorityDescription } from '@/constant'
+import { EventPriorityInfo } from '@/constant'
 import {
   isHit,
   toDate,
@@ -82,7 +82,7 @@ export default {
           updateTime: data ? data.updateTime : '-',
           programName: map
             ? data?.event
-              ? data.event.target.name || EventPriorityDescription[data.event.priority]
+              ? data.event.target.name || EventPriorityInfo[data.event.priority]
               : '暂无节目'
             : '查询中...',
           programDesc: map && data?.event ? getEventDescription(data.event) : '-'

+ 2 - 2
src/views/dashboard/v1/DeviceCalender.vue

@@ -45,7 +45,7 @@
 
 <script>
 import { getTimelines } from './api'
-import { EventPriorityDescription } from '@/constant'
+import { EventPriorityInfo } from '@/constant'
 import {
   isHit,
   toDate,
@@ -85,7 +85,7 @@ export default {
           updateTime: data ? data.updateTime : '-',
           programName: map
             ? data?.event
-              ? data.event.target.name || EventPriorityDescription[data.event.priority]
+              ? data.event.target.name || EventPriorityInfo[data.event.priority]
               : '暂无节目'
             : '查询中...',
           programDesc: map && data?.event ? getEventDescription(data.event) : '-',

+ 2 - 2
src/views/device/detail/dashboard/Timeline.vue

@@ -118,7 +118,7 @@
 
 <script>
 import { getTimeline } from '@/api/device'
-import { EventPriorityDescription } from '@/constant'
+import { EventPriorityInfo } from '@/constant'
 import {
   toDate,
   toDateStr,
@@ -189,7 +189,7 @@ export default {
     transformEvent (event) {
       return {
         ...event,
-        name: event.target.name || EventPriorityDescription[event.priority],
+        name: event.target.name || EventPriorityInfo[event.priority],
         time: getEventDescription(event),
         startDateTime: toDate(event.start),
         endDateTime: toDate(event.until),

+ 4 - 2
src/views/device/index.vue

@@ -25,6 +25,7 @@ import {
   Access,
   EventPriority,
   EventFreq,
+  PublishType,
   PublishTargetType
 } from '@/constant'
 import { toDateStr } from '@/utils/event'
@@ -83,7 +84,7 @@ export default {
           { type: 'invoke', width: canEdit ? 240 : 80, render: [
             canEdit ? { label: '默认播放', render: ({ isMaster, activate }) => isMaster && activate, on: this.onSetDefaultProgram } : null,
             canEdit ? { label: '素材包绑定', render: ({ isMaster, activate }) => isMaster && activate, on: this.onSetDataset } : null,
-            { label: '查看', render: ({ empty }) => !empty, on: this.onViewDevice }
+            { label: '详情', render: ({ empty }) => !empty, on: this.onViewDevice }
           ].filter(Boolean) }
         ]
       }
@@ -181,10 +182,11 @@ export default {
     },
     onChoosen ({ value, done }) {
       this.$confirm(
-        `设置后需审核生效`,
+        '设置后需审核生效',
         '默认播放设置',
         { type: 'warning' }
       ).then(() => publish(
+        PublishType.DEVICE,
         [this.$device.id],
         {
           type: PublishTargetType.EVENT,

+ 2 - 2
src/views/device/timeline/index.vue

@@ -184,7 +184,7 @@ import {
   getDevices,
   getTimeline
 } from '@/api/device'
-import { EventPriorityDescription } from '@/constant'
+import { EventPriorityInfo } from '@/constant'
 import {
   toDate,
   toDateStr,
@@ -313,7 +313,7 @@ export default {
     transformEvent (event) {
       return {
         ...event,
-        name: event.target.name || EventPriorityDescription[event.priority],
+        name: event.target.name || EventPriorityInfo[event.priority],
         time: getEventDescription(event),
         startDateTime: toDate(event.start),
         endDateTime: toDate(event.until),

+ 7 - 5
src/views/realm/device/settings/components/AdConfigDialog.vue

@@ -6,11 +6,13 @@
   >
     <div class="c-grid-form medium u-align-self--center">
       <span class="c-grid-form__label">自助投放</span>
-      <el-switch
-        v-model="attributes.enable"
-        active-color="#13ce66"
-        inactive-color="#ff4949"
-      />
+      <div class="l-flex--row c-grid-form__option">
+        <el-switch
+          v-model="attributes.enable"
+          active-color="#13ce66"
+          inactive-color="#ff4949"
+        />
+      </div>
       <span class="c-grid-form__label required">开机时间</span>
       <el-time-picker
         v-model="attributes.openTime"

+ 9 - 7
src/views/realm/device/settings/components/AttributeConfigDialog.vue

@@ -12,13 +12,15 @@
         clearable
       />
       <span class="c-grid-form__label">自助二维码</span>
-      <el-switch
-        v-model="attributes.orderQr"
-        active-color="#13ce66"
-        inactive-color="#ff4949"
-        active-value="1"
-        inactive-value="0"
-      />
+      <div class="l-flex--row c-grid-form__option">
+        <el-switch
+          v-model="attributes.orderQr"
+          active-color="#13ce66"
+          inactive-color="#ff4949"
+          active-value="1"
+          inactive-value="0"
+        />
+      </div>
       <span class="c-grid-form__label">二维码宽高</span>
       <el-input-number
         v-model="attributes.orderQrSize"

+ 5 - 5
src/views/screen/deploy/device/index.vue

@@ -143,7 +143,7 @@ import {
   PublishType,
   PublishTargetType,
   EventPriority,
-  EventPriorityDescription
+  EventPriorityInfo
 } from '@/constant'
 
 export default {
@@ -158,10 +158,10 @@ export default {
       selectedDevices: [],
       priority: EventPriority.INSERTED,
       priorityOptions: [
-        { value: EventPriority.SCHEDULING, label: EventPriorityDescription[EventPriority.SCHEDULING] },
-        { value: EventPriority.INSERTED, label: EventPriorityDescription[EventPriority.INSERTED] },
-        { value: EventPriority.EMBEDDED, label: EventPriorityDescription[EventPriority.EMBEDDED] },
-        { value: EventPriority.EMERGENT, label: EventPriorityDescription[EventPriority.EMERGENT] }
+        { value: EventPriority.SCHEDULING, label: EventPriorityInfo[EventPriority.SCHEDULING] },
+        { value: EventPriority.INSERTED, label: EventPriorityInfo[EventPriority.INSERTED] },
+        { value: EventPriority.EMBEDDED, label: EventPriorityInfo[EventPriority.EMBEDDED] },
+        { value: EventPriority.EMERGENT, label: EventPriorityInfo[EventPriority.EMERGENT] }
       ],
       eventOptions: null,
       scheduleSchema: {

+ 5 - 5
src/views/screen/deploy/ratio/index.vue

@@ -129,7 +129,7 @@ import {
   PublishType,
   PublishTargetType,
   EventPriority,
-  EventPriorityDescription
+  EventPriorityInfo
 } from '@/constant'
 import {
   parseTime,
@@ -150,10 +150,10 @@ export default {
     return {
       priority: EventPriority.INSERTED,
       priorityOptions: [
-        { value: EventPriority.SCHEDULING, label: EventPriorityDescription[EventPriority.SCHEDULING] },
-        { value: EventPriority.INSERTED, label: EventPriorityDescription[EventPriority.INSERTED] },
-        { value: EventPriority.EMBEDDED, label: EventPriorityDescription[EventPriority.EMBEDDED] },
-        { value: EventPriority.EMERGENT, label: EventPriorityDescription[EventPriority.EMERGENT] }
+        { value: EventPriority.SCHEDULING, label: EventPriorityInfo[EventPriority.SCHEDULING] },
+        { value: EventPriority.INSERTED, label: EventPriorityInfo[EventPriority.INSERTED] },
+        { value: EventPriority.EMBEDDED, label: EventPriorityInfo[EventPriority.EMBEDDED] },
+        { value: EventPriority.EMERGENT, label: EventPriorityInfo[EventPriority.EMERGENT] }
       ],
       productType: null,
       startDate: null,