Browse Source

fix: 🧩 停车和周边交通接口

pull/1/head
liyongle 3 years ago
parent
commit
7f96d1e539
  1. 2
      public/static/offline/JSON/GetDevCoordinateByIP.json
  2. 15
      public/static/offline/JSON/config.json
  3. 2
      public/static/offline/JSON/getBackTime.json
  4. 507
      public/static/offline/JSON/getBrandShopList.json
  5. 2
      public/static/offline/JSON/getFacilityList.json
  6. 2
      public/static/qm/MainMap_QM.js
  7. 64
      src/components/Traffic/Traffic.vue
  8. 8
      src/http/api/parking/index.ts
  9. 8
      src/types/car.d.ts

2
public/static/offline/JSON/GetDevCoordinateByIP.json

@ -1 +1 @@
{"code":200,"msg":"success","data":{"machineCode":"fOjdaZJ0kCfJ2WCgszOKr","machineName":"12132","machineTypeName":"信发","label":"windows","screenAttribute":"1920*1080横屏","building":"主楼","buildingCode":"h-8eWvLqbPZP5cuWHY-vA","buildingOrder":0,"floor":"L1","floorCode":"p6U4SCkoJf9Xq5gBGpa3L","floorOrder":3,"ip":"192.168.1.209","mac":"4CEDFBCAFF27","location":"0","angle":"0","projectCode":"project-n-ww5jvpwnu0ads70lbkda"}}
{"code":200,"msg":"success","data":{"machineCode":"fOjdaZJ0kCfJ2WCgszOKr","machineName":"12132","machineTypeName":"信发","label":"windows","screenAttribute":"1920*1080横屏","building":"主楼","buildingCode":"h-8eWvLqbPZP5cuWHY-vA","buildingOrder":0,"floor":"L1","floorCode":"p6U4SCkoJf9Xq5gBGpa3L","floorOrder":0,"ip":"192.168.1.209","mac":"4CEDFBCAFF27","location":"0","angle":"0","projectCode":"project-n-ww5jvpwnu0ads70lbkda"}}

15
public/static/offline/JSON/config.json

@ -1 +1,14 @@
{"code":200,"msg":"操作成功"}
{
"code": 200,
"msg": "操作成功",
"data": {
"sourceUrl": "/static/offline",
"debug": false,
"interfaceUrl": "https://project-iot.test.1000my.com/api",
"mobileNav": "https://1000my.obs.cn-east-2.myhuaweicloud.com/mobileqmgo/index.html#/",
"handWriteUrl": "http://saas.1000my.com:8014/words",
"fileUrl": "https://test-598d.obs.cn-east-2.myhuaweicloud.com",
"backSocket": "ws://127.0.0.1:7181",
"clickUploadUrl": "/analysis/v1/web/deviceUseClickDataUpload"
}
}

2
public/static/offline/JSON/getBackTime.json

@ -1 +1 @@
{"code":200,"msg":"操作成功","data":[60,null]}
{"code":200,"msg":"操作成功","data":[60,0]}

507
public/static/offline/JSON/getBrandShopList.json

