list.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. <template>
  2. <view class="pb50" :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="navbox">
  4. <!-- <uni-nav-bar color="#ffffff" rightWidth="150rpx" title="政协提案" @clickLeft="getBack" @clickRight="getChFn" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  5. <block slot="left">
  6. <view class="topl">
  7. <image :src="backimg" ></image>
  8. </view>
  9. </block>
  10. <block slot="right">
  11. <view class="topr">
  12. <image :src="ccicoimg"></image>
  13. <view>提案查重</view>
  14. </view>
  15. </block>
  16. </uni-nav-bar> -->
  17. <view class="plr12 mt18">
  18. <view class="search flex0 mb10">
  19. <image :src="searchimg"></image>
  20. <input placeholder="输入关键字进行查询" v-model="title" @confirm="getConfirm"/>
  21. </view>
  22. </view>
  23. <view class="tablists flexc mb20">
  24. <block v-for="(ite,idx) in tabList" :key="idx">
  25. <view v-if="!ite.limit||ite.limit&&checkPermi([ite.limit])" @click="getTabFn(ite.val)" :class="{act:tabidx==ite.val}" >{{ite.tit}}</view>
  26. </block>
  27. </view>
  28. <view style="height: 56rpx;"></view>
  29. <view class="lbtab flexc">
  30. <image :src="lbicoimg" class="limg"></image>
  31. <view class="lbtabs flexc">
  32. <view class="lbtabp" v-if="tabidx!='hdtz'">
  33. <picker mode="date" :value="time" @change='bindDateChangeb'>
  34. <view :class="time?'':'f16 co80'">{{time || "会议日期"}}</view>
  35. </picker>
  36. <image :src="upimg" class="upimg"></image>
  37. </view>
  38. <view class="lbtabp" v-if="tabidx=='hdtz'">
  39. <picker mode="date" :value="time" @change='bindDateChangeb'>
  40. <view :class="time?'':'f16 co80'">{{time || "活动日期"}}</view>
  41. </picker>
  42. <image :src="upimg" class="upimg"></image>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 列表 -->
  48. <view class="mbox">
  49. <meet-list :datalist="list" :wtdt="wtdt" :hdlxlist="hdlxlist" :fylxlist='fylxlist' :qjlxlist="aqjlxlist" :type='tabidx' @getDetail="getDetail" @getReadFn="getReadFn" @getTuiFn="getTuiFn"></meet-list>
  50. </view>
  51. <view v-if="checkPermi(['zxConference:conference:add'])&&tabidx=='hyhd'||checkPermi(['zx:speak:add'])&&tabidx=='wdfy'||checkPermi(['zxActivity:activity:add'])&&tabidx=='hdtz'">
  52. <view style="height: 100rpx;"></view>
  53. <view class="fwbtns" @click="getAddMeet" v-if="checkPermi(['zxConference:conference:add'])&&tabidx=='hyhd'">创建会议</view>
  54. <view class="fwbtns" @click="getAddSpeak" v-if="checkPermi(['zx:speak:add'])&&tabidx=='wdfy'">录入发言</view>
  55. <view class="fwbtns" @click="getAddActive" v-if="checkPermi(['zxActivity:activity:add'])&&tabidx=='hdtz'">创建活动</view>
  56. <!-- -->
  57. </view>
  58. <!-- 弹窗 -->
  59. <pop-up :type='ptype' :codeQr="codeQr" @getClose="getClose" @getupSubmit="getupSubmit" :qjlxlist="qjlxlist"></pop-up>
  60. </view>
  61. </template>
  62. <script>
  63. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  64. import {getMeetListFn,getSpeakListFn,getupdateReplyFn,getzxActivityListFn,getzxActivityReplyFn} from "@/api/mine/meeting.js"
  65. import popUp from "@/work/components/popup/popup.vue"
  66. import meetList from "@/work/components/meeting/list.vue"
  67. import {getDictionaryFn} from "@/api/mine/register.js"
  68. export default{
  69. components:{meetList,popUp},
  70. data(){
  71. return{
  72. searchimg: require("@/work/static/images/search.png"),
  73. ccicoimg:require("@/work/static/images/ccico.png"),
  74. lbicoimg:require("@/work/static/images/lbico.png"),
  75. backimg:require("@/work/static/images/back.png"),
  76. upimg:require("@/work/static/images/up.png"),
  77. backgroundColor:"#1D64E2",
  78. tabidx:'hytz',
  79. // 会议活动 管理员看的{tit:'会议发言',val:'hyfy',limit:'zx:speak:list'},
  80. tabList:[{tit:'会议通知',val:'hytz',limit:'zxConference:conference:list'},{tit:'会议活动',val:'hyhd',limit:'zxConference:conference:alllist'},{tit:'我的发言',val:'wdfy',limit:'zx:speak:list'},{tit:'会议发言',val:'hyfy',limit:'zx:speak:alllist'},
  81. {tit:'活动通知',val:'hdtz',limit:'zxActivity:activity:list'}
  82. ],
  83. litablist:[{tit:'会议日期',val:0},],
  84. nvaHeight:44,
  85. talbList:[{},],
  86. taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
  87. talbidx:'',
  88. datainfo:{
  89. talb:'',
  90. },
  91. ptype:'',//弹窗类型
  92. list:[],
  93. pageSize: 10,
  94. pageNum: 1,
  95. reachflag: true,
  96. wtdt:'',
  97. qjlxlist:[],
  98. fylxlist:[],
  99. hdlxlist:[],
  100. aqjlxlist:[],
  101. userId:this.$store.state.user.userId,
  102. id:'',
  103. title:'',//关键词
  104. time:"",
  105. codeQr:""
  106. }
  107. },
  108. onUnload(){
  109. uni.$off('refreshlist')
  110. },
  111. onLoad(e) {
  112. this.getDataFn()
  113. this.init()
  114. uni.$on('refreshlist', (e) => {
  115. this.getDataFn()
  116. })
  117. },
  118. mounted() {
  119. this.getHeightFn()
  120. },
  121. methods:{
  122. checkPermi, checkRole,
  123. init(){
  124. // 请假类型
  125. getDictionaryFn('leave').then(res=>{
  126. if(res.code==200&&res.data.length){
  127. this.qjlxlist = res.data.map(v => {
  128. return {
  129. text: v.dictLabel,
  130. value: v.dictValue
  131. }
  132. })
  133. this.aqjlxlist = res.data.map(v => {
  134. return {
  135. label: v.dictLabel,
  136. value: v.dictValue
  137. }
  138. })
  139. }
  140. })
  141. // 发言类型
  142. getDictionaryFn('speak_type').then(res=>{
  143. if(res.code==200&&res.data.length){
  144. this.fylxlist = res.data.map(v => {
  145. return {
  146. label: v.dictLabel,
  147. value: v.dictValue
  148. }
  149. })
  150. }
  151. })
  152. //活动类型
  153. getDictionaryFn('activity_type').then(res=>{
  154. if(res.code==200&&res.data.length){
  155. this.hdlxlist = res.data.map(v => {
  156. return {
  157. label: v.dictLabel,
  158. value: v.dictValue
  159. }
  160. })
  161. }
  162. })
  163. },
  164. bindDateChangeb(e){
  165. var val=e.detail.value;
  166. this.time=val;
  167. this.getConfirm()
  168. },
  169. getConfirm(){
  170. this.pageNum=1;
  171. this.list=[];
  172. this.reachflag=true;
  173. this.getDataFn()
  174. },
  175. getHeightFn(){
  176. var s=uni.getSystemInfoSync().statusBarHeight;
  177. let query = uni.createSelectorQuery().in(this);
  178. //需要给黄色区域设置一个id标识,在这里是demo
  179. query.select('.navbox').boundingClientRect(data => {
  180. // this.nvaHeight =s? data.height:Number(data.height)-20//赋值,待会要用
  181. this.nvaHeight =Number(data.height)//赋值,待会要用
  182. }).exec();
  183. },
  184. getClose(){
  185. this.ptype=""
  186. },
  187. getTabFn(idx){
  188. this.tabidx=idx;
  189. this.pageNum=1;
  190. this.list=[],
  191. this.reachflag=true;
  192. // this.tabtype=ite.jd||"";
  193. this.getDataFn()
  194. },
  195. getBack(){
  196. uni.navigateBack({
  197. delta:1
  198. })
  199. },
  200. bindDateChangea(e){
  201. console.log(e,2)
  202. },
  203. getReadFn(e){
  204. if(this.tabidx=='hyhd'||this.tabidx=='hdtz'){
  205. this.$tab.navigateTo('/work/pages/meeting/readdetail?id='+e+'&a='+this.tabidx)
  206. }else if(this.tabidx=='hyfy'){
  207. this.$tab.navigateTo('/work/pages/meeting/speaklist?id='+e)
  208. }
  209. },
  210. getTuiFn(ite){
  211. if(ite.type=='hyqd'){
  212. this.$tab.navigateTo('/work/pages/meeting/signin?id='+ite.id)
  213. }else{
  214. this.codeQr=ite.item.conferenceQr
  215. this.ptype=ite.type;
  216. this.id=ite.id
  217. }
  218. },
  219. getDetail(data){
  220. var type=this.tabidx;
  221. if(type=='hyhd'||type=='hytz'){
  222. this.$tab.navigateTo('/work/pages/meeting/details?id='+data)
  223. }else if(type=='wdfy'){
  224. this.$tab.navigateTo('/work/pages/meeting/speakdetails?id='+data)
  225. }else if(type=='hdtz'){
  226. this.$tab.navigateTo('/work/pages/meeting/activedetails?id='+data)
  227. }
  228. },
  229. getAddMeet(){
  230. this.$tab.navigateTo('/work/pages/meeting/add')
  231. },
  232. getAddSpeak(){
  233. this.$tab.navigateTo('/work/pages/meeting/addspeak')
  234. },
  235. getAddActive(){
  236. this.$tab.navigateTo('/work/pages/meeting/addactive')
  237. },
  238. getupSubmit(e){
  239. var that=this;
  240. var type=this.type;
  241. var params=JSON.parse(JSON.stringify(e))
  242. params.userId=this.userId;
  243. if(this.tabidx=='hdtz'){
  244. params.activityId=this.id;
  245. getzxActivityReplyFn(params).then(res=>{
  246. if(res.code==200){
  247. this.$toast("答复成功");
  248. setTimeout(function(){
  249. that.ptype='';
  250. that.pageNum=1;
  251. that.list=[];
  252. that.reachflag=true;
  253. that.getDataFn()
  254. },1200)
  255. }
  256. })
  257. }else {
  258. params.conferenceId=this.id;
  259. getupdateReplyFn(params).then(res=>{
  260. if(res.code==200){
  261. this.$toast("答复成功");
  262. setTimeout(function(){
  263. that.ptype='';
  264. that.pageNum=1;
  265. that.list=[];
  266. that.reachflag=true;
  267. that.getDataFn()
  268. },1200)
  269. }
  270. })
  271. }
  272. },
  273. getDataFn(){
  274. var params={
  275. pageSize:this.pageSize,
  276. pageNum: this.pageNum,
  277. // visitType:3
  278. }
  279. if(this.tabidx=='wdfy'){
  280. params.userId=this.userId;
  281. params.conferenceTitle=this.title
  282. getSpeakListFn(params).then(res=>{
  283. if(res.code==200){
  284. if (res.rows.length < this.pageSize) {
  285. this.reachflag = false
  286. this.wtdt = '到底了~';
  287. } else {
  288. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  289. if (num < res.total) {
  290. this.reachflag = true
  291. this.wtdt = '上拉加载更多'
  292. } else {
  293. this.reachflag = false
  294. this.wtdt = '到底了~';
  295. }
  296. }
  297. if (this.pageNum == 1) {
  298. this.list = res.rows;
  299. } else {
  300. this.list = this.list.concat(res.rows)
  301. }
  302. }else{
  303. this.$toast(res.msg)
  304. }
  305. })
  306. }else if(this.tabidx=='hyfy'){
  307. params.conferenceTitle=this.title
  308. getSpeakListFn(params).then(res=>{
  309. if(res.code==200){
  310. if (res.rows.length < this.pageSize) {
  311. this.reachflag = false
  312. this.wtdt = '到底了~';
  313. } else {
  314. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  315. if (num < res.total) {
  316. this.reachflag = true
  317. this.wtdt = '上拉加载更多'
  318. } else {
  319. this.reachflag = false
  320. this.wtdt = '到底了~';
  321. }
  322. }
  323. if (this.pageNum == 1) {
  324. this.list = res.rows;
  325. } else {
  326. this.list = this.list.concat(res.rows)
  327. }
  328. }else{
  329. this.$toast(res.msg)
  330. }
  331. })
  332. }else if(this.tabidx=='hdtz'){
  333. if(this.time){
  334. params.activityDate=this.time
  335. }
  336. params.activityTitle=this.title
  337. getzxActivityListFn(params).then(res=>{
  338. if(res.code==200){
  339. if (res.rows.length < this.pageSize) {
  340. this.reachflag = false
  341. this.wtdt = '到底了~';
  342. } else {
  343. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  344. if (num < res.total) {
  345. this.reachflag = true
  346. this.wtdt = '上拉加载更多'
  347. } else {
  348. this.reachflag = false
  349. this.wtdt = '到底了~';
  350. }
  351. }
  352. if (this.pageNum == 1) {
  353. this.list = res.rows;
  354. } else {
  355. this.list = this.list.concat(res.rows)
  356. }
  357. }else{
  358. this.$toast(res.msg)
  359. }
  360. })
  361. }else{
  362. if(this.tabidx=='hytz'){
  363. params.userId=this.userId
  364. }
  365. if(this.time){
  366. params.conferenceDate=this.time
  367. }
  368. params.conferenceTitle=this.title
  369. getMeetListFn(params).then(res=>{
  370. if(res.code==200){
  371. if (res.rows.length < this.pageSize) {
  372. this.reachflag = false
  373. this.wtdt = '到底了~';
  374. } else {
  375. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  376. if (num < res.total) {
  377. this.reachflag = true
  378. this.wtdt = '上拉加载更多'
  379. } else {
  380. this.reachflag = false
  381. this.wtdt = '到底了~';
  382. }
  383. }
  384. if (this.pageNum == 1) {
  385. this.list = res.rows;
  386. } else {
  387. this.list = this.list.concat(res.rows)
  388. }
  389. }else{
  390. this.$toast(res.msg)
  391. }
  392. })
  393. }
  394. },
  395. }
  396. }
  397. </script>
  398. <style scoped lang="scss">
  399. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background-color: $com-cd3;
  400. .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
  401. image{width: 40rpx;height: 30rpx;}
  402. }
  403. .topr{display: flex;align-items: center;
  404. image{width: 26rpx;height: 26rpx;margin-right: 12rpx;}
  405. view{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
  406. }
  407. .tablists{
  408. overflow: auto;flex-wrap: nowrap;
  409. 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;
  410. &:last-child{margin-right: 0;}
  411. &.act{font-size: 30rpx;
  412. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  413. }
  414. }
  415. }
  416. .lbtab{height: 114rpx;background: #FFFFFF;border-radius: 30rpx;padding-left: 24rpx;position: absolute;left:24rpx;right: 24rpx;bottom: -58rpx;
  417. .limg{width: 40rpx;height: 34rpx;margin-right: 10rpx;flex:0 0 auto;}
  418. .lbtabs{overflow: auto;flex-wrap: nowrap;
  419. .lbtabp{display: flex;align-items: center;flex: 0 0 auto;margin-right: 24rpx;}
  420. .upimg{width: 18rpx;height: 10rpx;}
  421. }
  422. }
  423. }
  424. .mbox{padding:58rpx 24rpx 28rpx;}
  425. .lbtabs /deep/ picker{padding: 0 18rpx;}
  426. </style>