unitList.vue 13 KB

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