gatewayNewSeasonFrom.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. <template>
  2. <div class="seasonLeagueTable">
  3. <el-dialog v-model="dialogVisible" width="80vw" :close-on-click-modal="false">
  4. <template #header>
  5. <div class="seasonHeader">
  6. <span style="font-size:14px;color:#fff">考核排行榜</span>
  7. <el-select v-model="optionName" placeholder="请选择板块" @change="changeOption">
  8. <el-option
  9. v-for="item in optionArr"
  10. :key="item.value"
  11. :label="item.label"
  12. :value="item.value">
  13. </el-option>
  14. </el-select>
  15. </div>
  16. </template>
  17. <el-row class="seasonFrom">
  18. <el-col :span="12" style="border-right: 1px solid #E1E3EA;">
  19. <div class="seasonFromHeader">
  20. <div class="headerNameTit">
  21. <div class="headerNameTit_left">
  22. <span>排名</span>
  23. <span style="margin-left: 20px">单位名称</span>
  24. </div>
  25. <div class="headerNameTit_right">
  26. <span>得分</span>
  27. <span style="margin-left: 20px">加分事项</span>
  28. <span style="margin-left: 20px">扣分事项</span>
  29. <span style="margin-left: 20px">管理加分</span>
  30. <span style="margin-left: 20px">管理扣分</span>
  31. <span style="margin-left: 20px">高于基准</span>
  32. <span style="margin-left: 20px">低于基准</span>
  33. </div>
  34. </div>
  35. </div>
  36. <div style="margin-top:10px">
  37. <div style="display: flex;" v-for="(item, index) in evaluationSeasonDataLeft" :key="index">
  38. <div class="mainFourMsg">
  39. <span>{{item.rank}}</span>
  40. <span>{{item.company}}</span>
  41. <span>{{item.score}}</span>
  42. <div class="mainFourImg">
  43. <el-popover
  44. placement="right-start"
  45. :title="item.company +' '+ item.score"
  46. :width="200"
  47. trigger="hover"
  48. :content="item.matter_heigh_note"
  49. >
  50. <template #reference>
  51. <img :src="item.matter_heigh === 0 ? cenImg : item.matter_heigh === 1 ? topImg : botImg" alt="">
  52. </template>
  53. </el-popover>
  54. <el-popover
  55. placement="right-start"
  56. :title="item.company +' '+ item.score"
  57. :width="200"
  58. trigger="hover"
  59. :content="item.manage_low_note"
  60. >
  61. <template #reference>
  62. <img :src="item.manage_low === 0 ? cenImg : item.manage_low === 1 ? topImg : botImg" alt="">
  63. </template>
  64. </el-popover>
  65. <el-popover
  66. placement="right-start"
  67. :title="item.company +' '+ item.score"
  68. :width="200"
  69. trigger="hover"
  70. :content="item.manage_height_note"
  71. >
  72. <template #reference>
  73. <img :src="item.manage_height === 0 ? cenImg : item.manage_height === 1 ? topImg : botImg" alt="">
  74. </template>
  75. </el-popover>
  76. <el-popover
  77. placement="right-start"
  78. :title="item.company +' '+ item.score"
  79. :width="200"
  80. trigger="hover"
  81. :content="item.manage_low_note"
  82. >
  83. <template #reference>
  84. <img :src="item.manage_low === 0 ? cenImg : item.manage_low === 1 ? topImg : botImg" alt="">
  85. </template>
  86. </el-popover>
  87. <el-popover
  88. placement="right-start"
  89. :title="item.company +' '+ item.score"
  90. :width="200"
  91. trigger="hover"
  92. :content="item.standard_heigh_note"
  93. >
  94. <template #reference>
  95. <img :src="item.standard_heigh === 0 ? cenImg : item.standard_heigh === 1 ? topImg : botImg" alt="">
  96. </template>
  97. </el-popover>
  98. <el-popover
  99. placement="right-start"
  100. :title="item.company +' '+ item.score"
  101. :width="200"
  102. trigger="hover"
  103. :content="item.standard_low_note"
  104. >
  105. <template #reference>
  106. <img :src="item.standard_low === 0 ? cenImg : item.standard_low === 1 ? topImg : botImg" alt="">
  107. </template>
  108. </el-popover>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </el-col>
  114. <el-col :span="12">
  115. <div class="seasonFromHeader">
  116. <div class="headerNameTit">
  117. <div class="headerNameTit_left">
  118. <span>排名</span>
  119. <span style="margin-left: 20px">单位名称</span>
  120. </div>
  121. <div class="headerNameTit_right">
  122. <span>得分</span>
  123. <span style="margin-left: 20px">加分事项</span>
  124. <span style="margin-left: 20px">扣分事项</span>
  125. <span style="margin-left: 20px">管理加分</span>
  126. <span style="margin-left: 20px">管理扣分</span>
  127. <span style="margin-left: 20px">高于基准</span>
  128. <span style="margin-left: 20px">低于基准</span>
  129. </div>
  130. </div>
  131. </div>
  132. <div style="display: flex" v-for="(item, index) in evaluationSeasonDataRight" :key="index">
  133. <div class="mainFourMsg">
  134. <span>{{item.rank}}</span>
  135. <span>{{item.company}}</span>
  136. <span>{{item.score}}</span>
  137. <div class="mainFourImg">
  138. <el-popover
  139. placement="right-start"
  140. :title="item.company +' '+ item.score"
  141. :width="200"
  142. trigger="hover"
  143. :content="item.matter_heigh_note"
  144. >
  145. <template #reference>
  146. <img :src="item.matter_heigh === 0 ? cenImg : item.matter_heigh === 1 ? topImg : botImg" alt="">
  147. </template>
  148. </el-popover>
  149. <el-popover
  150. placement="right-start"
  151. :title="item.company +' '+ item.score"
  152. :width="200"
  153. trigger="hover"
  154. :content="item.manage_low_note"
  155. >
  156. <template #reference>
  157. <img :src="item.manage_low === 0 ? cenImg : item.manage_low === 1 ? topImg : botImg" alt="">
  158. </template>
  159. </el-popover>
  160. <el-popover
  161. placement="right-start"
  162. :title="item.company +' '+ item.score"
  163. :width="200"
  164. trigger="hover"
  165. :content="item.manage_height_note"
  166. >
  167. <template #reference>
  168. <img :src="item.manage_height === 0 ? cenImg : item.manage_height === 1 ? topImg : botImg" alt="">
  169. </template>
  170. </el-popover>
  171. <el-popover
  172. placement="right-start"
  173. :title="item.company +' '+ item.score"
  174. :width="200"
  175. trigger="hover"
  176. :content="item.manage_low_note"
  177. >
  178. <template #reference>
  179. <img :src="item.manage_low === 0 ? cenImg : item.manage_low === 1 ? topImg : botImg" alt="">
  180. </template>
  181. </el-popover>
  182. <el-popover
  183. placement="right-start"
  184. :title="item.company +' '+ item.score"
  185. :width="200"
  186. trigger="hover"
  187. :content="item.standard_heigh_note"
  188. >
  189. <template #reference>
  190. <img :src="item.standard_heigh === 0 ? cenImg : item.standard_heigh === 1 ? topImg : botImg" alt="">
  191. </template>
  192. </el-popover>
  193. <el-popover
  194. placement="right-start"
  195. :title="item.company +' '+ item.score"
  196. :width="200"
  197. trigger="hover"
  198. :content="item.standard_low_note"
  199. >
  200. <template #reference>
  201. <img :src="item.standard_low === 0 ? cenImg : item.standard_low === 1 ? topImg : botImg" alt="">
  202. </template>
  203. </el-popover>
  204. </div>
  205. </div>
  206. </div>
  207. </el-col>
  208. </el-row>
  209. </el-dialog>
  210. </div>
  211. </template>
  212. <script>
  213. import {apiGetevaluationportallist} from '../../api/api'
  214. import topImg from '../../assets/getwayImg/topNew.png'
  215. import botImg from '../../assets/getwayImg/botNew.png'
  216. import cenImg from '../../assets/getwayImg/cenNew.png'
  217. export default {
  218. data() {
  219. return {
  220. dialogVisible: false,
  221. evaluationSeasonDataLeft: [],
  222. evaluationSeasonDataRight: [],
  223. optionArr: [],
  224. optionName: '',
  225. yearData: '',
  226. seasonData: '',
  227. topImg: topImg,
  228. botImg: botImg,
  229. cenImg: cenImg,
  230. }
  231. },
  232. created() {
  233. this.optionArr = [
  234. {
  235. label: '火电板块',
  236. value: 'HD'
  237. },
  238. {
  239. label: '水电板块',
  240. value: 'SD'
  241. },
  242. {
  243. label: '新能源',
  244. value: 'XNYFG'
  245. },
  246. {
  247. label: '海外业务',
  248. value: 'GJYE'
  249. },
  250. {
  251. label: '煤电一体化',
  252. value: 'MDYTH'
  253. }
  254. ]
  255. },
  256. methods: {
  257. init(name, year, season) {
  258. this.dialogVisible = true
  259. this.optionName = name
  260. this.yearData = year
  261. this.seasonData = season
  262. this.evaluationSeasonDataLeft = []
  263. this.evaluationSeasonDataRight = []
  264. this.getYearData(name, year, season)
  265. },
  266. changeOption(val) {
  267. this.evaluationSeasonDataLeft = []
  268. this.evaluationSeasonDataRight = []
  269. this.getYearData(val, this.yearData, this.seasonData)
  270. },
  271. getYearData(name, year, season) {
  272. let that = this
  273. let params = {
  274. binSection: name,
  275. year: year,
  276. season: season === '第一季度' ? '1' : season === '第二季度' ? '2' : '3'
  277. }
  278. apiGetevaluationportallist(params).then(datas =>{
  279. if (datas && datas.data && datas.data.season) {
  280. if (datas.data.season[name].length>0) {
  281. datas.data.season[name].forEach((item, index) =>{
  282. item.rank = index+1
  283. })
  284. if (datas.data.season[name].length>10) {
  285. that.evaluationSeasonDataLeft = datas.data.season[name].splice(0, 10)
  286. that.evaluationSeasonDataRight = datas.data.season[name]
  287. } else {
  288. that.evaluationSeasonDataLeft = datas.data.season[name]
  289. }
  290. }
  291. }
  292. })
  293. }
  294. }
  295. }
  296. </script>
  297. <style lang="less">
  298. .seasonLeagueTable{
  299. .el-overlay{
  300. .el-dialog{
  301. margin-top: 5vh !important;
  302. .el-dialog__header{
  303. .seasonHeader{
  304. width: 97%;
  305. display: flex;
  306. justify-content: space-between;
  307. .el-select{
  308. width: 120px;
  309. .el-input__inner{
  310. height:28px;
  311. }
  312. .el-input__suffix{
  313. .el-select__caret{
  314. line-height:28px;
  315. }
  316. }
  317. }
  318. }
  319. }
  320. .seasonFrom{
  321. padding: 0 20px;
  322. .seasonFromHeader{
  323. width: 100%;
  324. border-bottom: 1px solid #E1E3EA;
  325. .headerNameTit{
  326. display: flex;
  327. justify-content: space-between;
  328. padding: 8px 20px;
  329. font-size: 14px;
  330. color: #414141;
  331. }
  332. .headerTit{
  333. position: relative;
  334. top: 10px;
  335. left: 150px;
  336. }
  337. }
  338. .mainFourMsg{
  339. display: flex;
  340. margin: 0 10px;
  341. width: 100%;
  342. height: 33px;
  343. background: #F6F7FA;
  344. margin-bottom: 8px;
  345. padding-left: 10px;
  346. padding-top: 2px;
  347. border-radius: 5px;
  348. .mainFourImg{
  349. display: flex;
  350. justify-content: space-around;
  351. width: 65%;
  352. img{
  353. width: 20px;
  354. height: 20px;
  355. position: relative;
  356. top: 5px;
  357. margin-right: 33px;
  358. margin-left: 22px;
  359. }
  360. }
  361. span{
  362. font-size: 14px;
  363. font-family: Microsoft YaHei;
  364. position: relative;
  365. top: 6px;
  366. }
  367. span:nth-child(1){
  368. display: inline-block;
  369. width: 5%;
  370. font-weight: 600;
  371. color: #666;
  372. margin-left: 10px;
  373. margin-right: 13px;
  374. }
  375. span:nth-child(2){
  376. display: inline-block;
  377. width: 33%;
  378. font-weight: 400;
  379. color: #666;
  380. margin-right: 17px;
  381. }
  382. span:nth-child(3){
  383. display: inline-block;
  384. width: 5%;
  385. font-weight: 600;
  386. margin-right: 15px;
  387. color: #666;
  388. }
  389. }
  390. }
  391. }
  392. }
  393. }
  394. </style>