From 19aaea45599d8e7b0f30229958f8342c0981cd45 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Fri, 22 Nov 2024 15:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B7=BB=E5=8A=A0=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E9=80=89=E6=8B=A9=E4=B8=BB=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/shop/components/addShop.vue | 51 ++++++++++++++++++++------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/src/views/shop/components/addShop.vue b/src/views/shop/components/addShop.vue index 4088f28..dff83dc 100644 --- a/src/views/shop/components/addShop.vue +++ b/src/views/shop/components/addShop.vue @@ -5,8 +5,20 @@ - - + + + 单店 + 连锁店 + 加盟店 + +
请谨慎修改!!!
+
+ + + + @@ -26,14 +38,6 @@
请谨慎修改!!!
- - - 单店 - 连锁店 - 加盟店 - -
请谨慎修改!!!
-
不可直接管理 @@ -54,7 +58,7 @@ - + @@ -153,7 +157,7 @@ import { getToken } from '@/utils/auth' import { mapGetters } from 'vuex' import crudQiNiu from '@/api/tools/qiniu' -import { tbShopInfoPost, geocode } from '@/api/shop' +import { tbShopInfoPost, geocode, tbShopInfo } from '@/api/shop' export default { computed: { ...mapGetters([ @@ -259,13 +263,32 @@ export default { amapOptions: { center: [108.946465, 34.347984], position: [] - } + }, + shopListLoading: false, + shopList: [] } }, mounted() { this.resetForm = { ...this.form } }, methods: { + // 获取商家列表 + async getTableData(query = '') { + this.shopListLoading = true + try { + const res = await tbShopInfo({ + page: 0, + size: 100, + shopName: query, + type: 'only' + }) + this.shopListLoading = false + this.shopList = res.content + } catch (error) { + this.shopListLoading = false + console.log(error) + } + }, onSearchResult(res) { this.locationSearchList = res this.amapOptions.center = [res[0].lng, res[0].lat] @@ -348,6 +371,8 @@ export default { } }, show(obj) { + this.getTableData() + this.dialogVisible = true if (obj && obj.id) { this.form = { ...obj }