优化登录逻辑;高速运行数据同比环比计算;高速详情更换为接口查询

main
张群 2 years ago
parent 2402e62426
commit 5d83cc00df
  1. 149
      pages/highWay/runData/form.vue
  2. 2
      pages/highWay/runData/list.vue
  3. 98
      pages/highWay/runStatusData/form.vue
  4. 2
      pages/highWay/runStatusData/list.vue
  5. 10
      pages/login/login.vue
  6. 1
      pages/railway/railwayRunData/form.vue
  7. 2
      util/request.js

@ -39,18 +39,18 @@
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate" v-if="form.entranceVehicleCountMom || form.entranceVehicleCountYoy" :class="form.entranceVehicleCountMom === 0 ? 'danger' : ''">
<view class="form_item_rate" v-if="form.entranceVehicleCountMom || form.entranceVehicleCountYoy" :class="form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label" :style="form.entranceVehicleCountMom === 0 ?'color: #EB4747':''">收费站入口车辆数汇总环比(%)</view>
<view class="rate_item_input" :style="form.entranceVehicleCountMom === 0 ?'color: #EB4747':''">
{{form.entranceVehicleCountMom}}
<view class="rate_item_label" :style="form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">收费站入口车辆数汇总环比(%)</view>
<view class="rate_item_input" :style="form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
{{form.entranceVehicleCountMom === 0 ? form.entranceVehicleCountMom : form.entranceVehicleCountMom ? form.entranceVehicleCountMom.toFixed(2) : ''}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">收费站入口车辆数汇总同比(%)</view>
<view class="rate_item_input">
{{form.entranceVehicleCountYoy}}
{{form.entranceVehicleCountYoy === 0 ? form.entranceVehicleCountYoy : form.entranceVehicleCountYoy ? form.entranceVehicleCountYoy.toFixed(2) : ''}}
</view>
</view>
</view>
@ -61,18 +61,18 @@
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate" v-if="form.exitVehicleCountMom || form.exitVehicleCountYoy" :class="form.exitVehicleCountMom === 0 ? 'danger' : ''">
<view class="form_item_rate" v-if="form.exitVehicleCountMom || form.exitVehicleCountYoy" :class="form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label" :style="form.exitVehicleCountMom === 0 ?'color: #EB4747':''">收费站入口车辆数汇总环比(%)</view>
<view class="rate_item_input" :style="form.exitVehicleCountMom === 0 ?'color: #EB4747':''">
{{form.exitVehicleCountMom}}
<view class="rate_item_label" :style="form.exitVehicleCount == yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">收费站入口车辆数汇总环比(%)</view>
<view class="rate_item_input" :style="form.exitVehicleCount == yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
{{form.exitVehicleCountMom === 0 ? form.exitVehicleCountMom : form.exitVehicleCountMom ? form.exitVehicleCountMom.toFixed(2) : ''}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">收费站口车辆数汇总同比(%)</view>
<view class="rate_item_label">收费站口车辆数汇总同比(%)</view>
<view class="rate_item_input">
{{form.exitVehicleCountYoy}}
{{form.exitVehicleCountYoy === 0 ? form.exitVehicleCountYoy : form.exitVehicleCountYoy ? form.exitVehicleCountYoy.toFixed(2) : ''}}
</view>
</view>
</view>
@ -108,18 +108,18 @@
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate" v-if="form.highwaySubDataList[stationIndex].entranceVehicleCountMom || form.highwaySubDataList[stationIndex].entranceVehicleCountYoy" :class="form.highwaySubDataList[stationIndex].entranceVehicleCountMom === 0 ? 'danger' : '' ">
<view class="form_item_rate" v-if="form.highwaySubDataList[stationIndex].entranceVehicleCountMom || form.highwaySubDataList[stationIndex].entranceVehicleCountYoy" :class="form.highwaySubDataList[stationIndex].entranceVehicleCountMom == 0 ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label" :style="form.highwaySubDataList[stationIndex].entranceVehicleCountMom == 0 ? 'color: #EB4747' : ''">收费站入口车辆数环比(%)</view>
<view class="rate_item_input" :style="form.highwaySubDataList[stationIndex].entranceVehicleCountMom == 0 ? 'color: #EB4747' : ''">
{{form.highwaySubDataList[stationIndex].entranceVehicleCountMom}}
{{form.highwaySubDataList[stationIndex].entranceVehicleCountMom === 0 ? form.highwaySubDataList[stationIndex].entranceVehicleCountMom : form.highwaySubDataList[stationIndex].entranceVehicleCountMom ? form.highwaySubDataList[stationIndex].entranceVehicleCountMom.toFixed(2) : ''}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">收费站入口车辆数同比(%)</view>
<view class="rate_item_input">
{{form.highwaySubDataList[stationIndex].entranceVehicleCountYoy}}
{{form.highwaySubDataList[stationIndex].entranceVehicleCountYoy === 0 ? form.highwaySubDataList[stationIndex].entranceVehicleCountYoy : form.highwaySubDataList[stationIndex].entranceVehicleCountYoy ? form.highwaySubDataList[stationIndex].entranceVehicleCountYoy.toFixed(2) : ''}}
</view>
</view>
</view>
@ -130,18 +130,18 @@
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate" v-if="form.highwaySubDataList[stationIndex].exitVehicleCountMom || form.highwaySubDataList[stationIndex].exitVehicleCountYoy" :class="form.highwaySubDataList[stationIndex].exitVehicleCountMom === 0 ? 'danger' : '' ">
<view class="form_item_rate" v-if="form.highwaySubDataList[stationIndex].exitVehicleCountMom || form.highwaySubDataList[stationIndex].exitVehicleCountYoy" :class="form.highwaySubDataList[stationIndex].exitVehicleCountMom == 0 ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label" :style="form.highwaySubDataList[stationIndex].exitVehicleCountMom == 0 ? 'color: #EB4747' : ''">收费站出口车辆数环比(%)</view>
<view class="rate_item_input" :style="form.highwaySubDataList[stationIndex].exitVehicleCountMom == 0 ? 'color: #EB4747' : ''">
{{form.highwaySubDataList[stationIndex].exitVehicleCountMom}}
{{form.highwaySubDataList[stationIndex].exitVehicleCountMom === 0 ? form.highwaySubDataList[stationIndex].exitVehicleCountMom : form.highwaySubDataList[stationIndex].exitVehicleCountMom ? form.highwaySubDataList[stationIndex].exitVehicleCountMom.toFixed(2) : ''}}
</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}}
{{form.highwaySubDataList[stationIndex].exitVehicleCountYoy === 0 ? form.highwaySubDataList[stationIndex].exitVehicleCountYoy : form.highwaySubDataList[stationIndex].exitVehicleCountYoy ? form.highwaySubDataList[stationIndex].exitVehicleCountYoy.toFixed(2) : ''}}
</view>
</view>
</view>
@ -182,7 +182,7 @@
</view>
</template>
<script>
import { getDateStr } from "../../../common/util.js"
import { checkNotEmpty, getDateStr } from "../../../common/util.js"
export default {
data() {
return {
@ -221,16 +221,32 @@
console.log('edit', this.form)
this.queryYoYMom();
this.queryStation();
} else if(options.id) {
this.queryYoYMom();
this.queryStation();
this.queryDetailInfo(options.id);
}
this.queryTime();//
this.queryPerson();
},
methods: {
//id
queryDetailInfo(id) {
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/selectById/' + id, {}, 'GET').then(res => {
this.form = res.data;
})
},
//
queryYoYMom() {
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;
//
if(this.highwaySubDataList.length > 0 && this.form.highwaySubDataList.length > 0){
this.highwaySubDataList.map((item, index) => {
this.checkStationInfo(index);
})
}
})
}
},
@ -267,27 +283,40 @@
})
this.form.entranceVehicleCount = entranceVehicleCount;
this.form.exitVehicleCount = exitVehicleCount;
// this.form.entranceVehicleCountMom = this.form.entranceVehicleCount && this.yoyMom.queryData.entranceVehicleCount ? (this.form.entranceVehicleCount - this.yoyMom.queryData.entranceVehicleCount) / this.yoyMom.queryData.entranceVehicleCount * 100 : '';
// this.form.entranceVehicleCountYoy = this.form.entranceVehicleCount && this.yoyMom.lastYearData.entranceVehicleCount ? (this.form.entranceVehicleCount - this.yoyMom.lastYearData.entranceVehicleCount) / this.yoyMom.lastYearData.entranceVehicleCount * 100 : '';//
// this.form.exitVehicleCountMom = this.form.exitVehicleCount && this.yoyMom.queryData.exitVehicleCount ? (this.form.exitVehicleCount - this.yoyMom.queryData.exitVehicleCount) / this.yoyMom.queryData.exitVehicleCount * 100 : '';
// this.form.exitVehicleCountYoy = this.form.exitVehicleCount && this.yoyMom.lastYearData.exitVehicleCount ? (this.form.exitVehicleCount - this.yoyMom.lastYearData.exitVehicleCount) / this.yoyMom.lastYearData.exitVehicleCount * 100 : '';//
// //
// if(this.form.highwaySubDataList[index].entranceVehicleCount != ''){
// let idx = this.yoyMom.lastYearData.highwaySubDataList.findIndex(item => item.stationName == this.form.highwaySubDataList[index].stationName);
// let idx2 = this.yoyMom.queryData.highwaySubDataList.findIndex(item => item.stationName == this.form.highwaySubDataList[index].stationName);
// if(idx > -1){
// //
// let obj = this.yoyMom.queryData.highwaySubDataList[idx];
// this.form.highwaySubDataList[index].entranceVehicleCountMom = obj.entranceVehicleCount ? (this.form.highwaySubDataList[index].entranceVehicleCount - obj.entranceVehicleCount) / obj.entranceVehicleCount * 100 : '';
// this.form.highwaySubDataList[index].exitVehicleCountMom = obj.exitVehicleCount ? (this.form.highwaySubDataList[index].exitVehicleCount - obj.exitVehicleCount) / obj.exitVehicleCount * 100 : '';
// }
// if(idx2 > -1){
// //
// let obj = this.yoyMom.lastYearData.highwaySubDataList[idx];
// this.form.highwaySubDataList[index].entranceVehicleCountYoy = obj.entranceVehicleCount ? (this.form.highwaySubDataList[index].entranceVehicleCount - obj.entranceVehicleCount) / obj.entranceVehicleCount * 100 : '';
// this.form.highwaySubDataList[index].exitVehicleCountYoy = obj.exitVehicleCount ? (this.form.highwaySubDataList[index].exitVehicleCount - obj.exitVehicleCount) / obj.exitVehicleCount * 100 : '';
// }
// }
//
this.form.entranceVehicleCountMom = this.form.entranceVehicleCount && this.yoyMom.minusDaysEntranceVehicleSum ? (parseInt(this.form.entranceVehicleCount) - this.yoyMom.minusDaysEntranceVehicleSum ) / this.yoyMom.minusDaysEntranceVehicleSum * 100 : '';
this.form.entranceVehicleCountYoy = this.form.entranceVehicleCount && this.yoyMom.minusYearsEntranceVehicleSum ? (parseInt(this.form.entranceVehicleCount) - this.yoyMom.minusYearsEntranceVehicleSum ) / this.yoyMom.minusYearsEntranceVehicleSum * 100 : '';//
//
this.form.exitVehicleCountMom = this.form.exitVehicleCount && this.yoyMom.minusDaysExitVehicleSum ? (parseInt(this.form.exitVehicleCount) - this.yoyMom.minusDaysExitVehicleSum) / this.yoyMom.minusDaysExitVehicleSum * 100 : '';
this.form.exitVehicleCountYoy = this.form.exitVehicleCount && this.yoyMom.minusYearsExitVehicleSum ? (parseInt(this.form.exitVehicleCount) - this.yoyMom.minusYearsExitVehicleSum) / this.yoyMom.minusYearsExitVehicleSum * 100 : '';//
//
if(this.form.highwaySubDataList[index].entranceVehicleCount != '' || this.form.highwaySubDataList[index].exitVehicleCount != ''){
let idx = this.yoyMom.minusDaysList.findIndex(item => {return item.tollStationName == this.form.highwaySubDataList[index].tollStationName;});
let idx2 = this.yoyMom.minusYearsList.findIndex(item => {return item.tollStationName == this.form.highwaySubDataList[index].tollStationName;});
console.log('收费站同比环比',idx,idx2,this.form.highwaySubDataList[index].tollStationName);
if(idx > -1){
//
let obj = this.yoyMom.minusDaysList[idx];
console.log(obj)
this.form.highwaySubDataList[index].entranceVehicleCountMom = obj.entranceVehicleCount ? (parseInt(this.form.highwaySubDataList[index].entranceVehicleCount) - obj.entranceVehicleCount) / obj.entranceVehicleCount * 100 : '';
this.form.highwaySubDataList[index].exitVehicleCountMom = obj.exitVehicleCount ? (parseInt(this.form.highwaySubDataList[index].exitVehicleCount) - obj.exitVehicleCount) / obj.exitVehicleCount * 100 : '';
}
else{
this.form.highwaySubDataList[index].entranceVehicleCountMom = '';
this.form.highwaySubDataList[index].exitVehicleCountMom = '';
}
if(idx2 > -1){
//
let obj = this.yoyMom.minusYearsList[idx2];
console.log(obj)
this.form.highwaySubDataList[index].entranceVehicleCountYoy = obj.entranceVehicleCount ? (parseInt(this.form.highwaySubDataList[index].entranceVehicleCount) - obj.entranceVehicleCount) / obj.entranceVehicleCount * 100 : '';
this.form.highwaySubDataList[index].exitVehicleCountYoy = obj.exitVehicleCount ? (parseInt(this.form.highwaySubDataList[index].exitVehicleCount) - obj.exitVehicleCount) / obj.exitVehicleCount * 100 : '';
}
else{
this.form.highwaySubDataList[index].entranceVehicleCountYoy = '';
this.form.highwaySubDataList[index].exitVehicleCountYoy = '';
}
}
},
//
queryStation(type) {
@ -299,12 +328,12 @@
item.isFinish = false;
this.form.highwaySubDataList.push({
"entranceVehicleCount": '',
"entranceVehicleCountMom": 0.0,
"entranceVehicleCountYoy": 0.0,
"entranceVehicleCountMom": '',
"entranceVehicleCountYoy": '',
"exitToll": 0.0,
"exitVehicleCount": '',
"exitVehicleCountMom": 0.0,
"exitVehicleCountYoy": 0.0,
"exitVehicleCountMom": '',
"exitVehicleCountYoy": '',
"highwayId": item.highWayLineCode,
"highwayName": item.highWayLineName,
"submitPersonnelContact": this.userInfo.realName+','+this.userInfo.mobile,
@ -330,12 +359,12 @@
item.isFinish = false;
this.form.highwaySubDataList.push({
"entranceVehicleCount": '',
"entranceVehicleCountMom": 0.0,
"entranceVehicleCountYoy": 0.0,
"entranceVehicleCountMom": '',
"entranceVehicleCountYoy": '',
"exitToll": 0.0,
"exitVehicleCount": '',
"exitVehicleCountMom": 0.0,
"exitVehicleCountYoy": 0.0,
"exitVehicleCountMom": '',
"exitVehicleCountYoy": '',
"highwayId": item.highWayLineCode,
"highwayName": item.highWayLineName,
"submitPersonnelContact": this.userInfo.realName+','+this.userInfo.mobile,
@ -358,6 +387,7 @@
//
bindDateChange(e) {
this.form.statDate = e.detail.value;
this.queryYoYMom();
},
//
queryTime() {
@ -375,16 +405,33 @@
})
return;
}
let check = this.form.highwaySubDataList.every(item => {
return !item.entranceVehicleCount || !item.exitVehicleCount
})
if (check) {
let checkList = true;
if (this.form.highwaySubDataList.length > 0) {
checkList = this.form.highwaySubDataList.every(item => {
return checkNotEmpty(item.entranceVehicleCount) && checkNotEmpty(item.exitVehicleCount)
})
}
if (!checkList) {
uni.showToast({
title: '收费站信息请填写完整',
icon: 'none'
})
return;
}
//0
let checkRemark = true;
if (this.form.highwaySubDataList.length > 0) {
checkRemark = this.form.highwaySubDataList.every(item => {
return item.entranceVehicleCountMom !== 0 && item.exitVehicleCountMom !== 0;
})
}
if (!checkRemark) {
uni.showToast({
title: '环比持平预警请填写备注原因',
icon: 'none'
})
return;
}
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',

@ -1,6 +1,6 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runData/form', item)">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runData/form?id='+item.id)">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view class="unit_name">{{item.statDate || ''}}<text style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text></view>

@ -223,9 +223,12 @@
</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_input picker">
<picker :value="item.accidentLevelIndex" :range="accidentLevel" range-key="stdName" @change="e => changeAccidentLevel(e, 'highwayCongestionDetailDTOS', index)">
<text class="picker_select"
:style="item.accidentLevel?'color:#333;':''">{{item.accidentLevel ? item.accidentLevel : '请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
<view class="form_item">
@ -282,7 +285,7 @@
"highwayAccidentDetailDTOS": [{
"accidentContent": "",
"accidentEndTime": "",
"accidentLevel": "string",
"accidentLevel": "",
"accidentStartTime": "",
"additionalNotes": "",
"congestionRange": "",
@ -319,6 +322,7 @@
isOpenIndex: 0,
userInfo: {},
tabType: 1, //
accidentLevel: [],//
}
},
onLoad(options) {
@ -333,72 +337,25 @@
this.form.highwayCongestionDetailDTOS = this.form.highwayCongestionDetailVOS;
this.form.highwayAccidentDetailDTOS = this.form.highwayAccidentDetailVOS;
console.log(this.form)
} else if(options.id) {
this.queryDetailInfo(options.id);
}
this.queryTime(); //
this.queryAccidentLevel();//
},
methods: {
//id
queryDetailInfo(id) {
this.$request(getApp().globalData.baseUrl + '/api/biz/highSpeedOperationController/selectById/' + id, {}, 'GET').then(res => {
this.form = res.data;
this.form.highwayCongestionDetailDTOS = this.form.highwayCongestionDetailVOS;
this.form.highwayAccidentDetailDTOS = this.form.highwayAccidentDetailVOS;
})
},
//
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;
this.$request(getApp().globalData.baseUrl + '/api/biz/roadInfo/all?page=0&pageSize=0&_t=' + Date.parse(new Date()), {}, 'GET').then(res => {
this.highwayDataList = res.data;
})
},
//
@ -407,6 +364,11 @@
this.form[key][index].highwayName = this.highwayDataList[e.detail.value].stdName;
console.log(this.form)
},
//
changeAccidentLevel(e, key, index) {
this.form[key][index].accidentLevelIndex = e.detail.value;
this.form[key][index].accidentLevel = this.accidentLevel[e.detail.value].stdName;
},
//
changeStatPeriod(e) {
this.index = e.detail.value;
@ -433,6 +395,13 @@
this.array = res.data;
})
},
//
queryAccidentLevel() {
this.$request(getApp().globalData.baseUrl + '/api/dict/listDictData?dictType=accident_level' + '&_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.accidentLevel = res.data;
})
},
//
addRow() {
if(this.tabType == 1) {
@ -455,6 +424,7 @@
this.form.highwayAccidentDetailDTOS.push({
"accidentContent": "",
"accidentEndTime": "",
"accidentLevelIndex": "",
"accidentLevel": "",
"accidentStartTime": "",
"additionalNotes": "",

@ -1,6 +1,6 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runStatusData/form', item)">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runStatusData/form?id='+item.id)">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view class="unit_name">{{item.statDate || ''}}<text

@ -13,7 +13,7 @@
<uni-easyinput placeholderStyle="color:#c8c8c8;font-size:24rpx;" v-model="form.verCode" placeholder="请输入图形验证码" maxlength="20"></uni-easyinput>
<image :src="codeImg" @click="getVerCode" style="width: 180rpx; height:59rpx;"></image>
</view>
<view type="primary" class="login_btn" @click="doLogin">登录</view>
<view class="login_btn" @click="doLogin">登录</view>
</view>
</view>
</template>
@ -71,8 +71,14 @@
this.getUserInfo();
this.getRouters();
}
}).catch(() => {
}).catch((err) => {
console.log(err)
uni.hideLoading();
uni.showToast({
title: err.data.msg ? err.data.msg : '登录失败',
icon: 'none'
})
this.getVerCode();//
})
},
//

@ -250,6 +250,7 @@
// 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;
this.calcYoyMom();//
})
},
//

@ -14,7 +14,7 @@ const request = (url, data, method = 'GET') => {
method: method,
header: header,
success: res => {
console.log('request res', res)
// console.log('request res', res)
if (res.statusCode == 200) {
if (res.data.code == 200 || res.data.code == "" || res.data.status == 200) {
resolve(res.data)

Loading…
Cancel
Save