|
|
@@ -11,7 +11,7 @@
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="名称">
|
|
|
- <el-input v-model="form.name"/>
|
|
|
+ <el-input v-model="form.baseDataInfo.name"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -34,17 +34,17 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="地址">
|
|
|
- <el-input v-model="form.address"/>
|
|
|
+ <el-input v-model="form.baseDataInfo.address"/>
|
|
|
</el-form-item>
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="联系人">
|
|
|
- <el-input v-model="form.contacts"/>
|
|
|
+ <el-input v-model="form.baseDataInfo.contacts"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="联系电话">
|
|
|
- <el-input v-model="form.contactNumber"/>
|
|
|
+ <el-input v-model="form.baseDataInfo.contactNumber"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -56,7 +56,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-form-item label="简介">
|
|
|
- <el-input v-model="form.brief" type="textarea" rows="10"/>
|
|
|
+ <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -79,7 +79,9 @@ export default {
|
|
|
visible: false,
|
|
|
isLoading: false,
|
|
|
listAllAuthorities: [],
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ baseDataInfo: {}
|
|
|
+ },
|
|
|
fileList: [],
|
|
|
map: null,
|
|
|
marker: null,
|
|
|
@@ -99,15 +101,23 @@ export default {
|
|
|
this.visible = true
|
|
|
this.isLoading = false
|
|
|
this.fileList = []
|
|
|
+ if (data && data.baseDataInfo) {
|
|
|
+ const baseDataInfo = data.baseDataInfo
|
|
|
+ if (baseDataInfo.litpics) {
|
|
|
+ baseDataInfo.litpics.forEach(o => {
|
|
|
+ this.fileList.push({ url: o })
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- if (data.litpics) {
|
|
|
- data.litpics.forEach(o => {
|
|
|
- this.fileList.push({ url: o })
|
|
|
- })
|
|
|
+ this.lng = baseDataInfo?.lng
|
|
|
+ this.lat = baseDataInfo?.lat
|
|
|
+
|
|
|
+ this.form = Object.assign({}, data)
|
|
|
+ } else {
|
|
|
+ this.form = {
|
|
|
+ baseDataInfo: {}
|
|
|
+ }
|
|
|
}
|
|
|
- this.form = Object.assign({}, data)
|
|
|
- this.lng = data.lng
|
|
|
- this.lat = data.lat
|
|
|
},
|
|
|
aMapClick(e) {
|
|
|
this.lng = e.lnglat.lng
|
|
|
@@ -119,7 +129,8 @@ export default {
|
|
|
litpics.push(o.url)
|
|
|
})
|
|
|
this.isLoading = true
|
|
|
- const param = { ...this.form, lng: this.lng, lat: this.lat, litpics }
|
|
|
+ const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics } }
|
|
|
+ console.log(param)
|
|
|
if (this.form.id) {
|
|
|
updateById(this.form.id, param).then(() => {
|
|
|
this.visible = false
|