index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  1. <template>
  2. <div class="menu-content">
  3. <div class="gradient-text title">雨情监测</div>
  4. <div class="card-header">
  5. <div class="title-box">水利站点降雨分布统计</div>
  6. <el-select
  7. v-model="timeOption"
  8. class="custom-select"
  9. popper-class="custom-select-popper"
  10. :teleported="false"
  11. style="width: 236px"
  12. @change="handleTimeChange"
  13. >
  14. <el-option v-for="item in timeOptions" :key="item.value" :label="item.name" :value="item.value" />
  15. </el-select>
  16. </div>
  17. <Chart :option="chartOption1" style="width: 100%; height: 505px" />
  18. <div class="card-header">
  19. <div class="title-box">
  20. <div>降雨量排行</div>
  21. <div class="line"></div>
  22. <div class="gradient-text text2">区县排行</div>
  23. <div class="text3">(过去{{ timeOption }}小时)</div>
  24. </div>
  25. <div class="btn-box">
  26. <div class="btn" @click="handleShowMore">
  27. <i class="more-icon"></i>
  28. <div class="btn-text">更多</div>
  29. </div>
  30. <div class="btn" @click="exportData">
  31. <i class="export-icon"></i>
  32. <div class="btn-text">导出</div>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="table">
  37. <div class="table-header">
  38. <div class="td">序号</div>
  39. <div class="td">
  40. <div style="width: 201px">
  41. <el-select
  42. v-model="queryParams.area"
  43. placeholder="县区"
  44. size="large"
  45. class="custom-select2"
  46. popper-class="custom-select-popper2"
  47. :teleported="false"
  48. >
  49. <el-option label="县区" value="" />
  50. <el-option v-for="item in district_type" :key="item.value" :label="item.label" :value="item.value" />
  51. </el-select>
  52. </div>
  53. </div>
  54. <div class="td">
  55. <el-select
  56. v-model="queryParams.township"
  57. placeholder="街镇"
  58. size="large"
  59. class="custom-select2"
  60. popper-class="custom-select-popper2"
  61. :teleported="false"
  62. @change="handleGetRainfallRange"
  63. >
  64. <el-option label="街镇" value="" />
  65. <el-option v-for="item in townshipList" :key="item.area_code" :label="item.area_name" :value="item.area_name" />
  66. </el-select>
  67. </div>
  68. <div class="td">站址</div>
  69. <div class="td td-cursor">
  70. <span>雨量(mm)</span>
  71. <i :class="queryParams.sort === 'desc' ? 'desc-icon' : 'asc-icon'" @click="handleSort" />
  72. </div>
  73. </div>
  74. <div v-for="(item, index) in rangeData" :key="index" class="tr">
  75. <div class="td">
  76. <div :class="getRankClass(item.rn)">{{ item.rn }}</div>
  77. </div>
  78. <div class="td">{{ item.area }}</div>
  79. <div class="td">{{ item.township }}</div>
  80. <div class="td">{{ item.address }}</div>
  81. <div class="gradient-text2 td">{{ item.rainfall }}</div>
  82. </div>
  83. </div>
  84. <div class="card-header">
  85. <div class="title-box">
  86. <div>影响分析</div>
  87. </div>
  88. <div class="btn-box">
  89. <div class="btn" @click="exportData2">
  90. <i class="export-icon"></i>
  91. <div class="btn-text">导出</div>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="data-box">
  96. <div>
  97. <div class="line1">
  98. <div class="line-item">小雨</div>
  99. <div class="line-item">中雨</div>
  100. <div class="line-item">大雨</div>
  101. <div class="line-item">暴雨</div>
  102. <div class="line-item">大暴雨</div>
  103. <div class="line-item">特大暴雨</div>
  104. </div>
  105. <div ref="lineRef" class="line2" @mousemove="handleMouseMove" @mouseup="handleMouseUp" @mouseleave="handleMouseUp">
  106. <div class="line-item"></div>
  107. <div class="line-item"></div>
  108. <div class="line-item"></div>
  109. <div class="line-item"></div>
  110. <div class="line-item"></div>
  111. <div class="line-item"></div>
  112. <div
  113. class="dot"
  114. :style="{ left: startLeft + 'px' }"
  115. @mousedown="
  116. (e) => {
  117. handleMouseDown(e, 'start');
  118. }
  119. "
  120. ></div>
  121. <div
  122. class="dot"
  123. :style="{ left: endLeft + 'px' }"
  124. @mousedown="
  125. (e) => {
  126. handleMouseDown(e, 'end');
  127. }
  128. "
  129. ></div>
  130. </div>
  131. <div class="line3">
  132. <div class="line-item">1</div>
  133. <div class="line-item">10</div>
  134. <div class="line-item">25</div>
  135. <div class="line-item">50</div>
  136. <div class="line-item">100</div>
  137. <div class="line-item">
  138. <div>250</div>
  139. <div>(mm)</div>
  140. </div>
  141. </div>
  142. </div>
  143. <div class="box">
  144. <div class="text1">雨量范围</div>
  145. <div class="text2">{{ rainRange[0] }}-{{ rainRange[1] }}</div>
  146. </div>
  147. </div>
  148. <div class="data-box2">
  149. <div class="data-item">
  150. <div class="icon1"></div>
  151. <div class="item-right">
  152. <div class="text-box">
  153. <div class="text1">行政镇</div>
  154. <div class="text2">(个)</div>
  155. </div>
  156. <div class="text3">{{ analyzeData.town_num }}</div>
  157. </div>
  158. </div>
  159. <div class="data-item">
  160. <div class="icon2"></div>
  161. <div class="item-right">
  162. <div class="text-box">
  163. <div class="text1">人口</div>
  164. <div class="text2">(万)</div>
  165. </div>
  166. <div class="text4">{{ analyzeData.populationSize }}</div>
  167. </div>
  168. </div>
  169. <div class="data-item">
  170. <div class="icon3"></div>
  171. <div class="item-right">
  172. <div class="text-box">
  173. <div class="text1">面积</div>
  174. <div class="text2">(km²)</div>
  175. </div>
  176. <div class="text5">{{ analyzeData.areaSize }}</div>
  177. </div>
  178. </div>
  179. <div class="data-item">
  180. <div class="icon4"></div>
  181. <div class="item-right">
  182. <div class="text-box">
  183. <div class="text1">GDP</div>
  184. <div class="text2">(亿)</div>
  185. </div>
  186. <div class="text6">{{ analyzeData.GDP }}</div>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. <RainRank v-if="showMore" v-model="showMore" />
  192. </template>
  193. <script lang="ts" setup name="RainMonitor">
  194. import { option6 } from '../echartOptions';
  195. import { graphic } from 'echarts';
  196. import {
  197. getRainfallRange1,
  198. getRainfallRange2,
  199. getRainfallStatisticsCount,
  200. getRainfallTownDataExport,
  201. getRainfallTownNumCount
  202. } from '@/api/globalMap/rainMonitor';
  203. import RainRank from '@/views/globalMap/RightMenu/RainMonitor/RainRank.vue';
  204. import * as XLSX from 'xlsx';
  205. import { getNextAreaInfo } from '@/api/common';
  206. import BigNumber from 'bignumber.js';
  207. import { useDebounce } from '@vueuse/core';
  208. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  209. const { district_type } = toRefs<any>(proxy?.useDict('district_type'));
  210. const containerScale = inject('containerScale');
  211. const timeOptions = reactive([
  212. { name: '1小时', value: '1' },
  213. { name: '3小时', value: '3' },
  214. { name: '6小时', value: '6' },
  215. { name: '12小时', value: '12' },
  216. { name: '24小时', value: '24' },
  217. { name: '242小时', value: '10000' }
  218. ]);
  219. // 水利站点降雨分布统计
  220. let timeOption = ref('24');
  221. const handleTimeChange = () => {
  222. initData();
  223. };
  224. const chartOption1 = ref(option6);
  225. const handleGetRainfallStatisticsCount = () => {
  226. getRainfallStatisticsCount(timeOption.value).then((res) => {
  227. const data = res.rows && res.rows.length > 0 ? res.rows.reverse() : [];
  228. const colorList = [
  229. [168, 204, 221],
  230. [67, 147, 255],
  231. [1, 251, 230],
  232. [151, 213, 100],
  233. [232, 161, 22],
  234. [251, 46, 60]
  235. ];
  236. let yData = [];
  237. let filterData = [];
  238. data.forEach((item, index) => {
  239. const color = colorList[index];
  240. yData.push(item.name);
  241. filterData.push({
  242. value: item.num,
  243. itemStyle: {
  244. color: new graphic.LinearGradient(1, 0, 0, 0, [
  245. {
  246. offset: 0,
  247. color: `rgba(${color[0]},${color[1]},${color[2]}, 1)`
  248. },
  249. {
  250. offset: 1,
  251. color: `rgba(${color[0]},${color[1]},${color[2]}, 0.1)`
  252. }
  253. ])
  254. },
  255. label: {
  256. show: true,
  257. distance: 18,
  258. textStyle: {
  259. color: '#a7ccdf',
  260. fontSize: 32,
  261. fontWeight: 'bold'
  262. },
  263. position: 'right'
  264. }
  265. });
  266. });
  267. chartOption1.value.yAxis.data = yData;
  268. chartOption1.value.series[0].data = filterData;
  269. });
  270. };
  271. // 降雨量排行榜
  272. // true 降序
  273. const rangeData = ref([]);
  274. const queryParams = reactive({
  275. current: 1,
  276. size: 5,
  277. area: '',
  278. township: '',
  279. sort: 'desc'
  280. });
  281. const townshipList = ref([]);
  282. let showMore = ref(false);
  283. const getRankClass = (rank) => {
  284. let res = 'rank-other';
  285. if (rank === 1) {
  286. res = 'rank1';
  287. } else if (rank === 2) {
  288. res = 'rank2';
  289. } else if (rank === 3) {
  290. res = 'rank3';
  291. }
  292. return res;
  293. };
  294. const handleGetRainfallRange = () => {
  295. let area = '';
  296. for (let i = 0; i < district_type.value.length; i++) {
  297. if (district_type.value[i].value === queryParams.area) {
  298. area = district_type.value[i].label;
  299. }
  300. }
  301. const params = {
  302. current: queryParams.current,
  303. size: queryParams.size,
  304. query: {
  305. area: area,
  306. township: queryParams.township,
  307. sort: queryParams.sort,
  308. timeOption: timeOption.value
  309. }
  310. };
  311. getRainfallRange2(params).then((res) => {
  312. rangeData.value = res.rows;
  313. });
  314. };
  315. watch(
  316. () => queryParams.area,
  317. () => {
  318. queryParams.township = '';
  319. townshipList.value = [];
  320. if (queryParams.area) {
  321. getNextAreaInfo(queryParams.area).then((res) => {
  322. townshipList.value = res.data.list;
  323. });
  324. }
  325. handleGetRainfallRange();
  326. },
  327. { immediate: true }
  328. );
  329. const handleSort = () => {
  330. if (queryParams.sort === 'desc') {
  331. queryParams.sort = 'asc';
  332. } else {
  333. queryParams.sort = 'desc';
  334. }
  335. handleGetRainfallRange();
  336. };
  337. const handleShowMore = () => {
  338. showMore.value = true;
  339. };
  340. // 影响分析
  341. const rainRange = reactive(['25', '50']);
  342. const analyzeData = ref({
  343. GDP: 0,
  344. areaSize: 0,
  345. populationSize: 0,
  346. town_num: 0
  347. });
  348. const lineRef = ref();
  349. const startLeft = ref(384);
  350. const endLeft = ref(576);
  351. const mouseStatus = reactive({
  352. move: false,
  353. type: '',
  354. downLeft: 0,
  355. left: 0
  356. });
  357. const handleMouseDown = (event, type) => {
  358. event.preventDefault();
  359. // 获取目标元素的边界框
  360. const rect = lineRef.value.getBoundingClientRect();
  361. // 获取鼠标位置
  362. const mouseX = event.clientX;
  363. mouseStatus.move = true;
  364. mouseStatus.type = type;
  365. // mouseStatus.downLeft = mouseX - rect.left;
  366. mouseStatus.downLeft = mouseX;
  367. if (type === 'start') {
  368. mouseStatus.left = startLeft.value;
  369. } else {
  370. mouseStatus.left = endLeft.value;
  371. }
  372. };
  373. const handleMouseMove = (event) => {
  374. if (!mouseStatus.move) return;
  375. event.preventDefault();
  376. // 获取鼠标位置
  377. const mouseX = event.clientX;
  378. let distance = mouseX - mouseStatus.downLeft;
  379. let value = mouseStatus.left + distance / containerScale().scaleX;
  380. if (mouseStatus.type === 'start') {
  381. startLeft.value = value >= 0 ? value : 0;
  382. } else {
  383. endLeft.value = value <= 1152 ? value : 1152;
  384. }
  385. };
  386. const handleMouseUp = (event) => {
  387. event.preventDefault();
  388. mouseStatus.move = false;
  389. mouseStatus.type = '';
  390. mouseStatus.downLeft = 0;
  391. mouseStatus.left = 0;
  392. };
  393. const getRainRange = () => {
  394. getRainfallTownNumCount({
  395. query: {
  396. start_num: rainRange[0],
  397. end_num: rainRange[1],
  398. timeOption: timeOption.value
  399. }
  400. }).then((res) => {
  401. analyzeData.value = res.rows[0];
  402. });
  403. };
  404. useDebounce(getRainRange, 1000);
  405. watch(startLeft, () => {
  406. getNewRange(0, startLeft.value);
  407. useDebounceFn(getRainRange, 1000);
  408. });
  409. watch(endLeft, () => {
  410. getNewRange(1, endLeft.value);
  411. useDebounceFn(getRainRange, 1000);
  412. });
  413. const getNewRange = (index, value) => {
  414. if (value >= 0 && value < 192) {
  415. const data = new BigNumber(value).dividedBy(new BigNumber(19.2)).toFixed(0);
  416. rainRange[index] = data;
  417. } else if (value >= 192 && value < 384) {
  418. const data = new BigNumber(value).minus(new BigNumber(192)).dividedBy(new BigNumber(12.8)).plus(new BigNumber(10)).toFixed(0);
  419. rainRange[index] = data;
  420. } else if (value >= 384 && value < 576) {
  421. const data = new BigNumber(value).minus(new BigNumber(384)).dividedBy(new BigNumber(7.68)).plus(new BigNumber(25)).toFixed(0);
  422. rainRange[index] = data;
  423. } else if (value >= 576 && value < 768) {
  424. const data = new BigNumber(value).minus(new BigNumber(576)).dividedBy(new BigNumber(3.84)).plus(new BigNumber(50)).toFixed(0);
  425. rainRange[index] = data;
  426. } else if (value >= 768 && value < 960) {
  427. const data = new BigNumber(value).minus(new BigNumber(768)).dividedBy(new BigNumber(1.28)).plus(new BigNumber(100)).toFixed(0);
  428. rainRange[index] = data;
  429. } else if (value >= 960 && value < 1152) {
  430. const data = new BigNumber(value).minus(new BigNumber(960)).dividedBy(new BigNumber(1.28)).plus(new BigNumber(250)).toFixed(0);
  431. rainRange[index] = data;
  432. }
  433. };
  434. const initData = () => {
  435. handleGetRainfallStatisticsCount();
  436. handleGetRainfallRange();
  437. getRainRange();
  438. };
  439. const exportData = () => {
  440. const params = {
  441. area: queryParams.area,
  442. township: queryParams.township,
  443. sort: queryParams.sort,
  444. timeOption: timeOption.value
  445. };
  446. getRainfallRange1(params).then((res) => {
  447. const data = res.data.list;
  448. const title = '降雨量排行(过去' + timeOption.value + '小时)';
  449. // 创建工作簿
  450. const wb = XLSX.utils.book_new();
  451. // 创建工作表数据
  452. const ws_data = [['序号', '县区', '街镇', '站址', '雨量(mm)']];
  453. data.forEach((item) => {
  454. ws_data.push([item.rn, item.area, item.township, item.address, item.rainfall]);
  455. });
  456. const ws = XLSX.utils.aoa_to_sheet(ws_data);
  457. ws['!cols'] = [{ wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 50 }, { wch: 10 }];
  458. // 将工作表添加到工作簿
  459. XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
  460. // 导出Excel文件
  461. XLSX.writeFile(wb, title + '.xlsx');
  462. });
  463. };
  464. const exportData2 = () => {
  465. const params = {
  466. area: '',
  467. township: '',
  468. sort: queryParams.sort,
  469. timeOption: timeOption.value
  470. };
  471. getRainfallTownDataExport(params).then((res) => {
  472. const data = res.data.list;
  473. const title = '影响分析(过去' + timeOption.value + '小时)';
  474. // 创建工作簿
  475. const wb = XLSX.utils.book_new();
  476. // 创建工作表数据
  477. const ws_data = [['雨量范围', '行政镇', '人口(万)', '面积(km²)', 'GDP(亿)']];
  478. const rainList = {
  479. '小雨': '小雨(0-9)',
  480. '中雨': '中雨(10-24)',
  481. '大雨': '大雨(25-49)',
  482. '暴雨': '暴雨(50-99)',
  483. '大暴雨': '大暴雨(100-249)',
  484. '特大暴雨': '特大暴雨(>250)'
  485. };
  486. data.forEach((item) => {
  487. ws_data.push([rainList[item.rain_type], item.town_num, item.populationSize, item.areaSize, item.GDP]);
  488. });
  489. // 将数据转换为工作表,并添加合并单元格的配置
  490. const ws = XLSX.utils.aoa_to_sheet(ws_data);
  491. ws['!cols'] = [{ wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 20 }];
  492. // 将工作表添加到工作簿
  493. XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
  494. // 导出Excel文件
  495. XLSX.writeFile(wb, title + '.xlsx');
  496. });
  497. };
  498. initData();
  499. </script>
  500. <style lang="scss" scoped>
  501. .menu-content {
  502. width: 1589px;
  503. height: 2071px;
  504. background: url('@/assets/images/map/rightMenu/rainMonitor/dialog.png') no-repeat;
  505. padding: 130px 20px 20px 20px;
  506. font-size: 36px;
  507. position: relative;
  508. .card-header {
  509. display: flex;
  510. justify-content: space-between;
  511. align-items: center;
  512. margin-top: 35px;
  513. .title-box {
  514. background-image: url('@/assets/images/map/rightMenu/rainMonitor/titleBox.png');
  515. background-repeat: no-repeat;
  516. background-size: 370px 35px;
  517. background-position: bottom left;
  518. font-size: 44px;
  519. color: #fff;
  520. padding-left: 50px;
  521. display: flex;
  522. align-items: center;
  523. .line {
  524. background-color: #dce2ec;
  525. width: 3px;
  526. height: 44px;
  527. margin: 0 30px;
  528. }
  529. .text2 {
  530. font-size: 44px;
  531. }
  532. .text3 {
  533. font-size: 38px;
  534. color: #a7ccdf;
  535. }
  536. }
  537. .btn-box {
  538. display: flex;
  539. align-items: center;
  540. .btn {
  541. width: 244px;
  542. height: 120px;
  543. background: url('@/assets/images/map/rightMenu/rainMonitor/btn.png') no-repeat;
  544. cursor: pointer;
  545. display: flex;
  546. align-items: center;
  547. justify-content: center;
  548. .more-icon {
  549. width: 47px;
  550. height: 43px;
  551. background: url('@/assets/images/map/rightMenu/rainMonitor/more.png') no-repeat;
  552. margin-right: 5px;
  553. }
  554. .export-icon {
  555. width: 43px;
  556. height: 45px;
  557. background: url('@/assets/images/map/rightMenu/rainMonitor/export.png') no-repeat;
  558. margin-right: 5px;
  559. }
  560. .btn-text {
  561. color: #edfaff;
  562. font-size: 32px;
  563. }
  564. }
  565. }
  566. }
  567. }
  568. .table {
  569. margin-left: 28px;
  570. .table-header {
  571. width: 1490px;
  572. height: 88px;
  573. background: url('@/assets/images/common/header.png') no-repeat;
  574. display: flex;
  575. align-items: center;
  576. .td-cursor {
  577. cursor: pointer;
  578. }
  579. }
  580. .tr {
  581. width: 1487px;
  582. height: 88px;
  583. background: url('@/assets/images/common/tr.png') no-repeat;
  584. display: flex;
  585. align-items: center;
  586. margin-top: 10px;
  587. .td {
  588. white-space: nowrap;
  589. overflow: hidden;
  590. text-overflow: ellipsis;
  591. }
  592. }
  593. .gradient-text2 {
  594. color: transparent !important;
  595. }
  596. .td {
  597. font-size: 38px;
  598. color: #edfaff;
  599. display: flex;
  600. justify-content: center;
  601. align-items: center;
  602. &:nth-child(1) {
  603. width: 140px;
  604. }
  605. &:nth-child(2) {
  606. width: 220px;
  607. }
  608. &:nth-child(3) {
  609. width: 280px;
  610. }
  611. &:nth-child(4) {
  612. flex: 1;
  613. }
  614. &:nth-child(5) {
  615. width: 230px;
  616. }
  617. }
  618. .down-icon {
  619. display: inline-block;
  620. width: 33px;
  621. height: 15px;
  622. background: url('@/assets/images/map/rightMenu/rainMonitor/down.png') no-repeat;
  623. cursor: pointer;
  624. margin-left: 8px;
  625. }
  626. .asc-icon {
  627. display: inline-block;
  628. width: 33px;
  629. height: 33px;
  630. background: url('@/assets/images/common/asc.png') no-repeat;
  631. cursor: pointer;
  632. margin-left: 8px;
  633. }
  634. .desc-icon {
  635. display: inline-block;
  636. width: 33px;
  637. height: 33px;
  638. background: url('@/assets/images/common/desc.png') no-repeat;
  639. cursor: pointer;
  640. margin-left: 8px;
  641. }
  642. .rank1,
  643. .rank2,
  644. .rank3,
  645. .rank-other {
  646. width: 50px;
  647. height: 48px;
  648. color: #ecfaff;
  649. font-family: BEBAS-1;
  650. display: flex;
  651. align-items: center;
  652. justify-content: center;
  653. }
  654. .rank1 {
  655. height: 47px;
  656. background: url('@/assets/images/map/rightMenu/rainMonitor/first.png') no-repeat;
  657. }
  658. .rank2 {
  659. background: url('@/assets/images/map/rightMenu/rainMonitor/second.png') no-repeat;
  660. }
  661. .rank3 {
  662. background: url('@/assets/images/map/rightMenu/rainMonitor/third.png') no-repeat;
  663. }
  664. .rank-other {
  665. background: url('@/assets/images/map/rightMenu/rainMonitor/other.png') no-repeat;
  666. }
  667. }
  668. .data-box {
  669. width: 1495px;
  670. height: 172px;
  671. background: url('@/assets/images/map/rightMenu/rainMonitor/box1.png') no-repeat;
  672. margin-left: 28px;
  673. color: #a7ccdf;
  674. padding-left: 50px;
  675. padding-top: 20px;
  676. font-size: 32px;
  677. display: flex;
  678. .line1 {
  679. display: flex;
  680. .line-item {
  681. width: 192.46px;
  682. }
  683. }
  684. .line2 {
  685. display: flex;
  686. margin: 10px 0;
  687. position: relative;
  688. .dot {
  689. width: 65px;
  690. height: 65px;
  691. background: url('@/assets/images/map/rightMenu/rainMonitor/dot.png') no-repeat;
  692. cursor: pointer;
  693. position: absolute;
  694. top: 50%;
  695. transform: translateY(-50%);
  696. margin-left: -32.5px;
  697. }
  698. .line-item {
  699. width: 192px;
  700. height: 30px;
  701. &:nth-child(1) {
  702. border-bottom-left-radius: 30px;
  703. border-top-left-radius: 30px;
  704. background-color: #a8ccdd;
  705. }
  706. &:nth-child(2) {
  707. background-color: #2b81ff;
  708. }
  709. &:nth-child(3) {
  710. background-color: #00fce6;
  711. }
  712. &:nth-child(4) {
  713. background-color: #97d664;
  714. }
  715. &:nth-child(5) {
  716. background-color: #ffaf00;
  717. }
  718. &:nth-child(6) {
  719. border-bottom-right-radius: 30px;
  720. border-top-right-radius: 30px;
  721. background-color: #ff2e3b;
  722. }
  723. }
  724. }
  725. .line3 {
  726. display: flex;
  727. .line-item {
  728. width: 192.46px;
  729. &:last-child {
  730. display: flex;
  731. justify-content: space-between;
  732. }
  733. }
  734. }
  735. .box {
  736. width: 203px;
  737. height: 119px;
  738. background: url('@/assets/images/map/rightMenu/rainMonitor/box2.png') no-repeat;
  739. display: flex;
  740. flex-direction: column;
  741. justify-content: center;
  742. align-items: center;
  743. margin-left: 40px;
  744. margin-top: 5px;
  745. .text1 {
  746. font-size: 32px;
  747. color: #a7ccdf;
  748. }
  749. .text2 {
  750. font-size: 38px;
  751. font-family: BEBAS-1;
  752. color: transparent;
  753. background-image: linear-gradient(to bottom, #ffffff 25%, #d2fff8 50%, #6bffec 70%, #00fde8 100%);
  754. /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
  755. -webkit-background-clip: text;
  756. /* 非Webkit内核浏览器需要使用标准前缀 */
  757. background-clip: text;
  758. /* 把当前元素设置为行内块,以便能够应用背景 */
  759. display: inline-block;
  760. }
  761. }
  762. }
  763. .data-box2 {
  764. width: 1492px;
  765. height: 200px;
  766. background: url('@/assets/images/map/rightMenu/rainMonitor/dataBox.png') no-repeat;
  767. background-size: 1492px 123px;
  768. background-position: bottom;
  769. margin-left: 28px;
  770. display: flex;
  771. padding: 0 70px;
  772. align-items: center;
  773. .data-item {
  774. display: flex;
  775. flex: 1;
  776. .item-right {
  777. margin-left: 20px;
  778. .text-box {
  779. display: flex;
  780. margin-bottom: 20px;
  781. .text1 {
  782. font-size: 32px;
  783. color: #ffffff;
  784. }
  785. .text2 {
  786. font-size: 32px;
  787. color: #a7ccdf;
  788. margin-left: 5px;
  789. }
  790. }
  791. .text3,
  792. .text4,
  793. .text5,
  794. .text6 {
  795. font-size: 38px;
  796. font-family: BEBAS-1;
  797. /* 设置字体透明 */
  798. color: transparent;
  799. /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
  800. -webkit-background-clip: text;
  801. /* 非Webkit内核浏览器需要使用标准前缀 */
  802. background-clip: text;
  803. /* 把当前元素设置为行内块,以便能够应用背景 */
  804. display: inline-block;
  805. }
  806. .text3 {
  807. background-image: linear-gradient(to bottom, #ffffff 25%, #e58400 100%);
  808. }
  809. .text4 {
  810. background-image: linear-gradient(to bottom, #ffffff 25%, #6fe695 100%);
  811. }
  812. .text5 {
  813. background-image: linear-gradient(to bottom, #ffffff 25%, #00fde8 100%);
  814. }
  815. .text6 {
  816. background-image: linear-gradient(to bottom, #ffffff 25%, #2b72d6 100%);
  817. }
  818. }
  819. .icon1,
  820. .icon2,
  821. .icon3,
  822. .icon4 {
  823. width: 152px;
  824. height: 138px;
  825. }
  826. .icon1 {
  827. width: 141px;
  828. height: 126px;
  829. background: url('@/assets/images/map/rightMenu/rainMonitor/icon1.png') no-repeat;
  830. }
  831. .icon2 {
  832. background: url('@/assets/images/map/rightMenu/rainMonitor/icon2.png') no-repeat;
  833. }
  834. .icon3 {
  835. background: url('@/assets/images/map/rightMenu/rainMonitor/icon3.png') no-repeat;
  836. }
  837. .icon4 {
  838. background: url('@/assets/images/map/rightMenu/rainMonitor/icon4.png') no-repeat;
  839. }
  840. }
  841. }
  842. .title {
  843. font-size: 60px;
  844. position: absolute;
  845. top: 30px;
  846. left: 160px;
  847. }
  848. </style>