This commit is contained in:
管理员 2025-09-12 18:38:47 +08:00
parent 72bd0cfe84
commit 3e93875e98
37 changed files with 370 additions and 245 deletions

42
App.vue
View File

@ -20,36 +20,42 @@
// #endif
uni.setStorageSync('cid', _Android)
if (uni.getStorageSync('token')) {
// #ifdef APP-PLUS
let _toure = getCurrentPages();
if (_toure[0].route != 'pages/index') {
uni.reLaunch({
url: "/pages/index",
success() {
// #ifdef APP-PLUS
// APP
setTimeout(() => {
upapp()
}, 1000)
// #endif
}
success() {}
})
}
// #endif
// #ifdef H5
uni.reLaunch({
url: "/pages/index",
success() {}
})
// #endif
} else {
uni.reLaunch({
url: "/pages/signIn",
success() {
// #ifdef APP-PLUS
// APP
setTimeout(() => {
upapp()
}, 1000)
// #endif
}
})
}
// #ifdef APP-PLUS
setTimeout(() => {
plus.navigator.setFullscreen(true)
}, 500)
// APP
setTimeout(() => {
upapp()
}, 5000)
// #endif
},
onShow: function() {
@ -67,18 +73,22 @@
color: #667085;
font-size: 14rpx;
}
.numcolor1 {
background: #3336E0;
color: #fff;
}
.numcolor2 {
.numcolor3 {
background: #07C688;
color: #fff;
}
.numcolor3 {
.numcolor2 {
background: #FF9521;
color: #fff;
}
.numcolor4 {
background: #333333;
color: #fff;

View File

@ -79,9 +79,9 @@
}
}
daydata.value = getCompleteMonthData()
chooseday.value=daydata.value.day[0];
reset()
// reset()
function close(){
Props.modelValue=false;
adssEmits("update:modelValue",false)

View File

@ -14,6 +14,9 @@
"landscape-primary", //
"landscape-secondary"
],
"statusbar" : {
"immersed" : true
},
"runmode" : "liberate",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
@ -53,6 +56,8 @@
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
@ -146,7 +151,7 @@
//
"proxy" : {
"/api" : {
"target" : "http://192.168.1.7:9005",
"target" : "http://speed-bl.renyizhi.cc",
"changeOrigin" : true,
"secure" : false
}

View File

@ -4,16 +4,8 @@
{
"path": "pages/index",
"style": {
"navigationStyle": "custom",
"app-plus":{
"subNVues": [{
"id": "hkcamera", //
"path": "pages/subNVue/camera" ,//
"style": {
"width": "0px"
}
}]
}
"navigationStyle": "custom"
}
},
{

View File

@ -13,31 +13,31 @@
<view class="tabnav">
<view class="li" :class="{on:selectindex==0}" @click="settab(0)">
<view class="l">
<image :src="`/static/tab/${selectindex==0?11:1}.png`"></image>
<image :src="`/static/tab/${selectindex==0?1:11}.png`"></image>
</view>
<view class="text">预警信息</view>
</view>
<view class="li" :class="{on:selectindex==1}" @click="settab(1)">
<view class="l">
<image :src="`/static/tab/${selectindex==1?22:2}.png`"></image>
<image :src="`/static/tab/${selectindex==1?2:22}.png`"></image>
</view>
<view class="text">过车信息</view>
</view>
<view class="li" :class="{on:selectindex==2}" @click="settab(2)">
<view class="l">
<image :src="`/static/tab/${selectindex==2?33:3}.png`"></image>
<image :src="`/static/tab/${selectindex==2?3:33}.png`"></image>
</view>
<view class="text">历史记录</view>
</view>
<view class="li" :class="{on:selectindex==3}" @click="settab(3)">
<view class="l">
<image :src="`/static/tab/${selectindex==3?44:4}.png`"></image>
<image :src="`/static/tab/${selectindex==3?4:44}.png`"></image>
</view>
<view class="text">统计数据</view>
</view>
<view class="li" :class="{on:selectindex==4}" @click="settab(4)">
<view class="l">
<image :src="`/static/tab/${selectindex==4?55:5}.png`"></image>
<image :src="`/static/tab/${selectindex==4?5:55}.png`"></image>
</view>
<view class="text">预警设置</view>
</view>
@ -47,10 +47,11 @@
<view class="bottom">
<view class="title">设备</view>
<view class="item" v-for="item in allDevices"
:class="{on1:(selectindex==5 && Devicesid==item.id),on:item.status==2}"
:class="{on1:(selectindex==5 && Devicesid==item.encoding),on:item.status==2}"
@click.stop="setshowDevices(item)">
<view class="l">
<image src="/static/equipmentno.png"></image>
<image v-if="item.status==2 " src="/static/equipmenton.png"></image>
<image v-else src="/static/equipmentno.png"></image>
<view class="name">设备{{item.encoding}}</view>
</view>
<view class="r"></view>
@ -74,9 +75,7 @@
<setUp ref="refsetUp" />
</view>
<view class="subpage" v-show="state[5]==1">
<qjcamera ref="refcamera" />
</view>
</view>
</view>
@ -94,7 +93,7 @@
import statistics from "./pages/statistics.vue"
import passingTheCar from "./pages/passingTheCar.vue"
import warningInformation from "./pages/warningInformation.vue"
import qjcamera from "./subNVue/camera.nvue"
import {
nextTick,
ref,
@ -107,7 +106,8 @@
import {
onBackPress,
onShow
onShow,
onUnload
} from "@dcloudio/uni-app"
//
@ -121,16 +121,14 @@
const showout = ref(false);
const showsignOut = ref(false);
//
//
const allDevices = ref([])
const Devicesid = ref('')
//
const state = ref([0, 0, 0, 0, 0, 0]) //0 1 2
nextTick(() => {
settab(0)
settab(0);
})
//
let _isback = false;
uni.$on('back', (e) => {
@ -140,8 +138,6 @@
uni.$emit('close')
return _isback
})
uni.$on('LOGOUT', () => {
// token
// WebSocket
@ -161,17 +157,30 @@
// #endif
})
let _getequipment;
onShow(() => {
//
clearInterval(_getequipment)
getequipmentinfo()
_getequipment=setInterval(()=>{
getequipmentinfo()
},10000)
})
onUnload(()=>{
clearInterval(_getequipment)
})
//
function getequipmentinfo(){
getequipment().then(r => {
allDevices.value = r.data ? r.data.allDevices : []
})
})
}
// 退
function outsignOut() {
showout.value = false;
uni.$emit('Socketclose')
uni.removeStorageSync("token");
uni.removeStorageSync("USERID")
//
@ -184,47 +193,23 @@
function hidesub() {
_is = true;
// #ifdef APP
let subNVue = uni.getSubNVueById("hkcamera")
subNVue.hide('fade-out', 300)
// #endif
showsignOut.value = false;
uni.$emit("camerahide")
}
// l
function setshowDevices(item) {
//
selectindex.value=5;
Devicesid.value=item.id;
if (!_is) {
return
}
_is = false;
function setsbuview() {
let subNVue = uni.getSubNVueById("hkcamera")
subNVue.hide()
let query = uni.createSelectorQuery();
query
.select("#rightbox")
.boundingClientRect((data) => {
subNVue.setStyle({
width: data.width + 'px',
right: "0px"
})
subNVue.show('slide-in', 500, function() {
uni.$emit("camerashow")
});
})
.exec();
}
setsbuview()
// Devicesid.value=item.encoding;
// //
// if (!_is ) {
// return
// }
// _is = false;
// selectindex.value=5;
}
//
uni.getNetworkType({
success: function(res) {
@ -369,13 +354,16 @@
z-index: 9999;
.tabnav {
margin-top: 35rpx;
margin-top: 24rpx;
.li {
margin-bottom: 18rpx;
display: flex;
align-items: center;
.text {
color: #B9BAC9;
}
&.on {
.l {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
@ -465,6 +453,7 @@
.bottom {
.title {
color: #fff;
font-size: 12rpx;
}
.item {
@ -483,8 +472,8 @@
.name {
color: rgba(255, 255, 255, 0.4);
font-size: 9rpx;
margin: 0rpx 4rpx;
font-size: 11rpx;
margin: 0rpx 8rpx;
}
image {

View File

@ -33,13 +33,16 @@
</block>
<block v-else>
<view class="fn fx" style="opacity: 0;">站位</view>
<view class="fn released" v-if="info.basicInfo?.status==4" >已放行</view>
<view class="fn fx" v-else style="opacity: 0;">站位</view>
</block>
</view>
</view>
<scroll-view :scroll-y="true" :scroll-top="scrolltop">
<scroll-view :scroll-y="true" :scroll-top="scrolltop" @scroll='setscrolltop'>
<view class="detailspage" @click="tips=false">
<view class="time">
<view class="l">超速信息</view>
<view class="r" v-if="info.releaseInfo?.releaseTime">放行时间{{info.releaseInfo?.releaseTime}}</view>
</view>
@ -49,7 +52,7 @@
车牌号码
</view>
<view class="txt">
<view class="number">{{info.basicInfo?.vehicleNumber}}</view>
<view class="number" :class="`numcolor${info.basicInfo?.vehicleNumberType}`">{{info.basicInfo?.vehicleNumber}}</view>
</view>
<view class="title">超速等级</view>
<view class="txt">
@ -62,7 +65,7 @@
</view>
<view class="txt">
{{info.intervalInfo?.startDeviceJson?.position}}
<view>{{info.intervalInfo?.startDeviceJson?.longitude}} / {{info.intervalInfo?.startDeviceJson?.latitude}}</view>
<view>{{info.intervalInfo?.startDeviceJson?.longitude.toFixed(6)}} / {{info.intervalInfo?.startDeviceJson?.latitude.toFixed(6)}}</view>
</view>
</view>
@ -72,7 +75,7 @@
</view>
<view class="txt">
{{info.intervalInfo?.endDeviceJson?.position}}
<view>{{info.intervalInfo?.endDeviceJson?.longitude}} / {{info.intervalInfo?.endDeviceJson?.latitude}}</view>
<view>{{info.intervalInfo?.endDeviceJson?.longitude.toFixed(6)}} / {{info.intervalInfo?.endDeviceJson?.latitude.toFixed(6)}}</view>
</view>
</view>
@ -131,7 +134,7 @@
设备{{info.intervalInfo?.startId}} 抓取照片
</view>
<view class="img">
<image @click="openimg(info.imageInfo?.startDeviceImage)" :src="info.imageInfo?.startDeviceImage"></image>
<image mode="aspectFit" @click="openimg(info.imageInfo?.startDeviceImage)" :src="info.imageInfo?.startDeviceImage"></image>
<view class="time">{{info.intervalInfo?.startDeviceTime}}</view>
</view>
</view>
@ -140,7 +143,7 @@
设备{{info.intervalInfo?.endId}} 抓取照片
</view>
<view class="img">
<image @click="openimg(info.imageInfo?.endDeviceImage)" :src="info.imageInfo?.endDeviceImage"></image>
<image mode="aspectFit" @click="openimg(info.imageInfo?.endDeviceImage)" :src="info.imageInfo?.endDeviceImage"></image>
<view class="time">{{info.intervalInfo?.endDeviceTime}}</view>
</view>
</view>
@ -159,11 +162,11 @@
<view class="ul">
<view class="title">暂扣照片</view>
<view class="txt img">
<image @click="openimg(info.imageInfo?.detainStartImage)" v-if="info.imageInfo?.detainStartImage" :src="info.imageInfo?.detainStartImage"></image>
<image mode="aspectFit" @click="openimg(info.imageInfo?.detainStartImage)" v-if="info.imageInfo?.detainStartImage" :src="info.imageInfo?.detainStartImage"></image>
</view>
<view class="title">放行照片</view>
<view class="txt img">
<image @click="openimg(info.imageInfo?.releaseImage)" v-if="info.imageInfo?.releaseImage" :src="info.imageInfo?.releaseImage"></image>
<image mode="aspectFit" @click="openimg(info.imageInfo?.releaseImage)" v-if="info.imageInfo?.releaseImage" :src="info.imageInfo?.releaseImage"></image>
</view>
</view>
</view>
@ -185,7 +188,7 @@
</view>
</view>
<view class="upimg" @click="upimg">
<image :src="imgs" v-if="imgs"></image>
<image :src="imgs" mode="aspectFit" v-if="imgs"></image>
<view class="icon" v-else>
<uni-icons color="#4D7BFF" type="plusempty" size="30rpx"></uni-icons>
<view class="h3">上传照片</view>
@ -219,10 +222,18 @@
const imgs = ref("")
const encoding=ref("")
const info=ref({})
//
const time=ref("")
let timer;
let _throttle;
//
function setscrolltop(e){
clearTimeout(_throttle)
_throttle=setTimeout(()=>{
scrolltop.value=e.detail.scrollTop
},500)
}
function showtips(){
uni.showToast({
title:"未到放行时间",
@ -340,14 +351,15 @@
encoding.value=id;
type.value = indextype
showupimg.value = true;
scrolltop.value=10;
getinfo()
}
function getinfo(){
scrolltop.value=0;
getdetails({encoding:encoding.value}).then(res=>{
info.value=res.data;
scrolltop.value=0;
if(type.value==2){
upreleasetype()
@ -436,14 +448,16 @@
display: flex;
align-items: center;
image {
width: 31rpx;
height: 31rpx;
margin-right: 15rpx;
}
.typename {
font-weight: 800;
font-size: 13rpx;
color: #333333;
}
@ -466,11 +480,12 @@
image{
width: 100%;
height: 100%;
background: #000;
}
.icon {
.h3 {
font-weight: 800;
color: #4D7BFF;
font-size: 11rpx;
margin-top: 10rpx;
@ -494,7 +509,7 @@
border-radius: 100rpx;
line-height: 32rpx;
font-size: 11rpx;
font-weight: 800;
background: #E8EEF5;
&:nth-of-type(2) {
@ -526,19 +541,19 @@
margin-right: 7rpx;
}
font-weight: 800;
font-size: 11rpx;
color: #4D7BFF;
}
.title {
font-weight: 800;
font-size: 11rpx;
color: #333333;
}
.fn {
font-weight: 800;
background: #FE5F13;
color: #fff;
padding: 7rpx 30rpx;
@ -599,6 +614,12 @@
&.yfx {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
}
&.released{
color: #666;
background: transparent;
padding:7rpx 0rpx;
}
}
}
@ -614,13 +635,13 @@
justify-content: space-between;
.l {
font-weight: 800;
font-size: 11rpx;
color: #333333;
}
.r {
font-weight: 800;
font-size: 11rpx;
color: #4D7BFF;
}
@ -630,20 +651,20 @@
margin: 10rpx 0rpx 0rpx;
border-radius: 3rpx;
overflow: hidden;
border: 1px solid #A0A0A0;
border: 1px solid #c0cdde;
color:#333;
.item {
display: flex;
// align-items: center;
justify-content: space-between;
border-bottom: 1px solid #A0A0A0;
border-bottom: 1px solid #c0cdde;
&>view {
&:nth-last-of-type(1) {
border: none;
}
border-right: 1px solid #A0A0A0;
border-right: 1px solid #c0cdde;
}
&:nth-last-of-type(1) {
@ -666,7 +687,7 @@
flex: 1;
font-size: 9rpx;
text-align: left;
padding:10rpx 7rpx;
padding:0rpx 7rpx;
display: flex;
justify-content: space-between;
align-items: center;
@ -674,6 +695,9 @@
view {
font-size: 9rpx;
}
.number{
padding:3rpx 10rpx;
}
}
}
@ -690,7 +714,8 @@
.title {
margin: 10rpx 0;
font-size: 11rpx;
font-weight: 800;
color:#333;
}
.img {
@ -703,6 +728,7 @@
image {
width: 100%;
height: 100%;
background: #000;
}
.time {
@ -721,11 +747,11 @@
&>.title {
margin: 7rpx 0;
font-size: 11rpx;
font-weight: 800;
color:#333;
}
.tbody {
border: 1px solid #A0A0A0;
border: 1px solid #c0cdde;
border-radius: 3rpx;
overflow: hidden;
@ -737,7 +763,7 @@
border: none;
}
border-bottom: 1px solid #A0A0A0;
border-bottom: 1px solid #c0cdde;
.title {
font-size: 9rpx;
@ -745,8 +771,8 @@
text-align: center;
background: #F3F5F8;
padding: 7rpx;
border-left: 1px solid #A0A0A0;
border-right: 1px solid #A0A0A0;
border-left: 1px solid #c0cdde;
border-right: 1px solid #c0cdde;
&:nth-of-type(1) {
border-left: none;
@ -763,6 +789,7 @@
height: 94rpx;
margin: 0rpx;
border-radius: 5rpx;
background: #000;
}
}
}

View File

@ -68,6 +68,16 @@
const pageNum=ref(1);
const hasNextPage=ref(true)
//
//
setday()
function setday(){
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
queryDate.value= `${year}-${month}-${date.getDate()}`
}
//
function openinfo(id){
refdetails.value.show(id)
@ -123,7 +133,7 @@
//
function reset(){
queryDate.value="";
setday()
vehicleNumber.value=""
Selectiondate.value.reset();
showdate.value=false;
@ -180,7 +190,7 @@
line-height: 20rpx;
margin-top: 8rpx;
text-align: center;
font-weight: 800;
font-size: 11rpx;
}
}
@ -255,7 +265,7 @@
color: #fff;
font-size: 11rpx;
text-align: center;
font-weight: 800;
}
@ -276,7 +286,7 @@
}
.time {
font-weight: 800;
font-size: 11rpx;
color: #000000;
}

View File

@ -2,16 +2,18 @@
<view class="subpage">
<view class="top">
<view class="left">
<view v-for="item in devices" :class="{on:deviceId==item.encoding}" @click="setdeviceid(item.encoding)">设备{{item.encoding}}</view>
<view v-for="item in devices" :class="{on:deviceId==item.encoding}" @click="setdeviceid(item.encoding)">
设备{{item.encoding}}</view>
</view>
<view class="r">
{{timeFormat(getdata,"yyyy年mm月dd日hh时MM分ss秒")}}
<view>区间测速实时监测中</view>
<view v-if="type==2">区间测速实时监测中</view>
<view v-if="type==1" class="no">测速未启动</view>
</view>
</view>
<view class="center">
<view class="item">
<view class="num">{{infodata.todayCount}}</view>
<view class="num">{{infodata.todayCount || 0}}</view>
<view class="title">当天过车数量</view>
</view>
<view class="item">
@ -30,6 +32,7 @@
</view>
<view class="r">{{item.queryTime}}</view>
</view>
<view style="height: 10rpx;"></view>
<nynull txt='暂无过车数据' v-if="!list.length"></nynull>
</scroll-view>
</view>
@ -43,27 +46,54 @@
getequipment,
getpassingTheCar
} from "/appapi/index.js"
const deviceId = ref("")
const devices = ref([]);
const infodata = ref({})
const list = ref([])
import { timeFormat } from '@/uni_modules/uv-ui-tools/libs/function/index.js';
import {
timeFormat
} from '@/uni_modules/uv-ui-tools/libs/function/index.js';
//
const pageSize = ref(40);
const pageNum = ref(1);
const hasNextPage = ref(true)
const getdata = ref(new Date().getTime())
const type=ref(1); //
function load() {
console.log('过车信息load')
}
function hide() {
console.log('过车信息hide')
clearInterval(_getequipment)
}
let _getequipment;
function show() {
getequipmentinfo()
//
clearInterval(_getequipment)
function getinfo(){
getequipment().then(r => {
try{
if(r.data.allDevices[0].status==2 && r.data.allDevices[1].status==2){
type.value=2;
}else{
type.value=1;
}
} catch{
type.value=1;
}
})
}
getinfo()
_getequipment = setInterval(() => {
getinfo()
}, 10000)
console.log('过车信息show')
}
@ -84,13 +114,19 @@
}
//
const daytiem = ref(new Date().getTime());
const showday=ref("刚刚")
const showday = ref("")
let _eliminate;
function getinfo() {
clearInterval(_eliminate)
getpassingTheCar({deviceId:deviceId.value,pageNum:pageNum.value,pageSize:pageSize.value}).then(r=>{
getpassingTheCar({
deviceId: deviceId.value,
pageNum: pageNum.value,
pageSize: pageSize.value
}).then(r => {
infodata.value = r.data;
daytiem.value=r.data.vehicleList[0]?new Date(r.data.vehicleList[0].queryTime).getTime():0;
daytiem.value = r.data.vehicleList[0] ? new Date(r.data.vehicleList[0].queryTime).getTime() :
new Date().getTime();
list.value = list.value.concat(r.data.vehicleList)
hasNextPage.value = r.data.hasNextPage;
settiem()
@ -116,6 +152,7 @@
//
})
function timeAgo() {
const now = new Date();
const past = new Date(daytiem.value);
@ -128,8 +165,9 @@
if (days > 0) return `${days}天前`;
if (hours > 0) return `${hours}小时前`;
if (minutes > 0) return `${minutes}分钟前`;
return `${seconds}秒前`;
return `${seconds>=0?seconds:0}秒前`;
}
function settiem() {
_eliminate = setInterval(() => {
getdata.value = new Date().getTime()
@ -185,7 +223,7 @@
.r {
display: flex;
align-items: center;
font-weight: 800;
font-size: 11rpx;
view {
@ -195,8 +233,13 @@
border-radius: 50rpx;
padding: 3rpx 10rpx;
margin-left: 15rpx;
&.no{
background: linear-gradient( 168deg, #FFFDFD 0%, #FFD9D2 100%);
color: #EA1313;
}
}
}
}
.center {
@ -214,7 +257,7 @@
.num {
font-size: 22rpx;
color: #4D7BFF;
font-weight: 800;
}
.title {
@ -238,12 +281,12 @@
.li {
display: flex;
padding: 15rpx;
padding: 14rpx 15rpx;
background: #fff;
justify-content: space-between;
align-items: center;
border-radius: 3rpx;
margin-bottom: 15rpx;
margin-bottom: 9rpx;
.l {
display: flex;

View File

@ -20,8 +20,9 @@
</view>
</view>
<view class="right">
<view class="title">预警设置</view>
<scroll-view :scroll-y="true" class="box" :scroll-top="scroll">
<view class="title">预警设置</view>
<view class="li">
<view class="name">设备{{pointPosition1.id}}</view>
<view class="text">
@ -73,22 +74,22 @@
<view class="name">预警级别</view>
<view class="singleChoice">
<view class="item" :class="{on:speeding==999}" @click="speeding=999">
<uni-icons :type="speeding==999?'checkbox-filled':'circle'" size="15rpx"
<uni-icons :type="speeding==999?'checkbox-filled':'circle'" size="16rpx"
:color="speeding==999?'#fff':'#D1D6DF'"></uni-icons>
<text class="type">全部超速</text>
</view>
<view class="item" :class="{on:speeding==1}" @click="speeding=1">
<uni-icons :type="speeding==1?'checkbox-filled':'circle'" size="15rpx"
<uni-icons :type="speeding==1?'checkbox-filled':'circle'" size="16rpx"
:color="speeding==1?'#fff':'#D1D6DF'"></uni-icons>
<text class="type">超速10%以上</text>
</view>
<view class="item" :class="{on:speeding==2}" @click="speeding=2">
<uni-icons :type="speeding==2?'checkbox-filled':'circle'" size="15rpx"
<uni-icons :type="speeding==2?'checkbox-filled':'circle'" size="16rpx"
:color="speeding==3?'#fff':'#D1D6DF'"></uni-icons>
<text class="type">超速20%以上</text>
</view>
<view class="item" :class="{on:speeding==5}" @click="speeding=5">
<uni-icons :type="speeding==5?'checkbox-filled':'circle'" size="15rpx"
<uni-icons :type="speeding==5?'checkbox-filled':'circle'" size="16rpx"
:color="speeding==5?'#fff':'#D1D6DF'"></uni-icons>
<text class="type">超速50%以上</text>
</view>
@ -127,11 +128,12 @@
marker2: {
el: "",
point: {}
}
},
}
},
methods: {
createMap(){
createMap(fn=function(){}){
// JS
window.BMAP_PROTOCOL = "https";
window.BMapGL_loadScriptTime = new Date().getTime();
@ -146,7 +148,9 @@
script.src =
`https://api.map.baidu.com/getscript?v=3.0&ak=${BAIDUKEY}&services=&t=2025082517022`;
document.body.appendChild(script);
script.onload=function(){
fn()
}
var link = document.createElement("link");
link.rel = "stylesheet";
link.type = "text/css";
@ -198,24 +202,31 @@
},
init(e) {
let _this = this;
console.log(999999)
// alert(typeof BMapGL)
if (typeof BMapGL != "undefined") {
console.log(111)
_map = new BMapGL.Map('baiduimap'); // Map
var point = new BMapGL.Point(116.404, 39.915); //
_map.centerAndZoom(point, 13);
_map.enableScrollWheelZoom();
//
if(e){
if(typeof e == "function"){
e()
}else{
this.mapsetEmit({
type: e.type,
data: {}
})
}
}
}
},
clearmap(e){
_map.clearOverlays()
if(_map){_map.clearOverlays()}
this.marker2={
el: "",
point: {}
@ -238,7 +249,7 @@
},
showsetcenter(e) {
if (_map) {
console.log(e)
console.log(6666666)
_map.clearOverlays()
var point = new BMapGL.Point(e.data.longitude, e.data.latitude);
_map.setCenter(point);
@ -444,12 +455,37 @@
},
// renderjs
mapgetEmit(e) {
let _this=this;
if(e.type){
//
if(typeof BMapGL == "undefined"){
console.log(typeof BMapGL)
_this.createMap(function(){
// JS
setTimeout(()=>{
_this.init(function(){
_this[e.type](e);
})
},1500)
})
}
if(typeof BMapGL != "undefined" && !_map){
this.init(()=>{
this[e.type](e);
})
}
if(typeof BMapGL != "undefined" && _map){
if (e.type && suspend == false) {
suspend = true;
this[e.type](e);
console.log(e.type)
}
}
}
clearTimeout(timing)
//
@ -519,6 +555,7 @@
//
this.showmap=true;
this.type=1;
this.setEmit({
type: "clearmap",
data: {}
@ -582,22 +619,23 @@
},
load() {
console.log('load')
this.setEmit({
type: "init",
data: {}
}, () => {
})
// this.setEmit({
// type: "init",
// data: {}
// }, () => {
// this.show()
// })
},
hide() {
},
show() {
let _this = this;
this.type=1;
this.scroll=10;
getequipment().then(r => {
this.scroll=0;
this.pointPosition1 = {
id: r.data.allDevices[0].encoding,
}
@ -613,8 +651,6 @@
lng: Number(r.data.allDevices[0].longitude),
lat: Number(r.data.allDevices[0].latitude)
}
}
if (r.data.allDevices[1].position) {
this.pointPosition2.address = {
@ -661,11 +697,6 @@
})
}
})
},
@ -730,7 +761,7 @@
};
}
this.isPositionall()
console.log(this.pointPosition1, this.pointPosition2)
})
},
@ -881,7 +912,7 @@
scroll-view {
padding: 0 18rpx;
box-sizing: border-box;
height: calc(100% - 100rpx);
height: calc(100% - 50rpx);
.li {
display: flex;
@ -931,7 +962,7 @@
.type {
font-weight: 500;
font-size: 9rpx;
font-size: 11rpx;
margin-left: 5rpx;
color: #000;
}

View File

@ -56,6 +56,7 @@
const script = document.createElement('script')
// view www www
script.src = 'static/echarts.min.js'
document.head.appendChild(script)
}
},
@ -71,7 +72,9 @@
let allnum = r.overspeedStatistics.overspeedOver50 + r.overspeedStatistics.overspeed20To50 + r
.overspeedStatistics.overspeed10To20 + r.overspeedStatistics.overspeedUnder10
myChart = echarts.init(document.getElementById("echart"))
console.log(5555,allnum)
myChart.setOption({
grid: {
top: 20,
// right: 0,
@ -145,7 +148,7 @@
],
}
]
})
},true)
}
}
@ -166,6 +169,19 @@
const showdate = ref(false)
const Selectiondate = ref();
const queryDate = ref("")
//
setday()
function setday(){
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
queryDate.value= `${year}-${month}-${date.getDate()}`
}
const info = ref({})
const chartData = ref({})
@ -178,7 +194,7 @@
function reset() {
Selectiondate.value.reset();
queryDate.value = "";
setday()
getinfo()
}
@ -224,10 +240,12 @@
}
function getinfo() {
getmonitorStatistics({
queryDate: queryDate.value
}).then(r => {
info.value = r.data;
})
}
defineExpose({
@ -240,6 +258,7 @@
<style scoped lang="scss">
.charts-box {
height: 150rpx;
}
.totalTime {
@ -314,10 +333,9 @@
color: #fff;
font-size: 11rpx;
text-align: center;
font-weight: 800;
}
.left {
display: flex;
align-items: center;
@ -335,7 +353,7 @@
}
.time {
font-weight: 800;
font-size: 11rpx;
color: #000000;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 B

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1002 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 B

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 KiB

After

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 B

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 KiB

After

Width:  |  Height:  |  Size: 142 KiB