unitList.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. <template>
  2. <view :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="navbox">
  4. <view class="plr12 mt18">
  5. <view class="search flex0 mb10">
  6. <image :src="searchimg"></image>
  7. <input placeholder="输入关键字进行查询" v-model="title" @confirm="getConfirm"/>
  8. </view>
  9. </view>
  10. <view class="tablists flexc mb20">
  11. <block v-for="(ite,idx) in tabList" >
  12. <view v-if="!ite.limit||ite.limit&&checkPermi([ite.limit])" @click="getTabFn(ite)" :class="{act:tabidx==ite.val}" :key="idx">{{ite.tit}}</view>
  13. </block>
  14. </view>
  15. <view style="height: 56rpx;"></view>
  16. <view class="lbtab flexc">
  17. <image :src="lbicoimg" class="limg"></image>
  18. <view class="lbtabs flexc">
  19. <view class="lbtabp" v-if="tabidx=='tabl'">
  20. <picker range-key='label' :value="tajdidx" :range="tajdlist" @change='bindDateChanged'>
  21. <view :class="tajd?'':'f16 co80'">{{tajd || "办理进度"}}</view>
  22. </picker>
  23. <image :src="upimg" class="upimg"></image>
  24. </view>
  25. <view class="lbtabp" v-if="tabidx=='tabl'">
  26. <picker range-key='label' :value="talbidx" :range="talxList" @change='bindDateChangea'>
  27. <view :class="talx?'':'f16 co80'">{{talx || "提案类型"}}</view>
  28. </picker>
  29. <image :src="upimg" class="upimg"></image>
  30. </view>
  31. <view class="lbtabp">
  32. <picker mode="date" fields="year" range-key='label' :value="talbidx" @change='bindDateChangeb'>
  33. <view :class="year?'':'f16 co80'">{{year || "选择年份"}}</view>
  34. </picker>
  35. <image :src="upimg" class="upimg"></image>
  36. </view>
  37. </view>
  38. <view class="czbtns" @click='getResetFn'>重置</view>
  39. </view>
  40. </view>
  41. <!-- 列表 -->
  42. <view class="mbox">
  43. <single-list :datalist="list" :wtdt="wtdt" :ztlxlist="ztlxlist" :tajdlist='tajdlist' :type='tabidx' @getDetail="getDetail" @getTuiFn="getTuiFn"></single-list>
  44. </view>
  45. <!-- 弹窗 -->
  46. <pop-up :type='ptype' :blfsList="matterList" :blcdlist="blcdlist" :mycdlist="mycdlist" @getClose="getClose" @getupSubmit="getupSubmit"></pop-up>
  47. </view>
  48. </template>
  49. <script>
  50. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  51. import {getInfounitListFn,getInfoReplywyFn,getInfoReplyFn} from "@/api/mine/case.js"
  52. import {getsqmyInfounitListFn,getsqmyReplyFn,getsqmyInfoReplywyFn} from "@/api/mine/sqmyInfo.js"
  53. import popUp from "@/work/components/popup/popup.vue"
  54. import singleList from "@/work/components/single/list.vue"
  55. import {getDictionaryFn} from "@/api/mine/register.js"
  56. export default{
  57. components:{singleList,popUp},
  58. data(){
  59. return{
  60. searchimg: require("@/work/static/images/search.png"),
  61. ccicoimg:require("@/work/static/images/ccico.png"),
  62. lbicoimg:require("@/work/static/images/lbico.png"),
  63. backimg:require("@/work/static/images/back.png"),
  64. upimg:require("@/work/static/images/up.png"),
  65. backgroundColor:"#1D64E2",
  66. tabidx:'tabl',
  67. tabtype:'',//进度查询
  68. // {tit:'征集通知',val:0}, 提案催办 目前看所有
  69. tabList:[
  70. {tit:'提案办理',val:'tabl',limit:'proposalInfo:info:unitList'},
  71. {tit:'社情办理',val:'sqtabl',limit:'sqmyInfo:info:unitList'},
  72. ],
  73. litablist:[{tit:'提案类别',val:0},{tit:'提案类型',val:1},{tit:'单位类型',val:2},{tit:'选择年份',val:3},],
  74. // {tit:'开始日期',val:1},{tit:'结束日期',val:2},
  75. // "proposalProgress":"提案进度(0:提交提案,1:提案审查,2:提案立案,3:提案交办,4:办理提案,5:提案反馈,6:办结审核,7:已办结) ",
  76. nvaHeight:44,
  77. talbList:[{},],
  78. taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
  79. talxList:[{label:'大会提案',value:'0'},{label:'平时提案',value:'1'}],
  80. dwlxList:[{label:'答复单位',value:'1'},{label:'主办单位',value:'2'},{label:'协办单位',value:'3'}],
  81. talbidx:'',
  82. tajd:'',
  83. tajdidx:'',
  84. tajdid:'',
  85. datainfo:{
  86. talb:'',
  87. },
  88. ptype:'',//弹窗类型
  89. list:[],
  90. pageSize: 10,
  91. pageNum: 1,
  92. reachflag: true,
  93. wtdt:'',
  94. tajdlist:[],
  95. talbid:'',//提案类别id
  96. talx:'',//提案类型
  97. talxid:'',
  98. year:'',//提案时间
  99. title:'',
  100. matterList:[],
  101. blcdlist:[],
  102. mycdlist:[],
  103. ztlxlist:[],
  104. id:'',
  105. userId:this.$store.state.user.userId,
  106. deptId:this.$store.state.user.deptId,
  107. iteinfo:'',//选择 的数据
  108. }
  109. },
  110. onUnload(){
  111. uni.$off('refreshlist')
  112. },
  113. onLoad(e) {
  114. this.getDataFn()
  115. this.init()
  116. uni.$on('refreshlist', (e) => {
  117. this.pageNum=1;
  118. this.list=[];
  119. this.reachflag=true;
  120. this.getDataFn()
  121. })
  122. },
  123. // 上拉触底加载更多触发事件
  124. onReachBottom() {
  125. if (this.reachflag) {
  126. this.pageNum++
  127. this.getDataFn()
  128. }
  129. },
  130. mounted() {
  131. this.getHeightFn()
  132. },
  133. methods:{
  134. checkPermi, checkRole,
  135. // 提案状态
  136. init(){
  137. getDictionaryFn('proposal_progress').then(res=>{
  138. if(res.code==200&&res.data.length){
  139. this.tajdlist = res.data.map(v => {
  140. return {
  141. label: v.dictLabel,
  142. value: v.dictValue
  143. }
  144. })
  145. }
  146. })
  147. // 办理方式
  148. getDictionaryFn('negotiation_mode').then(res=>{
  149. if(res.code==200&&res.data.length){
  150. this.matterList = res.data.map(v => {
  151. return {
  152. label: v.dictLabel,
  153. value: v.dictValue
  154. }
  155. })
  156. }
  157. })
  158. // 办理程度degree
  159. getDictionaryFn('degree').then(res=>{
  160. if(res.code==200&&res.data.length){
  161. this.blcdlist = res.data.map(v => {
  162. return {
  163. text: v.dictLabel,
  164. value: v.dictValue
  165. }
  166. })
  167. }
  168. })
  169. // 满意程度
  170. getDictionaryFn('member_satisfaction').then(res=>{
  171. if(res.code==200&&res.data.length){
  172. this.mycdlist = res.data.map(v => {
  173. return {
  174. text: v.dictLabel,
  175. value: v.dictValue
  176. }
  177. })
  178. }
  179. })
  180. // 主题类型
  181. getDictionaryFn('sqmy_topic_type').then(res=>{
  182. if(res.code==200&&res.data.length){
  183. this.ztlxlist = res.data.map(v => {
  184. return {
  185. label: v.dictLabel,
  186. value: v.dictValue
  187. }
  188. })
  189. }
  190. })
  191. },
  192. getConfirm(){
  193. this.pageNum=1;
  194. this.list=[];
  195. this.reachflag=true;
  196. this.getDataFn()
  197. },
  198. getResetFn(){
  199. var tab=this.tabidx;
  200. if(tab=='tabl'){
  201. this.tajd='';
  202. this.talx='';
  203. this.tajdid="";
  204. }
  205. this.year='';
  206. this.title='';
  207. this.getConfirm()
  208. },
  209. getTuiFn(data){
  210. var sh=data.sh;
  211. this.id=data.id;
  212. this.iteinfo=data.ite;
  213. var type=data.type;
  214. this.ptype=type
  215. },
  216. getupSubmit(e){
  217. var that=this;
  218. var type=this.ptype;
  219. if(type=='dffk'||type=='dwdf'){
  220. var params=JSON.parse(JSON.stringify(e))
  221. if(that.tabidx=='tabl'){
  222. params.proposalId=this.id
  223. if(this.iteinfo.proposalProgress==7){
  224. params.cbdwdfwy=params.content;
  225. getInfoReplywyFn(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. }else{
  238. getInfoReplyFn(params).then(res=>{
  239. if(res.code==200){
  240. this.$toast("答复反馈成功");
  241. setTimeout(function(){
  242. that.ptype='';
  243. that.pageNum=1;
  244. that.list=[];
  245. that.reachflag=true;
  246. that.getDataFn()
  247. },1200)
  248. }
  249. })
  250. }
  251. }else{
  252. params.sqmyId=this.id
  253. if(this.iteinfo.sqmyProgress==7){
  254. params.cbdwdfwy=params.content;
  255. getsqmyInfoReplywyFn(params).then(res=>{
  256. if(res.code==200){
  257. this.$toast("答复反馈成功");
  258. setTimeout(function(){
  259. that.ptype='';
  260. that.pageNum=1;
  261. that.list=[];
  262. that.reachflag=true;
  263. that.getDataFn()
  264. },1200)
  265. }
  266. })
  267. }else{
  268. getsqmyReplyFn(params).then(res=>{
  269. if(res.code==200){
  270. this.$toast("答复反馈成功");
  271. setTimeout(function(){
  272. that.ptype='';
  273. that.pageNum=1;
  274. that.list=[];
  275. that.reachflag=true;
  276. that.getDataFn()
  277. },1200)
  278. }
  279. })
  280. }
  281. }
  282. }else if(type=='tacb'){
  283. var params=JSON.parse(JSON.stringify(e))
  284. params.scoreId=this.id
  285. params.urgeType=1
  286. getInfourgeFn(params).then(res=>{
  287. if(res.code==200){
  288. this.$toast("催办成功");
  289. setTimeout(function(){
  290. that.ptype='';
  291. that.pageNum=1;
  292. that.list=[];
  293. that.reachflag=true;
  294. that.getDataFn()
  295. },1200)
  296. }
  297. })
  298. }
  299. },
  300. getHeightFn(){
  301. var s=uni.getSystemInfoSync().statusBarHeight;
  302. let query = uni.createSelectorQuery().in(this);
  303. //需要给黄色区域设置一个id标识,在这里是demo
  304. query.select('.navbox').boundingClientRect(data => {
  305. this.nvaHeight =Number(data.height)//赋值,待会要用
  306. }).exec();
  307. },
  308. getClose(){
  309. this.ptype=""
  310. },
  311. getTabFn(ite){
  312. this.tabidx=ite.val;
  313. this.pageNum=1;
  314. this.list=[],
  315. this.reachflag=true;
  316. this.getDataFn()
  317. },
  318. getBack(){
  319. uni.navigateBack({
  320. delta:1
  321. })
  322. },
  323. getrefreshData(){
  324. this.pageNum=1;
  325. this.list=[];
  326. this.reachflag=true;
  327. this.getDataFn()
  328. },
  329. bindDateChangea(e){
  330. var val=e.detail.value;
  331. this.talx=this.talxList[val].label;
  332. this.talxid=this.talxList[val].value;
  333. this.getrefreshData()
  334. },
  335. bindDateChangeb(e){
  336. var val=e.detail.value;
  337. this.year=val;
  338. this.getrefreshData()
  339. },
  340. bindDateChanged(e){
  341. var val=e.detail.value;
  342. this.tajd=this.tajdlist[val].label;
  343. this.tajdid=this.tajdlist[val].value;
  344. this.getrefreshData()
  345. },
  346. getDetail(data){
  347. if(this.tabidx=='tabl'){
  348. this.$tab.navigateTo('/work/pages/case/details?id='+data+'&f=tabl')
  349. }else{
  350. this.$tab.navigateTo('/work/pages/sqmyInfo/details?id='+data+'&f=tabl')
  351. }
  352. },
  353. getDataFn(){
  354. var tab=this.tabidx;
  355. var params={
  356. pageSize:this.pageSize,
  357. pageNum: this.pageNum,
  358. }
  359. if(this.title){
  360. params.title=this.title
  361. }
  362. if(this.year){
  363. params.year=this.year
  364. }
  365. if(this.tabidx=='sqtabl'){
  366. params.sqmyProgress=this.tajdid;
  367. getsqmyInfounitListFn(params).then(res=>{
  368. if(res.code==200){
  369. if (res.rows.length < this.pageSize) {
  370. this.reachflag = false
  371. this.wtdt = '到底了~';
  372. } else {
  373. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  374. if (num < res.total) {
  375. this.reachflag = true
  376. this.wtdt = '上拉加载更多'
  377. } else {
  378. this.reachflag = false
  379. this.wtdt = '到底了~';
  380. }
  381. }
  382. if (this.pageNum == 1) {
  383. this.list = res.rows;
  384. } else {
  385. this.list = this.list.concat(res.rows)
  386. }
  387. }else{
  388. this.$toast(res.msg)
  389. }
  390. })
  391. }else if(this.tabidx=='tabl'){
  392. params.proposalProgress=this.tajdid;
  393. if(this.talx){
  394. params.proposalType=this.talxid
  395. }
  396. getInfounitListFn(params).then(res=>{
  397. if(res.code==200){
  398. if (res.rows.length < this.pageSize) {
  399. this.reachflag = false
  400. this.wtdt = '到底了~';
  401. } else {
  402. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  403. if (num < res.total) {
  404. this.reachflag = true
  405. this.wtdt = '上拉加载更多'
  406. } else {
  407. this.reachflag = false
  408. this.wtdt = '到底了~';
  409. }
  410. }
  411. if (this.pageNum == 1) {
  412. this.list = res.rows;
  413. } else {
  414. this.list = this.list.concat(res.rows)
  415. }
  416. }else{
  417. this.$toast(res.msg)
  418. }
  419. })
  420. }
  421. }
  422. }
  423. }
  424. </script>
  425. <style scoped lang="scss">
  426. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background-color: $com-cd3;
  427. .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
  428. image{width: 40rpx;height: 30rpx;}
  429. }
  430. .topr{display: flex;align-items: center;
  431. image{width: 26rpx;height: 26rpx;margin-right: 12rpx;}
  432. view{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
  433. }
  434. .tablists{
  435. overflow: auto;flex-wrap: nowrap;
  436. 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;
  437. &:last-child{margin-right: 0;}
  438. &.act{font-size: 30rpx;
  439. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  440. }
  441. }
  442. }
  443. .lbtab{height: 114rpx;background: #FFFFFF;border-radius: 30rpx;padding-left: 24rpx;position: absolute;left:24rpx;right: 24rpx;bottom: -58rpx;
  444. .limg{width: 40rpx;height: 34rpx;margin-right: 10rpx;flex:0 0 auto;}
  445. .lbtabs{overflow: auto;flex-wrap: nowrap;flex: 1;
  446. .lbtabp{display: flex;align-items: center;flex: 1 0 auto;margin-right: 24rpx;}
  447. .upimg{width: 18rpx;height: 10rpx;}
  448. }
  449. }
  450. }
  451. .mbox{padding:58rpx 24rpx 28rpx;}
  452. .lbtabs /deep/ picker{padding: 0 18rpx;}
  453. </style>