@ -1 +1,506 @@
{"code":500,"msg":"请求失败"}
{
"code": 200,
"msg": "操作成功",
"data": {
"allShopNum": 282,
"floorList": [
{
"building": "主楼",
"floor": "B2",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "UytJKdq0tRQeqAJhxUUoz"
},
{
"building": "主楼",
"floor": "B1夹层",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "MeqgQl4aw0NVwXgZLkC2X"
},
{
"building": "主楼",
"floor": "B1",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "aBLCknS09a-0kNdgI_Wzp"
},
{
"building": "主楼",
"floor": "L1",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "p6U4SCkoJf9Xq5gBGpa3L"
},
{
"building": "主楼",
"floor": "L2",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "AmNQY2Cv9pmuMvBlOPqcs"
},
{
"building": "主楼",
"floor": "L3",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "cun6nT_Ehbwlz1QvugH7d"
},
{
"building": "主楼",
"floor": "L4",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "1Lj_Ebm8Dnao5ggE1cRtM"
},
{
"building": "主楼",
"floor": "L5",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "tx-XSnQUDIJrvR4P2QEt8"
},
{
"building": "主楼",
"floor": "空中花园",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"floorCode": "4FX0hXQgsLXsuLYCPwN0l"
}
],
"recommendList": [
{
"industryName": "服务",
"industryFatherName": "服务",
"industryFatherNameEn": "Services",
"shopCode": "ZEI7OmnD4m_nFiIHPOiVq",
"shopName": "AC齿科",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "L3",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [
"/iotFile/project-n-ww5jvpwnu0ads70lbkda/20230509/K4kRvHt1ygyiaZjpmd8hj.jpg"
],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "cun6nT_Ehbwlz1QvugH7d",
"floorOrder": 5,
"star": 0
},
{
"industryName": "服务",
"industryFatherName": "服务",
"industryFatherNameEn": "Services",
"shopCode": "RtrmuAOZ00wsREQs8_qja",
"shopName": "爱回收",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "B1",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "aBLCknS09a-0kNdgI_Wzp",
"floorOrder": 2,
"star": 0
},
{
"industryName": "服务",
"industryFatherName": "服务",
"industryFatherNameEn": "Services",
"shopCode": "jw-5rBFJbW6ddm6jgoQ3q",
"shopName": "18STUDIO",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "L2",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "AmNQY2Cv9pmuMvBlOPqcs",
"floorOrder": 4,
"star": 0
},
{
"industryName": "服务",
"industryFatherName": "服务",
"industryFatherNameEn": "Services",
"shopCode": "lwTTcFj19dCGdzXJf-x9a",
"shopName": "YOGA WAY",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "L1",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "p6U4SCkoJf9Xq5gBGpa3L",
"floorOrder": 3,
"star": 0
},
{
"industryName": "电器用品",
"industryFatherName": "电器用品",
"industryFatherNameEn": "Computer, Electrical & Telecom",
"shopCode": "AtwI-1jMEqCtuQTLqjtxX",
"shopName": "ALIENWARE",
"shopNameEn": "",
"logoCode": "ShVjK6R8Kw7KgK1iPPl19",
"logoUrl": "/iotFile/project-n-ww5jvpwnu0ads70lbkda/20230508/ShVjK6R8Kw7KgK1iPPl19.png",
"building": "主楼",
"floor": "L1",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "p6U4SCkoJf9Xq5gBGpa3L",
"floorOrder": 3,
"star": 0
},
{
"industryName": "电器用品",
"industryFatherName": "电器用品",
"industryFatherNameEn": "Computer, Electrical & Telecom",
"shopCode": "6pBF25FfDRWSL9VBDDHrf",
"shopName": "Miele",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "L1",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "p6U4SCkoJf9Xq5gBGpa3L",
"floorOrder": 3,
"star": 0
},
{
"industryName": "电器用品",
"industryFatherName": "电器用品",
"industryFatherNameEn": "Computer, Electrical & Telecom",
"shopCode": "xxqDL2MKuPoRt2DW1QSzF",
"shopName": "华为",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "L3",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "cun6nT_Ehbwlz1QvugH7d",
"floorOrder": 5,
"star": 0
},
{
"industryName": "家庭及育儿",
"industryFatherName": "家庭及育儿",
"industryFatherNameEn": "Children",
"shopCode": "yRzxt_N6BMGZQBt2J2ta_",
"shopName": "美泰",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "L3",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "cun6nT_Ehbwlz1QvugH7d",
"floorOrder": 5,
"star": 0
},
{
"industryName": "服装",
"industryFatherName": "服装",
"industryFatherNameEn": "Fashion",
"shopCode": "cQbvu6ExNBWVbFK5OHZC-",
"shopName": "AnyShop",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "L2",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "AmNQY2Cv9pmuMvBlOPqcs",
"floorOrder": 4,
"star": 0
},
{
"industryName": "珠宝钟表",
"industryFatherName": "珠宝钟表",
"industryFatherNameEn": "Jewellery & Watches",
"shopCode": "6aBaCSnLswq2iv2H10oFr",
"shopName": "I Do",
"shopNameEn": "",
"logoCode": "",
"building": "主楼",
"floor": "L1",
"intro": "",
"introEn": "",
"businessHours": "",
"contact": "",
"isNewShop": 0,
"xaxis": "",
"yaxis": "",
"navXaxis": "",
"navYaxis": "",
"doorMaterialList": [],
"foodMaterialList": [],
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorCode": "p6U4SCkoJf9Xq5gBGpa3L",
"floorOrder": 3,
"star": 0
}
],
"industryFatherList": [
{
"isSpecial": 0,
"industryCode": "6XSdE7NBtci0UKm7l3EGB",
"industryName": "服装",
"shopNum": 22,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "8GjYomdLIjA0R_bSlZEiu",
"industryName": "电器用品",
"shopNum": 12,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "vPTr79zC9mcA7OtUkoemx",
"industryName": "个人护理及美容",
"shopNum": 26,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "Un4t-gSLip70NJyEGfZWA",
"industryName": "汽车",
"shopNum": 7,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "Yc0r1s9YRNlTEQQAU3EF2",
"industryName": "运动",
"shopNum": 8,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "b1A6thPstKNEQnmFbvOqU",
"industryName": "家庭及育儿",
"shopNum": 44,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "JJ162vtScpFwoilL0YIuh",
"industryName": "服务",
"shopNum": 13,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "wFTMAG3UWb3CzShU_F8fa",
"industryName": "配饰",
"shopNum": 14,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "I37fOumzWtMzm8a1P8wU6",
"industryName": "教育",
"shopNum": 10,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "tvbcsyyGyUYYcF8AzBZBn",
"industryName": "超市",
"shopNum": 1,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "CrYQv6L2Bb0mWphSjTtXg",
"industryName": "珠宝钟表",
"shopNum": 5,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "0VuMSTT146CS7D5tZ8wle",
"industryName": "休闲娱乐",
"shopNum": 12,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "ZChzpRLpnm6kzHaOM8s5o",
"industryName": "名品",
"shopNum": 17,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "vVCl43nEtJPjzt-oM0ijY",
"industryName": "餐饮-咖啡馆及轻食",
"shopNum": 24,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "RrkIAL4yRiNrAvHv7m-UJ",
"industryName": "生活品味",
"shopNum": 21,
"industryList": []
},
{
"isSpecial": 0,
"industryCode": "8mis6SiB5KwmRJJB2va_m",
"industryName": "餐饮",
"shopNum": 46,
"industryList": []
}
],
"buildingList": [
{
"building": "主楼",
"buildingCode": "h-8eWvLqbPZP5cuWHY-vA",
"buildingOrder": 0,
"floorList": [
{
"floor": "B2",
"floorCode": "UytJKdq0tRQeqAJhxUUoz",
"floorOrder": 0
},
{
"floor": "B1夹层",
"floorCode": "MeqgQl4aw0NVwXgZLkC2X",
"floorOrder": 1
},
{
"floor": "B1",
"floorCode": "aBLCknS09a-0kNdgI_Wzp",
"floorOrder": 2
},
{
"floor": "L1",
"floorCode": "p6U4SCkoJf9Xq5gBGpa3L",
"floorOrder": 3
},
{
"floor": "L2",
"floorCode": "AmNQY2Cv9pmuMvBlOPqcs",
"floorOrder": 4
},
{
"floor": "L3",
"floorCode": "cun6nT_Ehbwlz1QvugH7d",
"floorOrder": 5
},
{
"floor": "L4",
"floorCode": "1Lj_Ebm8Dnao5ggE1cRtM",
"floorOrder": 6
},
{
"floor": "L5",
"floorCode": "tx-XSnQUDIJrvR4P2QEt8",
"floorOrder": 7
},
{
"floor": "空中花园",
"floorCode": "4FX0hXQgsLXsuLYCPwN0l",
"floorOrder": 8
}
]
}
]
}
}

