right.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. <template>
  2. <BasePanelRight>
  3. <div class="comprehensive-container">
  4. <div class="right">
  5. <BaseMain title="水文监测">
  6. <template v-slot:mainArea>
  7. <div class="sw-container">
  8. <div class="left">
  9. <img src="@/assets/image/comprehensive/swIcon.png" alt="" class="icon1" />
  10. <span class="value"><span class="big">2</span> / 2</span>
  11. </div>
  12. <div class="right">
  13. <div class="icon-text">
  14. <div class="txt">水位</div>
  15. <div class="txt2">雨量</div>
  16. </div>
  17. <div class="icon-text">
  18. <div class="txt3">流速</div>
  19. <div class="txt4">流量</div>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. </BaseMain>
  25. <BaseMain title="四乱监测">
  26. <template v-slot:mainArea>
  27. <div class="sl-container">
  28. <div class="seach-btn">
  29. <el-radio-group v-model="dateVal" size="mini" class="slRadio" @input="getData">
  30. <el-radio-button label="1">今日</el-radio-button>
  31. <el-radio-button label="2">近七日</el-radio-button>
  32. <el-radio-button label="3">近30日</el-radio-button>
  33. <el-radio-button label="4">全部</el-radio-button>
  34. </el-radio-group>
  35. </div>
  36. <div class="dottTitle">事件总数</div>
  37. <div class="data-info">
  38. <div class="left">
  39. <div class="val">{{eventInfo.total}}</div>
  40. <img src="@/assets/image/comprehensive/midBg2.png" />
  41. </div>
  42. <div class="right">
  43. <div class="em" v-for="(item,index) in eventInfo.list" :key="index">
  44. <div :class="`color${index+1}`">{{item.name}}</div>
  45. <div>{{item.num}}</div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </template>
  51. </BaseMain>
  52. <BaseMain title="采砂监测">
  53. <template v-slot:mainArea>
  54. <div class="card-item">
  55. <div class="warning-content">
  56. <div class="warning-title">
  57. <div class="title">预警总数</div>
  58. <div class="num">30</div>
  59. <div class="unit">条</div>
  60. </div>
  61. <PieChart style="height: 1.45rem" />
  62. </div>
  63. </div>
  64. </template>
  65. </BaseMain>
  66. </div>
  67. </div>
  68. </BasePanelRight>
  69. </template>
  70. <script>
  71. import BasePanelRight from '@/components/base-panel/base-panel-right'
  72. import BaseMain from '@/components/base-main/base-main.vue'
  73. import PieChart from './pie-chart/index.vue'
  74. export default {
  75. components: {
  76. BaseMain,
  77. BasePanelRight,
  78. PieChart
  79. },
  80. data() {
  81. return {
  82. dateVal: 1,
  83. eventInfo:{
  84. total:0,
  85. list:[]
  86. }
  87. }
  88. },
  89. mounted() {
  90. this.getData()
  91. },
  92. methods: {
  93. getData() {
  94. window
  95. .requestSDK(
  96. '/sddnWeiHe/event/getEventStatistics',
  97. {
  98. type:this.dateVal
  99. },
  100. {},
  101. 'get'
  102. )
  103. .then(async (res) => {
  104. console.info(res)
  105. this.eventInfo = res.data
  106. console.info(this.eventInfo)
  107. })
  108. }
  109. }
  110. }
  111. </script>
  112. <style lang="scss" scoped>
  113. .comprehensive-container {
  114. position: absolute;
  115. top: px-to-rem(30);
  116. z-index: 1;
  117. .sw-container {
  118. padding: px-to-rem(59) px-to-rem(12) px-to-rem(70) px-to-rem(16);
  119. display: flex;
  120. justify-content: flex-start;
  121. .left {
  122. position: relative;
  123. margin-right: px-to-rem(24);
  124. .icon1 {
  125. width: px-to-rem(124);
  126. height: px-to-rem(124);
  127. }
  128. .value {
  129. position: absolute;
  130. font-weight: bold;
  131. font-size: px-to-rem(14);
  132. color: #fff;
  133. left: px-to-rem(45);
  134. bottom: px-to-rem(35);
  135. .big {
  136. font-size: px-to-rem(18);
  137. color: #91ffab;
  138. }
  139. }
  140. }
  141. .right {
  142. font-weight: 500;
  143. font-size: px-to-rem(14);
  144. color: #ffffff;
  145. width: calc(100% - px-to-rem(124));
  146. .icon-text {
  147. display: flex;
  148. justify-content: space-between;
  149. margin-bottom: px-to-rem(32);
  150. .txt {
  151. background: url('@/assets/image/comprehensive/swIcon1.png') no-repeat;
  152. background-size: contain;
  153. width: px-to-rem(80);
  154. height: px-to-rem(32);
  155. line-height: px-to-rem(32);
  156. padding-left: px-to-rem(39);
  157. }
  158. .txt2 {
  159. background: url('@/assets/image/comprehensive/swIcon2.png') no-repeat;
  160. background-size: contain;
  161. width: px-to-rem(80);
  162. height: px-to-rem(32);
  163. line-height: px-to-rem(32);
  164. padding-left: px-to-rem(39);
  165. }
  166. .txt3 {
  167. background: url('@/assets/image/comprehensive/swIcon3.png') no-repeat;
  168. background-size: contain;
  169. width: px-to-rem(80);
  170. height: px-to-rem(32);
  171. line-height: px-to-rem(32);
  172. padding-left: px-to-rem(39);
  173. }
  174. .txt4 {
  175. background: url('@/assets/image/comprehensive/swIcon4.png') no-repeat;
  176. background-size: contain;
  177. width: px-to-rem(80);
  178. height: px-to-rem(32);
  179. line-height: px-to-rem(32);
  180. padding-left: px-to-rem(39);
  181. }
  182. }
  183. .icon-text:first-child {
  184. margin-top: px-to-rem(9);
  185. }
  186. }
  187. }
  188. .sl-container {
  189. padding: px-to-rem(16) px-to-rem(15) px-to-rem(55) px-to-rem(11);
  190. height: px-to-rem(253);
  191. .slRadio {
  192. margin-bottom: px-to-rem(24);
  193. :deep(.el-radio-button__inner) {
  194. background: rgba(79, 159, 255, 0.12);
  195. color: #4f9fff;
  196. border-color: #4f9fff;
  197. font-weight: 400;
  198. padding: px-to-rem(6);
  199. font-size: px-to-rem(14);
  200. }
  201. :deep(.el-radio-button__orig-radio:checked + .el-radio-button__inner) {
  202. background-color: rgba(79, 159, 255, 0.8);
  203. color: #fff;
  204. }
  205. }
  206. .dottTitle {
  207. position: relative;
  208. display: inline-block;
  209. font-weight: bold;
  210. font-size: px-to-rem(14);
  211. color: #f5f5f5;
  212. margin-bottom: px-to-rem(10);
  213. margin-left: px-to-rem(16);
  214. &::before,
  215. &::after {
  216. content: ' ';
  217. display: inline-block;
  218. width: px-to-rem(30);
  219. height: px-to-rem(2);
  220. background-color: #4487d8;
  221. vertical-align: middle;
  222. margin: 0 0.5em;
  223. }
  224. &::before {
  225. margin-left: 0;
  226. }
  227. &::after {
  228. margin-right: 0;
  229. }
  230. }
  231. .data-info {
  232. display: flex;
  233. justify-content: space-between;
  234. .left {
  235. margin-top: px-to-rem(26);
  236. .val {
  237. font-weight: bold;
  238. font-size: px-to-rem(30);
  239. color: #f5f5f5;
  240. background: url('@/assets/image/comprehensive/midBg.png') no-repeat;
  241. background-size: contain;
  242. width: px-to-rem(86);
  243. height: px-to-rem(50);
  244. text-align: center;
  245. margin-left: px-to-rem(50);
  246. }
  247. img {
  248. width: px-to-rem(197);
  249. height: px-to-rem(33);
  250. }
  251. }
  252. .right {
  253. width: 30%;
  254. .em {
  255. display: flex;
  256. justify-content: space-between;
  257. font-weight: 400;
  258. font-size: px-to-rem(14);
  259. color: #f5f5f5;
  260. margin-bottom: px-to-rem(12);
  261. .color1::before {
  262. content: ' ';
  263. display: inline-block;
  264. width: px-to-rem(12);
  265. height: px-to-rem(6);
  266. background-color: #6bfe91;
  267. border-radius: px-to-rem(2);
  268. vertical-align: middle;
  269. margin-right: px-to-rem(6);
  270. }
  271. .color2::before {
  272. content: ' ';
  273. display: inline-block;
  274. width: px-to-rem(12);
  275. height: px-to-rem(6);
  276. background-color: #efd800;
  277. border-radius: px-to-rem(2);
  278. vertical-align: middle;
  279. margin-right: px-to-rem(6);
  280. }
  281. .color3::before {
  282. content: ' ';
  283. display: inline-block;
  284. width: px-to-rem(12);
  285. height: px-to-rem(6);
  286. background-color: #f17a23;
  287. border-radius: px-to-rem(2);
  288. vertical-align: middle;
  289. margin-right: px-to-rem(6);
  290. }
  291. .color4::before {
  292. content: ' ';
  293. display: inline-block;
  294. width: px-to-rem(12);
  295. height: px-to-rem(6);
  296. background-color: #4487d8;
  297. border-radius: px-to-rem(2);
  298. vertical-align: middle;
  299. margin-right: px-to-rem(6);
  300. }
  301. }
  302. }
  303. }
  304. }
  305. .card-item {
  306. position: relative;
  307. width: 3.68rem;
  308. padding: px-to-rem(22) px-to-rem(16) px-to-rem(27) px-to-rem(26);
  309. .icon-content {
  310. display: flex;
  311. align-items: center;
  312. justify-content: space-between;
  313. .icon-item {
  314. display: flex;
  315. flex-direction: column;
  316. align-items: center;
  317. .icon-item-content {
  318. display: flex;
  319. justify-content: space-between;
  320. align-items: center;
  321. .item-content {
  322. display: flex;
  323. flex-direction: column;
  324. justify-content: center;
  325. align-items: center;
  326. margin-left: px-to-rem(10);
  327. margin-bottom: px-to-rem(-6);
  328. .label {
  329. font-weight: 500;
  330. font-size: px-to-rem(16);
  331. color: #ffffff;
  332. }
  333. .value {
  334. font-weight: bold;
  335. font-size: px-to-rem(18);
  336. }
  337. }
  338. }
  339. }
  340. }
  341. .progress-content {
  342. display: flex;
  343. flex-direction: column;
  344. margin-top: px-to-rem(10);
  345. .progress-item {
  346. display: flex;
  347. flex-direction: column;
  348. margin-bottom: px-to-rem(6);
  349. .progress-item-text {
  350. display: flex;
  351. justify-content: space-between;
  352. margin-bottom: px-to-rem(4);
  353. span {
  354. font-size: px-to-rem(16);
  355. color: #fff;
  356. }
  357. }
  358. }
  359. }
  360. .warning-content {
  361. height: px-to-rem(200);
  362. .warning-title {
  363. display: flex;
  364. justify-content: space-between;
  365. align-items: center;
  366. color: #fff;
  367. font-size: px-to-rem(16);
  368. .title {
  369. &::before {
  370. content: '';
  371. display: inline-block;
  372. background: #4487d8;
  373. width: px-to-rem(30);
  374. height: px-to-rem(2);
  375. margin-bottom: px-to-rem(4);
  376. margin-right: px-to-rem(6);
  377. }
  378. &::after {
  379. content: '';
  380. display: inline-block;
  381. background: #4487d8;
  382. width: px-to-rem(30);
  383. height: px-to-rem(2);
  384. margin-bottom: px-to-rem(4);
  385. margin-left: px-to-rem(6);
  386. }
  387. }
  388. .num {
  389. text-align: center;
  390. width: px-to-rem(75);
  391. height: px-to-rem(45);
  392. font-size: px-to-rem(30);
  393. color: #f5f5f5;
  394. background: url('@/assets/image/sand-monitor/mid-bg.png') no-repeat;
  395. background-size: 100% 100%;
  396. }
  397. .unit {
  398. margin-right: px-to-rem(10);
  399. }
  400. }
  401. }
  402. .info-content {
  403. color: #fff;
  404. .base-info-container {
  405. .title {
  406. font-size: px-to-rem(16);
  407. text-align: left;
  408. &::before {
  409. content: '';
  410. display: inline-block;
  411. width: px-to-rem(8);
  412. height: px-to-rem(10);
  413. background: #81b1f5;
  414. margin-right: px-to-rem(6);
  415. }
  416. }
  417. .base-info-card {
  418. display: flex;
  419. justify-content: space-between;
  420. .base-info-item {
  421. display: flex;
  422. flex-direction: column;
  423. margin-bottom: px-to-rem(10);
  424. span {
  425. font-weight: bold;
  426. font-size: px-to-rem(12);
  427. color: #c4c6c8;
  428. }
  429. .value {
  430. font-size: px-to-rem(14);
  431. color: #81b1f5;
  432. }
  433. }
  434. }
  435. }
  436. }
  437. }
  438. }
  439. </style>