|
|
@@ -296,16 +296,40 @@
|
|
|
<i class="el-icon-warning"/>
|
|
|
<span style="color: rgb(153, 169, 191)"> 不配置将使用课程默认图片</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="风格模板" prop="templateId">
|
|
|
- <el-select v-model="configDialog.form.templateId" placeholder="请选择模板">
|
|
|
+<!-- <el-form-item label="风格模板" prop="templateId">-->
|
|
|
+<!-- <el-select v-model="configDialog.form.templateId" placeholder="请选择模板">-->
|
|
|
+<!-- <el-option-->
|
|
|
+<!-- v-for="item in configDialog.templateList"-->
|
|
|
+<!-- :key="item.key"-->
|
|
|
+<!-- :label="item.value"-->
|
|
|
+<!-- :value="item.key">-->
|
|
|
+<!-- </el-option>-->
|
|
|
+<!-- </el-select>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+ <!-- 添加三个图片上传组件 -->
|
|
|
+ <el-form-item label="Home图标" prop="home">
|
|
|
+ <ImageUpload v-model="configDialog.form.home" :height="150" :limit="1" :width="150" type="image"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="星星图标" prop="start">
|
|
|
+ <ImageUpload v-model="configDialog.form.start" :height="150" :limit="1" :width="150" type="image"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="背景图" prop="bg">
|
|
|
+ <ImageUpload v-model="configDialog.form.bg" :height="150" :limit="1" :width="150" type="image"/>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 添加字体样式下拉框 -->
|
|
|
+ <el-form-item label="字体样式" prop="frontStyle">
|
|
|
+ <el-select v-model="configDialog.form.frontStyle" placeholder="请选择字体样式">
|
|
|
<el-option
|
|
|
- v-for="item in configDialog.templateList"
|
|
|
- :key="item.key"
|
|
|
- :label="item.value"
|
|
|
- :value="item.key">
|
|
|
+ v-for="item in frontStyleOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="首播电视台" prop="tvEnable">
|
|
|
<el-switch v-model="configDialog.form.tvEnable" active-color="#13ce66"/>
|
|
|
</el-form-item>
|
|
|
@@ -528,6 +552,7 @@ export default {
|
|
|
{required: true, message: "红包金额不能为空", trigger: "blur"}
|
|
|
],
|
|
|
},
|
|
|
+ frontStyleOptions: [], // 字体样式选项
|
|
|
configDialog: {
|
|
|
dialogVisible: false,
|
|
|
updating: false,
|
|
|
@@ -542,7 +567,11 @@ export default {
|
|
|
form: {
|
|
|
id: null,
|
|
|
coverImg: null,
|
|
|
- templateId: null,
|
|
|
+ // templateId: null,
|
|
|
+ frontStyle: null, // 字体样式字段
|
|
|
+ home: null, // 添加home图片字段
|
|
|
+ start: null, // 添加start图片字段
|
|
|
+ bg: null, // 添加bg图片字段
|
|
|
tvEnable: 0,
|
|
|
tv: null,
|
|
|
networkEnable: 0,
|
|
|
@@ -555,8 +584,20 @@ export default {
|
|
|
support: null
|
|
|
},
|
|
|
rules: {
|
|
|
- templateId: [
|
|
|
- { required: true, message: '模板名称不能为空', trigger: 'blur' }
|
|
|
+ // templateId: [
|
|
|
+ // { required: true, message: '模板名称不能为空', trigger: 'blur' }
|
|
|
+ // ],
|
|
|
+ home: [
|
|
|
+ { required: true, message: '首页图标不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ start: [
|
|
|
+ { required: true, message: '星星图标不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ bg: [
|
|
|
+ { required: true, message: '背景图片不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ frontStyle: [
|
|
|
+ { required: true, message: '字体样式不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
tv: [
|
|
|
{ required: true, message: '首播电视台不能为空', trigger: 'blur' }
|
|
|
@@ -579,6 +620,9 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
+ this.getDicts("course_front_style").then(response => {
|
|
|
+ this.frontStyleOptions = response.data;
|
|
|
+ });
|
|
|
getCatePidList().then(response => {
|
|
|
this.categoryOptions = response.data;
|
|
|
});
|
|
|
@@ -936,7 +980,11 @@ export default {
|
|
|
const defaultForm = {
|
|
|
id: null,
|
|
|
coverImg: null,
|
|
|
- templateId: null,
|
|
|
+ // templateId: null,
|
|
|
+ frontStyle: null, // 字体样式字段
|
|
|
+ home: null, // 添加home默认值
|
|
|
+ start: null, // 添加start默认值
|
|
|
+ bg: null, // 添加bg默认值
|
|
|
tvEnable: 0,
|
|
|
tv: null,
|
|
|
networkEnable: 0,
|
|
|
@@ -962,6 +1010,7 @@ export default {
|
|
|
...defaultForm,
|
|
|
...parsedConfig,
|
|
|
id: row.courseId,
|
|
|
+ frontStyle: parsedConfig.frontStyle || null,
|
|
|
}
|
|
|
this.configDialog.dialogVisible = true;
|
|
|
this.configDialog.updating = false
|
|
|
@@ -980,7 +1029,10 @@ export default {
|
|
|
|
|
|
const content = {
|
|
|
coverImg: this.configDialog.form.coverImg,
|
|
|
- templateId: this.configDialog.form.templateId,
|
|
|
+ frontStyle: this.configDialog.form.frontStyle,
|
|
|
+ home: this.configDialog.form.home, // 添加home字段
|
|
|
+ start: this.configDialog.form.start, // 添加start字段
|
|
|
+ bg: this.configDialog.form.bg, // 添加bg字段
|
|
|
tvEnable: this.configDialog.form.tvEnable,
|
|
|
tv: this.configDialog.form.tv?.replace(",",","),
|
|
|
networkEnable: this.configDialog.form.networkEnable,
|
|
|
@@ -1014,6 +1066,10 @@ export default {
|
|
|
id: null,
|
|
|
coverImg: null,
|
|
|
templateId: null,
|
|
|
+ frontStyle: null,
|
|
|
+ home: null, // 重置home字段
|
|
|
+ start: null, // 重置start字段
|
|
|
+ bg: null, // 重置bg字段
|
|
|
tvEnable: 0,
|
|
|
tv: null,
|
|
|
networkEnable: 0,
|