|
@@ -5,7 +5,7 @@
|
|
|
:show-close="false"
|
|
|
:close-on-click-modal="false"
|
|
|
:visible.sync="isShow"
|
|
|
- :title="curObj.id ? '编辑房源' : '新增房源'"
|
|
|
+ :title="curObj.id ? '编辑短视频' : '新增短视频'"
|
|
|
:fullscreen="false"
|
|
|
width="760px"
|
|
|
custom-class="xl-dialog"
|
|
@@ -59,6 +59,15 @@ export default {
|
|
|
params = {...this.$refs.ruleForm.baseForm, ...params}
|
|
|
}
|
|
|
if (!params.hide_status) params.hide_status = '1'
|
|
|
+ const remoteOptionsIds = []
|
|
|
+ if (params.estate_list) {
|
|
|
+ params.estate_id_list = params.estate_list.map(item => {
|
|
|
+ remoteOptionsIds.push({ keyRO: item.estate_name, valRO: item.id })
|
|
|
+ return item.id
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ params.estate_id_list = []
|
|
|
+ }
|
|
|
this.formData = [
|
|
|
{ label: '发布时间', key: 'publish_at', type: 'datePicker', type2: 'date', rules: 1},
|
|
|
{ label: '标题', key: 'title', rules: 1},
|
|
@@ -72,6 +81,10 @@ export default {
|
|
|
},
|
|
|
{ label: '自定义标签', class: 'c-2', key: 'custom_tag', type: 'textarea' },
|
|
|
{ label: '视频ID', rules: 1, key: 'feed_id', type: 'textarea' },
|
|
|
+ { label: '关联楼盘', key: 'estate_id_list', type: 'selectRemote', multiple: true, changeHandle: this.deviceChange,
|
|
|
+ remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
|
|
|
+ remoteOptions: remoteOptionsIds
|
|
|
+ },
|
|
|
]
|
|
|
this.setDefaultValue(params)
|
|
|
},
|
|
@@ -85,6 +98,11 @@ export default {
|
|
|
newForm.custom_tag = newForm.custom_tag.replace(/,|、|\/|\\/g, ',')
|
|
|
let apiStr = 'admchannelsadd'
|
|
|
if (this.curObj.id) apiStr = 'admchannelsedit'
|
|
|
+ if (newForm.estate_id_list && newForm.estate_id_list.length > 0) {
|
|
|
+ newForm.estate_id_list = newForm.estate_id_list.join(',')
|
|
|
+ } else {
|
|
|
+ newForm.estate_id_list = ''
|
|
|
+ }
|
|
|
this.$api.other[apiStr](newForm).then(data => {
|
|
|
this.$msgs(newForm.id ? '编辑成功' : '新增成功')
|
|
|
this.cObj = {}
|