This commit is contained in:
管理员 2025-09-03 14:52:02 +08:00
parent f6c8141d88
commit 0c5d6bb6bc
78 changed files with 1576 additions and 3748 deletions

46
App.vue
View File

@ -1,15 +1,36 @@
<script> <script>
import soket from "/utils/soket.js"
export default { export default {
onLaunch: function() { onLaunch: function() {
//
let _Android =uni.getStorageSync('cid') || new Date().getTime()
// #ifdef APP
//
function getAndroidId() {
plus.android.importClass("android.provider.Settings");
const context = plus.android.runtimeMainActivity().getApplicationContext();
const androidId = plus.android.invoke("android.provider.Settings$Secure", "getString",
context.getContentResolver(), "android_id");
return androidId;
}
_Android = getAndroidId() || plus.device.getOAID() || uni.getSystemInfoSync().deviceId;
// #endif
uni.setStorageSync('cid', _Android)
if (uni.getStorageSync('token')) {
soket()
uni.reLaunch({
url: "/pages/index"
})
} else {
uni.reLaunch({
url: "/pages/signIn"
})
}
// #ifdef APP-PLUS // #ifdef APP-PLUS
setTimeout(() => { setTimeout(() => {
plus.navigator.setFullscreen(true) plus.navigator.setFullscreen(true)
}, 500) }, 500)
// #endif // #endif
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')
@ -27,6 +48,23 @@
color: #667085; color: #667085;
font-size: 14rpx; font-size: 14rpx;
} }
.numcolor1{
background: #3336E0;
color: #fff;
}
.numcolor2{
background: #07C688;
color: #fff;
}
.numcolor3{
background: #FF9521;
color: #fff;
}
.numcolor4{
background: #333333;
color: #fff;
}
/* :root{ /* :root{
font-size: calc(100vw / 960px * 32px) !important; font-size: calc(100vw / 960px * 32px) !important;

View File

@ -19,7 +19,7 @@
<view></view> <view></view>
</view> </view>
<view class="form"> <view class="form">
<view v-for="item in daydata.monthGroups[dayindex].days" @click.stop="settime(`${daydata.monthGroups[dayindex].year}-${daydata.monthGroups[dayindex].month}-${item}`)" :class="{del:!daydata.day.includes(`${daydata.monthGroups[dayindex].year}-${daydata.monthGroups[dayindex].month}-${item}`),on:chooseday==`${daydata.monthGroups[dayindex].year}-${daydata.monthGroups[dayindex].month}-${item}`}">{{item}}</view> <view v-for="item in daydata.monthGroups[dayindex].days" @click.stop="settime(`${daydata.monthGroups[dayindex].year}-${daydata.monthGroups[dayindex].month}-${item}`,!daydata.day.includes(`${daydata.monthGroups[dayindex].year}-${daydata.monthGroups[dayindex].month}-${item}`))" :class="{del:!daydata.day.includes(`${daydata.monthGroups[dayindex].year}-${daydata.monthGroups[dayindex].month}-${item}`),on:chooseday==`${daydata.monthGroups[dayindex].year}-${daydata.monthGroups[dayindex].month}-${item}`}">{{item}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -84,12 +84,15 @@
Props.modelValue=false; Props.modelValue=false;
adssEmits("update:modelValue",false) adssEmits("update:modelValue",false)
} }
function settime(time){ function settime(time,type){
if(!type){
chooseday.value=time; chooseday.value=time;
adssEmits("change",time) adssEmits("change",time)
Props.modelValue=false; Props.modelValue=false;
adssEmits("update:modelValue",false) adssEmits("update:modelValue",false)
} }
}
function reset(){ function reset(){
// chooseday.value=daydata.value.day[0]; // chooseday.value=daydata.value.day[0];
dayindex.value=0; dayindex.value=0;

View File

@ -60,6 +60,8 @@
left: 100%; left: 100%;
background: #E7E7ED; background: #E7E7ED;
transition:0.3s; transition:0.3s;
box-sizing: border-box;
padding-bottom: 1rpx;
&.showon{ &.showon{
left: 0%; left: 0%;
} }

View File

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="page">
<div>设备001</div>
</div>
</body>
</html>

View File

@ -1,22 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,31 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
}
#imgs{
display: inline-block;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,36 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
}
#imgs{
display: inline-block;
}
#imgs div{
background: #4D7BFF;
color: #fff;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,38 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,40 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,46 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
#imgs span{
width: 2px;
height: 5px;
background: #4D7BFF;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
<span></span>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
#imgs span{
width: 2px;
height: 5px;
background: #4D7BFF;
display: inline-block;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
<span></span>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
#imgs span{
width: 2px;
height: 50px;
background: #4D7BFF;
display: inline-block;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
<span></span>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
text-align: center;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
#imgs span{
width: 2px;
height: 50px;
background: #4D7BFF;
display: inline-block;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
<span></span>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,48 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
text-align: center;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
#imgs span{
width: 2px;
height: 50px;
background: #4D7BFF;
display: inline-block;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
<span></span>
<img src="/map.png"/>
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,48 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
text-align: center;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
#imgs span{
width: 2px;
height: 50px;
background: #4D7BFF;
display: inline-block;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
<span></span>
<img src="/map.png" crossorigin="anonymous" />
</div>
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,50 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
text-align: center;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
#imgs span{
width: 2px;
height: 50px;
background: #4D7BFF;
display: inline-block;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
<span></span>
<img src="/map.png" crossorigin="anonymous" />
</div>
<img src="" id="img" />
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
document.getElementById('img').src=dataUrl
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

View File

@ -1,50 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./dom-to-image.min.js"></script>
<style>
*{
margin: 0px;
padding: 0px;
font-size: 0px;
}
#imgs{
display: inline-block;
text-align: center;
}
#imgs div{
background: #4D7BFF;
color: #fff;
font-size: 16px;
padding: 15px;
border-radius: 5px;
}
#imgs span{
width: 2px;
height: 50px;
background: #4D7BFF;
display: inline-block;
}
</style>
</head>
<body>
<div class="page" id="imgs">
<div >设备001</div>
<span></span>
<img src="./map.png" crossorigin="anonymous" />
</div>
<img src="" id="img" />
<script>
domtoimage.toPng(document.getElementById('imgs'))
.then(dataUrl => {
console.log(dataUrl)
document.getElementById('img').src=dataUrl
})
.catch(error => console.error('转换失败', error));
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -71,6 +71,54 @@
} }
}, },
"statics" : {} "statics" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
},
"nativePlugins" : {
"hk-preview" : {
"__plugin_info__" : {
"name" : "海康视频实时预览插件",
"description" : "海康摄像头录像机直连插件,实现设备视频预览和云台控制",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=1981",
"android_package_name" : "blyc.qjcs.com",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 1,
"pid" : "1981",
"parameters" : {}
}
} }
} }
}, },
@ -98,6 +146,16 @@
}, },
"vueVersion" : "3", "vueVersion" : "3",
"h5" : { "h5" : {
"devServer" : {
//
"proxy" : {
"/api" : {
"target" : "http://192.168.1.7:8566",
"changeOrigin" : true,
"secure" : false
}
}
},
"sdkConfigs" : { "sdkConfigs" : {
"maps" : {} "maps" : {}
} }

View File

@ -1,9 +1,14 @@
<template> <template>
<navigator url="/pages/index">进入</navigator> <view class="page">
<image src="/static/signIn/go.jpg" mode="aspectFit"></image>
</view>
</template> </template>
<script setup> <script setup>
import {onShow,onLoad} from "@dcloudio/uni-app" import {onShow,onLoad} from "@dcloudio/uni-app"
// const hk = uni.requireNativePlugin('hk-preview');
onShow(()=>{ onShow(()=>{
// setTimeout(()=>{ // setTimeout(()=>{
// uni.reLaunch({ // uni.reLaunch({
@ -15,5 +20,18 @@
</script> </script>
<style> <style scoped lang="scss">
image{
position: absolute;
width: 700rpx;
}
.page{
background: #f1f5fe;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
</style> </style>

View File

@ -1,10 +1,14 @@
<template> <template>
<view class="page"> <view class="page" @click.stop="showsignOut=false">
<view class="left"> <view class="left">
<view class="top"> <view class="top">
<view class="logo"> <view class="logo" @click.stop="showsignOut=true">
<image src="/static/logo.png"></image> <image src="/static/logo.png"></image>
区间测速 区间测速
<view class="signOut" @click.stop="logOut" v-if="showsignOut">
<view class="icon"><uni-icons type="upload" size="20rpx" color="#fff"></uni-icons></view>
退出登录
</view>
</view> </view>
<view class="tabnav"> <view class="tabnav">
<view class="li" :class="{on:selectindex==0}" @click="settab(0)"> <view class="li" :class="{on:selectindex==0}" @click="settab(0)">
@ -42,17 +46,19 @@
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="title">设备</view> <view class="title">设备</view>
<view class="item on" :class="{on1:selectindex==5}" @click="settab(5)"> <!-- <view class="item on" :class="{on1:selectindex==5}" @click="settab(5)">
<view class="l"> <view class="l">
<image src="/static/equipmenton.png"></image> <image src="/static/equipmenton.png"></image>
<view class="name">设备001</view> <view class="name">设备001</view>
</view> </view>
<view class="r"></view> <view class="r"></view>
</view> </view> -->
<view class="item"> <view class="item" v-for="item in allDevices"
:class="{on1:(selectindex==5 && Devicesid==item.id),on:item.status==2}"
@click="setshowDevices(item)">
<view class="l"> <view class="l">
<image src="/static/equipmentno.png"></image> <image src="/static/equipmentno.png"></image>
<view class="name">设备001</view> <view class="name">设备{{item.encoding}}</view>
</view> </view>
<view class="r"></view> <view class="r"></view>
</view> </view>
@ -81,22 +87,34 @@
</view> </view>
</view> </view>
<view class="popUpNotificationout" v-if="showout">
<view class="box">
<view class="title">提示</view>
<view class="desc">账号已在其他设备登录</view>
<view class="yes" @click="outsignOut">确定</view>
</view>
</view>
</template> </template>
<script setup> <script setup>
import setmapidimg from "/utils/base64ToFile.js"
import history from "./pages/history.vue" import history from "./pages/history.vue"
import setUp from "./pages/setUp.vue" import setUp from "./pages/setUp.vue"
import statistics from "./pages/statistics.vue" import statistics from "./pages/statistics.vue"
import passingTheCar from "./pages/passingTheCar.vue" import passingTheCar from "./pages/passingTheCar.vue"
import warningInformation from "./pages/warningInformation.vue" import warningInformation from "./pages/warningInformation.vue"
import qjcamera from "./pages/camera.vue" import qjcamera from "./pages/camera.vue"
import { import {
nextTick, nextTick,
ref, ref,
watch watch
} from "vue" } from "vue"
import {
getequipment
} from "/appapi/index.js"
import {
onShow
} from "@dcloudio/uni-app"
const refhistory = ref() const refhistory = ref()
const refsetUp = ref() const refsetUp = ref()
const refcamera = ref() const refcamera = ref()
@ -104,20 +122,67 @@
const refpassingTheCar = ref() const refpassingTheCar = ref()
const refwarningInformation = ref() const refwarningInformation = ref()
const selectindex = ref("") const selectindex = ref("")
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 const state = ref([0, 0, 0, 0, 0, 0]) //0 1 2
nextTick(() => { nextTick(() => {
settab(0) settab(0)
}) })
uni.$on('LOGOUT', () => {
showout.value = true;
})
function settab(index) { onShow(() => {
//
getequipment().then(r => {
allDevices.value =r.data?r.data.allDevices:[]
})
})
// 退
function outsignOut() {
showout.value = false;
// token
uni.removeStorageSync("token");
// WebSocket
uni.$emit('Socketclose')
//
uni.reLaunch({
url: "/pages/signIn"
})
}
//
function setshowDevices(item) {
if (item.status == 2) {
Devicesid.value = item.id;
settab(5, {
id: Devicesid.value
})
}
}
//
uni.getNetworkType({
success: function(res) {
console.log(res.networkType);
}
});
//
uni.onNetworkStatusChange(function(res) {
console.log(res.isConnected);
console.log(res.networkType);
});
//
function settab(index, data = {}) {
if (index === selectindex.value) { if (index === selectindex.value) {
return return
} }
selectindex.value = index; selectindex.value = index;
state.value = state.value.map((r, subindex) => { state.value = state.value.map((r, subindex) => {
if (r == 1) { if (r == 1) {
r = 2; r = 2;
@ -128,45 +193,95 @@
r = 1; r = 1;
// load // load
switchfn(subindex, 'load') switchfn(subindex, 'load')
switchfn(subindex, 'show') switchfn(subindex, 'show', data)
} }
if (r == 2 && subindex == index) { if (r == 2 && subindex == index) {
r = 1; r = 1;
// show // show
switchfn(subindex, 'show') switchfn(subindex, 'show', data)
} }
return r; return r;
}) })
} }
function switchfn(index, fn) { function switchfn(index, fn, data = {}) {
switch (index) { switch (index) {
case 0: case 0:
refwarningInformation.value[fn]() refwarningInformation.value[fn](data)
break; break;
case 1: case 1:
refpassingTheCar.value[fn]() refpassingTheCar.value[fn](data)
break; break;
case 2: case 2:
refhistory.value[fn]() refhistory.value[fn](data)
break; break;
case 3: case 3:
refstatistics.value[fn]() refstatistics.value[fn](data)
break; break;
case 4: case 4:
refsetUp.value[fn]() refsetUp.value[fn](data)
break; break;
case 5: case 5:
refcamera.value[fn]() refcamera.value[fn](data)
break; break;
} }
} }
function logOut() {
uni.showModal({
title: '提示',
content: '确认退出登录?',
success: function(res) {
showsignOut.value = false;
if (res.confirm) {
outsignOut()
}
}
});
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.popUpNotificationout {
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.7);
z-index: 999999;
.box {
position: absolute;
width: 300rpx;
background: #fff;
border-radius: 5rpx;
text-align: center;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 25rpx;
font-size: 11rpx;
.desc {
margin: 15rpx 0;
}
.yes {
background: #4B5EFF;
color: #fff;
line-height: 35rpx;
border-radius: 50rpx;
width: 150rpx;
margin: auto;
margin-top: 30rpx;
}
}
}
.subpage { .subpage {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
@ -187,6 +302,7 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding: 15rpx; padding: 15rpx;
z-index: 9999;
.tabnav { .tabnav {
margin-top: 35rpx; margin-top: 35rpx;
@ -239,10 +355,47 @@
margin-right: 8rpx; margin-right: 8rpx;
} }
position: relative;
display: flex; display: flex;
align-items: camera; align-items: camera;
color: #fff; color: #fff;
font-size: 16rpx; font-size: 16rpx;
.signOut {
position: absolute;
left: 100%;
top: 50%;
transform: translate(0, -50%);
display: flex;
align-items: center;
background: rgba(0, 0, 0, 0.4);
border-radius: 3rpx;
font-size: 11rpx;
flex-wrap: nowrap;
width: 100rpx;
color: #fff;
padding: 3rpx 10rpx;
justify-content: center;
.icon {
transform: rotate(-90deg);
margin-right: 8rpx;
}
&::after {
content: "";
width: 0rpx;
height: 0rpx;
position: absolute;
left: -6rpx;
border-left: 0rpx solid transparent;
border-right: 7rpx solid rgba(0, 0, 0, 0.4);
border-top: 7rpx solid transparent;
border-bottom: 7rpx solid transparent;
}
}
} }
.bottom { .bottom {
@ -295,6 +448,7 @@
background: #37FFAC; background: #37FFAC;
} }
} }
&.on1 { &.on1 {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%); background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
} }

View File

@ -2,12 +2,16 @@
<view class="camerapage"> <view class="camerapage">
<view class="title">摄像头设置</view> <view class="title">摄像头设置</view>
<view class="box"> <view class="box">
<video class="video"></video> <video class="video" object-fit='contain' src="https://media.w3.org/2010/05/sintel/trailer.mp4"></video>
<!-- <sjy-vidbr :option="hp1option" bColor="#ffffff"></sjy-vidbr> -->
<view class="workbench"> <view class="workbench">
<view class="direction"> <view class="direction">
<view class="item" v-for="(item,index) in 4" :class="{on:keyindex==index+1}" @touchstart="press(index+1)" @touchend="release()"> <view class="item" v-for="(item,index) in 4" :class="{on:keyindex==index+1}"
@touchstart="press(index+1)" @touchend="release()">
<view class="icon"> <view class="icon">
<uv-icon name="arrow-up-fill" :color="keyindex==index+1?'#fff':'#4D7BFF'" size="20rpx"></uv-icon> <uv-icon name="arrow-up-fill" :color="keyindex==index+1?'#fff':'#4D7BFF'"
size="20rpx"></uv-icon>
</view> </view>
</view> </view>
@ -38,9 +42,16 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import {
ref
} from 'vue'
const keyindex = ref("") const keyindex = ref("")
const hp1option = ref({
width: 426 * 1.5,
height: 240 * 1.5,
})
function load() { function load() {
console.log('预警信息load') console.log('预警信息load')
} }
@ -56,6 +67,7 @@ import { ref } from 'vue'
function press(index) { function press(index) {
keyindex.value = index; keyindex.value = index;
} }
function release() { function release() {
keyindex.value = ""; keyindex.value = "";
} }
@ -92,6 +104,7 @@ import { ref } from 'vue'
gap: 20rpx 15rpx; gap: 20rpx 15rpx;
width: 265rpx; width: 265rpx;
flex-wrap: wrap; flex-wrap: wrap;
.item { .item {
@ -106,11 +119,13 @@ import { ref } from 'vue'
font-weight: 500; font-weight: 500;
font-size: 11rpx; font-size: 11rpx;
color: #223457; color: #223457;
&.on { &.on {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%); background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
box-shadow: inset 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.33); box-shadow: inset 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.33);
color: #fff; color: #fff;
} }
image { image {
width: 16rpx; width: 16rpx;
height: 16rpx; height: 16rpx;
@ -119,6 +134,7 @@ import { ref } from 'vue'
} }
} }
} }
.direction { .direction {
width: 130rpx; width: 130rpx;
height: 130rpx; height: 130rpx;
@ -131,6 +147,7 @@ import { ref } from 'vue'
overflow: hidden; overflow: hidden;
transform: rotate(45deg); transform: rotate(45deg);
position: relative; position: relative;
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
@ -154,15 +171,18 @@ import { ref } from 'vue'
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
&.on { &.on {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%); background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
box-shadow: inset 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.33); box-shadow: inset 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.33);
} }
.icon { .icon {
transform: rotate(-45deg); transform: rotate(-45deg);
// margin-left: 10rpx; // margin-left: 10rpx;
// margin-top: 10rpx; // margin-top: 10rpx;
} }
&:nth-of-type(2) { &:nth-of-type(2) {
transform: rotate(90deg); transform: rotate(90deg);
} }
@ -185,10 +205,15 @@ import { ref } from 'vue'
border-radius: 8rpx; border-radius: 8rpx;
overflow: hidden; overflow: hidden;
margin-top: 15rpx; margin-top: 15rpx;
position: relative;
._video_r1 {}
.video { .video {
width: 100%; width: 100%;
height: 240rpx; height: 240rpx;
border-radius: 8rpx 8rpx 0 0;
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="detailstop"> <view class="detailstop" @click="tips=false">
<view class="back" @click="back()"> <view class="back" @click="back()">
<image src="/static/back.png"></image> <image src="/static/back.png"></image>
返回 返回
@ -7,10 +7,28 @@
<view class="title"> <view class="title">
超速车辆详情 超速车辆详情
</view> </view>
<view class="fn" @click="showupimg=true">暂扣</view> <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="tc" v-if="tips">
是否确定暂时扣行该车辆请点击此按钮
</view> </view>
<view class="detailspage"> </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="tc" v-if="tips">
是否确定放行该车辆请点击此按钮
</view>
</view>
</block>
</view>
</view>
<view class="detailspage" @click="tips=false">
<view class="time"> <view class="time">
<view class="l">超速信息</view> <view class="l">超速信息</view>
<view class="r">放行时间2025-08-13 18:0</view> <view class="r">放行时间2025-08-13 18:0</view>
@ -141,19 +159,23 @@
</view> </view>
</view> </view>
</view> </view>
<view style="height: 20rpx;"></view>
<view class="okfication" v-if="showupimg" @click.stop="showupimg=false"> <view class="okfication" v-if="showupimg" @click.stop="showupimg=false">
<view class="box" @click.stop="showupimg=true"> <view class="box" @click.stop="showupimg=true">
<view class="close" @click.stop="showupimg=false"> <uni-icons type="closeempty" color="#585757" size="20rpx"></uni-icons> <view class="close" @click.stop="showupimg=false"> <uni-icons type="closeempty" color="#585757"
size="20rpx"></uni-icons>
</view> </view>
<view class="title"> <view class="title">
<image src="/static/f.png" mode=""></image> <image src="/static/f.png" v-if="type==2" mode=""></image>
<image src="/static/k.png" v-if="type==1" mode=""></image>
<view class="txt"> <view class="txt">
<view class="typename">车辆放行</view> <view class="typename">{{type==1?"车辆暂扣":'车辆放行'}}</view>
<view class="time">放行时间2025-08-13 15:0</view> <view class="time" v-if="type==2">放行时间2025-08-13 15:0</view>
</view> </view>
</view> </view>
<view class="upimg" @click="getimg"> <view class="upimg" @click="upimg">
<view class="icon"> <image :src="imgs" v-if="imgs"></image>
<view class="icon" v-else>
<uni-icons color="#4D7BFF" type="plusempty" size="30rpx"></uni-icons> <uni-icons color="#4D7BFF" type="plusempty" size="30rpx"></uni-icons>
<view class="h3">上传照片</view> <view class="h3">上传照片</view>
<view class="desc">请上传车辆的行驶证或现场车辆照片</view> <view class="desc">请上传车辆的行驶证或现场车辆照片</view>
@ -161,46 +183,91 @@
</view> </view>
<view class="fn"> <view class="fn">
<view @click.stop="showupimg=false">取消</view> <view @click.stop="showupimg=false">取消</view>
<view>确定</view> <view @click.stop="yesupimg">确定</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import evn from "/evn.js";
import { import {
ref ref
} from "vue"; } from "vue";
const type = ref("");
const showupimg = ref(false) const showupimg = ref(false)
const yesok = ref(false);
const tips = ref(false)
const Emits = defineEmits(["opneinfo"])
const imgs = ref("")
function load() { function load() {
console.log('预警信息load') console.log('预警信息load')
} }
function hide() { function hide() {
reset()
showupimg.value=false;
} }
function show() { function reset() {
console.log('预警信息show') type.value = "";
showupimg.value = false;
yesok.value = false;
tips.value = false;
}
function show(id, indextype) {
reset()
type.value = indextype;
}
function yesupimg() {
if(!imgs.value){
uni.showToast({
title:"请上传图片",
icon:"none"
})
return
}
Emits("opneinfo")
showupimg.value = false;
yesok.value = true;
tips.value = true;
} }
function back() { function back() {
uni.navigateBack() uni.navigateBack()
} }
function getimg(){
function upimg() {
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
success: function(res) { success: function(res) {
console.log(JSON.stringify(res.tempFilePaths)); uni.uploadFile({
url: evn.SERVERUL + '/file/upload', //
filePath: res.tempFilePaths[0],
name: 'file',
success: (uploadFileRes) => {
imgs.value=JSON.parse(uploadFileRes.data).url
}
});
} }
}); });
} }
function opneshowupimg(id, indextype) {
reset()
type.value = indextype
showupimg.value = true;
}
defineExpose({ defineExpose({
load, load,
hide, hide,
show show,
opneshowupimg
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -211,6 +278,7 @@
left: 0px; left: 0px;
top: 0px; top: 0px;
background: rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.3);
.box { .box {
position: absolute; position: absolute;
width: 340rpx; width: 340rpx;
@ -220,29 +288,35 @@
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
.close { .close {
position: absolute; position: absolute;
top: 15rpx; top: 15rpx;
right: 15rpx; right: 15rpx;
} }
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
image { image {
width: 46rpx; width: 46rpx;
height: 46rpx; height: 46rpx;
margin-right: 15rpx; margin-right: 15rpx;
} }
.typename { .typename {
font-weight: 800; font-weight: 800;
font-size: 13rpx; font-size: 13rpx;
color: #333333; color: #333333;
} }
.time { .time {
font-size: 11rpx; font-size: 11rpx;
margin-top: 5rpx; margin-top: 5rpx;
} }
} }
.upimg { .upimg {
border: 1px dashed #4D7BFF; border: 1px dashed #4D7BFF;
border-radius: 5rpx; border-radius: 5rpx;
@ -252,6 +326,11 @@
margin: 15rpx 0; margin: 15rpx 0;
text-align: center; text-align: center;
height: 140rpx; height: 140rpx;
image{
width: 100%;
height: 100%;
}
.icon { .icon {
.h3 { .h3 {
font-weight: 800; font-weight: 800;
@ -260,15 +339,18 @@
margin-top: 10rpx; margin-top: 10rpx;
margin-bottom: 7rpx; margin-bottom: 7rpx;
} }
.desc { .desc {
font-size: 11rpx; font-size: 11rpx;
} }
} }
} }
.fn { .fn {
display: flex; display: flex;
gap: 15rpx; gap: 15rpx;
view { view {
flex: 1; flex: 1;
text-align: center; text-align: center;
@ -277,6 +359,7 @@
font-size: 11rpx; font-size: 11rpx;
font-weight: 800; font-weight: 800;
background: #E8EEF5; background: #E8EEF5;
&:nth-of-type(2) { &:nth-of-type(2) {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%); background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
color: #fff; color: #fff;
@ -286,6 +369,7 @@
} }
} }
} }
.detailstop { .detailstop {
display: flex; display: flex;
align-items: center; align-items: center;
@ -294,23 +378,28 @@
background: #E7E7ED; background: #E7E7ED;
position: sticky; position: sticky;
top: 0rpx; top: 0rpx;
.back { .back {
display: flex; display: flex;
align-items: center; align-items: center;
image { image {
width: 14rpx; width: 14rpx;
height: 10rpx; height: 10rpx;
margin-right: 7rpx; margin-right: 7rpx;
} }
font-weight: 800; font-weight: 800;
font-size: 11rpx; font-size: 11rpx;
color: #4D7BFF; color: #4D7BFF;
} }
.title { .title {
font-weight: 800; font-weight: 800;
font-size: 11rpx; font-size: 11rpx;
color: #333333; color: #333333;
} }
.fn { .fn {
font-weight: 800; font-weight: 800;
background: #FE5F13; background: #FE5F13;
@ -318,47 +407,103 @@
padding: 7rpx 30rpx; padding: 7rpx 30rpx;
border-radius: 50rpx; border-radius: 50rpx;
font-size: 11rpx; font-size: 11rpx;
position: relative;
.tc {
position: absolute;
white-space: nowrap;
right: 0px;
font-size: 11rpx;
color: #fff;
background: rgba(0, 0, 0, 0.7);
border-radius: 5rpx;
padding: 10rpx 10rpx;
top: 100%;
margin-top: 14rpx;
box-shadow: 0px 2px 18px 0px rgba(0, 0, 0, 0.22);
}
&.aft {
&::after {
content: "";
position: absolute;
left: 50%;
transform: translate(-50%, 0);
top: 100%;
width: 0rpx;
height: 0rpx;
margin-top: 5rpx;
border-bottom: 10rpx solid rgba(0, 0, 0, 0.7);
border-top: 0rpx solid transparent;
border-left: 8rpx solid transparent;
border-right: 8rpx solid transparent;
} }
} }
&.red {
background: #D10B0B;
}
&.fx {
background: #08A05F;
}
&.yfx {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
}
}
}
.detailspage { .detailspage {
background: #fff; background: #fff;
border-radius: 8rpx; border-radius: 8rpx;
margin:0 15rpx; margin: 1rpx 15rpx;
padding: 15rpx; padding: 15rpx;
.time { .time {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.l { .l {
font-weight: 800; font-weight: 800;
font-size: 11rpx; font-size: 11rpx;
color: #333333; color: #333333;
} }
.r { .r {
font-weight: 800; font-weight: 800;
font-size: 11rpx; font-size: 11rpx;
color: #4D7BFF; color: #4D7BFF;
} }
} }
.form { .form {
margin: 15rpx 0; margin: 15rpx 0;
border-radius: 3rpx; border-radius: 3rpx;
overflow: hidden; overflow: hidden;
border: 1px solid #979797; border: 1px solid #979797;
.item { .item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #979797; border-bottom: 1px solid #979797;
&>view { &>view {
&:nth-last-of-type(1) { &:nth-last-of-type(1) {
border: none; border: none;
} }
border-right: 1px solid #979797; border-right: 1px solid #979797;
} }
&:nth-last-of-type(1) { &:nth-last-of-type(1) {
border: none; border: none;
} }
.title { .title {
background: #F3F5F8; background: #F3F5F8;
@ -367,6 +512,7 @@
width: 90rpx; width: 90rpx;
text-align: right; text-align: right;
} }
.txt { .txt {
flex: 1; flex: 1;
font-size: 9rpx; font-size: 9rpx;
@ -375,6 +521,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
view { view {
font-size: 9rpx; font-size: 9rpx;
} }
@ -383,26 +530,32 @@
} }
} }
.imgs { .imgs {
display: flex; display: flex;
gap: 15rpx; gap: 15rpx;
.item { .item {
flex: 1; flex: 1;
.title { .title {
margin: 7rpx 0; margin: 7rpx 0;
font-size: 11rpx; font-size: 11rpx;
font-weight: 800; font-weight: 800;
} }
.img { .img {
width: 100%; width: 100%;
height: 135rpx; height: 135rpx;
position: relative; position: relative;
border-radius: 6rpx; border-radius: 6rpx;
overflow: hidden; overflow: hidden;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.time { .time {
position: absolute; position: absolute;
padding: 10rpx; padding: 10rpx;
@ -414,23 +567,29 @@
} }
} }
} }
.info { .info {
&>.title { &>.title {
margin: 7rpx 0; margin: 7rpx 0;
font-size: 11rpx; font-size: 11rpx;
font-weight: 800; font-weight: 800;
} }
.tbody { .tbody {
border: 1px solid #979797; border: 1px solid #979797;
border-radius: 3rpx; border-radius: 3rpx;
overflow: hidden; overflow: hidden;
.ul { .ul {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
&:nth-last-of-type(1) { &:nth-last-of-type(1) {
border: none; border: none;
} }
border-bottom: 1px solid #979797; border-bottom: 1px solid #979797;
.title { .title {
font-size: 9rpx; font-size: 9rpx;
width: 55rpx; width: 55rpx;
@ -439,14 +598,17 @@
padding: 7rpx; padding: 7rpx;
border-left: 1px solid #979797; border-left: 1px solid #979797;
border-right: 1px solid #979797; border-right: 1px solid #979797;
&:nth-of-type(1) { &:nth-of-type(1) {
border-left: none; border-left: none;
} }
} }
.txt { .txt {
font-size: 9rpx; font-size: 9rpx;
padding: 7rpx; padding: 7rpx;
width: calc((100% - 110rpx) / 2); width: calc((100% - 110rpx) / 2);
image { image {
width: 100%; width: 100%;
height: 94rpx; height: 94rpx;

View File

@ -5,23 +5,23 @@
<view class="tabs"> <view class="tabs">
<view class="left" @click="showdate=true"> <view class="left" @click="showdate=true">
<view class="time" >{{chooseday || '选择日期'}}</view> <view class="time" >{{queryDate || '选择日期'}}</view>
<image src="/static/time.png"></image> <image src="/static/time.png"></image>
</view> </view>
<view class="right"> <view class="right">
<input placeholder="搜索超速车辆" /> <input placeholder="搜索超速车辆" v-model="vehicleNumber" @confirm='confirm(e)' />
<uni-icons type="search" size="16rpx"></uni-icons> <uni-icons type="search" size="16rpx"></uni-icons>
</view> </view>
<view class="reset" @click="reset()">重置</view> <view class="reset" @click="emptydata">重置</view>
</view> </view>
<scroll-view :scroll-y="true" class="scroll-view"> <scroll-view :scroll-y="true" class="scroll-view" @scrolltolower='bottomingOut'>
<view v-for="item in 10" class="item"> <view v-for="item in list" class="item">
<view class="left"> <view class="left">
<view class="t"> <view class="t">
<image src="/static/err.png"></image> <!-- <image src="/static/err.png"></image> -->
车牌号码 车牌号码
</view> </view>
<view class="num">晋MP6400</view> <view class="num" :class="`numcolor${item.vehicleNumberColor}`">{{item.vehicleNumber}}</view>
</view> </view>
<view class="center"> <view class="center">
<view class="thead"> <view class="thead">
@ -31,14 +31,15 @@
<view>待休息时长</view> <view>待休息时长</view>
</view> </view>
<view class="tbody"> <view class="tbody">
<view>100km/h</view> <view>{{item.averageSpeedText}}</view>
<view>10%-20%</view> <view>{{item.overspeedLevelInformation}}</view>
<view>4小时02分钟</view> <view>{{item.exerciseDurationText}}</view>
<view>15分钟</view> <view>{{item.restDurationText}}</view>
</view> </view>
</view> </view>
<view class="right ">已放行</view> <view class="right " :class="{red:item.status==2}">{{item.statusText}}</view>
</view> </view>
<nynull txt="暂无历史数据" v-if="!list.length"></nynull>
</scroll-view> </scroll-view>
</template> </template>
@ -46,11 +47,19 @@
import { import {
ref ref
} from 'vue'; } from 'vue';
import {
gethistory
} from "/appapi/index.js"
const showdate=ref(false) const showdate=ref(false)
const chooseday=ref("") const queryDate=ref("")
const Selectiondate=ref() const Selectiondate=ref()
const vehicleNumber=ref("")
const list=ref([])
//
const pageSize=ref(40);
const pageNum=ref(1);
const hasNextPage=ref(true)
function load() { function load() {
console.log('预警信息load') console.log('预警信息load')
} }
@ -60,15 +69,54 @@
} }
function show() { function show() {
console.log('预警信息show') reset()
getlist()
} }
function change(e){ function change(e){
chooseday.value=e; hasNextPage.value=true;
} pageNum.value=1;
list.value=[];
queryDate.value=e;
getlist()
}
function confirm(e){
hasNextPage.value=true;
pageNum.value=1;
list.value=[];
getlist()
}
function emptydata(){
reset()
getlist()
}
function getlist(){
gethistory({
pageNum:pageNum.value,
pageSize:pageSize.value,
queryDate:queryDate.value,
vehicleNumber:vehicleNumber.value
}).then(r=>{
list.value=list.value.concat(r.data.data);
hasNextPage.value=r.data.hasNextPage;
})
}
//
function reset(){ function reset(){
Selectiondate.value.reset(); Selectiondate.value.reset();
chooseday.value=""; queryDate.value="";
vehicleNumber.value=""
showdate.value=false;
hasNextPage.value=true;
pageNum.value=1;
list.value=[];
}
//
function bottomingOut(){
if(hasNextPage.value){
pageNum.value=pageNum.value+1;
getlist()
}
} }
defineExpose({ defineExpose({
load, load,
@ -115,10 +163,10 @@
line-height: 20rpx; line-height: 20rpx;
margin-top: 8rpx; margin-top: 8rpx;
text-align: center; text-align: center;
background: #FF9521;
font-weight: 800; font-weight: 800;
font-size: 11rpx; font-size: 11rpx;
color: #FFFFFF;
} }
} }
@ -173,11 +221,14 @@
} }
.right { .right {
color: #D10B0B;
font-size: 11rpx; font-size: 11rpx;
width: 60rpx; width: 60rpx;
text-align: center; text-align: center;
padding: 5rpx 0; padding: 5rpx 0;
&.red{
color: #D10B0B;
}
} }
} }

View File

@ -2,49 +2,106 @@
<view class="subpage"> <view class="subpage">
<view class="top"> <view class="top">
<view class="left" > <view class="left" >
<view class="on">设备001</view> <view v-for="item in devices" :class="{on:deviceId==item.encoding}" @click="setdeviceid(item.encoding)">设备{{item.encoding}}</view>
<view>设备002</view>
</view> </view>
<view class="r"> <view class="r">
2025年08月13日 14:34:00 {{infodata.queryTime}}
<view>区间测速实时监测中</view> <view>区间测速实时监测中</view>
</view> </view>
</view> </view>
<view class="center"> <view class="center">
<view class="item"> <view class="item">
<view class="num">333421</view> <view class="num">{{infodata.todayCount}}</view>
<view class="title">当天过车数量</view> <view class="title">当天过车数量</view>
</view> </view>
<view class="item"> <view class="item">
<view class="num">5分17秒</view> <view class="num">{{infodata.lastMonitoringTime}}</view>
<view class="title">距离最后一次监测已过去</view> <view class="title">距离最后一次监测已过去</view>
</view> </view>
</view> </view>
<scroll-view :scroll-y="true"> <scroll-view :scroll-y="true" @scrolltolower='bottomingOut'>
<view class="li" v-for="item in 10"> <view class="li" v-for="item in list">
<view class="l"> <view class="l">
车牌号码 车牌号码
<view class="color1"> <view class="color1" :class="`numcolor${item.vehicleNumberColor}`">
晋MP6400 {{item.vehicleNumber}}
</view> </view>
</view> </view>
<view class="r">2025-08-13 15:56:00</view> <view class="r">{{item.queryTime}}</view>
</view> </view>
<nynull txt='暂无过车数据' v-if="!list.length"></nynull>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<script setup> <script setup>
import {
ref
} from 'vue'
import {
getequipment,
getpassingTheCar
} from "/appapi/index.js"
const deviceId = ref("")
const devices=ref([]);
const infodata=ref({})
const list=ref([])
//
const pageSize=ref(40);
const pageNum=ref(1);
const hasNextPage=ref(true)
function load() { function load() {
console.log('过车信息load') console.log('过车信息load')
} }
function hide() { function hide() {
console.log('过车信息hide') console.log('过车信息hide')
} }
function show() { function show() {
getequipmentinfo()
console.log('过车信息show') console.log('过车信息show')
} }
// ID
function setdeviceid(id){
deviceId.value=id;
reset()
getinfo()
}
//
function getequipmentinfo(){
reset()
getequipment().then(r=>{
devices.value=r.data.allDevices;
deviceId.value=devices.value[0].encoding
getinfo()
})
}
//
function getinfo() {
getpassingTheCar({deviceId:deviceId.value,pageNum:pageNum.value,pageSize:pageSize.value}).then(r=>{
infodata.value=r.data;
list.value=list.value.concat(r.data.vehicleList)
hasNextPage.value=r.data.hasNextPage
})
}
//
function bottomingOut(){
if(hasNextPage.value){
pageNum.value=pageNum.value+1;
getinfo()
}
}
//
function reset(){
hasNextPage.value=true;
pageNum.value=1;
list.value=[];
}
defineExpose({ defineExpose({
load, load,
hide, hide,
@ -55,22 +112,26 @@
<style scoped lang="scss"> <style scoped lang="scss">
.subpage { .subpage {
padding: 15rpx; padding: 15rpx;
.top { .top {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.left { .left {
border-radius: 3rpx; border-radius: 3rpx;
background: #fff; background: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
view { view {
width: 90rpx; width: 90rpx;
text-align: center; text-align: center;
line-height: 33rpx; line-height: 33rpx;
color: #4D7BFF; color: #4D7BFF;
font-size: 11rpx; font-size: 11rpx;
&.on { &.on {
background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%); background: linear-gradient(45deg, #4F8AFF 0%, #4B5EFF 100%);
color: #fff; color: #fff;
@ -78,11 +139,13 @@
} }
} }
} }
.r { .r {
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: 800; font-weight: 800;
font-size: 11rpx; font-size: 11rpx;
view { view {
font-size: 11rpx; font-size: 11rpx;
color: #06765A; color: #06765A;
@ -93,36 +156,44 @@
} }
} }
} }
.center { .center {
display: flex; display: flex;
gap: 15rpx; gap: 15rpx;
justify-content: space-between; justify-content: space-between;
.item { .item {
border-radius: 3rpx; border-radius: 3rpx;
text-align: center; text-align: center;
margin: 15rpx 0; margin: 15rpx 0;
flex: 1; flex: 1;
padding: 18rpx 0; padding: 18rpx 0;
.num { .num {
font-size: 22rpx; font-size: 22rpx;
color: #4D7BFF; color: #4D7BFF;
font-weight: 800; font-weight: 800;
} }
.title { .title {
margin-top: 5rpx; margin-top: 5rpx;
font-size: 11rpx; font-size: 11rpx;
} }
&:nth-of-type(1) { &:nth-of-type(1) {
background: linear-gradient(177deg, #D6E4FA 0%, #FFFFFF 100%); background: linear-gradient(177deg, #D6E4FA 0%, #FFFFFF 100%);
} }
&:nth-of-type(2) { &:nth-of-type(2) {
background: linear-gradient(178deg, #D6FAE4 0%, #FFFFFF 100%); background: linear-gradient(178deg, #D6FAE4 0%, #FFFFFF 100%);
} }
} }
} }
scroll-view { scroll-view {
box-sizing: border-box; box-sizing: border-box;
height: calc(100vh - 175rpx); height: calc(100vh - 175rpx);
.li { .li {
display: flex; display: flex;
padding: 15rpx; padding: 15rpx;
@ -131,22 +202,25 @@
align-items: center; align-items: center;
border-radius: 3rpx; border-radius: 3rpx;
margin-bottom: 15rpx; margin-bottom: 15rpx;
.l { .l {
display: flex; display: flex;
align-items: center; align-items: center;
color: #000; color: #000;
font-size: 11rpx; font-size: 11rpx;
view { view {
background:#FF9521 ;
text-align: center; text-align: center;
padding: 3rpx 10rpx; padding: 3rpx 10rpx;
border-radius: 3rpx; border-radius: 3rpx;
margin-left: 15rpx; margin-left: 15rpx;
color: #fff;
font-weight: 800; font-weight: 800;
font-size: 11rpx; font-size: 11rpx;
} }
} }
.r { .r {
font-size: 11rpx; font-size: 11rpx;
} }

File diff suppressed because one or more lines are too long

View File

@ -4,96 +4,194 @@
<view class="tabs"> <view class="tabs">
<view class="left" @click="showdate=true"> <view class="left" @click="showdate=true">
<view class="time" :class="{on:chooseday}"> <view class="time" :class="{on:queryDate}">
<block v-if="chooseday">{{chooseday}}{{getDateDescription(chooseday)}}</block> <block v-if="queryDate">{{queryDate}}{{getDateDescription(queryDate)}}</block>
<block v-if="!chooseday">选择日期</block> <block v-if="!queryDate">选择日期</block>
</view> </view>
<image src="/static/time.png"></image> <image src="/static/time.png"></image>
</view> </view>
<view class="reset" @click="reset()">重置</view> <view class="reset" @click="reset()">重置</view>
</view> </view>
<view class="totalTime"> <view class="totalTime">
<view class="name">281 - 内蒙古锡盟交管支队二连浩特市</view> <view class="name">{{info.unitName}}</view>
<view class="time">16小时19分35秒</view> <view class="time">{{info.monitoringDuration}}</view>
</view> </view>
<view class="ul"> <view class="ul">
<view class="li"> <view class="li">
<view class="num">295</view> <view class="num">{{info.totalVehicles}}</view>
<view class="title">过车数量</view> <view class="title">过车数量</view>
</view> </view>
<view class="li"> <view class="li">
<view class="num">295</view> <view class="num">{{info.warningCount}}</view>
<view class="title">预警数量</view> <view class="title">预警数量</view>
</view> </view>
<view class="li"> <view class="li">
<view class="num">295</view> <view class="num">{{info.warningRatio}}</view>
<view class="title">预警比例</view> <view class="title">预警比例</view>
</view> </view>
<view class="li"> <view class="li">
<view class="num">295</view> <view class="num">{{info.seizureRatio}}</view>
<view class="title">查扣比例</view> <view class="title">查扣比例</view>
</view> </view>
</view> </view>
<view class="statistics"> <view class="statistics">
<view class="title">各超速类型数量对比</view> <view class="title">各超速类型数量对比</view>
<view class="charts-box"> <view class="charts-box" id="echart" :info='info' :change:info='echart.updata' :init="charts"
<qiun-data-charts type="bar" :opts="opts" :chartData="chartData" /> :change:init="echart.init">
<!-- <qiun-data-charts type="bar" :opts="opts" :chartData="chartData" /> -->
</view> </view>
</view> </view>
</template> </template>
<script module="mapbaidu" lang="renderjs"> <script module="echart" lang="renderjs">
let myChart
export default {
mounted() {
// echart
if (typeof window.echarts === 'function') {
this.init()
} else {
//
const script = document.createElement('script')
// view www www
script.src = 'static/echarts.min.js'
document.head.appendChild(script)
}
},
methods: {
init(e) {
if (!window.echarts) {
return
}
},
updata(r) {
if (window.echarts) {
let allnum=r.overspeedStatistics.overspeed50Plus+r.overspeedStatistics.overspeed20To50+r.overspeedStatistics.overspeed10To20+r.overspeedStatistics.overspeedUnder10
myChart = echarts.init(document.getElementById("echart"))
myChart.setOption({
grid: {
top: 20,
right: 0,
bottom: 15,
left: 0,
},
xAxis: {
type: 'value',
},
yAxis: {
type: 'category',
data: ["超速50%以上", "超速20%-50%", "超速10%-20%", "超速10%以下"]
},
series: [{
barWidth: 20,
type: 'bar',
color: "#4D7BFF",
label: {
show: true,
position: 'right',
width:100,
formatter:function(a){
return Number(a.value/allnum*100).toFixed(2)+'%';
}
},
emphasis:{
disabled:true
},
data: [
r.overspeedStatistics.overspeed50Plus,
r.overspeedStatistics.overspeed20To50,
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.overspeed50Plus,
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,
],
}
]
})
}
}
}
}
</script> </script>
<script setup> <script setup>
import { import {
ref ref
} from 'vue' } from 'vue'
import {
getmonitorStatistics
} from "/appapi/index.js"
const showdate = ref(false) const showdate = ref(false)
const Selectiondate = ref(); const Selectiondate = ref();
const chooseday = ref("") const queryDate = ref("")
const opts = { const info = ref({})
color: ["#4D7BFF"],
padding: [15, 30, 0, 5],
enableScroll: false,
legend: {
show: false,
},
showBox: false,
xAxis: {
boundaryGap: "justify",
disableGrid: false,
min: 0,
axisLine: false,
max: 40
},
yAxis: {},
extra: {
bar: {
type: "group",
width: 20,
meterBorde: 1,
meterFillColor: "#FFFFFF",
activeBgColor: "#000000",
activeBgOpacity: 0.08,
barBorderRadius: [6, 6, 0, 0],
seriesGap: 2,
categoryGap: 2,
labelPosition: "center"
},
}
}
const chartData = ref({}) const chartData = ref({})
const charts = ref(false);
function change(e) { function change(e) {
chooseday.value = e; queryDate.value = e;
getinfo()
} }
function reset() { function reset() {
Selectiondate.value.reset(); Selectiondate.value.reset();
chooseday.value = ""; queryDate.value = "";
getinfo()
} }
function getDateDescription(dateString) { function getDateDescription(dateString) {
@ -119,7 +217,7 @@
// 使
function load() { function load() {
console.log('统计load') console.log('统计load')
@ -127,18 +225,22 @@
function hide() { function hide() {
console.log('统计hide') console.log('统计hide')
charts.value = false;
} }
function show() { function show() {
chartData.value={
categories: ["超速50%以上", "超速20%-50%", "超速10%-20%", "超速10%以下"],
series: [{
name: "",
data: [35, 36, 31, 33]
},
] getinfo()
};
}
function getinfo() {
getmonitorStatistics({
queryDate: queryDate.value
}).then(r => {
info.value = r.data;
})
} }
defineExpose({ defineExpose({
load, load,
@ -151,16 +253,19 @@
.charts-box { .charts-box {
height: 150rpx; height: 150rpx;
} }
.totalTime { .totalTime {
background: url("/static/tjbj.png"); background: url("/static/tjbj.png");
background-size: 100% 100%; background-size: 100% 100%;
margin: 0 15rpx; margin: 0 15rpx;
padding: 15rpx; padding: 15rpx;
.name { .name {
font-weight: 500; font-weight: 500;
font-size: 13rpx; font-size: 13rpx;
color: #333333; color: #333333;
} }
.time { .time {
font-weight: 700; font-weight: 700;
font-size: 17rpx; font-size: 17rpx;
@ -169,36 +274,43 @@
} }
} }
.ul { .ul {
display: flex; display: flex;
gap: 15rpx; gap: 15rpx;
margin: 15rpx; margin: 15rpx;
.li { .li {
flex: 1; flex: 1;
text-align: center; text-align: center;
background: #fff; background: #fff;
border-radius: 3rpx; border-radius: 3rpx;
padding: 17rpx 0; padding: 17rpx 0;
.num { .num {
font-weight: 500; font-weight: 500;
font-size: 16rpx; font-size: 16rpx;
color: #4D7BFF; color: #4D7BFF;
} }
.title { .title {
font-size: 11rpx; font-size: 11rpx;
margin-top: 9rpx; margin-top: 9rpx;
} }
} }
} }
.statistics { .statistics {
background: #fff; background: #fff;
margin: 15rpx; margin: 15rpx;
border-radius: 3rpx; border-radius: 3rpx;
padding: 15rpx; padding: 15rpx;
.title { .title {
font-size: 11rpx; font-size: 11rpx;
} }
} }
.tabs { .tabs {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,49 +1,51 @@
<template> <template>
<view class="topstatistics"> <view class="topstatistics">
<view class="li"> <view class="li">
<view class="num">超速20%以上</view> <view class="num">{{info.statistics?.warningLevel || '暂无'}}</view>
<view class="title">预警级别</view> <view class="title">预警级别</view>
</view> </view>
<view class="li"> <view class="li">
<view class="num">438公里</view> <view class="num">{{info.statistics?.regionalNetworkDistance || '暂无'}}</view>
<view class="title">区间距离</view> <view class="title">区间距离</view>
</view> </view>
<view class="li"> <view class="li">
<view class="num">80km/h</view> <view class="num">{{info.statistics?.intervalSpeedLimit || '暂无'}}</view>
<view class="title">区间限速</view> <view class="title">区间限速</view>
</view> </view>
<view class="li"> <view class="li">
<view class="num">4小时38分钟</view> <view class="num">{{info.statistics?.longestDrivingDuration || '暂无'}}</view>
<view class="title">最短行驶时长</view> <view class="title">最短行驶时长</view>
</view> </view>
</view> </view>
<view class="tabs"> <view class="tabs">
<view class="left"> <view class="left">
<view class="nav on"> <view class="nav" :class="{on:status==2}" @click="setstatus(2)">
超速车辆 超速车辆
</view> </view>
<view class="nav"> <view class="nav" :class="{on:status==3}" @click="setstatus(3)">
暂扣车辆 暂扣车辆
</view> </view>
<view class="nav"> <view class="nav" :class="{on:status==4}" @click="setstatus(4)">
放行车辆 放行车辆
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<input placeholder="搜索超速车辆" /> <input placeholder="搜索超速车辆" @confirm="getinfo" v-model="keyword" />
<uni-icons type="search" size="16rpx"></uni-icons> <uni-icons type="search" size="16rpx" @click="getinfo"></uni-icons>
</view> </view>
</view> </view>
<scroll-view :scroll-y="true" class="scroll-view"> <scroll-view :scroll-y="true" class="scroll-view">
<view v-for="item in 10" class="item"> <view v-for="item in info.data" class="item" @click.stop="listwithhold(item.id,status==2?1:2)">
<view class="left"> <view class="left">
<view class="t"> <view class="t">
<image src="/static/err.png"></image> <image v-if="status==2" src="/static/err.png"></image>
车牌号码 车牌号码
</view> </view>
<view class="num">晋MP6400</view> <view class="num" :class="`numcolor${item.vehicleNumberColor}`">
{{item.vehicleNumber}}
</view> </view>
<view class="center"> </view>
<view class="center" v-if="status==2">
<view class="thead"> <view class="thead">
<view>平均车速</view> <view>平均车速</view>
<view>超速比例</view> <view>超速比例</view>
@ -51,17 +53,45 @@
<view>待休息时长</view> <view>待休息时长</view>
</view> </view>
<view class="tbody"> <view class="tbody">
<view>100km/h</view> <view>{{item.averageSpeed}}</view>
<view>10%-20%</view> <view>{{item.overspeedRatio}}</view>
<view>4小时02分钟</view> <view>{{item.actualDrivingDuration}}</view>
<view>15分钟</view> <view>{{item.restDuration}}</view>
</view> </view>
</view> </view>
<view class="right" @click="showdetails=true">暂扣</view> <view class="center center2" v-if="status==3">
<view class="thead">
<view>待休息时长</view>
<view>待放行时间</view>
</view> </view>
<view class="tbody">
<view>{{item.restDuration}}</view>
<view>{{item.overspeedRatio}}</view>
</view>
</view>
<view class="center center3" v-if="status==4">
<view class="thead">
<view>平均车速</view>
<view>超速比例</view>
<view>休息时长</view>
<view>放行时间</view>
</view>
<view class="tbody">
<view>{{item.averageSpeed}}</view>
<view>{{item.overspeedRatio}}</view>
<view>{{item.restDuration}}</view>
<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>
<nynull v-if="!info.data?.length"></nynull>
</scroll-view> </scroll-view>
<pageanimation v-model="showdetails" @close="refdetails.hide()"> <pageanimation v-model="showdetails" @close="refdetails.hide()">
<pagedetails ref="refdetails" /> <pagedetails ref="refdetails" @opneinfo='opneshowdetails' />
</pageanimation> </pageanimation>
</template> </template>
@ -70,22 +100,57 @@
import { import {
ref ref
} from "vue"; } from "vue";
import {
getwarningList
} from "/appapi/index.js"
import pagedetails from "./details.vue"; import pagedetails from "./details.vue";
const refdetails = ref() const refdetails = ref()
const showdetails=ref(false) const showdetails=ref(false)
const status =ref(2)
const pageSize=ref(999)
const info=ref({
data:[]
});
const keyword=ref("")
function load() { function load() {
console.log('预警信息load') console.log('预警信息load')
} }
function opneshowdetails(){
showdetails.value=true;
}
function hide() { function hide() {
console.log('预警信息hide') console.log('预警信息hide')
showdetails.value=false;
refdetails.value.hide()
}
function getinfo(){
info.value.data=[];
getwarningList({status:status.value,keyword:keyword.value,pageSize:pageSize.value}).then(r=>{
info.value=r.data;
})
}
function setstatus(type){
status.value=type;
getinfo()
} }
function show() { function show() {
console.log('预警信息show') getinfo()
} }
//
//
function listwithhold(id,type){
showdetails.value=true;
refdetails.value.show(id,type)
}
function withhold(id,type){
//
refdetails.value.opneshowupimg(id,type)
}
defineExpose({ defineExpose({
load, load,
hide, hide,
@ -129,10 +194,10 @@
line-height: 20rpx; line-height: 20rpx;
margin-top: 8rpx; margin-top: 8rpx;
text-align: center; text-align: center;
background: #FF9521;
font-weight: 800; font-weight: 800;
font-size: 11rpx; font-size: 11rpx;
color: #FFFFFF;
} }
} }
@ -184,18 +249,42 @@
color: #333333; color: #333333;
} }
} }
&.center2{
.thead {
view{
width: 180rpx;
}
}
}
&.center3{
.thead {
view{
width: 110rpx;
}
}
}
} }
.right { .right {
border-radius: 15rpx; border-radius: 15rpx;
border: 1rpx solid #D10B0B;
color: #D10B0B;
font-weight: 600; font-weight: 600;
font-size: 11rpx; font-size: 11rpx;
width: 60rpx; width: 60rpx;
text-align: center; text-align: center;
padding: 5rpx 0; padding: 5rpx 0;
&.green{
border: 1rpx solid #4D7BFF;
color: #4D7BFF;
}
&.red{
border: 1rpx solid #D10B0B;
color: #D10B0B;
}
&.grey{
border: 1rpx solid #666666;
color: #666666;
}
} }
} }

View File

@ -7,21 +7,23 @@
<view class="from"> <view class="from">
<view class="input" :class="{on:isname}"> <view class="input" :class="{on:isname}">
<image src="/static/signIn/2.png"></image> <image src="/static/signIn/2.png"></image>
<input cursor-spacing='15' @focus="isname=true" @blur="isname=false" placeholder="请填写账号"/> <input cursor-spacing='15' v-model="name" @focus="isname=true" @blur="isname=false" placeholder="请填写账号" />
</view> </view>
<view class="input" :class="{on:ispassword}"> <view class="input" :class="{on:ispassword}">
<image src="/static/signIn/1.png"></image> <image src="/static/signIn/1.png"></image>
<input cursor-spacing='15' v-model="password" @focus="ispassword=true" @blur="ispassword=false" :type="!showpassword?'password':'text'" placeholder="请填密码"/> <input cursor-spacing='15' v-model="password" @focus="ispassword=true" @blur="ispassword=false"
:type="!showpassword?'password':'text'" placeholder="请填密码" />
<view @click="showpassword=!showpassword" v-if="password.length"> <view @click="showpassword=!showpassword" v-if="password.length">
<uni-icons type="eye-slash-filled" v-if="!showpassword" size="16rpx"></uni-icons> <uni-icons type="eye-slash-filled" v-if="!showpassword" size="16rpx"></uni-icons>
<uni-icons type="eye-filled" v-else size="16rpx"></uni-icons> <uni-icons type="eye-filled" v-else size="16rpx"></uni-icons>
</view> </view>
</view> </view>
<view class="checkbox"> <view class="checkbox" @click.stop="memory=!memory">
<checkbox value="cb" activeBackgroundColor='#4D7BFF' :checked="true" color="#ffffff" style="transform:scale(0.7)" /> <checkbox @click.stop="memory=!memory" activeBackgroundColor='#4D7BFF' :checked="memory" color="#ffffff"
style="transform:scale(0.7)" />
记住密码 记住密码
</view> </view>
<view class="submit">登录</view> <view class="submit" @click="submit">登录</view>
</view> </view>
</view> </view>
@ -29,13 +31,63 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'; import {
applogin
} from "/appapi/index.js"
import soket from "/utils/soket.js"
import {onShow} from "@dcloudio/uni-app"
import {
ref
} from 'vue';
const isname = ref(false); const isname = ref(false);
const ispassword = ref(false); const ispassword = ref(false);
const showpassword = ref(false) const showpassword = ref(false)
const name=ref(""); const name = ref(uni.getStorageSync('name'));
const password=ref("") const password = ref(uni.getStorageSync('password'))
const memory=ref(true)
onShow(()=>{
// Socket
uni.closeSocket()
})
function submit(){
if(!name.value){
uni.showToast({
title:"请填写账号",
icon:"none"
})
return
}
if(!password.value){
uni.showToast({
title:"请填写密码",
icon:"none"
})
return
}
applogin({
username:name.value,
password:password.value,
deviceType:" android"
}).then(r=>{
// soket
uni.setStorageSync('USERID',r.data.user.userId)
soket()
uni.reLaunch({
url:"/pages/index"
})
if(memory.value){
uni.setStorageSync('name',name.value);
uni.setStorageSync('password',password.value);
}else{
uni.removeStorageSync('name')
uni.removeStorageSync('password')
}
})
}
function ccc(e){
console.log(e)
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -43,29 +95,35 @@ import { ref } from 'vue';
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
position: relative; position: relative;
.bj { .bj {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.box { .box {
position: fixed; position: fixed;
top: 50%; top: 50%;
right: 110rpx; right: 110rpx;
transform: translate(0%, -50%); transform: translate(0%, -50%);
.title { .title {
height: 40rpx; height: 40rpx;
width: 230rpx; width: 230rpx;
} }
.desc { .desc {
text-align: center; text-align: center;
color: #667085; color: #667085;
font-size: 15rpx; font-size: 15rpx;
margin: 0rpx 0 20rpx 0; margin: 0rpx 0 20rpx 0;
} }
.from { .from {
margin-top: 34rpx; margin-top: 34rpx;
.input { .input {
display: flex; display: flex;
align-items: center; align-items: center;
@ -74,13 +132,16 @@ import { ref } from 'vue';
border-radius: 5rpx; border-radius: 5rpx;
margin-bottom: 9rpx; margin-bottom: 9rpx;
background: #fff; background: #fff;
&.on { &.on {
border: 1px solid #4D7BFF; border: 1px solid #4D7BFF;
} }
input { input {
font-size: 12rpx; font-size: 12rpx;
margin-right: 7rpx; margin-right: 7rpx;
} }
image { image {
width: 10rpx; width: 10rpx;
height: 13rpx; height: 13rpx;
@ -89,6 +150,7 @@ import { ref } from 'vue';
} }
} }
.checkbox { .checkbox {
display: flex; display: flex;
align-items: center; align-items: center;
@ -96,6 +158,7 @@ import { ref } from 'vue';
margin: 15rpx 0; margin: 15rpx 0;
font-size: 11rpx; font-size: 11rpx;
} }
.submit { .submit {
text-align: center; text-align: center;
background: #4D7BFF; background: #4D7BFF;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -57,6 +57,9 @@ const cfe = {
yAxisFormatDemo:function (value, index) { yAxisFormatDemo:function (value, index) {
return value + '元'; return value + '元';
}, },
"percentage":function(val, index, series, opts){
return val+'%'
},
seriesFormatDemo:function(res){ seriesFormatDemo:function(res){
return res.name + '年' + res.value + '元'; return res.name + '年' + res.value + '元';
} }

View File

@ -59,6 +59,10 @@ const cfu = {
"xAxisDemo1":function(val, index, opts){return val+'年';}, "xAxisDemo1":function(val, index, opts){return val+'年';},
"xAxisDemo2":function(val, index, opts){return formatDateTime(val,'h:m')}, "xAxisDemo2":function(val, index, opts){return formatDateTime(val,'h:m')},
"seriesDemo1":function(val, index, series, opts){return val+'元'}, "seriesDemo1":function(val, index, series, opts){return val+'元'},
"percentage":function(val, index, series, opts){
return val+'%'
},
"tooltipDemo1":function(item, category, index, opts){ "tooltipDemo1":function(item, category, index, opts){
if(index==0){ if(index==0){
return '随便用'+item.data+'年' return '随便用'+item.data+'年'

View File

@ -1,50 +0,0 @@
export default function lzFileWriter(id, fn) {
plus.io.resolveLocalFileSystemURL('/static/html/index.html', function(entry) {
let _we = plus.webview.create(entry.toLocalURL());
_we.evalJS(`settitle("${id}");`)
plus.globalEvent.addEventListener('plusMessage', (e) => {
if(e.data.id==id){
geturl(e.data.img, e.data.id + ".png",e.data.id)
_we.close()
}
})
})
function geturl(base64, fileName,imgid) {
plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function(fs) {
fs.root.getFile(fileName, {
create: true
}, function(fileEntry) {
// 获得平台绝对路径
var fullPath = fileEntry.fullPath;
// 引入安卓原生类
var Base64 = plus.android.importClass("android.util.Base64");
var FileOutputStream = plus.android.importClass("java.io.FileOutputStream");
//如果文件不存在则创建文件,如果文件存在则删除文件后重新创建文件
var out = new FileOutputStream(fullPath);
/**
* 此处需要把base64前缀去除在写入字节流数组
* 去除头部data:image/jpg;base64,留下base64编码后的字符串
**/
let index = base64.indexOf(',')
let base64Str = base64.slice(index + 1, base64.length)
//base64解密得到字节流bytes
var bytes = Base64.decode(base64Str, 0);
try {
out.write(bytes); // byte 数组写入此文件输出流中。
out.flush(); //刷新写入文件中去。
out.close(); //关闭此文件输出流并释放与此流有关的所有系统资源。
uni.setStorageSync(imgid,fullPath)
fn(fullPath)
} catch (e) {
console.log(e.message);
}
});
});
}
}

View File

@ -1,20 +0,0 @@
export default function(url,data,method="get"){
return new Promise((resolve, reject)=>{
uni.request({
url: 'https://api.map.baidu.com/direction/v2/'+url, //仅为示例,并非真实接口地址。
data: {
ak:"23rLBU4tBLeNEMsxCCnXXw6aYyuOJCwY",
...data
},
method:method,
success: (res) => {
console.log(res.data)
if(res.data.status==0){
resolve(res.data.result)
}
}
});
})
}