高速运行情况列表接口,详情和表单页面开发

main
zhangqun 3 years ago
parent 2333a2db4c
commit 501947f0d1
  1. 25
      common/util.js
  2. 12
      pages.json
  3. 362
      pages/highWay/runData/form.vue
  4. 6
      pages/highWay/runData/list.vue
  5. 497
      pages/highWay/runStatusData/detail.vue
  6. 672
      pages/highWay/runStatusData/form.vue
  7. 413
      pages/highWay/runStatusData/list.vue
  8. 15
      pages/home/index.vue
  9. 14
      pages/login/login.vue

@ -66,8 +66,31 @@ var dateUtils = {
}
};
//获取日期的今天,明天,后天 -1是昨天,0是今天,1是后一天
function getDateStr(today, addDayCount) {
let date;
if (today) {
date = new Date(today);
} else {
date = new Date();
}
date.setDate(date.getDate() + addDayCount); //获取AddDayCount天后的日期
let y = date.getFullYear();
let m = date.getMonth() + 1; //获取当前月份的日期
let d = date.getDate();
if (m < 10) {
m = '0' + m;
};
if (d < 10) {
d = '0' + d;
};
console.log(y + "-" + m + "-" + d)
return y + "-" + m + "-" + d;
}
export {
formatTime,
formatLocation,
getDateStr,
dateUtils
}
}

