list.vue 18 KB

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