This commit is contained in:
管理员 2025-09-04 09:23:03 +08:00
parent 0c5d6bb6bc
commit 1694f91e7a
9 changed files with 221 additions and 76 deletions

View File

@ -1,8 +1,11 @@
<script>
import soket from "/utils/soket.js"
import upapp from "/utils/upapp.js"
export default {
onLaunch: function() {
//
// upapp()
let _Android =uni.getStorageSync('cid') || new Date().getTime()
// #ifdef APP
//
@ -33,6 +36,7 @@
// #endif
},
onShow: function() {
console.log('App Show')
},
onHide: function() {

View File

@ -37,16 +37,11 @@
})
},500)
}
uni.$emit('back',Props.modelValue)
})
onBackPress(() => {
if (Props.modelValue) {
Props.modelValue=false;
Emits("update:modelValue",false)
return true;
} else {
return false;
}
uni.$on('close',()=>{
Props.modelValue=false;
Emits("update:modelValue",false)
})
</script>

View File

@ -17,6 +17,21 @@
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/upapp",
"style": {
"app-plus": {
"animationDuration": 200,
"animationType": "fade-in",
"background": "transparent",
"backgroundColorTop": "transparent",
"popGesture": "none",
"scrollIndicator": false,
"titleNView": false
},
"disableScroll": true
}
}

View File

@ -102,6 +102,7 @@
import passingTheCar from "./pages/passingTheCar.vue"
import warningInformation from "./pages/warningInformation.vue"
import qjcamera from "./pages/camera.vue"
import {
nextTick,
ref,
@ -113,8 +114,11 @@
} from "/appapi/index.js"
import {
onBackPress,
onShow
} from "@dcloudio/uni-app"
//
const refhistory = ref()
const refsetUp = ref()
const refcamera = ref()
@ -124,7 +128,9 @@
const selectindex = ref("")
const showout = ref(false);
const showsignOut = ref(false);
//
//
const allDevices = ref([])
const Devicesid = ref('')
//
@ -132,7 +138,18 @@
nextTick(() => {
settab(0)
})
//
let _isback=false;
uni.$on('back',(e)=>{
_isback=e;
})
onBackPress(()=>{
uni.$emit('close')
return _isback
})
uni.$on('LOGOUT', () => {
showout.value = true;
})

View File

@ -10,19 +10,19 @@
<view class="rbox">
<block v-if="type==1">
<view class="fn" v-if="!yesok" @click="showupimg=true">暂扣</view>
<view class="fn red " :class="{aft:tips}" v-if="yesok" @click="showupimg=true">
<view class="fn red " :class="{aft:tips}" v-if="yesok" @click="setwithhold">
确认暂扣
<view class="tc" v-if="tips">
是否确定暂时扣行该车辆请点击此按钮
<image src="/static/dp.png"></image> 是否确定暂时扣行该车辆请点击此按钮
</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="showupimg=true">
<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>
</block>
@ -31,7 +31,7 @@
<view class="detailspage" @click="tips=false">
<view class="time">
<view class="l">超速信息</view>
<view class="r">放行时间2025-08-13 18:0</view>
<view class="r" v-if="info.releaseInfo?.releaseTime">放行时间{{info.releaseInfo?.releaseTime}}</view>
</view>
<view class="form">
<view class="item">
@ -39,55 +39,55 @@
车牌号码
</view>
<view class="txt">
<view class="number">晋MP6400</view>
<view class="number">{{info.basicInfo?.vehicleNumber}}</view>
</view>
<view class="title">超速等级</view>
<view class="txt">
超速10%-20%
{{info.overspeedInfo?.overspeedLevelInformation}}
</view>
</view>
<view class="item">
<view class="title">
设备001位置
设备{{info.intervalInfo?.startId}}位置
</view>
<view class="txt">
中国内蒙古自治区锡林郭勒盟西乌珠穆沁旗巴
<view>108.000000 / 109.293</view>
{{info.intervalInfo?.startDeviceJson?.position}}
<view>{{info.intervalInfo?.startDeviceJson?.longitude}} / {{info.intervalInfo?.startDeviceJson?.latitude}}</view>
</view>
</view>
<view class="item">
<view class="title">
设备002位置
设备{{info.intervalInfo?.endId}}位置
</view>
<view class="txt">
中国内蒙古自治区锡林郭勒盟西乌珠穆沁旗巴
<view>108.000000 / 109.293</view>
{{info.intervalInfo?.endDeviceJson?.position}}
<view>{{info.intervalInfo?.endDeviceJson?.longitude}} / {{info.intervalInfo?.endDeviceJson?.latitude}}</view>
</view>
</view>
<view class="item">
<view class="title">
通过设备001时间
通过设备{{info.intervalInfo?.startId}}时间
</view>
<view class="txt">
2025-08-13 12:00:00
{{info.intervalInfo?.startDeviceTime}}
</view>
<view class="title">区间距离</view>
<view class="txt">
438公里
{{info.intervalInfo?.zoneDistanceText}}
</view>
</view>
<view class="item">
<view class="title">
通过设备001时间
通过设备{{info.intervalInfo?.endId}}时间
</view>
<view class="txt">
2025-08-13 12:00:00
{{info.intervalInfo?.endDeviceTime}}
</view>
<view class="title">区间限速</view>
<view class="txt">
80km/h
{{info.intervalInfo?.speedText}}
</view>
</view>
<view class="item">
@ -95,11 +95,11 @@
最短行驶时长
</view>
<view class="txt">
4小时02分钟
{{info.intervalInfo?.passingTimeText}}
</view>
<view class="title">实际行驶时长</view>
<view class="txt">
3小时48分钟
{{info.overspeedInfo?.exerciseDurationText}}
</view>
</view>
<view class="item">
@ -107,31 +107,31 @@
平均车速
</view>
<view class="txt">
100km/h
{{info.overspeedInfo?.averageSpeedText}}
</view>
<view class="title">待休息时长</view>
<view class="txt">
15分钟
{{info.overspeedInfo?.restDurationText}}
</view>
</view>
</view>
<view class="imgs">
<view class="item">
<view class="title">
设备001 抓取照片
设备{{info.intervalInfo?.startId}} 抓取照片
</view>
<view class="img">
<image src="/static/tjbj.png"></image>
<view class="time">2025-08-13 12:00:00</view>
<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">
设备001 抓取照片
设备{{info.intervalInfo?.endId}} 抓取照片
</view>
<view class="img">
<image src="/static/tjbj.png"></image>
<view class="time">2025-08-13 12:00:00</view>
<image @click="openimg(info.imageInfo?.endDeviceImage)" :src="info.imageInfo?.endDeviceImage"></image>
<view class="time">{{info.intervalInfo?.endDeviceTime}}</view>
</view>
</view>
</view>
@ -142,18 +142,18 @@
<view class="tbody">
<view class="ul">
<view class="title">暂扣时间</view>
<view class="txt">2025-08-13 12:00:00</view>
<view class="txt">{{info.detainTime?.detainTime || '/'}}</view>
<view class="title">放行时间</view>
<view class="txt">/</view>
<view class="txt">{{info.releaseInfo?.releaseTime || '/'}}</view>
</view>
<view class="ul">
<view class="title">暂扣照片</view>
<view class="txt img">
<image src="/static/tjbj.png"></image>
<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>
@ -170,7 +170,7 @@
<image src="/static/k.png" v-if="type==1" mode=""></image>
<view class="txt">
<view class="typename">{{type==1?"车辆暂扣":'车辆放行'}}</view>
<view class="time" v-if="type==2">放行时间2025-08-13 15:0</view>
<view class="time" v-if="type==2">放行时间{{time}}</view>
</view>
</view>
<view class="upimg" @click="upimg">
@ -191,15 +191,41 @@
<script setup>
import evn from "/evn.js";
import {
ref
ref,
watch
} from "vue";
import {
getdetails,
detainVehicle,
releaseVehicle
} from "/appapi/index.js"
const type = ref("");
const showupimg = ref(false)
const yesok = ref(false);
const tips = ref(false)
const Emits = defineEmits(["opneinfo"])
const Emits = defineEmits(["opneinfo","refresh"])
const imgs = ref("")
const encoding=ref("")
const info=ref({})
const time=ref("")
watch(()=>showupimg.value,()=>{
formatTime()
})
function formatTime() {
function formatDateTime(date) {
let year = date.getFullYear();
let month = ("0" + (date.getMonth() + 1)).slice(-2); // 01
let day = ("0" + date.getDate()).slice(-2); //
let hours = ("0" + date.getHours()).slice(-2); //
let minutes = ("0" + date.getMinutes()).slice(-2); //
let seconds = ("0" + date.getSeconds()).slice(-2); //
return `${year}${month}${day}${hours}:${minutes}`;
}
time.value = formatDateTime(new Date());
}
function load() {
console.log('预警信息load')
}
@ -213,12 +239,16 @@
showupimg.value = false;
yesok.value = false;
tips.value = false;
imgs.value=""
}
function show(id, indextype) {
reset()
type.value = indextype;
encoding.value=id;
if(indextype){
type.value = indextype;
}
getinfo()
}
function yesupimg() {
@ -229,10 +259,19 @@
})
return
}
//
Emits("opneinfo")
showupimg.value = false;
yesok.value = true;
tips.value = true;
if(type.value==1){
//
info.value.imageInfo.detainStartImage=imgs.value
}
if(type.value==2){
//
info.value.imageInfo.releaseImage=imgs.value
}
}
function back() {
@ -258,11 +297,58 @@
function opneshowupimg(id, indextype) {
reset()
encoding.value=id;
type.value = indextype
showupimg.value = true;
getinfo()
}
function getinfo(){
getdetails({encoding:encoding.value}).then(res=>{
info.value=res.data;
})
}
//
function setwithhold(){
detainVehicle({encoding:encoding.value,releaseImageUrl:imgs.value}).then(r=>{
uni.showModal({
title: '提示',
content: '已暂扣',
showCancel:false,
success: function (res) {
reset()
//
Emits("refresh")
uni.navigateBack()
}
});
})
}
//
function setrelease(){
releaseVehicle({encoding:encoding.value,releaseImageUrl:imgs.value}).then(r=>{
uni.showModal({
title: '提示',
content: '已放行',
showCancel:false,
success: function (res) {
reset()
//
Emits("refresh")
uni.navigateBack()
}
});
})
}
//
function openimg(img){
uni.previewImage({
urls: [img],
});
}
defineExpose({
load,
hide,
@ -412,6 +498,13 @@
.tc {
position: absolute;
white-space: nowrap;
display: flex;
align-items: center;
image{
width: 12rpx;
height: 15rpx;
margin-right: 3rpx;
}
right: 0px;
font-size: 11rpx;
color: #fff;
@ -488,7 +581,7 @@
.item {
display: flex;
align-items: center;
// align-items: center;
justify-content: space-between;
border-bottom: 1px solid #979797;
@ -505,12 +598,15 @@
}
.title {
background: #F3F5F8;
font-size: 9rpx;
padding: 7rpx;
width: 90rpx;
width: 100rpx;
text-align: right;
display: flex;
align-items: center;
justify-content:flex-end ;
}
.txt {

View File

@ -15,7 +15,7 @@
<view class="reset" @click="emptydata">重置</view>
</view>
<scroll-view :scroll-y="true" class="scroll-view" @scrolltolower='bottomingOut'>
<view v-for="item in list" class="item">
<view v-for="item in list" class="item" @click="openinfo(item.encoding)">
<view class="left">
<view class="t">
<!-- <image src="/static/err.png"></image> -->
@ -41,9 +41,13 @@
</view>
<nynull txt="暂无历史数据" v-if="!list.length"></nynull>
</scroll-view>
<pageanimation v-model="showdetails" @close="refdetails.hide()" >
<pagedetails ref="refdetails" />
</pageanimation>
</template>
<script setup>
import pagedetails from "./details.vue";
import {
ref
} from 'vue';
@ -54,18 +58,28 @@
const queryDate=ref("")
const Selectiondate=ref()
const vehicleNumber=ref("")
const refdetails=ref()
const showdetails=ref(false)
const list=ref([])
//
const pageSize=ref(40);
const pageNum=ref(1);
const hasNextPage=ref(true)
//
function openinfo(id){
refdetails.value.show(id)
showdetails.value=true;
}
function load() {
console.log('预警信息load')
}
function hide() {
console.log('预警信息hide')
showdetails.value=false;
refdetails.value.hide()
}
function show() {

View File

@ -21,7 +21,7 @@
</view>
<view class="right">
<view class="title">预警设置</view>
<scroll-view :scroll-y="true" class="box">
<scroll-view :scroll-y="true" class="box" :scroll-top="scroll">
<view class="li">
<view class="name">设备{{pointPosition1.id}}</view>
<view class="text">
@ -465,6 +465,7 @@
address: "北京市东城区东华门街道中华路甲10号"
}
},
scroll:0,
pointPosition2: {
point: "",
id: '008',
@ -484,7 +485,9 @@
}
}
},
methods: {
emptydata(){
this.pointPosition1.point="";
this.pointPosition2.point="";
@ -567,11 +570,14 @@
})
},
hide() {
},
show() {
let _this = this;
this.scroll=10;
getequipment().then(r => {
this.scroll=0;
this.pointPosition1 = {
id: r.data.allDevices[0].encoding,
}

View File

@ -35,7 +35,7 @@
</view>
</view>
<scroll-view :scroll-y="true" class="scroll-view">
<view v-for="item in info.data" class="item" @click.stop="listwithhold(item.id,status==2?1:2)">
<view v-for="item in info.data" class="item" @click.stop="listwithhold(item.encoding,status==2?1:2)">
<view class="left">
<view class="t">
<image v-if="status==2" src="/static/err.png"></image>
@ -85,13 +85,13 @@
<view>{{item.restDuration}}</view>
</view>
</view>
<view class="right red" v-if="status==2" @click.stop="withhold(item.id,1)">暂扣</view>
<view class="right green" v-if="status==3" @click.stop="withhold(item.id,2)">放行</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>
<nynull v-if="!info.data?.length"></nynull>
</scroll-view>
<pageanimation v-model="showdetails" @close="refdetails.hide()">
<pagedetails ref="refdetails" @opneinfo='opneshowdetails' />
<pageanimation v-model="showdetails" @close="refdetails.hide()" >
<pagedetails ref="refdetails" @opneinfo='opneshowdetails' @refresh="getinfo" />
</pageanimation>
</template>

View File

@ -1,6 +1,6 @@
<template>
<view class="page">
<image class="bj" src="/static/signIn/signInbj.png" mode="aspectFill"></image>
<image class="left" src="/static/signIn/signIn.png" mode="aspectFit"></image>
<view class="box">
<image class="title" src="/static/signIn/title.png" mode="aspectFit"></image>
<view class="desc">欢迎登录很高兴再次见到你</view>
@ -94,20 +94,18 @@
.page {
width: 100vw;
height: 100vh;
position: relative;
.bj {
position: absolute;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0rpx 118rpx 0 32rpx;
background: #f1f5fd;
.left {
width: 410rpx;
height: 310rpx;
}
.box {
position: fixed;
top: 50%;
right: 110rpx;
transform: translate(0%, -50%);
.title {
height: 40rpx;