index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. <template>
  2. <view class="zxbox">
  3. <view class="zxtop">
  4. <view class="navbox">
  5. <uni-nav-bar color="#ffffff" leftWidth='340rpx' @clickRight="getNewsFn" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  6. <block slot="left">
  7. <image :src="titimg" class="topl"></image>
  8. </block>
  9. <block slot="right">
  10. <view class="topr">
  11. <image :src="noticeimg"></image>
  12. <view class="cir"></view>
  13. </view>
  14. </block>
  15. </uni-nav-bar>
  16. </view>
  17. <image :src="bgimg" class="bgimg"></image>
  18. <view class="zxmain">
  19. <view class="flexc mb27">
  20. <view class="htop" @click="getAddCase" v-if="checkPermi(['proposalInfo:info:add'])">
  21. <view class="imgs">
  22. <image :src="htopa" class="imga"></image>
  23. </view>
  24. <view class="tit">提交提案</view>
  25. </view>
  26. <view class="htop" v-if="checkPermi(['sqmyInfo:info:add'])">
  27. <view class="imgs">
  28. <image :src="htopb" class="imgb"></image>
  29. </view>
  30. <view class="tit">上报社情民意</view>
  31. </view>
  32. <view class="htop" v-if="checkPermi(['member:info:list'])">
  33. <view class="imgs">
  34. <image :src="htopc" class="imgc"></image>
  35. </view>
  36. <view class="tit">履职档案</view>
  37. </view>
  38. <view class="htop" @click="getAddhy" v-if="checkPermi(['zxConference:conference:add'])">
  39. <view class="imgs">
  40. <image :src="htopd" class="imga"></image>
  41. </view>
  42. <view class="tit">创建会议</view>
  43. </view>
  44. </view>
  45. <view class="hbox">
  46. <!-- 通知栏 -->
  47. <h-notice></h-notice>
  48. <!-- 入口 -->
  49. <view class="mt22">
  50. <view class="htit">快捷入口</view>
  51. <view class="mt18 flexcw">
  52. <view class="htbox" @click="getZxCaseFn" v-if="checkPermi(['proposalInfo:info:list'])">
  53. <image :src="hrbga" class="hrbg"></image>
  54. <view class="htboxa flexc">
  55. <view class="flex1 mr10">
  56. <view class="tit">政协提案</view>
  57. <view class="txt">全方位审核委员提案</view>
  58. </view>
  59. <image :src="hrimga" class="flex0 imga"></image>
  60. </view>
  61. </view>
  62. <view class="htbox">
  63. <image :src="hrbgb" class="hrbg"></image>
  64. <view class="htboxa flexc">
  65. <view class="flex1 mr10">
  66. <view class="tit">社情民意</view>
  67. <view class="txt">录入社情民意信息</view>
  68. </view>
  69. <image :src="hrimgb" class="flex0 imgb"></image>
  70. </view>
  71. </view>
  72. <view class="htbox" @click="getlzInfoFn">
  73. <image :src="hrbgc" class="hrbg"></image>
  74. <view class="htboxa flexc">
  75. <view class="flex1 mr10">
  76. <view class="tit">履职信息</view>
  77. <view class="txt">管理委员履职信息</view>
  78. </view>
  79. <image :src="hrimgc" class="flex0 imgc"></image>
  80. </view>
  81. </view>
  82. <view class="htbox" @click="getMettFn" v-if="checkPermi(['zxConference:conference:list'])">
  83. <image :src="hrbgd" class="hrbg"></image>
  84. <view class="htboxa flexc">
  85. <view class="flex1 mr10">
  86. <view class="tit">会议活动</view>
  87. <view class="txt">了解会议活动信息</view>
  88. </view>
  89. <image :src="hrimgd" class="flex0 imgd"></image>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <!-- 新闻 -->
  98. <view class="hnbox">
  99. <view class="hntabs flexc" :class="fixedflag?'tabfix':''" :style="fixedflag?'top:'+nvaHeight+'px;':''">
  100. <view class="flex1 flexc">
  101. <view class="tit" v-for="(ite,idx) in tabList" :key="idx" :class="tabval==ite.val?'act':''" @click="getTab(ite.val)">{{ite.tit}}</view>
  102. </view>
  103. <view class="flex0 txtr">了解更多>></view>
  104. </view>
  105. <view style="height:114rpx;" v-if="fixedflag"></view>
  106. <!-- 列表 -->
  107. <view class="mt2 plr12">
  108. <notice-list :datalist="list" :wtdt="wtdt" type='1' @getDetail="getDetail"></notice-list>
  109. <view class="upmore flexccc">
  110. <image :src="upimg"></image>
  111. <view>下拉更多</view>
  112. </view>
  113. </view>
  114. </view>
  115. <pop-up :type='ptype' @getClose="getClose" @getFaFn="getFaFn"></pop-up>
  116. <footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
  117. </view>
  118. </template>
  119. <script>
  120. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  121. // let { calendar } = require("@/components/lunc-calendar/calendar.js");
  122. // import {getReservatcountl,getReservatList,getReservatDel,getReservatSh} from "@/api/mine/order.js"
  123. // import {getDictionaryFn} from "@/api/mine/register.js"
  124. import popUp from "@/components/popup/popup.vue"
  125. import hNotice from '@/components/swiper/notice.vue'
  126. import noticeList from '@/components/notice/list.vue'
  127. import footers from '@/components/footer/footer.vue'
  128. export default {
  129. components:{hNotice,noticeList,footers,popUp},
  130. data(){
  131. return{
  132. footlist:[
  133. {module:'home',title:'潜山政协',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png')},
  134. {module:'report',title:'履职报告',icon_checked:require('@/static/images/tabbar/report_.png'),icon_nochecked:require('@/static/images/tabbar/report.png')},
  135. {module:'notice',title:'会议通知',icon_checked:require('@/static/images/tabbar/notice_.png'),icon_nochecked:require('@/static/images/tabbar/notice.png')},
  136. {module:'mine',title:'个人中心',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
  137. ],
  138. color_checked :'222327',
  139. color_nochecked :'AAAAAA',
  140. footerindex:'home',
  141. isfootflag:true,
  142. backgroundColor:'transparent',
  143. bgimg:require("@/static/images/bg.png"),
  144. titimg:require("@/static/images/home/tit.png"),
  145. noticeimg:require("@/static/images/home/notice.png"),
  146. htopa:require("@/static/images/home/htopa.png"),
  147. htopb:require("@/static/images/home/htopb.png"),
  148. htopc:require("@/static/images/home/htopc.png"),
  149. htopd:require("@/static/images/home/htopd.png"),
  150. hrbga:require("@/static/images/home/hrbga.png"),
  151. hrbgb:require("@/static/images/home/hrbgb.png"),
  152. hrbgc:require("@/static/images/home/hrbgc.png"),
  153. hrbgd:require("@/static/images/home/hrbgd.png"),
  154. hrimga:require("@/static/images/home/hrimga.png"),
  155. hrimgb:require("@/static/images/home/hrimgb.png"),
  156. hrimgc:require("@/static/images/home/hrimgc.png"),
  157. hrimgd:require("@/static/images/home/hrimgd.png"),
  158. upimg:require("@/static/images/home/up.png"),
  159. tabval:'0',
  160. tabList:[{tit:'公开提案',val:'0'},{tit:'社情民意',val:'1'},],
  161. list:[
  162. {tit:'全国政协十四届二次会议在京开幕 习近平等党和 国家领导人到会祝贺',img:require("@/static/images/bg.png"),from:'新华网',time:'2024-03-04',isTop:true},
  163. {tit:'政协全国委员会关于颁发2023年度全国政协委员 优秀履职奖的决定',img:require("@/static/images/bg.png"),from:'人民政协报',time:'2024-03-03',isTop:false},
  164. {tit:'市政协办公室党支部召开党员大会',img:require("@/static/images/bg.png"),from:'人民政协报',time:'2024-03-02',isTop:false},
  165. ],
  166. pageSize: 10,
  167. pageNum: 1,
  168. reachflag: true,
  169. wtdt:'',
  170. nvaHeight:44,
  171. listTop:0,//距离顶部的距离
  172. fixedflag:false,
  173. ptype:"",//lmta 联名填弹窗
  174. }
  175. },
  176. onPageScroll(e) {
  177. var scrollTop = Number(e.scrollTop);
  178. var listTop=Number(this.listTop)-Number(this.nvaHeight)
  179. if (scrollTop <=this.nvaHeight) {
  180. const opacity = scrollTop / 100 // 计算透明度值
  181. const color = `rgba(29, 100, 226, ${opacity})`
  182. this.backgroundColor = color // 更新盒子背景颜色
  183. } else {
  184. this.backgroundColor = '#1D64E2'
  185. }
  186. if(scrollTop>listTop){
  187. this.fixedflag=true
  188. }else{
  189. this.fixedflag=false
  190. }
  191. },
  192. onLoad: function() {
  193. // uni.$on('refreshdatalist',(e) => {
  194. // this.reachflag=false;
  195. // this.pageNum=1;
  196. // this.list=[];
  197. // this.getDataFn();
  198. // // this.getcount();
  199. // })
  200. // this.init()
  201. // // this.getcount()
  202. // this.getDataFn()
  203. this.nvaHeight=uni.getSystemInfoSync().statusBarHeight+44;
  204. },
  205. onUnload() {
  206. uni.$off('refreshdatalist')
  207. },
  208. onShow() {
  209. // var that=this;
  210. // this.time();
  211. },
  212. mounted() {
  213. this.getHeightFn()
  214. },
  215. // 上拉触底加载更多触发事件
  216. onReachBottom() {
  217. // if (this.reachflag) {
  218. // this.pageNum++
  219. // this.getDataFn()
  220. // }
  221. },
  222. methods:{
  223. checkPermi, checkRole,
  224. getNewsFn(){
  225. this.$tab.navigateTo('/work/pages/news/list')
  226. },
  227. getClose(){
  228. this.ptype=''
  229. },
  230. getTab(val){
  231. this.tabval=val;
  232. },
  233. getHeightFn(){
  234. let query = uni.createSelectorQuery().in(this);
  235. //需要给黄色区域设置一个id标识,在这里是demo
  236. query.select('.zxtop').boundingClientRect(data => {
  237. this.listTop = data.height//赋值,待会要用
  238. }).exec();
  239. },
  240. getAddCase(){
  241. if(uni.getStorageSync('tjtaList')){
  242. // var newObj=JSON.parse(JSON.stringify(uni.getStorageSync('tjtaList')))
  243. this.ptype='zcta'
  244. }else{
  245. this.$tab.navigateTo('/work/pages/case/add')
  246. }
  247. },
  248. getAddhy(){
  249. if(uni.getStorageSync('cjhyList')){
  250. this.ptype='zchy'
  251. }else{
  252. this.$tab.navigateTo('/work/pages/meeting/add')
  253. }
  254. },
  255. getFaFn(type,ptype){
  256. this.ptype='';
  257. if(ptype=='zcta'){
  258. if(type=='new'){uni.removeStorageSync('tjtaList')}
  259. this.$tab.navigateTo('/work/pages/case/add?type='+type)
  260. }else if(ptype=='zchy'){
  261. if(type=='new'){uni.removeStorageSync('cjhyList')}
  262. this.$tab.navigateTo('/work/pages/meeting/add?type='+type)
  263. }
  264. },
  265. getZxCaseFn(){
  266. this.$tab.navigateTo('/work/pages/case/mine')
  267. },
  268. getMettFn(){
  269. this.$tab.navigateTo('/work/pages/meeting/list')
  270. },
  271. getlzInfoFn(){
  272. this.$tab.navigateTo('/work/pages/report/info')
  273. },
  274. init(){
  275. // 记录来源
  276. getDictionaryFn('jluly').then(res=>{
  277. if(res.code==200){
  278. this.adrlist = res.data.map(v => {
  279. return {
  280. dictLabel: v.dictLabel,
  281. dictValue: v.dictValue
  282. }
  283. })
  284. }
  285. })
  286. },
  287. getMoreFn(){
  288. this.$tab.navigateTo("/pages/order/list")
  289. },
  290. getDelFn(id){
  291. var that=this;
  292. getReservatDel(id).then(res=>{
  293. if(res.code==200){
  294. that.$toast('删除成功')
  295. setTimeout(function(){
  296. that.reachflag=true;
  297. that.pageNum=1;
  298. that.list=[];
  299. that.getDataFn();
  300. // that.getcount();
  301. },1500)
  302. }else{
  303. that.$toast(res.msg)
  304. }
  305. })
  306. },
  307. gettypeFn(ite){
  308. var that=this;
  309. var params={
  310. reservatId:ite.id,
  311. visitType:ite.type
  312. }
  313. getReservatSh(params).then(res=>{
  314. if(res.code==200){
  315. that.$toast('审核成功')
  316. setTimeout(function(){
  317. that.reachflag=true;
  318. that.pageNum=1;
  319. that.list=[];
  320. that.getDataFn();
  321. // that.getcount();
  322. },1500)
  323. }else{
  324. that.$toast(res.msg)
  325. }
  326. })
  327. },
  328. time() {
  329. var date = new Date();
  330. var y = date.getFullYear();
  331. var m = date.getMonth() + 1;
  332. var d = date.getDate();
  333. let lunar = calendar.solar2lunar(y, m, d); //农历
  334. this.lunar=lunar.IMonthCn+lunar.IDayCn;
  335. this.daytime=m+'月'+d+"日";
  336. // var h = date.getHours();
  337. // var min = date.getMinutes();
  338. // var s = date.getSeconds();
  339. // var week = date.getDay(); //获取当前星期X(0-6,0代表星期天)
  340. // var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  341. // var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
  342. // var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
  343. // '0' + s) : s);
  344. // this.kaTime = yearStr + ' ' + timeStr;
  345. },
  346. getcount(){
  347. getReservatcountl().then(res=>{
  348. if(res.code==200){
  349. this.conuntinfo=res.data
  350. }else{
  351. this.$toast(res.msg)
  352. }
  353. })
  354. },
  355. getDetail(data){
  356. this.$tab.navigateTo('/pages/order/staffcode?type=look&id='+data)
  357. },
  358. getDataFn(){
  359. var params={
  360. pageSize:this.pageSize,
  361. pageNum: this.pageNum,
  362. // visitType:3
  363. }
  364. getReservatList(params).then(res=>{
  365. if(res.code==200){
  366. if (res.rows.length < this.pageSize) {
  367. this.reachflag = false
  368. this.wtdt = '到底了~';
  369. } else {
  370. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  371. if (num < res.total) {
  372. this.reachflag = true
  373. this.wtdt = '上拉加载更多'
  374. } else {
  375. this.reachflag = false
  376. this.wtdt = '到底了~';
  377. }
  378. }
  379. if (this.pageNum == 1) {
  380. this.list = res.rows;
  381. } else {
  382. this.list = this.list.concat(res.rows)
  383. }
  384. }else{
  385. this.$toast(res.msg)
  386. }
  387. })
  388. },
  389. },
  390. }
  391. </script>
  392. <style lang="scss" scoped>
  393. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;
  394. .topl{width: 274rpx;height: 50rpx;margin-left: 14rpx;}
  395. .topr{width: 36rpx;height: 36rpx;position: relative;margin-right: 10rpx;
  396. image{width: 100%;height: 100%;}
  397. .cir{width: 14rpx;height: 14rpx;background: #DF0024;border-radius: 50%;position: absolute;right: -7rpx;top: -7rpx;}
  398. }
  399. }
  400. // .zxbox /deep/ .ql-editor p{text-indent: 2rem;}
  401. .zxbox{
  402. .bgimg{width: 100%;height: 420rpx;}
  403. .zxmain{margin-top: -260rpx;z-index: 1;position: relative;
  404. .htop{width: 25%;display: flex;flex-direction: column;align-items: center;justify-content: center;
  405. .imgs{
  406. width: 74rpx;height: 74rpx;display: flex;align-items: center;justify-content: center;
  407. .imga{width: 72rpx;height: 72rpx;}
  408. .imgb{width: 68rpx;height: 74rpx;}
  409. .imgc{width: 68rpx;height: 72rpx;}
  410. }
  411. .tit{font-weight: 500;font-size: 26rpx;color: #F1F9FF;margin-top: 26rpx;}
  412. }
  413. .hbox{
  414. background: #ffffff;border-radius: 30rpx 30rpx 0 0;padding: 38rpx 24rpx 0 24rpx;
  415. .htit{font-size: 36rpx;color: #343434;font-weight: bold;}
  416. .htbox{position: relative;width: 342rpx;height: 146rpx;position: relative;margin-bottom: 24rpx;margin-right: 18rpx;
  417. &:nth-of-type(2n){margin-right: 0;}
  418. .hrbg{width: 100%;height: 100%;}
  419. .htboxa{position: absolute;left: 0;right: 0;top: 0;bottom: 0;padding: 0 18rpx 0 32rpx;box-sizing: border-box;
  420. .tit{font-size: 16px;color: #222327;font-weight: bold;margin-bottom: 8rpx;line-height: 44rpx;}
  421. .txt{font-weight: 500;font-size: 24rpx;color: #666666;}
  422. .imga{width: 56rpx;height: 60rpx;}
  423. .imgb{width: 50rpx;height: 60rpx;}
  424. .imgc{width: 54rpx;height: 58rpx;}
  425. .imgd{width: 70rpx;height: 56rpx;}
  426. }
  427. }
  428. }
  429. }
  430. .hnbox{background-color: #ffffff;padding-bottom: 32rpx;
  431. .hntabs{padding:32rpx 24rpx;background-color: #ffffff;
  432. &.tabfix{position: fixed;left: 0;right: 0;z-index: 4;box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(196,191,191,0.22);}
  433. .tit{font-weight: 500;font-size: 32rpx;color: #AAAAAA;position: relative;line-height: 50rpx;margin-right: 64rpx;
  434. &.act{font-weight: bold;font-size: 36rpx;color: #222327;
  435. &::after{
  436. content: '';width: 52rpx;height: 12rpx;background: #1D64E2;border-radius: 6rpx;position: absolute;left: 50%;bottom: -32rpx;margin-left: -26rpx;
  437. }
  438. }
  439. }
  440. .txtr{font-size: 26rpx;color: #aaaaaa;font-weight:500;}
  441. }
  442. .upmore{
  443. image{width: 40rpx;height: 32rpx;margin-bottom: 16rpx;}
  444. view{font-weight: 500;font-size: 26rpx;color: #AAAAAA;}
  445. }
  446. }
  447. }
  448. </style>