left.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. <template>
  2. <BasePanelLeft>
  3. <div class="comprehensive-container">
  4. <div class="left">
  5. <BaseMain title="通知公告">
  6. <template v-slot:mainArea>
  7. <div class="main-container h380">
  8. <template v-if="noticeList.length > 0">
  9. <div class="img-txt" v-if="noticeList.length > 0" @click="toSee(noticeList[0])">
  10. <template v-if="noticeList[0].images != null">
  11. <el-image class="img" :src="noticeList[0].images"></el-image>
  12. </template>
  13. <template v-else>
  14. <el-image class="img" :src="defaultImg" ></el-image>
  15. </template>
  16. <div class="txt">{{ noticeList[0].announcementName }}</div>
  17. </div>
  18. <div class="list" v-for="item in noticeDataList" :key="item.id">
  19. <div class="left">
  20. <template v-if="item.images != null">
  21. <el-image :src="item.images" class="img"></el-image>
  22. </template>
  23. <template v-else>
  24. <el-image :src="defaultSmallImg" class="img"></el-image>
  25. </template>
  26. </div>
  27. <div class="right">
  28. <div class="title">{{ item.announcementName }}</div>
  29. <div class="date">{{ formatDate(item.createTime) }}</div>
  30. <div class="detailBtn" @click="toSee(item)">详情</div>
  31. </div>
  32. </div>
  33. </template>
  34. <template v-else>
  35. <div class="noData">
  36. <img src="@/assets/image/comprehensive/noData.png" alt="">
  37. <div class="txt">暂无公告信息</div>
  38. </div>
  39. </template>
  40. </div>
  41. </template>
  42. </BaseMain>
  43. <BaseMain title="概况">
  44. <template v-slot:mainArea>
  45. <div class="main-container">
  46. <div class="title-area">
  47. <div class="left">渭河生态区</div>
  48. <div class="right">干流全长:818km</div>
  49. </div>
  50. <div class="icon-item">
  51. <img src="@/assets/image/comprehensive/point2.png" class="img3" />
  52. <img src="@/assets/image/comprehensive/line.png" class="img2" />
  53. <img src="@/assets/image/comprehensive/point1.png" class="img1" />
  54. </div>
  55. <div class="info">
  56. <div class="left">发源于渭源县鸟鼠山于渭南市潼关县汇入黄河</div>
  57. <!-- <div class="right">于:渭南市潼关县</div> -->
  58. </div>
  59. <div class="base-info-card">
  60. <div class="base-info-item">
  61. <span>流域总面积</span>
  62. <span class="value green">13.5 <span>万k㎡</span></span>
  63. </div>
  64. <div class="base-info-item">
  65. <span>陕西境内河长</span>
  66. <span class="value yellow">512 <span>km</span></span>
  67. </div>
  68. <div class="base-info-item">
  69. <span>陕西境内流域总面积</span>
  70. <span class="value blue">6.76 <span>万k㎡</span></span>
  71. </div>
  72. </div>
  73. <div class="base-info-card m0">
  74. <div class="base-info-item">
  75. <span>生态区面积</span>
  76. <span class="value green">1277.04<span>万k㎡</span></span>
  77. </div>
  78. <div class="base-info-item">
  79. <span>宝鸡峡大坝以上河道管理区面积</span>
  80. <span class="value yellow">291.49<span>km²</span></span>
  81. </div>
  82. <div class="base-info-item">
  83. <span>宝鸡峡大坝以下河道管理区面积</span>
  84. <span class="value blue">538.85 <span>km²</span></span>
  85. </div>
  86. </div>
  87. <div class="title-area borderT">
  88. <div class="left">渭河生态区兴平段</div>
  89. <div class="right">河道长度:30.6km</div>
  90. </div>
  91. <div class="icon-item">
  92. <img src="@/assets/image/comprehensive/point2.png" class="img3" />
  93. <img src="@/assets/image/comprehensive/line.png" class="img2" />
  94. <img src="@/assets/image/comprehensive/point1.png" class="img1" />
  95. </div>
  96. <div class="info">
  97. <div class="left">西起:武兴交界</div>
  98. <div class="right">东至:兴秦交界</div>
  99. </div>
  100. <div class="icon-card-container">
  101. <div class="area">
  102. <img src="@/assets/image/comprehensive/icon2.png" />
  103. <div class="areainfo">
  104. <div class="title">农村区段</div>
  105. <div class="km"><span>一级管控 </span><span class="blue">17</span>k㎡</div>
  106. <div class="km"><span>二级管控 </span><span class="blue">15.87</span>k㎡</div>
  107. </div>
  108. </div>
  109. <div class="area">
  110. <img src="@/assets/image/comprehensive/icon1.png" />
  111. <div class="areainfo">
  112. <div class="title">城市核心区段</div>
  113. <div class="km"><span>一级管控 </span><span class="green">0.39</span>k㎡</div>
  114. <div class="km"><span>二级管控 </span><span class="green">0.78</span>k㎡</div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </template>
  120. </BaseMain>
  121. </div>
  122. </div>
  123. </BasePanelLeft>
  124. </template>
  125. <script>
  126. import moment from 'moment'
  127. import BasePanelLeft from '@/components/base-panel/base-panel-left'
  128. import BaseMain from '@/components/base-main/base-main.vue'
  129. import {getAnnouncementList} from '@/api/announcementApi'
  130. import ImgUrl from '@/assets/image/comprehensive/bg1.png'
  131. import ImgUrl2 from '@/assets/image/comprehensive/bg2.png'
  132. export default {
  133. components: {
  134. BaseMain,
  135. BasePanelLeft
  136. },
  137. data() {
  138. return {
  139. noticeList: [],
  140. noticeDataList: [],
  141. defaultImg:ImgUrl,
  142. defaultSmallImg:ImgUrl2,
  143. tableInfo: [
  144. {
  145. id: 1,
  146. title: '桑镇西桥村至庄头镇蔡庄村段',
  147. len: 13.146,
  148. year: 30,
  149. sl: 6669
  150. },
  151. {
  152. id: 2,
  153. title: '庄头镇蔡庄村至阜寨镇段家村段',
  154. len: 13.146,
  155. year: 30,
  156. sl: 6669
  157. }
  158. ]
  159. }
  160. },
  161. mounted(){
  162. this.fetchData()
  163. },
  164. methods: {
  165. formatDate(date) {
  166. return moment(date).format('YYYY-MM-DD HH:mm:ss')
  167. },
  168. fetchData() {
  169. getAnnouncementList({ announcementStatus: '1',pageNum: 1,
  170. pageSize: 3}).then((res) => {
  171. this.noticeList = res.data.records
  172. this.noticeDataList = this.noticeList.splice(1, this.noticeList.length)
  173. })
  174. },
  175. toSee(data){
  176. console.info(data)
  177. this.$globalEventBus.$emit('clickAnnouncePopup',{list:data})
  178. }
  179. }
  180. }
  181. </script>
  182. <style lang="scss" scoped>
  183. .comprehensive-container {
  184. position: absolute;
  185. top: px-to-rem(30);
  186. z-index: 1;
  187. left: px-to-rem(-4);
  188. .h380{
  189. height: px-to-rem(419);
  190. }
  191. .main-container {
  192. padding: px-to-rem(10);
  193. .noData{
  194. width: 100%;
  195. height: 100%;
  196. text-align: center;
  197. img{
  198. margin-top: px-to-rem(70);
  199. margin-bottom: px-to-rem(20);
  200. }
  201. .txt{
  202. color: #fff;
  203. font-size: px-to-rem(14);
  204. }
  205. }
  206. .title-area {
  207. display: flex;
  208. justify-content: space-between;
  209. margin-top: px-to-rem(10);
  210. align-items: center;
  211. .left {
  212. font-weight: bold;
  213. font-size: px-to-rem(16);
  214. color: #ffffff;
  215. }
  216. .right {
  217. font-weight: 500;
  218. font-size: px-to-rem(14);
  219. color: #ffffff;
  220. }
  221. }
  222. .img-txt {
  223. position: relative;
  224. .img {
  225. width: 100%;
  226. }
  227. :deep(.el-image__inner) {
  228. height: px-to-rem(182);
  229. width: 100%;
  230. }
  231. .txt {
  232. width: px-to-rem(337);
  233. height: px-to-rem(30);
  234. background: rgba(0, 0, 0, 0.5);
  235. border-radius: px-to-rem(4);
  236. font-weight: bold;
  237. font-size: px-to-rem(14);
  238. color: #ffffff;
  239. line-height: px-to-rem(30);
  240. position: absolute;
  241. left: 0;
  242. bottom: 0;
  243. text-align: left;
  244. padding-left: px-to-rem(10);
  245. }
  246. }
  247. .list {
  248. display: flex;
  249. justify-content: space-between;
  250. margin-top: px-to-rem(10);
  251. background: rgba(79, 159, 255, 0.2);
  252. border-radius: px-to-rem(4);
  253. border: 1px solid #4f9fff;
  254. padding: px-to-rem(5);
  255. height: px-to-rem(93);
  256. .left .img {
  257. width: px-to-rem(100);
  258. height: px-to-rem(80);
  259. :deep(.el-image__inner) {
  260. height: px-to-rem(80);
  261. }
  262. }
  263. .right {
  264. font-weight: 500;
  265. font-size: px-to-rem(14);
  266. color: #ffffff;
  267. position: relative;
  268. .date {
  269. font-weight: 400;
  270. font-size: px-to-rem(14);
  271. color: #ffffff;
  272. margin-top: px-to-rem(9);
  273. margin-bottom: px-to-rem(10);
  274. }
  275. .detailBtn {
  276. width: px-to-rem(48);
  277. height: px-to-rem(24);
  278. line-height: px-to-rem(25);
  279. background: linear-gradient(0deg, #468adb 0%, #366dae 100%);
  280. border-radius: px-to-rem(4);
  281. border: px-to-rem(1) solid transparent;
  282. font-weight: 400;
  283. font-size: px-to-rem(14);
  284. color: #ffffff;
  285. position: absolute;
  286. right: 0;
  287. text-align: center;
  288. bottom: px-to-rem(4);
  289. }
  290. }
  291. }
  292. .borderT{
  293. padding-top: px-to-rem(17);
  294. border-top: px-to-rem(1) solid #5980A9;
  295. }
  296. }
  297. .icon-item {
  298. position: relative;
  299. height: px-to-rem(18);
  300. margin-top: px-to-rem(10);
  301. .img1 {
  302. position: absolute;
  303. top: px-to-rem(0);
  304. z-index: 1;
  305. }
  306. .img2 {
  307. width: px-to-rem(328);
  308. height: px-to-rem(11);
  309. position: absolute;
  310. left: px-to-rem(8);
  311. top: px-to-rem(4);
  312. }
  313. .img3 {
  314. position: absolute;
  315. top: px-to-rem(0);
  316. right: 0;
  317. z-index: 1;
  318. }
  319. }
  320. .info {
  321. display: flex;
  322. justify-content: space-between;
  323. font-weight: bold;
  324. font-size: px-to-rem(14);
  325. color: #ffffff;
  326. margin-top: px-to-rem(15);
  327. // padding-bottom: px-to-rem(10);
  328. }
  329. .base-info-card {
  330. display: flex;
  331. justify-content: space-between;
  332. margin-top: px-to-rem(7);
  333. .base-info-item {
  334. display: flex;
  335. flex-direction: column;
  336. margin-bottom: px-to-rem(5);
  337. justify-content: space-around;
  338. width: 30%;
  339. span {
  340. font-weight: bold;
  341. font-size: px-to-rem(12);
  342. color: #c4c6c8;
  343. }
  344. .value {
  345. font-size: px-to-rem(14);
  346. margin-top: px-to-rem(5);
  347. color: #ffffff;
  348. }
  349. .yellow {
  350. color: #d6a042;
  351. }
  352. .blue {
  353. color: #81b1f5;
  354. }
  355. .green {
  356. color: #80f5ff;
  357. }
  358. }
  359. }
  360. .m0 {
  361. margin-top: 0;
  362. }
  363. .table-card {
  364. border: px-to-rem(1) solid #6b87b1;
  365. background: #182c44;
  366. margin-bottom: px-to-rem(5);
  367. .title {
  368. background: #3b5071;
  369. font-weight: bold;
  370. font-size: px-to-rem(14);
  371. color: #ffffff;
  372. height: px-to-rem(24);
  373. line-height: px-to-rem(24);
  374. padding-left: px-to-rem(11);
  375. }
  376. .base-info-card {
  377. padding: 0 px-to-rem(10);
  378. .base-info-item {
  379. border-right: px-to-rem(1) solid #3a4148;
  380. width: 33%;
  381. }
  382. .base-info-item:last-child {
  383. border-right: 0;
  384. }
  385. .pl20 {
  386. padding-left: px-to-rem(20);
  387. }
  388. }
  389. }
  390. .icon-card-container {
  391. display: flex;
  392. justify-content: space-between;
  393. padding: 0 px-to-rem(10);
  394. margin-top: px-to-rem(9);
  395. .area {
  396. align-items: center;
  397. display: flex;
  398. justify-content: space-between;
  399. img {
  400. width: px-to-rem(47);
  401. height: px-to-rem(49);
  402. margin-right: px-to-rem(8);
  403. }
  404. .areainfo {
  405. .title,
  406. .km {
  407. font-weight: bold;
  408. font-size: px-to-rem(12);
  409. color: #c4c6c8;
  410. span{
  411. color: #F5F5F5;
  412. }
  413. .blue {
  414. color: #81b1f5;
  415. }
  416. .green {
  417. color: #80f5ff;
  418. }
  419. }
  420. }
  421. }
  422. }
  423. }
  424. </style>