2024-05-13 18:03:20 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="page">
|
|
|
|
|
<u-navbar title="车辆搜索" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
2024-06-07 18:08:55 +08:00
|
|
|
|
height='45'></u-navbar>
|
2024-05-13 18:03:20 +08:00
|
|
|
|
<view class="" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;">
|
|
|
|
|
|
|
|
|
|
<view class="top_box" style="margin-top: 20rpx;">
|
2024-05-13 23:34:28 +08:00
|
|
|
|
<view class="left_text" @click="show=true">
|
|
|
|
|
{{tit}} <view class="iconfont icon-xiangxia1"></view>
|
2024-05-13 18:03:20 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="sear_ipt">
|
|
|
|
|
<input type="text"
|
|
|
|
|
v-model="searchKeyword"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
class="input"
|
|
|
|
|
placeholder-style="color:#C7CDD3"
|
|
|
|
|
@input="search()">
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
2024-05-13 23:34:28 +08:00
|
|
|
|
</view>
|
|
|
|
|
<u-select v-model="show" :list="list" title='添加方式' @confirm="confirm"></u-select>
|
2024-05-13 18:03:20 +08:00
|
|
|
|
|
|
|
|
|
|
2024-05-13 23:34:28 +08:00
|
|
|
|
<view class="info_card" style="margin-top: 20rpx;" v-for="(item,index) in searchList" :key="index" @click="todetail(item)">
|
2024-05-13 18:03:20 +08:00
|
|
|
|
<view class="info_tit">
|
2024-05-13 23:34:28 +08:00
|
|
|
|
车牌号:{{item.vehicleNum}}
|
2024-05-13 18:03:20 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="lines"></view>
|
|
|
|
|
<view class="cont">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="info_li">
|
|
|
|
|
<view class="half_infoli">
|
2024-05-13 23:34:28 +08:00
|
|
|
|
MAC:<span>{{item.mac}}</span>
|
2024-05-13 18:03:20 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="half_infoli">
|
2024-05-13 23:34:28 +08:00
|
|
|
|
电量:<span>{{item.remainingPower}}%</span>
|
2024-05-13 18:03:20 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info_li">
|
|
|
|
|
<view class="half_infoli">
|
2024-05-13 23:34:28 +08:00
|
|
|
|
SN:<span>{{item.sn}}</span>
|
2024-05-13 18:03:20 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="half_infoli">
|
2024-05-13 23:34:28 +08:00
|
|
|
|
型号:<span style="color:#4C97E7 ;">{{item.model}}</span>
|
2024-05-13 18:03:20 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-05-13 23:34:28 +08:00
|
|
|
|
|
2024-05-13 18:03:20 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-05-13 23:34:28 +08:00
|
|
|
|
let timerId;
|
2024-05-13 18:03:20 +08:00
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
bgc: {
|
|
|
|
|
backgroundColor: "#fff",
|
|
|
|
|
},
|
2024-05-13 23:34:28 +08:00
|
|
|
|
tit:'SN',
|
|
|
|
|
typeidx:'1',
|
|
|
|
|
list: [{
|
|
|
|
|
value: '1',
|
|
|
|
|
label: 'SN'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '2',
|
|
|
|
|
label: 'MAC'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '3',
|
|
|
|
|
label: '车牌号'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
],
|
2024-05-13 18:03:20 +08:00
|
|
|
|
typeindex:0,
|
2024-05-13 23:34:28 +08:00
|
|
|
|
show:false,
|
|
|
|
|
searchKeyword:'',
|
|
|
|
|
searchList:[]
|
2024-05-13 18:03:20 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2024-05-13 23:34:28 +08:00
|
|
|
|
todetail(item){
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pages_admin/order/device_detail?id='+item.sn
|
|
|
|
|
})
|
2024-05-13 18:03:20 +08:00
|
|
|
|
},
|
2024-05-13 23:34:28 +08:00
|
|
|
|
getSearch(){
|
|
|
|
|
let data={
|
|
|
|
|
type:this.typeidx,
|
|
|
|
|
key:this.searchKeyword
|
|
|
|
|
}
|
2024-06-22 18:06:23 +08:00
|
|
|
|
this.$u.get(`/appVerify/device/search?`, data).then((res) => {
|
2024-05-13 23:34:28 +08:00
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.searchList=res.data
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
// 处理接口返回错误的情况
|
|
|
|
|
}
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
// 处理接口请求失败的情况
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
search(){
|
|
|
|
|
clearTimeout(timerId);
|
|
|
|
|
// 设置一个新的定时器,在滑动停止后 500ms 执行 getmarks 方法
|
|
|
|
|
timerId = setTimeout(() => {
|
|
|
|
|
this.getSearch()
|
|
|
|
|
|
|
|
|
|
}, 500);
|
|
|
|
|
},
|
|
|
|
|
confirm(e) {
|
|
|
|
|
// console.log(e,'eeeeeeeeee');
|
|
|
|
|
this.typeidx = e[0].value
|
|
|
|
|
this.tit= e[0].label
|
|
|
|
|
|
|
|
|
|
// console.log(e);
|
|
|
|
|
// this.mode = e[0].label
|
|
|
|
|
// this.gettype()
|
2024-05-13 18:03:20 +08:00
|
|
|
|
},
|
|
|
|
|
changeType(num){
|
|
|
|
|
this.typeindex=num
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
page {
|
|
|
|
|
background-color: #F6F6F6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page {
|
|
|
|
|
width: 750rpx;
|
|
|
|
|
.lines{
|
|
|
|
|
width: 748rpx;
|
|
|
|
|
height: 22rpx;
|
|
|
|
|
background: #F6F6F6;
|
|
|
|
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
|
|
|
|
}
|
|
|
|
|
.info_card {
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
|
|
|
|
|
.info_tit {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
padding: 22rpx 28rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #3D3D3D;
|
|
|
|
|
|
|
|
|
|
.money {
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #4C97E7;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.lines {
|
|
|
|
|
width: 750rpx;
|
|
|
|
|
height: 2rpx;
|
|
|
|
|
border: 2rpx solid #ccc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cont {
|
|
|
|
|
padding: 26rpx 28rpx;
|
|
|
|
|
|
|
|
|
|
.info_li {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: #808080;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
color: #3D3D3D;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
line-height: 48rpx;
|
|
|
|
|
|
|
|
|
|
.half_infoli {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
width: 50%;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: #808080;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
color: #3D3D3D;
|
|
|
|
|
}
|
|
|
|
|
.input{
|
|
|
|
|
width: 30%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.cont_box {
|
|
|
|
|
padding: 14rpx 30rpx;
|
|
|
|
|
width: 750rpx;
|
|
|
|
|
background: #E2F2FF;
|
|
|
|
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
|
|
|
|
|
|
|
|
|
.cont_info {
|
|
|
|
|
margin-top: 8rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
|
|
|
|
|
.info_li {
|
|
|
|
|
width: 50%;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: #3D3D3D;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.data_box {
|
|
|
|
|
width: 672rpx;
|
|
|
|
|
margin: 36rpx auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
align-items: center;
|
|
|
|
|
// justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
.data_cont {
|
|
|
|
|
margin-right: 40rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: 150rpx;
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
|
|
|
|
|
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #3D3D3D;
|
|
|
|
|
border: 2rpx solid #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.act1 {
|
|
|
|
|
background: #E2F2FF;
|
|
|
|
|
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
|
|
|
|
|
color: #4C97E7;
|
|
|
|
|
border: 2rpx solid #4C97E7;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.top_box {
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 28rpx 30rpx;
|
|
|
|
|
// padding: 20rpx 0;
|
|
|
|
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
width: 672rpx;
|
|
|
|
|
height: 100rpx;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
|
|
|
|
|
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
|
|
|
|
|
|
|
|
|
.left_text {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
align-items: center;
|
|
|
|
|
width: 25%;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #3D3D3D;
|
|
|
|
|
.icon-xiangxia1{
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.timebox {
|
|
|
|
|
width: 75%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-left: 34rpx;
|
|
|
|
|
|
|
|
|
|
.left_time {
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-right: 6rpx;
|
|
|
|
|
height: 50rpx;
|
|
|
|
|
width: 45%;
|
|
|
|
|
border: 2rpx solid #ccc;
|
|
|
|
|
border-radius: 12rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #979797;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right_time {
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-left: 6rpx;
|
|
|
|
|
height: 50rpx;
|
|
|
|
|
width: 45%;
|
|
|
|
|
border: 2rpx solid #ccc;
|
|
|
|
|
border-radius: 12rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #979797;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|