2
public/static/offline/JSON/getFacilityList.json

@ -1 +1 @@
{"code":200,"msg":"操作成功"}
{"code":200,"msg":"操作成功", "data": []}

2
public/static/qm/MainMap_QM.js

@ -1,4 +1,4 @@
var Map_QM, renderFrame = -1, pathCameraState, stats, isJUZ = false, dir=false, iot = false, shopTime, debug = false; //dir--自定义地图大小适应不同版本的地图大小
var Map_QM, renderFrame = -1, pathCameraState, stats, isJUZ = false, dir=false, iot = true, shopTime, debug = false; //dir--自定义地图大小适应不同版本的地图大小
//basePath 基础路径 graphPath最佳路径 ftPath 扶梯路径 dtPath 电梯路径
var typeObj = [{ ft: 0, type: 0, code: 'ft', name: '扶梯' }, { upft: 1, type: 1, code: 'upft', name: '上扶梯' }, { downft: 2, type: 2, code: 'downft', name: '下扶梯' }, { mys: 3, type: 3, code: 'mys', name: '母婴室' }, { xsj: 4, type: 4, code: 'xsj', name: '洗手间' }, { dt: 5, type: 5, code: 'dt', name: '直梯' }, { hxkj: 6, type: 6, code: 'hxkj', name: '焕醒空间' },

64
src/components/Traffic/Traffic.vue

@ -128,7 +128,12 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref, toRefs } from 'vue'
import { getThirdTraffic } from '@/http/api/parking'
import { useRootStore } from '@/store/root'
import { HTTP_CODE } from '@/enums'
const store = useRootStore()
const { device } = toRefs(store)
const statusList = [
{
@ -212,43 +217,30 @@ const roadList = ref([
}
])
const resList = [
{
roadName: '九龙街',
sectionDesc: '南向北',
status: '拥堵',
speed: 21.37,
distance: 740
},
{
roadName: '青年大街',
sectionDesc: '南向北',
status: '拥堵',
speed: 21.38,
distance: 730
}
]
getThirdTraffic(device.value.projectCode).then(res => {
if (res.code === HTTP_CODE.ERR_OK) {
res.data.forEach(item => {
switch (item.roadName) {
case '沈水路':
item.sectionDesc === '东向西' ? changeStatus(item.status, roadList.value[0]) : changeStatus(item.status, roadList.value[1])
break
case '九龙街':
if (item.sectionDesc === '南向北' || item.sectionDesc === '东向西') {
changeStatus(item.status, roadList.value[2])
changeStatus(item.status, roadList.value[4])
} else {
changeStatus(item.status, roadList.value[3])
changeStatus(item.status, roadList.value[5])
}
break
case '青年大街':
item.sectionDesc === '南向北' ? changeStatus(item.status, roadList.value[6]) : changeStatus(item.status, roadList.value[7])
break
resList.forEach(item => {
switch (item.roadName) {
case '沈水路':
item.sectionDesc === '东向西' ? changeStatus(item.status, roadList.value[0]) : changeStatus(item.status, roadList.value[1])
break
case '九龙街':
if (item.sectionDesc === '南向北' || item.sectionDesc === '东向西') {
changeStatus(item.status, roadList.value[2])
changeStatus(item.status, roadList.value[4])
} else {
changeStatus(item.status, roadList.value[3])
changeStatus(item.status, roadList.value[5])
default:
break
}
break
case '青年大街':
item.sectionDesc === '南向北' ? changeStatus(item.status, roadList.value[6]) : changeStatus(item.status, roadList.value[7])
break
default:
break
})
}
})

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

@ -1,5 +1,9 @@
import { request } from '../../http'
//找车
export const getFindCar = (license: string) => request<CarInfo>({ url: `/ThirdPark/GetPlaceInfo?carCode=${license}` })
// 找车
export const getFindCar = (plateId: string) => request<CarInfo>({ url: `/v1/web/thirdPark`, data: { plateId }, method: 'post' })
// 周边交通
export const getThirdTraffic = (projectCode: string) =>
request<Traffic[]>({ url: `/v1/web/thirdTraffic`, params: { projectCode }, method: 'get' })
export const getParkingInfo = () => request<ParkingInfo>({ url: `/JSON/getParkingInfo.json` })

8
src/types/car.d.ts

@ -9,3 +9,11 @@ declare interface CarInfo {
parkingTime: string // 停车时长
spaceNo: string //车位号
}
declare interface Traffic {
roadName: string
sectionDesc: string
status: string
speed: number
distance: number
}

Loading…
Cancel
Save