report.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. <template>
  2. <view class="zxbox">
  3. <view class="navbox">
  4. <uni-nav-bar color="#ffffff" rightWidth="200rpx" @clickLeft="getBack" title="年度履职报告" :background-color="backgroundColor" :border="false"
  5. statusBar='true' fixed="true">
  6. <block slot="left">
  7. <view class="topl">
  8. <image :src="backimg" ></image>
  9. </view>
  10. </block>
  11. <block slot="right">
  12. <picker mode="date" fields="year" value="nd" class="infolist_a" @change='bindDateChange'>
  13. <view class="picks">
  14. <view :class="year?'':'f16 co80'">{{year||"请选择"}}</view>
  15. <image :src="upimg"></image>
  16. </view>
  17. </picker>
  18. </block>
  19. </uni-nav-bar>
  20. </view>
  21. <image :src="bgimg" class="bgimg"></image>
  22. <view class="mbox">
  23. <view class="head flexc mb18">
  24. <image :src="headimg" class="headimg"></image>
  25. <view class="hinfo">
  26. <view class="tit">{{memberInfo.name}}</view>
  27. <view class="medal flexc">
  28. <view class="bg bg1">
  29. <image :src="medala"></image>
  30. 界别<text></text>{{kaType(memberInfo.boundary,jblist)}}
  31. </view>
  32. <view class="bg bg2">
  33. <image :src="medalb"></image>
  34. 党派<text></text>{{kaType(memberInfo.partyAffiliation,dplist)}}
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="jinfo">
  40. <view class="tit mb14">基本信息</view>
  41. <view class="flex mb11">
  42. <view class="imgs"><image :src="infoa" class="imga"></image></view>
  43. <view class="txt">身份证号 | {{memberInfo.card}}</view>
  44. </view>
  45. <view class="flex mb11">
  46. <view class="imgs"><image :src="infob" class="imgb"></image></view>
  47. <view class="txt">联系方式 | {{memberInfo.phonenumber}}</view>
  48. </view>
  49. <view class="flex mb11">
  50. <view class="imgs"><image :src="infoc" class="imgc"></image></view>
  51. <view class="txt">工作单位及职务 | {{memberInfo.unit}}</view>
  52. </view>
  53. <view class="flex mb11">
  54. <view class="imgs"><image :src="infod" class="imgd"></image></view>
  55. <view class="txt">乡镇(经开区)委员工作室 | {{memberInfo.studio}}</view>
  56. </view>
  57. </view>
  58. <!-- 分 -->
  59. <view class="score flexcj mb20">
  60. <view class="scorea">
  61. <image :src="bga"></image>
  62. <view class="box flexccc">
  63. <view class="num">{{scorecount.totalScore}}</view>
  64. <view class="f12 fw coe2">履职得分情况</view>
  65. <view class="f12 co22">(满分{{scorecount.fullScore||0}}分)</view>
  66. </view>
  67. </view>
  68. <view class="scorea">
  69. <image :src="bgb"></image>
  70. <view class="box flexccc">
  71. <view class="num">{{scorecount.rank||""}}</view>
  72. <view class="f12 fw co83">综合排名</view>
  73. <view class="f12 co22">(共{{scorecount.totalPeople||0}}名)</view>
  74. </view>
  75. </view>
  76. </view>
  77. <!-- tab -->
  78. <view class="tabs mb27">
  79. <view v-for="(ite,idx) in tabList" @click="getTabFn(ite.val)" :class="tabval==ite.val?'act':''" class="tab" :key="ite.val">{{ite.tit}}</view>
  80. </view>
  81. <block v-if="tabval==0">
  82. <view class="flexcw mb28">
  83. <view class="nums bga">
  84. <view class="tit flex1">政协提案</view>
  85. <view class="txt"><text>{{mapcount.proposalInfoNum}}</text>件</view>
  86. </view>
  87. <view class="nums bgb">
  88. <view class="tit flex1">社情民意</view>
  89. <view class="txt"><text>{{mapcount.sqmyInfoNum}}</text>件</view>
  90. </view>
  91. <view class="nums bga">
  92. <view class="tit flex1">全会</view>
  93. <view class="txt"><text>{{mapcount.plenarySessionNum}}</text>件</view>
  94. </view>
  95. <view class="nums bgb">
  96. <view class="tit flex1">活动</view>
  97. <view class="txt"><text>{{mapcount.activityNum}}</text>件</view>
  98. </view>
  99. <view class="nums bga">
  100. <view class="tit flex1">普通会议</view>
  101. <view class="txt"><text>{{mapcount.conferenceNum}}</text>件</view>
  102. </view>
  103. <view class="nums bgb">
  104. <view class="tit flex1">会议发言</view>
  105. <view class="txt"><text>{{mapcount.speakNum}}</text>件</view>
  106. </view>
  107. </view>
  108. <!-- 雷达图 -->
  109. <view class="mb32">
  110. <qiun-data-charts type="radar" :opts="opts" :chartData="chartData"></qiun-data-charts>
  111. </view>
  112. <!-- 各项得分 -->
  113. <view class="jinfo">
  114. <view class="tit mb14">各项得分</view>
  115. <view class="gsbox">
  116. <view class="gslist">
  117. <view class="gtit">活动</view>
  118. <view class="gtxt">{{scorecount.activityScore}}</view>
  119. </view>
  120. <view class="gslist">
  121. <view class="gtit">会议</view>
  122. <view class="gtxt">{{scorecount.conferenceScore}}</view>
  123. </view>
  124. <view class="gslist">
  125. <view class="gtit">社情民意</view>
  126. <view class="gtxt">{{scorecount.sqmyScore}}</view>
  127. </view>
  128. <view class="gslist">
  129. <view class="gtit">政协提案</view>
  130. <view class="gtxt">{{scorecount.proposalScore}}</view>
  131. </view>
  132. <!-- <view class="gslist">
  133. <view class="gtit">会议发言</view>
  134. <view class="gtxt">{{scorecount.conferenceScore}}</view>
  135. </view> -->
  136. <view class="gslist">
  137. <view class="gtit">其他</view>
  138. <view class="gtxt">{{scorecount.bonusScore}}</view>
  139. </view>
  140. </view>
  141. </view>
  142. </block>
  143. <!-- 提案方便 -->
  144. <view class="list" v-if="tabval!=0">
  145. <view class="zfbox" v-if="tabval==2">个人提案方面总计得分 <text class="znum">{{scorecount.proposalScore||0}}</text> 分</view>
  146. <view class="zfbox" v-if="tabval==3">个人社情民意方面总计得分 <text class="znum">{{scorecount.sqmyScore||0}}</text> 分</view>
  147. <view class="zfbox" v-if="tabval==4">个人会议参与情况总计得分 <text class="znum">{{scorecount.conferenceScore||0}}</text> 分</view>
  148. <view class="zfbox" v-if="tabval==5">个人活动参与情况总计得分 <text class="znum">{{scorecount.activityScore||0}}</text> 分</view>
  149. <report-list :type='tabval' :wtdt="wtdt" :tajdlist="tajdlist" :ztlxlist="ztlxlist" :hylxlist="hylxlist" :hdlxlist="hdlxlist" :datalist="list"></report-list>
  150. <!-- <view class="upmore flexccc">
  151. <image :src="upmimg"></image>
  152. <view>下拉更多</view>
  153. </view> -->
  154. </view>
  155. </view>
  156. </view>
  157. </template>
  158. <script>
  159. import config from '@/config'
  160. const baseUrl = config.baseUrl
  161. import { selectValue } from '@/utils/common.js';
  162. import {getInfomenberDetai} from "@/api/mine/report.js"
  163. import {getDictionaryFn} from "@/api/mine/register.js"
  164. import reportList from "@/work/components/report/list.vue"
  165. export default {
  166. components:{reportList},
  167. data() {
  168. return {
  169. headimg:require("@/static/images/mine/header.png"),
  170. backimg:require("@/work/static/images/back.png"),
  171. bgimg: require("@/work/static/images/report/bg.png"),
  172. infoa:require("@/work/static/images/report/infoa.png"),
  173. infob:require("@/work/static/images/report/infob.png"),
  174. infoc:require("@/work/static/images/report/infoc.png"),
  175. infod:require("@/work/static/images/report/infod.png"),
  176. bga:require("@/work/static/images/report/bga.png"),
  177. bgb:require("@/work/static/images/report/bgb.png"),
  178. medala:require("@/work/static/images/report/medala.png"),
  179. medalb:require("@/work/static/images/report/medalb.png"),
  180. upimg:require("@/work/static/images/report/up.png"),
  181. upmimg:require("@/static/images/home/up.png"),
  182. backgroundColor:'transparent',
  183. year:'',
  184. wtdt:'',
  185. memberInfo:{},
  186. proposalInfoList:[],//提案集合
  187. sqmyInfoList:[],//社情民意集合
  188. zxConferenceList:[],//会议集合
  189. zxActivityList:[],//活动集合
  190. zxSpeakList:[],//发言集合
  191. jblist:[],
  192. dplist:[],
  193. tajdlist:[],
  194. ztlxlist:[],
  195. hylxlist:[],
  196. hdlxlist:[],
  197. mapcount:{},
  198. scorecount:{},
  199. tabval:0,
  200. list:[],
  201. tabList:[{tit:'履职状况',val:'0'},{tit:'提案方面',val:2},{tit:'社情民意方面',val:3},{tit:'会议参与情况',val:4},{tit:'活动参与情况',val:5},{tit:'会议发言情况',val:6}],
  202. chartData:{
  203. categories: ["活动","会议","社情民意","政协提案","其他"],
  204. series: [],
  205. },
  206. opts: {
  207. color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
  208. padding: [5,5,5,5],
  209. dataLabel: false,
  210. enableScroll: false,
  211. legend: {
  212. show: true,
  213. position: "right",
  214. lineHeight: 25
  215. },
  216. "legend": {"show": false,},
  217. extra: {
  218. radar: {
  219. gridType: "radar",
  220. gridColor: "#CCCCCC",
  221. gridCount: 3,
  222. opacity: 0.2,
  223. max: 200,
  224. labelShow: true,
  225. border: true
  226. }
  227. }
  228. }
  229. }
  230. },
  231. onPageScroll(e) {
  232. var scrollTop = Number(e.scrollTop);
  233. var listTop=Number(this.listTop)-Number(this.nvaHeight)
  234. if (scrollTop <=this.nvaHeight) {
  235. const opacity = scrollTop / 100 // 计算透明度值
  236. const color = `rgba(29, 100, 226, ${opacity})`
  237. this.backgroundColor = color // 更新盒子背景颜色
  238. } else {
  239. this.backgroundColor = '#1D64E2'
  240. }
  241. },
  242. onLoad(e) {
  243. this.id=e.id;
  244. var date = new Date();
  245. this.year= date.getFullYear();
  246. this.getDetail()
  247. this.init()
  248. },
  249. methods: {
  250. getBack(){
  251. uni.navigateBack({
  252. delta:1
  253. })
  254. },
  255. kaType(ite,list){
  256. return selectValue(list, ite);
  257. },
  258. bindDateChange(e){
  259. var val=e.detail.value;
  260. this.year=val;
  261. this.getDetail()
  262. },
  263. getTabFn(val){
  264. this.tabval=val
  265. if(val==2){
  266. this.list=this.proposalInfoList
  267. }else if(val==3){
  268. this.list=this.sqmyInfoList
  269. }else if(val==4){
  270. this.list=this.zxConferenceList
  271. }else if(val==5){
  272. this.list=this.zxActivityList
  273. }else if(val==6){
  274. this.list=this.zxSpeakList
  275. }
  276. },
  277. init(){
  278. // 界别
  279. getDictionaryFn('circles').then(res=>{
  280. if(res.code==200&&res.data.length){
  281. this.jblist = res.data.map(v => {
  282. return {
  283. label: v.dictLabel,
  284. value:v.dictValue
  285. }
  286. })
  287. }
  288. })
  289. // 党派
  290. getDictionaryFn('political_parties').then(res=>{
  291. if(res.code==200&&res.data.length){
  292. this.dplist = res.data.map(v => {
  293. return {
  294. label: v.dictLabel,
  295. value: v.dictValue
  296. }
  297. })
  298. }
  299. })
  300. // 提案进度
  301. getDictionaryFn('proposal_progress').then(res=>{
  302. if(res.code==200){
  303. this.tajdlist = res.data.map(v => {
  304. return {
  305. label: v.dictLabel,
  306. value: v.dictValue
  307. }
  308. })
  309. }
  310. })
  311. //主题类型
  312. getDictionaryFn('sqmy_topic_type').then(res=>{
  313. if(res.code==200){
  314. this.ztlxlist = res.data.map(v => {
  315. return {
  316. label: v.dictLabel,
  317. value: v.dictValue
  318. }
  319. })
  320. }
  321. })
  322. //会议类型
  323. getDictionaryFn('conference_type').then(res=>{
  324. if(res.code==200){
  325. this.hylxlist = res.data.map(v => {
  326. return {
  327. label: v.dictLabel,
  328. value: v.dictValue
  329. }
  330. })
  331. }
  332. })
  333. //活动类型
  334. getDictionaryFn('activity_type').then(res=>{
  335. if(res.code==200){
  336. this.hdlxlist = res.data.map(v => {
  337. return {
  338. label: v.dictLabel,
  339. value: v.dictValue
  340. }
  341. })
  342. }
  343. })
  344. },
  345. getDetail(){
  346. var params={
  347. userId:this.id,
  348. year:this.year
  349. }
  350. getInfomenberDetai(params).then(res=>{
  351. if(res.code==200){
  352. this.datainfo=res.data;
  353. this.memberInfo=res.data.memberInfo;
  354. if(res.data.memberAssessmentInfo){
  355. this.scorecount=JSON.parse(JSON.stringify(res.data.memberAssessmentInfo));
  356. var score=res.data.memberAssessmentInfo
  357. var newArr=[score.activityScore||0,score.conferenceScore||0,score.sqmyScore||0,score.proposalScore||0,score.bonusScore||0]
  358. var obj={
  359. name:'分值',
  360. data:newArr
  361. }
  362. var series=[]
  363. series.push(obj)
  364. this.chartData.series=series
  365. }
  366. if(res.data.map){
  367. this.mapcount=JSON.parse(JSON.stringify(res.data.map));
  368. }
  369. this.proposalInfoList=res.data.proposalInfoList;
  370. this.sqmyInfoList=res.data.sqmyInfoList;
  371. this.zxConferenceList=res.data.zxConferenceList;
  372. this.zxActivityList=res.data.zxActivityList;
  373. this.zxSpeakList=res.data.zxSpeakList;
  374. }
  375. })
  376. },
  377. }
  378. }
  379. </script>
  380. <style lang="scss">
  381. page {background-color: #ffffff;}
  382. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;
  383. .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
  384. image{width: 40rpx;height: 30rpx;}
  385. }
  386. .topr{width: 36rpx;height: 36rpx;position: relative;margin-right: 10rpx;
  387. image{width: 100%;height: 100%;}
  388. .cir{width: 14rpx;height: 14rpx;background: #DF0024;border-radius: 50%;position: absolute;right: -7rpx;top: -7rpx;}
  389. }
  390. }
  391. .zxbox{
  392. .bgimg{width: 100%;height: 196rpx;}
  393. .mbox{margin-top: -34rpx;padding: 34rpx 24rpx 30rpx;z-index: 1;position: relative;border-radius: 30rpx 30rpx 0 0;background-color: #ffffff;
  394. .head{
  395. .headimg{width: 140rpx;height: 140rpx;flex: 0 0 auto;margin-right: 34rpx;}
  396. .hinfo{
  397. .tit{font-weight: bold;font-size: 34rpx;color: #222327;margin-bottom: 26rpx;}
  398. .medal{
  399. .bg{position: relative;height: 40rpx;border-radius: 4rpx;min-width: 200rpx;font-weight: 500;
  400. font-size: 20rpx;padding-left: 16rpx;box-sizing: border-box;text-align: center;
  401. color: #FFFFFF;line-height: 40rpx;
  402. text{border-right: 2rpx solid #ffffff;margin: 0 8rpx;}
  403. &.bg1{background: #C8A46D;margin-right: 36rpx;}
  404. &.bg2{background: #BC2828;}
  405. image{width: 32rpx;height: 40rpx;position: absolute;left: -16rpx;top: 0;}
  406. }
  407. }
  408. }
  409. }
  410. .jinfo{padding-bottom: 22rpx;
  411. .tit{font-weight: bold;font-size: 30rpx;color: #222327;}
  412. .imgs{width: 30rpx;height: 34rpx;display: flex;align-items: center;justify-content: center;margin-right: 14rpx;
  413. .imga{width:30rpx;height: 24rpx;}
  414. .imgb{width:18rpx;height: 26rpx;}
  415. .imgc{width:30rpx;height: 26rpx;}
  416. .imgd{width:26rpx;height: 26rpx;}
  417. }
  418. .txt{font-weight: 500;font-size: 26rpx;color: #222327;}
  419. .gsbox{background: #ECF1FD;border-radius: 10rpx;padding: 48rpx 26rpx 18rpx;display: flex;flex-wrap: wrap;justify-content: space-between;
  420. .gslist{width: 242rpx;display: flex;align-items: center;margin-bottom: 28rpx;flex: 0 1 auto;
  421. .gtit{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;}
  422. .gtxt{font-weight: bold;font-size: 30rpx;color: #004BF6;flex:1;text-align: right;}
  423. }
  424. }
  425. }
  426. .score{
  427. .scorea{width: 334rpx;height: 146rpx;position: relative;
  428. image{width: 100%;height: 100%;}
  429. .box{position: absolute;left: 0;right: 0;top: 0;bottom: 0;text-align: center;
  430. .num{font-weight: 800;font-size: 40rpx;color: #222327;}
  431. }
  432. }
  433. }
  434. .tabs{display: flex;align-items: center;overflow-x: auto;
  435. .tab{font-weight: 500;font-size: 26rpx;color: #666666;position: relative;height: 88rpx;line-height: 88rpx;margin-right: 40rpx;flex: 0 0 auto;
  436. &.act{font-size: 30rpx;font-weight: bold;color: #222327;
  437. &::after{content: '';width:52rpx;height: 10rpx;background: #1D64E2;border-radius: 6rpx;position: absolute;left: 50%;margin-left: -26rpx;bottom: 0rpx;}
  438. }
  439. }
  440. }
  441. .nums{width: 332rpx;height: 110rpx;border-radius: 10rpx;display: flex;align-items: center;padding: 0 26rpx;margin-bottom: 24rpx;margin-right: 38rpx;
  442. &:nth-child(2n){margin-right: 0;}
  443. .tit{font-weight: bold;font-size: 30rpx;}
  444. .txt{font-weight: 500;font-size: 24rpx;
  445. text{font-weight: 500;font-size: 40rpx;color: #343434;margin-right: 8rpx;}
  446. }
  447. &.bga{background: #E8EFFF;
  448. .tit{color: #004BF6;}
  449. text{color: #004BF6;}
  450. }
  451. &.bgb{background: #FFECE3;
  452. .tit{color: #FF4E00;}
  453. text{color: #FF4E00;}
  454. }
  455. }
  456. .zfbox{font-weight: bold;font-size:26rpx;color: #222327;margin-bottom: 36rpx;
  457. .znum{font-size: 40rpx;color: #1D64E2;padding: 0 8rpx;}
  458. }
  459. }
  460. }
  461. .picks{
  462. width: 160rpx;height: 56rpx;background-color: rgba(15, 57, 116, 0.5);display: flex;align-items: center;padding: 0 24rpx;box-sizing: border-box;border-radius: 10rpx;
  463. image{width: 16rpx;height: 10rpx;flex: 0 0 auto;}
  464. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;flex: 1;}
  465. }
  466. .upmore{
  467. image{width: 40rpx;height: 32rpx;margin-bottom: 16rpx;}
  468. view{font-weight: 500;font-size: 26rpx;color: #AAAAAA;}
  469. }
  470. </style>