init
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-picker": "@vant/weapp/picker/index",
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "提醒"
|
||||
}
|
||||
@@ -0,0 +1,339 @@
|
||||
/* pages/vehicleMonitoring/failureAlert/failureAlert.wxss */
|
||||
.container {
|
||||
height: 100vh;
|
||||
background: #EFF1F4;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.search-container {
|
||||
padding: 10px 8px;
|
||||
border-top: 1px solid #DBDBDB;
|
||||
background: #ffffff;
|
||||
.row {
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
>.number-plate, >.project-select,.status-select {
|
||||
width: calc((100% - 6px) / 2);
|
||||
height: 36px;
|
||||
padding: 8px 10px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #E6EAF2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
>.number-plate {
|
||||
width: 100%;
|
||||
.icon_search {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 8px;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
input {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
}
|
||||
.btn {
|
||||
width: 18px;
|
||||
padding: 0 4px;
|
||||
color: #949CB5;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
>.project-select, .status-select {
|
||||
width: calc((100% - 6px) / 2);
|
||||
picker {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
.picker {
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
// padding-left: 14px;
|
||||
box-sizing: border-box;
|
||||
// border: 1px solid #E6EAF2;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
align-items: center;
|
||||
.val {
|
||||
width: 85%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.picker::after {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 6px solid #636B83;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid transparent;
|
||||
border-left: 6px solid transparent;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 4px;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
|
||||
.select-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.val {
|
||||
width: 90%;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.placeholder{
|
||||
color: #949CB5;
|
||||
}
|
||||
.arrow{
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 13rpx solid transparent;
|
||||
border-right: 13rpx solid transparent;
|
||||
border-top: 15rpx solid #636B83;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.line {
|
||||
width: 10px;
|
||||
height: 1px;
|
||||
background: #949CB5;
|
||||
}
|
||||
.date {
|
||||
width: calc((100% - 10px - 70px) / 2);
|
||||
height: 36px;
|
||||
padding: 8px 10px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #E6EAF2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 8px;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
input {
|
||||
flex: 1;
|
||||
color: #2E3A4F;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
>.btn {
|
||||
// height: 36px;
|
||||
padding: 8px 14px;
|
||||
margin-left: 12px;
|
||||
background: linear-gradient(90deg, #3B7CFC 0%, #548BFC 100%);
|
||||
border-radius: 8px;
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
.total {
|
||||
padding: 6px 18px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
.number {
|
||||
margin: 0 4px;
|
||||
color: #4381FC;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
height: calc(100vh - 44px - 150px - 32px);
|
||||
padding: 2px 0;
|
||||
box-sizing: border-box;
|
||||
// overflow-y: auto;
|
||||
.scroll-view_H {
|
||||
height: 100%;
|
||||
// padding: 0 8px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.item {
|
||||
padding: 10px 0 4px;
|
||||
margin: 0 8px 8px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 4px 0 rgba(0,0,0,.4);
|
||||
.top {
|
||||
padding: 0 8px;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.number-plate {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #2E3A4F;
|
||||
}
|
||||
.t-right {
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
.project-name {
|
||||
margin-right: 6px;
|
||||
}
|
||||
.type {
|
||||
padding: 0 8px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #3977F7;
|
||||
color: #3977F7;
|
||||
}
|
||||
}
|
||||
}
|
||||
.row {
|
||||
padding: 0 8px;
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.label {
|
||||
color: #858CA0;
|
||||
}
|
||||
.val {
|
||||
color: #2E3A4F;
|
||||
}
|
||||
}
|
||||
.time-container {
|
||||
padding: 0 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
>.time {
|
||||
width: calc((100% - 20px) / 3);
|
||||
.val {
|
||||
min-height: 58px;
|
||||
margin-bottom: 4px;
|
||||
background: #ECEFF5;
|
||||
border-radius: 8px;
|
||||
color: #303133;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.val-f16 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.label {
|
||||
color: #8A90A4;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
>.normal {
|
||||
.val {
|
||||
color: #4381FC;
|
||||
}
|
||||
}
|
||||
>.error {
|
||||
.val {
|
||||
background-color: #FFEDED;
|
||||
color: #E04D4D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.nodata {
|
||||
text-align: center;
|
||||
margin: 60px;
|
||||
font-size: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 时间选择器
|
||||
.date-btn-box {
|
||||
// background: #fff;
|
||||
// border-radius: 4px 4px 0 0;
|
||||
border-bottom: 2rpx solid #F1F1F1;
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.btn {
|
||||
padding: 20rpx 36rpx;
|
||||
color: #888888;
|
||||
}
|
||||
.btn-confirm{
|
||||
color: #3D7EEA;
|
||||
}
|
||||
}
|
||||
.date-title {
|
||||
padding: 20rpx 36rpx;
|
||||
font-size: 36rpx;
|
||||
color: #888888;
|
||||
border-bottom: 2rpx solid #F1F1F1;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
.line {
|
||||
width: 10px;
|
||||
height: 1px;
|
||||
margin: 0 14px;
|
||||
background: #949CB5;
|
||||
}
|
||||
.date {
|
||||
width: calc((100% - 10px - 28px) / 2);
|
||||
height: 36px;
|
||||
padding: 8px 10px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #E6EAF2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 8px;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
input {
|
||||
flex: 1;
|
||||
color: #2E3A4F;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.select {
|
||||
border: 1px solid #1677FF;
|
||||
input {
|
||||
color: #1677FF !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.picker-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@@ -0,0 +1,640 @@
|
||||
// pages/vehicleMonitoring/failureAlert/failureAlert.ts
|
||||
import { getAction } from '../../../api/base';
|
||||
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
tabActive: 0,
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
startDateTmp: '',
|
||||
endDateTmp: '',
|
||||
selectDate: 'startDate',
|
||||
showDateSelect: false,
|
||||
dateList: {
|
||||
years: [2023, 2024, 2025],
|
||||
months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
date: [
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
|
||||
]
|
||||
},
|
||||
dateValue: [0, 0, 0],
|
||||
loading: false,
|
||||
current: 1,
|
||||
isLast: false,
|
||||
plateNumber: '',
|
||||
showSelect: {
|
||||
projectSelectShow: false,
|
||||
statusSelectShow: false
|
||||
},
|
||||
projectOptions: [
|
||||
{
|
||||
value: '',
|
||||
text: '全部'
|
||||
}
|
||||
] as any,
|
||||
selectProjectIndex: 0,
|
||||
statusOptions: [
|
||||
{
|
||||
value: '',
|
||||
text: '全部'
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
text: '已结束'
|
||||
},
|
||||
{
|
||||
value: '0',
|
||||
text: '未结束'
|
||||
}
|
||||
],
|
||||
selectStatusIndex: 2,
|
||||
selectProject: {} as any,
|
||||
listTotal: 0,
|
||||
fenceAlarmList: [],
|
||||
speedAlarmlistTotal: 0,
|
||||
overTimeAlarmlistTotal: 0,
|
||||
speedAlarmList: [],
|
||||
overTimeAlarmList: []
|
||||
},
|
||||
toSearch() {
|
||||
wx.setStorageSync('isGlobal', '');
|
||||
wx.navigateTo({
|
||||
url: '../component/vehicleSearch/vehicleSearch',
|
||||
fail: e => {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 日期相关--------------
|
||||
showDate(e: any) {
|
||||
// selectDate
|
||||
let clickDate = null as any;
|
||||
if (e.currentTarget.dataset.key == 'startDate') {
|
||||
clickDate = this.data.startDate;
|
||||
} else {
|
||||
clickDate = this.data.endDate;
|
||||
}
|
||||
let y = this.data.dateList.years.findIndex(
|
||||
(x: number) => x == Number(clickDate.split('-')[0])
|
||||
);
|
||||
let m = this.data.dateList.months.findIndex(
|
||||
(x: number) => x == Number(clickDate.split('-')[1])
|
||||
);
|
||||
let d = this.data.dateList.date.findIndex(
|
||||
(x: number) => x == Number(clickDate.split('-')[2])
|
||||
);
|
||||
// console.log(this.data.startDate.split('-'))
|
||||
console.log([y, m, d]);
|
||||
this.setData({
|
||||
showDateSelect: true,
|
||||
selectDate: e.currentTarget.dataset.key,
|
||||
|
||||
startDateTmp: this.data.startDate,
|
||||
endDateTmp: this.data.endDate,
|
||||
dateValue: [y, m, d]
|
||||
});
|
||||
},
|
||||
hideDate() {
|
||||
this.setData({
|
||||
showDateSelect: false
|
||||
});
|
||||
},
|
||||
changeSelectDate(e: any) {
|
||||
this.setData({
|
||||
selectDate: e.currentTarget.dataset.key,
|
||||
current: 1,
|
||||
isLast: false,
|
||||
fenceAlarmList: [],
|
||||
speedAlarmList: [],
|
||||
overTimeAlarmList: []
|
||||
});
|
||||
},
|
||||
selectDate(e: any) {
|
||||
console.log(e.detail.value);
|
||||
let y: string | number = this.data.dateList.years[e.detail.value[0]];
|
||||
let m: string | number = this.data.dateList.months[e.detail.value[1]];
|
||||
let d: string | number = this.data.dateList.date[e.detail.value[2]];
|
||||
y = y < 10 ? '0' + y : y;
|
||||
m = m < 10 ? '0' + m : m;
|
||||
d = d < 10 ? '0' + d : d;
|
||||
if (this.data.selectDate == 'startDate') {
|
||||
this.setData({
|
||||
startDateTmp: `${y}-${m}-${d}`
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
endDateTmp: `${y}-${m}-${d}`
|
||||
});
|
||||
}
|
||||
},
|
||||
changeDate(e: any) {
|
||||
console.log(
|
||||
new Date(this.data.startDateTmp).getTime(),
|
||||
new Date(this.data.endDateTmp).getTime()
|
||||
);
|
||||
if (
|
||||
new Date(this.data.startDateTmp).getTime() >
|
||||
new Date(this.data.endDateTmp).getTime()
|
||||
) {
|
||||
wx.showToast({
|
||||
title: '结束时间不能早于开始时间',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
startDate: this.data.startDateTmp,
|
||||
endDate: this.data.endDateTmp,
|
||||
showDateSelect: false
|
||||
});
|
||||
},
|
||||
// 日期相关--------------end
|
||||
tabOnClick(event: any) {
|
||||
console.log(event.detail.name);
|
||||
// 看情况要不要重置查询条件
|
||||
this.setData({
|
||||
current: 1,
|
||||
isLast: false,
|
||||
fenceAlarmList: [],
|
||||
speedAlarmList: [],
|
||||
overTimeAlarmList: [],
|
||||
tabActive: event.detail.name
|
||||
// selectProjectIndex: 0
|
||||
});
|
||||
// 查询
|
||||
if (event.detail.name == 0) {
|
||||
this.getFenceAlarmList();
|
||||
} else if (event.detail.name == 1) {
|
||||
this.getSpeedAlarmList();
|
||||
} else if (event.detail.name == 2) {
|
||||
this.getOverTimeAlarmList();
|
||||
}
|
||||
},
|
||||
|
||||
getNextList() {
|
||||
if (this.data.loading) return;
|
||||
if (!this.data.isLast) {
|
||||
this.setData({
|
||||
current: this.data.current + 1
|
||||
});
|
||||
this.getFenceAlarmList();
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '告警信息已加载完毕',
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
searchList() {
|
||||
this.setData({
|
||||
current: 1,
|
||||
isLast: false,
|
||||
fenceAlarmList: [],
|
||||
speedAlarmList: [],
|
||||
overTimeAlarmList: [],
|
||||
listTotal: 0,
|
||||
speedAlarmlistTotal: 0,
|
||||
overTimeAlarmlistTotal: 0
|
||||
});
|
||||
// 查询
|
||||
if (this.data.tabActive == 0) {
|
||||
this.getFenceAlarmList();
|
||||
} else if (this.data.tabActive == 1) {
|
||||
this.getSpeedAlarmList();
|
||||
} else if (this.data.tabActive == 2) {
|
||||
this.getOverTimeAlarmList();
|
||||
}
|
||||
},
|
||||
getFenceAlarmList() {
|
||||
let parms = {
|
||||
status: this.data.statusOptions[this.data.selectStatusIndex].value,
|
||||
projectId: this.data.projectOptions[this.data.selectProjectIndex].value,
|
||||
plateNumber: this.data.plateNumber,
|
||||
startTime: this.data.startDate + ' 00:00:00',
|
||||
endTime: this.data.endDate + ' 23:59:59',
|
||||
pageNo: this.data.current,
|
||||
pageSize: 10
|
||||
};
|
||||
this.setData({
|
||||
loading: true
|
||||
});
|
||||
wx.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
getAction('api/monitor/fenceAlarm/list', parms)
|
||||
.then((res: any) => {
|
||||
wx.hideLoading();
|
||||
this.setData({
|
||||
loading: false
|
||||
});
|
||||
if (res.code == 200) {
|
||||
let tmpArr = this.data.fenceAlarmList.concat(res.result.records);
|
||||
this.setData({
|
||||
listTotal: res.result.total,
|
||||
fenceAlarmList: tmpArr
|
||||
});
|
||||
if (res.result.total == tmpArr.length) {
|
||||
// tmpArr 目前只是调试流程用
|
||||
this.setData({
|
||||
isLast: true
|
||||
});
|
||||
}
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err: any) => {
|
||||
this.setData({
|
||||
loading: false
|
||||
});
|
||||
wx.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
},
|
||||
getSpeedAlarmList() {
|
||||
let parms = {
|
||||
status: this.data.statusOptions[this.data.selectStatusIndex].value,
|
||||
projectId: this.data.projectOptions[this.data.selectProjectIndex].value,
|
||||
plateNumber: this.data.plateNumber,
|
||||
startTime: this.data.startDate + ' 00:00:00',
|
||||
endTime: this.data.endDate + ' 23:59:59',
|
||||
pageNo: this.data.current,
|
||||
pageSize: 10
|
||||
};
|
||||
this.setData({
|
||||
loading: true
|
||||
});
|
||||
wx.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
getAction('api/monitor/speedAlarm/list', parms)
|
||||
.then((res: any) => {
|
||||
wx.hideLoading();
|
||||
this.setData({
|
||||
loading: false
|
||||
});
|
||||
if (res.code == 200) {
|
||||
let tmpArr = this.data.speedAlarmList.concat(res.result.records);
|
||||
this.setData({
|
||||
speedAlarmlistTotal: res.result.total,
|
||||
speedAlarmList: tmpArr
|
||||
});
|
||||
if (res.result.total == tmpArr.length) {
|
||||
// tmpArr 目前只是调试流程用
|
||||
this.setData({
|
||||
isLast: true
|
||||
});
|
||||
}
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err: any) => {
|
||||
this.setData({
|
||||
loading: false
|
||||
});
|
||||
wx.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取停车超时数据
|
||||
getOverTimeAlarmList() {
|
||||
let parms = {
|
||||
status: this.data.statusOptions[this.data.selectStatusIndex].value,
|
||||
projectId: this.data.projectOptions[this.data.selectProjectIndex].value,
|
||||
plateNumber: this.data.plateNumber,
|
||||
startTime: this.data.startDate + ' 00:00:00',
|
||||
endTime: this.data.endDate + ' 23:59:59',
|
||||
pageNo: this.data.current,
|
||||
pageSize: 10
|
||||
};
|
||||
this.setData({
|
||||
loading: true
|
||||
});
|
||||
wx.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
getAction('api/monitor/stopAlarm/list', parms)
|
||||
.then((res: any) => {
|
||||
wx.hideLoading();
|
||||
this.setData({
|
||||
loading: false
|
||||
});
|
||||
if (res.code == 200) {
|
||||
console.log(res.result);
|
||||
let tmpArr = this.data.overTimeAlarmList.concat(res.result.records);
|
||||
this.setData({
|
||||
overTimeAlarmlistTotal: res.result.total,
|
||||
overTimeAlarmList: tmpArr
|
||||
});
|
||||
if (res.result.total == tmpArr.length) {
|
||||
// tmpArr 目前只是调试流程用
|
||||
this.setData({
|
||||
isLast: true
|
||||
});
|
||||
}
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err: any) => {
|
||||
this.setData({
|
||||
loading: false
|
||||
});
|
||||
wx.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
},
|
||||
getProjectOptions() {
|
||||
getAction('api/projects/list').then((res: any) => {
|
||||
if (res.code == 200) {
|
||||
res.result.unshift({
|
||||
id: '',
|
||||
projectName: '全部'
|
||||
});
|
||||
let arr = [] as any;
|
||||
res.result.forEach((item: any) => {
|
||||
arr.push({
|
||||
text: item.projectName,
|
||||
value: item.id
|
||||
});
|
||||
});
|
||||
this.setData({
|
||||
projectOptions: arr,
|
||||
selectProjectIndex: 0,
|
||||
selectProject: arr[0]
|
||||
});
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
toDetail(e: any) {
|
||||
wx.setStorageSync('selectCar', e.currentTarget.dataset.inf);
|
||||
if (this.data.tabActive == 0) {
|
||||
wx.navigateTo({
|
||||
url: '../realtime/realtime',
|
||||
fail: e => {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log('跳转到超速详情');
|
||||
}
|
||||
},
|
||||
bindPickerProject(e: any) {
|
||||
console.log(e);
|
||||
let index = Number(e.detail.value);
|
||||
this.setData({
|
||||
selectProject: this.data.projectOptions[index],
|
||||
selectProjectIndex: index,
|
||||
current: 1,
|
||||
isLast: false,
|
||||
listTotal: 0,
|
||||
speedAlarmlistTotal: 0,
|
||||
overTimeAlarmlistTotal: 0,
|
||||
fenceAlarmList: [],
|
||||
speedAlarmList: [],
|
||||
overTimeAlarmList: []
|
||||
});
|
||||
// 查询
|
||||
if (this.data.tabActive == 0) {
|
||||
this.getFenceAlarmList();
|
||||
} else if (this.data.tabActive == 1) {
|
||||
this.getSpeedAlarmList();
|
||||
} else if (this.data.tabActive == 2) {
|
||||
this.getOverTimeAlarmList();
|
||||
}
|
||||
},
|
||||
pickerChange(event: any) {
|
||||
//下拉框切换是否展示
|
||||
let fieldName: any = event.currentTarget.dataset.fieldname;
|
||||
let data: any = { ...this.data };
|
||||
data.showSelect[fieldName] = true;
|
||||
this.setData(data);
|
||||
},
|
||||
hidePicker() {
|
||||
let showSelect = this.data.showSelect;
|
||||
showSelect = {
|
||||
projectSelectShow: false,
|
||||
statusSelectShow: false
|
||||
};
|
||||
this.setData({
|
||||
showSelect: showSelect
|
||||
});
|
||||
},
|
||||
pickerConfirm(event: any) {
|
||||
console.log(event);
|
||||
//下拉框点击确认
|
||||
let { fieldname, fieldindex } = event.currentTarget.dataset;
|
||||
let detail = event.detail;
|
||||
let data: any = { ...this.data };
|
||||
// if (fieldname === 'projectId') {
|
||||
// data.params[fieldname] = detail.value.value;
|
||||
// data[fieldindex] = detail.index;
|
||||
|
||||
// } else {
|
||||
data[fieldname] = this.data.projectOptions[detail.index];
|
||||
data[fieldindex] = detail.index;
|
||||
// }
|
||||
console.log(this.data);
|
||||
this.setData(data);
|
||||
this.hidePicker();
|
||||
this.setData({
|
||||
current: 1,
|
||||
isLast: false,
|
||||
fenceAlarmList: [],
|
||||
speedAlarmList: [],
|
||||
overTimeAlarmList: [],
|
||||
listTotal: 0,
|
||||
speedAlarmlistTotal: 0,
|
||||
overTimeAlarmlistTotal: 0
|
||||
});
|
||||
// 查询
|
||||
if (this.data.tabActive == 0) {
|
||||
this.getFenceAlarmList();
|
||||
} else if (this.data.tabActive == 1) {
|
||||
this.getSpeedAlarmList();
|
||||
} else if (this.data.tabActive == 2) {
|
||||
this.getOverTimeAlarmList();
|
||||
}
|
||||
},
|
||||
clearValue() {
|
||||
this.setData({
|
||||
plateNumber: ''
|
||||
});
|
||||
},
|
||||
// 日期初始化
|
||||
initDate() {
|
||||
let year = new Date().getFullYear();
|
||||
let mon = (new Date().getMonth() + 1) as any;
|
||||
let day =
|
||||
new Date().getDate() < 10
|
||||
? '0' + new Date().getDate()
|
||||
: new Date().getDate();
|
||||
let years = [] as any;
|
||||
|
||||
let sy = mon > 1 ? year : year - 1;
|
||||
let smon = mon > 1 ? mon - 1 : (12 as any);
|
||||
mon = mon < 10 ? '0' + mon : mon;
|
||||
smon = smon < 10 ? '0' + smon : smon;
|
||||
for (let i = -3; i < 6; i++) {
|
||||
years.push(year + i);
|
||||
}
|
||||
this.setData({
|
||||
dateList: {
|
||||
years: years,
|
||||
months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
date: [
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
|
||||
]
|
||||
},
|
||||
dateValue: [0, 0, 0],
|
||||
|
||||
startDate: `${sy}-${smon}-${day}`,
|
||||
endDate: `${year}-${mon}-${day}`,
|
||||
startDateTmp: `${sy}-${smon}-${day}`,
|
||||
endDateTmp: `${year}-${mon}-${day}`
|
||||
});
|
||||
},
|
||||
lower(e: any) {
|
||||
console.log(e.detail.direction == 'bottom');
|
||||
if (this.data.isLast) {
|
||||
wx.showToast({
|
||||
title: '已经是最后一页',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (e.detail.direction == 'bottom' && !this.data.loading) {
|
||||
// this.data.current += 1
|
||||
this.setData({
|
||||
loading: true,
|
||||
current: (this.data.current += 1)
|
||||
});
|
||||
// 查询
|
||||
if (this.data.tabActive == 0) {
|
||||
this.getFenceAlarmList();
|
||||
} else if (this.data.tabActive == 1) {
|
||||
this.getSpeedAlarmList();
|
||||
} else if (this.data.tabActive == 2) {
|
||||
this.getOverTimeAlarmList();
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
this.initDate();
|
||||
this.getProjectOptions();
|
||||
this.getFenceAlarmList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
// this.initDate();
|
||||
let plateNumber = wx.getStorageSync('selectCarInf').plateNumber;
|
||||
this.setData({
|
||||
plateNumber: plateNumber ? plateNumber : this.data.plateNumber,
|
||||
current: 1,
|
||||
isLast: false,
|
||||
fenceAlarmList: [],
|
||||
speedAlarmList: [],
|
||||
overTimeAlarmList: [],
|
||||
listTotal: 0,
|
||||
speedAlarmlistTotal: 0,
|
||||
overTimeAlarmlistTotal: 0
|
||||
});
|
||||
console.log(this.data);
|
||||
wx.removeStorageSync('selectCarInf');
|
||||
if (this.data.tabActive == 0) {
|
||||
this.getFenceAlarmList();
|
||||
} else if (this.data.tabActive == 1) {
|
||||
this.getSpeedAlarmList();
|
||||
} else if (this.data.tabActive == 2) {
|
||||
this.getOverTimeAlarmList();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
wx.setStorageSync('selectCarInf', '');
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
wx.setStorageSync('selectCarInf', '');
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
this.initDate();
|
||||
this.getProjectOptions();
|
||||
this.setData({
|
||||
plateNumber: '',
|
||||
current: 1,
|
||||
isLast: false,
|
||||
fenceAlarmList: [],
|
||||
speedAlarmList: [],
|
||||
overTimeAlarmList: []
|
||||
});
|
||||
if (this.data.tabActive == 0) {
|
||||
this.getFenceAlarmList();
|
||||
} else if (this.data.tabActive == 1) {
|
||||
this.getSpeedAlarmList();
|
||||
} else if (this.data.tabActive == 2) {
|
||||
this.getOverTimeAlarmList();
|
||||
}
|
||||
|
||||
//停止下拉刷新
|
||||
wx.stopPullDownRefresh();
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {}
|
||||
});
|
||||
@@ -0,0 +1,354 @@
|
||||
<!--pages/vehicleMonitoring/failureAlert/failureAlert.wxml-->
|
||||
<view class="container">
|
||||
<van-tabs color="#4381FC" bind:click="tabOnClick">
|
||||
<van-tab title="电子围栏告警">
|
||||
<view class="search-container">
|
||||
<view class="row">
|
||||
<view class="number-plate" catchtap="toSearch">
|
||||
<view class="icon_search">
|
||||
<image src="../../../images/icon_search.png" mode="" />
|
||||
</view>
|
||||
<input type="text" placeholder="搜索车辆" placeholder-style="color:#949CB5; font-size: 28rpx; font-weight: 400;" value="{{ plateNumber }}" disabled="true" bindinput="getPassword" />
|
||||
<view class="btn" data-type="1" catchtap="clearValue">
|
||||
<van-icon name="close" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="status-select">
|
||||
<view class="select-box" data-fieldName="satausSelectShow" catch:tap="pickerChange">
|
||||
<view class="val" wx:if="{{true}}">{{statusOptions[selectStatusIndex].text}}</view>
|
||||
<view class="placeholder" wx:else>请选择</view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
<!-- 项目下拉选择 -->
|
||||
<van-popup show="{{showSelect.satausSelectShow}}" position="bottom" bind:close="hidePicker">
|
||||
<van-picker data-fieldname="sataus" default-index="{{ selectStatusIndex }}" data-fieldindex="selectStatusIndex" show-toolbar columns="{{statusOptions}}" bind:confirm="pickerConfirm" bind:cancel="hidePicker">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</view>
|
||||
<view class="project-select">
|
||||
<view class="select-box" data-fieldName="projectSelectShow" catch:tap="pickerChange">
|
||||
<view class="val" wx:if="{{selectProject.value > 0}}">{{projectOptions[selectProjectIndex].text}}</view>
|
||||
<view class="placeholder" wx:else>请选择</view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
<!-- 项目下拉选择 -->
|
||||
<van-popup show="{{showSelect.projectSelectShow}}" position="bottom" bind:close="hidePicker">
|
||||
<van-picker data-fieldname="selectProject" data-fieldindex="selectProjectIndex" show-toolbar columns="{{projectOptions}}" bind:confirm="pickerConfirm" bind:cancel="hidePicker">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
<!-- <picker bindchange="bindPickerProject" value="{{selectProjectIndex}}" range-key="projectName" range="{{projectOptions}}">
|
||||
<view class="picker project-select">
|
||||
<view class="val">
|
||||
{{projectOptions[selectProjectIndex].projectName}}
|
||||
</view>
|
||||
</view>
|
||||
</picker> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="date" data-key="startDate" catchtap="showDate">
|
||||
<input type="text" value="{{startDate}}" disabled="true" bindinput="getPassword" />
|
||||
<view class="icon">
|
||||
<image src="../../../images/icon_cal.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="date" data-key="endDate" catchtap="showDate">
|
||||
<input type="text" value="{{endDate}}" disabled="true" bindinput="getPassword" />
|
||||
<view class="icon">
|
||||
<image src="../../../images/icon_cal.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" catchtap="searchList">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-content">
|
||||
<view class="total">共 <view class="number">{{listTotal}}</view> 条告警记录</view>
|
||||
<view class="list">
|
||||
<scroll-view class="scroll-view_H" scroll-y="true" bindscrolltolower="lower" style="width: 100%">
|
||||
<view class="item" wx:for="{{fenceAlarmList}}" wx:key="index" data-inf="{{item}}" catchtap="toDetail">
|
||||
<view class="top">
|
||||
<view class="number-plate">{{item.plateNumber}}</view>
|
||||
<view class="t-right">
|
||||
<view class="project-name">{{item.projectName}}</view>
|
||||
<view class="type" wx:if="{{item.fenceType == 1}}">停场围栏</view>
|
||||
<view class="type" wx:if="{{item.fenceType == 2}}">行驶围栏</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time-container">
|
||||
<view class="time {{item.endTime ? 'normal' : ''}}">
|
||||
<view class="val">{{item.startTime ? item.startTime : '/'}}</view>
|
||||
<view class="label">开始时间</view>
|
||||
</view>
|
||||
<view class="time {{item.endTime ? 'normal' : ''}}">
|
||||
<view class="val">{{item.endTime ? item.endTime : '/'}}</view>
|
||||
<view class="label">结束时间</view>
|
||||
</view>
|
||||
<view class="time {{item.endTime ? 'normal' : 'error'}}">
|
||||
<view class="val val-f16">{{item.durTime ? item.durTime : '/'}}</view>
|
||||
<view class="label">持续时间</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="is-last" wx:if="{{isLast && fenceAlarmList.length > 0}}" style="padding-bottom: 40rpx;">
|
||||
<van-divider contentPosition="center">已加载完全部数据</van-divider>
|
||||
</view>
|
||||
<view class="no-data" wx:if="{{fenceAlarmList.length == 0}}">
|
||||
<van-empty description="无数据" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="超速告警">
|
||||
<view class="search-container">
|
||||
<view class="row">
|
||||
<view class="number-plate" catchtap="toSearch">
|
||||
<view class="icon_search">
|
||||
<image src="../../../images/icon_search.png" mode="" />
|
||||
</view>
|
||||
<input type="text" placeholder="搜索车辆" placeholder-style="color:#949CB5; font-size: 28rpx; font-weight: 400;" value="{{ plateNumber }}" disabled="true" bindinput="getPassword" />
|
||||
<view class="btn" data-type="1" catchtap="clearValue">
|
||||
<van-icon name="close" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="status-select">
|
||||
<view class="select-box" data-fieldName="satausSelectShow" catch:tap="pickerChange">
|
||||
<view class="val" wx:if="{{true}}">{{statusOptions[selectStatusIndex].text}}</view>
|
||||
<view class="placeholder" wx:else>请选择</view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
<!-- 项目下拉选择 -->
|
||||
<van-popup show="{{showSelect.satausSelectShow}}" position="bottom" bind:close="hidePicker">
|
||||
<van-picker data-fieldname="sataus" default-index="{{ selectStatusIndex }}" data-fieldindex="selectStatusIndex" show-toolbar columns="{{statusOptions}}" bind:confirm="pickerConfirm" bind:cancel="hidePicker">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</view>
|
||||
<view class="project-select">
|
||||
<view class="select-box" data-fieldName="projectSelectShow" catch:tap="pickerChange">
|
||||
<view class="val" wx:if="{{selectProject.value > 0}}">{{projectOptions[selectProjectIndex].text}}</view>
|
||||
<view class="placeholder" wx:else>请选择</view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
<!-- 项目下拉选择 -->
|
||||
<van-popup show="{{showSelect.projectSelectShow}}" position="bottom" bind:close="hidePicker">
|
||||
<van-picker data-fieldname="selectProject" data-fieldindex="selectProjectIndex" show-toolbar columns="{{projectOptions}}" bind:confirm="pickerConfirm" bind:cancel="hidePicker">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
<!-- <picker bindchange="bindPickerProject" value="{{selectProjectIndex}}" range-key="projectName" range="{{projectOptions}}">
|
||||
<view class="picker project-select">
|
||||
<view class="val">
|
||||
{{projectOptions[selectProjectIndex].projectName}}
|
||||
</view>
|
||||
</view>
|
||||
</picker> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="date" data-key="startDate" catchtap="showDate">
|
||||
<input type="text" value="{{startDate}}" disabled="true" />
|
||||
<view class="icon">
|
||||
<image src="../../../images/icon_cal.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="date" data-key="endDate" catchtap="showDate">
|
||||
<input type="text" value="{{endDate}}" disabled="true" />
|
||||
<view class="icon">
|
||||
<image src="../../../images/icon_cal.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" catchtap="searchList">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-content">
|
||||
<view class="total">共 <view class="number">{{speedAlarmlistTotal}}</view> 条告警记录</view>
|
||||
<view class="list">
|
||||
<scroll-view class="scroll-view_H" scroll-y="true" bindscrolltolower="lower" style="width: 100%">
|
||||
<view class="item" wx:for="{{speedAlarmList}}" wx:key="index" data-inf="{{item}}" catchtap="toDetail">
|
||||
<view class="top">
|
||||
<view class="number-plate">{{item.plateNumber}}</view>
|
||||
<view class="t-right">
|
||||
<view class="project-name">{{item.projectName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">车速</view>
|
||||
<view class="val">{{item.speed}}km/h</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">规定车速</view>
|
||||
<view class="val">{{item.ruleSpeed}}km/h</view>
|
||||
</view>
|
||||
<view class="time-container">
|
||||
<view class="time {{item.endTime ? 'normal' : ''}}">
|
||||
<view class="val">{{item.startTime ? item.startTime : '/'}}</view>
|
||||
<view class="label">开始时间</view>
|
||||
</view>
|
||||
<view class="time {{item.endTime ? 'normal' : ''}}">
|
||||
<view class="val">{{item.endTime ? item.endTime : '/'}}</view>
|
||||
<view class="label">结束时间</view>
|
||||
</view>
|
||||
<view class="time {{item.endTime ? 'normal' : 'error'}}">
|
||||
<view class="val val-f16">{{item.durTime ? item.durTime : '/'}}</view>
|
||||
<view class="label">持续时间</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="is-last" wx:if="{{isLast && speedAlarmList.length > 0}}" style="padding-bottom: 40rpx;">
|
||||
<van-divider contentPosition="center">已加载完全部数据</van-divider>
|
||||
</view>
|
||||
<view class="no-data" wx:if="{{speedAlarmList.length == 0}}">
|
||||
<van-empty description="无数据" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="停车超时告警">
|
||||
<view class="search-container">
|
||||
<view class="row">
|
||||
<view class="number-plate" catchtap="toSearch">
|
||||
<view class="icon_search">
|
||||
<image src="../../../images/icon_search.png" mode="" />
|
||||
</view>
|
||||
<input type="text" placeholder="搜索车辆" placeholder-style="color:#949CB5; font-size: 28rpx; font-weight: 400;" value="{{ plateNumber }}" disabled="true" bindinput="getPassword" />
|
||||
<view class="btn" data-type="1" catchtap="clearValue">
|
||||
<van-icon name="close" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="status-select">
|
||||
<view class="select-box" data-fieldName="satausSelectShow" catch:tap="pickerChange">
|
||||
<view class="val" wx:if="{{true}}">{{statusOptions[selectStatusIndex].text}}</view>
|
||||
<view class="placeholder" wx:else>请选择</view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
<!-- 项目下拉选择 -->
|
||||
<van-popup show="{{showSelect.satausSelectShow}}" position="bottom" bind:close="hidePicker">
|
||||
<van-picker data-fieldname="sataus" default-index="{{ selectStatusIndex }}" data-fieldindex="selectStatusIndex" show-toolbar columns="{{statusOptions}}" bind:confirm="pickerConfirm" bind:cancel="hidePicker">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</view>
|
||||
<view class="project-select">
|
||||
<view class="select-box" data-fieldName="projectSelectShow" catch:tap="pickerChange">
|
||||
<view class="val" wx:if="{{selectProject.value > 0}}">{{projectOptions[selectProjectIndex].text}}</view>
|
||||
<view class="placeholder" wx:else>请选择</view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
<!-- 项目下拉选择 -->
|
||||
<van-popup show="{{showSelect.projectSelectShow}}" position="bottom" bind:close="hidePicker">
|
||||
<van-picker data-fieldname="selectProject" data-fieldindex="selectProjectIndex" show-toolbar columns="{{projectOptions}}" bind:confirm="pickerConfirm" bind:cancel="hidePicker">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
<!-- <picker bindchange="bindPickerProject" value="{{selectProjectIndex}}" range-key="projectName" range="{{projectOptions}}">
|
||||
<view class="picker project-select">
|
||||
<view class="val">
|
||||
{{projectOptions[selectProjectIndex].projectName}}
|
||||
</view>
|
||||
</view>
|
||||
</picker> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="date" data-key="startDate" catchtap="showDate">
|
||||
<input type="text" value="{{startDate}}" disabled="true" />
|
||||
<view class="icon">
|
||||
<image src="../../../images/icon_cal.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="date" data-key="endDate" catchtap="showDate">
|
||||
<input type="text" value="{{endDate}}" disabled="true" />
|
||||
<view class="icon">
|
||||
<image src="../../../images/icon_cal.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" catchtap="searchList">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-content">
|
||||
<view class="total">共 <view class="number">{{overTimeAlarmlistTotal}}</view> 条告警记录</view>
|
||||
<view class="list">
|
||||
<scroll-view class="scroll-view_H" scroll-y="true" bindscrolltolower="lower" style="width: 100%">
|
||||
<view class="item" wx:for="{{overTimeAlarmList}}" wx:key="index" data-inf="{{item}}" catchtap="toDetail">
|
||||
<view class="top">
|
||||
<view class="number-plate">{{item.plateNumber}}</view>
|
||||
<view class="t-right">
|
||||
<view class="project-name">{{item.projectName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">停车时长</view>
|
||||
<view class="val">{{item.stopTime ? item.stopTime + '秒' : '/'}}</view>
|
||||
</view>
|
||||
<view class="time-container">
|
||||
<view class="time {{item.endTime ? 'normal' : ''}}">
|
||||
<view class="val">{{item.startTime ? item.startTime : '/'}}</view>
|
||||
<view class="label">开始时间</view>
|
||||
</view>
|
||||
<view class="time {{item.endTime ? 'normal' : ''}}">
|
||||
<view class="val">{{item.endTime ? item.endTime : '/'}}</view>
|
||||
<view class="label">结束时间</view>
|
||||
</view>
|
||||
<view class="time {{item.endTime ? 'normal' : 'error'}}">
|
||||
<view class="val val-f16">{{item.durTime ? item.durTime : '/'}}</view>
|
||||
<view class="label">持续时间</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="is-last" wx:if="{{isLast && overTimeAlarmList.length > 0}}" style="padding-bottom: 40rpx;">
|
||||
<van-divider contentPosition="center">已加载完全部数据</van-divider>
|
||||
</view>
|
||||
<view class="no-data" wx:if="{{overTimeAlarmList.length == 0}}">
|
||||
<van-empty description="无数据" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
<!-- 日期范围选择 -->
|
||||
<van-popup show="{{ showDateSelect }}" position="bottom" custom-style="height: 60%;" bind:click-overlay="hideDate">
|
||||
<view style="background: #fff;border-radius: 4px 4px 0 0;overflow: hidden;">
|
||||
<view class="date-btn-box">
|
||||
<view class="btn btn-cancel" bindtap="hideDate">取消</view>
|
||||
<view class="title">选择开始结束时间</view>
|
||||
<view class="btn btn-confirm" bindtap="changeDate">确定</view>
|
||||
</view>
|
||||
<view class="date-title">
|
||||
<view class="date {{selectDate == 'startDate' ? 'select' : ''}}" data-key="startDate" catchtap="changeSelectDate">
|
||||
<input type="text" value="{{startDateTmp}}" disabled="true" bindinput="getPassword" />
|
||||
<view class="icon">
|
||||
<image src="../../../images/icon_cal.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="date {{selectDate == 'endDate' ? 'select' : ''}}" data-key="endDate" catchtap="changeSelectDate">
|
||||
<input type="text" value="{{endDateTmp}}" disabled="true" bindinput="getPassword" />
|
||||
<view class="icon">
|
||||
<image src="../../../images/icon_cal.png" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="picker-box">
|
||||
<picker-view data-key="dateRang" value="{{dateValue}}" indicator-style="height: 50px;" style="width: 100%; height: 500rpx;" bindchange="selectDate">
|
||||
<picker-view-column>
|
||||
<view style="line-height: 50px; text-align: center;" wx:for="{{dateList.years}}" wx:key="index">{{item}}年</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view style="line-height: 50px; text-align: center;" wx:for="{{dateList.months}}" wx:key="index">{{item}}月</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view style="line-height: 50px; text-align: center;" wx:for="{{dateList.date}}" wx:key="index">{{item}}日</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
</view>
|
||||
Reference in New Issue
Block a user