seasonConpanyPage.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. <template>
  2. <div :class="showDatePicker || showSelect? 'homeMobeilMask': ''">
  3. </div>
  4. <div class="seasonConpanyPage">
  5. <van-nav-bar title="季度单位评级"/>
  6. <div class="mobeilVant">
  7. <div class="mobeilTop">
  8. <div class="topLeft">
  9. <!-- <van-icon name="star" size="20" /> -->
  10. <img :src="logoImg" alt="">
  11. <span>全业务域考评系统</span>
  12. </div>
  13. <div class="topRight">
  14. <span>系统导航</span>
  15. <!-- <van-icon name="wap-nav" size="23" /> -->
  16. <img :src="daohangImg" alt="" @click="chooseMenu">
  17. </div>
  18. </div>
  19. <div class="seasonConpanyMain">
  20. <div class="mainSeach">
  21. <div class="rankingList">
  22. <span>{{showDate}}年度</span>
  23. <img :src="dateImg" @click="changePickerDate" alt="">
  24. </div>
  25. <div class="sectionModel">
  26. <span @click="changeSelect">{{binSectionName}}板块</span>
  27. </div>
  28. <div class="mainSeachImg">
  29. <img :src="sortImg" alt="">
  30. <img :src="seachImg" alt="" @click="getSeasonData(binSection, showDate)">
  31. </div>
  32. </div>
  33. <van-date-picker
  34. v-model="currentDate"
  35. title="选择年份"
  36. :columns-type="['year']"
  37. @confirm="confirmFn"
  38. @cancel="cancelpickerFn"
  39. v-if="showDatePicker"
  40. />
  41. <van-picker
  42. title="选择板块"
  43. :columns="columnSection"
  44. @confirm="selectConfirm"
  45. @cancel="cancelSelect"
  46. v-if="showSelect"
  47. />
  48. <div class="mainModel">
  49. <el-table :data="seasonConpanyData" style="width: 100%">
  50. <el-table-column label="排名" align="center">
  51. <template #default="scope">
  52. <img :src="scope.row.img" alt="" v-if="scope.row.img">
  53. <span v-else>{{scope.row.rank}}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="单位名称" prop="company" />
  57. <el-table-column label="得分" prop="score" align="center"/>
  58. <el-table-column label="加分事项" align="center">
  59. <template #default="scope">
  60. <img :src="scope.row.matter_heigh === 0 ? cenImg : scope.row.matter_heigh === 1 ? topImg : botImg" alt="">
  61. </template>
  62. </el-table-column>
  63. <el-table-column label="扣分事项" align="center">
  64. <template #default="scope">
  65. <img :src="scope.row.matter_low === 0 ? cenImg : scope.row.matter_low === 1 ? topImg : botImg" alt="">
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="管理加分" align="center">
  69. <template #default="scope">
  70. <img :src="scope.row.manage_height === 0 ? cenImg : scope.row.manage_height === 1 ? topImg : botImg" alt="">
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="管理扣分" align="center" >
  74. <template #default="scope">
  75. <img :src="scope.row.manage_low === 0 ? cenImg : scope.row.manage_low === 1 ? topImg : botImg" alt="">
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="高于基准" align="center" >
  79. <template #default="scope">
  80. <img :src="scope.row.standard_heigh === 0 ? cenImg : scope.row.standard_heigh === 1 ? topImg : botImg" alt="">
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="低于基准" align="center" >
  84. <template #default="scope">
  85. <img :src="scope.row.standard_low === 0 ? cenImg : scope.row.standard_low === 1 ? topImg : botImg" alt="">
  86. </template>
  87. </el-table-column>
  88. </el-table>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </template>
  94. <script>
  95. import logoImg from '../assets/mobeilImg/logo.png'
  96. import daohangImg from '../assets/mobeilImg/daohang.png'
  97. import dateImg from '../assets/mobeilImg/date.png'
  98. import sortImg from '../assets/mobeilImg/sort.png'
  99. import seachImg from '../assets/mobeilImg/seach.png'
  100. import cup1 from '../assets/getwayImg/cup1.png'
  101. import cup2 from '../assets/getwayImg/cup2.png'
  102. import cup3 from '../assets/getwayImg/cup3.png'
  103. import topImg from '../assets/getwayImg/topNew.png'
  104. import botImg from '../assets/getwayImg/botNew.png'
  105. import cenImg from '../assets/getwayImg/cenNew.png'
  106. import {apiGetevaluationportallist} from '../api/api'
  107. export default {
  108. data() {
  109. return {
  110. logoImg: logoImg,
  111. daohangImg: daohangImg,
  112. dateImg: dateImg,
  113. sortImg: sortImg,
  114. seachImg: seachImg,
  115. topImg: topImg,
  116. botImg: botImg,
  117. cenImg: cenImg,
  118. showDatePicker: false,
  119. showSelect: false,
  120. currentDate: [],
  121. showDate: '',
  122. binSection: 'HD',
  123. binSectionName: '火电',
  124. seasonConpanyData: [],
  125. columnSection: []
  126. }
  127. },
  128. created() {
  129. this.showDate = new Date().getFullYear()-1
  130. this.getSeasonData(this.binSection, this.showDate)
  131. this.columnSection = [
  132. { text: '火电', value: 'HD' },
  133. { text: '水电', value: 'SD' },
  134. { text: '新能源', value: 'XNYFG' },
  135. { text: '海外业务', value: 'GJYW' },
  136. { text: '煤电一体化', value: 'MDYTH' }
  137. ]
  138. },
  139. methods: {
  140. // 获取季度评级详情
  141. getSeasonData(name, year) {
  142. let that = this
  143. that.seasonConpanyData = []
  144. let params = {
  145. binSection: name,
  146. year: year,
  147. season: ''
  148. }
  149. apiGetevaluationportallist(params).then(datas =>{
  150. if (datas && datas.data && datas.data.season) {
  151. if (datas.data.season[name].length>0) {
  152. datas.data.season[name].forEach((item, index) =>{
  153. item.rank = index+1
  154. if (index < 3) {
  155. if (index === 0) {
  156. item.img = cup1
  157. } else if (index === 1) {
  158. item.img = cup2
  159. } else if (index === 2) {
  160. item.img = cup3
  161. }
  162. }
  163. })
  164. that.seasonConpanyData = datas.data.season[name]
  165. }
  166. }
  167. })
  168. },
  169. chooseMenu() {
  170. this.$router.push({ path: "/menu"})
  171. },
  172. changePickerDate() {
  173. this.showDatePicker = true
  174. },
  175. changeSelect() {
  176. this.showSelect = true
  177. },
  178. confirmFn(val) {
  179. this.showDate = val.selectedValues[0]
  180. this.cancelpickerFn()
  181. },
  182. selectConfirm(val) {
  183. this.binSection = val.selectedValues[0]
  184. if (this.binSection === 'HD') {
  185. this.binSectionName = '火电'
  186. } else if (this.binSection === 'SD') {
  187. this.binSectionName = '水电'
  188. } else if (this.binSection === 'XNYFG') {
  189. this.binSectionName = '新能源'
  190. } else if (this.binSection === 'GJYW') {
  191. this.binSectionName = '海外业务'
  192. } else if (this.binSection === 'MDYTH') {
  193. this.binSectionName = '煤电一体化'
  194. }
  195. this.cancelSelect()
  196. },
  197. cancelpickerFn() {
  198. this.showDatePicker = false
  199. },
  200. cancelSelect() {
  201. this.showSelect = false
  202. }
  203. }
  204. }
  205. </script>
  206. <style lang="less">
  207. .homeMobeilMask{
  208. position: fixed;
  209. top: 0;
  210. left: 0;
  211. width: 100%;
  212. height: 100%;
  213. background-color: rgba(0,0,0,0.5);
  214. z-index: 111;
  215. }
  216. .seasonConpanyPage {
  217. background-color: #184FB4;
  218. .van-nav-bar{
  219. width: 100%;
  220. background-color: #184FB4;
  221. color: #fff;
  222. position: fixed;
  223. top: 0;
  224. z-index: 111111;
  225. .van-nav-bar__content{
  226. .van-nav-bar__left{
  227. .van-nav-bar__text{
  228. color: #fff;
  229. }
  230. }
  231. }
  232. }
  233. .mobeilVant{
  234. height: 100%;
  235. margin-top: 45px;
  236. border-radius: 10px 10px 0 0;
  237. background-color: #fff;
  238. .mobeilTop{
  239. height: 60px;
  240. display: flex;
  241. justify-content: space-around;
  242. .topLeft{
  243. display: flex;
  244. img{
  245. width: 24px;
  246. height: 28px;
  247. position: relative;
  248. top: 18px;
  249. left: -10px;
  250. }
  251. span{
  252. font-family: MicrosoftYaHei;
  253. font-weight: 600;
  254. font-size: 16px;
  255. color: #444950;
  256. line-height: 60px;
  257. }
  258. }
  259. .topRight{
  260. display: flex;
  261. img{
  262. width: 22px;
  263. height: 18px;
  264. position: relative;
  265. top: 21px;
  266. left: 5px;
  267. }
  268. span{
  269. font-family: MicrosoftYaHei;
  270. font-weight: 400;
  271. font-size: 14px;
  272. color: #545960;
  273. line-height: 60px;
  274. margin-right: 5px;
  275. }
  276. }
  277. }
  278. .seasonConpanyMain{
  279. // height: 50px;
  280. background-color: #ededf5;
  281. padding: 17px 20px;
  282. width: calc(100% - 40px);
  283. .mainSeach{
  284. display: flex;
  285. // justify-content: space-between;
  286. .rankingList{
  287. width: 37%;
  288. height: 40px;
  289. background: #184FB4;
  290. border-radius: 5px;
  291. margin-bottom: 15px;
  292. margin-right: 10px;
  293. span{
  294. display: inline-block;
  295. width: 85%;
  296. font-family: MicrosoftYaHei;
  297. font-weight: 400;
  298. font-size: 16px;
  299. color: #fff;
  300. margin-right: 5px;
  301. position: relative;
  302. left: 20px;
  303. top: 10px;
  304. }
  305. img{
  306. width: 22px;
  307. height: 18px;
  308. position: relative;
  309. top: -10px;
  310. left: 90px;
  311. }
  312. }
  313. .sectionModel{
  314. width: 37%;
  315. height: 40px;
  316. background: #838DAB;
  317. border-radius: 5px;
  318. margin-bottom: 15px;
  319. margin-right: 15px;
  320. span{
  321. display: inline-block;
  322. width: 100%;
  323. line-height: 40px;
  324. text-align: center;
  325. color: #fff;
  326. }
  327. }
  328. .mainSeachImg{
  329. width: 17%;
  330. display: flex;
  331. justify-content: space-between;
  332. position: relative;
  333. top: 10px;
  334. img:nth-child(1){
  335. width: 25px;
  336. height: 15px;
  337. position: relative;
  338. top: 2px;
  339. }
  340. img:nth-child(2){
  341. width: 22px;
  342. height: 22px;
  343. }
  344. }
  345. }
  346. .van-picker{
  347. z-index: 222222
  348. }
  349. .mainModel{
  350. background: #fff;
  351. border-radius: 5px;
  352. padding: 5px 0;
  353. .el-table{
  354. .el-table__header-wrapper{
  355. .el-table__header{
  356. tr{
  357. .cell{
  358. line-height: 18px !important;
  359. }
  360. }
  361. }
  362. }
  363. .el-table__body-wrapper{
  364. .el-table__body{
  365. tr{
  366. .cell{
  367. img{
  368. width: 20px;
  369. height: 20px;
  370. }
  371. }
  372. }
  373. }
  374. }
  375. }
  376. }
  377. }
  378. }
  379. }
  380. </style>