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,210 @@
/* pages/backlog/accident/accident.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;
padding: 12px 10px;
.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;
background: #E2F3FE;
border-radius: 8px 8px 0 0;
overflow: hidden;
.tab {
width: 50%;
height: 40px;
line-height: 40px;
color: #959595;
font-size: 16px;
font-weight: bold;
text-align: center;
position: relative;
.bg {
width: 100%;
height: 100%;
position: absolute;
image {
width: 100%;
height: 100%;
display: block;
}
}
.value {
position: relative;
}
}
.active {
// background: #fff;
color: #4381FC;
}
.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 0px 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;
margin-bottom: 8px;
display: flex;
align-items: center;
image {
width: 100%;
height: 100%;
display: block;
}
video{
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,148 @@
// pages/backlog/accident/accident.ts
import { getAction } from '../../../api/base';
Page({
/**
* 页面的初始数据
*/
data: {
tabActive: 0,
id: '',
item: {} as any
},
// 变更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/getAccidentInfoById', parms).then(
(res: any) => {
if (res.code == 200) {
console.log(res.result);
res.result.accidentScenePhotoList = res.result.accidentScenePhoto
? res.result.accidentScenePhoto.split(',')
: [];
res.result.accidentSceneVideoList = res.result.accidentSceneVideo
? res.result.accidentSceneVideo.split(',')
: [];
res.result.insuranceInvestigationReportList = res.result
.insuranceInvestigationReport
? res.result.insuranceInvestigationReport.split(',')
: [];
res.result.accidentInsuranceInfo.documentImageList = res.result
.accidentInsuranceInfo.documentImage
? res.result.accidentInsuranceInfo.documentImage.split(',')
: [];
this.setData({
item: res.result
});
} else {
wx.showToast({
title: res.message,
icon: 'none'
});
}
}
);
},
previewImg(e: any) {
let that = this;
let { index, key, key2 } = e.currentTarget.dataset;
if (key2) {
wx.previewImage({
current: that.data.item[key][key2][index | 0], // 当前显示图片的http链接 默认urls[0]
urls: that.data.item[key][key2] // 需要预览的图片http链接列表
});
} else {
wx.previewImage({
current: that.data.item[key][index | 0], // 当前显示图片的http链接 默认urls[0]
urls: that.data.item[key] // 需要预览的图片http链接列表
});
}
},
previewVidoe(e: any) {
let that = this;
let { index, key } = e.currentTarget.dataset;
let sources: any = that.data.item[key].map((item: any) => {
return {
type: 'video',
url: item
};
});
wx.previewMedia({
current: index,
sources: sources
});
},
toFeedback() {
let that = this;
// 违章信息
wx.setStorageSync('violation', '');
// 跳转到违章处理反馈
wx.navigateTo({
url: '../accidentFeedback/accidentFeedback',
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,254 @@
<!--pages/backlog/accident/accident.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.accidentTime}}</view>
<view class="type-list">
<view class="type">{{item.natureEstimate_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" wx:if="{{tabActive == 0}}"><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 class="bg" wx:if="{{tabActive == 1}}"><image src="../../../images/btn_r.png" mode=""/></view>
<view class="value">保险信息</view>
</view>
</view>
<view class="content" wx:if="{{tabActive == 0}}">
<view class="row">
<view class="label">车牌信息</view>
<view class="val">{{item.plateNumber}}</view>
</view>
<view class="row">
<view class="label">所属项目</view>
<view class="val">{{item.projectId_dictText ? item.projectId_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">处理人</view>
<view class="val">{{item.processedPerson ? item.processedPerson : '/'}}</view>
</view>
<view class="row">
<view class="label">报备号</view>
<view class="val">{{item.reportNumber ? item.reportNumber : '/'}}</view>
</view>
<view class="row">
<view class="label">事故发生时间</view>
<view class="val">{{item.accidentTime ? item.accidentTime : '/'}}</view>
</view>
<view class="row">
<view class="label">驾驶员</view>
<view class="val">{{item.driver ? item.driver : '/'}}</view>
</view>
<view class="row">
<view class="label">驾驶员证件</view>
<view class="val">{{item.driverLicenseNumber ? item.driverLicenseNumber : '/'}}</view>
</view>
<view class="row">
<view class="label">驾驶员电话</view>
<view class="val">{{item.driverPhoneNumber ? item.driverPhoneNumber : '/'}}</view>
</view>
<view class="row">
<view class="label">第三方车牌</view>
<view class="val">{{item.thirdPlateNumber ? item.thirdPlateNumber : '/'}}</view>
</view>
<view class="row">
<view class="label">第三方保险公司</view>
<view class="val">{{item.thirdInsuranceCompany ? item.thirdInsuranceCompany : '/'}}</view>
</view>
<view class="row">
<view class="label">第三方电话</view>
<view class="val">{{item.thirdPhoneNumber ? item.thirdPhoneNumber : '/'}}</view>
</view>
<view class="row">
<view class="label">事故发生地点</view>
<view class="val">{{item.accidentLocation ? item.accidentLocation : '/'}}</view>
</view>
<view class="row">
<view class="label">事故发生经过</view>
<view class="val">{{item.accidentDetails ? item.accidentDetails : '/'}}</view>
</view>
<view class="row">
<view class="label">事故发生损失</view>
<view class="val">{{item.accidentEstimatedLoss ? item.accidentEstimatedLoss : '/'}}</view>
</view>
<view class="row">
<view class="label">事故发生类型</view>
<view class="val">{{item.accidentForm_dictText ? item.accidentForm_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">事故类型</view>
<view class="val">{{item.accidentType_dictText ? item.accidentType_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">事故损失</view>
<view class="val">{{item.accidentLossType_dictText ? item.accidentLossType_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">需要更换配件</view>
<view class="val">{{item.replacedParts ? item.replacedParts : '/'}}</view>
</view>
<view class="row">
<view class="label">伤亡类型</view>
<view class="val">{{item.accidentInjuryType_dictText ? item.accidentInjuryType_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">初步预估责任</view>
<view class="val">{{item.liabilityEstimate_dictText ? item.liabilityEstimate_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">初步预估性质</view>
<view class="val">{{item.natureEstimate_dictText ? item.natureEstimate_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">事故现场图片</view>
<view class="pic-box">
<view
class="item"
wx:for="{{item.accidentScenePhotoList}}"
wx:key="index"
wx:for-item="pic"
wx:if="{{item.accidentScenePhotoList.length > 0}}"
data-index="{{index}}"
data-key="accidentScenePhotoList"
bindtap="previewImg">
<image src="{{pic}}" mode=""/>
</view>
<view class="val" wx:if="{{item.accidentScenePhotoList.length == 0}}">无</view>
</view>
</view>
<view class="row">
<view class="label">事故现场视频</view>
<view class="pic-box" style="max-width: 75%;">
<view
class="item"
wx:for="{{item.accidentSceneVideoList}}"
wx:key="index"
wx:for-item="pic"
wx:if="{{item.accidentSceneVideoList.length > 0}}"
data-index="{{index}}"
data-key="accidentSceneVideoList"
bindtap="previewVidoe">
<video src="{{pic}}" />
</view>
<view class="val" wx:if="{{item.accidentSceneVideoList.length == 0}}">无</view>
</view>
</view>
<view class="row">
<view class="label">保险公司现场勘察报告</view>
<view class="pic-box">
<view
class="item"
wx:for="{{item.insuranceInvestigationReportList}}"
wx:key="index"
wx:for-item="pic"
wx:if="{{item.insuranceInvestigationReportList.length > 0}}"
data-index="{{index}}"
data-key="insuranceInvestigationReportList"
bindtap="previewImg">
<image src="{{pic}}" mode=""/>
</view>
<view class="val" wx:if="{{item.insuranceInvestigationReportList.length == 0}}">无</view>
</view>
</view>
</view>
<view class="content" wx:if="{{tabActive == 1}}">
<view class="row">
<view class="label">交案回执单号</view>
<view class="val">{{item.accidentInsuranceInfo.caseReceiptNumber ? item.accidentInsuranceInfo.caseReceiptNumber : '/'}}</view>
</view>
<view class="row">
<view class="label">确定事故责任</view>
<view class="val">{{item.accidentInsuranceInfo.liabilityConfirm_dictText ? item.accidentInsuranceInfo.liabilityConfirm_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">确定事故性质</view>
<view class="val">{{item.accidentInsuranceInfo.natureConfirm_dictText ? item.accidentInsuranceInfo.natureConfirm_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">标的车损金额(元)</view>
<view class="val">{{item.accidentInsuranceInfo.vehicleLossAmount ? item.accidentInsuranceInfo.vehicleLossAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">标的车人伤金额</view>
<view class="val">{{item.accidentInsuranceInfo.vehiclePersonalInjuryAmount ? item.accidentInsuranceInfo.vehiclePersonalInjuryAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">第三方物损金额</view>
<view class="val">{{item.accidentInsuranceInfo.thirdPropertyDamageAmount ? item.accidentInsuranceInfo.thirdPropertyDamageAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">第三方人损金额</view>
<view class="val">{{item.accidentInsuranceInfo.thirdPersonalInjuryAmount ? item.accidentInsuranceInfo.thirdPersonalInjuryAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">预估损失总金额</view>
<view class="val">{{item.accidentInsuranceInfo.estimatedTotalLossAmount ? item.accidentInsuranceInfo.estimatedTotalLossAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">理赔至公司账户日期</view>
<view class="val">{{item.accidentInsuranceInfo.claimToCompanyAccountDate ? item.accidentInsuranceInfo.claimToCompanyAccountDate : '/'}}</view>
</view>
<view class="row">
<view class="label">理赔至公司账户金额</view>
<view class="val">{{item.accidentInsuranceInfo.claimToCompanyAccountAmount ? item.accidentInsuranceInfo.claimToCompanyAccountAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">理赔至第三方账户日期</view>
<view class="val">{{item.accidentInsuranceInfo.claimToCompanyAccountDate ? item.accidentInsuranceInfo.claimToCompanyAccountDate : '/'}}</view>
</view>
<view class="row">
<view class="label">理赔至第三方账户金额</view>
<view class="val">{{item.accidentInsuranceInfo.claimToThirdAccountAmount ? item.accidentInsuranceInfo.claimToThirdAccountAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">出险理赔总金额</view>
<view class="val">{{item.accidentInsuranceInfo.totalCompensationAmount ? item.accidentInsuranceInfo.totalCompensationAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">出险未理赔金额</view>
<view class="val">{{item.accidentInsuranceInfo.uncompensatedAmount ? item.accidentInsuranceInfo.uncompensatedAmount : '/'}}</view>
</view>
<view class="row">
<view class="label">案件实际发生总金额</view>
<view class="val">{{item.accidentInsuranceInfo.totalAmountActuallyIncurred ? item.accidentInsuranceInfo.totalAmountActuallyIncurred : '/'}}</view>
</view>
<view class="row">
<view class="label">理赔单据</view>
<view class="pic-box">
<view
class="item"
wx:for="{{item.accidentInsuranceInfo.documentImageList}}"
wx:key="index"
wx:for-item="pic"
wx:if="{{item.accidentInsuranceInfo.documentImageList.length > 0}}"
data-index="{{index}}"
data-key="accidentInsuranceInfo"
data-key2="documentImageList"
bindtap="previewImg">
<image src="{{pic}}" mode=""/>
</view>
<view class="val" wx:if="{{item.accidentInsuranceInfo.documentImageList.length == 0}}">无</view>
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="btn-box">
<view class="btn" catch:tap="toFeedback">结案</view>
</view>
</view>
</view>