mine.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  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="year?'':'f16 co80'">{{year || "选择年份"}}</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'])&&tabidx=='wdta'">
  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,getInfojointlyListFn
  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. year:'',//提案时间
  122. title:'',
  123. deptTree:[],
  124. matterList:[],
  125. blcdlist:[],
  126. mycdlist:[],
  127. id:'',
  128. userId:this.$store.state.user.userId,
  129. }
  130. },
  131. onUnload(){
  132. uni.$off('refreshlist')
  133. uni.$off('refreshtalb')
  134. },
  135. onLoad(e) {
  136. this.getDataFn()
  137. this.init()
  138. uni.$on('refreshlist', (e) => {
  139. this.getDataFn()
  140. })
  141. uni.$on('refreshtalb', (e) => {
  142. this.tnlbname=e.categoryName;
  143. this.talbid=e.categoryId;
  144. this.pageNum=1;
  145. this.list=[];
  146. this.reachflag=true;
  147. this.getDataFn()
  148. })
  149. },
  150. mounted() {
  151. this.getHeightFn()
  152. },
  153. methods:{
  154. checkPermi, checkRole,
  155. // 提案状态
  156. init(){
  157. getDictionaryFn('proposal_progress').then(res=>{
  158. if(res.code==200&&res.data.length){
  159. this.tajdlist = res.data.map(v => {
  160. return {
  161. label: v.dictLabel,
  162. value: v.dictValue
  163. }
  164. })
  165. }
  166. })
  167. // 协办单位
  168. getDeptTree().then(res=>{
  169. if(res.code==200){
  170. this.deptTree=res.data
  171. }
  172. })
  173. // 办理方式
  174. getDictionaryFn('negotiation_mode').then(res=>{
  175. if(res.code==200&&res.data.length){
  176. this.matterList = res.data.map(v => {
  177. return {
  178. label: v.dictLabel,
  179. value: v.dictValue
  180. }
  181. })
  182. }
  183. })
  184. // 办理程度degree
  185. getDictionaryFn('degree').then(res=>{
  186. if(res.code==200&&res.data.length){
  187. this.blcdlist = res.data.map(v => {
  188. return {
  189. text: v.dictLabel,
  190. value: v.dictValue
  191. }
  192. })
  193. }
  194. })
  195. // 满意程度
  196. getDictionaryFn('member_satisfaction').then(res=>{
  197. if(res.code==200&&res.data.length){
  198. this.mycdlist = res.data.map(v => {
  199. return {
  200. text: v.dictLabel,
  201. value: v.dictValue
  202. }
  203. })
  204. }
  205. })
  206. },
  207. getConfirm(){
  208. this.pageNum=1;
  209. this.list=[];
  210. this.reachflag=true;
  211. this.getDataFn()
  212. },
  213. getTuiFn(data){
  214. var sh=data.sh;
  215. this.id=data.id;
  216. var type=data.type;
  217. var that=this;
  218. if(type=='scfk'){
  219. if(sh==1){
  220. this.ptype=data.type;
  221. }else{
  222. var params={
  223. proposalId:data.id,
  224. isRecord:0,
  225. }
  226. getInfoisRecordFn(params).then(res=>{
  227. if(res.code==200){
  228. this.$toast("立案成功");
  229. setTimeout(function(){
  230. that.ptype='';
  231. that.pageNum=1;
  232. that.list=[];
  233. that.reachflag=true;
  234. that.getDataFn()
  235. },1200)
  236. }
  237. })
  238. }
  239. }else if(type=='lmta'){
  240. if(sh==2){
  241. this.ptype=data.type;
  242. }else{
  243. var params={
  244. proposalId:data.id,
  245. isAgree:1,
  246. }
  247. getUserverifyFn(params).then(res=>{
  248. if(res.code==200){
  249. this.$toast("确认联名提案成功");
  250. setTimeout(function(){
  251. that.ptype='';
  252. that.pageNum=1;
  253. that.list=[];
  254. that.reachflag=true;
  255. that.getDataFn()
  256. },1200)
  257. }
  258. })
  259. }
  260. }else{
  261. this.ptype=type
  262. }
  263. },
  264. getupSubmit(e){
  265. var that=this;
  266. var type=this.ptype;
  267. if(type=='scfk'){
  268. var params=JSON.parse(JSON.stringify(e))
  269. params.proposalId=this.id
  270. getInfoisRecordFn(params).then(res=>{
  271. if(res.code==200){
  272. this.$toast("立案成功");
  273. setTimeout(function(){
  274. that.ptype='';
  275. that.pageNum=1;
  276. that.list=[];
  277. that.reachflag=true;
  278. that.getDataFn()
  279. },1200)
  280. }
  281. })
  282. }else if(type=='tajb'){
  283. var params=JSON.parse(JSON.stringify(e))
  284. params.proposalId=this.id
  285. getInfoAssignFn(params).then(res=>{
  286. if(res.code==200){
  287. this.$toast("提案办结成功");
  288. setTimeout(function(){
  289. that.ptype='';
  290. that.pageNum=1;
  291. that.list=[];
  292. that.reachflag=true;
  293. that.getDataFn()
  294. },1200)
  295. }
  296. })
  297. }else if(type=='dffk'||type=='dwdf'){
  298. var params=JSON.parse(JSON.stringify(e))
  299. params.proposalId=this.id
  300. getInfoReplyFn(params).then(res=>{
  301. if(res.code==200){
  302. this.$toast("答复反馈成功");
  303. setTimeout(function(){
  304. that.ptype='';
  305. that.pageNum=1;
  306. that.list=[];
  307. that.reachflag=true;
  308. that.getDataFn()
  309. },1200)
  310. }
  311. })
  312. }else if(type=='jbsh'){
  313. var params=JSON.parse(JSON.stringify(e))
  314. params.proposalId=this.id
  315. getInfoShFn(params).then(res=>{
  316. if(res.code==200){
  317. this.$toast("交办审核成功");
  318. setTimeout(function(){
  319. that.ptype='';
  320. that.pageNum=1;
  321. that.list=[];
  322. that.reachflag=true;
  323. that.getDataFn()
  324. },1200)
  325. }
  326. })
  327. }else if(type=='wymyfk'){
  328. var params=JSON.parse(JSON.stringify(e))
  329. params.proposalId=this.id
  330. getInfoIdeaFn(params).then(res=>{
  331. if(res.code==200){
  332. this.$toast("提案办结成功");
  333. setTimeout(function(){
  334. that.ptype='';
  335. that.pageNum=1;
  336. that.list=[];
  337. that.reachflag=true;
  338. that.getDataFn()
  339. },1200)
  340. }
  341. })
  342. }else if(type=='zxmyfk'){
  343. var params=JSON.parse(JSON.stringify(e))
  344. params.proposalId=this.id
  345. getInfozxIdeaFn(params).then(res=>{
  346. if(res.code==200){
  347. this.$toast("提案办结成功");
  348. setTimeout(function(){
  349. that.ptype='';
  350. that.pageNum=1;
  351. that.list=[];
  352. that.reachflag=true;
  353. that.getDataFn()
  354. },1200)
  355. }
  356. })
  357. }else if(type=='tacb'){
  358. var params=JSON.parse(JSON.stringify(e))
  359. params.scoreId=this.id
  360. getInfourgeFn(params).then(res=>{
  361. if(res.code==200){
  362. this.$toast("提案办结成功");
  363. setTimeout(function(){
  364. that.ptype='';
  365. that.pageNum=1;
  366. that.list=[];
  367. that.reachflag=true;
  368. that.getDataFn()
  369. },1200)
  370. }
  371. })
  372. }else if(type=='tjyx'){
  373. var params=JSON.parse(JSON.stringify(e))
  374. params.proposalId=this.id
  375. getInfooutstandingFn(params).then(res=>{
  376. if(res.code==200){
  377. this.$toast("推荐优秀成功");
  378. setTimeout(function(){
  379. that.ptype='';
  380. that.pageNum=1;
  381. that.list=[];
  382. that.reachflag=true;
  383. that.getDataFn()
  384. },1200)
  385. }
  386. })
  387. }else if(type=='tjzd'){
  388. var params=JSON.parse(JSON.stringify(e))
  389. params.proposalId=this.id
  390. getInfokeyPointFn(params).then(res=>{
  391. if(res.code==200){
  392. this.$toast("推荐重点成功");
  393. setTimeout(function(){
  394. that.ptype='';
  395. that.pageNum=1;
  396. that.list=[];
  397. that.reachflag=true;
  398. that.getDataFn()
  399. },1200)
  400. }
  401. })
  402. }else if(type=='lmta'){
  403. var params=JSON.parse(JSON.stringify(e))
  404. var str='同意'
  405. if(params.isAgree==2){
  406. str="反对"
  407. }
  408. params.proposalId=this.id
  409. getUserverifyFn(params).then(res=>{
  410. if(res.code==200){
  411. this.$toast(str+"成功");
  412. setTimeout(function(){
  413. that.ptype='';
  414. that.pageNum=1;
  415. that.list=[];
  416. that.reachflag=true;
  417. that.getDataFn()
  418. },1200)
  419. }
  420. })
  421. }
  422. },
  423. getAddCase(){
  424. if(uni.getStorageSync('tjtaList')){
  425. // var newObj=JSON.parse(JSON.stringify(uni.getStorageSync('tjtaList')))
  426. this.ptype='zcta'
  427. }else{
  428. this.$tab.navigateTo('/work/pages/case/add')
  429. }
  430. },
  431. getHeightFn(){
  432. var s=uni.getSystemInfoSync().statusBarHeight;
  433. let query = uni.createSelectorQuery().in(this);
  434. //需要给黄色区域设置一个id标识,在这里是demo
  435. query.select('.navbox').boundingClientRect(data => {
  436. this.nvaHeight =s? data.height:Number(data.height)-20//赋值,待会要用
  437. }).exec();
  438. },
  439. getClose(){
  440. this.ptype=""
  441. },
  442. getTabFn(ite){
  443. this.tabidx=ite.val;
  444. this.pageNum=1;
  445. this.list=[],
  446. this.reachflag=true;
  447. this.tabtype=ite.jd||"";
  448. this.getDataFn()
  449. },
  450. getBack(){
  451. uni.navigateBack({
  452. delta:1
  453. })
  454. },
  455. getrefreshData(){
  456. this.pageNum=1;
  457. this.list=[];
  458. this.reachflag=true;
  459. this.getDataFn()
  460. },
  461. bindDateChangea(e){
  462. var val=e.detail.value;
  463. this.talx=this.talxList[val].label;
  464. this.talxid=this.talxList[val].value;
  465. this.getrefreshData()
  466. },
  467. bindDateChangeb(e){
  468. var val=e.detail.value;
  469. this.year=val;
  470. this.getrefreshData()
  471. },
  472. getTalbFn(){
  473. var obj={
  474. id:this.talbid,
  475. name:this.tnlbname,
  476. }
  477. this.$tab.navigateTo('/work/pages/case/talbclass?data='+encodeURIComponent(JSON.stringify(obj)))
  478. },
  479. getChFn(){
  480. this.$tab.navigateTo('/work/pages/case/tacheck')
  481. },
  482. getDetail(data){
  483. this.$tab.navigateTo('/work/pages/case/details?id='+data)
  484. },
  485. getDataFn(){
  486. var tab=this.tabidx;
  487. var params={
  488. pageSize:this.pageSize,
  489. pageNum: this.pageNum,
  490. }
  491. if(this.tabtype){
  492. params.proposalProgress=this.tabtype
  493. }
  494. if(this.talx){
  495. params.proposalType=this.talxid
  496. }
  497. if(this.tnlbname){
  498. params.categoryId=this.talbid
  499. }
  500. if(this.title){
  501. params.title=this.title
  502. }
  503. if(this.year){
  504. params.year=this.year
  505. }
  506. if(tab=='tjyx'){
  507. params.isOutstanding="0"
  508. }else if(tab=='tjzd'){
  509. params.isKeyPoint="0"
  510. }else if(tab=='gkta'){
  511. params.isPublicity="是"
  512. }else if(tab=='wdta'){
  513. params.userId=this.userId
  514. }
  515. if(this.tabidx=='lmta'){
  516. getInfojointlyListFn(params).then(res=>{
  517. if(res.code==200){
  518. if (res.rows.length < this.pageSize) {
  519. this.reachflag = false
  520. this.wtdt = '到底了~';
  521. } else {
  522. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  523. if (num < res.total) {
  524. this.reachflag = true
  525. this.wtdt = '上拉加载更多'
  526. } else {
  527. this.reachflag = false
  528. this.wtdt = '到底了~';
  529. }
  530. }
  531. if (this.pageNum == 1) {
  532. this.list = res.rows;
  533. } else {
  534. this.list = this.list.concat(res.rows)
  535. }
  536. }else{
  537. this.$toast(res.msg)
  538. }
  539. })
  540. }else{
  541. getCaseListFn(params).then(res=>{
  542. if(res.code==200){
  543. if (res.rows.length < this.pageSize) {
  544. this.reachflag = false
  545. this.wtdt = '到底了~';
  546. } else {
  547. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  548. if (num < res.total) {
  549. this.reachflag = true
  550. this.wtdt = '上拉加载更多'
  551. } else {
  552. this.reachflag = false
  553. this.wtdt = '到底了~';
  554. }
  555. }
  556. if (this.pageNum == 1) {
  557. this.list = res.rows;
  558. } else {
  559. this.list = this.list.concat(res.rows)
  560. }
  561. }else{
  562. this.$toast(res.msg)
  563. }
  564. })
  565. }
  566. },
  567. }
  568. }
  569. </script>
  570. <style scoped lang="scss">
  571. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background-color: $com-cd3;
  572. .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
  573. image{width: 40rpx;height: 30rpx;}
  574. }
  575. .topr{display: flex;align-items: center;
  576. image{width: 26rpx;height: 26rpx;margin-right: 12rpx;}
  577. view{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
  578. }
  579. .tablists{
  580. overflow: auto;flex-wrap: nowrap;
  581. 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;
  582. &:last-child{margin-right: 0;}
  583. &.act{font-size: 30rpx;
  584. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  585. }
  586. }
  587. }
  588. .lbtab{height: 114rpx;background: #FFFFFF;border-radius: 30rpx;padding-left: 24rpx;position: absolute;left:24rpx;right: 24rpx;bottom: -58rpx;
  589. .limg{width: 40rpx;height: 34rpx;margin-right: 10rpx;flex:0 0 auto;}
  590. .lbtabs{overflow: auto;flex-wrap: nowrap;flex: 1;
  591. .lbtabp{display: flex;align-items: center;flex: 1;margin-right: 24rpx;}
  592. .upimg{width: 18rpx;height: 10rpx;}
  593. }
  594. }
  595. }
  596. .mbox{padding:58rpx 24rpx 28rpx;}
  597. .lbtabs /deep/ picker{padding: 0 18rpx;}
  598. </style>