main
张群 3 years ago
parent c1d4de7240
commit 8e1497d81f
  1. BIN
      .DS_Store
  2. 7
      common/util.js
  3. 12
      pages.json
  4. 25
      pages/highWay/runData/form.vue
  5. 65
      pages/highWay/runData/list.vue
  6. 4
      pages/highWay/runStatusData/form.vue
  7. 50
      pages/highWay/runStatusData/list.vue
  8. 2
      pages/home/index.vue
  9. 4
      pages/login/login.vue
  10. 562
      pages/railway/railwayRunData/form.vue
  11. 479
      pages/railway/railwayRunData/list copy.vue
  12. 44
      pages/railway/railwayRunData/list.vue
  13. 513
      pages/railway/runStatus/form.vue
  14. 447
      pages/railway/runStatus/list.vue
  15. BIN
      static/.DS_Store

BIN
.DS_Store vendored

Binary file not shown.

@ -87,10 +87,15 @@ function getDateStr(today, addDayCount) {
console.log(y + "-" + m + "-" + d)
return y + "-" + m + "-" + d;
}
//非空校验
const checkNotEmpty = (str) => {
return typeof(str) !== 'undefined' && str !== null && str !== '' ? true : false
}
export {
formatTime,
formatLocation,
getDateStr,
dateUtils
dateUtils,
checkNotEmpty
}

