123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <template>
- <view class="pb50" :style="'padding-top:'+nvaHeight+'px;'">
- <view class="navbox">
- <uni-nav-bar color="#ffffff" rightWidth="150rpx" title="政协提案" @clickLeft="getBack" @clickRight="getChFn" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
- <block slot="left">
- <view class="topl">
- <image :src="backimg" ></image>
- </view>
- </block>
- <block slot="right">
- <view class="topr">
- <image :src="ccicoimg"></image>
- <view>提案查重</view>
- </view>
- </block>
- </uni-nav-bar>
- <view class="plr12 mt18">
- <view class="search flex0 mb10">
- <image :src="searchimg"></image>
- <input placeholder="输入关键字进行查询" />
- </view>
- </view>
- <view class="tablists flexc mb20">
- <view v-for="(ite,idx) in tabList" @click="getTabFn(ite.val)" :class="{act:tabidx==ite.val}" :key="idx">{{ite.tit}}</view>
- </view>
- <view style="height: 56rpx;"></view>
- <view class="lbtab flexc">
- <image :src="lbicoimg" class="limg"></image>
- <view class="lbtabs flexc">
- <view class="lbtabp" v-for="(ite,idx) in litablist" :key="idx">
- <picker range-key='label' :value="talbidx" :range="taztList" @change='bindDateChangea'>
- <view :class="datainfo.dqjz?'':'f16 co80'">{{datainfo.talb || ite.tit}}</view>
- </picker>
- <image :src="upimg" class="upimg"></image>
- </view>
- </view>
- </view>
- </view>
- <!-- 列表 -->
- <view class="mbox">
- <case-list :datalist="list" :wtdt="wtdt" :tajdlist='tajdlist' :type='tabidx' @getDetail="getDetail" @getTuiFn="getTuiFn"></case-list>
- </view>
- <view class="fwbtns">提交提案</view>
-
- <!-- 弹窗 -->
- <pop-up :type='ptype' @getClose="getClose"></pop-up>
- </view>
- </template>
- <script>
- import {getCaseListFn} from "@/api/mine/case.js"
- import popUp from "@/work/components/popup/popup.vue"
- import caseList from "@/work/components/case/list.vue"
- import {getDictionaryFn} from "@/api/mine/register.js"
- export default{
- components:{caseList,popUp},
- data(){
- return{
- searchimg: require("@/work/static/images/search.png"),
- ccicoimg:require("@/work/static/images/ccico.png"),
- lbicoimg:require("@/work/static/images/lbico.png"),
- backimg:require("@/work/static/images/back.png"),
- upimg:require("@/work/static/images/up.png"),
- backgroundColor:"#1D64E2",
- tabidx:7,
- tabList:[{tit:'征集通知',val:0},{tit:'提案审查',val:7},{tit:'我的提案',val:1},{tit:'联名提案',val:2},{tit:'推荐优秀',val:3},
- {tit:'推荐重点',val:4},{tit:'公开提案',val:5},{tit:'办理质量评议',val:6}],
- litablist:[{tit:'提案类别',val:0},{tit:'提案状态',val:1},{tit:'办理状态',val:2},{tit:'联名状态',val:1},{tit:'评议状态',val:1},{tit:'承办单位',val:2},{tit:'选择年份',val:1},{tit:'选择会议',val:3},
- {tit:'推荐状态',val:0},{tit:'开始日期',val:1},{tit:'结束日期',val:2},
- ],
- nvaHeight:44,
- talbList:[{},],
- taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
- talbidx:'',
- datainfo:{
- talb:'',
- },
- ptype:'',//弹窗类型
- list:[],
- pageSize: 10,
- pageNum: 1,
- reachflag: true,
- wtdt:'',
- tajdlist:[]
-
- }
- },
- onUnload(){
- uni.$off('refreshlist')
- },
- onLoad(e) {
- this.getDataFn()
- this.init()
- uni.$on('refreshlist', (e) => {
- this.getDataFn()
- })
- },
- mounted() {
- this.getHeightFn()
- },
- methods:{
- // 提案状态
- init(){
- getDictionaryFn('proposal_progress').then(res=>{
- if(res.code==200&&res.data.length){
- this.tajdlist = res.data.map(v => {
- return {
- label: v.dictLabel,
- value: Number(v.dictValue)
- }
- })
- }
- })
- },
- getHeightFn(){
- var s=uni.getSystemInfoSync().statusBarHeight;
- let query = uni.createSelectorQuery().in(this);
- //需要给黄色区域设置一个id标识,在这里是demo
- query.select('.navbox').boundingClientRect(data => {
- this.nvaHeight =s? data.height:Number(data.height)-20//赋值,待会要用
- }).exec();
- },
- getClose(){
- this.ptype=""
- },
- getTabFn(idx){
- this.tabidx=idx;
- },
- getBack(){
- uni.navigateBack({
- delta:1
- })
- },
- bindDateChangea(e){
- console.log(e,2)
- },
- getChFn(){
- this.$tab.navigateTo('/work/pages/case/tacheck')
- },
- getTuiFn(ite){
- this.ptype=ite.type
- },
- getDetail(data){
- this.$tab.navigateTo('/work/pages/case/details?id='+data)
- },
- getDataFn(){
- var params={
- pageSize:this.pageSize,
- pageNum: this.pageNum,
- // visitType:3
- }
- getCaseListFn(params).then(res=>{
- if(res.code==200){
- if (res.rows.length < this.pageSize) {
- this.reachflag = false
- this.wtdt = '到底了~';
- } else {
- var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
- if (num < res.total) {
- this.reachflag = true
- this.wtdt = '上拉加载更多'
- } else {
- this.reachflag = false
- this.wtdt = '到底了~';
- }
- }
- if (this.pageNum == 1) {
- this.list = res.rows;
- } else {
- this.list = this.list.concat(res.rows)
- }
- }else{
- this.$toast(res.msg)
- }
- })
-
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background-color: $com-cd3;
- .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
- image{width: 40rpx;height: 30rpx;}
- }
- .topr{display: flex;align-items: center;
- image{width: 26rpx;height: 26rpx;margin-right: 12rpx;}
- view{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
- }
- .tablists{
- overflow: auto;flex-wrap: nowrap;
- view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;position: relative;flex: 0 0 auto;padding: 22rpx 24rpx;margin-right: 6rpx;box-sizing: border-box;
- &:last-child{margin-right: 0;}
- &.act{font-size: 30rpx;
- &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
- }
- }
- }
- .lbtab{height: 114rpx;background: #FFFFFF;border-radius: 30rpx;padding-left: 24rpx;position: absolute;left:24rpx;right: 24rpx;bottom: -58rpx;
- .limg{width: 40rpx;height: 34rpx;margin-right: 10rpx;flex:0 0 auto;}
- .lbtabs{overflow: auto;flex-wrap: nowrap;
- .lbtabp{display: flex;align-items: center;flex: 0 0 auto;margin-right: 24rpx;}
- .upimg{width: 18rpx;height: 10rpx;}
-
- }
- }
- }
- .mbox{padding:58rpx 24rpx 28rpx;}
- .lbtabs /deep/ picker{padding: 0 18rpx;}
- </style>
|