changeMap.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  1. <template>
  2. <div>
  3. <div class="toolmap" :style="mapStore.sideMenu? `right:${windowRight}px`:`right:20px`">
  4. <div @click="setClass(0)" @mouseover="getTip('面雨量分布图')" @mouseout="closetip"
  5. :class="bkclick[0] ? 'divclick' : ''">
  6. <img src="../../assets/images/changeMap/mianyuliang.png" />
  7. </div>
  8. <div @click="setClass(1)" @mouseover="getTip('站点雨量图')" @mouseout="closetip" :class="bkclick[1] ? 'divclick' : ''">
  9. <img src="../../assets/images/changeMap/zhandian.png" />
  10. </div>
  11. <!-- <div @click="setClass(2)" @mouseover="getTip('分区雨量图')" @mouseout="closetip" :class="bkclick[2] ? 'divclick' : ''">
  12. <img src="../../assets/images/changeMap/fenqu.png" />
  13. </div> -->
  14. <div @click="setClass(3)" @mouseover="getTip('站点温度图')" @mouseout="closetip" :class="bkclick[3] ? 'divclick' : ''">
  15. <img src="../../assets/images/changeMap/wendu.png" />
  16. </div>
  17. <div @click="setClass(4)" @mouseover="getTip('站点风速风向图')" @mouseout="closetip"
  18. :class="bkclick[4] ? 'divclick' : ''">
  19. <img src="../../assets/images/changeMap/feng.png" />
  20. </div>
  21. </div>
  22. <div class="hover-info" :style="px" v-show="infoShow">
  23. {{ info }}
  24. </div>
  25. <div class="head-span" v-if="headInfoShow">
  26. <div style="font-size: 24px; font-weight: bold; color: #fff; text-align: center">{{ headInfo }} </div>
  27. <div style="
  28. color: #ffffff;
  29. font-size: 16px;
  30. font-weight: bold;
  31. text-align: center;
  32. margin-top: 9px;
  33. height: 30px;
  34. line-height: 30px;
  35. position: relative;
  36. " v-if="searchID != 3 && searchID != 4">
  37. <a-date-picker v-model:value="startData" :allowClear="false" format="MM月DD日" valueFormat="YYYY-MM-DD"
  38. :disabled-date="disabledDate" />
  39. <div class="sanjiao-box">
  40. <div class="sanjiao-btn" @click="lastDay"> </div>
  41. <div class="sanjiao-btn2" @click="nextDay"> </div>
  42. </div>
  43. <TimePicker v-model:value="startTime" format="H时" valueFormat="HH" :allowClear="false" @change="changeTime"
  44. :disabledHours="disabledHour" />
  45. <div class="sanjiao-box">
  46. <div class="sanjiao-btn" @click="lastTime"> </div>
  47. <div class="sanjiao-btn2" @click="nextTime"> </div>
  48. </div>
  49. <span style="margin-right: 20px">至</span>
  50. <a-date-picker v-model:value="endData" :allowClear="false" :disabled-date="disabledDate2" format="MM月DD日"
  51. valueFormat="YYYY-MM-DD" />
  52. <div class="sanjiao-box">
  53. <div class="sanjiao-btn" @click="lastDay2"> </div>
  54. <div class="sanjiao-btn2" @click="nextDay2"> </div>
  55. </div>
  56. <TimePicker v-model:value="endTime" format="H时" valueFormat="HH" :allowClear="false"
  57. :disabledHours="disabledHour2" />
  58. <div class="sanjiao-box">
  59. <div class="sanjiao-btn" @click="lastTime2"> </div>
  60. <div class="sanjiao-btn2" @click="nextTime2"> </div>
  61. </div>
  62. <img src="../../assets/images/changeMap/checktime.png" style="display: inline-block" @click="search" />
  63. </div>
  64. <div style="
  65. color: #ffffff;
  66. font-size: 16px;
  67. font-weight: bold;
  68. text-align: center;
  69. margin-top: 9px;
  70. height: 30px;
  71. line-height: 30px;
  72. position: relative;
  73. " v-if="searchID == 3 || searchID == 4">
  74. <a-date-picker v-model:value="endData" :allowClear="false" format="MM月DD日" valueFormat="YYYY-MM-DD" />
  75. <div class="sanjiao-box">
  76. <div class="sanjiao-btn" @click="lastDay3"> </div>
  77. <div class="sanjiao-btn2" @click="nextDay3"> </div>
  78. </div>
  79. <TimePicker v-model:value="endTime" format="H时" valueFormat="HH" :allowClear="false" />
  80. <div class="sanjiao-box">
  81. <div class="sanjiao-btn" @click="lastTime3"> </div>
  82. <div class="sanjiao-btn2" @click="nextTime3"> </div>
  83. </div>
  84. <img src="../../assets/images/changeMap/checktime.png" style="display: inline-block" @click="search" />
  85. </div>
  86. </div>
  87. <!-- 面雨量分布 -->
  88. <div class="class-legend" v-show="mapLgendShow3">
  89. <div style="border-radius: 25px 25px 0 0; background-color: #3f3dbd; color: #fff">mm</div>
  90. <div v-for="item in rainLegendNow2" :style="`background:${item.color}`">{{ item.min }}~{{ item.max }}</div>
  91. <div style="border-radius: 0 0 25px 25px; background-color: #fff; color: #000; font-size: 12px">0</div>
  92. </div>
  93. <!-- 站点雨量 -->
  94. <div class="class-legend" v-show="mapLgendShow">
  95. <div style="border-radius: 25px 25px 0 0; background-color: #3f3dbd; color: #fff">mm</div>
  96. <div v-for="item in rainLegendNow" :style="item.style">{{ item.value }}</div>
  97. <div style="border-radius: 0 0 25px 25px; background-color: #eaeaea; color: #000; font-size: 12px">无数据</div>
  98. </div>
  99. <div class="class-legendtwo" v-show="mapLgendShow2">
  100. <div style="border-radius: 25px 25px 0 0; background-color: #3f3dbd; color: #fff">℃</div>
  101. <div v-for="item in wdLegendNow" :style="item.style">{{ item.value }}</div>
  102. <!-- <div style="border-radius: 0 0 25px 25px ;background-color: #3f3dbd;color: #fff;">0</div> -->
  103. </div>
  104. </div>
  105. </template>
  106. <script setup>
  107. import { ref, reactive, onMounted } from 'vue';
  108. import moment from 'moment';
  109. import { TimePicker } from 'ant-design-vue';
  110. import eventBus from '/@/utils/eventBus';
  111. import { useMapStore } from '/@/store/modules/map';
  112. import { getColorVal, getWdColorVal } from '/@/utils/getcolor.js';
  113. let windowRight = ref(440)
  114. // eventBus.on('setWindowRight', (e) => {
  115. // windowRight.value = e
  116. // });
  117. const mapStore = useMapStore();
  118. const emit = defineEmits(['changeMap']);
  119. const bkclick = reactive([false, false, false, false, false]);
  120. const info = ref('');
  121. const infoShow = ref(false);
  122. const px = ref('');
  123. const headInfo = ref('');
  124. const headInfoShow = ref(false);
  125. const mapLgendShow = ref(false);
  126. const mapLgendShow2 = ref(false);
  127. const mapLgendShow3 = ref(false);
  128. const rainLegendNow2 = ref();
  129. eventBus.on('rainLegend2', (e) => {
  130. let hour=e.hour
  131. let colors = [];
  132. if(hour<=1){
  133. colors = [
  134. { min: 100, max: 9999, color: '#fb00ff' },
  135. { min: 50, max: 100, color: '#0000f6' },
  136. { min: 25, max: 50, color: '#65b7f9' },
  137. { min: 10, max: 25, color: '#3fb937' },
  138. { min: 5, max: 10, color: '#6cda69' },
  139. { min: 2.5, max: 5, color: '#b1f99d' },
  140. { min: 0, max: 2.5, color: '#d7f9cd' },
  141. ];
  142. }else if(hour>1 && hour<=6){
  143. colors = [
  144. { min: 250, max: 9999, color: '#820041' },
  145. { min: 100, max: 250, color: '#ff00ff' },
  146. { min: 50, max: 100, color: '#0004fe' },
  147. { min: 25, max: 50, color: '#62b6ff' },
  148. { min: 10, max: 25, color: '#35bf40' },
  149. { min: 5, max: 10, color: '#6cda6e' },
  150. { min: 0, max: 5, color: '#b2f8a1' },
  151. ];
  152. }else if(hour>6 && hour<=24){
  153. colors = [
  154. { min: 250, max: 9999, color: '#7e0240' },
  155. { min: 100, max: 250, color: '#fa00fb' },
  156. { min: 50, max: 100, color: '#0300fe' },
  157. { min: 25, max: 50, color: '#5fb8ff' },
  158. { min: 10, max: 25, color: '#3abc39' },
  159. { min: 0, max: 10, color: '#a4f48c' },
  160. ];
  161. }else if(hour>24){
  162. colors = [
  163. { min: 1500, max: 9999, color: '#980400' },
  164. { min: 1000, max: 1500, color: '#e70109' },
  165. { min: 600, max: 1000, color: '#ff6700' },
  166. { min: 400, max: 600, color: '#ffa603' },
  167. { min: 250, max: 400, color: '#7d033d' },
  168. { min: 100, max: 250, color: '#ff00f7' },
  169. { min: 50, max: 100, color: '#0500ff' },
  170. { min: 25, max: 50, color: '#5db8ff' },
  171. { min: 10, max: 25, color: '#40b640' },
  172. { min: 0, max: 10, color: '#a4f391' },
  173. ];
  174. }
  175. // 取范围
  176. let minIndex=0
  177. let maxIndex=0
  178. colors.forEach((i,index)=>{
  179. if(e.min<i.max&&e.min>=i.min){
  180. minIndex=index
  181. }
  182. if(e.max<i.max&&e.max>=i.min){
  183. maxIndex=index
  184. }
  185. })
  186. rainLegendNow2.value = colors
  187. // if (Number(e.max) > 0.5) {
  188. // let level1 = Number(((e.max - 0.5) / 3 + 0.5).toFixed(2))
  189. // let level2 = Number((((e.max - 0.5) / 3) * 2 + 0.5).toFixed(2))
  190. // colors = [
  191. // {
  192. // style: 'background:#7d8fbb',
  193. // value: `0.5~${level1}`,
  194. // },
  195. // {
  196. // style: 'background:#638cc9',
  197. // value: `${level1}~${level2}`,
  198. // },
  199. // {
  200. // style: 'background:#3660bd',
  201. // value: `${level2}~${e.max}`,
  202. // },
  203. // ];
  204. // }
  205. // rainLegendNow2.value = colors;
  206. // rainLegendNow2.value.reverse();
  207. });
  208. eventBus.on('rainLegend', (e) => {
  209. let maxcolor = getColorVal(e.max);
  210. let mincolor = getColorVal(e.min);
  211. let maxIndex = 0;
  212. let minIndex = 0;
  213. rainLegend.forEach((i, index) => {
  214. if (i.style.split(':')[1] == maxcolor) {
  215. maxIndex = index;
  216. }
  217. if (i.style.split(':')[1] == mincolor) {
  218. minIndex = index;
  219. }
  220. });
  221. // console.log(maxIndex,minIndex,maxcolor,mincolor)
  222. rainLegendNow.value = rainLegend.slice(minIndex, maxIndex + 1);
  223. rainLegendNow.value.reverse();
  224. });
  225. eventBus.on('wdLegend', (e) => {
  226. let maxcolor = getWdColorVal(e.max);
  227. let mincolor = getWdColorVal(e.min);
  228. let maxIndex = 0;
  229. let minIndex = 0;
  230. wdLegend.forEach((i, index) => {
  231. if (i.style.split(':')[1] == maxcolor) {
  232. maxIndex = index;
  233. }
  234. if (i.style.split(':')[1] == mincolor) {
  235. minIndex = index;
  236. }
  237. });
  238. console.log(maxIndex, minIndex, maxcolor, mincolor);
  239. wdLegendNow.value = wdLegend.slice(minIndex, maxIndex + 1);
  240. console.log(wdLegendNow.value, 908);
  241. wdLegendNow.value.reverse();
  242. });
  243. const rainLegendNow = ref();
  244. const rainLegend = reactive([
  245. {
  246. style: 'background:#fffdff',
  247. value: '0~1',
  248. },
  249. {
  250. style: 'background:#a6f28e',
  251. value: '1~9.9',
  252. },
  253. {
  254. style: 'background:#3db93d',
  255. value: '10~24.9',
  256. },
  257. {
  258. style: 'background:#61b8ff',
  259. value: '25~49.9',
  260. },
  261. {
  262. style: 'background:#0000fe',
  263. value: '50~99.9',
  264. },
  265. {
  266. style: 'background:#fa00fa',
  267. value: '100~250',
  268. },
  269. {
  270. style: 'background:#810041',
  271. value: '>250',
  272. },
  273. ]);
  274. const wdLegendNow = ref([]);
  275. const wdLegend = reactive([
  276. {
  277. style: 'background:#032b8b',
  278. value: '<-12',
  279. },
  280. {
  281. style: 'background:#195da7',
  282. value: '-12~-8',
  283. },
  284. {
  285. style: 'background:#1d75d4',
  286. value: '-8~-4',
  287. },
  288. {
  289. style: 'background:#3f9fe9',
  290. value: '-4~0',
  291. },
  292. {
  293. style: 'background:#82d1ff',
  294. value: '0~4',
  295. },
  296. {
  297. style: 'background:#abe9f8',
  298. value: '4~8',
  299. },
  300. {
  301. style: 'background:#cffcff',
  302. value: '8~12',
  303. },
  304. {
  305. style: 'background:#f3fdee',
  306. value: '12~16',
  307. },
  308. {
  309. style: 'background:#ccffcc',
  310. value: '16~20',
  311. },
  312. {
  313. style: 'background:#bffb91',
  314. value: '20~24',
  315. },
  316. {
  317. style: 'background:#fdfb96',
  318. value: '24~28',
  319. },
  320. {
  321. style: 'background:#fef2c2',
  322. value: '28~32',
  323. },
  324. {
  325. style: 'background:#fecda1',
  326. value: '32~35',
  327. },
  328. {
  329. style: 'background:#f99782',
  330. value: '35~37',
  331. },
  332. {
  333. style: 'background:#f55900',
  334. value: '37~40',
  335. },
  336. {
  337. style: 'background:#e60101',
  338. value: '>40',
  339. },
  340. ]);
  341. const disabledDate = (current) => {
  342. return current > moment(endData.value).valueOf();
  343. };
  344. const disabledDate2 = (current) => {
  345. return current < moment(startData.value).valueOf();
  346. };
  347. const disabledDate3 = (current) => {
  348. return current > moment().valueOf();
  349. };
  350. const disabledHour = () => {
  351. if (startData.value == endData.value) {
  352. let arr = [];
  353. for (let i = 0; i <= 23; i++) {
  354. if (i > endTime.value) {
  355. arr.push(i);
  356. }
  357. }
  358. return arr;
  359. }
  360. };
  361. const disabledHour2 = () => {
  362. if (startData.value == endData.value) {
  363. let arr = [];
  364. for (let i = 0; i <= 23; i++) {
  365. if (i < startTime.value) {
  366. arr.push(i);
  367. }
  368. }
  369. return arr;
  370. }
  371. };
  372. const disabledHour3 = () => {
  373. if (moment().format('YYYY-MM-DD') == endData.value) {
  374. let arr = [];
  375. for (let i = 0; i <= 23; i++) {
  376. if (i > moment().format('HH')) {
  377. arr.push(i);
  378. }
  379. }
  380. return arr;
  381. }
  382. };
  383. const lastDay = () => {
  384. startData.value = moment(startData.value).subtract(1, 'days').format('YYYY-MM-DD');
  385. };
  386. const nextDay = () => {
  387. if (moment(startData.value).format('YYYY-MM-DD').valueOf() < moment(endData.value).format('YYYY-MM-DD').valueOf()) {
  388. startData.value = moment(startData.value).add(1, 'days').format('YYYY-MM-DD');
  389. }
  390. };
  391. const lastDay2 = () => {
  392. if (moment(startData.value).format('YYYY-MM-DD').valueOf() < moment(endData.value).format('YYYY-MM-DD').valueOf()) {
  393. endData.value = moment(endData.value).subtract(1, 'days').format('YYYY-MM-DD');
  394. }
  395. };
  396. const nextDay3 = () => {
  397. // if(moment().format('YYYY-MM-DD').valueOf()!= moment(endData.value).format('YYYY-MM-DD').valueOf()){
  398. endData.value = moment(endData.value).add(1, 'days').format('YYYY-MM-DD');
  399. // }
  400. };
  401. const lastDay3 = () => {
  402. endData.value = moment(endData.value).subtract(1, 'days').format('YYYY-MM-DD');
  403. };
  404. const nextDay2 = () => {
  405. endData.value = moment(endData.value).add(1, 'days').format('YYYY-MM-DD');
  406. };
  407. const lastTime = () => {
  408. startTime.value = moment(startData.value + ' ' + startTime.value)
  409. .subtract(1, 'hours')
  410. .format('HH');
  411. };
  412. const nextTime = () => {
  413. if (
  414. moment(startData.value).format('YYYY-MM-DD').valueOf() == moment(endData.value).format('YYYY-MM-DD').valueOf() &&
  415. startTime.value == endTime.value
  416. ) {
  417. } else {
  418. startTime.value = moment(startData.value + ' ' + startTime.value)
  419. .add(1, 'hours')
  420. .format('HH');
  421. }
  422. };
  423. const lastTime2 = () => {
  424. if (
  425. moment(startData.value).format('YYYY-MM-DD').valueOf() == moment(endData.value).format('YYYY-MM-DD').valueOf() &&
  426. startTime.value == endTime.value
  427. ) {
  428. } else {
  429. endTime.value = moment(endData.value + ' ' + endTime.value)
  430. .subtract(1, 'hours')
  431. .format('HH');
  432. }
  433. };
  434. const nextTime2 = () => {
  435. endTime.value = moment(endData.value + ' ' + endTime.value)
  436. .add(1, 'hours')
  437. .format('HH');
  438. };
  439. const lastTime3 = () => {
  440. endTime.value = moment(endData.value + ' ' + endTime.value)
  441. .subtract(1, 'hours')
  442. .format('HH');
  443. };
  444. const nextTime3 = () => {
  445. // if( moment().format('YYYY-MM-DD').valueOf()== moment(endData.value).format('YYYY-MM-DD').valueOf()
  446. // &&moment().format('HH')== endTime.value){
  447. // }else{
  448. endTime.value = moment(endData.value + ' ' + endTime.value)
  449. .add(1, 'hours')
  450. .format('HH');
  451. // }
  452. };
  453. const startData = ref(moment().format('YYYY-MM-DD'));
  454. const startTime = ref('08');
  455. const endData = ref(moment().format('YYYY-MM-DD'));
  456. const endTime = ref(moment().format('HH'));
  457. const search = () => {
  458. // console.log(startData.value,startTime.value,endData.value,endTime.value,89)
  459. emit('changeMap', {
  460. flag: bkclick[searchID.value],
  461. maptype: searchID.value,
  462. start_time: startData.value + ' ' + startTime.value + ':00:00',
  463. end_time: endData.value + ' ' + endTime.value + ':00:00',
  464. });
  465. };
  466. onMounted(() => {
  467. // startData.value = moment().format('MM-DD')
  468. // endData.value = moment().format('MM-DD')
  469. // endTime.value=moment().format('hh')
  470. // console.log(endTime.value,)
  471. });
  472. const changeTime = (i) => {
  473. console.log(i, 7);
  474. };
  475. const searchID = ref();
  476. const setClass = (i) => {
  477. // 初始时间
  478. startData.value = moment().format('YYYY-MM-DD');
  479. startTime.value = '08';
  480. endData.value = moment().format('YYYY-MM-DD');
  481. endTime.value = moment().format('HH');
  482. searchID.value = i;
  483. bkclick.forEach((item, index) => {
  484. if (i === index) {
  485. bkclick[i] = !bkclick[i];
  486. } else {
  487. bkclick[index] = false;
  488. }
  489. });
  490. if (i == 0 || i == 1 || i == 2) {
  491. if (i == 0) {
  492. mapLgendShow3.value = true;
  493. mapLgendShow.value = false;
  494. mapLgendShow2.value = false;
  495. if (bkclick[i]) {
  496. mapLgendShow3.value = true;
  497. } else {
  498. mapLgendShow3.value = false;
  499. }
  500. } else {
  501. mapLgendShow.value = true;
  502. mapLgendShow2.value = false;
  503. mapLgendShow3.value = false;
  504. if (bkclick[i]) {
  505. mapLgendShow.value = true;
  506. } else {
  507. mapLgendShow.value = false;
  508. }
  509. }
  510. } else if (i == 3) {
  511. mapLgendShow3.value = false;
  512. mapLgendShow.value = false;
  513. mapLgendShow2.value = true;
  514. if (bkclick[i]) {
  515. mapLgendShow2.value = true;
  516. } else {
  517. mapLgendShow.value = false;
  518. mapLgendShow2.value = false;
  519. mapLgendShow3.value = false;
  520. }
  521. } else {
  522. mapLgendShow.value = false;
  523. mapLgendShow2.value = false;
  524. mapLgendShow3.value = false;
  525. }
  526. // eventBus.emit('legendColor', { maptype: searchID.value, flag: bkclick[searchID.value] });
  527. emit('changeMap', {
  528. flag: bkclick[searchID.value],
  529. maptype: searchID.value,
  530. start_time: startData.value + ' ' + startTime.value + ':00:00',
  531. end_time: endData.value + ' ' + endTime.value + ':00:00',
  532. });
  533. if (i == 0) {
  534. headInfo.value = '面雨量分布图';
  535. } else if (i == 1) {
  536. headInfo.value = '站点雨量图';
  537. } else if (i == 2) {
  538. headInfo.value = '分区雨量图';
  539. } else if (i == 3) {
  540. headInfo.value = '站点温度图';
  541. } else if (i == 4) {
  542. headInfo.value = '站点风速风向图';
  543. }
  544. if (bkclick.includes(true)) {
  545. headInfoShow.value = true;
  546. } else {
  547. headInfoShow.value = false;
  548. }
  549. };
  550. const getTip = (i) => {
  551. info.value = i;
  552. infoShow.value = true;
  553. if (mapStore.sideMenu) {
  554. if (i == '面雨量分布图') {
  555. px.value = ` right: ${windowRight.value+50}px;top: 400px;`;
  556. } else if (i == '站点雨量图') {
  557. px.value = ` right: ${windowRight.value+50}px;top: 430px;`;
  558. } else if (i == '分区雨量图') {
  559. px.value = ` right: ${windowRight.value+50}px;top: 450px;`;
  560. } else if (i == '站点温度图') {
  561. px.value = ` right: ${windowRight.value+50}px;top: 460px;`;
  562. } else if (i == '站点风速风向图') {
  563. px.value = ` right: ${windowRight.value+50}px;top: 490px;`;
  564. }
  565. } else {
  566. if (i == '面雨量分布图') {
  567. px.value = ` right: 70px;top: 400px;`;
  568. } else if (i == '站点雨量图') {
  569. px.value = ` right: 70px;top: 430px;`;
  570. } else if (i == '分区雨量图') {
  571. px.value = ` right: 70px;top: 450px;`;
  572. } else if (i == '站点温度图') {
  573. px.value = ` right: 70px;top: 460px;`;
  574. } else if (i == '站点风速风向图') {
  575. px.value = ` right: 70px;top: 490px;`;
  576. }
  577. }
  578. };
  579. const closetip = () => {
  580. infoShow.value = false;
  581. };
  582. </script>
  583. <style lang="less" scoped>
  584. .toolmap {
  585. position: absolute;
  586. right: 370px;
  587. top: 400px;
  588. width: 36px;
  589. // height: 140px;
  590. height: 125px;
  591. border-radius: 149px;
  592. opacity: 1;
  593. z-index: 10;
  594. /* 工具栏背景色 */
  595. background: rgba(10, 80, 110, 0.9);
  596. padding: 11px 0;
  597. display: flex;
  598. justify-content: space-between;
  599. flex-direction: column;
  600. align-items: center;
  601. div {
  602. width: 100%;
  603. text-align: center;
  604. img {
  605. display: inline-block;
  606. width: 20px;
  607. height: 20px;
  608. }
  609. }
  610. .line {
  611. width: 20px;
  612. height: 1px;
  613. transform: rotate(0deg);
  614. opacity: 1;
  615. border: 1px solid;
  616. border-image: linear-gradient(90deg, rgba(42, 207, 240, 0) 0%, #27ceef 52%, rgba(49, 209, 240, 0) 100%);
  617. }
  618. }
  619. .divclick {
  620. background: #103357;
  621. }
  622. .hover-info {
  623. position: absolute;
  624. width: 120px;
  625. height: 30px;
  626. line-height: 30px;
  627. border-radius: 473px;
  628. opacity: 1;
  629. background: rgba(21, 50, 76, 0.7);
  630. font-family: Source Han Sans CN;
  631. font-size: 14px;
  632. font-weight: 500;
  633. text-align: center;
  634. letter-spacing: 0em;
  635. color: #ffffff;
  636. z-index: 11;
  637. }
  638. .head-span {
  639. width: 427px;
  640. height: 92px;
  641. border-radius: 8px;
  642. opacity: 1;
  643. background: rgba(21, 50, 76, 0.7);
  644. position: absolute;
  645. top: 100px;
  646. right: 50%;
  647. transform: translateX(50%);
  648. z-index: 11;
  649. padding: 6px 10px;
  650. box-sizing: border-box;
  651. }
  652. .sanjiao-box {
  653. display: inline-block;
  654. height: 20px;
  655. margin-right: 15px;
  656. margin-left: 4px;
  657. .sanjiao-btn {
  658. width: 0;
  659. height: 0;
  660. border-left: 5px solid transparent;
  661. border-right: 5px solid transparent;
  662. border-bottom: 7px solid rgba(255, 255, 255, 0.5);
  663. margin-bottom: 5px;
  664. margin-top: 5px;
  665. cursor: pointer;
  666. }
  667. .sanjiao-btn2 {
  668. width: 0;
  669. height: 0;
  670. border-left: 5px solid transparent;
  671. border-right: 5px solid transparent;
  672. border-top: 7px solid rgba(255, 255, 255, 0.5);
  673. cursor: pointer;
  674. }
  675. }
  676. :deep(.ant-input) {
  677. padding: 0;
  678. border: none;
  679. width: 70px;
  680. color: #ffffff;
  681. font-size: 16px;
  682. font-weight: bold;
  683. }
  684. :deep(.ant-time-picker) {
  685. padding: 0;
  686. border: none;
  687. width: 35px;
  688. color: #ffffff;
  689. font-size: 16px;
  690. font-weight: bold;
  691. }
  692. :deep(.ant-time-picker-input.ant-input) {
  693. width: 35px !important;
  694. }
  695. :deep(.ant-time-picker-icon) {
  696. visibility: hidden;
  697. }
  698. .class-legend {
  699. position: absolute;
  700. left: 470px;
  701. bottom: 50px;
  702. z-index: 10;
  703. box-shadow: 5px rgba(53, 53, 52, 0.5);
  704. div {
  705. min-width: 50px;
  706. height: 25px;
  707. line-height: 25px;
  708. text-align: center;
  709. color: #222;
  710. padding: 0 4px;
  711. }
  712. }
  713. .class-legendtwo {
  714. position: absolute;
  715. left: 470px;
  716. bottom: 50px;
  717. z-index: 10;
  718. box-shadow: 5px rgba(53, 53, 52, 0.5);
  719. div {
  720. min-width: 50px;
  721. height: 25px;
  722. line-height: 25px;
  723. text-align: center;
  724. color: #222;
  725. }
  726. &>div:last-child {
  727. border-radius: 0 0 25px 25px;
  728. }
  729. }
  730. </style>