@ -72,6 +72,18 @@
"navigationBarTitleText": "铁路运行数据详情"
}
},
{
"path": "pages/railway/runStatus/list",
"style": {
"navigationBarTitleText": "铁路运行情况"
}
},
{
"path": "pages/railway/runStatus/form",
"style": {
"navigationBarTitleText": "铁路运行情况报送"
}
},
{
"path": "pages/roadTransport/transportData/list",
"style": {

@ -79,7 +79,7 @@
</view>
<!-- 用户权限收费站 -->
<view class="station_box">
<view @click="changeStationIndex(index)" class="station_item" :class="item.isFinish ? 'active' : ''" v-for="(item, index) in highwaySubDataList" :key="item.id">
<view :style="(index+1)%2 == 0 ? 'margin-right:20rpx;margin-left:20rpx;' : ''" @click="changeStationIndex(index)" class="station_item" :class="[item.isFinish ? 'active' : '',index == stationIndex ? 'choosed' : '']" v-for="(item, index) in highwaySubDataList" :key="item.id">
<view v-if='item.isFinish' class="tag"><uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons></view>
{{item.stationName}}
</view>
@ -219,11 +219,11 @@
methods: {
//
queryYoYMom() {
// if(this.form.statDate && this.form.statPeriod) {
// this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/getYoYMoM?statDate='+this.form.statDate+'&statPeriod='+this.form.statPeriod+'&_t=' + Date.parse(new Date()),{},"GET").then(res => {
// this.yoyMom = res.data;
// })
// }
if(this.form.statDate && this.form.statPeriod) {
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/getYoYAndMoM?statDate='+this.form.statDate+'&statPeriod='+this.form.statPeriod+'&_t=' + Date.parse(new Date()),{},"GET").then(res => {
this.yoyMom = res.data;
})
}
},
//
queryPerson() {
@ -495,7 +495,7 @@
margin-bottom: 30rpx;
.form_item_label {
width: 280rpx;
width: 300rpx;
color: #666666;
font-size: 26rpx;
word-break: break-all;
@ -550,9 +550,14 @@
.station_box {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
margin-top: 30rpx;
.station_item {
flex: 1;
width: calc((100% - 46rpx) / 3);
min-width: calc((100% - 46rpx) / 3);
max-width: calc((100% - 46rpx) / 3);
height: 60rpx;
color: #666666;
line-height: 60rpx;
@ -561,9 +566,8 @@
font-weight: 400;
border-radius: 20rpx;
border: 1rpx solid #C1C1C1;
padding: 0 20rpx;
text-align: center;
margin-bottom: 30rpx;
margin-right: 20rpx;
&.active {
position: relative;
@ -584,6 +588,9 @@
text-align: center;
}
}
&.choose{
border-color: #2D8CF0;
}
}
}

@ -1,64 +1,17 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runData/form', item)">
<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" v-for="(item2,index2) in item.highwaySubDataList" :key="item2.id">
<view class="list_item" @click="showDetail(index,index2,true)">
<view class="list_item_label">收费站名称</view>
<view class="list_item_cnt">{{item2.tollStationName}}</view>
</view>
<view class="content" v-show="item2.show">
<view class="list_item">
<view class="list_item_label">高速公路名称</view>
<view class="list_item_cnt">{{item2.highwayName || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">收费站入口车辆数</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 === 0 ? item2.exitVehicleCount : item2.exitVehicleCount || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">免收通行费车辆数</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>
<view class="list_item_cnt">{{item2.tollExemptAmount || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">出口通行费</view>
<view class="list_item_cnt">{{item2.exitToll || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">报送人员及联系方式</view>
<view class="list_item_cnt">{{item2.submitPersonnelContact || ''}}</view>
</view>
<view class="list_item_shouqi" @click="showDetail(index,index2,false)">
<uni-icons type="top" size="16" color="#2D8CF0"></uni-icons>
<text class="txt">收起</text>
</view>
</view>
</view>
<!-- 按钮 -->
<view class="act_btn_box">
<view class="act_btn blue" @click="goPage('/pages/highway/runData/form', item)">编辑</view>
<view class="act_btn" style="margin-right: 30rpx;" @click="goPage('/pages/highway/runData/detail', item)">查看详情</view>
<view class="unit_tags">报送时间</view>
<view class="unit_name">{{item.statDate || ''}}<text style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text></view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>
<!-- 筛选 -->
<view class="foot_btn_box">
<view @click="goPage('/pages/highway/runData/form?type=add')" class="act_btn"><uni-icons type="plusempty" size="18"
color="#fff" style="margin-right: 9rpx;"></uni-icons></view>
<!-- <view @click="goPage('/pages/highway/runData/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>
@ -245,7 +198,6 @@
.list_top {
display: flex;
margin-bottom: 30rpx;
.unit_tags {
height: 37rpx;
@ -258,6 +210,7 @@
border-radius: 10rpx;
border: 1rpx solid #EF9A4F;
padding: 0 11rpx;
margin-right: 16rpx;
}
.unit_name {
@ -361,13 +314,11 @@
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: space-around;
background-color: #F8F8F8;
padding-bottom: 20px;
padding: 20px 30rpx;
.act_btn {
width: 329rpx;
width: 690rpx;
height: 90rpx;
line-height: 88rpx;
display: flex;

@ -94,7 +94,7 @@
:key="index">
<view class="form_item" style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
拥堵信息-{{index+1}}
<uni-icons type="trash" color="red" @click="delRow" size="18"></uni-icons>
<uni-icons type="trash" color="red" @click="delRow(index)" size="18"></uni-icons>
</view>
<view class="form_item">
<view class="form_item_label">高速公路名称</view>
@ -175,7 +175,7 @@
<view class="form_item_li" v-if="tabType == 2" v-for="(item,index) in form.highwayAccidentDetailDTOS" :key="index">
<view class="form_item" style="display:flex; justify-content: space-between;font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
事故信息-{{index+1}}
<uni-icons type="trash" color="red" @click="delRow" size="18"></uni-icons>
<uni-icons type="trash" color="red" @click="delRow(index)" size="18"></uni-icons>
</view>
<view class="form_item">
<view class="form_item_label">高速公路名称</view>

@ -1,48 +1,18 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runStatusData/form', item)">
<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 class="unit_tags">报送时间</view>
<view class="unit_name">{{item.statDate || ''}}<text
style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text></view>
</view>
</view>
<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="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>
@ -222,7 +192,6 @@
.list_top {
display: flex;
margin-bottom: 30rpx;
.unit_tags {
height: 37rpx;
@ -235,6 +204,7 @@
border-radius: 10rpx;
border: 1rpx solid #EF9A4F;
padding: 0 11rpx;
margin-right: 16rpx;
}
.unit_name {
@ -338,13 +308,11 @@
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: space-around;
background-color: #F8F8F8;
padding-bottom: 20px;
padding: 20px 30rpx;
.act_btn {
width: 329rpx;
width: 690rpx;
height: 90rpx;
line-height: 88rpx;
display: flex;

@ -16,7 +16,7 @@
报送
</view>
<view @click="goPage('/pages'+ routersData.path + '/' + item.name+'/list')" class="act_sub_box">
报送记录
历史查询
</view>
</view>
</view>

@ -87,11 +87,11 @@
getRouters() {
this.$request(getApp().globalData.baseUrl + '/api/login/getRouters', {}, 'GET').then(res => {
if(res.code == 200 && res.data.length == 1) {
uni.navigateTo({
uni.redirectTo({
url: '/pages/home/index?routers=' + JSON.stringify(res.data[0])
})
}else{
uni.navigateTo({
uni.redirectTo({
url: '/pages/home/home'
})
}

@ -8,259 +8,169 @@
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">车站名称</view>
<picker mode="date" :value="form.railwayName" @change="bindDateChange">
<text class="picker_select"
:style="form.railwayName?'color:#333;':''">{{form.railwayName?form.railwayName:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</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">
<picker :value="railwayNameIndex" :range="stationList" @change="changeRailway">
<text class="picker_select"
:style="form.statDate?'color:#333;':''">{{form.statDate?form.statDate:'请选择时段'}}</text>
:style="form.railwayName?'color:#333;':''">{{form.railwayName?form.railwayName:'请选择'}}</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_label">统计日期</view>
<view class="form_item_input picker">
<picker :value="index" :range="array" range-key="dictLabel" @change="changeStatPeriod">
<picker mode="date" :value="form.statDate" @change="bindDateChange">
<text class="picker_select"
:style="index>-1?'color:#333;':''">{{index>-1?array[index].dictLabel:'请选择时段'}}</text>
: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 form_input">
<picker :value="isOpenIndex" :range="isOpenArry" range-key="label" @change="changeIsOpen">
<view class="form_item_label">统计时段</view>
<view class="form_item_input picker">
<picker :value="index" :range="array" range-key="dictLabel" @change="changeStatPeriod">
<text class="picker_select"
:style="isOpenIndex > -1?'color:#333;':''">{{form.isOpen == 1 ? '开放' : form.isOpen === 0 ? '关闭' : '请选择'}}</text>
: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">
<uni-easyinput v-model="form.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="form.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">
{{form.accidentCount}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">拥堵数量</view>
<view class="form_item_input form_input">
{{form.congestionCount}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">伤者人数</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="form.injuredCount" 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="form.deceasedCount" 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_li">
<view class="form_item" style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
拥堵信息-{{index+1}}
<uni-icons type="trash" color="red" @click="delRow" size="18"></uni-icons>
进青岛车次信息
</view>
<view class="form_item">
<view class="form_item_label">高速公路名称</view>
<view class="form_item_input picker">
<picker :value="item.highwayNameIndex" :range="highwayDataList" range-key="stdName" @change="e => changeHighway(e, 'highwayCongestionDetailDTOS', index)">
<text class="picker_select"
:style="item.highwayName?'color:#333;':''">{{item.highwayName ? item.highwayName : '请选择'}}</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">
<uni-datetime-picker v-model="item.congestionStartTime" :border="false">
<text class="picker_select"
:style="item.congestionStartTime?'color:#333;':''">{{item.congestionStartTime?item.congestionStartTime:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">拥堵处理结束时间</view>
<view class="form_item_input picker">
<uni-datetime-picker v-model="item.congestionEndTime" :border="false">
<text class="picker_select"
:style="item.congestionEndTime?'color:#333;':''">{{item.congestionEndTime?item.congestionEndTime:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">发生位置</view>
<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="请输入" maxlength="200"></uni-easyinput>
<uni-easyinput @blur="calcYoyMom" v-model="form.inboundRailwayDo" type="number" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="20"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">拥堵内容</view>
<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="请输入" maxlength="200"></uni-easyinput>
<uni-easyinput @blur="calcYoyMom" v-model="form.inboundPassengersDo" type="number" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="20"></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="请输入" maxlength="200"></uni-easyinput>
<!-- 同比环比 -->
<view class="form_item_rate" v-if="form.inRailwayYomDo || form.inRailwayMomDo" :class="form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label" :style="form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'color: #EB4747' : ''">终到车次环比(%)</view>
<view class="rate_item_input" :style="form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'color: #EB4747' : ''">
{{form.inRailwayYomDo ? form.inRailwayYomDo.toFixed(2) : ''}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">终到车次同比(%)</view>
<view class="rate_item_input">
{{form.inRailwayMomDo ? form.inRailwayMomDo.toFixed(2) : ''}}
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">截至当前拥堵空间范围(桩号及方向)</view>
<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="请输入" maxlength="200"></uni-easyinput>
<uni-easyinput @blur="calcYoyMom" v-model="form.inPepole" type="number" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="20"></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="请输入" maxlength="200"></uni-easyinput>
<!-- 同比环比 -->
<view class="form_item_rate" v-if="form.inPepoleYoyDo || form.inPepoleMomDo" :class="form.inPepole == yoyMom.yesterdayData.inPepole ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label" :style="form.inPepole == yoyMom.yesterdayData.inPepole ? 'color: #EB4747' : ''">人数环比(%)</view>
<view class="rate_item_input" :style="form.inPepole == yoyMom.yesterdayData.inPepole ? 'color: #EB4747' : ''">
{{form.inPepoleYoyDo ? form.inPepoleYoyDo.toFixed(2) : ''}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人数同比(%)</view>
<view class="rate_item_input">
{{form.inPepoleMomDo ? form.inPepoleMomDo.toFixed(2) : ''}}
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">补充说明</view>
<view class="form_item_label">备注</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.additionalNotes" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
<uni-easyinput v-model="form.inMark" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="200"></uni-easyinput>
</view>
</view>
<view class="line"></view>
</view>
<!-- 事故 -->
<view class="form_item_li" v-if="tabType == 2" v-for="(item,index) in form.highwayAccidentDetailDTOS" :key="index">
<view class="form_item" style="display:flex; justify-content: space-between;font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
事故信息-{{index+1}}
<uni-icons type="trash" color="red" @click="delRow" size="18"></uni-icons>
</view>
<view class="form_item">
<view class="form_item_label">高速公路名称</view>
<view class="form_item_input picker">
<picker :value="item.highwayNameIndex" :range="highwayDataList" range-key="stdName" @change="e => changeHighway(e, 'highwayCongestionDetailDTOS', index)">
<text class="picker_select"
:style="item.highwayName?'color:#333;':''">{{item.highwayName ? item.highwayName : '请选择'}}</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">
<uni-datetime-picker v-model="item.accidentStartTime" :border="false">
<text class="picker_select"
:style="item.accidentStartTime?'color:#333;':''">{{item.accidentStartTime?item.accidentStartTime:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故处理结束时间</view>
<view class="form_item_input picker">
<uni-datetime-picker v-model="item.accidentEndTime" :border="false">
<text class="picker_select"
:style="item.accidentEndTime?'color:#333;':''">{{item.accidentEndTime?item.accidentEndTime:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
<!-- 出青 -->
<view class="form_item_li">
<view class="form_item" style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
出青岛车次信息
</view>
<view class="form_item">
<view class="form_item_label">发生位置</view>
<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="请输入" maxlength="200"></uni-easyinput>
<uni-easyinput @blur="calcYoyMom" v-model="form.outboundRailwayDo" type="number" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="20"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故内容</view>
<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="请输入" maxlength="200"></uni-easyinput>
<uni-easyinput @blur="calcYoyMom" v-model="form.outboundPassengersDo" type="number" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="20"></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 class="form_item_rate" v-if="form.outRailwayYomDo || form.outRailwayMomDo" :class="form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label" :style="form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'color: #EB4747' : ''">始发车次环比(%)</view>
<view class="rate_item_input" :style="form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'color: #EB4747' : ''">
{{form.outRailwayYomDo ? form.outRailwayYomDo.toFixed(2) : ''}}
</view>
</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="请输入" maxlength="200"></uni-easyinput>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">始发车次同比(%)</view>
<view class="rate_item_input">
{{form.outRailwayMomDo ? form.outRailwayMomDo.toFixed(2) : ''}}
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">截至当前拥堵空间范围(桩号及方向)</view>
<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="请输入" maxlength="200"></uni-easyinput>
<uni-easyinput @blur="calcYoyMom" v-model="form.outPepole" type="number" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="20"></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="请输入" maxlength="200"></uni-easyinput>
<!-- 同比环比 -->
<view class="form_item_rate" v-if="form.outPepoleYoyDo || form.outPepoleMomDo" :class="form.outPepole == yoyMom.yesterdayData.outPeople ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label" :style="form.outPepole == yoyMom.yesterdayData.outPeople ? 'color: #EB4747' : ''">人数环比(%)</view>
<view class="rate_item_input" :style="form.outPepole == yoyMom.yesterdayData.outPeople ? 'color: #EB4747' : ''">
{{form.outPepoleYoyDo ? form.outPepoleYoyDo.toFixed(2) : ''}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人数同比(%)</view>
<view class="rate_item_input">
{{form.outPepoleMomDo ? form.outPepoleMomDo.toFixed(2) : ''}}
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">补充说明</view>
<view class="form_item_label">备注</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.additionalNotes" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
<uni-easyinput v-model="form.outMark" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="200"></uni-easyinput>
</view>
</view>
<view class="line"></view>
</view>
<view class="add_btn" @click="addRow()">增行</view>
</view>
<!-- 底部按钮 -->
@ -272,153 +182,115 @@
</template>
<script>
import {
getDateStr
getDateStr, checkNotEmpty
} 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": "",
"higwayNameIndex": "",
"highwayName": "",
"location": "",
}],
"highwayCongestionDetailDTOS": [{
"additionalNotes": "",
"congestionContent": "",
"congestionEndTime": "",
"congestionRange": "",
"congestionStartTime": "",
"disposalStatus": "",
"duration": "",
"higwayNameIndex": "",
"highwayName": "",
"location": "",
}],
"injuredCount": 0,
"isOpen": 1,
"organizationName": "",
"statDate": "",
"statPeriod": ""
"inMark" : "",
"inPepole" : 0,
"inPepoleMomDo" : 0.0,
"inPepoleYoyDo" : 0.0,
"inRailwayMomDo" : 0.0,
"inRailwayYomDo" : 0.0,
"inboundPassengersDo" : 0,
"inboundRailwayDo" : 0,
"isHoliday" : "",
"outMark" : "",
"outPepole" : 0,
"outPepoleMomDo" : 0.0,
"outPepoleYoyDo" : 0.0,
"outRailwayMomDo" : 0.0,
"outRailwayYomDo" : 0.0,
"outboundPassengersDo" : 0,
"outboundRailwayDo" : 0,
"railwayName" : "",
"statDate" : "",
"statPeriod" : ""
}, //form
highwayDataList: [], //
stationList: [], //
railwayNameIndex: '',
submitPerson: [], //
submitPersonIndex: -1, //
array: [], //
index: 2, //,0-24
isOpenArry: [{value:1,label:'开放'},{value:0,label:'关闭'}],//
isOpenIndex: 0,
userInfo: {},
tabType: 1, //
pageType: ''
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
this.queryHighway();//
this.queryStation();//
if (options.type == 'add') {
this.pageType = 'add';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
this.form.statPeriod = '03'; //0-24
} else if (options.item) {
this.form = JSON.parse(options.item);
this.form.highwayCongestionDetailDTOS = this.form.highwayCongestionDetailVOS;
this.form.highwayAccidentDetailDTOS = this.form.highwayAccidentDetailVOS;
console.log(this.form)
//11:00-13:30 0-12
let dateStr = getDateStr(now);
if(new Date(dateStr + ' 11:00').getTime() < new Date().getTime() < new Date(dateStr + ' 13:30').getTime()) {
}
this.queryYoyMom();//
} else if (options.id) {
this.$request(getApp().globalData.baseUrl+'/api/biz/railwayRunData/find/'+options.id,{},"GET").then(res => {
this.form = res.data;
this.queryYoyMom();
});
}
this.queryTime(); //
},
methods: {
//
queryHighway() {
this.highwayDataList = [{
"acctYear": 0,
"cdd": 0,
"createTime": "2016-06-12T16:47:50.992",
"createUnit": "4EB98423C0000041919F523B5D7A5CB1",
"createUserId": "AD049D34252E7C26A9B28DE393572C4B",
"creator": "青岛交通委员会管理员",
"dlwz": "",
"gldw": "青岛市高管处",
"glmc": "",
"gylc": 175.307,
"invalidTime": "9999-12-31T00:00:00",
"isLeaf": 1,
"jsdj": "540D47B620000001617BDD14C380A0D9",
"jsdw": "",
"jssj": "",
"jxscsd": 0,
"lddfmc": "",
"ldqdmc": "",
"ldqdzh": "",
"ldzdmc": "",
"ldzdzh": "",
"level": 1,
"ljlx": "",
"lkpddj": "",
"lmlx": "",
"lxqdmc": "",
"lxqdzh": "522.707",
"lxzdmc": "",
"lxzdzh": "698.014",
"memo": "",
"modifyTime": "2020-08-23T09:40:01.273",
"modifyUser": "admin",
"objectId": "5543CBB2C0000001F5F59149F1AF17CF",
"parents": "005543CBB2C0000001F5F59149F1AF17CF",
"recId": "5543CBB2C0000001F5F59149F1AF17CF",
"recVer": 8365710010537214000,
"resId": "5543CBB2C0000001F5F59149F1AF17CF",
"schemeId": "00000000000000000000000000000000",
"shareType": 0,
"shortName": "shgs",
"sjly": "",
"sjysnl": "",
"sortOrder": 21,
"ssdw": "",
"startFlag": 1,
"stdCode": "G15",
"stdIcon": "",
"stdName": "沈海高速",
"tcrq": null,
"unitId": "00000000000000000000000000000000",
"validTime": "1990-01-01T00:00:00",
"xxdx": "",
"xzdj": "540D4877C000000112D1F2C6DE6A1B49",
"xzqh": "",
"yhdw": "",
"zyds": 0
}]
// this.$request(getApp().globalData.baseUrl + '/api/biz/roadInfo/all?page=0&pageSize=-1&_t=' + Date.parse(new Date()), {}, 'GET').then(res => {
// this.highwayDataList = res.data.list;
// })
//
queryYoyMom() {
if(this.form.statDate == '' || this.form.statPeriod == ''){
return;
}
// let _date = getDateStr(new Date(this.form.statDate), -1);
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/getYoYMoM?statDate='+this.form.statDate+'&statPeriod='+this.form.statPeriod+'&_t=' + Date.parse(new Date()), {} , 'GET').then(res => {
this.yoyMom = res.data;
})
},
//
changeHighway(e, key, index) {
this.form[key][index].highwayNameIndex = e.detail.value;
this.form[key][index].highwayName = this.highwayDataList[e.detail.value].stdName;
console.log(this.form)
//
calcYoyMom() {
console.log('同比环比计算')
if(this.yoyMom.yesterdayData) {
//
this.form.inRailwayYomDo = this.yoyMom.yesterdayData.inboundRailwayDo && this.form.inboundRailwayDo ? (parseInt(this.form.inboundRailwayDo) - this.yoyMom.yesterdayData.inboundRailwayDo) / this.yoyMom.yesterdayData.inboundRailwayDo * 100 : '';
this.form.inPepoleYoyDo = this.yoyMom.yesterdayData.inPepole && this.form.inPepole ? (parseInt(this.form.inPepole) - this.yoyMom.yesterdayData.inPepole) / this.yoyMom.yesterdayData.inPepole * 100 : '';
this.form.outRailwayYomDo = this.yoyMom.yesterdayData.outboundRailwayDo && this.form.outboundRailwayDo ? (parseInt(this.form.outboundRailwayDo) - this.yoyMom.yesterdayData.outboundRailwayDo) / this.yoyMom.yesterdayData.outboundRailwayDo * 100 : '';
this.form.outPepoleYoyDo = this.yoyMom.yesterdayData.outPepole && this.form.outPepole ? (parseInt(this.form.outPepole) - this.yoyMom.yesterdayData.outPepole) / this.yoyMom.yesterdayData.outPepole * 100 : '';
}
if(this.yoyMom.lastYearData) {
//
this.form.inRailwayMomDo = this.yoyMom.lastYearData.inboundRailwayDo && this.form.inboundRailwayDo ? (parseInt(this.form.inboundRailwayDo) - this.yoyMom.lastYearData.inboundRailwayDo) / this.yoyMom.lastYearData.inboundRailwayDo * 100 : '';
this.form.inPepoleMomDo = this.yoyMom.lastYearData.inPepole && this.form.inPepole ? (parseInt(this.form.inPepole) - this.yoyMom.lastYearData.inPepole) / this.yoyMom.lastYearData.inPepole * 100 : '';
this.form.outRailwayMomDo = this.yoyMom.lastYearData.outboundRailwayDo && this.form.outboundRailwayDo ? (parseInt(this.form.outboundRailwayDo) - this.yoyMom.lastYearData.outboundRailwayDo) / this.yoyMom.lastYearData.outboundRailwayDo * 100 : '';
this.form.outPepoleMomDo = this.yoyMom.lastYearData.outPepole && this.form.outPepole ? (parseInt(this.form.outPepole) - this.yoyMom.lastYearData.outPepole) / this.yoyMom.lastYearData.outPepole * 100 : '';
}
},
//
queryStation() {
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/getCurrentSite?_t=' + Date.parse(new Date()), {}, 'GET').then(res => {
this.stationList = res.data;
if(this.pageType == 'add') {
this.form.railwayName = res.data[0];
this.railwayNameIndex = 0;
}
})
},
//
changeRailway(e) {
this.railwayNameIndex = e.detail.value;
this.form.railwayName = this.stationList[e.detail.value];
},
//
changeStatPeriod(e) {
this.index = e.detail.value;
this.form.statPeriod = this.array[e.detail.value].dictValue;
console.log('change 时段', this.form)
},
//
changeIsOpen(e) {
this.isOpenIndex = e.detail.value;
this.form.isOpen = this.isOpenArry[e.detail.value].value;
console.log('change 时段', this.form);
this.queryYoyMom();
},
//
doCancel() {
@ -427,6 +299,7 @@
//
bindDateChange(e) {
this.form.statDate = e.detail.value;
this.queryYoyMom();
},
//
queryTime() {
@ -435,79 +308,46 @@
this.array = res.data;
})
},
//
addRow() {
if(this.tabType == 1) {
//
this.form.highwayCongestionDetailDTOS.push({
"additionalNotes": "",
"congestionContent": "",
"congestionEndTime": "",
"congestionRange": "",
"congestionStartTime": "",
"disposalStatus": "",
"duration": "",
"highwayNameIndex": "",
"highwayName": "",
"location": "",
});
this.form.congestionCount = this.form.highwayCongestionDetailDTOS.length;
}else{
//
this.form.highwayAccidentDetailDTOS.push({
"accidentContent": "",
"accidentEndTime": "",
"accidentLevel": "",
"accidentStartTime": "",
"additionalNotes": "",
"congestionRange": "",
"disposalStatus": "",
"duration": "",
"highwayNameIndex": "",
"highwayName": "",
"location": "",
});
this.form.accidentCount = this.form.highwayCongestionDetailDTOS.length;
}
},
//
delRow(index) {
if(this.tabType == 1) {
//
this.form.highwayCongestionDetailDTOS.splice(index,1);
this.form.congestionCount = this.form.highwayCongestionDetailDTOS.length;
}else{
//
this.form.highwayAccidentDetailDTOS.splice(index,1);
this.form.accidentCount = this.form.highwayCongestionDetailDTOS.length;
}
},
//
doSubmit() {
console.log(this.form)
if (this.form.statDate == '' || this.form.statPeriod == '') {
if (!checkNotEmpty(this.form.railwayName)) {
uni.showToast({
title: '车站名称不能为空',
icon: 'none'
})
return;
}
if (!checkNotEmpty(this.form.statDate) || !checkNotEmpty(this.form.statPeriod)) {
uni.showToast({
title: '报送日期和时段不能为空',
icon: 'none'
})
return;
}
let checkCongestion = this.form.highwayCongestionDetailDTOS.every(item => {
return !item.highwayName || !item.congestionStartTime || !item.congestionEndTime || !item.duration || !item.location
})
let checkAccident = this.form.highwayAccidentDetailDTOS.every(item => {
return !item.highwayName || !item.accidentStartTime || !item.accidentEndTime || !item.duration || !item.location
})
if (this.form.highwayCongestionDetailDTOS.length > 0 && checkCongestion) {
if (!checkNotEmpty(this.form.inboundRailwayDo) || !checkNotEmpty(this.form.inboundPassengersDo) || !checkNotEmpty(this.form.inPepole)) {
uni.showToast({
title: '入青终到车次、过站车次、人数不能为空',
icon: 'none'
})
return;
}
if (!checkNotEmpty(this.form.outboundRailwayDo) || !checkNotEmpty(this.form.outboundPassengersDo) || !checkNotEmpty(this.form.outPepole)) {
uni.showToast({
title: '出青终到车次、过站车次、人数不能为空',
icon: 'none'
})
return;
}
if (this.form.inPepole == this.yoyMom.yesterdayData.inPepole && this.form.inMark) {
uni.showToast({
title: '拥堵信息详情不能为空',
title: '入青备注不能为空',
icon: 'none'
})
return;
}
if (this.form.highwayAccidentDetailDTOS.length > 0 && checkAccident) {
if (this.form.outPepole == this.yoyMom.yesterdayData.outPepole && this.form.outRemark) {
uni.showToast({
title: '事故信息详情不能为空',
title: '出青备注不能为空',
icon: 'none'
})
return;
@ -527,7 +367,7 @@
title: '提交中...',
mask: true
})
this.$request(getApp().globalData.baseUrl + '/api/biz/highSpeedOperationController/saveOrUpdate', this.form,
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/saveOrUpdate', this.form,
'POST').then(res => {
uni.hideLoading();
if (res.code == 200) {

@ -0,0 +1,479 @@
<template>
<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.railwayName}}</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.inboundRailwayDo === 0 ? item.inboundRailwayDo : item.inboundRailwayDo || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">过路车次(不含终到)-入青</view>
<view class="list_item_cnt">{{item.inboundPassengersDo === 0 ? item.inboundPassengersDo : item.inboundPassengersDo || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">人数()-入青</view>
<view class="list_item_cnt">{{item.inPepole === 0 ? item.inPepole : item.inPepole || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">始发车次()-出青</view>
<view class="list_item_cnt">{{item.outboundRailwayDo === 0 ? item.outboundRailwayDo : item.outboundRailwayDo || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">过路车次(不含始发)-出青</view>
<view class="list_item_cnt">{{item.outboundPassengersDo === 0 ? item.outboundPassengersDo : item.outboundPassengersDo || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">人数()-出青</view>
<view class="list_item_cnt">{{item.outPepole === 0 ? item.outPepole : item.outPepole || ''}}</view>
</view>
</view>
<!-- 按钮 -->
<view class="act_btn_box">
<view class="act_btn blue" @click="goPage('/pages/railway/railwayRunData/form', item)">编辑</view>
<view class="act_btn" style="margin-right: 30rpx;" @click="goPage('/pages/railway/railwayRunData/detail', item)">
查看详情</view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>
<!-- 筛选 -->
<view class="foot_btn_box">
<!-- <view @click="goPage('/pages/railway/railwayRunData/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>
export default {
data() {
return {
data: [],
current: 0,
size: 10,
hasMore: true,
status: '',
query: {
statDateStart: '',
statDateEnd: '',
statPeriod: ''
},
contentText: {
contentdown: "点击查看更多",
contentrefresh: "正在加载...",
contentnomore: "没有更多数据了",
},
timeRange: [], //
array: [], //
index: '', //
}
},
onLoad() {
this.queryTime();
this.loadMore();
},
onUnload() {
this.hasMore = true;
this.data = [];
},
onPullDownRefresh() {
console.log('onPullDownRefresh');
this.data = [];
this.current = 0;
this.hasMore = true;
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;
this.status = 'loading';
let params = '';
Object.keys(this.query).map(key => {
params = params + '&' + key + '=' + this.query[key]
})
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/list?page=' + this.current +
'&pageSize=' + this.size + '&_t=' + Date.parse(new Date()) + params, {}, 'GET').then(res => {
if (res.code == 200) {
this.data = this.data.concat(res.data.list);
if (res.data.list.length == 0 || res.data.totalCount < this.size) {
this.hasMore = false;
this.status = 'nomore';
} else {
this.status = 'more';
}
uni.stopPullDownRefresh();
} else {
this.status = 'more';
uni.stopPullDownRefresh();
}
}).catch(() => {
this.status = 'more';
uni.stopPullDownRefresh();
})
}
},
//
goPage(url, param) {
if (param) {
uni.navigateTo({
url: url + '?item=' + JSON.stringify(param)
})
} else {
uni.navigateTo({
url: url
})
}
},
}
}
</script>
<style lang="scss" scoped>
.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: 320rpx;
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;
background-color: #F8F8F8;
padding: 20px 30rpx;
.act_btn {
width: 690rpx;
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;
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,44 +1,10 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/railway/railwayRunData/form?id='+item.id)">
<view class="list_top">
<view class="unit_tags">管理单位</view>
<view class="unit_name">{{item.railwayName}}</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.inboundRailwayDo === 0 ? item.inboundRailwayDo : item.inboundRailwayDo || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">过路车次(不含终到)-入青</view>
<view class="list_item_cnt">{{item.inboundPassengersDo === 0 ? item.inboundPassengersDo : item.inboundPassengersDo || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">人数()-入青</view>
<view class="list_item_cnt">{{item.inPepole === 0 ? item.inPepole : item.inPepole || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">始发车次()-出青</view>
<view class="list_item_cnt">{{item.outboundRailwayDo === 0 ? item.outboundRailwayDo : item.outboundRailwayDo || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">过路车次(不含始发)-出青</view>
<view class="list_item_cnt">{{item.outboundPassengersDo === 0 ? item.outboundPassengersDo : item.outboundPassengersDo || ''}}</view>
</view>
<view class="list_item">
<view class="list_item_label">人数()-出青</view>
<view class="list_item_cnt">{{item.outPepole === 0 ? item.outPepole : item.outPepole || ''}}</view>
</view>
</view>
<!-- 按钮 -->
<view class="act_btn_box">
<view class="act_btn blue" @click="goPage('/pages/railway/railwayRunData/form', item)">编辑</view>
<view class="act_btn" style="margin-right: 30rpx;" @click="goPage('/pages/railway/railwayRunData/detail', item)">
查看详情</view>
<view class="unit_tags">报送时间</view>
<view>{{item.statDate || ''}}<text
style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text></view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
@ -226,7 +192,6 @@
.list_top {
display: flex;
margin-bottom: 30rpx;
.unit_tags {
height: 37rpx;
@ -239,6 +204,7 @@
border-radius: 10rpx;
border: 1rpx solid #EF9A4F;
padding: 0 11rpx;
margin-right: 16rpx;
}
.unit_name {

@ -0,0 +1,513 @@
<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 picker">
<picker :value="railwayNameIndex" :range="stationList" @change="changeRailway">
<text class="picker_select"
:style="form.carName?'color:#333;':''">{{form.carName?form.carName:'请选择'}}</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 mode="date" :value="form.statDate" @change="bindDateChange">
<text class="picker_select"
: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" @change="changeStatPeriod">
<text class="picker_select"
: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="form_item_box" style="margin-top: 30rpx;">
<!-- 运行情况 -->
<view class="form-item">
运行情况详情包含内容始发终到延误时长客流挤压情况延误原因相关处置措施备注
</view>
<view class="form_item_li" v-for="(item,index) in form.listCondition" :key="index">
<view class="form_item_remark">
<view class="form_item"
style="display:flex; justify-content: space-between;font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
序号-{{index+1}}
<uni-icons type="trash" color="red" @click="delRow(index)" size="18"></uni-icons>
</view>
<view class="form_item_input form_input">
<uni-easyinput type="textarea" v-model="item.dataDetails"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="200">
</uni-easyinput>
</view>
<view class="line" style="margin-top: 30rpx;"></view>
</view>
</view>
<view class="add_btn" @click="addRow()">增行</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,
checkNotEmpty
} from "../../../common/util.js"
export default {
data() {
return {
form: {
"listCondition": [{
"dataDetails": ""
}],
"carName": "",
"statDate": "",
"statPeriod": ""
}, //form
stationList: [], //
railwayNameIndex: '',
array: [], //
index: 2, //,0-24
userInfo: {},
pageType: ''
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
this.queryStation(); //
if (options.type == 'add') {
this.pageType = 'add';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
this.form.statPeriod = '03'; //0-24
} else if (options.item) {
this.form = JSON.parse(options.item);
console.log(this.form);
}else if (options.id) {
this.$request(getApp().globalData.baseUrl+'/api/biz/railwayRunSituation/find//'+options.id,{},"GET").then(res => {
this.form = res.data;
this.queryYoyMom();
});
}
this.queryTime(); //
},
methods: {
//
addRow() {
this.form.listCondition.push({
dataDetails: ""
});
},
//
delRow(index) {
this.form.listCondition.splice(index, 1);
},
//
queryStation() {
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/getCurrentSite?_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.stationList = res.data;
if (this.pageType == 'add') {
this.form.carName = res.data[0];
this.railwayNameIndex = 0;
}
})
},
//
changeRailway(e) {
this.railwayNameIndex = e.detail.value;
this.form.railwayName = this.stationList[e.detail.value];
},
//
changeStatPeriod(e) {
this.index = e.detail.value;
this.form.statPeriod = this.array[e.detail.value].dictValue;
console.log('change 时段', this.form);
},
//
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() {
if (!checkNotEmpty(this.form.carName)) {
uni.showToast({
title: '车站名称不能为空',
icon: 'none'
})
return;
}
if (!checkNotEmpty(this.form.statDate) || !checkNotEmpty(this.form.statPeriod)) {
uni.showToast({
title: '报送日期和时段不能为空',
icon: 'none'
})
return;
}
let checkList = true;
if (this.form.listCondition.length > 0) {
checkList = this.form.listCondition.every(item => {
return typeof(item.dataDetails) !== 'undefined' && item.dataDetails !== null && item.dataDetails !== '';
})
}
console.log(checkList,this.form)
if (!checkList) {
uni.showToast({
title: '运行情况不能为空',
icon: 'none'
})
return;
}
this.form.listCondition.map((item,index) => {
item.seq = index;
})
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',
success: (res) => {
if (res.confirm) {
this.submitForm();
}
}
})
},
submitForm() {
uni.showLoading({
title: '提交中...',
mask: true
})
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunSituation/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 {
flex: 1;
display: flex;
justify-content: space-between;
/deep/ picker {
flex: 1;
}
.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 !important;
text-align: right;
}
}
/deep/ .uni-date-x--border {
border: 0 !important;
.uni-date__x-input {
// height: 35rpx !important;
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: 11;
.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;
margin-top: 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;
}
}
}
}
button {
background-color: #007aff;
color: #ffffff;
}
</style>

@ -0,0 +1,447 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/railway/runStatus/form', item)">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view>{{item.statDate || ''}}<text
style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text></view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>
<!-- 筛选 -->
<view class="foot_btn_box">
<!-- <view @click="goPage('/pages/railway/runStatus/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>
export default {
data() {
return {
data: [],
current: 0,
size: 10,
hasMore: true,
status: '',
query: {
statDateStart: '',
statDateEnd: '',
statPeriod: ''
},
contentText: {
contentdown: "点击查看更多",
contentrefresh: "正在加载...",
contentnomore: "没有更多数据了",
},
timeRange: [], //
array: [], //
index: '', //
}
},
onLoad() {
this.queryTime();
this.loadMore();
},
onUnload() {
this.hasMore = true;
this.data = [];
},
onPullDownRefresh() {
console.log('onPullDownRefresh');
this.data = [];
this.current = 0;
this.hasMore = true;
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;
this.status = 'loading';
let params = '';
Object.keys(this.query).map(key => {
params = params + '&' + key + '=' + this.query[key]
})
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunSituation/list?page=' + this.current +
'&pageSize=' + this.size + '&_t=' + Date.parse(new Date()) + params, {}, 'GET').then(res => {
if (res.code == 200) {
this.data = this.data.concat(res.data.list);
if (res.data.list.length == 0 || res.data.totalCount < this.size) {
this.hasMore = false;
this.status = 'nomore';
} else {
this.status = 'more';
}
uni.stopPullDownRefresh();
} else {
this.status = 'more';
uni.stopPullDownRefresh();
}
}).catch(() => {
this.status = 'more';
uni.stopPullDownRefresh();
})
}
},
//
goPage(url, param) {
if (param) {
uni.navigateTo({
url: url + '?item=' + JSON.stringify(param)
})
} else {
uni.navigateTo({
url: url
})
}
},
}
}
</script>
<style lang="scss" scoped>
.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;
.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;
margin-right: 16rpx;
}
.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: 320rpx;
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: 20rpx 30rpx;
.act_btn {
width: 690rpx;
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;
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>

BIN
static/.DS_Store vendored

Binary file not shown.
Loading…
Cancel
Save