新增修改提示语优化和跳转优化;水运页面接口联调

main
张群 3 years ago
parent 4ecf346e93
commit 12588f2d3a
  1. 24
      pages.json
  2. 11
      pages/highWay/runData/form.vue
  3. 2
      pages/highWay/runData/list.vue
  4. 34
      pages/highWay/runStatusData/form.vue
  5. 2
      pages/highWay/runStatusData/list.vue
  6. 11
      pages/railway/railwayRunData/form.vue
  7. 2
      pages/railway/railwayRunData/list.vue
  8. 11
      pages/railway/runStatus/form.vue
  9. 2
      pages/railway/runStatus/list.vue
  10. 56
      pages/water/TransportData/form.vue
  11. 2
      pages/water/TransportData/list.vue
  12. 613
      pages/water/transportation/form.vue
  13. 443
      pages/water/transportation/list.vue
  14. 630
      pages/water/waterWay/form.vue
  15. 443
      pages/water/waterWay/list.vue
  16. BIN
      static/image/loginBg.png

@ -96,6 +96,30 @@
"navigationBarTitleText": "水运运输数据报送"
}
},
{
"path": "pages/water/waterWay/list",
"style": {
"navigationBarTitleText": "水路(陆岛)数据"
}
},
{
"path": "pages/water/waterWay/form",
"style": {
"navigationBarTitleText": "水路(陆岛)数据报送"
}
},
{
"path": "pages/water/transportation/list",
"style": {
"navigationBarTitleText": "水运运输情况"
}
},
{
"path": "pages/water/transportation/form",
"style": {
"navigationBarTitleText": "水运运输情况报送"
}
},
{
"path": "pages/roadTransport/transportData/list",
"style": {

@ -448,7 +448,7 @@
}
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
success: (res) => {
if (res.confirm) {
this.submitForm();
@ -468,7 +468,14 @@
title: '报送提交成功',
icon: 'none',
success: () => {
uni.navigateBack();
if(this.form.id == undefined) {
uni.redirectTo({
url: '/pages/highway/runData/list'
})
}
else {
uni.navigateBack();
}
}
})
}

@ -103,7 +103,7 @@
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 : ''
statPeriod: this.index != '' && this.index > -1 ? this.array[this.index].dictValue : ''
};
this.data = [];
this.current = 0;

@ -376,18 +376,30 @@
new Date()), {}, 'GET').then(res => {
this.highwayDataList = res.data;
this.form.highwayAccidentDetailDTOS.map(item => {
item.highwayNameIndex = this.highwayDataList.findIndex(item2 => item2.stdName == item.highwayName);
let idx = this.highwayDataList.findIndex(item2 => item2.stdName == item.highwayName);
item.highwayNameIndex = idx > -1 ? idx : '';
})
this.form.highwayCongestionDetailDTOS.map(item => {
item.highwayNameIndex = this.highwayDataList.findIndex(item2 => item2.stdName == item.highwayName);
let idx = this.highwayDataList.findIndex(item2 => item2.stdName == item.highwayName);
item.highwayNameIndex = idx > -1 ? idx : '';
})
})
},
//
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)
//
let idx = this.form[key].findIndex(item => item.highwayNameIndex == e.detail.value );
if(idx > -1) {
uni.showToast({
title: '高速公路不能重复选择',
icon: 'none'
});
}
else {
this.form[key][index].highwayNameIndex = e.detail.value;
this.form[key][index].highwayName = this.highwayDataList[e.detail.value].stdName;
console.log(this.form)
}
},
//
changeAccidentLevel(e, key, index) {
@ -534,9 +546,10 @@
})
return;
}
console.log(this.form.id)
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
success: (res) => {
if (res.confirm) {
this.submitForm();
@ -566,7 +579,14 @@
title: '报送提交成功',
icon: 'none',
success: () => {
uni.navigateBack();
if(this.form.id == undefined) {
uni.redirectTo({
url: '/pages/highway/runStatusData/list'
})
}
else {
uni.navigateBack();
}
}
})
}

