Browse Source

fix: 🧩 相关优化

pull/1/head
liyongle 3 years ago
parent
commit
338e3ae120
  1. 10
      public/static/offline/JSON/getMap.json
  2. 20
      public/static/offline/JSON/getParkInfo.json
  3. 34
      src/components/CarInfo/CarInfo.vue
  4. 163
      src/components/CarSearch/CarSearch.vue
  5. 10
      src/components/Map/Map.vue
  6. 20
      src/components/PlateInput/PlateInput.vue
  7. 5
      src/components/PublicComponent/PublicComponent.vue
  8. 2
      src/components/Recommend/Recommend.vue
  9. 49
      src/composables/useFindCar.ts
  10. 9
      src/composables/useInitMap.ts
  11. 2
      src/composables/useParkingKeyboard.ts
  12. 2
      src/composables/useStartNavi.ts
  13. 8
      src/http/api/parking/index.ts
  14. 1
      src/i18n/lang/en.json
  15. 1
      src/i18n/lang/zh.json
  16. 4
      src/store/root/actions.ts
  17. 4
      src/store/root/state.ts
  18. 1
      src/types/map.d.ts
  19. 13
      src/types/parkingInfo.d.ts
  20. 22
      src/views/Art/Art.vue
  21. 5
      src/views/Guide/ArtList.vue
  22. 2
      src/views/Guide/Guide.vue
  23. 115
      src/views/Parking/Parking.vue
  24. 6
      src/views/Traffic/Traffic.vue

10
public/static/offline/JSON/getMap.json

File diff suppressed because one or more lines are too long

20
public/static/offline/JSON/getParkInfo.json

@ -0,0 +1,20 @@
{
"code": 200,
"msg": "操作成功",
"data": [
{
"id": 209,
"title": "停车场介绍",
"content": {
"name": "停车场介绍",
"nameEn": "dad",
"content": "停车场介绍",
"contentEn": "23123",
"file_code": [
"/iotFile/project-odubitlp9mjy2wyuqkpfga/20230609/skps.png",
"/iotFile/project-odubitlp9mjy2wyuqkpfga/20230609/-zGlLfxNuSkVWjOQ3tsnc.jpg"
]
}
}
]
}

34
src/components/CarInfo/CarInfo.vue

