Commit cdb32c7d authored by 沈良进's avatar 沈良进

增加经纬度

parent 5adbfc5d
......@@ -151,6 +151,12 @@
</el-tag>
<i v-if="showAddArea" class="el-icon-circle-plus addIcon" style="margin-left: 10px" @click="clickArea(0, 1)"></i>
</el-form-item>
<el-form-item label="坐标" prop="LngLat">
<el-input v-model="addMsg.LngLat" />
<div>请点击拾取坐标在新页面打开坐标拾取页面,将拾取的坐标复制到文本框内</div>
<!-- <iframe width="400" height="400" src="https://api.map.baidu.com/lbsapi/getpoint/"></iframe> -->
<el-button type="primary" @click="openBaiduMap">拾取坐标</el-button>
</el-form-item>
<el-form-item label="介绍" prop="Introduction">
<el-input type="textarea" :rows="2" v-model="addMsg.Introduction" />
</el-form-item>
......@@ -229,6 +235,7 @@ import uploadImg from '../../pubComponents/uploadImg'
Level: [
{ required: true, message: '请选择层级', trigger: 'change' }
],
LngLat: [{ required: true, message: '请输入坐标', trigger: 'blur' }],
Introduction: [{ required: true, message: '请输入介绍', trigger: 'blur' }],
TimeZones: [
{ required: true, message: '请输入时区', trigger: 'blur' },
......@@ -282,6 +289,9 @@ import uploadImg from '../../pubComponents/uploadImg'
this.financeinfo_post_GetList()
},
methods: {
openBaiduMap() {
window.open('https://api.map.baidu.com/lbsapi/getpoint/')
},
showImage(src) {
this.$set(this.images, 0, src);
setTimeout(() => {
......@@ -340,6 +350,7 @@ import uploadImg from '../../pubComponents/uploadImg'
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count
this.dataList.LngLat = res.data.data.pageData.Lng ? `${res.data.data.pageData.Lng},${res.data.data.pageData.Lat}` : ''
} else {
this.loading = false;
}
......@@ -439,9 +450,16 @@ import uploadImg from '../../pubComponents/uploadImg'
this.$message.error('请完善最佳旅行时间!');
return
}
let lngLat = this.addMsg.LngLat.split(',')
if(!lngLat[0] || !lngLat[1]) {
this.$message.error('坐标不对,请重新输入');
return
}
this.addMsg.ImageList = imageList
let params = {...this.addMsg}
params.IsHot = params.IsHot ? 1 : 2
params.Lng = lngLat[0]
params.Lat = lngLat[1]
this.apipost(
"ws_post_SetArea", params,
res => {
......
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