left.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <BasePanelLeft>
  3. <div class="warning-container">
  4. <BaseMain title="预警列表">
  5. <template v-slot:mainArea>
  6. <div class="list-container">
  7. <el-input placeholder="请输入关键字" suffix-icon="el-icon-search" v-model="searchVal"> </el-input>
  8. <div class="list-content">
  9. <div class="item" v-for="(item, index) in listItem" :key="index">
  10. <div class="left">
  11. <img :src="item.img" alt="" />
  12. </div>
  13. <div class="right">
  14. <div class="title">{{ item.title }}</div>
  15. <div class="txt">{{ item.address }}</div>
  16. <div class="txt">{{ item.date }}</div>
  17. <div class="jzDate">{{ item.deadline }}</div>
  18. </div>
  19. </div>
  20. </div>
  21. <el-pagination
  22. @size-change="handleSizeChange"
  23. @current-change="handleCurrentChange"
  24. :current-page.sync="currentPage"
  25. :page-size="pageSize"
  26. layout="total, prev, pager, next"
  27. :total="total"
  28. >
  29. </el-pagination>
  30. </div>
  31. </template>
  32. </BaseMain>
  33. </div>
  34. </BasePanelLeft>
  35. </template>
  36. <script>
  37. import BasePanelLeft from '@/components/base-panel/base-panel-left'
  38. import BaseMain from '@/components/base-main/base-main.vue'
  39. import ImgUrl from '@/assets/image/smart-early-warning/img1.png'
  40. export default {
  41. data() {
  42. return {
  43. searchVal: '',
  44. currentPage: 1,
  45. pageSize: 6,
  46. total: 0,
  47. listItem: [
  48. {
  49. img: ImgUrl,
  50. title: '乱建预警',
  51. address: '咸阳兴平仪空村',
  52. date: '2025-01-15 14:00:00',
  53. deadline: '剩余0天 00:28:12'
  54. },
  55. {
  56. img: ImgUrl,
  57. title: '乱建预警',
  58. address: '咸阳兴平仪空村',
  59. date: '2025-01-15 14:00:00',
  60. deadline: '剩余0天 00:28:12'
  61. },
  62. {
  63. img: ImgUrl,
  64. title: '乱建预警',
  65. address: '咸阳兴平仪空村',
  66. date: '2025-01-15 14:00:00',
  67. deadline: '剩余0天 00:28:12'
  68. },
  69. {
  70. img: ImgUrl,
  71. title: '乱建预警',
  72. address: '咸阳兴平仪空村',
  73. date: '2025-01-15 14:00:00',
  74. deadline: '剩余0天 00:28:12'
  75. },
  76. {
  77. img: ImgUrl,
  78. title: '乱建预警',
  79. address: '咸阳兴平仪空村',
  80. date: '2025-01-15 14:00:00',
  81. deadline: '剩余0天 00:28:12'
  82. },
  83. {
  84. img: ImgUrl,
  85. title: '乱建预警',
  86. address: '咸阳兴平仪空村',
  87. date: '2025-01-15 14:00:00',
  88. deadline: '剩余0天 00:28:12'
  89. },
  90. {
  91. img: ImgUrl,
  92. title: '乱建预警',
  93. address: '咸阳兴平仪空村',
  94. date: '2025-01-15 14:00:00',
  95. deadline: '剩余0天 00:28:12'
  96. },
  97. {
  98. img: ImgUrl,
  99. title: '乱建预警',
  100. address: '咸阳兴平仪空村',
  101. date: '2025-01-15 14:00:00',
  102. deadline: '剩余0天 00:28:12'
  103. },
  104. {
  105. img: ImgUrl,
  106. title: '乱建预警',
  107. address: '咸阳兴平仪空村',
  108. date: '2025-01-15 14:00:00',
  109. deadline: '剩余0天 00:28:12'
  110. },
  111. {
  112. img: ImgUrl,
  113. title: '乱建预警',
  114. address: '咸阳兴平仪空村',
  115. date: '2025-01-15 14:00:00',
  116. deadline: '剩余0天 00:28:12'
  117. }
  118. ]
  119. }
  120. },
  121. components: {
  122. BasePanelLeft,
  123. BaseMain
  124. },
  125. created() {
  126. this.total = this.listItem.length
  127. },
  128. methods: {
  129. handleSizeChange() {},
  130. handleCurrentChange() {}
  131. }
  132. }
  133. </script>
  134. <style lang="scss" scoped>
  135. .warning-container {
  136. position: absolute;
  137. top: px-to-rem(66);
  138. z-index: 1;
  139. left: px-to-rem(-4);
  140. height: calc(100% - px-to-rem(75));
  141. :deep(.baseMainContainer) {
  142. height: inherit;
  143. .content-area {
  144. height: 100%;
  145. }
  146. }
  147. .list-container {
  148. padding: px-to-rem(11);
  149. height: 100%;
  150. :deep(.el-input__inner) {
  151. background: linear-gradient(0deg, #4586de 0%, #1a2d46 100%);
  152. border-radius: px-to-rem(6);
  153. border: px-to-rem(2) solid #94c0f7;
  154. font-weight: 400;
  155. font-size: px-to-rem(14);
  156. color: #f5f5f5;
  157. }
  158. .list-content {
  159. margin-top: px-to-rem(10);
  160. height: 87%;
  161. overflow: auto;
  162. scrollbar-width: none;
  163. -ms-overflow-style: none;
  164. .item {
  165. display: flex;
  166. justify-content: flex-start;
  167. gap: px-to-rem(10);
  168. background: rgba(79, 159, 255, 0.2);
  169. border-radius: px-to-rem(4);
  170. border: px-to-rem(1) solid #4f9fff;
  171. padding: px-to-rem(7);
  172. margin-bottom: px-to-rem(9);
  173. .left {
  174. img {
  175. width: px-to-rem(130);
  176. height: 100%;
  177. }
  178. }
  179. .right {
  180. .title {
  181. font-weight: bold;
  182. font-size: px-to-rem(14);
  183. color: #ffffff;
  184. }
  185. .txt {
  186. font-weight: 400;
  187. font-size: px-to-rem(14);
  188. color: #ffffff;
  189. }
  190. .jzDate {
  191. width: px-to-rem(112);
  192. height: px-to-rem(18);
  193. background: rgba(61, 116, 232, 0.3);
  194. border-radius: px-to-rem(9);
  195. font-weight: 400;
  196. font-size: px-to-rem(12);
  197. color: #4f9fff;
  198. }
  199. }
  200. }
  201. }
  202. :deep(.el-pagination) {
  203. margin-top: px-to-rem(22);
  204. display: flex;
  205. justify-content: flex-end;
  206. align-items: center;
  207. .el-pagination__total {
  208. font-weight: 500;
  209. font-size: px-to-rem(14);
  210. color: #ffffff;
  211. }
  212. button,
  213. .el-pager li {
  214. color: #fff;
  215. background-color: transparent;
  216. border-radius: px-to-rem(2);
  217. width: px-to-rem(24);
  218. height: px-to-rem(24);
  219. padding: 0;
  220. min-width: auto;
  221. line-height: px-to-rem(24);
  222. font-size: px-to-rem(14);
  223. }
  224. .el-pager li.active {
  225. background: #3d74e8;
  226. color: #fff;
  227. }
  228. }
  229. }
  230. }
  231. </style>