From 4d38844d284b3e5bfbc1f07a72e8c58fd12da8f7 Mon Sep 17 00:00:00 2001 From: zhangyao Date: Sat, 7 Oct 2023 13:53:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=B8=83=E5=B1=80?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=89=B9=E6=AE=8A=E4=B8=9A=E6=80=81?= =?UTF-8?q?=E7=9A=84=E8=AF=BB=E5=8F=96=E6=96=B9=E5=BC=8F=E5=9C=A8config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- public/static/offline/JSON/config.json | 9 ++- .../static/offline/JSON/getColumnList1.json | 39 ++++++++++- .../SearchKeyboard/SearchKeyboard.vue | 8 +-- src/composables/useGuideFilterShop.ts | 15 ++++- src/composables/useInitConfigAndMallInfo.ts | 4 +- src/http/api/parking/index.ts | 3 +- src/store/root/actions.ts | 4 ++ src/store/root/state.ts | 2 +- src/types/config.d.ts | 1 + src/types/parking.d.ts | 8 --- src/views/Guide/Guide.vue | 66 +++++++++++++++++-- 12 files changed, 136 insertions(+), 25 deletions(-) delete mode 100644 src/types/parking.d.ts diff --git a/.gitignore b/.gitignore index d99ff4a..4ceda2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .DS_Store node_modules /dist - +*.zip # local env files .env.local diff --git a/public/static/offline/JSON/config.json b/public/static/offline/JSON/config.json index 3f4db93..db16bd1 100644 --- a/public/static/offline/JSON/config.json +++ b/public/static/offline/JSON/config.json @@ -8,6 +8,13 @@ "mobileNav": "https://qianmu-iot.1000my.com/project-jiaxinglcpy-lcpy_react-test/index.html#/", "fileUrl": "https://test-598d.obs.cn-east-2.myhuaweicloud.com", "backSocket": "ws://127.0.0.1:7181", - "clickUploadUrl": "/analysis/v1/web/deviceUseClickDataUpload" + "clickUploadUrl": "/analysis/v1/web/deviceUseClickDataUpload", + "specialIndustries": [ + "翔云苑", + "杏林苑", + "梅泾苑", + "香枫苑", + "栖凤苑" + ] } } \ No newline at end of file diff --git a/public/static/offline/JSON/getColumnList1.json b/public/static/offline/JSON/getColumnList1.json index a6d09ea..99fe048 100644 --- a/public/static/offline/JSON/getColumnList1.json +++ b/public/static/offline/JSON/getColumnList1.json @@ -1 +1,38 @@ -{"code":200,"msg":"操作成功","data":[{"name":"啊冷风机阿萨德浪费记录卡打撒飞机","nameEn":"","fileUrl":"/iotFile/project-odubitlp9mjy2wyuqkpfga/20230609/fCutkOWSsjkSaGJ1OwX38.jpg","shopCode":"mFOZv3PUAAWAj6EnxqnQs","shopName":"濮园一区 01幢","shopNameEn":"","houseNumber":"濮园一区 01幢","building":"濮园未来社区","floor":"L1","point":-1,"buildingCode":"gAi7ksmAnlR22G8CyLXbI","buildingOrder":0,"floorCode":"EuMWamqDI1Vd3v-oIYjY5","floorOrder":1},{"name":"222122","nameEn":"2212","fileUrl":"/iotFile/project-odubitlp9mjy2wyuqkpfga/20230609/wfkSeSVqHBHMuyvOl5pPh.jpg","shopCode":"","shopName":"","shopNameEn":"","houseNumber":"","building":"濮园未来社区","floor":"B1","point":83,"buildingCode":"gAi7ksmAnlR22G8CyLXbI","buildingOrder":0,"floorCode":"_hpC8JxxJI_glAFd56pUK","floorOrder":0}]} \ No newline at end of file +{ + "code": 200, + "msg": "操作成功", + "data": [ + { + "name": "啊冷风机阿萨德浪费记录卡打撒飞机", + "nameEn": "", + "fileUrl": "/iotFile/project-odubitlp9mjy2wyuqkpfga/20230609/fCutkOWSsjkSaGJ1OwX38.jpg", + "shopCode": "mFOZv3PUAAWAj6EnxqnQs", + "shopName": "濮园一区 01幢", + "shopNameEn": "", + "houseNumber": "濮园一区 01幢", + "building": "濮园未来社区", + "floor": "L1", + "point": -1, + "buildingCode": "gAi7ksmAnlR22G8CyLXbI", + "buildingOrder": 0, + "floorCode": "EuMWamqDI1Vd3v-oIYjY5", + "floorOrder": 1 + }, + { + "name": "222122", + "nameEn": "2212", + "fileUrl": "/iotFile/project-odubitlp9mjy2wyuqkpfga/20230609/wfkSeSVqHBHMuyvOl5pPh.jpg", + "shopCode": "", + "shopName": "", + "shopNameEn": "", + "houseNumber": "", + "building": "濮园未来社区", + "floor": "B1", + "point": 83, + "buildingCode": "gAi7ksmAnlR22G8CyLXbI", + "buildingOrder": 0, + "floorCode": "_hpC8JxxJI_glAFd56pUK", + "floorOrder": 0 + } + ] +} \ No newline at end of file diff --git a/src/components/SearchKeyboard/SearchKeyboard.vue b/src/components/SearchKeyboard/SearchKeyboard.vue index 1fb1d0e..32cc576 100644 --- a/src/components/SearchKeyboard/SearchKeyboard.vue +++ b/src/components/SearchKeyboard/SearchKeyboard.vue @@ -64,7 +64,7 @@ stroke-style="#D8B78A" fill-style="rgba(0, 0, 0, 0.03)" :width="700" - :height="214" + :height="348" @result="result" /> @@ -303,10 +303,10 @@ watch(wordsList, () => { } .hand { position: absolute; - top: 145px; + top: 81px; left: 190px; width: 700px; - height: 270px; + height: 348px; padding-top: 0; padding-left: 0; background: #fff; @@ -417,7 +417,7 @@ watch(wordsList, () => { } .hand-wrapper { width: 700px; - height: 270px; + height: 348px; } } } diff --git a/src/composables/useGuideFilterShop.ts b/src/composables/useGuideFilterShop.ts index 28a2c5a..4d98aa2 100644 --- a/src/composables/useGuideFilterShop.ts +++ b/src/composables/useGuideFilterShop.ts @@ -42,6 +42,19 @@ export const useGuideFilterShop = () => { } }) } + //根据特殊业态控制楼栋(店铺)信息 + const specialIdx = ref(0) + function changeSpecial(params: any) { + if (specialIdx.value === params.order) { + return + } + specialIdx.value = params.order + if (specialIdx.value === 0) { + buildingShopList.value = shopListGroupByIndustry.value.slice().filter(item => specialIndustries.value.includes(item.name)) + } else { + buildingShopList.value = shopListGroupByIndustry.value.filter(item => item.name === specialIndustries.value[specialIdx.value - 1]) + } + } - return { floorIdx, selectedShopList, filterShopByFloorName, filterAboutCurrentInfo, buildingShopList } + return { specialIdx, changeSpecial, floorIdx, selectedShopList, filterShopByFloorName, filterAboutCurrentInfo, buildingShopList } } diff --git a/src/composables/useInitConfigAndMallInfo.ts b/src/composables/useInitConfigAndMallInfo.ts index c4c4f33..28fae11 100644 --- a/src/composables/useInitConfigAndMallInfo.ts +++ b/src/composables/useInitConfigAndMallInfo.ts @@ -10,7 +10,9 @@ export const useInitConfigAndMallInfo = async () => { const _config = await getConfig() const store = useRootStore() store.SET_CONFIG(_config.data) - + if (_config.data.specialIndustries) { + store.SET_SPECIAL_INDUSTRIES(_config.data.specialIndustries) + } const [_DeviceInfo, _shopAndBuilding, _facilityList, _weather, _shopListByFloor, _shopListByIndustry, _brandInfo, _indexJson] = await Promise.all([ getDeviceInfo(), diff --git a/src/http/api/parking/index.ts b/src/http/api/parking/index.ts index a26a316..adc77e2 100644 --- a/src/http/api/parking/index.ts +++ b/src/http/api/parking/index.ts @@ -6,4 +6,5 @@ export const getFindCar = (license: string) => request({ url: `/ThirdPa export const getThirdTraffic = (projectCode: string) => request({ url: `/guide/v1/web/thirdTraffic`, params: { projectCode }, method: 'get' }) -export const getParkingInfo = () => request({ url: `/JSON/getParkingInfo.json` }) +// ParkingInfo +export const getParkingInfo = () => request({ url: `/JSON/getParkingInfo.json` }) diff --git a/src/store/root/actions.ts b/src/store/root/actions.ts index a987bb0..57e136f 100644 --- a/src/store/root/actions.ts +++ b/src/store/root/actions.ts @@ -20,6 +20,7 @@ export interface Actions { SET_SHOW_DETAIL(flag: boolean): void SET_SHOW_SEARCH(flag: boolean): void SET_HOT_SEARCH(list: HotSearch[]): void + SET_SPECIAL_INDUSTRIES(list: string[]): void } export type GenActions = CreateActions @@ -72,5 +73,8 @@ export const actions: GenActions = { }, SET_HOT_SEARCH(list) { this.hotSearchList = list + }, + SET_SPECIAL_INDUSTRIES(list) { + this.specialIndustries = list } } diff --git a/src/store/root/state.ts b/src/store/root/state.ts index 70bb5be..ac529ca 100644 --- a/src/store/root/state.ts +++ b/src/store/root/state.ts @@ -35,5 +35,5 @@ export const state = (): State => ({ device: {} as Device, shop: {} as Shop, hotSearchList: [], - specialIndustries: ['濮园一区', '濮园二区', '濮园三区', '濮园四区', '濮园五区'] + specialIndustries: ['翔云苑', '杏林苑', '梅泾苑', '香枫苑', '栖凤苑'] //['濮园一区', '濮园二区', '濮园三区', '濮园四区', '濮园五区'] }) diff --git a/src/types/config.d.ts b/src/types/config.d.ts index f8b3b86..b067d73 100644 --- a/src/types/config.d.ts +++ b/src/types/config.d.ts @@ -2,4 +2,5 @@ declare interface Config { interfaceUrl: string sourceUrl: string mobileNav: string + specialIndustries?: string[] } diff --git a/src/types/parking.d.ts b/src/types/parking.d.ts deleted file mode 100644 index a6d5967..0000000 --- a/src/types/parking.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare interface ParkingInfo { - title: string - titleEn: string - content: string - contentEn: string - fileList: string[] - qrFileList: Array<{ name: string; nameEn: string; fileUrl: string }> -} diff --git a/src/views/Guide/Guide.vue b/src/views/Guide/Guide.vue index ce15b81..f514654 100644 --- a/src/views/Guide/Guide.vue +++ b/src/views/Guide/Guide.vue @@ -56,12 +56,26 @@ /> + +
+
    @@ -124,9 +138,10 @@ import { storeToRefs } from 'pinia' import { useRootStore } from '@/store/root' const store = useRootStore() -const { language, facilityList, mapStatus, device } = storeToRefs(store) +const { specialIndustries, language, facilityList, mapStatus, device } = storeToRefs(store) -const { floorIdx, selectedShopList, filterShopByFloorName, filterAboutCurrentInfo, buildingShopList } = useGuideFilterShop() //筛选楼层 +const { specialIdx, changeSpecial, floorIdx, selectedShopList, filterShopByFloorName, filterAboutCurrentInfo, buildingShopList } = + useGuideFilterShop() //筛选楼层 const { switchFloor, handleMapIcon, list, mapIdx } = useGuideMapOperation() //复位 位置等操作 const { handleFacility } = useFacilityNav() //公共设施导航 @@ -189,6 +204,7 @@ function change(params: any) { showHand.value = true } } else { + specialIdx.value = 0 showShopList.value = false if (buildingScroll?.value?._BScrollRef?.scrollerHeight > 719) { showHand.value = true @@ -211,6 +227,13 @@ function getFacName(item: Facility) { // ? switchLanguage(item, 'customFacilityName') // : switchLanguage(item, 'name') } +//控制特殊业态 +const specialList = specialIndustries.value.map(item => { + return { + title: item, + titleEn: item + } +}) onMounted(() => { if (mapStatus.value) { @@ -282,6 +305,9 @@ watch(mapStatus, newValue => { position: absolute; top: 1228px; z-index: 1; + &.line2 { + top: 1297px; + } } .tip { position: absolute; @@ -378,15 +404,43 @@ watch(mapStatus, newValue => { background-repeat: no-repeat; background-size: contain; } + .special-btn-group { + position: absolute; + top: 1243px; + left: 64px; + width: 952px; + :deep(.btn-item) { + h4 { + height: 58px; + padding-bottom: 14px; + font-size: 24px; + } + + &.active { + h4 { + font-size: 24px; + } + &.btn-en { + h4 { + font-size: 15px; + } + } + } + } + } .shop-container-scroll { position: absolute; - top: 1231px; + top: 1329px; left: 64px; z-index: 1; overflow: hidden; width: 974px; - height: 619px; + height: 591px; padding-right: 29px; + &.not-special { + top: 1231px; + height: 619px; + } .shop-items-wrapper { padding-top: 30px; .shop-format-wrapper {