This commit is contained in:
管理员 2025-09-10 19:01:42 +08:00
parent e693d9b8be
commit 72bd0cfe84
13 changed files with 455 additions and 344 deletions

View File

@ -1,5 +1,4 @@
<script>
import soket from "/utils/soket.js"
import upapp from "/utils/upapp.js"
export default {
onLaunch: function() {
@ -21,7 +20,6 @@
// #endif
uni.setStorageSync('cid', _Android)
if (uni.getStorageSync('token')) {
soket()
uni.reLaunch({
url: "/pages/index",
success() {

View File

@ -72,14 +72,16 @@
}
return _data;
}
return {
day,
monthGroups:Object.values(monthGroups)
}
}
daydata.value = getCompleteMonthData()
// chooseday.value=daydata.value.day[0]
reset()
function close(){
Props.modelValue=false;
adssEmits("update:modelValue",false)
@ -94,8 +96,9 @@
}
function reset(){
// chooseday.value=daydata.value.day[0];
chooseday.value=daydata.value.day[0];
dayindex.value=0;
adssEmits("change",chooseday.value)
}
defineExpose({
reset

18
main.js
View File

@ -1,22 +1,26 @@
import App from './App'
import soket from "/utils/soket.js"
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
...App
})
app.$mount()
soket()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
import {
createSSRApp
} from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
const app = createSSRApp(App)
soket()
return {
app
}
}
// #endif

View File

@ -2,8 +2,8 @@
"name" : "区间测速",
"appid" : "__UNI__E207F22",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionName" : "1.0.1",
"versionCode" : 101,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -146,7 +146,7 @@
//
"proxy" : {
"/api" : {
"target" : "http://speed-bl.renyizhi.cc",
"target" : "http://192.168.1.7:9005",
"changeOrigin" : true,
"secure" : false
}

View File

@ -70,7 +70,10 @@
"navigationBarTextStyle": "black",
"navigationBarTitleText": "区间测速",
"navigationBarBackgroundColor": "#F8F8F8",
"pageOrientation": "portrait"
"pageOrientation": "portrait",
"app-plus": {
"bounce": "none"
}
},
"uniIdRouter": {}

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/1.png"></image>
<image :src="`/static/tab/${selectindex==0?11:1}.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/2.png"></image>
<image :src="`/static/tab/${selectindex==1?22:2}.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/3.png"></image>
<image :src="`/static/tab/${selectindex==2?33:3}.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/4.png"></image>
<image :src="`/static/tab/${selectindex==3?44:4}.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/5.png"></image>
<image :src="`/static/tab/${selectindex==4?55:5}.png`"></image>
</view>
<view class="text">预警设置</view>
</view>
@ -145,8 +145,10 @@
uni.$on('LOGOUT', () => {
// token
// WebSocket
uni.$emit('Socketclose')
uni.removeStorageSync("token");
uni.removeStorageSync("USERID")
uni.$emit('Socketclose')
// h5
// #ifdef H5
showout.value = true;
@ -170,7 +172,8 @@
// 退
function outsignOut() {
showout.value = false;
uni.removeStorageSync("token");
uni.removeStorageSync("USERID")
//
uni.reLaunch({
url: "/pages/signIn"
@ -181,8 +184,10 @@
function hidesub() {
_is = true;
// #ifdef APP
let subNVue = uni.getSubNVueById("hkcamera")
subNVue.hide('fade-out', 300)
// #endif
showsignOut.value = false;
uni.$emit("camerahide")
@ -520,6 +525,8 @@
width: 600rpx;
margin-left: 150rpx;
background: #E7E7ED;
overflow: hidden;
height: 100vh;
}
}
</style>

View File

@ -17,149 +17,160 @@
</view>
</view>
</block>
<block v-if="type==2">
<view class="fn fx" v-if="!yesok" @click="showupimg=true">放行</view>
<view class="fn yfx" :class="{aft:tips}" v-if="yesok" @click="setrelease">
确认放行
<view class="tc" v-if="tips">
<image src="/static/dp.png"></image> 是否确定放行该车辆请点击此按钮
<block v-else-if="type==2">
<block v-if="info.type">
<view class="fn fx" v-if="!yesok" @click="showupimg=true">放行</view>
<view class="fn yfx" :class="{aft:tips}" v-if="yesok" @click="setrelease">
确认放行
<view class="tc" v-if="tips">
<image src="/static/dp.png"></image> 是否确定放行该车辆请点击此按钮
</view>
</view>
</view>
</block>
<block v-else>
<view class="fn fx grey" v-if="!yesok" @click="showtips">放行</view>
</block>
</block>
<block v-else>
<view class="fn fx" style="opacity: 0;">站位</view>
</block>
</view>
</view>
<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>
<view class="form">
<view class="item">
<view class="title">
车牌号码
</view>
<view class="txt">
<view class="number">{{info.basicInfo?.vehicleNumber}}</view>
</view>
<view class="title">超速等级</view>
<view class="txt">
{{info.overspeedInfo?.overspeedLevelInformation}}
</view>
<scroll-view :scroll-y="true" :scroll-top="scrolltop">
<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>
<view class="item">
<view class="title">
设备{{info.intervalInfo?.startId}}位置
</view>
<view class="txt">
{{info.intervalInfo?.startDeviceJson?.position}}
<view>{{info.intervalInfo?.startDeviceJson?.longitude}} / {{info.intervalInfo?.startDeviceJson?.latitude}}</view>
<view class="form">
<view class="item">
<view class="title">
车牌号码
</view>
<view class="txt">
<view class="number">{{info.basicInfo?.vehicleNumber}}</view>
</view>
<view class="title">超速等级</view>
<view class="txt">
{{info.overspeedInfo?.overspeedLevelInformation}}
</view>
</view>
<view class="item">
<view class="title">
设备{{info.intervalInfo?.startId}}位置
</view>
<view class="txt">
{{info.intervalInfo?.startDeviceJson?.position}}
<view>{{info.intervalInfo?.startDeviceJson?.longitude}} / {{info.intervalInfo?.startDeviceJson?.latitude}}</view>
</view>
</view>
<view class="item">
<view class="title">
设备{{info.intervalInfo?.endId}}位置
</view>
<view class="txt">
{{info.intervalInfo?.endDeviceJson?.position}}
<view>{{info.intervalInfo?.endDeviceJson?.longitude}} / {{info.intervalInfo?.endDeviceJson?.latitude}}</view>
</view>
</view>
<view class="item">
<view class="title">
通过设备{{info.intervalInfo?.startId}}时间
</view>
<view class="txt">
{{info.intervalInfo?.startDeviceTime}}
</view>
<view class="title">区间距离</view>
<view class="txt">
{{info.intervalInfo?.zoneDistanceText}}
</view>
</view>
<view class="item">
<view class="title">
通过设备{{info.intervalInfo?.endId}}时间
</view>
<view class="txt">
{{info.intervalInfo?.endDeviceTime}}
</view>
<view class="title">区间限速</view>
<view class="txt">
{{info.intervalInfo?.speedText}}
</view>
</view>
<view class="item">
<view class="title">
最短行驶时长
</view>
<view class="txt">
{{info.intervalInfo?.passingTimeText}}
</view>
<view class="title">实际行驶时长</view>
<view class="txt">
{{info.overspeedInfo?.exerciseDurationText}}
</view>
</view>
<view class="item">
<view class="title">
平均车速
</view>
<view class="txt">
{{info.overspeedInfo?.averageSpeedText}}
</view>
<view class="title">待休息时长</view>
<view class="txt">
{{info.overspeedInfo?.restDurationText}}
</view>
</view>
</view>
<view class="imgs">
<view class="item">
<view class="title">
设备{{info.intervalInfo?.startId}} 抓取照片
</view>
<view class="img">
<image @click="openimg(info.imageInfo?.startDeviceImage)" :src="info.imageInfo?.startDeviceImage"></image>
<view class="time">{{info.intervalInfo?.startDeviceTime}}</view>
</view>
</view>
<view class="item">
<view class="title">
设备{{info.intervalInfo?.endId}} 抓取照片
</view>
<view class="img">
<image @click="openimg(info.imageInfo?.endDeviceImage)" :src="info.imageInfo?.endDeviceImage"></image>
<view class="time">{{info.intervalInfo?.endDeviceTime}}</view>
</view>
</view>
</view>
<view class="info">
<view class="title">
暂扣信息
</view>
<view class="tbody">
<view class="ul">
<view class="title">暂扣时间</view>
<view class="txt">{{info.detainInfo?.detainTime || '/'}}</view>
<view class="title">放行时间</view>
<view class="txt">{{info.releaseInfo?.releaseTime || '/'}}</view>
</view>
<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>
<view class="item">
<view class="title">
设备{{info.intervalInfo?.endId}}位置
</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>
<view class="txt">
{{info.intervalInfo?.endDeviceJson?.position}}
<view>{{info.intervalInfo?.endDeviceJson?.longitude}} / {{info.intervalInfo?.endDeviceJson?.latitude}}</view>
</view>
</view>
<view class="item">
<view class="title">
通过设备{{info.intervalInfo?.startId}}时间
</view>
<view class="txt">
{{info.intervalInfo?.startDeviceTime}}
</view>
<view class="title">区间距离</view>
<view class="txt">
{{info.intervalInfo?.zoneDistanceText}}
</view>
</view>
<view class="item">
<view class="title">
通过设备{{info.intervalInfo?.endId}}时间
</view>
<view class="txt">
{{info.intervalInfo?.endDeviceTime}}
</view>
<view class="title">区间限速</view>
<view class="txt">
{{info.intervalInfo?.speedText}}
</view>
</view>
<view class="item">
<view class="title">
最短行驶时长
</view>
<view class="txt">
{{info.intervalInfo?.passingTimeText}}
</view>
<view class="title">实际行驶时长</view>
<view class="txt">
{{info.overspeedInfo?.exerciseDurationText}}
</view>
</view>
<view class="item">
<view class="title">
平均车速
</view>
<view class="txt">
{{info.overspeedInfo?.averageSpeedText}}
</view>
<view class="title">待休息时长</view>
<view class="txt">
{{info.overspeedInfo?.restDurationText}}
</view>
</view>
</view>
<view class="imgs">
<view class="item">
<view class="title">
设备{{info.intervalInfo?.startId}} 抓取照片
</view>
<view class="img">
<image @click="openimg(info.imageInfo?.startDeviceImage)" :src="info.imageInfo?.startDeviceImage"></image>
<view class="time">{{info.intervalInfo?.startDeviceTime}}</view>
</view>
</view>
<view class="item">
<view class="title">
设备{{info.intervalInfo?.endId}} 抓取照片
</view>
<view class="img">
<image @click="openimg(info.imageInfo?.endDeviceImage)" :src="info.imageInfo?.endDeviceImage"></image>
<view class="time">{{info.intervalInfo?.endDeviceTime}}</view>
</view>
</view>
</view>
<view class="info">
<view class="title">
暂扣信息
</view>
<view class="tbody">
<view class="ul">
<view class="title">暂扣时间</view>
<view class="txt">{{info.detainInfo?.detainTime || '/'}}</view>
<view class="title">放行时间</view>
<view class="txt">{{info.releaseInfo?.releaseTime || '/'}}</view>
</view>
<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>
</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>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="height: 20rpx;"></view>
<view style="height: 20rpx;"></view>
</scroll-view>
<view class="okfication" v-if="showupimg" @click.stop="showupimg=false">
<view class="box" @click.stop="showupimg=true">
<view class="close" @click.stop="showupimg=false"> <uni-icons type="closeempty" color="#585757"
@ -199,7 +210,7 @@
detainVehicle,
releaseVehicle
} from "/appapi/index.js"
const scrolltop=ref(0)
const type = ref("");
const showupimg = ref(false)
const yesok = ref(false);
@ -210,7 +221,36 @@
const info=ref({})
const time=ref("")
let timer;
function showtips(){
uni.showToast({
title:"未到放行时间",
icon:"error"
})
}
//
//
function upreleasetype(){
//
clearInterval(timer)
function gettype(){
if(new Date().getTime()>new Date(info.value.detainInfo.restDurationEndtime).getTime()){
//
info.value['type']=1;
}else{
//
info.value['type']=0;
}
}
gettype()
//
timer=setInterval(()=>{
gettype()
},1000)
}
watch(()=>showupimg.value,()=>{
formatTime()
})
@ -300,12 +340,19 @@
encoding.value=id;
type.value = indextype
showupimg.value = true;
scrolltop.value=10;
getinfo()
}
function getinfo(){
getdetails({encoding:encoding.value}).then(res=>{
info.value=res.data;
scrolltop.value=0;
if(type.value==2){
upreleasetype()
}
})
}
//
@ -357,6 +404,10 @@
})
</script>
<style scoped lang="scss">
scroll-view{
box-sizing: border-box;
height: calc(100vh - 35rpx);
}
.okfication {
position: fixed;
width: 100vw;
@ -364,7 +415,7 @@
left: 0px;
top: 0px;
background: rgba(0, 0, 0, 0.3);
z-index: 22;
.box {
position: absolute;
width: 340rpx;
@ -386,8 +437,8 @@
align-items: center;
image {
width: 46rpx;
height: 46rpx;
width: 31rpx;
height: 31rpx;
margin-right: 15rpx;
}
@ -460,11 +511,11 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 15rpx;
padding: 10rpx 15rpx;
background: #E7E7ED;
position: sticky;
top: 0rpx;
z-index: 22;
.back {
display: flex;
align-items: center;
@ -542,7 +593,9 @@
&.fx {
background: #08A05F;
}
&.grey{
background: #666666;
}
&.yfx {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
}
@ -553,7 +606,7 @@
background: #fff;
border-radius: 8rpx;
margin: 1rpx 15rpx;
padding: 15rpx;
padding:10rpx 15rpx;
.time {
display: flex;
@ -574,23 +627,23 @@
}
.form {
margin: 15rpx 0;
margin: 10rpx 0rpx 0rpx;
border-radius: 3rpx;
overflow: hidden;
border: 1px solid #979797;
border: 1px solid #A0A0A0;
.item {
display: flex;
// align-items: center;
justify-content: space-between;
border-bottom: 1px solid #979797;
border-bottom: 1px solid #A0A0A0;
&>view {
&:nth-last-of-type(1) {
border: none;
}
border-right: 1px solid #979797;
border-right: 1px solid #A0A0A0;
}
&:nth-last-of-type(1) {
@ -613,7 +666,7 @@
flex: 1;
font-size: 9rpx;
text-align: left;
padding: 7rpx;
padding:10rpx 7rpx;
display: flex;
justify-content: space-between;
align-items: center;
@ -635,7 +688,7 @@
flex: 1;
.title {
margin: 7rpx 0;
margin: 10rpx 0;
font-size: 11rpx;
font-weight: 800;
}
@ -672,7 +725,7 @@
}
.tbody {
border: 1px solid #979797;
border: 1px solid #A0A0A0;
border-radius: 3rpx;
overflow: hidden;
@ -684,7 +737,7 @@
border: none;
}
border-bottom: 1px solid #979797;
border-bottom: 1px solid #A0A0A0;
.title {
font-size: 9rpx;
@ -692,8 +745,8 @@
text-align: center;
background: #F3F5F8;
padding: 7rpx;
border-left: 1px solid #979797;
border-right: 1px solid #979797;
border-left: 1px solid #A0A0A0;
border-right: 1px solid #A0A0A0;
&:nth-of-type(1) {
border-left: none;

View File

@ -37,8 +37,10 @@
<view>{{item.restDurationText}}</view>
</view>
</view>
<view class="right " :class="{red:item.status==2}">{{item.statusText}}</view>
</view>
<view style="height: 10rpx;"></view>
<nynull txt="暂无历史数据" v-if="!list.length"></nynull>
</scroll-view>
<pageanimation v-model="showdetails" @close="refdetails.hide()" >
@ -120,9 +122,10 @@
}
//
function reset(){
Selectiondate.value.reset();
queryDate.value="";
vehicleNumber.value=""
Selectiondate.value.reset();
showdate.value=false;
hasNextPage.value=true;
pageNum.value=1;
@ -148,11 +151,9 @@
.scroll-view {
height: calc(100vh - 70rpx);
height: calc(100vh - 60rpx);
padding: 1rpx 15rpx;
box-sizing: border-box;
.item {
display: flex;
align-items: center;
@ -162,43 +163,35 @@
margin-bottom: 10rpx;
overflow: hidden;
padding: 10rpx 15rpx;
.left {
.t {
display: flex;
align-items: center;
font-size: 9rpx;
color: #333333;
image {
width: 13rpx;
height: 13rpx;
margin-right: 8rpx;
}
}
.num {
width: 81rpx;
line-height: 20rpx;
margin-top: 8rpx;
text-align: center;
font-weight: 800;
font-size: 11rpx;
}
}
.center {
border-radius: 5rpx;
overflow: hidden;
border: 1rpx solid rgba(162, 181, 207, 0.67);
.thead {
background: rgba(162, 181, 207, 0.13);
padding: 7rpx 0;
display: flex;
view {
width: 90rpx;
text-align: center;
@ -206,7 +199,6 @@
color: #76849D;
flex: 1;
position: relative;
&:before {
content: "";
position: absolute;
@ -217,7 +209,6 @@
top: 50%;
transform: translate(-0, -50%);
}
&:nth-of-type(1) {
&:before {
display: none;
@ -225,10 +216,8 @@
}
}
}
.tbody {
display: flex;
view {
text-align: center;
padding: 7rpx 0;
@ -238,9 +227,7 @@
}
}
}
.right {
font-size: 11rpx;
width: 60rpx;
text-align: center;

View File

@ -5,7 +5,7 @@
<view v-for="item in devices" :class="{on:deviceId==item.encoding}" @click="setdeviceid(item.encoding)">设备{{item.encoding}}</view>
</view>
<view class="r">
{{infodata.queryTime}}
{{timeFormat(getdata,"yyyy年mm月dd日hh时MM分ss秒")}}
<view>区间测速实时监测中</view>
</view>
</view>
@ -15,7 +15,8 @@
<view class="title">当天过车数量</view>
</view>
<view class="item">
<view class="num">{{infodata.lastMonitoringTime}}</view>
<view class="num" v-if="list.length">{{showday}}</view>
<view class="num" v-if="!list.length">-</view>
<view class="title">距离最后一次监测已过去</view>
</view>
</view>
@ -46,12 +47,12 @@
const devices=ref([]);
const infodata=ref({})
const list=ref([])
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())
function load() {
console.log('过车信息load')
}
@ -82,33 +83,60 @@
})
}
//
const daytiem=ref(new Date().getTime());
const showday=ref("刚刚")
let _eliminate;
function getinfo() {
clearInterval(_eliminate)
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;
list.value=list.value.concat(r.data.vehicleList)
hasNextPage.value=r.data.hasNextPage
hasNextPage.value=r.data.hasNextPage;
settiem()
})
}
//
function bottomingOut(){
if(hasNextPage.value){
pageNum.value=pageNum.value+1;
getinfo()
}
// if(hasNextPage.value){
// pageNum.value=pageNum.value+1;
// getinfo()
// }
}
//
let _clet;
uni.onSkt("SERCHNEWDATA", (res) => {
// console.log(res)
// scroll.value=10;
list.value = [...res, ...list.value]
// clearTimeout(_clet)
// _clet=setTimeout(()=>{
// scroll.value=0;
// },500)
if(res.deviceId==deviceId.value){
list.value = [...res.viewList, ...list.value]
infodata.value.todayCount=infodata.value.todayCount+res.viewList.length;
daytiem.value=new Date().getTime();
clearInterval(_eliminate)
settiem()
}
//
})
function timeAgo() {
const now = new Date();
const past = new Date(daytiem.value);
const seconds = Math.floor((now - past) / 1000);
const minutes = Math.floor(seconds / 60);
const hours = Math.floor(minutes / 60);
const days = Math.floor(hours / 24);
const years = Math.floor(days / 365);
if (years > 0) return `${years}年前`;
if (days > 0) return `${days}天前`;
if (hours > 0) return `${hours}小时前`;
if (minutes > 0) return `${minutes}分钟前`;
return `${seconds}秒前`;
}
function settiem(){
_eliminate=setInterval(()=>{
getdata.value=new Date().getTime()
showday.value=timeAgo()
},500)
}
//
function reset(){
@ -206,7 +234,7 @@
scroll-view {
box-sizing: border-box;
height: calc(100vh - 175rpx);
height: calc(100vh - 160rpx);
.li {
display: flex;
@ -230,7 +258,7 @@
border-radius: 3rpx;
margin-left: 15rpx;
font-weight: 800;
font-size: 11rpx;
}
}

File diff suppressed because one or more lines are too long

View File

@ -58,32 +58,31 @@
script.src = 'static/echarts.min.js'
document.head.appendChild(script)
}
},
methods: {
init(e) {
if (!window.echarts) {
return
}
},
updata(r) {
if (window.echarts && r.overspeedStatistics) {
let allnum=r.overspeedStatistics.overspeedOver50+r.overspeedStatistics.overspeed20To50+r.overspeedStatistics.overspeed10To20+r.overspeedStatistics.overspeedUnder10
let allnum = r.overspeedStatistics.overspeedOver50 + r.overspeedStatistics.overspeed20To50 + r
.overspeedStatistics.overspeed10To20 + r.overspeedStatistics.overspeedUnder10
myChart = echarts.init(document.getElementById("echart"))
myChart.setOption({
grid: {
top: 20,
right: 0,
// right: 0,
bottom: 15,
left: 0,
},
xAxis: {
type: 'value',
axisLabel: { interval: 0 }
axisLabel: {
interval: 0
}
},
yAxis: {
type: 'category',
@ -96,14 +95,47 @@
color: "#4D7BFF",
label: {
show: true,
position: 'right',
position: 'insideRight',
interval: 0,
formatter:function(a){
return Number(a.value/allnum*100 || 0).toFixed(2)+'%';
color:"#fff",
textMargin: [0, 100],
formatter :function(a){
return a.value?a.value:""
}
},
emphasis:{
disabled:true
emphasis: {
disabled: true
},
markPoint: {
symbolSize: 0,
symbol: "pin",
label: {
color: "#000",
position:"right"
},
data: [
{
value: Number(r.overspeedStatistics.overspeedOver50/allnum*100 || 0).toFixed(2)+'%',
xAxis: r.overspeedStatistics.overspeedOver50,
yAxis: 0
},
{
value: Number(r.overspeedStatistics.overspeed20To50/allnum*100 || 0).toFixed(2)+'%',
xAxis: r.overspeedStatistics.overspeed20To50,
yAxis: 1
},
{
value: Number(r.overspeedStatistics.overspeed10To20/allnum*100 || 0).toFixed(2)+'%',
xAxis: r.overspeedStatistics.overspeed10To20,
yAxis: 2
},
{
value: Number(r.overspeedStatistics.overspeedUnder10/allnum*100 || 0).toFixed(2)+'%',
xAxis: r.overspeedStatistics.overspeedUnder10,
yAxis: 3
},
]
},
data: [
r.overspeedStatistics.overspeedOver50,
@ -111,51 +143,6 @@
r.overspeedStatistics.overspeed10To20,
r.overspeedStatistics.overspeedUnder10,
],
},
{
barGap: "-100%",
silent: true,
barWidth: 20,
type: 'bar',
color: "#4D7BFF",
label: {
show: true,
position: 'insideTopRight',
color: "#fff"
},
emphasis:{
disabled:true
},
data: [
r.overspeedStatistics.overspeedOver50,
r.overspeedStatistics.overspeed20To50,
r.overspeedStatistics.overspeed10To20,
r.overspeedStatistics.overspeedUnder10,
],
},
{
barGap: "-100%",
silent: true,
barWidth: 20,
type: 'bar',
itemStyle:{
color: "rgba(255,255,255,0)",
},
emphasis:{
disabled:true
},
label: {
show: true,
position: 'insideTopRight',
color: "#fff"
},
data: [
r.overspeedStatistics.overspeed50Plus+10,
r.overspeedStatistics.overspeed20To50+10,
r.overspeedStatistics.overspeed10To20+10,
r.overspeedStatistics.overspeedUnder10+10,
],
}
]
})

View File

@ -87,8 +87,11 @@
</view>
</view>
<view class="right red" v-if="status==2" @click.stop="withhold(item.encoding,1)">暂扣</view>
<view class="right green" v-if="status==3" @click.stop="withhold(item.encoding,2)">放行</view>
<view class="right grey" v-if="status==3 && !item.type" @click.stop="tips">放行</view>
<view class="right green" v-if="status==3 && item.type" @click.stop="withhold(item.encoding,2)">放行</view>
</view>
<view style="height: 10rpx;"></view>
<nynull v-if="!info.data?.length"></nynull>
</scroll-view>
<pageanimation v-model="showdetails" @close="refdetails.hide()">
@ -113,7 +116,7 @@
const pageSize = ref(50);
const pageNum = ref(1);
const hasNextPage = ref(true)
let timer;
const info = ref({
data: []
@ -123,6 +126,37 @@
function load() {
console.log('预警信息load')
}
function tips(){
uni.showToast({
title:"未到放行时间",icon:"error"
})
}
//
upreleasetype()
function upreleasetype(){
//
clearInterval(timer)
function gettype(){
//
if(status.value==3){
info.value.data.map((res,index)=>{
if(new Date().getTime()>new Date(res.restDurationEndtime).getTime()){
//
info.value.data[index]['type']=1;
}else{
//
info.value.data[index]['type']=0;
}
})
}
}
gettype()
//
timer=setInterval(()=>{
gettype()
},1000)
}
function opneshowdetails() {
showdetails.value = true;
@ -181,9 +215,7 @@
function show() {
getinfo()
// #ifdef APP
uni.setAppBadgeNumber(0)
// #endif
}
const itemanimation=ref(false)
@ -231,9 +263,9 @@
<style scoped lang="scss">
.scroll-view {
height: calc(100vh - 140rpx);
height: calc(100vh - 110rpx);
padding: 1rpx 15rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
.item {
@ -286,7 +318,7 @@
margin-top: 8rpx;
text-align: center;
font-weight: 800;
font-size: 11rpx;
}
@ -453,7 +485,7 @@
}
.num {
font-weight: 800;
font-size: 13rpx;
color: #4D7BFF;

View File

@ -36,7 +36,7 @@
import {
applogin
} from "/appapi/index.js"
import soket from "/utils/soket.js"
import {
onShow
} from "@dcloudio/uni-app"
@ -80,9 +80,7 @@
password: password.value,
deviceType: " android"
}).then(r => {
// soket
uni.setStorageSync('USERID', r.data.user.userId)
soket()
uni.reLaunch({
url: "/pages/index"
})