|
@@ -6,26 +6,14 @@
|
|
|
>
|
|
>
|
|
|
<el-form v-loading="isLoading" :model="form" label-width="100px" label-position="top">
|
|
<el-form v-loading="isLoading" :model="form" label-width="100px" label-position="top">
|
|
|
<el-row :gutter="24">
|
|
<el-row :gutter="24">
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="点位类型">
|
|
|
|
|
- <el-select v-model="form.dataType" placeholder="请选择" clearable @change="onDataTypeChange">
|
|
|
|
|
- <el-option label="场馆" value="VENUE" />
|
|
|
|
|
- <el-option label="景区" value="SCENERY" />
|
|
|
|
|
- <el-option label="度假村" value="HOLIDAY_VILLAGE" />
|
|
|
|
|
- <el-option label="酒店" value="HOTEL" />
|
|
|
|
|
- <el-option label="民宿" value="HOME_STAY" />
|
|
|
|
|
- <el-option label="旅行社" value="TOURIST" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
<el-col :span="16">
|
|
<el-col :span="16">
|
|
|
<el-form-item label="点位分布">
|
|
<el-form-item label="点位分布">
|
|
|
- <select-base-bz-data v-model="form.bzId" :multiple="false" :data-type="form.dataType" :disabled="disabledSelectBz" />
|
|
|
|
|
|
|
+ <select-base-info-data v-model="form.placeBaseInfoId" :multiple="false" :data-type="form.placeBaseInfoId"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-form-item label="说明">
|
|
<el-form-item label="说明">
|
|
|
- <el-input v-model="form.brief" />
|
|
|
|
|
|
|
+ <el-input v-model="form.brief"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="图片">
|
|
<el-form-item label="图片">
|
|
|
<el-upload
|
|
<el-upload
|
|
@@ -38,7 +26,7 @@
|
|
|
:on-remove="handleRemove"
|
|
:on-remove="handleRemove"
|
|
|
:auto-upload="true"
|
|
:auto-upload="true"
|
|
|
>
|
|
>
|
|
|
- <i slot="default" class="el-icon-plus" />
|
|
|
|
|
|
|
+ <i slot="default" class="el-icon-plus"/>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -52,11 +40,11 @@
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
|
|
import { uploaderHandle } from '@/api/upload'
|
|
import { uploaderHandle } from '@/api/upload'
|
|
|
-import SelectBaseBzData from '@/components/SelectBaseBzData'
|
|
|
|
|
|
|
+import SelectBaseInfoData from '@/components/SelectBaseInfoData'
|
|
|
import { save, updateById } from '@/api/place/passenger_equipment'
|
|
import { save, updateById } from '@/api/place/passenger_equipment'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- components: { SelectBaseBzData },
|
|
|
|
|
|
|
+ components: { SelectBaseInfoData },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
visible: false,
|
|
visible: false,
|
|
@@ -66,18 +54,11 @@ export default {
|
|
|
fileList: []
|
|
fileList: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- computed: {
|
|
|
|
|
- disabledSelectBz: function() {
|
|
|
|
|
- return !this.form || !this.form.dataType || this.form.dataType === ''
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ computed: {},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
uploaderHandle,
|
|
uploaderHandle,
|
|
|
- onDataTypeChange() {
|
|
|
|
|
- this.form.bzId = ''
|
|
|
|
|
- },
|
|
|
|
|
handleRemove(file, fileList) {
|
|
handleRemove(file, fileList) {
|
|
|
this.fileList = fileList
|
|
this.fileList = fileList
|
|
|
},
|
|
},
|
|
@@ -90,7 +71,7 @@ export default {
|
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
|
this.fileList = []
|
|
this.fileList = []
|
|
|
this.form = {}
|
|
this.form = {}
|
|
|
- if (data) {
|
|
|
|
|
|
|
+ if (data && data.id) {
|
|
|
if (data.litpics) {
|
|
if (data.litpics) {
|
|
|
data.litpics.forEach(o => {
|
|
data.litpics.forEach(o => {
|
|
|
this.fileList.push({ url: o })
|
|
this.fileList.push({ url: o })
|
|
@@ -101,13 +82,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
handleSubmit() {
|
|
handleSubmit() {
|
|
|
const litpics = []
|
|
const litpics = []
|
|
|
- console.log(this.fileList)
|
|
|
|
|
this.fileList.forEach(o => {
|
|
this.fileList.forEach(o => {
|
|
|
litpics.push(o.url)
|
|
litpics.push(o.url)
|
|
|
})
|
|
})
|
|
|
this.isLoading = true
|
|
this.isLoading = true
|
|
|
const param = { ...this.form, litpics }
|
|
const param = { ...this.form, litpics }
|
|
|
- console.log(param)
|
|
|
|
|
if (this.form.id) {
|
|
if (this.form.id) {
|
|
|
updateById(this.form.id, param).then(() => {
|
|
updateById(this.form.id, param).then(() => {
|
|
|
this.visible = false
|
|
this.visible = false
|