|
@@ -2,20 +2,20 @@
|
|
|
<el-dialog v-loading='loading' element-loading-text="拼命加载中" width="80%" destroy-on-close :visible.sync="dialogTableVisible" append-to-body>
|
|
|
<el-form v-if="showSearch" ref="ruleForm" class="demo-form-inline" :inline="true">
|
|
|
<el-form-item class="search-box">
|
|
|
- <el-input @keydown.enter.native="seachEnterFun" v-model="searchKey" type="search" id="search" style="width: 219px" placeholder="请输入关键字进行搜索" />
|
|
|
+ <el-input size="small" @keydown.enter.native="seachEnterFun" v-model="searchKey" type="search" id="search" style="width: 219px" placeholder="请输入关键字进行搜索" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" class="map-btn" @click="searchMap">搜索</el-button>
|
|
|
+ <el-button size="small" type="primary" class="map-btn" @click="searchMap">搜索</el-button>
|
|
|
</el-form-item>
|
|
|
<div class="tip-box" id="searchTip"></div>
|
|
|
<el-form-item label="经度" prop="lng">
|
|
|
- <el-input maxlength="11" v-model="lng" style="width: 140px" disabled></el-input>
|
|
|
+ <el-input size="small" maxlength="11" v-model="lng" style="width: 140px" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="纬度:" prop="lat">
|
|
|
- <el-input maxlength="10" v-model="lat" style="width: 140px" disabled></el-input>
|
|
|
+ <el-input size="small" maxlength="10" v-model="lat" style="width: 140px" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" class="map-btn" @click="clickSureMap">确定</el-button>
|
|
|
+ <el-button size="small" type="primary" class="map-btn" @click="clickSureMap">确定</el-button>
|
|
|
</el-form-item>
|
|
|
<div v-show="showAddressList" class="address-list">
|
|
|
<div class="address" @click="getGeoCode(v)" v-for="(v,i) in promptList" :key="i">
|
|
@@ -239,16 +239,30 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getLocation() {
|
|
|
- getLocation({
|
|
|
- location: `${this.lng},${this.lat}`,
|
|
|
- radius: 500,
|
|
|
- page: 1,
|
|
|
- offset: 20,
|
|
|
- }).then((res) => {
|
|
|
- console.log("数据", res);
|
|
|
- this.promptList = res.data;
|
|
|
- this.showAddressList = true;
|
|
|
- });
|
|
|
+ this.$axios
|
|
|
+ .get("https://restapi.amap.com/v3/geocode/regeo", {
|
|
|
+ params: {
|
|
|
+ key: "5ae8644771ef9abf9cfb3ea23b1df6ca",
|
|
|
+ location: `${this.lng},${this.lat}`,
|
|
|
+ extensions: "all",
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then(function (res) {
|
|
|
+ console.log("数据", res);
|
|
|
+ })
|
|
|
+ .catch(function (res) {
|
|
|
+ console.log(res);
|
|
|
+ });
|
|
|
+ // getLocation({
|
|
|
+ // location: `${this.lng},${this.lat}`,
|
|
|
+ // radius: 500,
|
|
|
+ // page: 1,
|
|
|
+ // offset: 20,
|
|
|
+ // }).then((res) => {
|
|
|
+ // console.log("数据", res);
|
|
|
+ // this.promptList = res.data;
|
|
|
+ // this.showAddressList = true;
|
|
|
+ // });
|
|
|
},
|
|
|
// 定位
|
|
|
getCurrentLocation() {
|
|
@@ -346,8 +360,14 @@ export default {
|
|
|
width: 100%;
|
|
|
height: 400px;
|
|
|
}
|
|
|
+// /deep/ .amap-marker {
|
|
|
+// top: -139px !important;
|
|
|
+// left: 83px !important;
|
|
|
+// }
|
|
|
/deep/ .amap-marker img {
|
|
|
width: 40px !important;
|
|
|
- height: 40px !important;
|
|
|
+ height: 66px !important;
|
|
|
+ top: -25px !important;
|
|
|
+ left: -10px !important;
|
|
|
}
|
|
|
</style>
|