@ -104,7 +104,7 @@
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 : ''
statPeriod: this.index != '' && this.index > -1 ? this.array[this.index].dictValue : ''
};
this.data = [];
this.current = 0;

@ -412,7 +412,7 @@
}
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
success: (res) => {
if (res.confirm) {
this.submitForm();
@ -433,7 +433,14 @@
title: '报送提交成功',
icon: 'none',
success: () => {
uni.navigateBack();
if(this.form.id == undefined) {
uni.redirectTo({
url: '/pages/railway/railwayRunData/list'
})
}
else {
uni.navigateBack();
}
}
})
}

@ -104,7 +104,7 @@
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 : ''
statPeriod: this.index != '' && this.index > -1 ? this.array[this.index].dictValue : ''
};
this.data = [];
this.current = 0;

@ -208,7 +208,7 @@
})
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
success: (res) => {
if (res.confirm) {
this.submitForm();
@ -229,7 +229,14 @@
title: '报送提交成功',
icon: 'none',
success: () => {
uni.navigateBack();
if(this.form.id == undefined) {
uni.redirectTo({
url: '/pages/railway/runStatus/list'
})
}
else {
uni.navigateBack();
}
}
})
}

@ -104,7 +104,7 @@
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 : ''
statPeriod: this.index != '' && this.index > -1 ? this.array[this.index].dictValue : ''
};
this.data = [];
this.current = 0;

