道路运输数据改版联调

dev201310
zhangqun 2 years ago
parent 72e1addf37
commit ce402ac693
  1. 4
      pages.json
  2. 383
      pages/roadTransport/transportData/detail-copy.vue
  3. 22
      pages/roadTransport/transportData/form.vue
  4. 22
      pages/roadTransport/transportData/list.vue

@ -164,14 +164,14 @@
{
"path": "pages/roadTransport/transportData/list",
"style": {
"navigationBarTitleText": "道路运输",
"navigationBarTitleText": "道路运输数据",
"enablePullDownRefresh": true
}
},
{
"path": "pages/roadTransport/transportData/form",
"style": {
"navigationBarTitleText": "道路运输编辑"
"navigationBarTitleText": "道路运输数据报送"
}
},
{

@ -1,383 +0,0 @@
<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.reportingUnitId}}</view>
</view>
<view class="unit_time">{{roadData.statisticalDate || ''}} {{roadData.reportPhaseValue}}</view>
</view>
<view class="all_item first">
<view class="all_left">负责人</view>
<view class="all_right">{{roadData.responsiblePersonId || ''}}</view>
</view>
<view class="all_item">
<view class="all_left">除定线农民工包车辆</view>
<view class="all_right" >{{roadData.otherCharter == 0 ? 0 : roadData.otherCharter || ''}}</view>
</view>
<view class="all_item">
<view class="all_left">投放运力包车数</view>
<view class="all_right" >{{roadData.capacityCharter == 0 ? 0 : roadData.capacityCharter || ''}}</view>
</view>
<view class="all_item">
<view class="all_left">收费站出口车辆数汇总环比</view>
<view class="all_right" :class="roadData.exitVehicleCountMom > 0 ? 'green' : roadData.exitVehicleCountMom < 0 ? 'red' : ''">{{roadData.exitVehicleCountMom ? roadData.exitVehicleCountMom + '%' : roadData.exitVehicleCountMom == 0 ? 0 : ''}}</view>
</view>
<view class="all_item">
<view class="all_left">收费站入口车辆数汇总同比</view>
<view class="all_right" :class="roadData.entranceVehicleCountYoy > 0 ? 'green' : roadData.entranceVehicleCountYoy < 0 ? 'red' : ''">{{roadData.entranceVehicleCountYoy ? roadData.entranceVehicleCountYoy + '%' : roadData.entranceVehicleCountYoy == 0 ? 0 : ''}}</view>
</view>
<view class="all_item last">
<view class="all_left">收费站出口车辆数汇总同比</view>
<view class="all_right" :class="roadData.exitVehicleCountYoy > 0 ? 'green' : roadData.exitVehicleCountYoy < 0 ? 'red' : ''">{{roadData.exitVehicleCountYoy ? roadData.exitVehicleCountYoy + '%' : roadData.exitVehicleCountYoy == 0 ? 0 : ''}}</view>
</view>
<view class="con_item" v-if="roadData.highwaySubDataList" v-for="(item,index) in roadData.highwaySubDataList" :key="index">
<view class="spread_box" v-if="item.isSpread">
<view class="item_con first">
<view class="left">收费站名称</view>
<view class="right">{{item.tollStationName}}</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.entranceVehicleCount}}</view>
</view>
<view class="item_content">
<view class="content top">
<view class="left">收费站入口车辆数环比(%)</view>
<view class="right" :class="item.entranceVehicleCountMom > 0 ? 'green' : item.entranceVehicleCountMom < 0 ? 'red' : ''">{{item.entranceVehicleCountMom ? item.entranceVehicleCountMom + '%' : item.entranceVehicleCountMom == 0 ? 0 : ''}}</view>
</view>
<view class="content">
<view class="left">收费站入口车辆数同比(%)</view>
<view class="right" :class="item.entranceVehicleCountYoy > 0 ? 'green' : item.entranceVehicleCountYoy < 0 ? 'red' : ''">{{item.entranceVehicleCountYoy ? item.entranceVehicleCountYoy + '%' : item.entranceVehicleCountYoy == 0 ? 0 : ''}}</view>
</view>
</view>
<view class="item_con">
<view class="left">收费站出口车辆数</view>
<view class="right">{{item.exitVehicleCount}}</view>
</view>
<view class="item_content">
<view class="content top">
<view class="left">收费站出口车辆数环比(%)</view>
<view class="right" :class="item.exitVehicleCountMom > 0 ? 'green' : item.exitVehicleCountMom < 0 ? 'red' : ''">{{item.exitVehicleCountMom ? item.exitVehicleCountMom + '%' : item.exitVehicleCountMom == 0 ? 0 : ''}}</view>
</view>
<view class="content">
<view class="left">收费站出口车辆数同比(%)</view>
<view class="right" :class="item.exitVehicleCountYoy > 0 ? 'green' : item.exitVehicleCountYoy < 0 ? 'red' : ''">{{item.exitVehicleCountYoy ? item.exitVehicleCountYoy + '%' : item.exitVehicleCountYoy == 0 ? 0 : ''}}</view>
</view>
</view>
<view class="item_con">
<view class="left">免收通行费车辆数</view>
<view class="right">{{item.tollExemptVehicleCount}}</view>
</view>
<view class="item_content">
<view class="content top">
<view class="left">免收通行费车辆数环比(%)</view>
<view class="right" :class="item.tollExemptVehicleCountMom > 0 ? 'green' : item.tollExemptVehicleCountMom < 0 ? 'red' : ''">{{item.tollExemptVehicleCountMom ? item.tollExemptVehicleCountMom + '%' : item.tollExemptVehicleCountMom == 0 ? 0 : ''}}</view>
</view>
<view class="content">
<view class="left">免收通行费车辆数同比(%)</view>
<view class="right" :class="item.tollExemptVehicleCountYoy > 0 ? 'green' : item.tollExemptVehicleCountYoy < 0 ? 'red' : ''">{{item.tollExemptVehicleCountYoy ? item.tollExemptVehicleCountYoy + '%' : item.tollExemptVehicleCountYoy == 0 ? 0 : ''}}</view>
</view>
</view>
<view class="item_con">
<view class="left">免收通行费金额</view>
<view class="right">{{item.tollExemptAmount}}</view>
</view>
<view class="item_con">
<view class="left">出口通行费</view>
<view class="right">{{item.exitToll}}</view>
</view>
<view class="item_con">
<view class="left">报送人员及联系方式</view>
<view class="right">{{item.submitPersonnelContact}}</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">收费站名称</view>
<view class="right">{{item.tollStationName}}</view>
</view>
</view>
</view>
</view>
<view class="bottom_box">
<p class="edit_btn">编辑</p>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
roadData:{},
}
},
onLoad(options){
let item = JSON.parse(options.item)
console.log(item)
// let item1 = JSON.parse(JSON.stringify(item))
// if(item1.highwaySubDataList.length != 0){
// item1.highwaySubDataList[0].isSpread = true; //falsetrue
// }
this.roadData = item
// this.getDetail()
},
methods: {
//
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{
width: 690rpx;
background: #fff;
border-radius: 30rpx;
margin: 0 auto;
margin-top: 30rpx;
margin-bottom: 50rpx;
.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{
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;
}
}
}
}
</style>

