|
|
@@ -42,7 +42,7 @@
|
|
|
@change="onChange"
|
|
|
/>
|
|
|
<template v-if="active > 0">
|
|
|
- <div class="l-flex--col c-sibling-item far c-step__column">
|
|
|
+ <div class="l-flex--col c-sibling-item c-step__column u-width">
|
|
|
<div class="l-flex__none c-sibling-item--v u-font-size--sm u-bold">设备</div>
|
|
|
<div class="l-flex__fill c-sibling-item--v near u-overflow-y--auto">
|
|
|
<div
|
|
|
@@ -54,48 +54,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-if="isCalendar"
|
|
|
- class="l-flex__fill l-flex--col c-step__column"
|
|
|
- >
|
|
|
- <div class="c-sibling-item--v has-bottom-padding--sm has-bottom-border">
|
|
|
- <div class="c-sibling-item--v u-font-size--sm u-bold">上播类型</div>
|
|
|
- <div class="l-flex--row c-sibling-item--v near">
|
|
|
- <el-select
|
|
|
- v-model="eventOptions.type"
|
|
|
- class="c-sibling-item"
|
|
|
- @change="onChangeType"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="option in typeOptions"
|
|
|
- :key="option.value"
|
|
|
- :label="option.label"
|
|
|
- :value="option.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- <div
|
|
|
- class="l-flex--row c-sibling-item far has-active u-ellipsis"
|
|
|
- @click="onView"
|
|
|
- >
|
|
|
- {{ currentTarget }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <schema-table
|
|
|
- class="c-sibling-item--v"
|
|
|
- :schema="schema"
|
|
|
- row-key="id"
|
|
|
- :current-row-key="selectedId"
|
|
|
- highlight-current-row
|
|
|
- @row-click="onClickRow"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="l-flex__none l-flex--col c-step__column large">
|
|
|
+ <div class="l-flex__none l-flex--col c-step__column u-width--lg">
|
|
|
<div class="c-sibling-item--v u-font-size--sm u-bold">上播配置</div>
|
|
|
- <div class="c-sibling-item--v u-font-size--sm">上播类型</div>
|
|
|
+ <div class="c-sibling-item--v near u-font-size--sm">上播类型</div>
|
|
|
<el-select
|
|
|
v-model="eventOptions.type"
|
|
|
- class="c-sibling-item--v near u-width--sm"
|
|
|
+ class="c-sibling-item--v nearer u-width--sm"
|
|
|
@change="onChangeType"
|
|
|
>
|
|
|
<el-option
|
|
|
@@ -106,10 +70,10 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
<template v-if="!isDefaultPlayback">
|
|
|
- <div class="c-sibling-item--v u-font-size--sm">优先级</div>
|
|
|
+ <div class="c-sibling-item--v near u-font-size--sm">优先级</div>
|
|
|
<el-select
|
|
|
v-model="priority"
|
|
|
- class="c-sibling-item--v near u-width--sm"
|
|
|
+ class="c-sibling-item--v nearer u-width--sm"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="option in priorityOptions"
|
|
|
@@ -119,7 +83,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
- <div class="c-sibling-item--v">
|
|
|
+ <div class="c-sibling-item--v near">
|
|
|
<div
|
|
|
class="l-flex--row inline u-font-size--sm has-active"
|
|
|
@click="onAddEvent"
|
|
|
@@ -130,7 +94,7 @@
|
|
|
</div>
|
|
|
<schema-table
|
|
|
ref="timeTable"
|
|
|
- class="c-sibling-item--v near"
|
|
|
+ class="c-sibling-item--v nearer sm"
|
|
|
:schema="timeSchema"
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -167,8 +131,6 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- State,
|
|
|
- ScheduleType,
|
|
|
EventTarget,
|
|
|
EventTargetInfo,
|
|
|
PublishType,
|
|
|
@@ -182,7 +144,6 @@ import {
|
|
|
getConflict,
|
|
|
getEventDescription
|
|
|
} from '@/utils/event'
|
|
|
-import { getSchedules } from '@/api/calendar'
|
|
|
import { publish } from '@/api/platform'
|
|
|
import EventFrequencyConfigDialog from '../components/EventFrequencyConfigDialog.vue'
|
|
|
|
|
|
@@ -208,28 +169,8 @@ export default {
|
|
|
eventOptions: null,
|
|
|
typeOptions: [
|
|
|
{ value: PublishTargetType.EVENT, label: '事件' },
|
|
|
- // { value: PublishTargetType.CALENDAR, label: '排期' },
|
|
|
{ value: DEFAULT_PLAYBACK, label: '默认播放' }
|
|
|
],
|
|
|
- schema: {
|
|
|
- list: getSchedules,
|
|
|
- condition: { type: ScheduleType.COMPLEX, status: State.AVAILABLE },
|
|
|
- filters: [
|
|
|
- { key: 'name', type: 'search', placeholder: '名称' }
|
|
|
- ],
|
|
|
- cols: [
|
|
|
- { render: ({ id }, h) => h(
|
|
|
- 'span',
|
|
|
- { staticClass: `el-radio__input ${id === this.selectedId ? 'is-checked' : ''}` },
|
|
|
- [h('span', { staticClass: 'el-radio__inner' })]
|
|
|
- ), width: 60, align: 'center' },
|
|
|
- { prop: 'name', label: '名称' },
|
|
|
- { prop: 'resolutionRatio', label: '分辨率' },
|
|
|
- { type: 'invoke', render: [
|
|
|
- { label: '查看', on: this.onView }
|
|
|
- ] }
|
|
|
- ]
|
|
|
- },
|
|
|
timeSchema: {
|
|
|
nonPagination: true,
|
|
|
props: {
|
|
|
@@ -253,29 +194,15 @@ export default {
|
|
|
switch (this.active) {
|
|
|
case 0:
|
|
|
return this.selectedDevices.length === 0
|
|
|
- case 1:
|
|
|
- return this.isCalendar ? !this.selectedId : false
|
|
|
default:
|
|
|
return false
|
|
|
}
|
|
|
},
|
|
|
- isCalendar () {
|
|
|
- return this.eventOptions?.type === PublishTargetType.CALENDAR
|
|
|
- },
|
|
|
- isEvent () {
|
|
|
- return this.eventOptions?.type === PublishTargetType.EVENT
|
|
|
- },
|
|
|
isDefaultPlayback () {
|
|
|
return this.eventOptions?.type === DEFAULT_PLAYBACK
|
|
|
},
|
|
|
btnMsg () {
|
|
|
return this.active < 1 ? '下一步' : '发布'
|
|
|
- },
|
|
|
- selectedId () {
|
|
|
- return this.eventOptions?.target?.id
|
|
|
- },
|
|
|
- currentTarget () {
|
|
|
- return this.eventOptions?.target?.name
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -346,9 +273,6 @@ export default {
|
|
|
onChangeType (type) {
|
|
|
this.eventOptions = this.createEventOptions(type)
|
|
|
},
|
|
|
- onClickRow (row) {
|
|
|
- this.eventOptions.target = row
|
|
|
- },
|
|
|
onView ({ id }) {
|
|
|
this.$refs.materialDialog.showSchedule(id)
|
|
|
},
|
|
|
@@ -424,18 +348,6 @@ export default {
|
|
|
})
|
|
|
return Promise.reject('invalid event, no time')
|
|
|
}
|
|
|
- if (this.isCalendar) {
|
|
|
- const { id, name, resolutionRatio } = this.eventOptions.target
|
|
|
- return Promise.resolve({
|
|
|
- publishType: PublishType.PROGRAM_TO_DEVICE,
|
|
|
- targetList: [{
|
|
|
- type: PublishTargetType.CALENDAR,
|
|
|
- detail: id
|
|
|
- }],
|
|
|
- name,
|
|
|
- resolutionRatio
|
|
|
- })
|
|
|
- }
|
|
|
const eventTarget = this.$refs.eventTargetPicker.getValue()
|
|
|
if (!eventTarget) {
|
|
|
return Promise.reject('invalid event, no target')
|