xm-audit-chinamap.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. <template>
  2. <div :class="$style.mapBox">
  3. <div
  4. id="map"
  5. style="position: relative; width: 100%; height: 1200px; padding: 0; margin: 0; cursor: default; border-width: 0;"
  6. >
  7. </div>
  8. <div id="map1">
  9. <span
  10. ref="clickSpan"
  11. style="position: absolute; top: 105px; right: 90px;font-size:14px;font-weight:bold;color:#00C;text-decoration: underline; cursor: pointer;"
  12. >查看审计覆盖情况</span
  13. >
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import * as echarts from 'echarts'
  19. import axios from '@/common/services/axios-instance'
  20. import 'echarts/lib/chart/map'
  21. import 'echarts/map/js/china.js'
  22. import 'echarts/map/js/world.js'
  23. import worldjson from './new/world.json'
  24. import geoCoordMap from './world.json'
  25. import china from 'echarts/map/json/china.json'
  26. import world from 'echarts/map/json/world.json'
  27. import chinaGeoCoordMap from './chinamap.json'
  28. import MapService from './map-service.js'
  29. import components from './_import-components/xm-audit-chinamap-import'
  30. import { getUserInfo } from '@/common/store-mixin'
  31. function decodePolygon(coordinate, encodeOffsets, encodeScale) {
  32. var result = []
  33. var prevX = encodeOffsets[0]
  34. var prevY = encodeOffsets[1]
  35. for (var i = 0; i < coordinate.length; i += 2) {
  36. var x = coordinate.charCodeAt(i) - 64
  37. var y = coordinate.charCodeAt(i + 1) - 64
  38. // ZigZag decoding
  39. x = (x >> 1) ^ -(x & 1)
  40. y = (y >> 1) ^ -(y & 1)
  41. // Delta deocding
  42. x += prevX
  43. y += prevY
  44. prevX = x
  45. prevY = y
  46. // Dequantize
  47. result.push([x / encodeScale, y / encodeScale])
  48. }
  49. return result
  50. }
  51. function decode(json) {
  52. if (!json.UTF8Encoding) {
  53. return json
  54. }
  55. var encodeScale = json.UTF8Scale
  56. if (encodeScale == null) {
  57. encodeScale = 1024
  58. }
  59. var features = json.features
  60. for (var f = 0; f < features.length; f++) {
  61. var feature = features[f]
  62. var geometry = feature.geometry
  63. var coordinates = geometry.coordinates
  64. var encodeOffsets = geometry.encodeOffsets
  65. for (var c = 0; c < coordinates.length; c++) {
  66. var coordinate = coordinates[c]
  67. if (geometry.type === 'Polygon') {
  68. coordinates[c] = decodePolygon(coordinate, encodeOffsets[c], encodeScale)
  69. } else if (geometry.type === 'MultiPolygon') {
  70. for (var c2 = 0; c2 < coordinate.length; c2++) {
  71. var polygon = coordinate[c2]
  72. coordinate[c2] = decodePolygon(polygon, encodeOffsets[c][c2], encodeScale)
  73. }
  74. }
  75. }
  76. }
  77. // Has been decoded
  78. json.UTF8Encoding = false
  79. return json
  80. }
  81. function fnshowdiv(id) {
  82. console.log('---1')
  83. }
  84. function fngetcolor(content) {
  85. let color = 'green' // 审计已有1年的单位
  86. if (content === '当年已审计') {
  87. // color = 'red' // 未覆盖的单位
  88. color = 'green'
  89. } else if (content === '1年未审计') {
  90. // color = 'green' // 审计已有1年的单位
  91. color = 'blue'
  92. } else if (content === '2年未审计') {
  93. // color = 'blue' // 审计已有2年的单位
  94. color = '#EEEE00'
  95. } else if (content === '3年未审计') {
  96. // color = '#EEEE00' // 审计已有2年的单位
  97. color = '#FFA500'
  98. } else if (content === '3年及以上未审计') {
  99. color = 'red'
  100. } else if (content === '4年及以上未审计') {
  101. // color = '#FFA500' // 审计已有4年的单位
  102. color = 'red'
  103. }
  104. return color
  105. }
  106. window.fnshowdiv = fnshowdiv
  107. window.fngetcolor = fngetcolor
  108. export default {
  109. name: 'XmAuditChinamap',
  110. metaInfo: {
  111. title: '审计地图',
  112. },
  113. data() {
  114. return {
  115. dataList: [],
  116. }
  117. },
  118. mounted() {
  119. // 初始化地图
  120. this.getList()
  121. this.$refs.clickSpan.addEventListener('click', this.handleClick)
  122. },
  123. methods: {
  124. handleClick() {
  125. // 处理点击事件
  126. const now = new Date()
  127. const year = now.getFullYear()
  128. const param = {}
  129. param.type = 'gn'
  130. param.name = '境内'
  131. window.open(
  132. '#/xm-audit-mapcoverage-list?params=' +
  133. encodeURIComponent(JSON.stringify(param)) +
  134. '&year=' +
  135. year
  136. )
  137. // window.open('#/xm-audit-mapcoverage-list?type=fourYearCoverage' + '&year=' + year)
  138. },
  139. getList() {
  140. MapService.getChinaData().then((res) => {
  141. // console.log(res)
  142. this.dataList = res.data
  143. this.initEchart()
  144. })
  145. },
  146. convertData(data, type) {
  147. // debugger
  148. var res = []
  149. for (var i = 0; i < data.length; i++) {
  150. // var geoCoord = chinaGeoCoordMap[data[i].name]
  151. var geoCoord = ''
  152. var name = ''
  153. if (data[i].name) {
  154. var list = chinaGeoCoordMap
  155. for (const key in list) {
  156. if (data[i].name.indexOf(key) !== -1) {
  157. name = key
  158. geoCoord = chinaGeoCoordMap[key]
  159. break
  160. }
  161. }
  162. }
  163. if (geoCoord) {
  164. if (type === data[i].type) {
  165. res.push({
  166. // name: data[i].name,
  167. name: name,
  168. value: geoCoord.concat(data[i].value),
  169. type: geoCoord.concat(data[i].type),
  170. })
  171. }
  172. }
  173. geoCoord = geoCoordMap.mapregion[data[i].name]
  174. if (geoCoord) {
  175. if (type === data[i].type) {
  176. res.push({
  177. name: data[i].name,
  178. value: geoCoord.concat(data[i].value),
  179. type: geoCoord.concat(data[i].type),
  180. })
  181. }
  182. }
  183. }
  184. return res
  185. },
  186. // getList(sort) {
  187. // var obj = {
  188. initEchart() {
  189. const data = decode(china) // 这里调用的函数就是上面解密的函数
  190. const gj = [
  191. '北京',
  192. '上海',
  193. '四川',
  194. '黑龙江',
  195. '吉林',
  196. '辽宁',
  197. '天津',
  198. '内蒙古',
  199. '河北',
  200. '山东',
  201. '江苏',
  202. '浙江',
  203. '福建',
  204. '台湾',
  205. '香港',
  206. '广东',
  207. '澳门',
  208. '海南',
  209. '广西',
  210. '云南',
  211. '西藏',
  212. '新疆',
  213. '青海',
  214. '甘肃',
  215. '宁夏',
  216. '山西',
  217. '陕西',
  218. '河南',
  219. '安徽',
  220. '湖北',
  221. '重庆',
  222. '贵州',
  223. '湖南',
  224. '江西',
  225. '乌兰巴托',
  226. '阿斯塔纳',
  227. '塔什干',
  228. '伊斯兰堡',
  229. '蒙古',
  230. '哈萨克斯坦',
  231. '吉尔吉斯斯坦',
  232. '塔吉克斯坦',
  233. '乌兹别克斯坦',
  234. '阿富汗',
  235. '巴基斯坦',
  236. '尼泊尔',
  237. '不丹',
  238. '孟加拉国',
  239. '缅甸',
  240. '老挝',
  241. '日本',
  242. ]
  243. const regions = []
  244. const chinas = [
  245. '北京',
  246. '上海',
  247. '四川',
  248. '黑龙江',
  249. '吉林',
  250. '辽宁',
  251. '天津',
  252. '内蒙古',
  253. '河北',
  254. '山东',
  255. '江苏',
  256. '浙江',
  257. '福建',
  258. '台湾',
  259. '香港',
  260. '广东',
  261. '澳门',
  262. '海南',
  263. '广西',
  264. '云南',
  265. '西藏',
  266. '新疆',
  267. '青海',
  268. '甘肃',
  269. '宁夏',
  270. '山西',
  271. '陕西',
  272. '河南',
  273. '安徽',
  274. '湖北',
  275. '重庆',
  276. '贵州',
  277. '湖南',
  278. '江西',
  279. ]
  280. chinas.forEach((c) => {
  281. regions.push(
  282. // 这个地方是关键,通过设置regions,可以实现不同的省份边界线配置不同的颜色,
  283. {
  284. name: c, // 这个名字要和china.js保持一致
  285. itemStyle: {
  286. normal: {
  287. opacity: 1, // 透明度
  288. borderColor: '#ed2c2c',
  289. borderWidth: 1,
  290. },
  291. },
  292. }
  293. )
  294. })
  295. const worldAndChina = Object.assign({}, world) // 原本的world还需要用 所以这里用了一个深拷贝赋值世界地图数据
  296. console.log(worldAndChina.features)
  297. console.log(data.features)
  298. worldAndChina.features = worldAndChina.features.concat(data.features) // 对,就是这么简单用concat把两者的features合并起来就可以了
  299. // console.log(worldjson.features)
  300. // worldAndChina.features =worldjson.features
  301. // chart = echarts.init(this.$refs.chart)
  302. const dataList = this.dataList
  303. const _this = this
  304. var myChart = echarts.init(document.getElementById('map'))
  305. // echarts.registerMap('world', world) // 显示地图
  306. echarts.registerMap('world', worldAndChina)
  307. // echarts.registerMap('world', world)
  308. var option = {
  309. legend: {
  310. show: true,
  311. right: 20,
  312. top: 20,
  313. orient: 'vertical',
  314. // data: [
  315. // '审计覆盖情况',
  316. // '当年已审计单位',
  317. // '1年未审计单位',
  318. // '2年未审计单位',
  319. // '3年未审计单位',
  320. // '4年及以上未审计单位',
  321. // ],
  322. },
  323. tooltip: {
  324. axisPointer: {
  325. type: 'shadow',
  326. },
  327. enterable: true,
  328. backgroundColor: '#fff', // 提示浮窗背景颜色
  329. borderColor: 'rgba(0, 0, 0, 0.16);',
  330. borderWidth: 1,
  331. extraCssText: 'width:400px',
  332. // alwaysShowContent: true, // 永远显示
  333. confine: false,
  334. position: 'right',
  335. // 数据格式化
  336. formatter: function(params, callback) {
  337. var result = ''
  338. if (params.data) {
  339. //
  340. result += `<div><div style="width:15px;" id='pic' class="chinamappictp"></div><div><span style="color:#000;font-size:20px;font-weight:bold;margin:0 2px;margin-bottom:10px;">${params.data.name}</span><span style="float:right;color:#000;font-size:20px;margin-right:2px;margin-left:10px;">${params.value[2].year}</span></div>`
  341. for (var i = 0; i < params.value[2].datas.length; i++) {
  342. let title = params.value[2].datas[i].name
  343. if (title.length > 10) {
  344. title = title.substring(0, 10) + '...'
  345. }
  346. result += `<div style="margin: 0 2px;" class="mapdivchina"><span style="color:gray" title="${params.value[2].datas[i].name}">${title}</span>`
  347. const color = fngetcolor(params.value[2].datas[i].level)
  348. result += `<span style="float:right;color:${color};margin-right:2px;margin-left:10px;">${params.value[2].datas[i].level}`
  349. if (params.value[2].datas[i].dataList) {
  350. result += ` <i class="qrm-arrow-right" onclick="fnshowdiv('${params.value[2]
  351. .datas[i].name +
  352. '_' +
  353. i.toString()}')" ></i>`
  354. }
  355. result += `</span>`
  356. if (params.value[2].datas[i].dataList) {
  357. result += `<div id="mapdiv_${params.value[2].datas[i].name +
  358. '_' +
  359. i.toString()}" class="mapdivchinazitem" > `
  360. for (var j = 0; j < params.value[2].datas[i].dataList.length; j++) {
  361. const item = params.value[2].datas[i].dataList[j]
  362. let ztitle = item.name
  363. if (ztitle.length > 10) {
  364. ztitle = ztitle.substring(0, 10) + '...'
  365. }
  366. result += `<div style="margin: 0 2px;"><span style="color:gray" title="${item.name}">${ztitle}</span>`
  367. const itemcolor = fngetcolor(item.level)
  368. result += `<span style="float:right;color:${itemcolor};margin-right:2px;margin-left:10px;">${item.level}`
  369. result += `</span></div>`
  370. }
  371. result += ` </div>`
  372. }
  373. result += `</div>`
  374. }
  375. result += `</div> `
  376. }
  377. return result
  378. },
  379. },
  380. nameMap: geoCoordMap.nameMap,
  381. visualMap: {
  382. type: 'piecewise',
  383. inRange: { color: ['#02F6F9', '#02F6F9', '#02F6F9'] },
  384. pieces: [
  385. { min: 0, max: 1000000, color: 'red' },
  386. {
  387. min: 1000000,
  388. max: 50000000,
  389. color: {
  390. type: 'radial',
  391. x: 0.5,
  392. y: 0.5,
  393. r: 0.5,
  394. colorStops: [
  395. { offset: 0, color: 'rgba(11,28,92,0)' },
  396. { offset: 0.9, color: 'rgba(10,94,137, 0.5)' },
  397. { offset: 1, color: 'rgba(2, 246, 249, 1)' },
  398. ],
  399. globalCoord: false, // 缺省为 false
  400. },
  401. },
  402. ],
  403. show: false,
  404. textStyle: {
  405. color: '#ffffff',
  406. fontSize: 16,
  407. },
  408. },
  409. geo: {
  410. map: 'world',
  411. silent: true,
  412. animationDurationUpdate: 0,
  413. roam: true,
  414. zoom: 5,
  415. label: {
  416. normal: {
  417. show: true, // 是否显示对应地名
  418. textStyle: {
  419. color: '#1a1112',
  420. },
  421. formatter: function(params) {
  422. if (gj.find((i) => i === params.name)) {
  423. return params.name
  424. } else {
  425. return ''
  426. }
  427. },
  428. },
  429. emphasis: {
  430. // 对应的鼠标悬浮效果
  431. show: false,
  432. textStyle: {
  433. color: '#1a1112',
  434. },
  435. },
  436. },
  437. itemStyle: {
  438. normal: {
  439. color: ['#f7f7f7'], // 地图背景色
  440. borderWidth: 1,
  441. borderColor: '#bbbbbb', // 省市边界线
  442. },
  443. // emphasis: {
  444. // color: ['#f7f7f7'], // 地图背景色
  445. // borderColor: '#bbbbbb', // 省市边界线
  446. // },
  447. },
  448. regions: regions,
  449. center: [104.948024, 26.263161],
  450. },
  451. backgroundColor: 'rgb(179,205,253)',
  452. series: [
  453. {
  454. name: '当年已审计单位',
  455. type: 'effectScatter',
  456. coordinateSystem: 'geo',
  457. data: this.convertData(dataList, 0),
  458. symbol: 'circle',
  459. symbolSize: 8,
  460. encode: {
  461. value: 2,
  462. },
  463. showEffectOn: 'render',
  464. rippleEffect: {
  465. brushType: 'stroke',
  466. },
  467. hoverAnimation: true,
  468. label: {
  469. formatter: '{b}',
  470. position: 'right',
  471. show: false,
  472. },
  473. itemStyle: {
  474. // color: 'red',
  475. color: 'green',
  476. shadowBlur: 40,
  477. },
  478. tooltip: {
  479. // 提示框样式
  480. backgroundColor: '#fff', // 提示浮窗背景颜色
  481. borderColor: 'rgba(0, 0, 0, 0.16);',
  482. borderWidth: 1,
  483. extraCssText: 'width:400px;box-shadow: 0 0 5px #008aff;',
  484. },
  485. },
  486. {
  487. name: '1年未审计单位',
  488. type: 'effectScatter',
  489. coordinateSystem: 'geo',
  490. data: this.convertData(dataList, 1),
  491. symbolSize: function(val) {
  492. return 8
  493. },
  494. encode: {
  495. value: 2,
  496. },
  497. showEffectOn: 'render',
  498. rippleEffect: {
  499. brushType: 'stroke',
  500. },
  501. hoverAnimation: true,
  502. label: {
  503. formatter: '{b}',
  504. position: 'right',
  505. show: false,
  506. },
  507. itemStyle: {
  508. // color: 'green',
  509. color: 'blue',
  510. shadowBlur: 20,
  511. },
  512. tooltip: {
  513. // 提示框样式
  514. backgroundColor: '#fff', // 提示浮窗背景颜色
  515. borderColor: 'rgba(0, 0, 0, 0.16);',
  516. borderWidth: 1,
  517. extraCssText: 'width:400px;box-shadow: 0 0 5px #008aff;',
  518. },
  519. },
  520. {
  521. name: '2年未审计单位',
  522. type: 'effectScatter',
  523. coordinateSystem: 'geo',
  524. data: this.convertData(dataList, 2),
  525. symbolSize: function(val) {
  526. return 8
  527. },
  528. encode: {
  529. value: 2,
  530. },
  531. showEffectOn: 'render',
  532. rippleEffect: {
  533. brushType: 'stroke',
  534. },
  535. hoverAnimation: true,
  536. label: {
  537. formatter: '{b}',
  538. position: 'right',
  539. show: false,
  540. },
  541. itemStyle: {
  542. // color: 'blue',
  543. color: '#EEEE00',
  544. shadowBlur: 20,
  545. },
  546. tooltip: {
  547. // 提示框样式
  548. backgroundColor: '#fff', // 提示浮窗背景颜色
  549. borderColor: 'rgba(0, 0, 0, 0.16);',
  550. borderWidth: 1,
  551. extraCssText: 'width:400px;box-shadow: 0 0 5px #008aff;',
  552. },
  553. },
  554. ],
  555. }
  556. const threeYears = {
  557. name: '3年未审计单位',
  558. type: 'effectScatter',
  559. coordinateSystem: 'geo',
  560. data: this.convertData(dataList, 3),
  561. symbolSize: function(val) {
  562. return 8
  563. },
  564. encode: {
  565. value: 2,
  566. },
  567. showEffectOn: 'render',
  568. rippleEffect: {
  569. brushType: 'stroke',
  570. },
  571. hoverAnimation: true,
  572. label: {
  573. formatter: '{b}',
  574. position: 'right',
  575. show: false,
  576. },
  577. itemStyle: {
  578. // color: '#EEEE00',
  579. color: '#FFA500',
  580. shadowBlur: 20,
  581. },
  582. tooltip: {
  583. // 提示框样式
  584. backgroundColor: '#fff', // 提示浮窗背景颜色
  585. borderColor: 'rgba(0, 0, 0, 0.16);',
  586. borderWidth: 1,
  587. extraCssText: 'width:400px;box-shadow: 0 0 5px #008aff;',
  588. },
  589. }
  590. const threeYearsOrMore = {
  591. name: '3年及以上未审计单位',
  592. type: 'effectScatter',
  593. coordinateSystem: 'geo',
  594. data: [...this.convertData(dataList, 5),...this.convertData(dataList, 10)],
  595. symbolSize: function(val) {
  596. return 8
  597. },
  598. encode: {
  599. value: 2,
  600. },
  601. showEffectOn: 'render',
  602. rippleEffect: {
  603. brushType: 'stroke',
  604. },
  605. hoverAnimation: true,
  606. label: {
  607. formatter: '{b}',
  608. position: 'right',
  609. show: false,
  610. },
  611. itemStyle: {
  612. // color: '#FFA500',
  613. color: 'red',
  614. shadowBlur: 20,
  615. },
  616. tooltip: {
  617. // 提示框样式
  618. backgroundColor: '#fff', // 提示浮窗背景颜色
  619. borderColor: 'rgba(0, 0, 0, 0.16);',
  620. borderWidth: 1,
  621. extraCssText: 'width:400px;box-shadow: 0 0 5px #008aff;',
  622. },
  623. }
  624. const fourYearsOrMore = {
  625. // name: '4年未审计单位',
  626. name: '4年及以上未审计单位',
  627. type: 'effectScatter',
  628. coordinateSystem: 'geo',
  629. data: this.convertData(dataList, 4),
  630. symbolSize: function(val) {
  631. return 8
  632. },
  633. encode: {
  634. value: 2,
  635. },
  636. showEffectOn: 'render',
  637. rippleEffect: {
  638. brushType: 'stroke',
  639. },
  640. hoverAnimation: true,
  641. label: {
  642. formatter: '{b}',
  643. position: 'right',
  644. show: false,
  645. },
  646. itemStyle: {
  647. // color: '#FFA500',
  648. color: 'red',
  649. shadowBlur: 20,
  650. },
  651. tooltip: {
  652. // 提示框样式
  653. backgroundColor: '#fff', // 提示浮窗背景颜色
  654. borderColor: 'rgba(0, 0, 0, 0.16);',
  655. borderWidth: 1,
  656. extraCssText: 'width:400px;box-shadow: 0 0 5px #008aff;',
  657. },
  658. }
  659. const companyName = JSON.parse(getUserInfo().attrs.deptLevMap).COMPANY
  660. if (companyName) {
  661. if (companyName === '国家电力投资集团有限公司总部') {
  662. option.series.push(threeYears)
  663. option.series.push(fourYearsOrMore)
  664. } else {
  665. option.series.push(threeYearsOrMore)
  666. }
  667. } else {
  668. option.series.push(threeYears)
  669. option.series.push(threeYearsOrMore)
  670. option.series.push(fourYearsOrMore)
  671. }
  672. myChart.setOption(option)
  673. // myChart.on('click', function(params) {
  674. // console.log('-------------dianjishijianchufa', params)
  675. // const now = new Date()
  676. // const year = now.getFullYear()
  677. // window.open('#/xm-audit-mapcoverage-list?type=fourYearCoverage' + '&year=' + year)
  678. // })
  679. // 设置点击事件
  680. // myChart.on('legendselectchanged', function(params) {
  681. // // 获取用户点击的图例名称
  682. // var legendName = params.name
  683. // // 根据不同的图例名称进行页面跳转
  684. // if (legendName === '审计覆盖情况') {
  685. // const now = new Date()
  686. // const year = now.getFullYear()
  687. // window.open('#/xm-audit-mapcoverage-list?type=fourYearCoverage' + '&year=' + year)
  688. // }
  689. // })
  690. // const chart = echarts.init(document.getElementById('map'))
  691. // chart.on('georoam', function(params) {
  692. // var option = chart.getOption() // 获得option对象
  693. // if (params.zoom !== null && params.zoom !== undefined) {
  694. // // 捕捉到缩放时
  695. // option.geo[0].zoom = option.series[0].zoom // 下层geo的缩放等级跟着上层的geo一起改变
  696. // option.geo[0].center = option.series[0].center // 下层的geo的中心位置随着上层geo一起改变
  697. // } else {
  698. // // 捕捉到拖曳时
  699. // option.geo[0].center = option.series[0].center // 下层的geo的中心位置随着上层geo一起改变
  700. // }
  701. // chart.setOption(option) // 设置option
  702. // })
  703. },
  704. },
  705. }
  706. </script>
  707. <style module lang="scss">
  708. @use '@/common/design' as *;
  709. .mapBox {
  710. height: 100%;
  711. // position: relative;
  712. margin-top: 20px;
  713. background: #b3cefd;
  714. }
  715. .mapTableBox {
  716. position: absolute;
  717. right: 10px;
  718. bottom: 10px;
  719. width: 420px;
  720. padding: 10px;
  721. border: 1px solid #02f6f9;
  722. border-radius: 5px;
  723. box-shadow: 0 0 10px 5px #02f6f9;
  724. }
  725. .sort {
  726. float: right;
  727. margin-bottom: 10px;
  728. }
  729. .mapTableBox thead {
  730. color: #fff !important;
  731. }
  732. .mapTableBox .el-table {
  733. color: #fff !important;
  734. background-color: transparent !important;
  735. }
  736. .mapTableBox .el-table__header-wrapper th {
  737. background-color: rgba(2, 77, 186, 1) !important;
  738. }
  739. .mapTableBox tbody tr {
  740. background-color: #091e64 !important;
  741. }
  742. .mapTableBox .el-table__row--striped td {
  743. background-color: rgba(2, 77, 186, 1) !important;
  744. }
  745. .mapTableBox .el-table th.is-leaf,
  746. .mapTableBox .el-table td {
  747. border: none !important;
  748. }
  749. .mapTableBox .el-table::before {
  750. display: none !important;
  751. }
  752. .mapTableBox .el-table--enable-row-hover .el-table__body tr:hover > td {
  753. background-color: #091e64;
  754. }
  755. .mapTableBox .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  756. background-color: rgba(2, 77, 186, 1) !important;
  757. border-color: rgba(2, 77, 186, 1) !important;
  758. box-shadow: -1px 0 0 0 rgba(2, 77, 186, 1) !important;
  759. box-shadow: -1px 0 0 0 rgba(2, 77, 186, 1) !important;
  760. }
  761. :global .chinamappictp {
  762. top: 0;
  763. float: left;
  764. width: 20px !important;
  765. height: 20px !important;
  766. background-color: initial !important;
  767. background-image: url('./dtb.png');
  768. background-repeat: no-repeat;
  769. background-position-x: center;
  770. background-position-y: center;
  771. background-size: 100%;
  772. border: none !important;
  773. }
  774. :global .qrm-arrow-right {
  775. // position: absolute;
  776. // top: 14px;
  777. // right: 7px;
  778. display: inline-block;
  779. width: 8px;
  780. height: 10px;
  781. background: url('./right.png') no-repeat;
  782. background-color: initial !important;
  783. background-position-x: center;
  784. background-position-y: center;
  785. background-size: 100%;
  786. }
  787. :global .mapdivchina span {
  788. height: 30px;
  789. font-size: 18px;
  790. line-height: 30px;
  791. }
  792. :global .mapdivchinazitem span {
  793. height: 30px;
  794. font-size: 18px;
  795. line-height: 30px;
  796. }
  797. :global .mapdivchinazitem {
  798. position: absolute;
  799. left: 400px;
  800. display: none;
  801. width: 400px;
  802. background-color: #fff;
  803. border: 1px solid rgba(0, 0, 0, 0.16);
  804. box-shadow: rgb(0, 138, 255) 0 0 5px;
  805. }
  806. :global .mapdivchina:hover {
  807. // width: auto;
  808. .mapdivchinazitem {
  809. display: inline;
  810. }
  811. }
  812. </style>