|
@@ -1,15 +1,15 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-form :model="setting" :label-position="labelPosition" label-width="72px">
|
|
|
+ <el-form :model="property" :label-position="labelPosition" label-width="72px">
|
|
|
<el-form-item label="序号" class="serial-number">
|
|
|
- <el-input v-model="setting.serialNumber" />
|
|
|
- <SvgIcon icon-class="switch" size="14" />
|
|
|
+ <el-input v-model="property.serial_number" />
|
|
|
+ <SvgIcon icon-class="switch" size="14" @click="switchSerialNumber(property.serial_number)" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-radio
|
|
|
- v-for="{ value, label } in serialNumberTypeList"
|
|
|
+ v-for="{ value, label } in snGenerationMethodList"
|
|
|
:key="value"
|
|
|
- v-model="setting.other.serial_number_type"
|
|
|
+ v-model="property.sn_generation_method"
|
|
|
:label="value"
|
|
|
>
|
|
|
{{ label }}
|
|
@@ -19,58 +19,58 @@
|
|
|
<div class="grid-container">
|
|
|
<div class="top">
|
|
|
<el-button
|
|
|
- :class="['top-start', { active: 'top-start' === setting.numberPosition }]"
|
|
|
+ :class="['top-start', { active: 'top-start' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('top-start')"
|
|
|
/>
|
|
|
<el-button
|
|
|
- :class="['top', { active: 'top' === setting.numberPosition }]"
|
|
|
+ :class="['top', { active: 'top' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('top')"
|
|
|
/>
|
|
|
<el-button
|
|
|
- :class="['top-end', { active: 'top-end' === setting.numberPosition }]"
|
|
|
+ :class="['top-end', { active: 'top-end' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('top-end')"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="left">
|
|
|
<el-button
|
|
|
- :class="['left-start', { active: 'left-start' === setting.numberPosition }]"
|
|
|
+ :class="['left-start', { active: 'left-start' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('left-start')"
|
|
|
/>
|
|
|
<el-button
|
|
|
- :class="['left', { active: 'left' === setting.numberPosition }]"
|
|
|
+ :class="['left', { active: 'left' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('left')"
|
|
|
/>
|
|
|
<el-button
|
|
|
- :class="['left-end', { active: 'left-end' === setting.numberPosition }]"
|
|
|
+ :class="['left-end', { active: 'left-end' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('left-end')"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="main"></div>
|
|
|
<div class="right">
|
|
|
<el-button
|
|
|
- :class="['right-start', { active: 'right-start' === setting.numberPosition }]"
|
|
|
+ :class="['right-start', { active: 'right-start' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('right-start')"
|
|
|
/>
|
|
|
<el-button
|
|
|
- :class="['right', { active: 'right' === setting.numberPosition }]"
|
|
|
+ :class="['right', { active: 'right' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('right')"
|
|
|
/>
|
|
|
<el-button
|
|
|
- :class="['right-end', { active: 'right-end' === setting.numberPosition }]"
|
|
|
+ :class="['right-end', { active: 'right-end' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('right-end')"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<el-button
|
|
|
- :class="['bottom-start', { active: 'bottom-start' === setting.numberPosition }]"
|
|
|
+ :class="['bottom-start', { active: 'bottom-start' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('bottom-start')"
|
|
|
/>
|
|
|
<el-button
|
|
|
- :class="['bottom', { active: 'bottom' === setting.numberPosition }]"
|
|
|
+ :class="['bottom', { active: 'bottom' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('bottom')"
|
|
|
/>
|
|
|
<el-button
|
|
|
- :class="['bottom-end', { active: 'bottom-end' === setting.numberPosition }]"
|
|
|
+ :class="['bottom-end', { active: 'bottom-end' === property.sn_position }]"
|
|
|
@click="changeNumberPosition('bottom-end')"
|
|
|
/>
|
|
|
</div>
|
|
@@ -79,9 +79,9 @@
|
|
|
<el-divider />
|
|
|
<el-form-item label="查看方式">
|
|
|
<el-radio
|
|
|
- v-for="{ value, label } in audioViewingMethodsList"
|
|
|
+ v-for="{ value, label } in audioViewMethodList"
|
|
|
:key="value"
|
|
|
- v-model="setting.audioViewingMethods"
|
|
|
+ v-model="property.view_method"
|
|
|
:label="value"
|
|
|
>
|
|
|
{{ label }}
|
|
@@ -93,24 +93,22 @@
|
|
|
|
|
|
<script>
|
|
|
import SettingMixin from '@/views/book/courseware/create/components/common/SettingMixin';
|
|
|
-import { serialNumberTypeList, audioViewingMethodsList } from '@/views/book/courseware/data/common';
|
|
|
+import { snGenerationMethodList, audioViewMethodList, switchSerialNumber } from '@/views/book/courseware/data/common';
|
|
|
|
|
|
export default {
|
|
|
name: 'AudioSetting',
|
|
|
mixins: [SettingMixin],
|
|
|
data() {
|
|
|
return {
|
|
|
- serialNumberTypeList,
|
|
|
- audioViewingMethodsList,
|
|
|
+ switchSerialNumber,
|
|
|
+ snGenerationMethodList,
|
|
|
+ audioViewMethodList,
|
|
|
labelPosition: 'left',
|
|
|
- setting: {
|
|
|
- serialNumber: 1, // 序号
|
|
|
- numberPosition: 'top-start', // 序号位置
|
|
|
- audioViewingMethods: audioViewingMethodsList[0].value, // 查看方式
|
|
|
- // 其他属性
|
|
|
- other: {
|
|
|
- serial_number_type: serialNumberTypeList[0].value, // 题号类型
|
|
|
- },
|
|
|
+ property: {
|
|
|
+ serial_number: 1, // 序号
|
|
|
+ sn_position: 'top-start', // 序号位置:top-start top top-end 等
|
|
|
+ sn_generation_method: snGenerationMethodList[0].value, // 序号生成方式:recalculate 重新计算follow 跟随
|
|
|
+ view_method: audioViewMethodList[0].value, // 查看方式:independent 独立 list 列表icon 图标
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -127,19 +125,19 @@ export default {
|
|
|
methods: {
|
|
|
/**
|
|
|
* @description 设置属性
|
|
|
- * @param {Object} setting 属性
|
|
|
+ * @param {Object} property 属性
|
|
|
*/
|
|
|
- setSetting(setting) {
|
|
|
+ setSetting(property) {
|
|
|
this.isSet = true;
|
|
|
- this.setting = setting;
|
|
|
+ this.property = property;
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* @description 改变序号位置
|
|
|
- * @param {String} numberPosition
|
|
|
+ * @param {String} sn_position
|
|
|
*/
|
|
|
- changeNumberPosition(numberPosition) {
|
|
|
- this.setting.numberPosition = numberPosition;
|
|
|
+ changeNumberPosition(sn_position) {
|
|
|
+ this.property.sn_position = sn_position;
|
|
|
},
|
|
|
},
|
|
|
};
|