@ -46,9 +46,10 @@
<view class="form_item">
<view class="form_item_label">去年航次</view>
<view class="form_item_input form_input">
<uni-easyinput @blur="calcYoyMom" v-model="form.lastPassengersDo" type="number"
{{form.lastPassengersDo || '-'}}
<!-- <uni-easyinput @blur="calcYoyMom" v-model="form.lastPassengersDo" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</uni-easyinput> -->
</view>
</view>
<view class="form_item">
@ -62,9 +63,10 @@
<view class="form_item">
<view class="form_item_label">去年客运量</view>
<view class="form_item_input form_input">
<uni-easyinput @blur="calcYoyMom" v-model="form.lastWatertransportDo" type="number"
<!-- <uni-easyinput @blur="calcYoyMom" v-model="form.lastWatertransportDo" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</uni-easyinput> -->
{{form.lastWatertransportDo || '-'}}
</view>
</view>
<view class="form_item">
@ -120,17 +122,17 @@
return {
form: {
"affiliatedUnit" : "",
"inboundWatertransportDo" : 0,
"inboundWatertransportIn" : 0,
"inboundWatertransportDo" : '',
"inboundWatertransportIn" : '',
"isHoliday" : "",
"lastPassengersDo" : 0,
"lastWatertransportDo" : 0,
"outboundWatertransportDo" : 0,
"outboundWatertransportDo" : '',
"passengerWatertransportMomDo" : 0.0,
"statDate" : "",
"statPeriod" : "",
"voyageWatertransportMomDo" : 0.0,
"watertransportPassengersDo" : 0
"watertransportPassengersDo" : ''
}, //form
array: [], //
index: 2, //,0-24
@ -164,6 +166,8 @@
.statDate + '&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, 'GET')
.then(res => {
this.yoyMom = res.data;
this.form.lastWatertransportDo = checkNotEmpty(this.yoyMom.lastYearData.lastWatertransportDo) ? this.yoyMom.lastYearData.lastWatertransportDo : '';
this.form.lastPassengersDo = checkNotEmpty(this.yoyMom.lastYearData.lastPassengersDo) ? this.yoyMom.lastYearData.lastPassengersDo : '';
this.calcYoyMom(); //
})
},
@ -221,13 +225,6 @@
},
//
doSubmit() {
if (!checkNotEmpty(this.form.railwayName)) {
uni.showToast({
title: '车站名称不能为空',
icon: 'none'
})
return;
}
if (!checkNotEmpty(this.form.statDate) || !checkNotEmpty(this.form.statPeriod)) {
uni.showToast({
title: '报送日期和时段不能为空',
@ -235,39 +232,37 @@
})
return;
}
if (!checkNotEmpty(this.form.inboundRailwayDo) || !checkNotEmpty(this.form.inboundPassengersDo) || !
checkNotEmpty(this.form.inPepole)) {
if (!checkNotEmpty(this.form.inboundWatertransportDo)) {
uni.showToast({
title: '入青终到车次、过站车次、人数不能为空',
title: '航次不能为空',
icon: 'none'
})
return;
}
if (!checkNotEmpty(this.form.outboundRailwayDo) || !checkNotEmpty(this.form.outboundPassengersDo) || !
checkNotEmpty(this.form.outPepole)) {
if (!checkNotEmpty(this.form.outboundWatertransportDo)) {
uni.showToast({
title: '出青终到车次、过站车次、人数不能为空',
title: '客运量不能为空',
icon: 'none'
})
return;
}
if (this.form.inPepole == this.yoyMom.yesterdayData.inPepole && this.form.inMark) {
if (!checkNotEmpty(this.form.inboundWatertransportIn)) {
uni.showToast({
title: '入青备注不能为空',
title: '船舶数不能为空',
icon: 'none'
})
return;
}
if (this.form.outPepole == this.yoyMom.yesterdayData.outPepole && this.form.outRemark) {
if (!checkNotEmpty(this.form.watertransportPassengersDo)) {
uni.showToast({
title: '出青备注不能为空',
title: '客位数不能为空',
icon: 'none'
})
return;
}
uni.showModal({
title: '提示',
content: '确认保存当前报送数据吗?',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
success: (res) => {
if (res.confirm) {
this.submitForm();
@ -288,7 +283,14 @@
title: '报送提交成功',
icon: 'none',
success: () => {
uni.navigateBack();
if(this.form.id == undefined) {
uni.redirectTo({
url: '/pages/water/TransportData/list'
})
}
else{
uni.navigateBack();
}
}
})
}

@ -102,7 +102,7 @@
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 : ''
statPeriod: this.index != '' && this.index > -1 ? this.array[this.index].dictValue : ''
};
this.data = [];
this.current = 0;

@ -0,0 +1,613 @@
<template>
<view class="form_warp">
<view class="form_intro">
<view>如有填报问题请咨询公共服务中心</view>
<view>中心值班电话<text class="tel">66007587</text></view>
</view>
<view class="form_item_box">
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">管理单位名称</view>
<view class="form_item_input select">
{{form.affiliatedUnit}}
</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 class="form_item">
<view class="form_item_label">事故发生总量</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="form.totalAccidents" 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;">
<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_li" v-for="(item,index) in form.listContion"
: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(index)" size="18"></uni-icons>
</view>
<view class="form_item">
<view class="form_item_label">事故发生时间</view>
<view class="form_item_input picker">
<uni-datetime-picker type="datetime" v-model="item.accidentHappened" :border="false">
<text class="picker_select"
:style="item.accidentHappened?'color:#333;':''">{{item.accidentHappened?formatdate(item.accidentHappened):'请选择'}}</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 form_input">
<uni-easyinput v-model="item.occurrenceLocation" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="200"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故等级</view>
<view class="form_item_input picker">
<picker :value="item.gradeAccidentslIndex" :range="accidentLevel" range-key="dictLabel"
@change="e => changeAccidentLevel(e, index)">
<text class="picker_select"
:style="item.gradeAccidentslIndex?'color:#333;':''">{{item.gradeAccidentslIndex ? accidentLevel[item.gradeAccidentsIndex].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="item.dataDetails"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="200">
</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.disposalWork" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="200"></uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">事故处理结束时间</view>
<view class="form_item_input picker">
<uni-datetime-picker type="datetime" v-model="item.endTime" :border="false">
<text class="picker_select"
:style="item.endTime?'color:#333;':''">{{item.endTime?formatdate(item.endTime):'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
</view>
<view class="line"></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 {
checkNotEmpty,
getDateStr
} from "../../../common/util.js"
export default {
data() {
return {
form: {
"affiliatedUnit" : "",
"listContion" : [ {
"accidentContent" : "",
"accidentHappened" : "",
"dataDetails" : "",
"disposalWork" : "",
"endTime" : "",
"gradeAccidents" : "",
"occurrenceLocation" : "",
"parentId" : "",
"rowKey" : 0
} ],
"statDate" : "",
"statPeriod" : "",
"totalAccidents" : 0
}, //form
array: [], //
index: 2, //,0-24
userInfo: {},
tabType: 1, //
accidentLevel: [], //
pageType: ''
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
if (options.type == 'add') {
this.pageType = 'add';
this.form.affiliatedUnit = this.userInfo.organizationName ? this.userInfo.organizationName : '';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
this.queryAccidentLevel(); //
this.queryTime(); //
} else if (options.id) {
this.queryDetailInfo(options.id);
}
},
methods: {
formatdate(date) {
return date.length < 12 ? date + '00:00:00' : date;
},
//id
queryDetailInfo(id) {
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunSituation/find/' + id, {},
'GET').then(res => {
this.form = res.data;
this.queryAccidentLevel(); //
this.queryTime(); //
})
},
//
changeAccidentLevel(e, index) {
this.form.listContion[index].gradeAccidentsIndex = e.detail.value;
this.form.listContion[index].gradeAccidents = this.accidentLevel[e.detail.value].dictValue;
},
//
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;
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 0-12
let dateStr = getDateStr(now, 0);
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr +
' 13:30').getTime()) {
this.form.statPeriod = '0012';
this.index = this.array.findIndex(item => item.dictValue == '0012');
} else {
this.form.statPeriod = '03'; //0-24
this.index = this.array.findIndex(item => item.dictValue == '03');
}
}else{
this.index = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
}
})
},
//
queryAccidentLevel() {
this.$request(getApp().globalData.baseUrl + '/api/dict/listDictData?dictType=accident_level' + '&_t=' +
Date.parse(
new Date()), {}, 'GET').then(res => {
this.accidentLevel = res.data.list;
this.form.listContion.map(item => {
item.gradeAccidentsIndex = this.accidentLevel.findIndex(item2 => item2.dictValue == item.gradeAccidents);
})
})
},
//
addRow() {
this.form.listContion.push({
"accidentContent" : "",
"accidentHappened" : "",
"dataDetails" : "",
"disposalWork" : "",
"endTime" : "",
"gradeAccidentsIndex": "",
"gradeAccidents" : "",
"occurrenceLocation" : "",
"parentId" : "",
"rowKey" : 0
});
},
//
delRow(index) {
this.form.listContion.splice(index, 1);
},
//
doSubmit() {
console.log(this.form)
if (this.form.statDate == '' || this.form.statPeriod == '') {
uni.showToast({
title: '报送日期和时段不能为空',
icon: 'none'
})
return;
}
if (!checkNotEmpty(this.form.totalAccidents)) {
uni.showToast({
title: '事故发生总量不能为空',
icon: 'none'
})
return;
}
let checkAccident = true;
if(this.form.listContion.length > 0){
checkAccident = this.form.listContion.every(item => {
return checkNotEmpty(item.accidentContent) && checkNotEmpty(item.accidentHappened) && checkNotEmpty(item.endTime) && checkNotEmpty(item
.gradeAccidents) && checkNotEmpty(item.occurrenceLocation)
})
}
if (!checkAccident) {
uni.showToast({
title: '事故信息详情不能为空',
icon: 'none'
})
return;
}
console.log(this.form.id)
uni.showModal({
title: '提示',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
success: (res) => {
if (res.confirm) {
this.submitForm();
}
}
})
},
submitForm() {
this.form.listContion.map((item,index) => {
item.rowKey = index;
})
uni.showLoading({
title: '提交中...',
mask: true
})
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/saveOrUpdate', this
.form,
'POST').then(res => {
uni.hideLoading();
if (res.code == 200) {
uni.showToast({
title: '报送提交成功',
icon: 'none',
success: () => {
if(this.form.id == undefined) {
uni.redirectTo({
url: '/pages/water/transportation/list'
})
}
else {
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,443 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/water/transportation/form?id='+item.id)">
<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="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>
<picker @change="bindPickerChange" :value="index" :range="array" range-key="dictLabel">
<text class="picker_select"
:style="index?'color:#333;':''">{{index?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 != '' && 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 = '';
},
//
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/watertransportRunSituation/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;
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>

@ -0,0 +1,630 @@
<template>
<view class="form_warp">
<view class="form_intro">
<view>如有填报问题请咨询公共服务中心</view>
<view>中心值班电话<text class="tel">66007587</text></view>
</view>
<view class="form_item_box">
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">管理单位名称</view>
<view class="form_item_input select">
{{form.affiliatedUnit}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">统计日期</view>
<view class="form_item_input picker">
<picker mode="date" :value="form.reportDate" @change="bindDateChange">
<text class="picker_select"
:style="form.reportDate?'color:#333;':''">{{form.reportDate?form.reportDate:'请选择时段'}}</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_li" v-for="(item,index) in form.bizWaterwayIslandDataSaveOrUpdateDTOList"
: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(index)" size="18"></uni-icons>
</view>
<view class="form_item">
<view class="form_item_label">水路(陆岛)</view>
<view class="form_item_input picker">
<picker :value="item.landNameIndex" :range="landList" @change="e => changeLandName(e, index)">
<text class="picker_select"
:style="item.landNameIndex?'color:#333;':''">{{item.landNameIndex ? landList[item.landNameIndex] : '请选择'}}</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 type="number" v-model="item.voyage"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate" :class="form.voyage == form.yesterdayVoyage ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label"
:style="form.voyage == form.yesterdayVoyage ? 'color: #EB4747' : ''">航次环比(%)
</view>
<view class="rate_item_input"
:style="form.voyage == form.yesterdayVoyage ? 'color: #EB4747' : ''">
{{form.voyageRingRatio === 0 ? form.voyageRingRatio : form.voyageRingRatio ? form.voyageRingRatio.toFixed(2) : ''}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">航次同比(%)</view>
<view class="rate_item_input">
{{form.voyageYearOnYear === 0 ? form.voyageYearOnYear : form.voyageYearOnYear ? form.voyageYearOnYear.toFixed(2) : ''}}
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">人数</view>
<view class="form_item_input form_input">
<uni-easyinput type="number" v-model="item.numberOfPeople"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="form.numberOfPeople == form.yesterdayNumberOfPeople ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label"
:style="form.numberOfPeople == form.yesterdayNumberOfPeople ? 'color: #EB4747' : ''">人数环比(%)
</view>
<view class="rate_item_input"
:style="form.numberOfPeople == form.yesterdayNumberOfPeople ? 'color: #EB4747' : ''">
{{form.peopleRingRatio === 0 ? form.peopleRingRatio : form.peopleRingRatio ? form.peopleRingRatio.toFixed(2) : ''}}
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人数同比(%)</view>
<view class="rate_item_input">
{{form.peopleYearOnYear === 0 ? form.peopleYearOnYear : form.peopleYearOnYear ? form.peopleYearOnYear.toFixed(2) : ''}}
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">昨日航次</view>
<view class="form_item_input form_input">
{{item.yesterdayVoyage}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">去年航次</view>
<view class="form_item_input form_input">
{{item.lastYearVoyage}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">昨日人数</view>
<view class="form_item_input form_input">
{{item.yesterdayNumberOfPeople}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">去年人数</view>
<view class="form_item_input form_input">
{{item.lastYearNumberOfPeople}}
</view>
</view>
<view class="line"></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 {
checkNotEmpty,
getDateStr
} from "../../../common/util.js"
export default {
data() {
return {
form: {
"bizWaterwayIslandDataSaveOrUpdateDTOList": [{
"landName": "",
"lastYearNumberOfPeople": 0,
"lastYearVoyage": 0,
"numberOfPeople": 0,
"peopleRingRatio": 0.0,
"peopleYearOnYear": 0.0,
"voyage": 0,
"voyageRingRatio": 0.0,
"voyageYearOnYear": 0.0,
"yesterdayNumberOfPeople": 0,
"yesterdayVoyage": 0
}],
"reportDate": ""
}, //form
array: [], //
index: 2, //,0-24
userInfo: {},
landList: ['灵山岛', '斋堂岛', '青黄线', '竹岔', '田横'], //
pageType: ''
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
if (options.type == 'add') {
this.pageType = 'add';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
this.queryTime(); //
} else if (options.item) {
this.form = JSON.parse(options.item);
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList = this.form.bizWaterwayIslandDataVOList;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.map(item => {
let idx = this.landList.findIndex(item2 => item2 == item.landName);
item.landIndex = idx > -1 ? idx : '';
})
this.queryTime();
} else if (options.id) {
this.queryDetailInfo(options.id);
}
},
methods: {
formatdate(date) {
return date.length < 12 ? date + ' 00:00:00' : date;
},
//
calcYoyMom(index) {
if (this.form.reportDate == '' || this.form.statPeriod == '' || this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].landName == '') {
return;
}
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/getYoyMom?statDate=' + this.form
.reportDate + '&statPeriod=' + this.form.statPeriod + '&landName='+this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].landName+'&_t=' + Date.parse(new Date()), {}, 'GET')
.then(res => {
})
},
//id
queryDetailInfo(id) {
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunSituation/find/' + id, {},
'GET').then(res => {
this.form = res.data;
this.queryTime(); //
})
},
//
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;
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 0-12
let dateStr = getDateStr(now, 0);
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
new Date(dateStr +
' 13:30').getTime()) {
this.form.statPeriod = '0012';
let idx = this.array.findIndex(item => item.dictValue == '0012');
this.index = idx > -1 ? idx : '';
} else {
this.form.statPeriod = '03'; //0-24
let idx = this.array.findIndex(item => item.dictValue == '03');
this.index = idx > -1 ? idx : '';
}
} else {
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
this.index = idx > -1 ? idx : '';
}
})
},
//
addRow() {
this.form.listContion.push({
"landName": "",
"lastYearNumberOfPeople": 0,
"lastYearVoyage": 0,
"numberOfPeople": 0,
"peopleRingRatio": 0.0,
"peopleYearOnYear": 0.0,
"voyage": 0,
"voyageRingRatio": 0.0,
"voyageYearOnYear": 0.0,
"yesterdayNumberOfPeople": 0,
"yesterdayVoyage": 0
});
},
//
delRow(index) {
this.form.listContion.splice(index, 1);
},
//
doSubmit() {
console.log(this.form)
if (this.form.reportDate == '' || this.form.statPeriod == '') {
uni.showToast({
title: '报送日期和时段不能为空',
icon: 'none'
})
return;
}
let checkCongestion = true;
if (this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.length > 0) {
checkCongestion = this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.every(item => {
return checkNotEmpty(item.landName) && checkNotEmpty(item.numberOfPeople) && checkNotEmpty(
item.voyage)
})
}
if (!checkAccident) {
uni.showToast({
title: '陆岛详情不能为空',
icon: 'none'
})
return;
}
console.log(this.form.id)
uni.showModal({
title: '提示',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
success: (res) => {
if (res.confirm) {
this.submitForm();
}
}
})
},
submitForm() {
uni.showLoading({
title: '提交中...',
mask: true
})
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/saveOrUpdate', this
.form,
'POST').then(res => {
uni.hideLoading();
if (res.code == 200) {
uni.showToast({
title: '报送提交成功',
icon: 'none',
success: () => {
if (this.form.id == undefined) {
uni.redirectTo({
url: '/pages/water/transportation/list'
})
} else {
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,443 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/water/waterWay/form?id='+item.id)">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view>{{item.reportDate || ''}}<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="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>
<picker @change="bindPickerChange" :value="index" :range="array" range-key="dictLabel">
<text class="picker_select"
:style="index?'color:#333;':''">{{index?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: {
reportDateStart: '',
reportDateEnd: '',
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 = {
reportDateStart: this.timeRange.length > 0 ? this.timeRange[0] : '',
reportDateEnd: this.timeRange.length > 0 ? this.timeRange[1] : '',
statPeriod: this.index != '' && 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 = {
reportDateStart: '',
reportDateEnd: '',
statPeriod: ''
};
this.index = '';
},
//
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/waterwayIslandData/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;
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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 229 KiB

Loading…
Cancel
Save