TopCard.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div class="CardBox">
  3. <div v-for="(items, index) in dataList" :key="index" class="Top_box">
  4. <div class="Top_box_name" v-if="dataSize > index">{{ items.name }}</div>
  5. <div class="Top_box_main" v-if="dataSize > index">
  6. <div class="Top_box_main_title">{{ items.title }}</div>
  7. <div><el-progress :percentage="items.value" :stroke-width="10" :show-text="false"></el-progress></div>
  8. </div>
  9. <div class="Top_box_value" v-if="dataSize > index">{{ items.value }}</div>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. /**
  15. * TOP列表组件(首页历年频发问题TOP5等地方用到)
  16. * @author: LiuMengxiang
  17. * @Date: 2022年11月14-18日
  18. * 后期需要调整。根据用户传入数据自动渲染。
  19. */
  20. export default {
  21. name: "TopCard",
  22. components: {},
  23. data() {
  24. return {
  25. dataList: [
  26. { name: "TOP1", title: "基本农田、耕地等被违规占用、改变用途或闲置抛荒", value: 99 },
  27. { name: "TOP2", title: "发现问题整改不到位,存在长期不整改不处理的现象", value: 88 },
  28. { name: "TOP3", title: "建设用地减量化复垦地块后续管养不到位", value: 77 },
  29. {
  30. name: "TOP4",
  31. title: "河道被截断或填埋,河道周边存在不规范养殖,河岸被违章搭建等",
  32. value: 66
  33. },
  34. { name: "TOP5", title: "已完成的美丽庭院、村庄改造项目长效管理不到位", value: 55 },
  35. { name: "TOP6", title: "基本农田、耕地等被违规占用、改变用途或闲置抛荒", value: 44 },
  36. { name: "TOP7", title: "发现问题整改不到位,存在长期不整改不处理的现象", value: 33 },
  37. { name: "TOP8", title: "建设用地减量化复垦地块后续管养不到位", value: 22 },
  38. {
  39. name: "TOP9",
  40. title: "河道被截断或填埋,河道周边存在不规范养殖,河岸被违章搭建等",
  41. value: 11
  42. },
  43. { name: "TOP10", title: "已完成的美丽庭院、村庄改造项目长效管理不到位", value: 1 }
  44. ]
  45. };
  46. },
  47. mounted() {},
  48. /**
  49. * data:top data
  50. */
  51. props: ["dataSize"],
  52. methods: {},
  53. watch: {}
  54. };
  55. </script>
  56. <style lang="less" scoped>
  57. @borderColor: #00aaff;
  58. @borderColor32: #00aaff32;
  59. @borderColor64: #00aaff64;
  60. @topTitleBgLeft: #00244d;
  61. @topTitleMinLeft: #002f56;
  62. @lightColor: #74ffff;
  63. @tagValueColor: #f19b56;
  64. .CardBox {
  65. height: 100%;
  66. position: relative;
  67. display: flex;
  68. flex-direction: column;
  69. align-content: center;
  70. align-items: center;
  71. justify-content: space-between;
  72. flex-wrap: nowrap;
  73. .Top_box {
  74. width: 100%;
  75. display: flex;
  76. flex-wrap: nowrap;
  77. align-content: center;
  78. justify-content: space-between;
  79. align-items: center;
  80. .Top_box_name {
  81. width: 50px;
  82. font-size: 14px;
  83. font-family: PingFang SC;
  84. padding-right: 10px;
  85. font-weight: bold;
  86. color: #ffffff;
  87. }
  88. .Top_box_main {
  89. border-left: 1px solid #666;
  90. width: 80%;
  91. font-size: 14px;
  92. font-family: PingFang SC;
  93. font-weight: 400;
  94. color: #b8c5cc;
  95. padding-bottom: 5px;
  96. &_title {
  97. width: calc(100% - 20px);
  98. padding: 0 10px;
  99. height: 40px;
  100. overflow: hidden;
  101. text-overflow: ellipsis;
  102. display: -webkit-box;
  103. -webkit-box-orient: vertical;
  104. -webkit-line-clamp: 2;
  105. }
  106. ::v-deep .el-progress-bar__outer {
  107. background-color: transparent;
  108. background-image: linear-gradient(90deg, #007dff32 0%, #00ffff32 100%) !important;
  109. }
  110. ::v-deep .el-progress-bar__inner {
  111. background-image: linear-gradient(90deg, #007dff 0%, #00ffff 100%) !important;
  112. }
  113. }
  114. .Top_box_value {
  115. width: calc(20% - 50px);
  116. padding-left: 5px;
  117. font-size: 14px;
  118. font-family: PingFang SC;
  119. font-weight: bold;
  120. color: #f19b56;
  121. }
  122. }
  123. }
  124. </style>