336
This commit is contained in:
@@ -77,23 +77,23 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<ai-dialog title="地图" :visible.sync="showMap" @opened="initMap" width="800px" class="mapDialog" @onConfirm="selectMap">
|
<ai-dialog title="地图" :visible.sync="showMap" @opened="initMap" width="800px" class="mapDialog" @onConfirm="selectMap">
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
<el-form label-width="80px" style="padding: 10px 20px 0 20px;">
|
<el-form label-width="80px" style="padding: 10px 20px 0 20px;">
|
||||||
<el-row type="flex" justify="space-between">
|
<el-row type="flex" justify="space-between">
|
||||||
<el-form-item label="经度">
|
<el-form-item label="经度">
|
||||||
<el-input disabled size="small" v-model="placeDetail.lng"></el-input>
|
<el-input disabled size="small" v-model="placeDetail.lng"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="纬度">
|
<el-form-item label="纬度">
|
||||||
<el-input disabled size="small" v-model="placeDetail.lat"></el-input>
|
<el-input disabled size="small" v-model="placeDetail.lat"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-input id="searchPlaceInput" size="medium" class="searchPlaceInput" clearable v-model="searchPlace" autocomplete="on" @change="placeSearch.search(searchPlace)" placeholder="请输入关键字">
|
<el-input id="searchPlaceInput" size="medium" class="searchPlaceInput" clearable v-model="searchPlace" autocomplete="on" @change="placeSearch.search(searchPlace)" placeholder="请输入关键字">
|
||||||
<el-button type="primary" slot="append" @click="placeSearch.search(searchPlace)">搜索</el-button>
|
<el-button type="primary" slot="append" @click="placeSearch.search(searchPlace)">搜索</el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div id="searchPlaceOutput" />
|
<div id="searchPlaceOutput" />
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -161,6 +161,8 @@ export default {
|
|||||||
lat: '',
|
lat: '',
|
||||||
address: ''
|
address: ''
|
||||||
},
|
},
|
||||||
|
lng: '',
|
||||||
|
lat: '',
|
||||||
showMap: false,
|
showMap: false,
|
||||||
searchPlace: '',
|
searchPlace: '',
|
||||||
timeOption: {
|
timeOption: {
|
||||||
@@ -198,6 +200,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted () {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.lng = res.data.lng
|
||||||
|
this.lat = res.data.lat
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
selectMap() {
|
selectMap() {
|
||||||
this.form.lng = this.placeDetail.lng
|
this.form.lng = this.placeDetail.lng
|
||||||
@@ -214,7 +228,7 @@ export default {
|
|||||||
this.map = new AMap.Map('map', {
|
this.map = new AMap.Map('map', {
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
zooms: [6, 20],
|
zooms: [6, 20],
|
||||||
center:[107.73,29.86],
|
center:[this.lng, this.lat],
|
||||||
zoom: 11,
|
zoom: 11,
|
||||||
})
|
})
|
||||||
this.placeSearch = new AMap.PlaceSearch({ map: this.map })
|
this.placeSearch = new AMap.PlaceSearch({ map: this.map })
|
||||||
@@ -271,7 +285,6 @@ export default {
|
|||||||
this.mapDetail = new AMap.Map(document.getElementById("mapDetail"), {
|
this.mapDetail = new AMap.Map(document.getElementById("mapDetail"), {
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
zooms: [6, 20],
|
zooms: [6, 20],
|
||||||
center:[104.067923463,30.6799428454],
|
|
||||||
zoom: 11,
|
zoom: 11,
|
||||||
})
|
})
|
||||||
let marker = new AMap.Marker({
|
let marker = new AMap.Marker({
|
||||||
|
|||||||
Reference in New Issue
Block a user