@ -7,25 +7,17 @@
<img src="@/assets/images/shopDetail/go.svg" alt="" @click="go" />
</div>
<div class="car">
<div class="row">
<div class="car-group mr120" style="width: 330px">
<div class="tip">车牌号</div>
<div class="text">{{ carInfo.carCode }}浙B88888</div>
</div>
<div class="car-group">
<div class="tip">车位号</div>
<div class="text">{{ carInfo.spaceNo }}S-B1-001-102</div>
</div>
<div class="car-group">
<div class="tip">车牌号</div>
<div class="text">{{ carInfo.carCode }}浙B88888</div>
</div>
<div class="row" style="margin-top: 60px">
<div class="car-group mr120" style="width: 330px">
<div class="tip">停车时长</div>
<div class="text">{{ carInfo.parkingTime }}1小时30分钟</div>
</div>
<div class="car-group">
<div class="tip">停车费用</div>
<div class="text">{{ carInfo.spaceNo }}30</div>
</div>
<div class="car-group">
<div class="tip">车位号</div>
<div class="text">{{ carInfo.spaceNo }}S-B1-001-102</div>
</div>
<div class="car-group">
<div class="tip">停车时长</div>
<div class="text">{{ carInfo.parkingTime }}1小时30分钟</div>
</div>
</div>
<div class="close-icon" @click="close">
@ -140,14 +132,8 @@ function go() {
position: absolute;
bottom: 102px;
left: 368px;
.row {
@include fl();
}
}
.car-group {
&.mr120 {
margin-right: 100px;
}
.tip {
padding-bottom: 16px;
font-size: 20px;

163
src/components/CarSearch/CarSearch.vue

@ -0,0 +1,163 @@
<template>
<div class="car-search-wrapper">
<div class="masker" @click="close"></div>
<div class="close-icon" @click="close">
<img src="@/assets/images/shopDetail/close.svg" alt="" />
</div>
<div class="car-search-content">
<div class="title">{{ $t('searchCar') }}</div>
<div class="point">已为您搜索到以下车位号选择车位号进行导航</div>
<ScrollView v-if="searchList.length" :list="searchList" class="myScroll" scrollbar>
<div class="list">
<div v-for="item in searchList" :key="item" class="item" @click="search(item)">{{ item }}</div>
</div>
</ScrollView>
<img v-else class="empty" src="@/assets/images/stay_tuned.svg" alt="" />
</div>
</div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router'
import { useRootStore } from '@/store/root'
import ScrollView from '@/base/ScrollView/ScrollView.vue'
type Prop = {
searchList: string[]
}
defineProps<Prop>()
const emits = defineEmits(['close'])
function close() {
emits('close')
}
const store = useRootStore()
const router = useRouter()
function search(shopNum: string) {
const info = window.Map_QM.pathPark({ shopNum })
if (info?.node) {
const floor: any = store.buildingList[0].floorList.find(item => item.floorOrder === info.floor)?.floor
const shop = {
shopCode: '',
shopName: shopNum,
floorOrder: info.floor,
floor,
logoUrl: '/static/img/tcjf.png',
yaxis: info.node
}
store.SET_SHOP(shop)
router.push('/nav')
}
}
</script>
<style lang="scss" scoped>
:deep(.bscroll-vertical-scrollbar) {
width: 6px;
height: 120px !important;
background: rgb(0 0 0 / 3%);
border-radius: 6px;
opacity: 1 !important;
.bscroll-indicator {
background: rgb(0 0 0 / 6%) !important;
border: none !important;
border-radius: 6px !important;
}
}
.car-search-wrapper {
position: fixed;
top: 0;
left: 0;
z-index: 1001;
width: 1920px;
height: 1080px;
background: rgb(142 144 145 / 50%);
backdrop-filter: blur(50px);
.masker {
position: fixed;
top: 0;
left: 0;
z-index: 2;
width: 1920px;
height: 1080px;
}
.car-search-content {
position: absolute;
top: 112px;
left: 528px;
z-index: 3;
width: 864px;
padding-top: 48px;
background: rgb(247 247 247);
border-radius: 16px;
.title {
width: 864px;
margin-bottom: 40px;
font-size: 28px;
font-family: 'font_bold';
text-align: center;
color: #534f46;
font-style: normal;
font-weight: 700;
line-height: 36px;
}
.point {
margin-bottom: 24px;
margin-left: 52px;
font-size: 16px;
font-family: 'font_regular';
color: #534f46;
font-style: normal;
font-weight: 400;
line-height: 24px;
}
.myScroll {
position: relative;
overflow: hidden;
width: 790px;
height: 684px;
margin-left: 52px;
.list {
width: 768px;
.item {
width: 768px;
height: 76px;
padding: 22px 40px;
margin-bottom: 8px;
font-size: 24px;
font-family: 'font_bold';
color: #534f46;
background: #fff;
border-radius: 16px;
font-style: normal;
font-weight: 700;
line-height: 32px;
}
}
}
}
.close-icon {
@include fl(center);
position: fixed;
top: 72px;
right: 496px;
z-index: 4;
width: 100px;
height: 100px;
background: rgb(255 255 255 / 60%);
border: 2px solid #fff;
border-radius: 50px;
backdrop-filter: blur(20px);
img {
width: 48px;
height: 48px;
}
}
.empty {
width: 768px;
height: 495px;
margin-left: 52px;
}
}
</style>

10
src/components/Map/Map.vue

@ -28,7 +28,7 @@
<div class="triangle">
<img src="@/assets/images/guide/triangle.svg" alt="" />
</div>
<div class="circle">{{ shop.industryCode }}</div>
<div class="circle">{{ shop.shopCode }}</div>
</div>
<!-- 地图艺术装置弹框 -->
<div id="artWorkInfo">
@ -220,6 +220,9 @@ function handleDetail() {
background: #8a766a;
border-radius: 14px 14px 0 0;
.name {
@include no-wrap;
width: 180px;
margin-bottom: 4px;
font-size: 14px;
font-family: 'font_bold';
@ -229,6 +232,9 @@ function handleDetail() {
line-height: 22px;
}
.nameEn {
@include no-wrap;
width: 180px;
font-size: 10px;
font-family: 'font_bold';
color: rgb(255 255 255 / 60%);
@ -238,6 +244,8 @@ function handleDetail() {
}
}
.middle {
@include fl();
width: 200px;
height: 32px;
padding: 10px 16px;

20
src/components/PlateInput/PlateInput.vue

@ -4,8 +4,8 @@
<div
v-for="(item, index) of renderInputLength"
:key="item"
:class="{ active: index === list.length && list.length <= 7 }"
:style="index === 1 ? 'margin-right: 82px' : ''"
:class="{ active: index === list.length && list.length <= 7, space: searchMethod === '车位' }"
:style="index === 1 && searchMethod === '车牌' ? 'margin-right: 82px' : ''"
class="input"
@click="handleEnergy"
>
@ -18,7 +18,7 @@
</transition>
</div>
</div>
<div class="btn" @click="confirm">
<div class="btn" :class="{ dis: list.length < 3 && searchMethod === '车位' }" @click="confirm">
<slot></slot>
<span>{{ btnText }}</span>
</div>
@ -42,7 +42,7 @@ const props = withDefaults(defineProps<Props>(), {
const PLATE_LENGTH = 8 //
const renderInputLength = computed(() => (props.searchMethod === '车牌' ? PLATE_LENGTH : props.spaceLength))
const btnText = computed(() => (props.searchMethod === '车牌' ? '自主寻车' : '寻车导航'))
const btnText = computed(() => (props.searchMethod === '车牌' ? '自主寻车' : '搜索'))
const emits = defineEmits(['handle-energy', 'confirm'])
const isEnergy = ref(false)
@ -53,6 +53,9 @@ function handleEnergy() {
})
}
function confirm() {
if (props.list.length < 3 && props.searchMethod === '车位') {
return
}
emits('confirm')
}
@ -77,6 +80,8 @@ $btn-width: 197px;
.plate-container {
position: relative;
display: flex;
justify-content: space-between;
width: 856px;
margin-bottom: 40px;
&::before {
position: absolute;
@ -92,6 +97,9 @@ $btn-width: 197px;
}
.input-wrapper {
display: flex;
.space {
width: 128px;
}
}
.input {
position: relative;
@ -149,7 +157,6 @@ $btn-width: 197px;
width: $btn-width;
height: $height;
padding: 0 58px;
margin-left: 38px;
font-size: $btn-font-size;
font-family: 'font_bold';
color: $btn-color;
@ -162,5 +169,8 @@ $btn-width: 197px;
transition: all 0.3s;
}
}
.dis {
background: rgb(0 0 0 / 20%);
}
}
</style>

5
src/components/PublicComponent/PublicComponent.vue

@ -9,8 +9,11 @@
<Menu />
<Search v-if="showSearch"></Search>
<!-- 推荐弹窗 -->
<RecommendDialog />
<Transition enter-active-class="animate__animated animate__fadeIn" leave-active-class="animate__animated animate__fadeOut">
<RecommendDialog />
</Transition>
<shopdetail v-if="showDetail"></shopdetail>

2
src/components/Recommend/Recommend.vue

@ -128,6 +128,8 @@ getColumnList().then(({ data }) => {
border-radius: 24px;
.name-container {
@include fl();
margin-bottom: 40px;
.name {
font-size: 48px;
font-family: 'font_bold';

49
src/composables/useFindCar.ts

@ -1,17 +1,20 @@
import { ref } from 'vue'
import { ref, toRefs } from 'vue'
import { getFindCar } from '@/http/api/parking'
import { isLicensePlate } from '@/utils/utils'
import { useRootStore } from '@/store/root'
import { useRouter } from 'vue-router'
// import { useRouter } from 'vue-router'
import { HTTP_CODE } from '@/enums'
import Message from '@/base/Message/Message'
export const useFindCar = () => {
const showCarDetail = ref(false)
const showCarSearch = ref(false)
const loading = ref(false)
const result = ref<CarInfo>()
const searchList = ref<string[]>([])
const store = useRootStore()
const router = useRouter()
const { mapParkList } = toRefs(store)
// const router = useRouter()
async function confirm(plate: string, type: number) {
if (!type) {
if (!isLicensePlate(plate)) {
@ -38,26 +41,24 @@ export const useFindCar = () => {
loading.value = false
}
} else {
if (!plate.length) {
Message({ type: 'success', text: '请输入正确的车位号' })
return
}
const info = window.Map_QM.pathPark({ shopNum: plate })
if (info?.node) {
const floor: any = store.buildingList[0].floorList.find(item => item.floorOrder === info.floor)?.floor
const shop = {
shopCode: '',
shopName: plate,
floorOrder: info.floor,
floor,
logoUrl: '/static/img/tcjf.png',
yaxis: info.node
}
store.SET_SHOP(shop)
router.push('/nav')
} else {
Message({ text: `暂未查到相关信息`, type: 'success' })
}
searchList.value = mapParkList.value.filter(item => item.includes(plate))
showCarSearch.value = true
// const info = window.Map_QM.pathPark({ shopNum: plate })
// if (info?.node) {
// const floor: any = store.buildingList[0].floorList.find(item => item.floorOrder === info.floor)?.floor
// const shop = {
// shopCode: '',
// shopName: plate,
// floorOrder: info.floor,
// floor,
// logoUrl: '/static/img/tcjf.png',
// yaxis: info.node
// }
// store.SET_SHOP(shop)
// router.push('/nav')
// } else {
// Message({ text: `暂未查到相关信息`, type: 'success' })
// }
}
}
@ -67,5 +68,5 @@ export const useFindCar = () => {
const minutes = totalMinutes % 60
return `${hours > 0 ? `${hours}小时` : ''}${minutes > 0 ? ` ${minutes}分钟` : ''}`
}
return { loading, result, showCarDetail, confirm }
return { loading, result, showCarDetail, confirm, searchList, showCarSearch }
}

9
src/composables/useInitMap.ts

@ -20,10 +20,17 @@ export const useInitMap = async function () {
store.SET_MAP_STATUS(true)
window.Map_QM.addEventListener('shop', onClickShop, false)
window.Map_QM.renderer.domElement.addEventListener('webglcontextlost', onContextLost)
const arr: string[] = []
window.Map_QM.util.allMap[0].buildArr.forEach((item: any) => {
item.mapData.parkArea.forEach((park: any) => {
arr.push(park.parkNum)
})
})
store.SET_MAP_PARK_LIST(arr)
},
{
build: device.value?.buildingOrder ?? 0,
floor: device.value.floorOrder,
floor: 6,
navPoint: device.value.location,
angle: device.value.angle,
iconUrl: delPrefixOfFacilityList,

2
src/composables/useParkingKeyboard.ts

@ -4,7 +4,7 @@ import { isZhWord, isUppercaseWord } from '@/utils/utils'
export const useParkingKeyboard = () => {
const NOT_ENERGY_PLATE = 7 //非能源车牌长度
const ENERGY_PLATE = 8 //能源车牌长度
const SPACE_MAX_LENGTH = 6 //车位最大允许长度
const SPACE_MAX_LENGTH = 3 //车位最大允许长度
const LICENSE = ['川', 'A'] //默认车牌前缀
const plate = ref(LICENSE.slice())

2
src/composables/useStartNavi.ts

@ -16,7 +16,7 @@ export const useStartNavi = (shop: Ref<Shop>, device: Ref<Device>, setPauseRefFn
startNavi(shop.value)
onBeforeUnmount(() => {
window.Map_QM.showFloor(device.value.floorOrder)
window.Map_QM.showFloor(6)
})
//导航动画

8
src/http/api/parking/index.ts

@ -3,6 +3,10 @@ import { getPrefixUrl } from '../../http'
import { PREFIX } from '@/enums'
//找车
export const getFindCar = (license: string) =>
request<CarInfo>({ url: `${getPrefixUrl().interfaceUrl}/ThirdPark/GetPlaceInfo?carCode=${license}` })
request<CarInfo>({ url: `${getPrefixUrl().interfaceUrl}/api/guide/v1/web/thirdParkRevision?plateId=${license}` })
export const getParkingInfo = () => request<ParkingInfo>({ url: `${PREFIX.STATIC_URL}/JSON/getParkingInfo.json` })
// 获取停车场信息
export const getParkInfo = () => request<ParkingInfo[]>({ url: `${PREFIX.STATIC_URL}/JSON/getParkInfo.json` })
// 获取停车场二维码
export const getParkingQrList = () => request<Qr[]>({ url: `${PREFIX.STATIC_URL}/JSON/getParkingQrList.json` })

1
src/i18n/lang/en.json

@ -8,6 +8,7 @@
"play": "Play",
"speedUp": "Speed up",
"stopSpeedUp": "Stop acceleration",
"searchCar": "Result",
"header": {
"recommend": "Recommend"
},

1
src/i18n/lang/zh.json

@ -8,6 +8,7 @@
"play": "播放",
"speedUp": "加速",
"stopSpeedUp": "停止加速",
"searchCar": "车位号搜索结果",
"header": {
"recommend": "餐饮推荐"
},

4
src/store/root/actions.ts

@ -24,6 +24,7 @@ export interface Actions {
SET_IS4K(flag: boolean): void
SET_SHOP_MAP(shopMap: ShopMap): void
SET_ART_PLACE_LIST(list: ArtPlace[]): void
SET_MAP_PARK_LIST(list: string[]): void
}
export type GenActions = CreateActions<Root, State, Actions>
@ -88,5 +89,8 @@ export const actions: GenActions = {
},
SET_ART_PLACE_LIST(list) {
this.artPlaceList = list
},
SET_MAP_PARK_LIST(list) {
this.mapParkList = list
}
}

4
src/store/root/state.ts

@ -20,6 +20,7 @@ export interface State {
is4K: boolean //是否4K
shopMap: ShopMap // 店铺code与店铺信息集合
artPlaceList: ArtPlace[] // 艺术装置集合
mapParkList: string[] // 停车位列表
}
export const state = (): State => ({
@ -41,5 +42,6 @@ export const state = (): State => ({
showColumnList: false,
is4K: true,
shopMap: {} as ShopMap,
artPlaceList: []
artPlaceList: [],
mapParkList: []
})

1
src/types/map.d.ts

@ -33,6 +33,7 @@ export declare global {
// 地图工具对象
util: {
options: { playSpeed: number }
allMap: any
changePlaySpeed(speed: number = 6): void
}
// render 对象

13
src/types/parkingInfo.d.ts

@ -1,8 +1,11 @@
declare interface ParkingInfo {
id: number
title: string
titleEn: string
content: string
contentEn: string
fileList: string[]
qrFileList: Array<{ name: string; nameEn: string; fileUrl: string }>
content: {
name: string
nameEn: string
content: string
contentEn: string
file_code: string[]
}
}

22
src/views/Art/Art.vue

@ -1,15 +1,17 @@
<template>
<div class="art-container">
<div class="name">艺术装置</div>
<div class="nameEn">ARTWORK</div>
<ScrollView class="myScroll" :list="artPlaceList" scroll-x scrollbar>
<div style="display: inline-block">
<div class="lists">
<ArtItem v-for="item in artPlaceList" :key="item.id" :art-info="item" />
<Transition appear enter-active-class="animate__animated animate__fadeIn">
<div class="art-container">
<div class="name">艺术装置</div>
<div class="nameEn">ARTWORK</div>
<ScrollView class="myScroll" :list="artPlaceList" scroll-x scrollbar>
<div style="display: inline-block">
<div class="lists">
<ArtItem v-for="item in artPlaceList" :key="item.id" :art-info="item" />
</div>
</div>
</div>
</ScrollView>
</div>
</ScrollView>
</div>
</Transition>
</template>
<script setup lang="ts">

5
src/views/Guide/ArtList.vue

@ -49,15 +49,14 @@ function show(item: Art, index: number) {
current.value = index
//
const poi = item.content.point.split('_')
console.log(poi)
hideMapDialog()
window.Map_QM.addElementByNode(document.getElementById('artInfo'), Number(poi[2]))
const art: any = document.getElementById('artInfo')
art.style.visibility = 'visibility'
art.style.visibility = 'visible'
const floors = store.currentBuildingFloorsList.filter(item => item.floorOrder === Number(poi[1]))
const shop = {
shopCode: '',
shopCode: index + 1,
shopName: item.content.name,
shopNameEn: item.content.nameEn,
floorOrder: floors[0].floorOrder,

2
src/views/Guide/Guide.vue

@ -141,7 +141,7 @@ function show(item: ArtPlace) {
hideMapDialog()
window.Map_QM.addElementByNode(document.getElementById('artWorkInfo'), Number(poi[2]))
const art: any = document.getElementById('artWorkInfo')
art.style.visibility = 'visibility'
art.style.visibility = 'visible'
const floors = store.currentBuildingFloorsList.filter(item => item.floorOrder === Number(poi[1]))
const shop = {

115
src/views/Parking/Parking.vue

@ -10,46 +10,50 @@
:list="list"
@click="handleSwitch"
/>
<div class="content">
<div class="content-left">
<PlateInput
:list="plate"
:search-method="searchMethod"
:space-length="inputLength"
@confirm="onConfirm"
@handle-energy="handleEnergy"
>
<Loading v-if="loading" fill="#fff" :size="20" />
</PlateInput>
<PlateKeyboard :search-methods="searchMethod" @del="del" @handle-keyboard="handleKeyboard" />
</div>
<div class="content-right">
<div class="parking-carousel">
<EffectFade v-slot="{ item }" :list="parkingInfo.fileList">
<img class="img" :src="item" alt="" />
</EffectFade>
</div>
<div class="info">
<h1 class="title">{{ switchLanguage(parkingInfo, 'title') }}</h1>
<ScrollView class="parking-scroll" scrollbar :list="switchLanguage(parkingInfo, 'content')" :pull-up="false">
<div class="intro">{{ switchLanguage(parkingInfo, 'content') }}</div>
</ScrollView>
<Transition appear enter-active-class="animate__animated animate__fadeIn">
<div class="content">
<div class="content-left">
<div v-if="searchMethod === '车位'" class="point">请输入车位号后三位</div>
<PlateInput
:list="plate"
:search-method="searchMethod"
:space-length="inputLength"
@confirm="onConfirm"
@handle-energy="handleEnergy"
>
<Loading v-if="loading" fill="#fff" :size="20" />
</PlateInput>
<PlateKeyboard :search-methods="searchMethod" @del="del" @handle-keyboard="handleKeyboard" />
</div>
<div class="qr-container">
<img src="" alt="" />
<div class="name">寻车扫码</div>
<div v-if="parkingInfo.length" class="content-right">
<div class="parking-carousel">
<EffectFade v-slot="{ item }" :list="parkingInfo[0].content.file_code">
<img class="img" :src="item" alt="" />
</EffectFade>
</div>
<div class="info">
<h1 class="title">{{ switchLanguage(parkingInfo[0].content, 'name') }}</h1>
<ScrollView class="parking-scroll" scrollbar :list="switchLanguage(parkingInfo[0].content, 'content')" :pull-up="false">
<div class="intro">{{ switchLanguage(parkingInfo[0].content, 'content') }}</div>
</ScrollView>
</div>
<div v-if="qrlist.length" class="qr-container">
<img :src="qrlist[0].content.file_code[0]" alt="" />
<div class="name">{{ switchLanguage(qrlist[0].content, 'name') }}</div>
</div>
</div>
</div>
</div>
</Transition>
</div>
<CarInfo v-if="showCarDetail" :car-info="result" @close="showCarDetail = false" />
<CarSearch v-if="showCarSearch" :search-list="searchList" @close="showCarSearch = false" />
</template>
<script setup lang="ts">
import { ref, shallowRef, defineAsyncComponent } from 'vue'
import { ref, defineAsyncComponent } from 'vue'
import { useFindCar } from '@/composables/useFindCar'
import { useParkingKeyboard } from '@/composables/useParkingKeyboard'
import { getParkingInfo } from '@/http/api/parking'
import { getParkInfo, getParkingQrList } from '@/http/api/parking'
import { useSwitchLanguage } from '@/composables/useSwitchLanguage'
import PlateInput from '@/components/PlateInput/PlateInput.vue'
import PlateKeyboard from '@/components/PlateKeyboard/PlateKeyboard.vue'
@ -58,6 +62,7 @@ import EffectFade from '@/components/EffectFade/EffectFade.vue'
import ScrollView from '@/base/ScrollView/ScrollView.vue'
import switchtab from '@/components/SwitchTab/SwitchTab.vue'
const CarInfo = defineAsyncComponent(() => import('@/components/CarInfo/CarInfo.vue'))
const CarSearch = defineAsyncComponent(() => import('@/components/CarSearch/CarSearch.vue'))
const { switchLanguage } = useSwitchLanguage()
const list = [
{
@ -87,7 +92,7 @@ function handleSwitch(index: number) {
const { del, handleKeyboard, handleEnergy, inputLength, plate, plateToString, searchMethod, LICENSE, changeSearchMethod } =
useParkingKeyboard()
const { confirm, loading, showCarDetail, result } = useFindCar()
const { confirm, loading, showCarDetail, result, searchList, showCarSearch } = useFindCar()
function onConfirm() {
confirm(plateToString.value, tabIdx.value)
@ -98,13 +103,30 @@ function onConfirm() {
}
}
const parkingInfo = shallowRef<ParkingInfo>({} as ParkingInfo)
getParkingInfo().then(({ data }) => {
parkingInfo.value = data ?? {}
const parkingInfo = ref<ParkingInfo[]>([])
getParkInfo().then(({ data }) => {
parkingInfo.value = data
})
const qrlist = ref<Qr[]>([])
getParkingQrList().then(({ data }) => {
qrlist.value = data
})
</script>
<style lang="scss" scoped>
:deep(.bscroll-vertical-scrollbar) {
width: 6px;
height: 120px !important;
background: rgb(0 0 0 / 3%);
border-radius: 6px;
opacity: 1 !important;
.bscroll-indicator {
background: rgb(0 0 0 / 6%) !important;
border: none !important;
border-radius: 6px !important;
}
}
.parking-container {
position: fixed;
top: 180px;
@ -120,6 +142,17 @@ getParkingInfo().then(({ data }) => {
.content-left {
margin-top: 228px;
margin-right: 136px;
.point {
position: fixed;
top: 368px;
left: 100px;
font-size: 16px;
font-family: 'font_regular';
color: #534f46;
font-style: normal;
font-weight: 400;
line-height: 24px;
}
}
.content-right {
position: relative;
@ -136,7 +169,7 @@ getParkingInfo().then(({ data }) => {
height: 200px;
}
.img {
width: 540px;
width: 720px;
height: 405px;
border-radius: 16px;
}
@ -161,18 +194,6 @@ getParkingInfo().then(({ data }) => {
overflow: hidden;
height: 182px;
margin: 0 18px 40px 48px;
:deep(.bscroll-vertical-scrollbar) {
width: 6px !important;
height: 120px !important;
background: rgb(0 0 0 / 3%) !important;
opacity: 1 !important;
.bscroll-indicator {
height: 40px !important;
background: #fff !important;
border: none !important;
box-shadow: 0 8px 20px rgb(0 0 0 / 10%) !important;
}
}
.intro {
padding-right: 24px;
font-size: 14px;

6
src/views/Traffic/Traffic.vue

@ -9,8 +9,10 @@
:list="list"
@click="handleSwitch"
/>
<PictureText v-if="isCurrent" :ac-list="mallIntro" :qr-list="[]" />
<img v-else class="tra" :src="traImg ? traImg : require('@/assets/images/empty_big.svg')" alt="" />
<Transition appear enter-active-class="animate__animated animate__fadeIn">
<PictureText v-if="isCurrent" :ac-list="mallIntro" :qr-list="[]" />
<img v-else class="tra" :src="traImg ? traImg : require('@/assets/images/empty_big.svg')" alt="" />
</Transition>
</template>
<script setup lang="ts">

Loading…
Cancel
Save