mine.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. <template>
  2. <view :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" >
  25. <view v-if="checkPermi([ite.limit])" @click="getTabFn(ite)" :class="{act:tabidx==ite.val}" :key="idx">{{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" @click="getTalbFn">
  33. <view style="padding: 0 18rpx;" :class="tnlbname?'':'f16 co80'">{{tnlbname || "提案类别"}}</view>
  34. <image :src="upimg" class="upimg"></image>
  35. </view>
  36. <view class="lbtabp">
  37. <picker range-key='label' :value="talbidx" :range="talxList" @change='bindDateChangea'>
  38. <view :class="talx?'':'f16 co80'">{{talx || "提案类型"}}</view>
  39. </picker>
  40. <image :src="upimg" class="upimg"></image>
  41. </view>
  42. <view class="lbtabp">
  43. <picker mode="date" fields="year" range-key='label' :value="talbidx" @change='bindDateChangeb'>
  44. <view :class="tatime?'':'f16 co80'">{{tatime || "选择年份"}}</view>
  45. </picker>
  46. <image :src="upimg" class="upimg"></image>
  47. </view>
  48. <!-- <view class="lbtabp">
  49. <picker range-key='label' :value="talbidx" :range="taztList" @change='bindDateChangea'>
  50. <view :class="datainfo.dqjz?'':'f16 co80'">{{datainfo.talb || "单位答复"}}</view>
  51. </picker>
  52. <image :src="upimg" class="upimg"></image>
  53. </view> -->
  54. </view>
  55. </view>
  56. </view>
  57. <!-- 列表 -->
  58. <view class="mbox">
  59. <case-list :datalist="list" :listtype="listtype" :wtdt="wtdt" :tajdlist='tajdlist' :type='tabidx' @getDetail="getDetail" @getTuiFn="getTuiFn"></case-list>
  60. </view>
  61. <view v-if="checkPermi(['proposalInfo:info:add'])">
  62. <view style="height: 100rpx;"></view>
  63. <view class="fwbtns" @click="getAddCase">提交提案</view>
  64. </view>
  65. <!-- 弹窗 -->
  66. <pop-up :type='ptype' :blfsList="matterList" :blcdlist="blcdlist" :mycdlist="mycdlist" :dataTree="deptTree" @getClose="getClose" @getupSubmit="getupSubmit"></pop-up>
  67. </view>
  68. </template>
  69. <script>
  70. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  71. import {getCaseListFn,getInfoisRecordFn,getInfoAssignFn,getInfoReplyFn,getInfoShFn,getInfoIdeaFn,getInfozxIdeaFn,
  72. getInfourgeFn,getInfokeyPointFn,getInfooutstandingFn,getUserverifyFn
  73. } from "@/api/mine/case.js"
  74. import popUp from "@/work/components/popup/popup.vue"
  75. import caseList from "@/work/components/case/list.vue"
  76. import {getDictionaryFn} from "@/api/mine/register.js"
  77. import {getDeptTree} from"@/api/mine/mine.js"
  78. export default{
  79. components:{caseList,popUp},
  80. data(){
  81. return{
  82. searchimg: require("@/work/static/images/search.png"),
  83. ccicoimg:require("@/work/static/images/ccico.png"),
  84. lbicoimg:require("@/work/static/images/lbico.png"),
  85. backimg:require("@/work/static/images/back.png"),
  86. upimg:require("@/work/static/images/up.png"),
  87. backgroundColor:"#1D64E2",
  88. tabidx:'tasc',
  89. tabtype:'1',//进度查询
  90. // {tit:'征集通知',val:0}, 提案催办 目前看所有
  91. tabList:[{tit:'提案审查',jd:1,val:'tasc',limit:'proposalInfo:info:isRecord'},{tit:'提案交办',jd:3,val:'tajb',},
  92. {tit:'提案办理',jd:4,val:'tabl',},{tit:'办结审核',jd:6,val:'jbsh',},
  93. {tit:'提案催办',val:'tacb',},
  94. {tit:'我的提案',val:'wdta',},{tit:'联名提案',val:'lmta',},{tit:'推荐优秀',val:'tjyx'},
  95. {tit:'推荐重点',val:'tjzd'},{tit:'公开提案',val:'gkta'},
  96. ],
  97. litablist:[{tit:'提案类别',val:0},{tit:'提案类型',val:1},{tit:'单位类型',val:2},{tit:'选择年份',val:3},],
  98. // {tit:'开始日期',val:1},{tit:'结束日期',val:2},
  99. // "proposalProgress":"提案进度(0:提交提案,1:提案审查,2:提案立案,3:提案交办,4:办理提案,5:提案反馈,6:办结审核,7:已办结) ",
  100. nvaHeight:44,
  101. talbList:[{},],
  102. taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
  103. talxList:[{label:'大会提案',value:'0'},{label:'平时提案',value:'1'}],
  104. dwlxList:[{label:'答复单位',value:'1'},{label:'主办单位',value:'2'},{label:'协办单位',value:'3'}],
  105. talbidx:'',
  106. datainfo:{
  107. talb:'',
  108. },
  109. ptype:'',//弹窗类型
  110. list:[],
  111. pageSize: 10,
  112. pageNum: 1,
  113. reachflag: true,
  114. wtdt:'',
  115. tajdlist:[],
  116. listtype:'case',
  117. tnlbname:'',//提案类别
  118. talbid:'',//提案类别id
  119. talx:'',//提案类型
  120. talxid:'',
  121. tatime:'',//提案时间
  122. title:'',
  123. deptTree:[],
  124. matterList:[],
  125. blcdlist:[],
  126. mycdlist:[],
  127. id:'',
  128. }
  129. },
  130. onUnload(){
  131. uni.$off('refreshlist')
  132. uni.$off('refreshtalb')
  133. },
  134. onLoad(e) {
  135. this.getDataFn()
  136. this.init()
  137. uni.$on('refreshlist', (e) => {
  138. this.getDataFn()
  139. })
  140. uni.$on('refreshtalb', (e) => {
  141. this.tnlbname=e.categoryName;
  142. this.talbid=e.categoryId;
  143. this.pageNum=1;
  144. this.list=[];
  145. this.reachflag=true;
  146. this.getDataFn()
  147. })
  148. },
  149. mounted() {
  150. this.getHeightFn()
  151. },
  152. methods:{
  153. checkPermi, checkRole,
  154. // 提案状态
  155. init(){
  156. getDictionaryFn('proposal_progress').then(res=>{
  157. if(res.code==200&&res.data.length){
  158. this.tajdlist = res.data.map(v => {
  159. return {
  160. label: v.dictLabel,
  161. value: Number(v.dictValue)
  162. }
  163. })
  164. }
  165. })
  166. // 协办单位
  167. getDeptTree().then(res=>{
  168. if(res.code==200){
  169. this.deptTree=res.data
  170. }
  171. })
  172. // 办理方式
  173. getDictionaryFn('negotiation_mode').then(res=>{
  174. if(res.code==200&&res.data.length){
  175. this.matterList = res.data.map(v => {
  176. return {
  177. label: v.dictLabel,
  178. value: v.dictValue
  179. }
  180. })
  181. }
  182. })
  183. // 办理程度degree
  184. getDictionaryFn('degree').then(res=>{
  185. if(res.code==200&&res.data.length){
  186. this.blcdlist = res.data.map(v => {
  187. return {
  188. text: v.dictLabel,
  189. value: v.dictValue
  190. }
  191. })
  192. }
  193. })
  194. // 满意程度
  195. getDictionaryFn('member_satisfaction').then(res=>{
  196. if(res.code==200&&res.data.length){
  197. this.mycdlist = res.data.map(v => {
  198. return {
  199. text: v.dictLabel,
  200. value: v.dictValue
  201. }
  202. })
  203. }
  204. })
  205. },
  206. getConfirm(){
  207. this.pageNum=1;
  208. this.list=[];
  209. this.reachflag=true;
  210. this.getDataFn()
  211. },
  212. getTuiFn(data){
  213. var sh=data.sh;
  214. this.id=data.id;
  215. var type=data.type;
  216. console.log(data,2)
  217. if(type=='scfk'){
  218. if(sh==1){
  219. this.ptype=data.type;
  220. }else{
  221. var params={
  222. proposalId:data.id,
  223. isRecord:0,
  224. }
  225. getInfoisRecordFn(params).then(res=>{
  226. if(res.code==200){
  227. this.$toast("立案成功");
  228. setTimeout(function(){
  229. that.ptype='';
  230. that.pageNum=1;
  231. that.list=[];
  232. that.reachflag=true;
  233. that.getDataFn()
  234. },1200)
  235. }
  236. })
  237. }
  238. }else if(type=='lmta'){
  239. if(sh==2){
  240. this.ptype=data.type;
  241. }else{
  242. var params={
  243. proposalId:data.id,
  244. isAgree:1,
  245. }
  246. getUserverifyFn(params).then(res=>{
  247. if(res.code==200){
  248. this.$toast("确认联名提案成功");
  249. setTimeout(function(){
  250. that.ptype='';
  251. that.pageNum=1;
  252. that.list=[];
  253. that.reachflag=true;
  254. that.getDataFn()
  255. },1200)
  256. }
  257. })
  258. }
  259. }else{
  260. this.ptype=type
  261. }
  262. },
  263. getupSubmit(e){
  264. var that=this;
  265. var type=this.ptype;
  266. if(type=='scfk'){
  267. var params=JSON.parse(JSON.stringify(e))
  268. params.proposalId=this.id
  269. getInfoisRecordFn(params).then(res=>{
  270. if(res.code==200){
  271. this.$toast("立案成功");
  272. setTimeout(function(){
  273. that.ptype='';
  274. that.pageNum=1;
  275. that.list=[];
  276. that.reachflag=true;
  277. that.getDataFn()
  278. },1200)
  279. }
  280. })
  281. }else if(type=='tajb'){
  282. var params=JSON.parse(JSON.stringify(e))
  283. params.proposalId=this.id
  284. getInfoAssignFn(params).then(res=>{
  285. if(res.code==200){
  286. this.$toast("提案办结成功");
  287. setTimeout(function(){
  288. that.ptype='';
  289. that.pageNum=1;
  290. that.list=[];
  291. that.reachflag=true;
  292. that.getDataFn()
  293. },1200)
  294. }
  295. })
  296. }else if(type=='dffk'||type=='dwdf'){
  297. var params=JSON.parse(JSON.stringify(e))
  298. params.proposalId=this.id
  299. getInfoReplyFn(params).then(res=>{
  300. if(res.code==200){
  301. this.$toast("答复反馈成功");
  302. setTimeout(function(){
  303. that.ptype='';
  304. that.pageNum=1;
  305. that.list=[];
  306. that.reachflag=true;
  307. that.getDataFn()
  308. },1200)
  309. }
  310. })
  311. }else if(type=='jbsh'){
  312. var params=JSON.parse(JSON.stringify(e))
  313. params.proposalId=this.id
  314. getInfoShFn(params).then(res=>{
  315. if(res.code==200){
  316. this.$toast("交办审核成功");
  317. setTimeout(function(){
  318. that.ptype='';
  319. that.pageNum=1;
  320. that.list=[];
  321. that.reachflag=true;
  322. that.getDataFn()
  323. },1200)
  324. }
  325. })
  326. }else if(type=='wymyfk'){
  327. var params=JSON.parse(JSON.stringify(e))
  328. params.proposalId=this.id
  329. getInfoIdeaFn(params).then(res=>{
  330. if(res.code==200){
  331. this.$toast("提案办结成功");
  332. setTimeout(function(){
  333. that.ptype='';
  334. that.pageNum=1;
  335. that.list=[];
  336. that.reachflag=true;
  337. that.getDataFn()
  338. },1200)
  339. }
  340. })
  341. }else if(type=='zxmyfk'){
  342. var params=JSON.parse(JSON.stringify(e))
  343. params.proposalId=this.id
  344. getInfozxIdeaFn(params).then(res=>{
  345. if(res.code==200){
  346. this.$toast("提案办结成功");
  347. setTimeout(function(){
  348. that.ptype='';
  349. that.pageNum=1;
  350. that.list=[];
  351. that.reachflag=true;
  352. that.getDataFn()
  353. },1200)
  354. }
  355. })
  356. }else if(type=='tacb'){
  357. var params=JSON.parse(JSON.stringify(e))
  358. params.scoreId=this.id
  359. getInfourgeFn(params).then(res=>{
  360. if(res.code==200){
  361. this.$toast("提案办结成功");
  362. setTimeout(function(){
  363. that.ptype='';
  364. that.pageNum=1;
  365. that.list=[];
  366. that.reachflag=true;
  367. that.getDataFn()
  368. },1200)
  369. }
  370. })
  371. }else if(type=='tjyx'){
  372. var params=JSON.parse(JSON.stringify(e))
  373. params.proposalId=this.id
  374. getInfooutstandingFn(params).then(res=>{
  375. if(res.code==200){
  376. this.$toast("推荐优秀成功");
  377. setTimeout(function(){
  378. that.ptype='';
  379. that.pageNum=1;
  380. that.list=[];
  381. that.reachflag=true;
  382. that.getDataFn()
  383. },1200)
  384. }
  385. })
  386. }else if(type=='tjzd'){
  387. var params=JSON.parse(JSON.stringify(e))
  388. params.proposalId=this.id
  389. getInfokeyPointFn(params).then(res=>{
  390. if(res.code==200){
  391. this.$toast("推荐重点成功");
  392. setTimeout(function(){
  393. that.ptype='';
  394. that.pageNum=1;
  395. that.list=[];
  396. that.reachflag=true;
  397. that.getDataFn()
  398. },1200)
  399. }
  400. })
  401. }else if(type=='lmta'){
  402. var params=JSON.parse(JSON.stringify(e))
  403. var str='同意'
  404. if(params.isAgree==2){
  405. str="反对"
  406. }
  407. params.proposalId=this.id
  408. getUserverifyFn(params).then(res=>{
  409. if(res.code==200){
  410. this.$toast(str+"成功");
  411. setTimeout(function(){
  412. that.ptype='';
  413. that.pageNum=1;
  414. that.list=[];
  415. that.reachflag=true;
  416. that.getDataFn()
  417. },1200)
  418. }
  419. })
  420. }
  421. },
  422. getAddCase(){
  423. if(uni.getStorageSync('tjtaList')){
  424. // var newObj=JSON.parse(JSON.stringify(uni.getStorageSync('tjtaList')))
  425. this.ptype='zcta'
  426. }else{
  427. this.$tab.navigateTo('/work/pages/case/add')
  428. }
  429. },
  430. getHeightFn(){
  431. var s=uni.getSystemInfoSync().statusBarHeight;
  432. let query = uni.createSelectorQuery().in(this);
  433. //需要给黄色区域设置一个id标识,在这里是demo
  434. query.select('.navbox').boundingClientRect(data => {
  435. this.nvaHeight =s? data.height:Number(data.height)-20//赋值,待会要用
  436. }).exec();
  437. },
  438. getClose(){
  439. this.ptype=""
  440. },
  441. getTabFn(ite){
  442. this.tabidx=ite.val;
  443. this.pageNum=1;
  444. this.list=[],
  445. this.reachflag=true;
  446. this.tabtype=ite.jd||"";
  447. this.getDataFn()
  448. },
  449. getBack(){
  450. uni.navigateBack({
  451. delta:1
  452. })
  453. },
  454. bindDateChangea(e){
  455. var val=e.detail.value;
  456. this.talx=this.talxList[val].label;
  457. this.talxid=this.talxList[val].value;
  458. this.pageNum=1;
  459. this.list=[];
  460. this.reachflag=true;
  461. this.getDataFn()
  462. },
  463. getTalbFn(){
  464. var obj={
  465. id:this.talbid,
  466. name:this.tnlbname,
  467. }
  468. this.$tab.navigateTo('/work/pages/case/talbclass?data='+encodeURIComponent(JSON.stringify(obj)))
  469. },
  470. getChFn(){
  471. this.$tab.navigateTo('/work/pages/case/tacheck')
  472. },
  473. getDetail(data){
  474. this.$tab.navigateTo('/work/pages/case/details?id='+data)
  475. },
  476. getDataFn(){
  477. var tab=this.tabidx;
  478. var params={
  479. pageSize:this.pageSize,
  480. pageNum: this.pageNum,
  481. }
  482. // if(this.tabtype){
  483. // params.proposalProgress=this.tabtype
  484. // }
  485. // if(this.talx){
  486. // params.proposalType=this.talxid
  487. // }
  488. // if(this.tnlbname){
  489. // params.categoryId=this.talbid
  490. // }
  491. // if(this.title){
  492. // params.title=this.title
  493. // }
  494. // if(tab=='lmta'){
  495. // params.isJointly="是"
  496. // }else if(tab=='tjyx'){
  497. // params.isOutstanding="0"
  498. // }else if(tab=='tjzd'){
  499. // params.isKeyPoint="0"
  500. // }else if(tab=='gkta'){
  501. // params.isKeyPoint="是"
  502. // }
  503. getCaseListFn(params).then(res=>{
  504. if(res.code==200){
  505. if (res.rows.length < this.pageSize) {
  506. this.reachflag = false
  507. this.wtdt = '到底了~';
  508. } else {
  509. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  510. if (num < res.total) {
  511. this.reachflag = true
  512. this.wtdt = '上拉加载更多'
  513. } else {
  514. this.reachflag = false
  515. this.wtdt = '到底了~';
  516. }
  517. }
  518. if (this.pageNum == 1) {
  519. this.list = res.rows;
  520. } else {
  521. this.list = this.list.concat(res.rows)
  522. }
  523. }else{
  524. this.$toast(res.msg)
  525. }
  526. })
  527. },
  528. }
  529. }
  530. </script>
  531. <style scoped lang="scss">
  532. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background-color: $com-cd3;
  533. .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
  534. image{width: 40rpx;height: 30rpx;}
  535. }
  536. .topr{display: flex;align-items: center;
  537. image{width: 26rpx;height: 26rpx;margin-right: 12rpx;}
  538. view{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
  539. }
  540. .tablists{
  541. overflow: auto;flex-wrap: nowrap;
  542. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;position: relative;flex: 0 0 auto;padding: 22rpx 24rpx;margin-right: 6rpx;box-sizing: border-box;
  543. &:last-child{margin-right: 0;}
  544. &.act{font-size: 30rpx;
  545. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  546. }
  547. }
  548. }
  549. .lbtab{height: 114rpx;background: #FFFFFF;border-radius: 30rpx;padding-left: 24rpx;position: absolute;left:24rpx;right: 24rpx;bottom: -58rpx;
  550. .limg{width: 40rpx;height: 34rpx;margin-right: 10rpx;flex:0 0 auto;}
  551. .lbtabs{overflow: auto;flex-wrap: nowrap;flex: 1;
  552. .lbtabp{display: flex;align-items: center;flex: 1;margin-right: 24rpx;}
  553. .upimg{width: 18rpx;height: 10rpx;}
  554. }
  555. }
  556. }
  557. .mbox{padding:58rpx 24rpx 28rpx;}
  558. .lbtabs /deep/ picker{padding: 0 18rpx;}
  559. </style>