This commit is contained in:
2025-06-19 17:33:18 +08:00
commit f8f31dc4d9
437 changed files with 103080 additions and 0 deletions
@@ -0,0 +1,7 @@
{
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index"
},
"navigationBarTitleText": "违章详情"
}
@@ -0,0 +1,198 @@
/* pages/backlog/violation/violation.wxss */
.container {
height: 100vh;
padding-top: 2px;
box-sizing: border-box;
background: #EFF1F4;
overflow: hidden;
position: relative;
.bg {
width: 100%;
height: 250px;
position: absolute;
top: 0;
image {
width: 100%;
height: 100%;
display: block;
}
}
.top {
margin: 8px 8px 10px;
padding: 12px 10px;
margin-bottom: 8px;
background: #fff;
border-radius: 8px;
position: relative;
.row:first-child {
margin-bottom: 8px;
}
.row {
color: #2E3A4F;
display: flex;
justify-content: space-between;
align-items: center;
.number-plate {
display: flex;
.status {
padding: 0 6px;
margin-right: 4px;
border-radius: 2px;
color: #FFFFFF;
font-size: 14px;
}
.status1 {
background: linear-gradient(90deg, #0D92FF 0%, #38B1FE 100%);
}
.status2 {
background: linear-gradient(270deg, #4CDBAD 0%, #2FCBAB 100%);
}
.status3 {
background: linear-gradient(270deg, #A1A8BB 0%, #838EAA 100%);
}
.val {
font-size: 16px;
font-weight: bold;
}
}
.project-name, .code {
font-size: 14px;
}
.time {
font-size: 14px;
color: #858CA0;
}
.type-list {
display: flex;
.type {
height: 22px;
line-height: 22px;
padding: 0 8px;
margin-left: 5px;
background: #FFF1F0;
border-radius: 4px;
border: 1px solid #FFA39E;
color: #FF4D4F;
font-size: 12px;
}
}
}
}
.detail-container {
max-height: calc(100vh - 72px - 80px - 20px);
box-sizing: border-box;
padding: 0px 8px 0px;
overflow: hidden;
position: relative;
.tabs {
display: flex;
.tab {
width: 50%;
height: 40px;
line-height: 40px;
// background: #fff;
border-radius: 8px 8px 0 0;
color: #4381FC;
font-size: 16px;
font-weight: 500;
text-align: center;
position: relative;
.bg {
width: 100%;
height: 100%;
position: absolute;
image {
width: 100%;
height: 100%;
display: block;
}
}
.value {
position: relative;
}
}
.active::after {
content: '';
width: 26px;
height: 4px;
background: linear-gradient(90deg, #3B7CFC 0%, #548BFC 100%);
border-radius: 2px;
position: absolute;
bottom: 2px;
left: 50%;
transform: translateX(-50%);
}
}
.content-borderall {
border-radius: 8px;
}
.content {
max-height: calc(100vh - 72px - 80px - 100px);
padding: 12px 10px;
// box-sizing: border-box;
border-radius: 0px 8px 8px 8px;
background: #fff;
overflow-y: auto;
.row {
margin-bottom: 8px;
display: flex;
justify-content: space-between;
// align-items: center;
.label {
margin-right: 4px;
color: #858CA0;
font-size: 14px;
white-space: nowrap;
}
.val {
color: #2E3A4F;
font-size: 14px;
}
.pic-box {
max-width: 70%;
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
.item {
width: 84px;
height: 84px;
padding-left: 8px;
display: flex;
align-items: center;
image {
width: 100%;
height: 100%;
display: block;
}
}
}
}
}
}
.bottom {
width: 100%;
padding: 10px 8px 30px;
background: #fff;
box-sizing: border-box;
border-radius: 8px 8px 0 0;
box-shadow: 0px -2px 12px 0px rgba(0,0,0,0.2);
position: absolute;
bottom: 0;
left: 0;
.btn-box {
width: 100%;
display: flex;
justify-content: space-between;
.btn {
width: 100%;
height: 40px;
line-height: 40px;
border-radius: 8px;
background: linear-gradient(90deg, #3B7CFC 0%, #548BFC 100%);
color: #fff;
font-weight: bold;
text-align: center;
}
}
}
}
@@ -0,0 +1,105 @@
// pages/backlog/violation/violation.ts
import { getAction } from '../../../api/base';
Page({
/**
* 页面的初始数据
*/
data: {
tabActive: 0,
id: '',
item: {}
},
// 变更tab
changeTab(e: any) {
console.log(e.currentTarget.dataset.tab);
this.setData({
tabActive: e.currentTarget.dataset.tab
});
},
getDetailInf() {
let parms = {
id: this.data.id
};
getAction('api/vehicles/backlog/getViolationRecorddById', parms).then(
(res: any) => {
if (res.code == 200) {
console.log(res.result);
this.setData({
item: res.result
});
} else {
wx.showToast({
title: res.message,
icon: 'none'
});
}
}
);
},
toFeedback() {
let that = this;
// 违章信息
wx.setStorageSync('violation', '');
// 跳转到违章处理反馈
wx.navigateTo({
url: '../violationFeedback/violationFeedback',
success: function (res) {
// 通过eventChannel向被打开页面传送数据
res.eventChannel.emit('eventName', { ...that.data.item });
},
fail: e => {
console.log(e);
}
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad() {
const eventChannel = this.getOpenerEventChannel();
getApp().EventChannel = eventChannel;
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
let id = wx.getStorageSync('backlogInf').id;
this.setData({
id: id
});
this.getDetailInf();
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
});
@@ -0,0 +1,65 @@
<!--pages/backlog/violation/violation.wxml-->
<view class="container">
<view class="bg">
<image src="../../../images/bg_page_blue.png" mode=""/>
</view>
<view class="top">
<view class="row">
<view class="number-plate">
<view class="val">{{item.plateNumber}}</view>
</view>
<view class="project-name">{{item.projectId_dictText}}</view>
</view>
<view class="row">
<view class="time">违章时间: {{item.violationTime}}</view>
<view class="time" wx:if="{{!item.status}}">{{item.time}}</view>
<view class="type-list">
<view class="type">{{item.violationAct_dictText}}</view>
</view>
</view>
</view>
<view class="detail-container">
<view class="tabs">
<view class="tab {{tabActive == 0 ? 'active' : ''}}" data-tab="0" catch:tap="changeTab">
<view class="bg"><image src="../../../images/btn_l.png" mode=""/></view>
<view class="value">违章信息</view>
</view>
<!-- <view class="tab {{tabActive == 1 ? 'active' : ''}}" data-tab="1" catch:tap="changeTab">报价信息</view> -->
</view>
<view class="content">
<view class="row">
<view class="label">负责人</view>
<view class="val">{{ item.director ? item.director : '/'}}</view>
</view>
<view class="row">
<view class="label">违章地点</view>
<view class="val">{{ item.violationAddress ? item.violationAddress : '/'}}</view>
</view>
<view class="row">
<view class="label">违章司机</view>
<view class="val">{{ item.violationDriver ? item.violationDriver : '/'}}</view>
</view>
<view class="row">
<view class="label">违章记分</view>
<view class="val"> {{ item.violationScore ? item.violationScore : '/'}}</view>
</view>
<view class="row">
<view class="label">违章费用</view>
<view class="val">{{ item.violationCost ? item.violationCost : '0'}}元</view>
</view>
<view class="row">
<view class="label">处理限期</view>
<view class="val">{{ item.violationAct ? item.violationAct : '/'}}天</view>
</view>
<view class="row">
<view class="label">违章行为描述</view>
<view class="val">{{ item.violationActDes ? item.violationActDes : '/'}}</view>
</view>
</view>
</view>
<view class="bottom">
<view class="btn-box">
<view class="btn" catch:tap="toFeedback">处理反馈</view>
</view>
</view>
</view>