Commit 65de0c1f authored by 黄媛媛's avatar 黄媛媛

update

parent 0d6d3488
...@@ -88,8 +88,16 @@ ...@@ -88,8 +88,16 @@
<el-form-item style="display:inline-block;" label="标题" prop="Name"> <el-form-item style="display:inline-block;" label="标题" prop="Name">
<el-input style="width:220px" v-model="addMsg.Name"></el-input> <el-input style="width:220px" v-model="addMsg.Name"></el-input>
</el-form-item> </el-form-item>
<el-form-item style="display:inline-block" label="标签" prop="Name"> <el-form-item style="display:inline-block" label="标签" prop="Label">
<el-input style="width:220px" v-model="addMsg.Label"></el-input> <!-- <el-input style="width:220px" v-model="addMsg.Label"></el-input> -->
<el-select style="width:220px" v-model="addMsg.Label" placeholder="请选择状态">
<el-option label="酒店" value="酒店"></el-option>
<el-option label="景点" value="景点"></el-option>
<el-option label="餐食" value="餐食"></el-option>
<el-option label="交通" value="交通"></el-option>
<el-option label="专辑" value="专辑"></el-option>
<el-option label="其他" value="其他"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item style="display:inline-block" label="状态" prop="VideoStatus"> <el-form-item style="display:inline-block" label="状态" prop="VideoStatus">
<el-select style="width:220px" v-model="addMsg.VideoStatus" placeholder="请选择状态"> <el-select style="width:220px" v-model="addMsg.VideoStatus" placeholder="请选择状态">
...@@ -192,6 +200,9 @@ export default { ...@@ -192,6 +200,9 @@ export default {
Name: [ Name: [
{ required: true, message: '请输入标题', trigger: 'blur' }, { required: true, message: '请输入标题', trigger: 'blur' },
], ],
Label: [
{ required: true, message: '请选择标签', trigger: 'change' }
],
VideoStatus: [ VideoStatus: [
{ required: true, message: '请选择状态', trigger: 'change' } { required: true, message: '请选择状态', trigger: 'change' }
], ],
...@@ -374,6 +385,11 @@ export default { ...@@ -374,6 +385,11 @@ export default {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
let Label=this.addMsg.Label;
if (['酒店','景点','餐食','交通','专辑','其他'].indexOf(Label) == -1) {
this.Error("请选择正确的标签!");
return;
}
if(this.addMsg.VideoAddress==''){ if(this.addMsg.VideoAddress==''){
this.Error("请上传视频!"); this.Error("请上传视频!");
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment