|
@@ -88,23 +88,6 @@
|
|
|
</template>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- prop="video_type_id"
|
|
|
- :rules="formRules.select"
|
|
|
- label="类别:">
|
|
|
- <el-select
|
|
|
- style="width: 100%;"
|
|
|
- v-model="form.video_type_id"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- placeholder="请选择类别">
|
|
|
- <el-option
|
|
|
- :label="item.name"
|
|
|
- :value="item.value"
|
|
|
- v-for="item in arrVideoType"
|
|
|
- :key="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
<el-form-item
|
|
|
prop="video_auther"
|
|
|
:rules="formRules.required"
|
|
@@ -197,8 +180,6 @@ export default {
|
|
|
'video_introduce': '', // 视频简介
|
|
|
'video_cover_url': [], // 封面地址
|
|
|
'video_url': [], // 视频地址
|
|
|
- 'video_type_id': '', // 类别ID
|
|
|
- 'video_type_name': '', // 类别名称
|
|
|
'video_auther': '', // 出境人
|
|
|
'lunbo_status': '0', // 置顶推荐(0否1是)
|
|
|
'video_status': '0' // 视频状态 0隐藏 1显示
|
|
@@ -208,11 +189,6 @@ export default {
|
|
|
booLock: false
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- arrVideoType() {
|
|
|
- return this.$store.state.common.arrVideoType
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
beforeAvatarUpload(file) {
|
|
|
const isLt2M = file.size / 1024 / 1024 < 5
|
|
@@ -247,12 +223,10 @@ export default {
|
|
|
this.$refs.form.validate(async valid => {
|
|
|
if (valid) {
|
|
|
const formData = JSON.parse(JSON.stringify(this.form))
|
|
|
- const videoTypeIdIndex = this.arrVideoType.findIndex(item => item.value === formData.video_type_id)
|
|
|
const postData = {
|
|
|
...formData,
|
|
|
video_cover_url: formData.video_cover_url[0],
|
|
|
- video_url: formData.video_url[0],
|
|
|
- video_type_name: videoTypeIdIndex > -1 ? this.arrVideoType[videoTypeIdIndex].name : ''
|
|
|
+ video_url: formData.video_url[0]
|
|
|
}
|
|
|
this.booLock = true
|
|
|
const data = await this.$fetch(url, postData)
|