mine.vue 18 KB

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