修复地图搜索不展示搜索结果问题
This commit is contained in:
parent
c37166e38c
commit
0e3759b34d
|
|
@ -46,6 +46,9 @@
|
|||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@stomp/stompjs": "^7.0.0",
|
||||
"@vuemap/vue-amap": "^2.1.9",
|
||||
"@vuemap/vue-amap-extra": "^2.1.5",
|
||||
"@vuemap/vue-amap-loca": "^2.1.2",
|
||||
"@vueuse/core": "^12.5.0",
|
||||
"@wangeditor-next/editor": "^5.6.31",
|
||||
"@wangeditor-next/editor-for-vue": "^5.1.14",
|
||||
|
|
@ -84,7 +87,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "^8.23.0",
|
||||
"@typescript-eslint/parser": "^8.23.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vuemap/unplugin-resolver": "^1.0.4",
|
||||
"@vuemap/unplugin-resolver": "^2.0.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"commitizen": "^4.3.1",
|
||||
"cz-git": "^1.11.0",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import { initAMapApiLoader } from "@vuemap/vue-amap";
|
|||
import "@vuemap/vue-amap/dist/style.css";
|
||||
initAMapApiLoader({
|
||||
key: "6033c97e67bf2e9ceac306e1a3fa35f8",
|
||||
securityJsCode: "0547b69252ef0ed14e11f5c4ac152f07",
|
||||
});
|
||||
|
||||
const app = createApp(App);
|
||||
|
|
|
|||
|
|
@ -26,3 +26,6 @@
|
|||
color: rgb(32 160 255);
|
||||
}
|
||||
}
|
||||
.amap-sug-result {
|
||||
z-index: 3000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,12 +132,7 @@
|
|||
<el-input v-model="state.form.lat" placeholder="纬度" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-place"
|
||||
@click="state.showLocation = true"
|
||||
>
|
||||
<el-button type="primary" plain icon="place" @click="state.showLocation = true">
|
||||
选择坐标
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
|
@ -179,26 +174,10 @@
|
|||
:visible="true"
|
||||
@select="onSearchResult"
|
||||
@choose="onSearchResult"
|
||||
city="西安"
|
||||
></el-amap-search-box>
|
||||
</el-amap>
|
||||
</div>
|
||||
<!-- <div class="search_box">
|
||||
<el-amap-search-box
|
||||
:search-option="searchOption"
|
||||
:on-search-result="onSearchResult"
|
||||
></el-amap-search-box>
|
||||
</div> -->
|
||||
<div class="search_wrap">
|
||||
<div class="item" v-for="item in state.locationSearchList" :key="item.id">
|
||||
<div class="left">
|
||||
<div class="name">{{ item.name }}-{{ item.address }}</div>
|
||||
<div class="location">经纬度:{{ item.lng }},{{ item.lat }}</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button type="primary" @click="selectLocationHandle(item)">选择</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
|
|
@ -249,7 +228,7 @@ import uploadImg from "@/assets/images/upload.png";
|
|||
// { geocode, ShopApi.getList }
|
||||
import ShopApi from "@/api/account/shop";
|
||||
const validateLogo = (rule, value, callback) => {
|
||||
if (!this.form.logo) {
|
||||
if (!state.form.logo) {
|
||||
callback(new Error("请上传门店logo"));
|
||||
} else {
|
||||
callback();
|
||||
|
|
@ -407,7 +386,7 @@ function submitHandle() {
|
|||
state.formLoading = false;
|
||||
$notify({
|
||||
title: "成功",
|
||||
message: `${this.form.id ? "编辑" : "添加"}成功`,
|
||||
message: `${state.form.id ? "编辑" : "添加"}成功`,
|
||||
type: "success",
|
||||
});
|
||||
close();
|
||||
|
|
@ -427,7 +406,7 @@ function handleSuccess(response, file, fileList) {
|
|||
}
|
||||
function handleBeforeRemove(file, fileList) {
|
||||
for (let i = 0; i < state.files.length; i++) {
|
||||
if (this.files[i].uid === file.uid) {
|
||||
if (state.files[i].uid === file.uid) {
|
||||
crudQiNiu.del([state.files[i].id]).then((res) => {});
|
||||
return true;
|
||||
}
|
||||
|
|
@ -472,7 +451,7 @@ function uploadClose() {
|
|||
state.showUpload = false;
|
||||
}
|
||||
function reset() {
|
||||
state.form = { ...this.resetForm };
|
||||
state.form = { ...state.resetForm };
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
|
|
@ -517,7 +496,8 @@ defineExpose({
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.amap-sug-result {
|
||||
z-index: 1000;
|
||||
z-index: 2000;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -28,6 +28,14 @@
|
|||
"types": ["node", "vite/client", "element-plus/global", "vuemap"]
|
||||
},
|
||||
|
||||
"include": ["mock/**/*.ts", "src/**/*.ts", "src/**/*.vue", "vite.config.ts"],
|
||||
"include": [
|
||||
"mock/**/*.ts",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.vue",
|
||||
"vite.config.ts",
|
||||
"./node_modules/@vuemap/vue-amap/global.d.ts",
|
||||
"./node_modules/@vuemap/vue-amap-loca/global.d.ts",
|
||||
"./node_modules/@vuemap/vue-amap-extra/global.d.ts"
|
||||
],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue