123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <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="输入关键字进行查询" v-model="title" @confirm="getConfirm"/>
- </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">
- <meet-list :datalist="list" :wtdt="wtdt" :fylxlist='fylxlist' :type='tabidx' @getDetail="getDetail" @getReadFn="getReadFn" @getTuiFn="getTuiFn"></meet-list>
- </view>
- <view v-if="checkPermi(['zxConference:conference:add'])&&tabidx=='hyhd'||checkPermi(['zx:speak:add'])&&tabidx=='wdfy'">
- <view style="height: 100rpx;"></view>
- <view class="fwbtns" @click="getAddMeet" v-if="checkPermi(['zxConference:conference:add'])&&tabidx=='hyhd'">创建会议</view>
- <view class="fwbtns" @click="getAddSpeak" v-if="checkPermi(['zx:speak:add'])&&tabidx=='wdfy'">录入发言</view>
- </view>
-
- <!-- 弹窗 -->
- <pop-up :type='ptype' @getClose="getClose" @getupSubmit="getupSubmit" :qjlxlist="qjlxlist"></pop-up>
- </view>
- </template>
- <script>
- import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
- import {getMeetListFn,getSpeakListFn,getupdateReplyFn} from "@/api/mine/meeting.js"
- import popUp from "@/work/components/popup/popup.vue"
- import meetList from "@/work/components/meeting/list.vue"
- import {getDictionaryFn} from "@/api/mine/register.js"
- export default{
- components:{meetList,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:'hyhd',
- // 会议活动 管理员看的{tit:'会议发言',val:'hyfy',limit:'zx:speak:list'},
- tabList:[{tit:'会议活动',val:'hyhd',limit:'zxConference:conference:add'},{tit:'我的发言',val:'wdfy',limit:'zx:speak:list'},{tit:'会议通知',val:'hytz',limit:'zxConference:conference:list'}],
- litablist:[{tit:'会议日期',val:0},],
- nvaHeight:44,
- talbList:[{},],
- taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
- talbidx:'',
- datainfo:{
- talb:'',
- },
- ptype:'',//弹窗类型
- list:[],
- pageSize: 10,
- pageNum: 1,
- reachflag: true,
- wtdt:'',
- qjlxlist:[],
- fylxlist:[],
- userId:this.$store.state.user.userId,
- id:'',
- title:'',//关键词
- }
- },
- onUnload(){
- uni.$off('refreshlist')
- },
- onLoad(e) {
- this.getDataFn()
- this.init()
- uni.$on('refreshlist', (e) => {
- this.getDataFn()
- })
- },
- mounted() {
- this.getHeightFn()
- },
- methods:{
- checkPermi, checkRole,
- // 请假类型
- init(){
- getDictionaryFn('leave').then(res=>{
- if(res.code==200&&res.data.length){
- this.qjlxlist = res.data.map(v => {
- return {
- text: v.dictLabel,
- value: v.dictValue
- }
- })
- }
- })
- // 发言类型
- getDictionaryFn('speak_type').then(res=>{
- if(res.code==200&&res.data.length){
- this.fylxlist = res.data.map(v => {
- return {
- label: v.dictLabel,
- value: v.dictValue
- }
- })
- }
- })
- },
- getConfirm(){
- this.pageNum=1;
- this.list=[];
- this.reachflag=true;
- this.getDataFn()
- },
- 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//赋值,待会要用
- this.nvaHeight =Number(data.height)//赋值,待会要用
- }).exec();
- },
- getClose(){
- this.ptype=""
- },
- getTabFn(idx){
- this.tabidx=idx;
- this.pageNum=1;
- this.list=[],
- this.reachflag=true;
- // this.tabtype=ite.jd||"";
- this.getDataFn()
- },
- getBack(){
- uni.navigateBack({
- delta:1
- })
- },
- bindDateChangea(e){
- console.log(e,2)
- },
- getChFn(){
- this.$tab.navigateTo('/work/pages/case/tacheck')
- },
- getReadFn(e){
- if(this.tabidx=='hyhd'){
- this.$tab.navigateTo('/work/pages/meeting/readdetail?id='+e)
- }else if(this.tabidx=='hyfy'){
- this.$tab.navigateTo('/work/pages/meeting/speaklist?id='+e)
- }
-
- },
- getTuiFn(ite){
- if(ite.type=='hyqd'){
- this.$tab.navigateTo('/work/pages/meeting/signin?id='+ite.id)
- }else{
- this.ptype=ite.type;
- this.id=ite.id
- }
- },
- getDetail(data){
- this.$tab.navigateTo('/work/pages/case/details?id='+data)
- },
- getAddMeet(){
- this.$tab.navigateTo('/work/pages/meeting/add')
- },
- getAddSpeak(){
- this.$tab.navigateTo('/work/pages/meeting/addspeak')
- },
- getupSubmit(e){
- var that=this;
- var type=this.type;
- var params=JSON.parse(JSON.stringify(e))
- params.conferenceId=this.id;
- params.userId=this.userId;
- getupdateReplyFn(params).then(res=>{
- if(res.code==200){
- this.$toast("答复成功");
- setTimeout(function(){
- that.ptype='';
- that.pageNum=1;
- that.list=[];
- that.reachflag=true;
- that.getDataFn()
- },1200)
-
- }
- })
- },
- getDataFn(){
- var params={
- pageSize:this.pageSize,
- pageNum: this.pageNum,
- // visitType:3
- }
- params.conferenceTitle=this.title
- if(this.tabidx=='wdfy'){
- params.userId=this.userId;
- getSpeakListFn(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)
- }
- })
- }else if(this.tabidx=='hyfy'){
- getSpeakListFn(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)
- }
- })
- }else{
- if(this.tabidx=='hytz'){
- params.userId=this.userId
- }
- getMeetListFn(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: 1 0 auto;padding: 22rpx 24rpx;margin-right: 6rpx;box-sizing: border-box;text-align: center;
- &: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>
|