@ -38,7 +38,7 @@
<view class="right">
<picker @change="bindPickerChange" :value="index" :range="roadTime" range-key="dictLabel">
<view class="right_txt_box">
<p class="right_txt">{{timeName ? timeName : '请选择统计时段'}}</p>
<p class="right_txt" :style="timeName?'color:#333;':'color:#D4D4D4;'">{{timeName ? timeName : '请选择'}}</p>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</view>
@ -501,13 +501,12 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
if(options.type == 'edit'){
const item = JSON.parse(options.item);
this.pageType = 'edit'
this.getDetail(item.id);
this.getDetail(item.reportPhase, item.reportUnit, item.statisticalDate);
}else if(options.type == 'add'){
this.pageType = 'add';
this.getDept()
let now = new Date();
this.roadData.statisticalDate = getDateStr(now, -1);//
this.getDept();
}
},
@ -590,7 +589,7 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
// this.$request(getApp().globalData.baseUrl + '/api/user/getByDeptId/' + this.unitId,{},"GET").then(res =>{
console.log('人员列表 ===>',res)
res.data.list.map(item =>{
this.peopleList.push({id:item.id,people:item.username + (item.mobile ? ',' + item.mobile : '')})
this.peopleList.push({id:item.id,people:(item.nickname ? item.nickname : item.username) + (item.mobile ? ',' + item.mobile : '')})
})
if(this.pageType == 'edit'){
console.log('deptNameList ===>',this.peopleList)
@ -628,8 +627,8 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
}
})
},
getDetail(id){
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/find/' + id,{},"GET").then(res =>{
getDetail(reportPhase,reportUnit,statisticalDate){
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/getDataByTime?reportPhase=' + reportPhase + '&reportUnit=' + reportUnit + '&statisticalDate=' + statisticalDate,{},"GET").then(res =>{
this.roadData = res.data;
this.getRoadTime();
this.getDept();
@ -712,7 +711,7 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
}else{
uni.showModal({
title:"提示",
content:params.id == undefined ? "您确认提交该条报送数据?" : "您确认将该条数据进行修改?",
content: !checkNotEmpty(params.id) ? "您确认提交该条报送数据?" : "您确认将该条数据进行修改?",
success:(res) =>{
if(res.confirm){
params.isPassengerCountConvert = 0;
@ -781,6 +780,13 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
this.index = this.roadTime.findIndex(item => item.dictValue == "03")
this.timeName = this.roadTime.find(item => item.dictValue == "03").dictLabel
}
// -
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/getDetail?reportPhase=' + this.roadData.reportPhase + '&reportUnit=' + this.roadData.reportingUnitId + '&statisticalDate=' + this.roadData.statisticalDate,{},"GET").then(res =>{
res.data.reportPhase = this.roadData.reportPhase;
res.data.reportingUnitId = this.roadData.reportingUnitId;
res.data.statisticalDate = this.roadData.statisticalDate;
this.roadData = res.data;
})
this.getRatio()
}

@ -6,15 +6,14 @@
<view class="list_item" v-for="(item,index) in listData" :key="index">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view class="unit_name">{{item.statisticalDate || ''}}<text style="margin-left:16rpx;">{{item.reportPhaseValue || ''}}</text></view>
<view class="unit_name">{{item.statisticalDate || ''}}<text style="margin-left:16rpx;">{{renderTime(item.reportPhase)}}</text></view>
<view class="unit_arrow">
<uni-icons @click="showDetail(index,false)" v-if="item.show" type="bottom" size="16" color="#666666"></uni-icons>
<uni-icons @click="showDetail(index,true)" v-else type="right" size="16" color="#666666"></uni-icons>
</view>
</view>
<view class="list_cnt" v-if="item.show">
<view class="list_cnt_item" @click="editItem(item)">{{item.reportingUnitId}}</view>
<view class="list_cnt_item" @click="editItem(item)">{{item.reportingUnitId}}</view>
<view v-for="(item2,index2) in item.reportingUnitList" :key="index2" class="list_cnt_item" @click="editItem(item,item2)">{{item2}}</view>
</view>
</view>
</view>
@ -135,6 +134,11 @@
this.timeArray = res.data;
})
},
//
renderTime(reportPhase) {
let idx = this.timeArray.findIndex(item => item.dictValue == reportPhase);
return idx > -1 ? this.timeArray[idx].dictLabel : '';
},
//
handleSearch(){
this.$refs.popup.open('bottom')
@ -202,7 +206,7 @@
...this.query,
}
console.log('params ===>',params)
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/list',params,"GET").then(res =>{
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/getTimeList',params,"GET").then(res =>{
console.log(res)
if(res.code == 200){
res.data.list.map(item =>{
@ -252,11 +256,15 @@
})
},
//
editItem(row){
console.log(row)
editItem(row,reportUnit){
let param = {
statisticalDate: row.statisticalDate,
reportUnit: reportUnit,
reportPhase: row.reportPhase
}
uni.navigateTo({
// url:'pages/roadTransport/transportData/detail?item=' + JSON.stringify(row)
url:"/pages/roadTransport/transportData/form?item=" + JSON.stringify(row) + '&type=edit'
url:"/pages/roadTransport/transportData/form?item=" + JSON.stringify(param) + '&type=edit'
})
},
//

Loading…
Cancel
Save