list.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  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. <block v-if="tabidx!='hdtz'&&tabidx!='zxhd'">
  33. <view class="lbtabp">
  34. <picker mode="date" :value="time" @change='bindDateChangeb'>
  35. <view :class="time?'':'f16 co80'">{{time || "会议日期"}}</view>
  36. </picker>
  37. <image :src="upimg" class="upimg"></image>
  38. </view>
  39. <view class="lbtabp" v-if="tabidx=='hytz'||tabidx=='hyhd'">
  40. <picker range-key='label' :range="hylxlist" @change='bindDateChangec'>
  41. <view :class="hylxtxt?'':'f16 co80'">{{hylxtxt || "会议类型"}}</view>
  42. </picker>
  43. <image :src="upimg" class="upimg"></image>
  44. </view>
  45. </block>
  46. <block v-if="tabidx=='hdtz'||tabidx=='zxhd'">
  47. <view class="lbtabp" >
  48. <picker mode="date" :value="time" @change='bindDateChangeb'>
  49. <view :class="time?'':'f16 co80'">{{time || "活动日期"}}</view>
  50. </picker>
  51. <image :src="upimg" class="upimg"></image>
  52. </view>
  53. <view class="lbtabp" >
  54. <picker range-key='label' :range="hdlxlist" @change='bindDateChanged'>
  55. <view :class="hdlxtxt?'':'f16 co80'">{{hdlxtxt || "活动类型"}}</view>
  56. </picker>
  57. <image :src="upimg" class="upimg"></image>
  58. </view>
  59. </block>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 列表 -->
  64. <view class="mbox">
  65. <meet-list :datalist="list" :wtdt="wtdt" :hdlxlist="hdlxlist" :fylxlist='fylxlist' :qjlxlist="aqjlxlist" :type='tabidx' @getDetail="getDetail" @getReadFn="getReadFn" @getTuiFn="getTuiFn"></meet-list>
  66. </view>
  67. <view v-if="checkPermi(['zxConference:conference:add'])||checkPermi(['zx:speak:add'])||checkPermi(['zxActivity:activity:add'])">
  68. <view style="height: 100rpx;"></view>
  69. <view class="fwbtns" @click="getAddMeet" v-if="checkPermi(['zxConference:conference:add'])&&(tabidx=='hyhd'||tabidx=='hytz')">创建会议</view>
  70. <view class="fwbtns" @click="getAddSpeak" v-if="checkPermi(['zx:speak:add'])&&(tabidx=='wdfy'||tabidx=='hyfy')">录入发言</view>
  71. <view class="fwbtns" @click="getAddActive" v-if="checkPermi(['zxActivity:activity:add'])&&(tabidx=='zxhd'||tabidx=='hdtz')">创建活动</view>
  72. <view class="fwbtns" @click="getAddzsyz" v-if="checkPermi(['zx:investment:add'])&&(tabidx=='zsyz'||tabidx=='wdzs')">上报线索</view>
  73. <!-- -->
  74. </view>
  75. <!-- 弹窗 -->
  76. <pop-up :type='ptype' :codeQr="codeQr" @getClose="getClose" @getupSubmit="getupSubmit" :qjlxlist="qjlxlist"></pop-up>
  77. </view>
  78. </template>
  79. <script>
  80. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  81. import {getMeetListFn,getSpeakListFn,getupdateReplyFn,getzxActivityListFn,getzxActivityReplyFn,getinvestmentListFn,getinvestmentshlFn} from "@/api/mine/meeting.js"
  82. import popUp from "@/work/components/popup/popup.vue"
  83. import meetList from "@/work/components/meeting/list.vue"
  84. import {getDictionaryFn} from "@/api/mine/register.js"
  85. export default{
  86. components:{meetList,popUp},
  87. data(){
  88. return{
  89. searchimg: require("@/work/static/images/search.png"),
  90. ccicoimg:require("@/work/static/images/ccico.png"),
  91. lbicoimg:require("@/work/static/images/lbico.png"),
  92. backimg:require("@/work/static/images/back.png"),
  93. upimg:require("@/work/static/images/up.png"),
  94. backgroundColor:"#1D64E2",
  95. tabidx:'hytz',
  96. // 会议活动 管理员看的{tit:'会议发言',val:'hyfy',limit:'zx:speak:list'},
  97. 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'},
  98. {tit:'我的活动',val:'hdtz',limit:'zxActivity:activity:list'},{tit:'政协活动',val:'zxhd',limit:'zxActivity:activity:alllist'},{tit:'我的招商',val:'wdzs',limit:'zx:investment:list'},{tit:'招商引资',val:'zsyz',limit:'zx:investment:alllist'},
  99. ],
  100. litablist:[{tit:'会议日期',val:0},],
  101. nvaHeight:44,
  102. talbList:[{},],
  103. taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
  104. talbidx:'',
  105. datainfo:{
  106. talb:'',
  107. },
  108. ptype:'',//弹窗类型
  109. list:[],
  110. pageSize: 10,
  111. pageNum: 1,
  112. reachflag: true,
  113. wtdt:'',
  114. qjlxlist:[],
  115. fylxlist:[],
  116. hdlxlist:[],
  117. aqjlxlist:[],
  118. hylxlist:[],
  119. hdlxtxt:'',
  120. hdlxid:'',
  121. hylxtxt:'',
  122. hylxid:'',
  123. userId:this.$store.state.user.userId,
  124. id:'',
  125. title:'',//关键词
  126. time:"",
  127. codeQr:""
  128. }
  129. },
  130. onUnload(){
  131. uni.$off('refreshlist')
  132. },
  133. onLoad(e) {
  134. this.getDataFn()
  135. this.init()
  136. uni.$on('refreshlist', (e) => {
  137. this.pageNum=1;
  138. this.list=[];
  139. this.reachflag=true;
  140. this.getDataFn()
  141. })
  142. },
  143. // 上拉触底加载更多触发事件
  144. onReachBottom() {
  145. if (this.reachflag) {
  146. this.pageNum++
  147. this.getDataFn()
  148. }
  149. },
  150. mounted() {
  151. this.getHeightFn()
  152. },
  153. methods:{
  154. checkPermi, checkRole,
  155. init(){
  156. // 请假类型
  157. getDictionaryFn('leave').then(res=>{
  158. if(res.code==200&&res.data.length){
  159. this.qjlxlist = res.data.map(v => {
  160. return {
  161. text: v.dictLabel,
  162. value: v.dictValue
  163. }
  164. })
  165. this.aqjlxlist = res.data.map(v => {
  166. return {
  167. label: v.dictLabel,
  168. value: v.dictValue
  169. }
  170. })
  171. }
  172. })
  173. // 发言类型
  174. getDictionaryFn('speak_type').then(res=>{
  175. if(res.code==200&&res.data.length){
  176. this.fylxlist = res.data.map(v => {
  177. return {
  178. label: v.dictLabel,
  179. value: v.dictValue
  180. }
  181. })
  182. }
  183. })
  184. //活动类型
  185. getDictionaryFn('activity_type').then(res=>{
  186. if(res.code==200&&res.data.length){
  187. this.hdlxlist = res.data.map(v => {
  188. return {
  189. label: v.dictLabel,
  190. value: v.dictValue
  191. }
  192. })
  193. }
  194. })
  195. // 会议类型
  196. getDictionaryFn('conference_type').then(res=>{
  197. if(res.code==200&&res.data.length){
  198. this.hylxlist = res.data.map(v => {
  199. return {
  200. label: v.dictLabel,
  201. value: v.dictValue
  202. }
  203. })
  204. }
  205. })
  206. },
  207. bindDateChangeb(e){
  208. var val=e.detail.value;
  209. this.time=val;
  210. this.getConfirm()
  211. },
  212. bindDateChangec(e){
  213. var val=e.detail.value;
  214. this.hylxtxt=this.hylxlist[val].label;
  215. this.hylxid=this.hylxlist[val].value;
  216. this.getConfirm()
  217. },
  218. bindDateChanged(e){
  219. var val=e.detail.value;
  220. this.hdlxtxt=this.hdlxlist[val].label;
  221. this.hdlxid=this.hdlxlist[val].value;
  222. this.getConfirm()
  223. },
  224. getConfirm(){
  225. this.pageNum=1;
  226. this.list=[];
  227. this.reachflag=true;
  228. this.getDataFn()
  229. },
  230. getHeightFn(){
  231. var s=uni.getSystemInfoSync().statusBarHeight;
  232. let query = uni.createSelectorQuery().in(this);
  233. //需要给黄色区域设置一个id标识,在这里是demo
  234. query.select('.navbox').boundingClientRect(data => {
  235. // this.nvaHeight =s? data.height:Number(data.height)-20//赋值,待会要用
  236. this.nvaHeight =Number(data.height)//赋值,待会要用
  237. }).exec();
  238. },
  239. getClose(){
  240. this.ptype=""
  241. },
  242. getTabFn(idx){
  243. this.tabidx=idx;
  244. this.pageNum=1;
  245. this.list=[],
  246. this.reachflag=true;
  247. // this.tabtype=ite.jd||"";
  248. this.getDataFn()
  249. },
  250. getBack(){
  251. uni.navigateBack({
  252. delta:1
  253. })
  254. },
  255. bindDateChangea(e){
  256. console.log(e,2)
  257. },
  258. getReadFn(e){
  259. if(this.tabidx=='hyhd'||this.tabidx=='hdtz'||this.tabidx=='zxhd'){
  260. this.$tab.navigateTo('/work/pages/meeting/readdetail?id='+e+'&a='+this.tabidx)
  261. }else if(this.tabidx=='hyfy'){
  262. this.$tab.navigateTo('/work/pages/meeting/speaklist?id='+e)
  263. }
  264. },
  265. getTuiFn(ite){
  266. var that=this;
  267. if(ite.type=='hyqd'){
  268. this.$tab.navigateTo('/work/pages/meeting/signin?id='+ite.id)
  269. }else if(ite.type=='zsyzsh'){
  270. uni.showModal({
  271. title: '确认审核',
  272. content: "是否确认审核",
  273. cancelText: '取消',
  274. confirmText: '确认',
  275. success: function(res) {
  276. if (res.confirm) {
  277. var params={
  278. investmentId:ite.id,
  279. type:2
  280. }
  281. getinvestmentshlFn(params).then(res=>{
  282. if(res.code==200){
  283. that.$toast('审核成功')
  284. that.ptype='';
  285. that.pageNum=1;
  286. that.list=[];
  287. that.reachflag=true;
  288. that.getDataFn()
  289. }
  290. })
  291. } else if (res.cancel) {
  292. }
  293. }
  294. })
  295. }else if(ite.type=='zsyzqy'){
  296. uni.showModal({
  297. title: '确认签约',
  298. content: "是否确认签约",
  299. cancelText: '取消',
  300. confirmText: '确认',
  301. success: function(res) {
  302. if (res.confirm) {
  303. var params={
  304. investmentId:ite.id,
  305. type:2
  306. }
  307. getinvestmentshlFn(params).then(res=>{
  308. if(res.code==200){
  309. that.$toast('签约成功')
  310. that.ptype='';
  311. that.pageNum=1;
  312. that.list=[];
  313. that.reachflag=true;
  314. that.getDataFn()
  315. }
  316. })
  317. } else if (res.cancel) {
  318. }
  319. }
  320. })
  321. }else{
  322. this.codeQr=ite.item.conferenceQr
  323. this.ptype=ite.type;
  324. this.id=ite.id
  325. }
  326. },
  327. getDetail(data){
  328. var type=this.tabidx;
  329. if(type=='hyhd'||type=='hytz'){
  330. this.$tab.navigateTo('/work/pages/meeting/details?id='+data+"&pt="+type)
  331. }else if(type=='wdfy'||type=='hyfy'){
  332. this.$tab.navigateTo('/work/pages/meeting/speakdetails?id='+data)
  333. }else if(type=='hdtz'||type=='zxhd'){
  334. this.$tab.navigateTo('/work/pages/meeting/activedetails?id='+data+"&pt="+type)
  335. }else if(type=='zsyz'||type=='wdzs'){
  336. this.$tab.navigateTo('/work/pages/meeting/zsyzdetails?id='+data+"&pt="+type)
  337. }
  338. },
  339. getAddMeet(){
  340. this.$tab.navigateTo('/work/pages/meeting/add')
  341. },
  342. getAddSpeak(){
  343. this.$tab.navigateTo('/work/pages/meeting/addspeak')
  344. },
  345. getAddActive(){
  346. this.$tab.navigateTo('/work/pages/meeting/addactive')
  347. },
  348. getAddzsyz(){
  349. this.$tab.navigateTo('/work/pages/meeting/addzsyz')
  350. },
  351. getupSubmit(e){
  352. var that=this;
  353. var type=this.type;
  354. var params=JSON.parse(JSON.stringify(e))
  355. params.userId=this.userId;
  356. if(this.tabidx=='hdtz'){
  357. params.activityId=this.id;
  358. getzxActivityReplyFn(params).then(res=>{
  359. if(res.code==200){
  360. this.$toast("答复成功");
  361. setTimeout(function(){
  362. that.ptype='';
  363. that.pageNum=1;
  364. that.list=[];
  365. that.reachflag=true;
  366. that.getDataFn()
  367. },1200)
  368. }
  369. })
  370. }else {
  371. params.conferenceId=this.id;
  372. getupdateReplyFn(params).then(res=>{
  373. if(res.code==200){
  374. this.$toast("答复成功");
  375. setTimeout(function(){
  376. that.ptype='';
  377. that.pageNum=1;
  378. that.list=[];
  379. that.reachflag=true;
  380. that.getDataFn()
  381. },1200)
  382. }
  383. })
  384. }
  385. },
  386. getDataFn(){
  387. var params={
  388. pageSize:this.pageSize,
  389. pageNum: this.pageNum,
  390. // visitType:3
  391. }
  392. if(this.tabidx=='wdfy'){
  393. params.userId=this.userId;
  394. params.conferenceTitle=this.title
  395. getSpeakListFn(params).then(res=>{
  396. if(res.code==200){
  397. if (res.rows.length < this.pageSize) {
  398. this.reachflag = false
  399. this.wtdt = '到底了~';
  400. } else {
  401. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  402. if (num < res.total) {
  403. this.reachflag = true
  404. this.wtdt = '上拉加载更多'
  405. } else {
  406. this.reachflag = false
  407. this.wtdt = '到底了~';
  408. }
  409. }
  410. if (this.pageNum == 1) {
  411. this.list = res.rows;
  412. } else {
  413. this.list = this.list.concat(res.rows)
  414. }
  415. }else{
  416. this.$toast(res.msg)
  417. }
  418. })
  419. }else if(this.tabidx=='hyfy'){
  420. params.conferenceTitle=this.title
  421. getSpeakListFn(params).then(res=>{
  422. if(res.code==200){
  423. if (res.rows.length < this.pageSize) {
  424. this.reachflag = false
  425. this.wtdt = '到底了~';
  426. } else {
  427. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  428. if (num < res.total) {
  429. this.reachflag = true
  430. this.wtdt = '上拉加载更多'
  431. } else {
  432. this.reachflag = false
  433. this.wtdt = '到底了~';
  434. }
  435. }
  436. if (this.pageNum == 1) {
  437. this.list = res.rows;
  438. } else {
  439. this.list = this.list.concat(res.rows)
  440. }
  441. }else{
  442. this.$toast(res.msg)
  443. }
  444. })
  445. }else if(this.tabidx=='hdtz'||this.tabidx=='zxhd'){
  446. if(this.time){
  447. params.activityDate=this.time
  448. }
  449. if(this.tabidx=='hdtz'){
  450. params.userId=this.userId
  451. }
  452. if(this.hdlxtxt){
  453. params.activityType=this.hdlxid
  454. }
  455. params.activityTitle=this.title
  456. getzxActivityListFn(params).then(res=>{
  457. if(res.code==200){
  458. if (res.rows.length < this.pageSize) {
  459. this.reachflag = false
  460. this.wtdt = '到底了~';
  461. } else {
  462. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  463. if (num < res.total) {
  464. this.reachflag = true
  465. this.wtdt = '上拉加载更多'
  466. } else {
  467. this.reachflag = false
  468. this.wtdt = '到底了~';
  469. }
  470. }
  471. if (this.pageNum == 1) {
  472. this.list = res.rows;
  473. } else {
  474. this.list = this.list.concat(res.rows)
  475. }
  476. }else{
  477. this.$toast(res.msg)
  478. }
  479. })
  480. }else if(this.tabidx=='zsyz'||this.tabidx=='wdzs'){
  481. if(this.time){
  482. params.activityDate=this.time
  483. }
  484. if(this.tabidx=='wdzs'){
  485. params.userId=this.userId
  486. }
  487. params.clueName=this.title
  488. getinvestmentListFn(params).then(res=>{
  489. if(res.code==200){
  490. if (res.rows.length < this.pageSize) {
  491. this.reachflag = false
  492. this.wtdt = '到底了~';
  493. } else {
  494. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  495. if (num < res.total) {
  496. this.reachflag = true
  497. this.wtdt = '上拉加载更多'
  498. } else {
  499. this.reachflag = false
  500. this.wtdt = '到底了~';
  501. }
  502. }
  503. if (this.pageNum == 1) {
  504. this.list = res.rows;
  505. } else {
  506. this.list = this.list.concat(res.rows)
  507. }
  508. }else{
  509. this.$toast(res.msg)
  510. }
  511. })
  512. }else{
  513. if(this.tabidx=='hytz'){
  514. params.userId=this.userId
  515. }
  516. if(this.hylxtxt){
  517. params.conferenceType=this.hylxid
  518. }
  519. if(this.time){
  520. params.conferenceDate=this.time
  521. }
  522. params.conferenceTitle=this.title
  523. getMeetListFn(params).then(res=>{
  524. if(res.code==200){
  525. if (res.rows.length < this.pageSize) {
  526. this.reachflag = false
  527. this.wtdt = '到底了~';
  528. } else {
  529. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  530. if (num < res.total) {
  531. this.reachflag = true
  532. this.wtdt = '上拉加载更多'
  533. } else {
  534. this.reachflag = false
  535. this.wtdt = '到底了~';
  536. }
  537. }
  538. if (this.pageNum == 1) {
  539. this.list = res.rows;
  540. } else {
  541. this.list = this.list.concat(res.rows)
  542. }
  543. }else{
  544. this.$toast(res.msg)
  545. }
  546. })
  547. }
  548. },
  549. }
  550. }
  551. </script>
  552. <style scoped lang="scss">
  553. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background-color: $com-cd3;
  554. .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
  555. image{width: 40rpx;height: 30rpx;}
  556. }
  557. .topr{display: flex;align-items: center;
  558. image{width: 26rpx;height: 26rpx;margin-right: 12rpx;}
  559. view{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
  560. }
  561. .tablists{
  562. overflow: auto;flex-wrap: nowrap;
  563. 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;
  564. &:last-child{margin-right: 0;}
  565. &.act{font-size: 30rpx;
  566. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  567. }
  568. }
  569. }
  570. .lbtab{height: 114rpx;background: #FFFFFF;border-radius: 30rpx;padding-left: 24rpx;position: absolute;left:24rpx;right: 24rpx;bottom: -58rpx;
  571. .limg{width: 40rpx;height: 34rpx;margin-right: 10rpx;flex:0 0 auto;}
  572. .lbtabs{overflow: auto;flex-wrap: nowrap;
  573. .lbtabp{display: flex;align-items: center;flex: 0 0 auto;margin-right: 24rpx;}
  574. .upimg{width: 18rpx;height: 10rpx;}
  575. }
  576. }
  577. }
  578. .mbox{padding:58rpx 24rpx 28rpx;}
  579. .lbtabs /deep/ picker{padding: 0 18rpx;}
  580. </style>