info.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view class="pb50" :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 mb24">
  19. <image :src="searchimg"></image>
  20. <input placeholder="输入委员姓名进行查询" />
  21. </view>
  22. </view>
  23. <view style="height: 56rpx;"></view>
  24. <view class="lbtab flexc">
  25. <image :src="lbicoimg" class="limg"></image>
  26. <view class="lbtabs flexc">
  27. <view class="lbtabp" v-for="(ite,idx) in litablist" :key="idx">
  28. <picker range-key='label' :value="talbidx" :range="taztList" @change='bindDateChangea'>
  29. <view :class="datainfo.dqjz?'':'f16 co80'">{{datainfo.talb || ite.tit}}</view>
  30. </picker>
  31. <image :src="upimg" class="upimg"></image>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 列表 -->
  37. <view class="mbox">
  38. <report-list type="1" :datalist="list" :wtdt="wtdt" :tajdlist='tajdlist' @getDetail="getDetail" @getTuiFn="getTuiFn"></report-list>
  39. </view>
  40. <view class="fwbtns">履职档案</view>
  41. <!-- 弹窗 -->
  42. <pop-up :type='ptype' @getClose="getClose"></pop-up>
  43. </view>
  44. </template>
  45. <script>
  46. import {getCaseListFn} from "@/api/mine/case.js"
  47. import popUp from "@/work/components/popup/popup.vue"
  48. import reportList from "@/work/components/report/list.vue"
  49. import {getDictionaryFn} from "@/api/mine/register.js"
  50. export default{
  51. components:{reportList,popUp},
  52. data(){
  53. return{
  54. searchimg: require("@/work/static/images/search.png"),
  55. ccicoimg:require("@/work/static/images/ccico.png"),
  56. lbicoimg:require("@/work/static/images/lbico.png"),
  57. backimg:require("@/work/static/images/back.png"),
  58. upimg:require("@/work/static/images/up.png"),
  59. backgroundColor:"#1D64E2",
  60. litablist:[{tit:'选择界别',val:0},{tit:'选择党派',val:1},{tit:'综合排名',val:2}],
  61. nvaHeight:44,
  62. taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
  63. talbidx:'',
  64. datainfo:{
  65. talb:'',
  66. },
  67. ptype:'',//弹窗类型
  68. list:[{tit:"123"}],
  69. pageSize: 10,
  70. pageNum: 1,
  71. reachflag: true,
  72. wtdt:'',
  73. tajdlist:[]
  74. }
  75. },
  76. onUnload(){
  77. uni.$off('refreshlist')
  78. },
  79. onLoad(e) {
  80. // this.getDataFn()
  81. // this.init()
  82. // uni.$on('refreshlist', (e) => {
  83. // this.getDataFn()
  84. // })
  85. },
  86. mounted() {
  87. this.getHeightFn()
  88. },
  89. methods:{
  90. // 提案状态
  91. init(){
  92. getDictionaryFn('proposal_progress').then(res=>{
  93. if(res.code==200&&res.data.length){
  94. this.tajdlist = res.data.map(v => {
  95. return {
  96. label: v.dictLabel,
  97. value: Number(v.dictValue)
  98. }
  99. })
  100. }
  101. })
  102. },
  103. getHeightFn(){
  104. var s=uni.getSystemInfoSync().statusBarHeight;
  105. let query = uni.createSelectorQuery().in(this);
  106. //需要给黄色区域设置一个id标识,在这里是demo
  107. query.select('.navbox').boundingClientRect(data => {
  108. this.nvaHeight =s? data.height:Number(data.height)-20//赋值,待会要用
  109. }).exec();
  110. },
  111. getClose(){
  112. this.ptype=""
  113. },
  114. getBack(){
  115. uni.navigateBack({
  116. delta:1
  117. })
  118. },
  119. bindDateChangea(e){
  120. console.log(e,2)
  121. },
  122. getChFn(){
  123. this.$tab.navigateTo('/work/pages/report/addscore')
  124. },
  125. getTuiFn(ite){
  126. this.ptype=ite.type
  127. },
  128. getDetail(data){
  129. this.$tab.navigateTo('/work/pages/report/details?id='+data)
  130. },
  131. getDataFn(){
  132. var params={
  133. pageSize:this.pageSize,
  134. pageNum: this.pageNum,
  135. // visitType:3
  136. }
  137. getCaseListFn(params).then(res=>{
  138. if(res.code==200){
  139. if (res.rows.length < this.pageSize) {
  140. this.reachflag = false
  141. this.wtdt = '到底了~';
  142. } else {
  143. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  144. if (num < res.total) {
  145. this.reachflag = true
  146. this.wtdt = '上拉加载更多'
  147. } else {
  148. this.reachflag = false
  149. this.wtdt = '到底了~';
  150. }
  151. }
  152. if (this.pageNum == 1) {
  153. this.list = res.rows;
  154. } else {
  155. this.list = this.list.concat(res.rows)
  156. }
  157. }else{
  158. this.$toast(res.msg)
  159. }
  160. })
  161. },
  162. }
  163. }
  164. </script>
  165. <style scoped lang="scss">
  166. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background-color: $com-cd3;
  167. .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
  168. image{width: 40rpx;height: 30rpx;}
  169. }
  170. .topr{display: flex;align-items: center;
  171. image{width: 26rpx;height: 26rpx;margin-right: 12rpx;}
  172. view{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
  173. }
  174. .tablists{
  175. overflow: auto;flex-wrap: nowrap;
  176. 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;
  177. &:last-child{margin-right: 0;}
  178. &.act{font-size: 30rpx;
  179. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  180. }
  181. }
  182. }
  183. .lbtab{height: 114rpx;background: #FFFFFF;border-radius: 30rpx;padding-left: 24rpx;position: absolute;left:24rpx;right: 24rpx;bottom: -58rpx;
  184. .limg{width: 40rpx;height: 34rpx;margin-right: 10rpx;flex:0 0 auto;}
  185. .lbtabs{overflow: auto;flex-wrap: nowrap;flex: 1;
  186. .lbtabp{display: flex;align-items: center;flex:1;margin-right: 24rpx;}
  187. .upimg{width: 18rpx;height: 10rpx;}
  188. }
  189. }
  190. }
  191. .mbox{padding:58rpx 24rpx 28rpx;}
  192. .lbtabs /deep/ picker{padding: 0 18rpx;}
  193. </style>