@ -42,6 +42,18 @@
"navigationBarTitleText": "高速运行情况"
}
},
{
"path": "pages/highway/runStatusData/form",
"style": {
"navigationBarTitleText": "高速运行情况报送"
}
},
{
"path": "pages/highway/runStatusData/detail",
"style": {
"navigationBarTitleText": "高速运行情况详情"
}
},
{
"path": "pages/roadTransport/transportData/list",
"style": {

@ -14,70 +14,123 @@
</view>
<view class="form_item">
<view class="form_item_label">统计日期</view>
<view class="form_item_input select">
{{form.statDate}}
<view class="form_item_input picker">
<picker mode="date" :value="form.statDate" @change="bindDateChange">
<text class="unselect_txt"
:style="form.statDate?'color:#333;':''">{{form.statDate?form.statDate:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">统计时段</view>
<view class="form_item_input select">
{{form.statPeriod}}
<view class="form_item_input picker">
<picker :value="index" :range="array" range-key="dictLabel">
<text class="unselect_txt"
:style="index>-1?'color:#333;':''">{{index>-1?array[index].dictLabel:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
</view>
<!-- 用户权限收费站 -->
<view class="station_box">
<view class="station_item">夏庄收费站</view>
<view class="station_item">夏庄收费站</view>
<view class="station_item">夏庄收费站</view>
<view class="station_item">夏庄收费站</view>
<view class="station_item">夏庄收费站</view>
<view @click="changeStationIndex(index)" class="station_item" :class="item.isFinish ? 'active' : ''" v-for="(item, index) in highwaySubDataList" :key="item.id">
<view v-if='item.isFinish' class="tag"></uni-icons></view>
{{item.stationName}}
</view>
</view>
<view class="form_item_box">
<view class="form_item">
<view class="form_item_label">收费站名称</view>
<view class="form_item_input text">{{form.highwaySubDataList[stationIndex].tollStationName}}</view>
</view>
<view class="form_item">
<view class="form_item_label">高速公路名称</view>
<view class="form_item_input select"></view>
<view class="form_item_input text">{{form.highwaySubDataList[stationIndex].highwayName}}</view>
</view>
<view class="form_item">
<view class="form_item_label">收费站入口车辆数</view>
<view class="form_item_input">
<uni-easyinput class="form_input" placeholder="请输入车辆数" type="number" maxlength="30" ></uni-easyinput>
<view class="form_item_input form_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].entranceVehicleCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate">
<view class="rate_item">
<view class="rate_item_label">收费站入口车辆数环比(%)</view>
<view class="rate_item_input">
{{form.highwaySubDataList[stationIndex].tollExemptVehicleCountMom}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">收费站入口车辆数同比(%)</view>
<view class="rate_item_input">
{{form.highwaySubDataList[stationIndex].tollExemptVehicleCountYoy}}
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">收费站出口车辆数</view>
<view class="form_item_input">
<uni-easyinput class="form_input" placeholder="请输入车辆数" type="number" maxlength="30" ></uni-easyinput>
<view class="form_item_input form_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].exitVehicleCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate danger">
<view class="rate_item">
<view class="rate_item_label" style="color: #EB4747">收费站出口车辆数环比(%)</view>
<view class="rate_item_input" style="color: #EB4747">
{{form.highwaySubDataList[stationIndex].exitVehicleCountMom}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">收费站入口车辆数同比(%)</view>
<view class="rate_item_input">
{{form.highwaySubDataList[stationIndex].exitVehicleCountYoy}}
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">免收通行费车辆数</view>
<view class="form_item_input">
<uni-easyinput class="form_input" placeholder="请输入车辆数" type="number" maxlength="30" ></uni-easyinput>
<view class="form_item_input form_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].tollExemptVehicleCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">免收通行费金额</view>
<view class="form_item_input">
<uni-easyinput class="form_input" placeholder="请输入金额" type="number" maxlength="30" ></uni-easyinput>
<view class="form_item_input form_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].tollExemptAmount" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">报送人员及联系方式</view>
<view class="form_item_input select">
{{}}
<view class="form_item_input picker">
<picker :value="submitPersonIndex" :range="submitPerson" range-key="dictLabel">
<text class="unselect_txt"
:style="index>-1?'color:#333;':''">{{submitPersonIndex>-1?submitPerson[submitPersonIndex].dictLabel:'请选择报送人'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
<view class="form_item_remark">
<view class="form_item_label">备注</view>
<view class="form_item_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].mark" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200" autoHeight></uni-easyinput>
</view>
</view>
<view class="divider_line"></view>
</view>
<!-- 底部按钮 -->
<view class="foot_btn">
<view class="act_btn">取消</view>
<view class="act_btn blue">确认</view>
<view class="act_btn" @click="doCancel">取消</view>
<view class="act_btn blue" @click="doSubmit">确认</view>
</view>
</view>
</template>
<script>
import { getDateStr } from "../../../common/util.js"
export default {
data() {
return {
@ -85,71 +138,121 @@
organizationName: '',
statDate: '',
statPeriod: '',
highwaySubDataList: [{
"entranceVehicleCount": 0,
"entranceVehicleCountMom": 0.0,
"entranceVehicleCountYoy": 0.0,
"exitToll": 0.0,
"exitVehicleCount": 0,
"exitVehicleCountMom": 0.0,
"exitVehicleCountYoy": 0.0,
"highwayId": "string",
"highwayName": "string",
"id": "string",
"parentId": "string",
"submitPersonnelContact": "string",
"tollExemptAmount": 0.0,
"tollExemptVehicleCount": 0,
"tollExemptVehicleCountMom": 0.0,
"tollExemptVehicleCountYoy": 0.0,
"tollStationName": "string"
}]
highwaySubDataList: []
}, //form
codeImg: '', //
highwaySubDataList: [],//
stationIndex: 0,//
submitPerson: [],//
submitPersonIndex: -1, //
array: [], //
index: 2, //,0-24
userInfo: {},
yoyMom: {},//
}
},
onLoad(options) {
if(options.type == 'add'){
}else if(options.item) {
this.userInfo = uni.getStorageSync('userInfo');
if (!options.type || options.type == 'add') {
let now = new Date();
this.form.statDate = getDateStr(now, -1);//
this.queryStation();
} else if (options.item) {
this.form = JSON.parse(options.item)
}
this.queryTime();//
},
methods: {
//
getVerCode() {
this.$request1(getApp().globalData.baseUrl + '/api/common/captchaBase64?type=5&_t=' + new Date(), {}, 'GET')
.then(res => {
if (res.code == 200) {
this.codeImg = res.data.img;
}
}).catch(() => {
console.log('vercode err')
})
//
changeStationIndex(index) {
if(this.form.highwaySubDataList[this.stationIndex].entranceVehicleCount != '' && this.form.highwaySubDataList[this.stationIndex].exitVehicleCount != '') {
this.highwaySubDataList[this.stationIndex].isFinish = true;
}else{
this.highwaySubDataList[this.stationIndex].isFinish = false;
}
this.stationIndex = index;
},
//
doLogin() {
if (this.form.username == '' || this.form.password == '') {
uni.showToast({
title: '用户名密码不能为空',
icon: 'none'
//
queryStation() {
this.$request(getApp().globalData.baseUrl + '/api/biz/HighSpeedPermissionsInfo/findList?_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.highwaySubDataList = res.data;
this.highwaySubDataList.map(item => {
this.form.highwaySubDataList.push({
"entranceVehicleCount": '',
"entranceVehicleCountMom": 0.0,
"entranceVehicleCountYoy": 0.0,
"exitToll": 0.0,
"exitVehicleCount": '',
"exitVehicleCountMom": 0.0,
"exitVehicleCountYoy": 0.0,
"highwayId": item.highWayLineCode,
"highwayName": item.highWayLineName,
"submitPersonnelContact": this.userInfo.realName+','+this.userInfo.tel,
"tollExemptAmount": 0.0,
"tollExemptVehicleCount": 0,
"tollExemptVehicleCountMom": 0.0,
"tollExemptVehicleCountYoy": 0.0,
"tollStationName": item.stationName,
"remark": ''
})
})
return;
} else if (this.form.verCode == '') {
uni.showToast({
title: '验证码不能为空',
icon: 'none'
})
return;
}
})
},
//
doCancel() {
uni.navigateBack();
},
//
bindDateChange(e) {
this.form.statDate = e.detail.value;
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.array = res.data;
})
},
//
doSubmit() {
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',
success: (res) => {
if (res.confirm) {
this.submitForm();
}
}
})
},
submitForm() {
// if (this.form.username == '' || this.form.password == '') {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// return;
// } else if (this.form.verCode == '') {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// return;
// }
uni.showLoading({
title: '登录中...',
title: '提交中...',
mask: true
})
this.$request1(getApp().globalData.baseUrl + '/api/login/auth', this.form, 'POST').then(res => {
this.$request(getApp().globalData.baseUrl + '/api/biz/highSpeedOperationController/saveOrUpdate', this.form, 'POST').then(res => {
uni.hideLoading();
if (res.code == 200) {
uni.setStorageSync('satoken', res.data.satoken);
uni.showToast({
title: '报送提交成功',
icon: 'none',
success: () => {
uni.navigateBack();
}
})
}
}).catch(() => {
uni.hideLoading();
@ -169,6 +272,7 @@
font-family: PingFang SC-Bold, PingFang SC;
line-height: 48rpx;
text-align: center;
margin-bottom: 20rpx;
.tel {
color: #2D8CF0;
@ -177,9 +281,42 @@
}
.form_item_box {
padding: 30rpx 20rpx 0 30rpx;
padding: 30rpx 20rpx 30rpx 30rpx;
background-color: #fff;
border-radius: 30rpx;
//
.form_item_rate{
background: #F6F6F6;
border: 1px solid #F6F6F6;
padding: 30rpx;
margin-bottom: 30rpx;
border-radius: 30rpx;
.line{
height: 1px;
background-color: #dfdfdf;
margin: 30rpx 0;
}
.rate_item{
display: flex;
justify-content: space-between;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
.rate_item_label{
color: #666;
font-size: 24rpx;
}
.rate_item_input{
color: #333;
font-size: 28rpx;
}
}
&.danger{
background-color: #FEF6F3;
border-color: #F0622D;
}
}
.form_item_title {
color: #333;
@ -189,7 +326,17 @@
font-weight: bold;
margin-bottom: 30rpx;
}
.form_item_remark{
margin-bottom: 30rpx;
.form_item_label{
color: #333333;
line-height: 42rpx;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
margin-bottom: 30rpx;
}
}
.form_item {
display: flex;
align-items: center;
@ -198,25 +345,61 @@
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-bottom: 30rpx;
.form_item_label{
width: 240rpx;
.form_item_label {
width: 260rpx;
color: #666666;
font-size: 26rpx;
word-break: break-all;
}
.form_item_input{
.form_item_input {
color: #333;
text-align: right;
word-break: break-all;
&.picker {
display: flex;
justify-content: space-between;
.picker_select {
color: #D4D4D4;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
}
}
//
&.text{
color: #333333;
line-height: 40rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
//
&.form_input{
/deep/ .is-input-border{
border: 0 !important;
.uni-easyinput__content-input{
text-align: right;
}
}
}
}
}
}
}
//
.station_box{
.station_box {
display: flex;
flex-wrap: wrap;
.station_item{
margin-top: 40rpx;
.station_item {
height: 60rpx;
color: #666666;
line-height: 60rpx;
@ -225,13 +408,17 @@
font-weight: 400;
border-radius: 20rpx;
border: 1rpx solid #C1C1C1;
padding:0 20rpx;
&.active{
padding: 0 20rpx;
margin-bottom: 40rpx;
margin-right: 20rpx;
&.active {
position: relative;
color: #1ECE5F;
border-color: #1ECE5F;
background: #EBFAF2;
.tag{
.tag {
position: absolute;
top: 0;
right: 0;
@ -244,14 +431,17 @@
}
}
}
.foot_btn {
position: fixed;
left: 30rpx;
right: 30rpx;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: space-between;
padding: 40rpx 0;
padding: 40rpx 30rpx;
background-color: #f5f5f5;
z-index: 99;
.act_btn {
width: 329rpx;

@ -19,15 +19,15 @@
</view>
<view class="list_item">
<view class="list_item_label">收费站入口车辆数</view>
<view class="list_item_cnt">{{item2.entranceVehicleCount || ''}}</view>
<view class="list_item_cnt">{{item2.entranceVehicleCount ===0 ? item2.entranceVehicleCount : item2.entranceVehicleCount || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">收费站出口车辆数</view>
<view class="list_item_cnt">{{item2.exitVehicleCount || ''}}</view>
<view class="list_item_cnt">{{item2.exitVehicleCount === 0 ? item2.exitVehicleCount : item2.exitVehicleCount || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">免收通行费车辆数</view>
<view class="list_item_cnt">{{item2.tollExemptVehicleCount || ''}}</view>
<view class="list_item_cnt">{{item2.tollExemptVehicleCount === 0 ? item2.tollExemptVehicleCount : item2.tollExemptVehicleCount || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">免收通行费金额</view>

@ -0,0 +1,497 @@
<template>
<!-- 查看详情页面 -->
<view class="detail_con">
<view class="detail_box">
<view class="top_box">
<view class="top_item">
<view class="unit_left">
<view class="unit">管理单位</view>
<view class="unit_name">{{ roadData.organizationName }}</view>
</view>
<view class="unit_time">{{ roadData.statDate || '' }} {{ roadData.statPeriodValue || '' }}</view>
</view>
<view class="all_item first">
<view class="all_left">高速开闭情况</view>
<view class="all_right">{{ roadData.isOpen == 1 ? '开放' : '关闭' }}</view>
</view>
<view class="all_item">
<view class="all_left">事故数量</view>
<view class="all_right">
{{ roadData.accidentCount === 0 ? roadData.accidentCount : roadData.accidentCount || '' }}
</view>
</view>
<view class="all_item">
<view class="all_left">拥堵数量</view>
<view class="all_right">
{{ roadData.congestionCount === 0 ? roadData.congestionCount : roadData.congestionCount || '' }}
</view>
</view>
<view class="all_item">
<view class="all_left">伤者人数</view>
<view class="all_right">
{{ roadData.injuredCount === 0 ? roadData.injuredCount : roadData.injuredCount || '' }}
</view>
</view>
<view class="all_item last">
<view class="all_left">亡者人数</view>
<view class="all_right">
{{ roadData.deceasedCount === 0 ? roadData.deceasedCount : roadData.deceasedCount || '' }}
</view>
</view>
</view>
</view>
<view class="detail_box">
<view class="top_box">
<!-- tab 切换 -->
<view class="tab_box">
<view class="tab_nav" :class="tabType == 1 ? 'active' : ''" @click="tabType = 1">拥堵信息详情</view>
<view class="tab_nav" :class="tabType == 2 ? 'active' : ''" @click="tabType = 2">事故信息详情</view>
</view>
<!-- 拥堵 -->
<view class="con_item" v-if="tabType == 1" v-for="(item, index) in roadData.highwayCongestionDetailVOS"
:key="index">
<view class="spread_box" v-if="item.isSpread">
<view class="item_con first">
<view class="left">拥堵信息-{{index+1}}</view>
</view>
<view class="item_con">
<view class="left">高速公路名称</view>
<view class="right">{{ item.highwayName || '' }}</view>
</view>
<view class="item_con">
<view class="left">拥堵发生时间</view>
<view class="right">
<uni-dateformat v-if="item.congestionStartTime" format="yyyy-MM-dd hh:mm:ss" :date="item.congestionStartTime"></uni-dateformat>
<text v-else></text>
</view>
</view>
<view class="item_con">
<view class="left">拥堵处理结束时间</view>
<view class="right">
<uni-dateformat v-if="item.congestionEndTime" format="yyyy-MM-dd hh:mm:ss" :date="item.congestionEndTime"></uni-dateformat>
<text v-else></text>
</view>
</view>
<view class="item_con">
<view class="left">发生位置</view>
<view class="right">{{ item.location || '' }}</view>
</view>
<view class="item_con">
<view class="left">拥堵内容</view>
<view class="right">{{ item.congestionContent || '' }}</view>
</view>
<view class="item_con">
<view class="left">阻断/拥堵持续时间</view>
<view class="right">{{ item.duration || '' }}</view>
</view>
<view class="item_con">
<view class="left">截至当前拥堵空间范围(桩号及方向)</view>
<view class="right">{{ item.congestionRange || '' }}</view>
</view>
<view class="item_con">
<view class="left">处置工作开展情况</view>
<view class="right">{{ item.disposalStatus || '' }}</view>
</view>
<view class="item_con">
<view class="left">补充</view>
<view class="right">{{ item.additionalNotes || '' }}</view>
</view>
<view class="expand_box" @click="clickPack(item)">
<image class="img" src="../../../static/image/spread.png" mode=""></image>
<view class="tit">收起</view>
</view>
</view>
<view class="no_spread" v-if="!item.isSpread" @click="handleSpread(item)">
<view class="item_con first">
<view class="left">拥堵信息-{{index+1}}</view>
</view>
<view class="item_con">
<view class="left">高速公路名称</view>
<view class="right">{{ item.highwayName || '' }}</view>
</view>
</view>
</view>
<!-- 事故 -->
<view class="con_item" v-if="tabType == 2" v-for="(item, index) in roadData.highwayAccidentDetailVOS"
:key="item.id">
<view class="spread_box">
<view class="item_con first">
<view class="left">事故信息-{{index+1}}</view>
</view>
<view class="item_con">
<view class="left">高速公路名称</view>
<view class="right">{{ item.highwayName || '' }}</view>
</view>
<view class="item_con">
<view class="left">事故发生时间</view>
<view class="right">{{ item.accidentEndTime || '' }}</view>
</view>
<view class="item_con">
<view class="left">事故处理结束时间</view>
<view class="right">{{ item.congestionEndTime || '' }}</view>
</view>
<view class="item_con">
<view class="left">发生位置</view>
<view class="right">{{ item.location || '' }}</view>
</view>
<view class="item_con">
<view class="left">事故内容</view>
<view class="right">{{ item.accidentContent || '' }}</view>
</view>
<view class="item_con">
<view class="left">事故等级</view>
<view class="right">{{ item.accidentLevel || '' }}</view>
</view>
<view class="item_con">
<view class="left">阻断/拥堵持续时间</view>
<view class="right">{{ item.duration || '' }}</view>
</view>
<view class="item_con">
<view class="left">截止当前拥堵空间范围(桩号及方向)</view>
<view class="right">{{ item.spatialRange || '' }}</view>
</view>
<view class="item_con">
<view class="left">处置工作开展情况</view>
<view class="right">{{ item.workStatus || '' }}</view>
</view>
<view class="item_con">
<view class="left">补充说明</view>
<view class="right">{{ item.additionalNotes || '' }}</view>
</view>
</view>
<view class="no_spread" v-if="!item.isSpread" @click="handleSpread(item)">
<view class="item_con first">
<view class="left">事故信息-{{index+1}}</view>
</view>
<view class="item_con">
<view class="left">高速公路名称</view>
<view class="right">{{ item.highwayName || '' }}</view>
</view>
</view>
</view>
</view>
<view class="bottom_box">
<p class="edit_btn" @click="goEditPage">编辑</p>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
roadData: {},
tabType: 1,
}
},
onLoad(options) {
let item = JSON.parse(options.item)
console.log(item)
let item1 = JSON.parse(JSON.stringify(item));
item1.highwayAccidentDetailVOS.map((item, index) => {
item.isSpread = index === 0 ? true : false;
})
item1.highwayCongestionDetailVOS.map((item, index) => {
item.isSpread = index === 0 ? true : false;
})
this.roadData = item1;
// this.getDetail()
},
methods: {
//
goEditPage() {
uni.navigateTo({
url: '/pages/highway/runStatusData/form?item=' + JSON.stringify(this.roadData)
})
},
//
clickPack(item) {
this.$set(item, "isSpread", false)
},
handleSpread(item) {
this.$set(item, "isSpread", true)
},
getDetail() {
this.$request(getApp().globalData.baseUrl + '/api/biz/highSpeedOperationController/selectById/' +
'8A47103EE00000018772BC97AE50FFB7', {}, "GET").then(res => {
console.log(res)
})
},
}
}
</script>
<style lang="scss" scoped>
.detail_con {
width: 100%;
height: 100%;
overflow-y: auto;
.detail_box {
background: #fff;
border-radius: 30rpx;
margin: 30rpx 30rpx 0;
.top_box {
width: 630rpx;
padding: 38rpx 30rpx 0rpx;
display: flex;
flex-direction: column;
.top_item {
width: 100%;
// margin-top: 38rpx;
margin-bottom: 60rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
.unit_left {
width: 100%;
display: flex;
.unit {
width: 102rpx;
height: 37rpx;
background: #FFF7E4;
border-radius: 10rpx;
border: 1rpx solid #EF9A4F;
font-size: 20rpx;
color: #E37616;
display: flex;
align-items: center;
justify-content: center;
}
.unit_name {
font-size: 30rpx;
color: #333;
font-weight: bold;
line-height: 48rpx;
margin-left: 20rpx;
}
}
.unit_time {
margin-top: 30rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #999999;
}
}
.all_item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 32rpx;
&.first {
margin-top: 0rpx;
}
&.last {
margin-bottom: 30rpx;
}
.all_left {
color: #666666;
font-size: 26rpx;
}
.all_right {
font-size: 28rpx;
color: #333;
}
}
.con_item {
width: 570rpx;
background: #F8F8F8;
border-radius: 30rpx;
margin: 0 auto;
margin-top: 30rpx;
padding: 30rpx 30rpx;
.spread_box {
width: 100%;
.item_con {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 32rpx;
&.first {
color: #333;
font-size: 30rpx;
font-weight: bold;
margin-top: 0rpx;
}
.left {
color: #666666;
font-size: 26rpx;
}
.right {
font-size: 28rpx;
color: #333;
}
}
.item_content {
width: 570rpx;
margin: 0 auto;
background-color: #fff;
border-radius: 30rpx;
margin-top: 30rpx;
.content {
width: 516rpx;
padding: 34rpx 32rpx 30rpx 22rpx;
display: flex;
justify-content: space-between;
align-items: center;
&.top {
border-bottom: 1rpx solid #F2F2F2;
}
.left {
font-size: 24rpx;
color: #666;
}
.right {
color: #333;
font-size: 28rpx;
&.green {
color: #1ECE5F;
}
&.red {
color: #EB4747;
}
}
}
}
.expand_box {
width: 100%;
display: flex;
margin-top: 30rpx;
align-items: center;
justify-content: center;
.img {
width: 40rpx;
height: 40rpx;
}
.tit {
color: #2D8CF0;
font-size: 24rpx;
margin-left: 12rpx;
}
}
}
.no_spread {
width: 100%;
background: #F8F8F8;
border-radius: 30rpx;
.item_con {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 32rpx;
&.first {
margin-top: 0rpx;
}
.left {
color: #666666;
font-size: 26rpx;
}
.right {
font-size: 28rpx;
color: #333;
}
}
}
}
}
.bottom_box {
width: 100%;
padding: 40rpx 0;
display: flex;
justify-content: flex-end;
.edit_btn {
width: 180rpx;
height: 70rpx;
background: #2D8CF0;
border-radius: 100rpx;
color: #fff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 30rpx;
}
}
}
.tab_box {
display: flex;
justify-content: space-around;
.tab_nav {
color: #999999;
line-height: 42rpx;
font-size: 30rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-bottom: 25rpx;
&.active {
position: relative;
color: #2D8CF0;
font-weight: bold;
&::after {
position: absolute;
content: '';
left: 50%;
bottom: 0;
width: 74rpx;
height: 6rpx;
background: #2D8CF0;
border-radius: 100rpx;
margin-left: -37rpx;
}
}
}
}
}
</style>

@ -0,0 +1,672 @@
<template>
<view class="form_warp">
<view class="form_intro">
<view>如有填报问题请咨询公共服务中心</view>
<view>中心值班电话<text class="tel">66007587</text></view>
</view>
<view class="form_item_box">
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">管理单位名称</view>
<view class="form_item_input select">
{{form.organizationName}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">统计日期</view>
<view class="form_item_input picker">
<picker mode="date" :value="form.statDate" @change="bindDateChange">
<text class="unselect_txt"
:style="form.statDate?'color:#333;':''">{{form.statDate?form.statDate:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">统计时段</view>
<view class="form_item_input picker">
<picker :value="index" :range="array" range-key="dictLabel">
<text class="unselect_txt"
:style="index>-1?'color:#333;':''">{{index>-1?array[index].dictLabel:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">高速开闭情况</view>
<view class="form_item_input form_input">
<picker :value="form.isOpen" :range="[{value:1,label:'开放'},{value:0,label:'关闭'}]" range-key="dictValue">
<text class="unselect_txt"
:style="form.isOpen > -1?'color:#333;':''">{{form.isOpen == 1 ? '开放' : form.isOpen === 0 ? '关闭' : '请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">已处理事故数量</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.count1" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入"
type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">正在处理事故数量</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.count2" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入"
type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故数量</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.accidentCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入事故数量" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">拥堵数量</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.congestionCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入拥堵数量" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">伤者人数</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.highwayName" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">亡者人数</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.highwayName" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
</view>
<view class="form_item_box" style="margin-top: 30rpx;">
<!-- tab 切换 -->
<view class="tab_box">
<view class="tab_nav" :class="tabType == 1 ? 'active' : ''" @click="tabType = 1">拥堵信息详情</view>
<view class="tab_nav" :class="tabType == 2 ? 'active' : ''" @click="tabType = 2">事故信息详情</view>
</view>
<!-- 拥堵 -->
<view class="form_item_li" v-if="tabType == 1" v-for="(item,index) in form.highwayCongestionDetailDTOS"
:key="index">
<view class="form_item" style="font-size: 30rpx;color:#333;font-weight: bold;">
拥堵信息-{{index+1}}
</view>
<view class="form_item">
<view class="form_item_label">高速公路名称</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.highwayName" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">拥堵发生时间</view>
<view class="form_item_input form_input">
<uni-datetime-picker v-model="item.congestionStartTim"></uni-datetime-picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">拥堵处理结束时间</view>
<view class="form_item_input form_input">
<uni-datetime-picker v-model="item.congestionEndTime"></uni-datetime-picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">发生位置</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.location" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">拥堵内容</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.congestionContent" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">阻断/拥堵持续时间</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.duration" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">截至当前拥堵空间范围(桩号及方向)</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.congestionRange" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">处置工作开展情况</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.disposalStatus" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item_remark">
<view class="form_item_label">补充说明</view>
<view class="form_item_input">
<uni-easyinput v-model="item.additionalNotes" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入备注信息" type="textarea" maxlength="200" autoHeight></uni-easyinput>
</view>
</view>
<view class="line"></view>
<view class="add_btn">增行</view>
</view>
<!-- 事故 -->
<view class="form_item_li" v-if="tabType == 1" v-for="(item,index) in form.highwayAccidentDetailVOS" :key="index">
<view class="form_item" style="font-size: 30rpx;color:#333;font-weight: bold;">
事故信息-{{index+1}}
</view>
<view class="form_item">
<view class="form_item_label">高速公路名称</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.highwayName" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故发生时间</view>
<view class="form_item_input form_input">
<uni-datetime-picker v-model="item.accidentStartTime"></uni-datetime-picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故处理结束时间</view>
<view class="form_item_input form_input">
<uni-datetime-picker v-model="item.accidentEndTime"></uni-datetime-picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">发生位置</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.location" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故内容</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.congestionContent" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故等级</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.congestionContent" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">阻断/拥堵持续时间</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.duration" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">截至当前拥堵空间范围(桩号及方向)</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.congestionRange" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">处置工作开展情况</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.disposalStatus" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item_remark">
<view class="form_item_label">补充说明</view>
<view class="form_item_input">
<uni-easyinput v-model="item.additionalNotes" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入备注信息" type="textarea" maxlength="200" autoHeight></uni-easyinput>
</view>
</view>
<view class="line"></view>
<view class="add_btn">增行</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="foot_btn">
<view class="act_btn" @click="doCancel">取消</view>
<view class="act_btn blue" @click="doSubmit">确认</view>
</view>
</view>
</template>
<script>
import {
getDateStr
} from "../../../common/util.js"
export default {
data() {
return {
form: {
"accidentCount": 0,
"congestionCount": 0,
"deceasedCount": 0,
"highwayAccidentDetailDTOS": [{
"accidentContent": "",
"accidentEndTime": "",
"accidentLevel": "string",
"accidentStartTime": "",
"additionalNotes": "",
"congestionRange": "",
"disposalStatus": "",
"duration": "",
"highwayName": "",
"location": "",
}],
"highwayCongestionDetailDTOS": [{
"additionalNotes": "",
"congestionContent": "",
"congestionEndTime": "",
"congestionRange": "",
"congestionStartTime": "",
"disposalStatus": "",
"duration": "",
"highwayName": "",
"location": "",
}],
"injuredCount": 0,
"isOpen": 0,
"organizationName": "",
"statDate": "",
"statPeriod": ""
}, //form
highwaySubDataList: [], //
stationIndex: 0, //
submitPerson: [], //
submitPersonIndex: -1, //
array: [], //
index: 2, //,0-24
userInfo: {},
tabType: 1, //
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
if (!options.type || options.type == 'add') {
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
this.queryStation();
} else if (options.item) {
this.form = JSON.parse(options.item)
}
this.queryTime(); //
},
methods: {
//
changeStationIndex(index) {
if (this.form.highwaySubDataList[this.stationIndex].entranceVehicleCount != '' && this.form.highwaySubDataList[
this.stationIndex].exitVehicleCount != '') {
this.highwaySubDataList[this.stationIndex].isFinish = true;
} else {
this.highwaySubDataList[this.stationIndex].isFinish = false;
}
this.stationIndex = index;
},
//
queryStation() {
this.highwaySubDataList = [{
id: 4,
name: '城阳收费站',
highwayId: 1,
highwayName: '青龙高速公路建设有限公司',
isFinish: false
},
{
id: 5,
name: '夏庄收费站',
highwayId: 1,
highwayName: '青龙高速公路建设有限公司',
isFinish: false
},
];
},
//
doCancel() {
uni.navigateBack();
},
//
bindDateChange(e) {
this.form.statDate = e.detail.value;
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.array = res.data;
})
},
//
doSubmit() {
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',
success: (res) => {
if (res.confirm) {
this.submitForm();
}
}
})
},
submitForm() {
if (this.form.username == '' || this.form.password == '') {
uni.showToast({
title: '用户名密码不能为空',
icon: 'none'
})
return;
} else if (this.form.verCode == '') {
uni.showToast({
title: '验证码不能为空',
icon: 'none'
})
return;
}
uni.showLoading({
title: '提交中...',
mask: true
})
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/saveOrUpdate', this.form,
'POST').then(res => {
uni.hideLoading();
if (res.code == 200) {
uni.showToast({
title: '报送提交成功',
icon: 'none',
success: () => {
uni.navigateBack();
}
})
}
}).catch(() => {
uni.hideLoading();
})
},
}
}
</script>
<style lang="scss" scoped>
.form_warp {
padding: 30rpx 30rpx 195rpx;
.form_intro {
color: #666;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
line-height: 48rpx;
text-align: center;
margin-bottom: 20rpx;
.tel {
color: #2D8CF0;
font-weight: bold;
}
}
.form_item_box {
padding: 30rpx 20rpx 30rpx 30rpx;
background-color: #fff;
border-radius: 30rpx;
//
.form_item_rate {
background: #F6F6F6;
border: 1px solid #F6F6F6;
padding: 30rpx;
margin-bottom: 30rpx;
border-radius: 30rpx;
.line {
height: 1px;
background-color: #dfdfdf;
margin: 30rpx 0;
}
.rate_item {
display: flex;
justify-content: space-between;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
.rate_item_label {
color: #666;
font-size: 24rpx;
}
.rate_item_input {
color: #333;
font-size: 28rpx;
}
}
&.danger {
background-color: #FEF6F3;
border-color: #F0622D;
}
}
.form_item_title {
color: #333;
line-height: 42rpx;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
margin-bottom: 30rpx;
}
.form_item_remark {
margin-bottom: 30rpx;
.form_item_label {
color: #333333;
line-height: 42rpx;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
margin-bottom: 30rpx;
}
}
.form_item {
display: flex;
align-items: center;
justify-content: space-between;
line-height: 37rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-bottom: 30rpx;
.form_item_label {
width: 260rpx;
color: #666666;
font-size: 26rpx;
word-break: break-all;
}
.form_item_input {
color: #333;
text-align: right;
word-break: break-all;
&.picker {
display: flex;
justify-content: space-between;
.picker_select {
color: #D4D4D4;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
}
}
//
&.text {
color: #333333;
line-height: 40rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
//
&.form_input {
/deep/ .is-input-border {
border: 0 !important;
.uni-easyinput__content-input {
height: 35rpx;
text-align: right;
}
}
}
}
}
}
}
//
.station_box {
display: flex;
flex-wrap: wrap;
margin-top: 40rpx;
.station_item {
height: 60rpx;
color: #666666;
line-height: 60rpx;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
border-radius: 20rpx;
border: 1rpx solid #C1C1C1;
padding: 0 20rpx;
margin-bottom: 40rpx;
margin-right: 20rpx;
&.active {
position: relative;
color: #1ECE5F;
border-color: #1ECE5F;
background: #EBFAF2;
.tag {
position: absolute;
top: 0;
right: 0;
width: 34rpx;
height: 23rpx;
background: #1ECE5F;
border-radius: 0rpx 20rpx 0rpx 5rpx;
text-align: center;
}
}
}
}
.foot_btn {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: space-between;
padding: 40rpx 30rpx;
background-color: #f5f5f5;
z-index: 99;
.act_btn {
width: 329rpx;
height: 90rpx;
color: #666666;
font-size: 28rpx;
line-height: 90rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: center;
background: #F6F6F6;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
&.blue {
color: #fff;
background: #2D8CF0;
border-color: #2D8CF0;
}
}
}
//
.line {
height: 1px;
background-color: #E1E1E1;
}
.add_btn {
height: 90rpx;
line-height: 90rpx;
color: #2D8CF0;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: center;
background: #ECF5FF;
border-radius: 30rpx;
border: 2rpx solid #2D8CF0;
}
.tab_box {
display: flex;
justify-content: space-around;
.tab_nav {
color: #999999;
line-height: 42rpx;
font-size: 30rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-bottom: 25rpx;
&.active {
position: relative;
color: #2D8CF0;
font-weight: bold;
&::after {
position: absolute;
content: '';
left: 50%;
bottom: 0;
width: 74rpx;
height: 6rpx;
background: #2D8CF0;
border-radius: 100rpx;
margin-left: -37rpx;
}
}
}
}
button {
background-color: #007aff;
color: #ffffff;
}
</style>

@ -1,12 +1,83 @@
<template>
<view>
<view class="text" v-for="(item,index) in data" :key="index">
<view>
<view>{{item.organizationName}}</view>
<view>{{item.statDate}}{{item.statPeriod}}</view>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index">
<view class="list_top">
<view class="unit_tags">管理单位</view>
<view class="unit_name">{{item.organizationName}}</view>
</view>
<view class="report_time">{{item.statDate || ''}}<text
style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text>
</view>
<view class="list_item_box">
<view class="list_item">
<view class="list_item_label">高速开闭情况</view>
<view class="list_item_cnt">{{item.isOpen == 1 ? '开放' : '关闭'}}</view>
</view>
<view class="list_item">
<view class="list_item_label">事故数量</view>
<view class="list_item_cnt">{{item.accidentCount === 0 ? item.accidentCount : item.accidentCount || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">拥堵数量</view>
<view class="list_item_cnt">{{item.congestionCount === 0 ? item.congestionCount : item.congestionCount || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">伤者人数</view>
<view class="list_item_cnt">{{item.injuredCount === 0 ? item.injuredCount : item.injuredCount || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">亡者人数</view>
<view class="list_item_cnt">{{item.deceasedCount === 0 ? item.deceasedCount : item.deceasedCount || ''}}</view>
</view>
</view>
<!-- 按钮 -->
<view class="act_btn_box">
<view class="act_btn blue" @click="goPage('/pages/highway/runStatusData/form', item)">编辑</view>
<view class="act_btn" style="margin-right: 30rpx;" @click="goPage('/pages/highway/runStatusData/detail', item)">
查看详情</view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore" :contentText="contentText"></uni-load-more>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>
<!-- 筛选 -->
<view class="foot_btn_box">
<view @click="goPage('/pages/highway/runStatusData/form?type=add')" class="act_btn"><uni-icons type="plusempty"
size="18" color="#fff" style="margin-right: 9rpx;"></uni-icons></view>
<view @click="showSearch" class="act_btn btn1"><uni-icons type="search" size="18" color="#2D8CF0"
style="margin-right: 9rpx;"></uni-icons>
</view>
</view>
<!-- 筛选 -->
<uni-popup ref="popup" style="width: 100%;" background-color="none">
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
统计起止时间
</view>
<view class="time_box">
<uni-datetime-picker v-model="timeRange" type="daterange" />
</view>
<view class="cont_tit picker">
<view>统计时段</view>
<view class="picker_select">
<picker @change="bindPickerChange" :value="index" :range="array" range-key="dictLabel">
<text class="unselect_txt"
:style="index>-1?'color:#333;':''">{{index>-1?array[index].dictLabel:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
</view>
<view class="btn_box">
<p class="btn" @click="searchReset">重置</p>
<p class="btn" @click="searchList">确认</p>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
@ -28,9 +99,13 @@
contentrefresh: "正在加载...",
contentnomore: "没有更多数据了",
},
timeRange: [], //
array: [], //
index: -1, //
}
},
onLoad() {
this.queryTime();
this.loadMore();
},
onUnload() {
@ -45,6 +120,49 @@
this.loadMore();
},
methods: {
//
showDetail(index1, index2, flag) {
this.data[index1].highwaySubDataList[index2].show = flag;
},
//
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
},
//
searchList() {
this.query = {
statDateStart: this.timeRange.length > 0 ? this.timeRange[0] : '',
statDateEnd: this.timeRange.length > 0 ? this.timeRange[1] : '',
statPeriod: this.index > -1 ? this.array[this.index].dictValue : ''
};
this.data = [];
this.current = 0;
this.hasMore = true;
this.$refs.popup.close();
this.loadMore();
},
//
searchReset() {
this.timeRange = [];
this.query = {
statDateStart: '',
statDateEnd: '',
statPeriod: ''
};
this.index = -1;
},
//
showSearch() {
this.$refs.popup.open('bottom');
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.array = res.data;
})
},
loadMore() {
if (this.hasMore) {
this.current = this.current + 1;
@ -74,19 +192,286 @@
})
}
},
//
goPage(url, param) {
if (param) {
uni.navigateTo({
url: url + '?item=' + JSON.stringify(param)
})
} else {
uni.navigateTo({
url: url
})
}
},
}
}
</script>
<style lang="scss" scoped>
.text {
margin: 16rpx 0;
width: 100%;
.page {
min-height: 100vh;
padding: 30rpx 30rpx 195rpx;
}
.list_box {
background-color: #fff;
border-radius: 30rpx;
margin-bottom: 30rpx;
padding: 30rpx;
.list_top {
display: flex;
margin-bottom: 30rpx;
.unit_tags {
height: 37rpx;
line-height: 37rpx;
color: #E37616;
font-size: 20rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
background: #FFF7E4;
border-radius: 10rpx;
border: 1rpx solid #EF9A4F;
padding: 0 11rpx;
}
.unit_name {
color: #333333;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
line-height: 48rpx;
margin-left: 20rpx;
word-break: break-all;
}
}
.report_time {
color: #999999;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
text-align: center;
margin-bottom: 30rpx;
}
.list_item_box {
padding: 30rpx 30rpx 0;
background: #F8F8F8;
border-radius: 30rpx;
margin-bottom: 30rpx;
}
.list_item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0 30rpx;
.list_item_label {
width: 240rpx;
color: #666666;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
}
.list_item_cnt {
flex: 1;
color: #333333;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
text-align: right;
margin-left: 20rpx;
word-break: break-all;
}
}
.list_item_shouqi {
color: #2D8CF0;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: center;
line-height: 33rpx;
padding-bottom: 30rpx;
.txt {
margin-left: 12rpx;
}
}
.act_btn_box {
display: flex;
flex-direction: row-reverse;
margin: 10rpx 0;
.act_btn {
width: 180rpx;
color: #666666;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 70rpx;
background: #FFFFFF;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
text-align: center;
&.blue {
color: #fff;
background: #2D8CF0;
border-color: #2D8CF0;
}
}
}
}
.foot_btn_box {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: space-around;
background-color: #F8F8F8;
padding-bottom: 20px;
.act_btn {
width: 329rpx;
height: 90rpx;
line-height: 88rpx;
display: flex;
justify-content: center;
color: #FFFFFF;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
background: #2D8CF0;
border-radius: 100rpx;
border: 1rpx solid #2D8CF0;
.txt {
margin-left: 9rpx;
}
&.btn1 {
color: #2D8CF0;
background: #F6F6F6;
}
}
}
.pop_box {
border-radius: 30rpx 30rpx 0 0;
background-color: #fff;
height: 120rpx;
line-height: 120rpx;
text-align: center;
color: #555;
border-radius: 8rpx;
padding: 30rpx;
.pop_title {
color: #333333;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
line-height: 45rpx;
text-align: center;
margin: 20rpx 0;
.pop_close {
float: right;
}
}
.popup-content {
// display: flex;
// flex-direction: column;
.cont_tit {
width: 100%;
color: #333333;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
line-height: 37rpx;
display: flex;
margin-bottom: 40rpx;
&.picker {
display: flex;
justify-content: space-between;
margin: 60rpx 0;
.picker_select {
color: #D4D4D4;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
}
}
}
.time_box {
width: 690rpx;
margin: 0 auto;
/deep/ .uni-date-x--border {
border-radius: 30rpx;
.uni-date-x {
background: transparent;
.icon-calendar {
padding-left: 20rpx;
}
}
}
/deep/ .uni-date-editor--x .uni-date__icon-clear {
padding-right: 20rpx;
}
}
.picker_box {
width: 690rpx;
margin: 0 auto;
/deep/.input-value-border {
border-radius: 30rpx;
}
}
}
.btn_box {
width: 100%;
height: 120rpx;
display: flex;
margin-top: 20px;
align-items: center;
justify-content: space-between;
.btn {
width: 290rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
color: #666;
font-size: 28rpx;
line-height: 88rpx;
text-align: center;
&:last-child {
background: #2D8CF0;
color: #FFFFFF;
border-color: #2D8CF0;
}
}
}
}
</style>

@ -1,7 +1,7 @@
<template>
<view class="highway_home">
<view style="text-align: center;">
<image :src="'../../static/image/' + routersData.name + '01.png'" class="highway_logo"></image>
<image v-if="routersData.name" :src="'../../static/image/' + routersData.name + '01.png'" class="highway_logo"></image>
<view class="home_title">{{routersData.meta.title}}</view>
</view>
<view class="act_wrap" v-for="(item,index) in routersData.children" :key="index">
@ -11,11 +11,11 @@
<text class="act_txt">{{item.meta.title}}</text>
</view>
<!-- 子路由 -->
<view v-show="item.show">
<view @click="goPage('/pages'+ routersData.path + '/' + item.path+'/form')" class="act_sub_box" style="margin-bottom: 30rpx;">
<view v-show="index === showIndex">
<view @click="goPage('/pages'+ routersData.path + '/' + item.name+'/form')" class="act_sub_box" style="margin-bottom: 30rpx;">
报送
</view>
<view @click="goPage('/pages'+ routersData.path + '/' + item.path+'/list')" class="act_sub_box">
<view @click="goPage('/pages'+ routersData.path + '/' + item.name+'/list')" class="act_sub_box">
报送记录
</view>
</view>
@ -31,7 +31,8 @@
export default {
data() {
return {
routersData: []
routersData: [],
showIndex: 0
}
},
onLoad(options) {
@ -46,8 +47,8 @@
methods: {
//
changeShowStatus(index) {
console.log('changeShow')
this.routersData.children[index].show = !this.routersData.children[index].show;
this.showIndex = index;
console.log('changeShow', index)
},
goPage(url) {
console.log('gopage', url)

@ -67,12 +67,22 @@
uni.hideLoading();
if(res.code == 200) {
uni.setStorageSync('satoken', res.data.satoken);
this.getUserInfo();
this.getRouters();
}
}).catch(() => {
uni.hideLoading();
})
},
//
getUserInfo() {
this.$request(getApp().globalData.baseUrl + '/api/login/info', {}, 'POST').then(res => {
if(res.code == 200) {
uni.setStorageSync('userInfo', res.data);
}
}).catch(() => {
})
},
//
getRouters() {
this.$request(getApp().globalData.baseUrl + '/api/login/getRouters', {}, 'GET').then(res => {
@ -80,6 +90,10 @@
uni.navigateTo({
url: '/pages/home/index?routers=' + JSON.stringify(res.data[0])
})
}else{
uni.navigateTo({
url: '/pages/home/home'
})
}
}).catch(() => {
})

Loading…
Cancel
Save