123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <template>
- <view class="content">
- <view class="line"></view>
- <view class="cont-box">
- <view class="page">
- <view :class="current===item.current?'isSelect':'select'" class="dataName" v-for="item in pageList"
- :key="item.current" @click="handelChange(item.current)">
- {{item.name}}
- </view>
- </view>
- <!-- 报表查询 -->
- <reportQuery v-if="current===0" :reportList="reportList" :queryParams="queryParams" @reset="reset"
- @handelDate="handelDate" :key="key" />
- <!-- 数据项查询 -->
- <dataItem v-else />
- </view>
- </view>
- </template>
- <script>
- import reportQuery from './report-query.vue'
- import dataItem from './data-item.vue'
- export default {
- components: {
- reportQuery,
- dataItem
- },
- data() {
- return {
- // 查询参数
- queryParams: {
- page: 1,
- limit: 20,
- reportTableName: null
- },
- // 列表数据
- reportList: [],
- // 分页器
- pageList: [{
- name: '报表查询',
- current: 0
- },
- {
- name: '数据项查询',
- current: 1
- }
- ],
- current: 0,
- key: 0
- };
- },
- onShow() {
- this.key++
- this.queryParams.limit = 20
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 0
- })
- },
- onPullDownRefresh() {
- this.queryParams.limit = 20
- },
- onReachBottom() {
- this.queryParams.limit += 10
- },
- methods: {
- // 切换数据项查询
- handelChange(current) {
- this.current = current
- },
- //重置查询条件
- reset() {
- this.queryParams = {
- page: 1,
- limit: 20,
- reportName: null
- }
- },
- //选中时间
- handelDate(val) {
- // this.queryParams.range = val
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .uni-list-item__container {
- padding: 40rpx 60rpx;
- }
- ::v-deep .uni-list-item__content-title {
- font-size: 34rpx;
- }
- ::v-deep .uniui-arrowright {
- font-size: 40rpx !important;
- padding-right: 54rpx !important;
- }
- ::v-deep .uni-list-item__icon-img {
- width: 86rpx;
- height: 86rpx;
- }
- ::v-deep .uniui-calendar {
- display: none;
- }
- ::v-deep .uni-date-x--border {
- border: none;
- }
- ::v-deep .uni-date__x-input {
- background: #ECECEC;
- }
- ::v-deep .uni-date-x .range-separator {
- height: 36px !important;
- padding: 0 15px !important;
- line-height: 34px !important;
- transform: scale(2.5);
- color: #ECECEC;
- }
- .cont-box {
- margin-top: 20rpx;
- .page {
- display: flex;
- justify-content: space-around;
- align-items: center;
- border-bottom: 2rpx solid #EEEEEE;
- font-weight: bold;
- .select {
- color: #5A5A5A;
- border-bottom: none;
- }
- .isSelect {
- border-bottom: 8rpx solid #2F9BFD;
- color: #2F9BFD;
- }
- .dataName {
- padding: 20rpx 0;
- }
- }
- }
- .empty {
- width: 400rpx;
- height: 400rpx;
- position: absolute;
- top: 50%;
- left: 50%;
- margin-top: -280rpx !important;
- margin-left: -200rpx;
- }
- .line {
- height: 10rpx;
- width: 100%;
- background: #EEEDF2;
- }
- </style>
|