|
|
|
|
@ -30,8 +30,10 @@
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
<div class="el-upload__tip" slot="tip">请上传视频,用于启动页显示,比例建议为16: 9</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
<div slot="footer" class="dialog-footer" style="margin-left: 70%;margin-top: 10%">
|
|
|
|
|
<el-button type="primary" @click="handleDelete()">删 除</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane label="介绍页" name="middlePage">
|
|
|
|
|
<div style="height: 600px;" v-for="(item,index) of imagesInfo">
|
|
|
|
|
@ -64,10 +66,10 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="标题" prop="title">
|
|
|
|
|
<el-input v-model="item.title" placeholder="请输入标题" />
|
|
|
|
|
<el-input v-model="item.title" placeholder="请输入标题" maxlength="10" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="介绍文字" prop="content">
|
|
|
|
|
<el-input v-model="item.content" placeholder="请输入介绍文字" />
|
|
|
|
|
<el-input v-model="item.content" placeholder="请输入介绍文字" maxlength="30" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
@ -175,7 +177,12 @@ export default {
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
|
|
title: [
|
|
|
|
|
{ required: true, message: '请输入标题', trigger: 'blur' },
|
|
|
|
|
],
|
|
|
|
|
content: [
|
|
|
|
|
{ required: true, message: '请输入内容', trigger: 'blur' },
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
@ -331,6 +338,10 @@ export default {
|
|
|
|
|
this.form = item;
|
|
|
|
|
this.form.fileSuffix = 'images';
|
|
|
|
|
this.form.type = 1;
|
|
|
|
|
if (!this.form.title || !this.form.content) {
|
|
|
|
|
this.$modal.msgError("标题或者内容不能为空");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updateInfo(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
@ -347,6 +358,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
if(!row && this.videoForm) {
|
|
|
|
|
row = this.videoForm;
|
|
|
|
|
}
|
|
|
|
|
if (!row.id) {
|
|
|
|
|
this.$modal.msgError('目前数据状态不允许删除');
|
|
|
|
|
return;
|
|
|
|
|
@ -357,6 +371,11 @@ export default {
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
if(this.videoForm && this.videoForm.id){
|
|
|
|
|
this.videoForm = {};
|
|
|
|
|
this.$refs["video"].load();
|
|
|
|
|
this.$refs["video"].play();
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
|