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