parent
0d16b31c9a
commit
60f63fbb10
11 changed files with 2003 additions and 314 deletions
@ -0,0 +1,178 @@ |
||||
<template> |
||||
<!-- 公交投入数据表单 --> |
||||
<view class="form_warp"> |
||||
<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 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="queryYoYMom"> |
||||
<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> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
|
||||
} |
||||
}, |
||||
methods: { |
||||
|
||||
} |
||||
} |
||||
</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: 300rpx; |
||||
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{ |
||||
text-align: right; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
||||
@ -0,0 +1,441 @@ |
||||
<template> |
||||
<!-- 公交投入数据 --> |
||||
<view class="page_box"> |
||||
<view class="top_box"> |
||||
<view class="list_box"> |
||||
<view class="list_item" v-for="(item,index) in listData" :key="index" @click="editItem(item)"> |
||||
<view class="list_top"> |
||||
<view class="unit_tags">报送时间</view> |
||||
<view class="unit_name">{{item.reportDate || ''}}<text style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text></view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore" |
||||
:content-text="contentText"></uni-load-more> |
||||
</view> |
||||
<view class="bottom_box"> |
||||
<!-- <view class="act_btn" @click="handleAdd"> |
||||
<uni-icons type="plusempty" size="18" |
||||
color="#fff" style="margin-right: 9rpx;"></uni-icons> |
||||
新建 |
||||
</view> --> |
||||
<view class="act_btn btn1" @click="handleSearch"> |
||||
<uni-icons type="search" size="18" color="#2D8CF0" |
||||
style="margin-right: 9rpx;"></uni-icons> |
||||
查询 |
||||
</view> |
||||
</view> |
||||
<view class="pop_conbox"> |
||||
<uni-popup ref="popup" style="width: 100%;" background-color="#fff"> |
||||
<view class="pop_box"> |
||||
<view class="pop_title"> |
||||
查询条件 |
||||
<uni-icons @click="this.$refs.popup.close()" 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="timeArray" range-key="dictLabel"> |
||||
<text class="unselect_txt" |
||||
:style="timeName?'color:#333;':''">{{timeName ? timeName:'请选择时段'}}</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> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
listData:[], |
||||
hasMore:true, |
||||
page:0, |
||||
pageSize:10, |
||||
timeRange:[], |
||||
contentText: { |
||||
contentdown: "点击查看更多", |
||||
contentrefresh: "正在加载...", |
||||
contentnomore: "没有更多数据了", |
||||
}, |
||||
status: '', |
||||
|
||||
} |
||||
}, |
||||
onShow() { |
||||
this.page = 0; |
||||
this.hasMore = true; |
||||
this.listData = []; |
||||
this.loadMore() |
||||
}, |
||||
methods: { |
||||
loadMore(){ |
||||
if (this.hasMore) { |
||||
this.page = this.page + 1; |
||||
this.status = 'loading'; |
||||
let params = { |
||||
page:this.page, |
||||
pageSize:this.pageSize, |
||||
reportDateStart:this.timeRange.length !== 0 ? this.timeRange[0] : '', |
||||
reportDateEnd:this.timeRange.length !== 0 ? this.timeRange[1] : '', |
||||
_t:Date.parse(new Date()) |
||||
} |
||||
this.$request(getApp().globalData.baseUrl + '/api/biz/busdata/list',params,"GET").then(res =>{ |
||||
console.log(res) |
||||
if(res.code == 200){ |
||||
res.data.list.map(item =>{ |
||||
item.show = false; |
||||
}) |
||||
this.listData = this.listData.concat(res.data.list); |
||||
if(res.data.list.length == 0 || res.data.list.length < this.size){ |
||||
this.hasMore = false; |
||||
this.status = 'nomore'; |
||||
}else{ |
||||
this.status = 'more'; |
||||
} |
||||
} |
||||
}) |
||||
} |
||||
}, |
||||
// 点击查询按钮 |
||||
handleSearch(){ |
||||
this.$refs.popup.open('bottom') |
||||
}, |
||||
// 点击筛选弹窗中的筛选按钮 |
||||
searchList(){ |
||||
this.hasMore = true; |
||||
this.page = 0; |
||||
this.listData = []; |
||||
this.$refs.popup.close() |
||||
this.loadMore() |
||||
}, |
||||
// 点击筛选弹窗中的重置按钮 |
||||
searchReset(){ |
||||
this.timeRange = []; |
||||
this.listData = []; |
||||
this.hasMore = true; |
||||
this.page = 0; |
||||
this.$refs.popup.close() |
||||
this.loadMore(); |
||||
}, |
||||
// 跳转编辑页面 |
||||
editItem(row){ |
||||
uni.navigateTo({ |
||||
url:"/pages/bus/busDataInfo/form?pageFrom=edit&item=" + JSON.stringify(row) |
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.page_box{ |
||||
min-height: 100vh; |
||||
padding: 30rpx 30rpx 195rpx; |
||||
|
||||
.top_box{ |
||||
.list_box{ |
||||
width: 690rpx; |
||||
display: flex; |
||||
flex-direction: column; |
||||
margin: 0 auto; |
||||
|
||||
.list_item{ |
||||
width: 630rpx; |
||||
padding: 30rpx; |
||||
border-radius: 30rpx; |
||||
background: #FFFFFF; |
||||
margin-bottom: 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; |
||||
} |
||||
|
||||
.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; |
||||
} |
||||
|
||||
.item{ |
||||
width: 570rpx; |
||||
// display: flex; |
||||
background: #F8F8F8; |
||||
border-radius: 30rpx 30rpx 30rpx 30rpx; |
||||
padding: 30rpx; |
||||
// justify-content: space-between; |
||||
margin-bottom: 40rpx; |
||||
|
||||
.item_line{ |
||||
width: 100%; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
|
||||
.left_txt{ |
||||
font-size: 26rpx; |
||||
color: #666; |
||||
} |
||||
.right_txt{ |
||||
color: #333; |
||||
font-size: 28rpx; |
||||
} |
||||
} |
||||
|
||||
.item_bottom{ |
||||
width: 100%; |
||||
.bott_item{ |
||||
width: 100%; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
margin-top: 32rpx; |
||||
|
||||
|
||||
.left_txt{ |
||||
font-size: 26rpx; |
||||
color: #666; |
||||
} |
||||
.right_txt{ |
||||
color: #333; |
||||
font-size: 28rpx; |
||||
} |
||||
} |
||||
.omit{ |
||||
font-size: 26rpx; |
||||
font-weight: 400; |
||||
color: #666666; |
||||
line-height: 48rpx; |
||||
margin: 20rpx 0; |
||||
} |
||||
.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; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
.button_box{ |
||||
width: 630rpx; |
||||
display: flex; |
||||
justify-content: flex-end; |
||||
|
||||
.button{ |
||||
width: 180rpx; |
||||
height: 70rpx; |
||||
background: #FFFFFF; |
||||
border-radius: 100rpx; |
||||
border: 1rpx solid #C1C1C1; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
font-size: 28rpx; |
||||
color: #666; |
||||
margin-left: 30rpx; |
||||
|
||||
&.edit{ |
||||
background: #2D8CF0; |
||||
border-radius: 100rpx 100rpx 100rpx 100rpx; |
||||
border: none; |
||||
color: #fff; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
.bottom_box{ |
||||
position: fixed; |
||||
left: 0; |
||||
right: 0; |
||||
bottom: 0; |
||||
display: flex; |
||||
justify-content: space-around; |
||||
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_conbox{ |
||||
.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> |
||||
Loading…
Reference in new issue