|
|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div
|
|
|
- class="c-event"
|
|
|
+ class="c-grid-form medium c-event"
|
|
|
:class="{ row: !vertical, col: vertical }"
|
|
|
>
|
|
|
- <div class="c-event__section">
|
|
|
- <div class="c-event__label">播放频率</div>
|
|
|
+ <div class="c-grid-form__label">播放频率</div>
|
|
|
+ <div>
|
|
|
<el-select
|
|
|
v-model="eventOptions.freq"
|
|
|
class="c-event__option"
|
|
|
@@ -18,99 +18,85 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<template v-if="isOnce">
|
|
|
- <div class="c-event__section">
|
|
|
- <div class="c-event__label required">生效时间</div>
|
|
|
- <el-date-picker
|
|
|
- v-model="eventOptions.start"
|
|
|
- class="c-event__option"
|
|
|
- type="datetime"
|
|
|
- placeholder="选择生效时间"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- :picker-options="pickerOptions"
|
|
|
- @change="onDateTimeChange('start')"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="c-event__section">
|
|
|
- <div class="c-event__label">失效时间</div>
|
|
|
- <el-date-picker
|
|
|
- v-model="eventOptions.until"
|
|
|
- class="c-event__option"
|
|
|
- type="datetime"
|
|
|
- :disabled="!eventOptions.start"
|
|
|
- placeholder="选择失效时间"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- :default-value="eventOptions.start"
|
|
|
- :picker-options="endPickerOptions"
|
|
|
- @change="onDateTimeChange('until')"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <div class="c-grid-form__label required">生效时间</div>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="eventOptions.start"
|
|
|
+ class="c-event__option"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择生效时间"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ @change="onDateTimeChange('start')"
|
|
|
+ />
|
|
|
+ <div class="c-grid-form__label">失效时间</div>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="eventOptions.until"
|
|
|
+ class="c-event__option"
|
|
|
+ type="datetime"
|
|
|
+ :disabled="!eventOptions.start"
|
|
|
+ placeholder="选择失效时间"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :default-value="eventOptions.start"
|
|
|
+ :picker-options="endPickerOptions"
|
|
|
+ @change="onDateTimeChange('until')"
|
|
|
+ />
|
|
|
</template>
|
|
|
<template v-if="isWeekly">
|
|
|
- <div class="c-event__section">
|
|
|
- <div class="c-event__label required">每周</div>
|
|
|
- <el-checkbox-group
|
|
|
- v-model="eventOptions.byDay"
|
|
|
- class="c-event__option"
|
|
|
- size="mini"
|
|
|
- fill="#1c5cb0"
|
|
|
+ <div class="c-grid-form__label c-grid-form__auto required">每周</div>
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="eventOptions.byDay"
|
|
|
+ class="c-grid-form__auto l-flex--row c-event__option"
|
|
|
+ size="mini"
|
|
|
+ fill="#1c5cb0"
|
|
|
+ >
|
|
|
+ <el-checkbox-button
|
|
|
+ v-for="week in weeks"
|
|
|
+ :key="week.value"
|
|
|
+ :label="week.value"
|
|
|
>
|
|
|
- <el-checkbox-button
|
|
|
- v-for="week in weeks"
|
|
|
- :key="week.value"
|
|
|
- :label="week.value"
|
|
|
- >
|
|
|
- {{ week.label }}
|
|
|
- </el-checkbox-button>
|
|
|
- </el-checkbox-group>
|
|
|
- </div>
|
|
|
- <div class="c-event__section">
|
|
|
- <div class="c-event__label required">开始时间</div>
|
|
|
- <el-time-picker
|
|
|
- v-model="eventOptions.startTime"
|
|
|
- class="c-event__option"
|
|
|
- placeholder="选择开始时间"
|
|
|
- value-format="HH:mm:ss"
|
|
|
- :clearable="false"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="c-event__section">
|
|
|
- <div class="c-event__label required">结束时间</div>
|
|
|
- <el-time-picker
|
|
|
- v-model="eventOptions.endTime"
|
|
|
- class="c-event__option"
|
|
|
- placeholder="选择结束时间"
|
|
|
- value-format="HH:mm:ss"
|
|
|
- :clearable="false"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="c-event__section c-event__tip">结束时间小于等于开始时间为跨天播放</div>
|
|
|
- <div class="c-event__section">
|
|
|
- <div class="c-event__label required">生效日期</div>
|
|
|
- <el-date-picker
|
|
|
- v-model="eventOptions.start"
|
|
|
- class="c-event__option"
|
|
|
- type="date"
|
|
|
- placeholder="选择生效日期"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- :picker-options="pickerOptions"
|
|
|
- @change="onDateTimeChange('start')"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="c-event__section">
|
|
|
- <div class="c-event__label">失效日期</div>
|
|
|
- <el-date-picker
|
|
|
- v-model="eventOptions.until"
|
|
|
- class="c-event__option"
|
|
|
- type="date"
|
|
|
- :disabled="!eventOptions.start"
|
|
|
- placeholder="选择失效日期"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- :default-value="eventOptions.start"
|
|
|
- :picker-options="endPickerOptions"
|
|
|
- @change="onDateTimeChange('until')"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="c-event__section c-event__tip">失效日期当天不触发</div>
|
|
|
+ {{ week.label }}
|
|
|
+ </el-checkbox-button>
|
|
|
+ </el-checkbox-group>
|
|
|
+ <div class="c-grid-form__label required">开始时间</div>
|
|
|
+ <el-time-picker
|
|
|
+ v-model="eventOptions.startTime"
|
|
|
+ class="c-event__option"
|
|
|
+ placeholder="选择开始时间"
|
|
|
+ value-format="HH:mm:ss"
|
|
|
+ :clearable="false"
|
|
|
+ />
|
|
|
+ <div class="c-grid-form__label required">结束时间</div>
|
|
|
+ <el-time-picker
|
|
|
+ v-model="eventOptions.endTime"
|
|
|
+ class="c-grid-form__info c-event__option"
|
|
|
+ data-info="结束时间小于等于开始时间为跨天播放"
|
|
|
+ placeholder="选择结束时间"
|
|
|
+ value-format="HH:mm:ss"
|
|
|
+ :clearable="false"
|
|
|
+ />
|
|
|
+ <div class="c-grid-form__label required">生效日期</div>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="eventOptions.start"
|
|
|
+ class="c-event__option"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择生效日期"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ @change="onDateTimeChange('start')"
|
|
|
+ />
|
|
|
+ <div class="c-grid-form__label">失效日期</div>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="eventOptions.until"
|
|
|
+ class="c-grid-form__info c-event__option"
|
|
|
+ data-info="失效日期当天不触发"
|
|
|
+ type="date"
|
|
|
+ :disabled="!eventOptions.start"
|
|
|
+ placeholder="选择失效日期"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :default-value="eventOptions.start"
|
|
|
+ :picker-options="endPickerOptions"
|
|
|
+ @change="onDateTimeChange('until')"
|
|
|
+ />
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -299,67 +285,8 @@ export default {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.c-event {
|
|
|
- display: inline-flex;
|
|
|
- flex-direction: column;
|
|
|
- max-width: 100%;
|
|
|
-
|
|
|
- &__section {
|
|
|
- align-self: stretch;
|
|
|
- color: $black;
|
|
|
-
|
|
|
- & + & {
|
|
|
- margin-top: $spacing;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- &__label {
|
|
|
- margin-bottom: 8px;
|
|
|
- font-size: 14px;
|
|
|
- line-height: 1;
|
|
|
- font-weight: bold;
|
|
|
-
|
|
|
- &.required::before {
|
|
|
- content: "*";
|
|
|
- color: #ff0000;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- &__tip {
|
|
|
- margin-top: 0 !important;
|
|
|
- color: $info;
|
|
|
- font-size: 12px;
|
|
|
- }
|
|
|
-
|
|
|
- &.row {
|
|
|
- .c-event__section {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
-
|
|
|
- .c-event__label {
|
|
|
- flex: none;
|
|
|
- margin: 0 10px 0 0;
|
|
|
- width: 80px;
|
|
|
- text-align: right;
|
|
|
- &::after {
|
|
|
- content: ":";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .c-event__option {
|
|
|
- flex: 1 1 auto;
|
|
|
- min-width: 300px;
|
|
|
- }
|
|
|
-
|
|
|
- .c-event__tip {
|
|
|
- padding-left: 90px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- &.col {
|
|
|
- .c-event__label {
|
|
|
- margin-bottom: 8px;
|
|
|
- }
|
|
|
+ &.row &__option {
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
}
|
|
|
</style>
|