index.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092
  1. <template>
  2. <vl-map
  3. class-name="overview-map"
  4. :map.sync="map"
  5. projection="EPSG:4490"
  6. @loaded="mapLoaded"
  7. >
  8. <vl-china-cities :enabled="false" @pick="(fea) => (feature = fea)" />
  9. <vl-map-dev-info
  10. :top="140"
  11. :show-panel="false"
  12. @info-update="(v) => (viewInfo = v)"
  13. />
  14. <vl-config-layers
  15. ref="configLayer"
  16. :layers-config="layersConfig"
  17. :visible-layer-ids="realLayers"
  18. @loaded="configLayerLoaded"
  19. />
  20. <vl-tool-bar :height="34" :radius="4">
  21. <vl-tool-bar-item
  22. no-padding
  23. class="tool-box"
  24. style="width: 110px !important;color: #FFF"
  25. >
  26. <vl-tool-box
  27. ref="toolBox"
  28. :enable-scope-sketch="false"
  29. @drawend="drawend"
  30. style="width: 110px"
  31. />
  32. </vl-tool-bar-item>
  33. <vl-tool-bar-item
  34. no-padding
  35. style="margin-left: 10px;"
  36. v-show="layerShow"
  37. title="图层"
  38. >
  39. <vl-layer-tree :enabled-layers="enabledLayersConfig" />
  40. </vl-tool-bar-item>
  41. </vl-tool-bar>
  42. <VlImglayers
  43. :imgLayers="imgLayers"
  44. @change="vlImgLayerChangeHandle"
  45. @change1="vlImgLayerChangeHandle1"
  46. @sliderChange="vlImgLayerSliderChangeHandle"
  47. @sliderChange1="vlImgLayerSliderChangeHandle1"
  48. >
  49. </VlImglayers>
  50. <vl-feature-flicker
  51. :feature="feature"
  52. new-layer
  53. :duration="2400"
  54. :interval="800"
  55. />
  56. <!-- 详情 -->
  57. </vl-map>
  58. </template>
  59. <script>
  60. import { mapGetters, mapState } from 'vuex';
  61. import MapUtils from '@/utils/MapUtils';
  62. import olMapUtils from '@/utils/OlMapUtils';
  63. import 'ol/ol.css';
  64. import DragPan from 'ol/interaction/DragPan';
  65. import VlMap from '@/components/ol/VlMap';
  66. import { getMapLayerConfig } from '@/components/ol/_utils/map-layer-utils';
  67. import { VlConfigLayers, VlLayerTree } from '@/components/ol/VlConfigLayers';
  68. import { VlToolBar, VlToolBarItem } from '@/components/ol/VlToolBar';
  69. import {
  70. VlFeatureFlicker,
  71. VlFeatureOverlay,
  72. } from '@/components/ol/VlFeatureTool';
  73. import VlImglayers from '@/components/ol/VLImgLayers';
  74. import { arcgisQuery } from '@/utils/arcgis-map-server-query';
  75. import { GeoServerQuery } from '@/utils/geo-map-server-query'
  76. import VlMapDevInfo from '@/components/ol/VlMapDevInfo';
  77. import VlChinaCities from '@/components/ol/VlChinaCities';
  78. import { MultiPolygon, Point } from 'ol/geom';
  79. import { getSrid, mapFit, toArcGIS } from '@/utils/arcgis-utils';
  80. import { Stroke, Style } from 'ol/style';
  81. import { Vector as VectorSource } from 'ol/source';
  82. import { Vector as VectorLayer } from 'ol/layer';
  83. import EChartsLayer from 'ol-echarts';
  84. import { XZQ } from '@/utils/constant/Constant.js';
  85. import { scatter_bg4, bg_text } from './base64Img.js';
  86. import { Geometry as WkxGeometry } from 'wkx';
  87. import { GeoJSON } from 'ol/format';
  88. import { convertRingsToGeoJSON } from '@/utils/ArcGISGeoJSONConvertTool.js';
  89. import { Fill, Text, Icon } from 'ol/style';
  90. import VlToolBox from '@/components/ol/VlToolBox';
  91. import TABLE_COMP_MAPPING from './TABLE_COMP_MAPPING.js';
  92. import { getArea } from 'ol/sphere';
  93. import TdytMapping from '@/mock/TdytMapping.js';
  94. import HeatmapLayer from 'ol/layer/Heatmap';
  95. import hotJson from '@/assets/geoJson/GYYDPT4490.json';
  96. import { Feature } from 'ol';
  97. export default {
  98. name: 'BigScreenMap',
  99. computed: {
  100. ...mapState({
  101. xzqNameState: (state) => state.BaseData.xzqState,
  102. mapDataOne: (state) => state.BaseData.TDG,
  103. }),
  104. ...mapGetters({
  105. xzqdm: 'BaseData/xzqCodeGetter',
  106. }),
  107. },
  108. components: {
  109. VlFeatureOverlay,
  110. VlChinaCities,
  111. VlMapDevInfo,
  112. VlLayerTree,
  113. VlFeatureFlicker,
  114. VlToolBarItem,
  115. VlToolBar,
  116. VlConfigLayers,
  117. VlMap,
  118. VlToolBox,
  119. VlImglayers,
  120. },
  121. filters: {},
  122. props: {
  123. districtCode: {
  124. type: String,
  125. default: '33',
  126. },
  127. imgLayers: Array,
  128. title: {
  129. type: String,
  130. default: '',
  131. },
  132. visibleLayerIds: {
  133. type: Array,
  134. default: () => [],
  135. },
  136. overlayShow: {
  137. type: Boolean,
  138. default: false,
  139. },
  140. layerShow: {
  141. type: Boolean,
  142. default: false,
  143. },
  144. defaultLayerId: {
  145. type: String,
  146. default: '',
  147. },
  148. fixed: {
  149. type: Number,
  150. default: 0,
  151. },
  152. GZData: {
  153. type: Array,
  154. default() {
  155. return [];
  156. },
  157. },
  158. legendShow: {
  159. type: Boolean,
  160. default: true,
  161. },
  162. defaultExpand: {
  163. type: Boolean,
  164. default: true,
  165. },
  166. townShow: {
  167. type: Boolean,
  168. default: true,
  169. },
  170. },
  171. data() {
  172. return {
  173. mapPointList: [],
  174. pointLayerSource: null,
  175. pointLayer: null, // 绘制地图中心点的图层
  176. map: undefined,
  177. mapDragPan: null,
  178. visibleLayerId: '',
  179. detailData: {},
  180. detailType: 1,
  181. layerFeatureKey: undefined,
  182. viewInfo: {
  183. x: 120,
  184. y: 30,
  185. center: [0, 0],
  186. zoom: 0,
  187. extent: [0, 0, 0, 0],
  188. scale: 1,
  189. },
  190. layersConfig: getMapLayerConfig(), // getMapLayerConfig 获取的是 config.js 配置的克隆
  191. enabledLayersConfig: [], // 启用的图层配置,来源于 vl-config-layers 的loaded事件回调
  192. feature: undefined, // 闪烁和气泡的 特征
  193. districtFeature: undefined, // 行政区的特征
  194. showDetail: false,
  195. echartslayer: null,
  196. showLifeCircle: false,
  197. xzqType: 'city',
  198. xzqName: '',
  199. realLayers: [],
  200. lifeCycleShow: false,
  201. vectorGeo: null,
  202. vmEventType: '',
  203. tdytMapping: {
  204. 1: '工业用地',
  205. 2: '商服用地',
  206. 3: '住宅用地',
  207. 4: '其他用地',
  208. },
  209. isIconBool: false,
  210. isShowIcon: false,
  211. echartsLayerClickHandle: null,
  212. layerIndex: '0', //图层级别默认为0
  213. heatMapLayer: null,
  214. tzzxShow: false,
  215. geoSource: new VectorSource(),
  216. geoLayer: undefined,
  217. isgyyd: '',
  218. kgLayer: null,
  219. };
  220. },
  221. watch: {
  222. GZData: {
  223. immediate: true,
  224. deep: true,
  225. handler: function() {
  226. // 迁徙图图层初始化
  227. this.echartsLayerLoad();
  228. },
  229. },
  230. visibleLayerIds: {
  231. immediate: true,
  232. deep: true,
  233. handler() {
  234. this.visibleLayerId = this.visibleLayerIds[0];
  235. },
  236. },
  237. },
  238. mounted() {
  239. setTimeout(() => {
  240. this.map.getView().setCenter([120.1748818095, 30.12907927]);
  241. }, 1000);
  242. this.$vm.$on('setLayerIndexEvent', (index) => {
  243. this.layerIndex = index;
  244. });
  245. let _initZoom = 8;
  246. const _clientW = document.documentElement.clientWidth;
  247. if (parseInt(_clientW) > 2000) {
  248. setTimeout(() => {
  249. _initZoom = 8.5;
  250. this.map.getView().setZoom(_initZoom);
  251. }, 200);
  252. }
  253. this.$vm.$on('updateLayer', (payload) => {
  254. const { id, param, layerIdx1, layerIdx2 } = payload;
  255. let params = {};
  256. if (layerIdx2 != null) {
  257. params = {
  258. layers: `show:${layerIdx1},${layerIdx2}`,
  259. layerDefs: {
  260. [layerIdx1]: param,
  261. [layerIdx2]: param,
  262. },
  263. };
  264. } else {
  265. params = {
  266. layers: `show:${layerIdx1}`,
  267. layerDefs: {
  268. [layerIdx1]: param,
  269. },
  270. };
  271. }
  272. let layer = this.getLayerById(id);
  273. layer.setVisible(true);
  274. const source = layer.getSource();
  275. source.updateParams(params);
  276. });
  277. this.$vm.$on('refreshLayer', (id) => {
  278. this.feature = null;
  279. if (id) {
  280. let layer = this.getLayerById(id);
  281. layer.setVisible(true);
  282. const source = layer.getSource();
  283. source.refresh();
  284. }
  285. });
  286. this.$vm.$on('setTzzxShow', (payload) => {
  287. this.tzzxShow = payload;
  288. });
  289. this.$vm.$on('setEchartsLayerClickHandle', (handle) => {
  290. this.echartsLayerClickHandle = handle;
  291. });
  292. this.$vm.$on('getGdDetailData', (payload) => {
  293. this.detailData = payload;
  294. });
  295. this.$vm.$on('setGdDetailType', (payload) => {
  296. this.detailType = payload;
  297. });
  298. this.$vm.$on('location-init', () => {
  299. this.feature = null;
  300. this.$vm.$emit('switchLayerShow', true);
  301. if (this.xzqNameState != '' && this.xzqNameState != '浙江省') {
  302. this.locationMaskFeatureHttp(this.xzqNameState, this.visibleLayerId);
  303. } else {
  304. setTimeout(() => {
  305. if (this.map) {
  306. if (window.vtLayer) {
  307. this.map.removeLayer(window.vtLayer);
  308. }
  309. this.map
  310. .getView()
  311. .setCenter([120.45690944408925, 29.248390754380974]);
  312. this.map.getView().setZoom(7.85);
  313. }
  314. }, 0);
  315. }
  316. });
  317. //改变图层显示
  318. this.$vm.$on('change-layer', () => {
  319. this.feature = null;
  320. this.removeHotLayer();
  321. this.$vm.$emit('switchLayerShow', true);
  322. });
  323. this.$vm.$on('clear-layer', () => {
  324. if (this.vectorGeo != null) {
  325. this.vectorGeo.getSource().clear();
  326. this.vectorGeo = null;
  327. }
  328. });
  329. this.$vm.$on('setLayerIdEvent', (name) => {
  330. if (!name) {
  331. this.visibleLayerId = this.visibleLayerIds[
  332. this.visibleLayerIds.length - 1
  333. ];
  334. } else {
  335. this.visibleLayerId = name;
  336. }
  337. });
  338. this.$vm.$on('location-feature', (payload) => {
  339. //根据dzjgh进行图斑定位
  340. const { dzjgh } = payload;
  341. this.locationFeatureHttp(dzjgh, this.visibleLayerId);
  342. });
  343. this.$vm.$on('location-feature-where', (payload) => {
  344. //根据dzjgh进行图斑定位
  345. const { layerId, where, setting = {}, isFit = false } = payload;
  346. this.locationFeatureWhere(layerId, where, setting);
  347. });
  348. this.$vm.$on('addPoint', (city) => {
  349. //根据dzjgh进行图斑定位
  350. this.addPoints(city);
  351. });
  352. this.$vm.$on('location-more-feature-where', (payload) => {
  353. //根据dzjgh进行图斑定位
  354. const { layerId, where, setting = {} } = payload;
  355. this.locationMoreFeatureWhere(layerId, where, setting);
  356. });
  357. this.$vm.$on('location-mask-feature', (payload) => {
  358. //根据dzjgh进行图斑定位
  359. const { dzjgh } = payload;
  360. this.locationMaskFeatureHttp(dzjgh, this.visibleLayerId);
  361. });
  362. this.$vm.$on('location-mask-self-where', (payload) => {
  363. //根据dzjgh进行图斑定位
  364. const { layerId, where } = payload;
  365. this.locationMaskFeatureWhere(layerId, where);
  366. });
  367. this.$vm.$on('showIconEvent', (name, type) => {
  368. if (!this.isIconBool) return;
  369. let id = '';
  370. switch (name) {
  371. case '已批未征':
  372. id = 'pewg-ypwz';
  373. break;
  374. case '规划调整':
  375. id = 'pewg-ghtz';
  376. break;
  377. case '项目未落实':
  378. id = 'pewg-xmwls';
  379. break;
  380. case '手续未完善':
  381. id = 'pewg-sxwws';
  382. break;
  383. case '储备土地':
  384. id = 'pewg-zbtd';
  385. break;
  386. case '供地前期工作':
  387. id = 'pewg-gdqqgz';
  388. break;
  389. case '零星难利用':
  390. id = 'pewg-lxnly';
  391. break;
  392. case '农转用无法调整':
  393. id = 'pewg-nzywftz';
  394. break;
  395. case '其他原因':
  396. id = 'pewg-qtyy';
  397. break;
  398. case '待认定':
  399. id = 'pewg-drd';
  400. break;
  401. }
  402. this.$vm.$emit('setLandMapLayerContro', { type: type, id: id });
  403. });
  404. //根据图层ID显示响应图层
  405. this.$vm.$on('setLandMapLayerContro', (payload) => {
  406. const { parentId, type, id } = payload;
  407. const landMapLayers = this.enabledLayersConfig[1]['children'];
  408. if (parentId) {
  409. for (let i = 0; i < landMapLayers.length; i++) {
  410. if (landMapLayers[i]['id'] === parentId) {
  411. landMapLayers[i]['visible'] = true;
  412. break;
  413. }
  414. }
  415. }
  416. if (id) {
  417. for (let i = 0; i < landMapLayers.length; i++) {
  418. if (landMapLayers[i]['id'] === id) {
  419. setTimeout(() => {
  420. landMapLayers[i]['visible'] = type == 'hide' ? false : true;
  421. }, 1000);
  422. break;
  423. }
  424. }
  425. }
  426. });
  427. this.$vm.$on('switchLayerShow', (boolean) => {
  428. if (boolean) {
  429. this.feature = null;
  430. this.visibleLayerId = this.visibleLayerIds[0];
  431. this.realLayers = JSON.parse(JSON.stringify(this.visibleLayerIds));
  432. } else {
  433. this.realLayers = [];
  434. }
  435. });
  436. this.$vm.$on('GlobalStatisticsLayer', (payload) => {
  437. let { layerId, setting } = payload;
  438. this.statisticsLayer(layerId, setting);
  439. });
  440. },
  441. beforeDestroy() {
  442. // 修复 页面大小改变时 echartslayer 未销毁
  443. this.echartslayer && this.echartslayer.remove();
  444. },
  445. methods: {
  446. addPoints(city) {
  447. // 地理坐标数组
  448. if (this.pointLayer) {
  449. this.mapPointList = [];
  450. this.map.removeLayer(this.pointLayer);
  451. this.pointLayer = null;
  452. }
  453. const pointData = [city];
  454. pointData.map((item) => {
  455. // 创建点
  456. const point = new Feature({
  457. geometry: new Point([item.longitude, item.latitude]),
  458. data: item,
  459. });
  460. // 点的样式
  461. const iconStyle = new Style({
  462. image: new Icon({
  463. color: '#ffffff',
  464. crossOrigin: 'anonymous',
  465. src: require('../../../assets/images/webview/dian.png'), // 图片url,
  466. }),
  467. });
  468. // 设置样式
  469. point.setStyle(iconStyle);
  470. this.mapPointList.push(point);
  471. });
  472. // 创建geojson据源
  473. this.pointLayerSource = new VectorSource({ features: this.mapPointList });
  474. // 创建图层 并加载数据
  475. this.pointLayer = new VectorLayer({ source: this.pointLayerSource });
  476. // 将图层添加地图上
  477. this.pointLayer.setZIndex(1003);
  478. this.map.addLayer(this.pointLayer);
  479. },
  480. initHotLayer(field) {
  481. this.heatMapLayer = new HeatmapLayer({
  482. source: new VectorSource({
  483. features: new GeoJSON().readFeatures(hotJson),
  484. // 我们使用json数据
  485. // url: require('@/assets/geojson/dxccHotlayer.json'),
  486. // format: new GeoJSON()
  487. }),
  488. // 这里可以根据自己项目的实际,绑定页面的控件动态调整
  489. blur: 8,
  490. radius: 6,
  491. weight: weightFunction,
  492. });
  493. /*
  494. *设置权重
  495. */
  496. function weightFunction(feature) {
  497. var weight = feature.get(field);
  498. weight = parseFloat(weight);
  499. // weight = parseFloat(weight) / 10;
  500. return weight;
  501. }
  502. // this.heatMapLayer.getSource().on('addfeature', function(event) {
  503. //
  504. // //var place = event.feature.get('place');
  505. // var magnitude = event.feature.get('mjss');
  506. // //设定权重减去的数字是为了过滤地震等级,比如只想显示3级以上地震,那就减去3
  507. // event.feature.set('weight', magnitude);
  508. // });
  509. this.heatMapLayer.setZIndex(999);
  510. this.map.addLayer(this.heatMapLayer);
  511. },
  512. vlImgLayerChangeHandle(val) {
  513. this.visibleLayerId = 'bj-kgdk';
  514. const layer = this.$refs.configLayer.getLayerConfigById(
  515. this.visibleLayerId,
  516. );
  517. layer.enabled = true;
  518. layer.visible = val;
  519. if (!val) {
  520. this.visibleLayerId = this.visibleLayerIds[0];
  521. }
  522. },
  523. vlImgLayerChangeHandle1(val) {
  524. this.visibleLayerId = 'bjq-gd';
  525. const layer = this.$refs.configLayer.getLayerConfigById(
  526. this.visibleLayerId,
  527. );
  528. layer.enabled = true;
  529. layer.visible = val;
  530. if (!val) {
  531. this.visibleLayerId = this.visibleLayerIds[0];
  532. }
  533. },
  534. vlImgLayerSliderChangeHandle(val) {
  535. this.visibleLayerId = 'bj-kgdk';
  536. const layer = this.$refs.configLayer.getLayerConfigById(
  537. this.visibleLayerId,
  538. );
  539. layer.opacity = val / 100;
  540. },
  541. vlImgLayerSliderChangeHandle1(val) {
  542. this.visibleLayerId = 'bjq-gd';
  543. const layer = this.$refs.configLayer.getLayerConfigById(
  544. this.visibleLayerId,
  545. );
  546. layer.opacity = val / 100;
  547. },
  548. removeHotLayer() {
  549. this.map.removeLayer(this.heatMapLayer);
  550. this.heatMapLayer = null;
  551. },
  552. clearGeoLayer() {
  553. if (this.geoLayer && this.geoSource) {
  554. this.geoSource.clear();
  555. this.map.removeLayer(this.geoLayer);
  556. }
  557. },
  558. addGeoLayer(geoJson) {
  559. if (this.geoLayer && this.geoSource) {
  560. this.geoSource.clear();
  561. this.map.removeLayer(this.geoLayer);
  562. }
  563. this.geoSource.addFeatures(new GeoJSON().readFeatures(geoJson));
  564. this.geoLayer = new VectorLayer({
  565. source: this.geoSource,
  566. style: function(feature) {
  567. return new Style({
  568. stroke: new Stroke({
  569. width: 1,
  570. color: 'rgba(255, 255, 255, 1)',
  571. }),
  572. fill: new Fill({
  573. color: feature.get('color'),
  574. }),
  575. // text: new Text(({
  576. // // 位置
  577. // textAlign: 'center',
  578. // // 基准线
  579. // textBaseline: 'middle',
  580. // // 文字样式
  581. // font: 'bold 16px 微软雅黑',
  582. // // 文本内容
  583. // text: feature.get('name')+'\n'+feature.get('value')+' '+feature.get('unit'),
  584. // // 文字颜色
  585. // fill: new Fill({ color: '#FFF' }),
  586. // // fill: new Fill({ color: feature.get('color') }),
  587. // // 文字背景
  588. // // stroke: new Stroke({ color: '#ffcc33', width: 10 })
  589. // }))
  590. });
  591. },
  592. zIndex: 99,
  593. });
  594. this.map.addLayer(this.geoLayer);
  595. // this.map.getView().fit(this.geoLayer.getSource().getExtent(), { duration: 500 })
  596. // let selectClick = new interaction.Select();
  597. // this.map.addInteraction(selectClick);
  598. // selectClick.on('select', (e)=>{
  599. // var features=e.target.getFeatures().getArray();
  600. // this.$emit('mapSelect',features[0].getProperties())
  601. // })
  602. return this.geoLayer;
  603. // this.geoLayer.setMap(this.map)
  604. },
  605. addGeoLayer2(geoJson) {
  606. if (this.geoLayer && this.geoSource) {
  607. this.geoSource.clear();
  608. this.map.removeLayer(this.geoLayer);
  609. }
  610. this.geoSource.addFeatures(new GeoJSON().readFeatures(geoJson));
  611. this.geoLayer = new VectorLayer({
  612. source: this.geoSource,
  613. style: function() {
  614. return new Style({
  615. stroke: new Stroke({
  616. width: 1,
  617. color: '#4AD808',
  618. }),
  619. fill: new Fill({
  620. color: '#4AD808',
  621. }),
  622. // text: new Text(({
  623. // // 位置
  624. // textAlign: 'center',
  625. // // 基准线
  626. // textBaseline: 'middle',
  627. // // 文字样式
  628. // font: 'bold 16px 微软雅黑',
  629. // // 文本内容
  630. // text: feature.get('name')+'\n'+feature.get('value')+' '+feature.get('unit'),
  631. // // 文字颜色
  632. // fill: new Fill({ color: '#FFF' }),
  633. // // fill: new Fill({ color: feature.get('color') }),
  634. // // 文字背景
  635. // // stroke: new Stroke({ color: '#ffcc33', width: 10 })
  636. // }))
  637. });
  638. },
  639. zIndex: 99,
  640. });
  641. this.map.addLayer(this.geoLayer);
  642. // this.map.getView().fit(this.geoLayer.getSource().getExtent(), { duration: 500 })
  643. // let selectClick = new interaction.Select();
  644. // this.map.addInteraction(selectClick);
  645. // selectClick.on('select', (e)=>{
  646. // var features=e.target.getFeatures().getArray();
  647. // this.$emit('mapSelect',features[0].getProperties())
  648. // })
  649. return this.geoLayer;
  650. // this.geoLayer.setMap(this.map)
  651. },
  652. filterTdyt(val) {
  653. if (!val) return;
  654. if (!TdytMapping[val.trim()]) {
  655. return '';
  656. } else {
  657. return TdytMapping[val.trim()];
  658. }
  659. },
  660. showLandDetail(props) {
  661. this.$vm.$emit('yqModalShow', props);
  662. },
  663. showSpDetail(props) {
  664. this.$vm.$emit('showSpDetail', props);
  665. },
  666. async locationMoreFeatureWhere(layerId, where, setting = {}) {
  667. const layerById = this.$refs.configLayer.getLayerConfigById(layerId);
  668. if (!layerById) {
  669. console.error(`no layer id`);
  670. return;
  671. }
  672. if (layerById.serverType === 'wms') {
  673. await GeoServerQuery(`${layerById.queryUrl}`, {
  674. typeName: layerById.params.layers,
  675. cql_filter: where
  676. }, true).then(({ features }) => {
  677. const json = { type: "FeatureCollection", features: [] };
  678. json.features.push(
  679. features[0].geometry
  680. );
  681. this.drawShadeLayer(json);
  682. })
  683. } else {
  684. await arcgisQuery(
  685. `${layerById.url}/${this.layerIndex}/query`,
  686. {
  687. outSR: getSrid(this.map),
  688. where,
  689. ...setting,
  690. },
  691. false,
  692. ).then(({ features }) => {
  693. let json = { type: 'FeatureCollection', features: [] };
  694. features.forEach((it) => {
  695. json.features.push(convertRingsToGeoJSON(it.geometry.rings));
  696. });
  697. this.drawShadeLayer(json);
  698. });
  699. }
  700. },
  701. drawShadeLayer (json) {
  702. if (this.vectorGeo != null) {
  703. this.vectorGeo.getSource().clear();
  704. this.vectorGeo = null;
  705. }
  706. // 使用GeoJSON构建source
  707. const source = new VectorSource({
  708. features: new GeoJSON().readFeatures(json),
  709. });
  710. this.vectorGeo = new VectorLayer({
  711. source: source,
  712. style: new Style({
  713. fill: new Fill({
  714. // 填充
  715. color: 'rgba(0,255,0, 0.6)',
  716. }),
  717. stroke: new Stroke({
  718. width: 5,
  719. color: '#00FF00',
  720. }),
  721. }),
  722. zIndex: 99,
  723. });
  724. this.map.addLayer(this.vectorGeo);
  725. this.map.getView().fit(source.getExtent(), {
  726. duration: 500,
  727. maxZoom: 17,
  728. });
  729. },
  730. locationByGeoJson(geos) {
  731. this.feature = new GeoJSON().readFeatures(geos)[0];
  732. },
  733. locationByGeoJsonColor(geos, color, width) {
  734. let source = new VectorSource({
  735. features: new GeoJSON().readFeatures(geos),
  736. });
  737. let geoLayer = new VectorLayer({
  738. source: source,
  739. // 设置样式,边框和填充
  740. style: new Style({
  741. stroke: new Stroke({
  742. color: color,
  743. width: width,
  744. }),
  745. // fill: new Fill({
  746. // color: 'rgba(255, 255, 0, 0.5)'
  747. // })
  748. }),
  749. zIndex: 999,
  750. });
  751. // 添加GeoJSON到map上
  752. this.map.addLayer(geoLayer);
  753. this.map.getView().fit(source.getExtent(), {
  754. duration: 500,
  755. maxZoom: 17,
  756. });
  757. },
  758. async locationFeatureHttp(
  759. bsm,
  760. layerId,
  761. { feature = undefined, row = undefined } = {},
  762. ) {
  763. this.layerFeatureKey = TABLE_COMP_MAPPING[layerId].layerField;
  764. layerId = layerId || this.visibleLayerId;
  765. const layerById = this.$refs.configLayer.getLayerConfigById(layerId);
  766. if (!layerById) {
  767. console.error(`no layer id`);
  768. return;
  769. }
  770. if (layerId == 'pewg_1') {
  771. if (bsm) {
  772. this.spinShow = true;
  773. if (!feature) {
  774. const where = `${this.layerFeatureKey} = '${bsm}'`;
  775. await arcgisQuery(
  776. `${layerById.url}/${this.layerIndex}/query`,
  777. {
  778. outSR: getSrid(this.map),
  779. where,
  780. },
  781. false,
  782. ).then(({ features }) => {
  783. const geos = {
  784. type: 'FeatureCollection',
  785. features: [
  786. {
  787. type: 'Feature',
  788. geometry: {
  789. type: 'MultiPolygon',
  790. coordinates: [],
  791. },
  792. properties: {},
  793. },
  794. ],
  795. };
  796. let temp = [];
  797. features.forEach((it) => {
  798. temp = [...temp, ...it['geometry']['rings']];
  799. });
  800. geos['features'][0]['geometry']['coordinates'] = [[...temp]];
  801. feature = new GeoJSON().readFeatures(geos)[0];
  802. });
  803. }
  804. if (row) {
  805. feature.setProperties({ ...row });
  806. }
  807. this.spinShow = false;
  808. }
  809. if (feature) {
  810. const geometry = feature.getGeometry();
  811. const wkt = WkxGeometry.parseGeoJSON(
  812. new GeoJSON().writeGeometryObject(geometry),
  813. ).toWkt();
  814. feature.set('wkt', wkt);
  815. this.feature = feature;
  816. this.$vm.$emit('getGeoData', feature); //初始化土地生命周期geo/feature参数
  817. }
  818. } else {
  819. if (bsm) {
  820. this.spinShow = true;
  821. if (!feature) {
  822. const where = `${this.layerFeatureKey} = '${bsm}'`;
  823. await arcgisQuery(
  824. `${layerById.url}/${this.layerIndex}/query`,
  825. {
  826. outSR: getSrid(this.map),
  827. where,
  828. },
  829. true,
  830. ).then(({ features }) => {
  831. feature = features[0];
  832. });
  833. }
  834. if (row) {
  835. feature.setProperties({ ...row });
  836. }
  837. this.spinShow = false;
  838. }
  839. if (feature) {
  840. const geometry = feature.getGeometry();
  841. const wkt = WkxGeometry.parseGeoJSON(
  842. new GeoJSON().writeGeometryObject(geometry),
  843. ).toWkt();
  844. feature.set('wkt', wkt);
  845. this.feature = feature;
  846. this.$vm.$emit('getGeoData', feature); //初始化土地生命周期geo/feature参数
  847. }
  848. }
  849. },
  850. async locationFeatureWhere(layerId, where, setting) {
  851. this.spinShow = true;
  852. const layerById = this.$refs.configLayer.getLayerConfigById(layerId);
  853. if (layerById.serverType === 'wms') {
  854. await GeoServerQuery(`${layerById.queryUrl}`, {
  855. typeName: layerById.params.layers,
  856. cql_filter: where
  857. }, true).then(({ features }) => {
  858. this.feature = features[0]
  859. })
  860. } else {
  861. await arcgisQuery(
  862. `${layerById.url}/${this.layerIndex}/query`,
  863. {
  864. outSR: getSrid(this.map),
  865. where,
  866. ...setting,
  867. },
  868. true
  869. ).then(({ features }) => {
  870. let feature = features[0];
  871. this.feature = feature;
  872. });
  873. }
  874. const geometry = this.feature.getGeometry();
  875. const wkt = WkxGeometry.parseGeoJSON(
  876. new GeoJSON().writeGeometryObject(geometry)
  877. ).toWkt();
  878. this.feature.set("wkt", wkt);
  879. setTimeout(() => {
  880. let [width, height] = this.map.getSize();
  881. width = Math.ceil(width / 5);
  882. height = Math.ceil(height / 5);
  883. this.map.getView().fit(geometry.getExtent(), {
  884. padding: [height, width, height + 340, width],
  885. duration: 500,
  886. maxZoom: 18,
  887. });
  888. }, 500);
  889. this.spinShow = false;
  890. },
  891. async locationMaskFeatureHttp(
  892. bsm,
  893. layerId,
  894. { feature = undefined, row = undefined } = {},
  895. ) {
  896. this.layerFeatureKey = TABLE_COMP_MAPPING[layerId].layerField;
  897. layerId = layerId || this.visibleLayerId;
  898. const layerById = this.$refs.configLayer.getLayerConfigById(layerId);
  899. if (!layerById) {
  900. console.error(`no layer id`);
  901. return;
  902. }
  903. if (bsm) {
  904. this.spinShow = true;
  905. if (!feature) {
  906. const where = `${this.layerFeatureKey} = '${bsm}'`;
  907. await arcgisQuery(
  908. `${layerById.url}/${this.layerIndex}/query`,
  909. {
  910. outSR: getSrid(this.map),
  911. where,
  912. },
  913. false,
  914. ).then((resp) => {
  915. const { features } = resp;
  916. let json = { type: 'FeatureCollection', features: [] };
  917. json.features.push(
  918. convertRingsToGeoJSON(features[0].geometry.rings),
  919. );
  920. MapUtils.drawShade(this.map, json);
  921. });
  922. }
  923. if (row) {
  924. feature.setProperties({ ...row });
  925. }
  926. this.spinShow = false;
  927. }
  928. this.feature = feature;
  929. if (feature) {
  930. this.$vm.$emit('getGeoData', feature); //初始化土地生命周期geo/feature参数
  931. }
  932. },
  933. async locationMaskFeatureWhere(layerId, where) {
  934. const layerById = this.$refs.configLayer.getLayerConfigById(layerId);
  935. if (!layerById) {
  936. console.error(`no layer id`);
  937. return;
  938. }
  939. this.spinShow = true;
  940. if (layerById.serverType === 'wms') {
  941. await GeoServerQuery(`${layerById.queryUrl}`, {
  942. typeName: layerById.params.layers,
  943. cql_filter: where
  944. }, false).then((resp) => {
  945. const { features } = resp;
  946. const json = { type: 'FeatureCollection', features: [] };
  947. json.features.push(
  948. features[0].geometry
  949. );
  950. MapUtils.drawShade(this.map, json);
  951. })
  952. } else {
  953. await arcgisQuery(
  954. `${layerById.url}/0/query`,
  955. {
  956. outSR: getSrid(this.map),
  957. where,
  958. },
  959. false,
  960. ).then((resp) => {
  961. const { features } = resp;
  962. let json = { type: 'FeatureCollection', features: [] };
  963. json.features.push(convertRingsToGeoJSON(features[0].geometry.rings));
  964. MapUtils.drawShade(this.map, json);
  965. });
  966. }
  967. this.spinShow = false;
  968. },
  969. mapLoaded(map) {
  970. window.map = map;
  971. this.map = map;
  972. const layerId = this.visibleLayerId;
  973. // 图斑拾取黑名单
  974. const pickBlackList = [];
  975. map.on('click', (e) => {
  976. this.$vm.$emit('clear-layer');
  977. if (this.visibleLayerId === 'xzqh-s-search') return;
  978. if (this.visibleLayerId === 'xzqh-x-search') return;
  979. const drawing = map.get('drawing');
  980. if (drawing || pickBlackList.includes(layerId)) {
  981. console.log('no pick event');
  982. return;
  983. }
  984. this.pickServerFeature(e);
  985. });
  986. map.on('moveend', () => {
  987. let zoom = map.getView().getZoom(); //获取当前地图的缩放级别
  988. if (zoom >= 11.3) {
  989. // this.visibleLayerId = this.visibleLayerIds[
  990. // this.visibleLayerIds.length - 1
  991. // ];
  992. if (this.mapDragPan) {
  993. this.mapDragPan.setActive(true);
  994. }
  995. //缩放至一定级别不显示tooptip图例
  996. // this.echartslayer.hide();
  997. } else {
  998. this.visibleLayerId = this.visibleLayerIds[0];
  999. if (this.visibleLayerId === 'xzqh-s-search' && this.mapDragPan) {
  1000. this.mapDragPan.setActive(true);
  1001. }
  1002. // this.echartslayer.show();
  1003. }
  1004. if (zoom >= 9 && this.xzqType !== 'town' && this.townShow) {
  1005. // 县级市
  1006. if (this.vmEventType) {
  1007. this.$vm.$emit(this.vmEventType, 'town');
  1008. }
  1009. this.xzqType = 'town';
  1010. this.$emit('moveend', this.xzqType);
  1011. this.enabledLayersConfig[0]['children'][2]['children'][0][
  1012. 'visible'
  1013. ] = false;
  1014. this.enabledLayersConfig[0]['children'][2]['children'][4][
  1015. 'visible'
  1016. ] = true;
  1017. if (this.isIconBool && !this.isShowIcon) {
  1018. this.isShowIcon = true;
  1019. }
  1020. } else if (zoom < 9 && this.xzqType !== 'city') {
  1021. // 地级市
  1022. if (this.vmEventType) {
  1023. this.$vm.$emit(this.vmEventType, 'city');
  1024. }
  1025. this.xzqType = 'city';
  1026. this.$emit('moveend', this.xzqType);
  1027. this.enabledLayersConfig[0]['children'][2]['children'][0][
  1028. 'visible'
  1029. ] = true;
  1030. this.enabledLayersConfig[0]['children'][2]['children'][4][
  1031. 'visible'
  1032. ] = false;
  1033. }
  1034. });
  1035. map.getView().setCenter([120.45690944408925, 29.248390754380974]);
  1036. map.getView().setZoom(7.85);
  1037. this.map.getInteractions().forEach((element) => {
  1038. if (element instanceof DragPan) {
  1039. this.mapDragPan = element;
  1040. }
  1041. });
  1042. },
  1043. echartsLayerLoad() {
  1044. if (this.echartslayer !== null) {
  1045. // this.map.removeLayer(this.echartslayer);
  1046. this.echartslayer.remove();
  1047. this.echartslayer = null;
  1048. }
  1049. // 迁徙图图层初始化
  1050. this.echartslayer = new EChartsLayer(this.getOption());
  1051. this.echartslayer.setMap(this.map);
  1052. this.echartslayer.$chart.on('click', (item) => {
  1053. if (!this.echartsLayerClickHandle) return;
  1054. this.echartsLayerClickHandle(item);
  1055. });
  1056. },
  1057. getOption() {
  1058. var geoCoordMap = null;
  1059. let GZData = [];
  1060. let isShow = true;
  1061. let typeStr = 1; //Scatter背景图类型 0、1
  1062. if (this.GZData && this.GZData.length > 0) {
  1063. isShow = true;
  1064. GZData = this.GZData;
  1065. typeStr = GZData[0]['typeIndex'];
  1066. } else {
  1067. isShow = false;
  1068. }
  1069. if (!this.xzqName) {
  1070. if (this.xzqType === 'town') {
  1071. const keys = Object.keys(XZQ[this.xzqType]);
  1072. geoCoordMap = {};
  1073. for (let i = 0; i < keys.length; i++) {
  1074. const mapItem = XZQ[this.xzqType][keys[i]];
  1075. Object.assign(geoCoordMap, mapItem);
  1076. }
  1077. } else {
  1078. geoCoordMap = XZQ[this.xzqType];
  1079. }
  1080. } else {
  1081. geoCoordMap = XZQ[this.xzqType][this.xzqName];
  1082. }
  1083. var convertData2 = function(data) {
  1084. var res = [];
  1085. data.forEach((item) => {
  1086. var geoCoord = geoCoordMap[item.name];
  1087. if (geoCoord) {
  1088. res.push({
  1089. name: item.name,
  1090. value: geoCoord,
  1091. query: item['query'],
  1092. param: item['param'],
  1093. });
  1094. }
  1095. });
  1096. return res;
  1097. };
  1098. const series = [
  1099. {
  1100. type: 'scatter',
  1101. coordinateSystem: 'geo',
  1102. tooltip: { show: false },
  1103. z: 999,
  1104. label: {
  1105. normal: {
  1106. show: true,
  1107. formatter: function(item) {
  1108. return `{tline|${item['name']}}`;
  1109. },
  1110. rich: {
  1111. tline: {
  1112. color: '#FFF',
  1113. align: 'center',
  1114. fontSize: 15,
  1115. fontWeight: 600,
  1116. },
  1117. },
  1118. },
  1119. emphasis: {
  1120. show: true,
  1121. },
  1122. },
  1123. itemStyle: {
  1124. opacity: 1,
  1125. color: function(val) {
  1126. return '#333';
  1127. },
  1128. },
  1129. data: convertData2(GZData),
  1130. },
  1131. ];
  1132. if (isShow) {
  1133. if (typeStr === 0) {
  1134. series[0]['symbolOffset'] = [0, -5];
  1135. series.push(
  1136. {
  1137. type: 'scatter',
  1138. coordinateSystem: 'geo',
  1139. tooltip: { show: false },
  1140. z: 999999999,
  1141. label: {
  1142. normal: {
  1143. show: true,
  1144. formatter: function(item) {
  1145. const param = item['data']['param'];
  1146. const order = param['order'] || '0';
  1147. return `{tline|${order}}`;
  1148. },
  1149. rich: {
  1150. tline: {
  1151. color: '#0B2E3A',
  1152. align: 'center',
  1153. fontSize: 14,
  1154. fontWeight: 600,
  1155. },
  1156. },
  1157. },
  1158. emphasis: {
  1159. show: true,
  1160. },
  1161. },
  1162. itemStyle: {
  1163. opacity: 1,
  1164. color: function(val) {
  1165. let a;
  1166. if (val.data.param.order < 4) {
  1167. a = '#FAED25';
  1168. } else {
  1169. a = '#00FFEA';
  1170. }
  1171. return a;
  1172. },
  1173. },
  1174. symbol: 'circle',
  1175. symbolSize: 26,
  1176. symbolOffset: [-45, -80], //开发强度 [-40, -70]、要素保障 [-35, -80]
  1177. data: convertData2(GZData),
  1178. },
  1179. {
  1180. //图例
  1181. type: 'scatter',
  1182. coordinateSystem: 'geo',
  1183. tooltip: { show: false },
  1184. z: 99999,
  1185. label: {
  1186. normal: {
  1187. show: true,
  1188. formatter: function(item) {
  1189. const param = item['data']['param'];
  1190. const value1 = param['value1'] || '';
  1191. const value2 = param['value2'] || 0;
  1192. const unit1 = param['unit1'] || '';
  1193. const unit2 = param['unit2'] || '';
  1194. return `{tline1|${value1}}{tline2|${unit1}}\n{fline1|${value2}}{fline2|${unit2}}`;
  1195. },
  1196. rich: {
  1197. //开发强度 [0, 2]、要素保障 [2, 2]
  1198. tline1: {
  1199. padding: [5, 0],
  1200. color: '#07FCFF',
  1201. align: 'center',
  1202. fontSize: 15,
  1203. fontWeight: 700,
  1204. },
  1205. tline2: {
  1206. padding: [5, 0],
  1207. color: '#07FCFF',
  1208. align: 'center',
  1209. fontSize: 12,
  1210. fontWeight: 600,
  1211. },
  1212. fline1: {
  1213. color: '#FFFFFF',
  1214. fontSize: 14,
  1215. align: 'center',
  1216. fontWeight: 700,
  1217. },
  1218. fline2: {
  1219. color: '#FFFFFF',
  1220. fontSize: 14,
  1221. align: 'center',
  1222. },
  1223. },
  1224. //开发强度 [0, 10]、要素保障 [2, 2]
  1225. offset: [0, -5],
  1226. },
  1227. emphasis: {
  1228. show: true,
  1229. },
  1230. },
  1231. itemStyle: {
  1232. borderWidth: 0,
  1233. opacity: 1,
  1234. color: 'transparent',
  1235. },
  1236. symbol: function(val, item) {
  1237. return scatter_bg4;
  1238. },
  1239. symbolSize: function(val, item) {
  1240. return [90, 65];
  1241. },
  1242. symbolOffset: [0, -50],
  1243. data: convertData2(GZData),
  1244. },
  1245. );
  1246. } else {
  1247. series[0]['symbolOffset'] = [0, 28];
  1248. const getLineMaxHeight = (data) => {
  1249. const maxValue = Math.max(
  1250. ...data.map((item) => item['param']['value1']),
  1251. );
  1252. return 0.6 / maxValue;
  1253. };
  1254. const maxHeight = getLineMaxHeight(GZData);
  1255. const getLineData = (data) => {
  1256. const dataArr = [];
  1257. data.forEach((item) => {
  1258. const name = item.name;
  1259. if (geoCoordMap[name]) {
  1260. dataArr.push({
  1261. query: item['query'],
  1262. coords: [
  1263. geoCoordMap[name],
  1264. [
  1265. geoCoordMap[name][0],
  1266. geoCoordMap[name][1] +
  1267. item['param']['value1'] * maxHeight,
  1268. ],
  1269. ],
  1270. });
  1271. }
  1272. });
  1273. return dataArr;
  1274. };
  1275. const lineData = getLineData(GZData);
  1276. // 柱状体的顶部
  1277. const getTopBarPosition = (data) => {
  1278. const dataArr = [];
  1279. data.forEach((item) => {
  1280. const name = item.name;
  1281. if (geoCoordMap[name]) {
  1282. dataArr.push([
  1283. geoCoordMap[name][0],
  1284. geoCoordMap[name][1] + item['param']['value1'] * maxHeight,
  1285. ]);
  1286. }
  1287. });
  1288. return dataArr;
  1289. };
  1290. const getTopBarPosAndData = (data) => {
  1291. const dataArr = [];
  1292. data.forEach((item) => {
  1293. const name = item.name;
  1294. if (geoCoordMap[name]) {
  1295. dataArr.push([
  1296. geoCoordMap[name][0],
  1297. geoCoordMap[name][1] + item['param']['value1'] * maxHeight,
  1298. item,
  1299. ]);
  1300. }
  1301. });
  1302. return dataArr;
  1303. };
  1304. series.push(
  1305. {
  1306. type: 'scatter',
  1307. coordinateSystem: 'geo',
  1308. tooltip: { show: false },
  1309. z: 9999999,
  1310. label: {
  1311. normal: {
  1312. show: true,
  1313. formatter: function(item) {
  1314. const data = item['data'];
  1315. const param = data[data.length - 1]['param'];
  1316. if (!param) return;
  1317. const value1 = param['value1'] || '';
  1318. const unit1 = param['unit1'] || '';
  1319. return `{tline1|${value1}}{tline2|${unit1}}`;
  1320. },
  1321. rich: {
  1322. tline1: {
  1323. color: '#07FCFF',
  1324. align: 'center',
  1325. fontSize: 15,
  1326. fontWeight: 700,
  1327. },
  1328. tline2: {
  1329. color: '#07FCFF',
  1330. align: 'center',
  1331. fontSize: 12,
  1332. fontWeight: 600,
  1333. },
  1334. },
  1335. offset: [0, 0],
  1336. },
  1337. emphasis: {
  1338. show: true,
  1339. },
  1340. },
  1341. itemStyle: {
  1342. borderWidth: 0,
  1343. opacity: 1,
  1344. color: 'transparent',
  1345. },
  1346. symbol: bg_text,
  1347. symbolSize: function(val, item) {
  1348. return [70, 30];
  1349. },
  1350. symbolOffset: [0, -24],
  1351. data: getTopBarPosAndData(GZData),
  1352. },
  1353. {
  1354. type: 'scatter',
  1355. coordinateSystem: 'geo',
  1356. geoIndex: 0,
  1357. zlevel: 999999,
  1358. label: {
  1359. show: false,
  1360. },
  1361. symbol: 'circle',
  1362. symbolSize: [20, 10],
  1363. itemStyle: {
  1364. color: '#ECC200',
  1365. opacity: 1,
  1366. },
  1367. silent: true,
  1368. data: getTopBarPosition(GZData),
  1369. },
  1370. // 柱状体的主干
  1371. {
  1372. type: 'lines',
  1373. zlevel: 999,
  1374. effect: {
  1375. show: false,
  1376. symbolSize: 5, // 图标大小
  1377. },
  1378. lineStyle: {
  1379. width: 20, // 尾迹线条宽度
  1380. color: '#FFDE00',
  1381. opacity: 1, // 尾迹线条透明度
  1382. curveness: 0, // 尾迹线条曲直度
  1383. },
  1384. label: {
  1385. show: 0,
  1386. position: 'end',
  1387. formatter: '245',
  1388. },
  1389. data: lineData,
  1390. },
  1391. // 柱状体的底部
  1392. {
  1393. type: 'scatter',
  1394. coordinateSystem: 'geo',
  1395. geoIndex: 0,
  1396. zlevel: 9,
  1397. label: {
  1398. show: false,
  1399. },
  1400. symbol: 'circle',
  1401. symbolSize: [20, 10],
  1402. itemStyle: {
  1403. color: '#FFDE44',
  1404. opacity: 1,
  1405. },
  1406. silent: true,
  1407. data: convertData2(GZData),
  1408. },
  1409. {
  1410. type: 'scatter',
  1411. coordinateSystem: 'geo',
  1412. geoIndex: 0,
  1413. zlevel: 4,
  1414. label: {
  1415. show: false,
  1416. },
  1417. symbol: 'circle',
  1418. symbolSize: [40, 20],
  1419. itemStyle: {
  1420. color: '#fff',
  1421. opacity: 1,
  1422. },
  1423. silent: true,
  1424. data: convertData2(GZData),
  1425. },
  1426. {
  1427. type: 'scatter',
  1428. coordinateSystem: 'geo',
  1429. geoIndex: 0,
  1430. zlevel: 4,
  1431. label: {
  1432. show: false,
  1433. },
  1434. symbol: 'circle',
  1435. symbolSize: [60, 32],
  1436. itemStyle: {
  1437. color: {
  1438. type: 'radial',
  1439. x: 0.5,
  1440. y: 0.5,
  1441. r: 0.5,
  1442. colorStops: [
  1443. {
  1444. offset: 0,
  1445. color: 'transparent', // 0% 处的颜色
  1446. },
  1447. {
  1448. offset: 0.85,
  1449. color: 'transparent', // 100% 处的颜色
  1450. },
  1451. {
  1452. offset: 0.98,
  1453. color: '#FFDE44', // 100% 处的颜色
  1454. },
  1455. {
  1456. offset: 1,
  1457. color: '#FFDE44', // 100% 处的颜色
  1458. },
  1459. ],
  1460. global: false, // 缺省为 false
  1461. },
  1462. opacity: 1,
  1463. },
  1464. silent: true,
  1465. data: convertData2(GZData),
  1466. },
  1467. );
  1468. }
  1469. } else {
  1470. series.push({
  1471. type: 'scatter',
  1472. coordinateSystem: 'geo',
  1473. itemStyle: {
  1474. color: 'transparent',
  1475. },
  1476. z: 999,
  1477. label: {
  1478. show: true,
  1479. normal: {
  1480. show: true,
  1481. formatter: function(params) {
  1482. const name = params.name;
  1483. return name;
  1484. },
  1485. fantFamily: 'Microsoft YaHei',
  1486. color: '#FFFFFF',
  1487. fontSize: 19,
  1488. textShadowColor: '#000000',
  1489. textShadowBlur: 2,
  1490. textShadowOffsetX: 2,
  1491. textShadowOffsetY: 2,
  1492. },
  1493. },
  1494. data: convertData2(GZData),
  1495. });
  1496. }
  1497. return {
  1498. tooltip: {
  1499. trigger: 'item',
  1500. },
  1501. series: series,
  1502. };
  1503. },
  1504. configLayerLoaded(enabledLayersConfig) {
  1505. this.enabledLayersConfig = enabledLayersConfig;
  1506. },
  1507. async pickServerFeature (e) {
  1508. console.log(e)
  1509. let tempLayerIds = this.visibleLayerIds.filter(
  1510. (it) =>
  1511. it !== 'xzqh-s' &&
  1512. it !== 'xzqh-s-search' &&
  1513. it !== 'xzqh-x-search' &&
  1514. it !== 'xzqh-x-search-dzl' &&
  1515. it !== 'xzqh-x' &&
  1516. it !== 'xzqh-z' &&
  1517. it !== 'hzyx-202311' &&
  1518. it !== 'hzyx-202310' &&
  1519. it !== 'hzyx-202308' &&
  1520. it !== 'hzyx-202309' &&
  1521. it !== 'bj-czkfbj' &&
  1522. it !== 'bj-stbhhx' &&
  1523. it !== 'bj-kfbjw',
  1524. );
  1525. if (tempLayerIds.length === 1) {
  1526. const layerConfig = this.$refs.configLayer.getLayerConfigById(
  1527. this.visibleLayerId,
  1528. );
  1529. // 带上图层显示参数,只拾取显示的图斑
  1530. let where = '1=1';
  1531. try {
  1532. where = layerConfig.params.layerDefs[0];
  1533. if (!where) {
  1534. where = '1=1';
  1535. }
  1536. } catch (e) {
  1537. // 获取图层 参数
  1538. }
  1539. const [x, y] = e.coordinate;
  1540. const param = {
  1541. where,
  1542. f: 'json',
  1543. inSR: getSrid(this.map),
  1544. outFields: TABLE_COMP_MAPPING[this.visibleLayerId]
  1545. ? TABLE_COMP_MAPPING[this.visibleLayerId]['outFields']
  1546. : '',
  1547. returnGeometry: 'true',
  1548. geometry: JSON.stringify({ x, y }),
  1549. geometryType: 'esriGeometryPoint',
  1550. };
  1551. if (layerConfig.serverType === 'wms') {
  1552. const pointWkt = `POINT(${y} ${x})`
  1553. await GeoServerQuery(`${layerConfig.queryUrl}`, {
  1554. typeName: layerConfig.params.layers,
  1555. cql_filter: `INTERSECTS(shape, ${pointWkt})`
  1556. }, true).then(({ features: [feature] }) => {
  1557. if (feature) {
  1558. this.locationFeature(null, this.visibleLayerId, { feature });
  1559. } else {
  1560. this.feature = undefined;
  1561. }
  1562. })
  1563. } else {
  1564. arcgisQuery(
  1565. `${layerConfig.url}/${this.layerIndex}/query`,
  1566. param,
  1567. true,
  1568. ).then(({ features: [feature] }) => {
  1569. if (feature) {
  1570. this.locationFeature(null, this.visibleLayerId, { feature });
  1571. } else {
  1572. this.feature = undefined;
  1573. }
  1574. });
  1575. }
  1576. } else if (tempLayerIds.length > 1) {
  1577. // 带上图层显示参数,只拾取显示的图斑
  1578. const where = '1=1';
  1579. const [x, y] = e.coordinate;
  1580. const param = {
  1581. where,
  1582. f: 'json',
  1583. inSR: getSrid(this.map),
  1584. outFields: '',
  1585. returnGeometry: 'true',
  1586. geometry: JSON.stringify({ x, y }),
  1587. geometryType: 'esriGeometryPoint',
  1588. };
  1589. const urls = tempLayerIds.map((i) => this.getLayerConfigById(i));
  1590. const promiseArr = urls.map((i) => {
  1591. param.outFields = TABLE_COMP_MAPPING[i.id]
  1592. ? TABLE_COMP_MAPPING[i.id]['outFields']
  1593. : '';
  1594. return arcgisQuery(`${i.url}/${this.layerIndex}/query`, param, true);
  1595. });
  1596. const feature = await Promise.all(promiseArr).then((resp) => {
  1597. if (this.visibleLayerIds.includes('bj-gyyd-new')) {
  1598. for (let i = 0; i < resp.length; i++) {
  1599. if (resp[i].features.length != 0) {
  1600. this.isgyyd = resp[i].displayFieldName;
  1601. }
  1602. }
  1603. }
  1604. for (let i = 0; i < resp.length; i++) {
  1605. if (resp[i].features.length) {
  1606. this.visibleLayerId = tempLayerIds[i];
  1607. break;
  1608. }
  1609. }
  1610. const features = resp
  1611. .filter((i) => i.features.length)
  1612. .map((i) => i.features[0]);
  1613. return features[0];
  1614. });
  1615. if (feature) {
  1616. this.locationFeature(null, this.visibleLayerId, { feature });
  1617. } else {
  1618. this.feature = undefined;
  1619. }
  1620. }
  1621. },
  1622. async locationFeature(
  1623. bsm,
  1624. layerId,
  1625. { feature = undefined, row = undefined } = {},
  1626. ) {
  1627. if (feature) {
  1628. const geometry = feature.getGeometry();
  1629. const wkt = WkxGeometry.parseGeoJSON(
  1630. new GeoJSON().writeGeometryObject(geometry),
  1631. ).toWkt();
  1632. feature.set('wkt', wkt);
  1633. this.feature = feature;
  1634. this.$vm.$emit('getGeoData', feature); //初始化土地生命周期geo/feature参数
  1635. this.$vm.$emit(
  1636. 'mapClickHandle',
  1637. feature.getProperties(),
  1638. this.visibleLayerId,
  1639. );
  1640. this.$emit('mapClick', feature.getProperties(), this.visibleLayerId);
  1641. }
  1642. this.drawendFeaturePop(this.feature);
  1643. },
  1644. locationMoreFeatureWithShade(where, layerId, setting = {}) {
  1645. this.spinShow = true;
  1646. const layer = this.$refs.configLayer.getLayerConfigById(layerId);
  1647. if (!layer) {
  1648. console.error(`no layer id`);
  1649. return;
  1650. }
  1651. arcgisQuery(
  1652. `${layer.url}/${this.layerIndex}/query`,
  1653. {
  1654. outSR: getSrid(this.map),
  1655. where,
  1656. ...setting,
  1657. },
  1658. false,
  1659. ).then(({ features }) => {
  1660. this.spinShow = false;
  1661. const geos = {
  1662. type: 'FeatureCollection',
  1663. features: [
  1664. {
  1665. type: 'Feature',
  1666. geometry: {
  1667. type: 'MultiPolygon',
  1668. coordinates: [],
  1669. },
  1670. properties: {},
  1671. },
  1672. ],
  1673. };
  1674. let temp = [];
  1675. features.forEach((it) => {
  1676. temp = [...temp, ...it['geometry']['rings']];
  1677. });
  1678. geos['features'][0]['geometry']['coordinates'] = [[...temp]];
  1679. this.addGeoLayer2(geos);
  1680. // MapUtils.drawShade(this.map, JSON.stringify(geos))
  1681. });
  1682. },
  1683. drawendFeaturePop(drawFeature) {
  1684. if (!drawFeature) {
  1685. this.drawFeature = drawFeature;
  1686. return;
  1687. }
  1688. const geometry = drawFeature.getGeometry();
  1689. const area = getArea(geometry, {
  1690. projection: this.map.getView().getProjection(),
  1691. });
  1692. drawFeature.set('area', (area / 666.67).toFixed(2));
  1693. this.drawendDistrict(drawFeature);
  1694. },
  1695. drawendDistrict(drawFeature) {
  1696. // const urls = ['xzqh-s', 'xzqh-x', 'xzqh-z'].map(i => this.getLayerConfigById(i).url)
  1697. const urls = ['xzqh-z'].map((i) => this.getLayerConfigById(i).url);
  1698. const srid = getSrid(this.map);
  1699. const param = {
  1700. geometry: toArcGIS(drawFeature.getGeometry(), true),
  1701. geometryType: 'esriGeometryPolygon',
  1702. spatialRel: 'esriSpatialRelIntersects',
  1703. inSR: srid,
  1704. outSR: srid,
  1705. returnGeometry: false,
  1706. where: `1=1`,
  1707. };
  1708. const promiseArr = urls.map((i) =>
  1709. arcgisQuery(`${i}/${this.layerIndex}/query`, param, false),
  1710. );
  1711. Promise.all(promiseArr).then((resp) => {
  1712. const features = resp
  1713. .filter((i) => i.features.length)
  1714. .map((i) => i.features);
  1715. drawFeature.set(
  1716. 'areaList',
  1717. features.flat().map((i) => i.attributes.FULLNAME.substr(3)),
  1718. );
  1719. this.drawFeature = drawFeature;
  1720. });
  1721. },
  1722. resetMapView() {
  1723. const { districtFeature, map } = this;
  1724. if (districtFeature) {
  1725. mapFit(districtFeature, map);
  1726. } else {
  1727. this.$refs.configLayer.resetMapView();
  1728. }
  1729. },
  1730. drawend(features) {
  1731. // 绘制结束或清空绘制
  1732. const multiPolygon = features
  1733. ? new MultiPolygon(features.map((i) => i.getGeometry()))
  1734. : features;
  1735. const payload = {
  1736. geometry: multiPolygon ? toArcGIS(multiPolygon, true) : '',
  1737. srid: getSrid(this.map),
  1738. };
  1739. this.$store.dispatch('spacemap/setSketchRangeAnalysis', payload);
  1740. },
  1741. getLayerConfigById(layerId) {
  1742. return this.$refs.configLayer.getLayerConfigById(layerId);
  1743. },
  1744. dateFormat(date) {
  1745. if (date === null || date === undefined || date === '') {
  1746. console.log('时间格式化有误,时间为null');
  1747. return '';
  1748. }
  1749. if (typeof date === 'string') {
  1750. return date.substr(0, 10);
  1751. }
  1752. var time = new Date(date);
  1753. var y = time.getFullYear();
  1754. var m = time.getMonth() + 1;
  1755. var d = time.getDate();
  1756. return y + '-' + this.add0(m) + '-' + this.add0(d);
  1757. },
  1758. add0(m) {
  1759. return m < 10 ? '0' + m : m;
  1760. },
  1761. getLayerById(id) {
  1762. return this.$refs.configLayer.getLayerById(id);
  1763. },
  1764. mockDetail(props) {
  1765. this.$vm.$emit('getMockDetail', props);
  1766. },
  1767. bjmockDetail(props) {
  1768. this.$vm.$emit('getBjMockDetail', props);
  1769. },
  1770. locationTsxzDetail(props) {
  1771. this.$vm.$emit('locationTsxzDetail', props);
  1772. },
  1773. tzzxDetail(props) {
  1774. this.$vm.$emit('getTzzxDetail', props);
  1775. },
  1776. statisticsLayer(layerId, setting) {
  1777. const layerById = this.$refs.configLayer.getLayerConfigById(layerId);
  1778. arcgisQuery(
  1779. `${layerById.url}/${this.layerIndex}/query`,
  1780. setting,
  1781. false,
  1782. ).then(({ features }) => {
  1783. this.$vm.$emit(
  1784. 'statisticsLayerCallback',
  1785. features,
  1786. setting['groupByFieldsForStatistics'],
  1787. );
  1788. });
  1789. },
  1790. skyb(p) {
  1791. window.open(`https://yt.zjasm.net/kjzlptv2/blockTool?geometry=${p.wkt}`);
  1792. },
  1793. },
  1794. };
  1795. </script>
  1796. <style lang="scss" scoped>
  1797. .vl-tool-bar {
  1798. display: flex;
  1799. top: 5px !important;
  1800. right: 10px !important;
  1801. > li {
  1802. display: flex;
  1803. align-items: center;
  1804. justify-content: center;
  1805. cursor: pointer;
  1806. width: 34px !important;
  1807. height: 34px !important;
  1808. border: 1px solid #468ec0;
  1809. background: linear-gradient(0deg, #102a54 0%, #3d5a93 100%);
  1810. border-radius: 4px;
  1811. .img {
  1812. width: 18px !important;
  1813. height: 18px !important;
  1814. }
  1815. > div {
  1816. display: flex;
  1817. align-items: center;
  1818. justify-content: center;
  1819. }
  1820. }
  1821. }
  1822. .overlayBox {
  1823. background: url('../../../assets/images/dk_detail_bg.png') no-repeat;
  1824. background-size: 100% 100%;
  1825. padding: 12px 15px;
  1826. border-radius: 2px;
  1827. position: relative;
  1828. font-family: Alibaba PuHuiTi;
  1829. margin-bottom: 40px;
  1830. min-width: 340px;
  1831. > .fixedIcon {
  1832. position: absolute;
  1833. width: 50px;
  1834. height: 50px;
  1835. bottom: -50px;
  1836. left: 0px;
  1837. right: 0px;
  1838. margin: auto;
  1839. background: url('../../../assets/images/map_icon.png') no-repeat;
  1840. background-size: 100% 100%;
  1841. }
  1842. > .title {
  1843. color: #fff;
  1844. position: relative;
  1845. top: -5px;
  1846. font-size: 16px;
  1847. font-weight: bold;
  1848. > .btn {
  1849. float: right;
  1850. cursor: pointer;
  1851. background-color: #0178cd;
  1852. padding: 5px 10px;
  1853. display: inline-block;
  1854. border-radius: 2px;
  1855. margin-top: -5px;
  1856. color: #fff;
  1857. &:hover {
  1858. color: #22f3e2;
  1859. }
  1860. }
  1861. .label {
  1862. float: right;
  1863. color: #22f3e2;
  1864. margin-top: 8px;
  1865. }
  1866. }
  1867. > .content {
  1868. padding: 15px 5px;
  1869. max-width: 360px;
  1870. > h2,
  1871. p {
  1872. color: #fff;
  1873. }
  1874. > h2 {
  1875. font-size: 16px !important;
  1876. margin-bottom: 10px;
  1877. white-space: nowrap;
  1878. text-overflow: ellipsis;
  1879. overflow: hidden;
  1880. font-weight: bold;
  1881. }
  1882. > p {
  1883. font-size: 15px;
  1884. margin: 5px 0px;
  1885. }
  1886. }
  1887. }
  1888. .overview-map {
  1889. position: relative;
  1890. width: 100%;
  1891. height: 100%;
  1892. overflow: hidden;
  1893. $mask-bgc: radial-gradient(
  1894. closest-side at 50%,
  1895. rgba(4, 18, 41, 0) 0,
  1896. rgba(0, 15, 51, 0.2)
  1897. );
  1898. .space-map-mask {
  1899. position: absolute;
  1900. top: 0;
  1901. left: 0;
  1902. z-index: 0;
  1903. width: 100%;
  1904. height: 100%;
  1905. background-image: $mask-bgc;
  1906. pointer-events: none;
  1907. }
  1908. .map-view-info {
  1909. position: absolute;
  1910. bottom: 10px;
  1911. left: 15px;
  1912. width: 350px;
  1913. height: 32px;
  1914. background: rgba(56, 150, 236, 0.64);
  1915. box-shadow: 0 0 20px 1px #012357;
  1916. font-size: 14px;
  1917. font-weight: 400;
  1918. color: #ffffff;
  1919. line-height: 32px;
  1920. text-indent: 1em;
  1921. }
  1922. $bgc: rgba(255, 255, 255, 0.9);
  1923. &::v-deep {
  1924. .vl-tool-bar {
  1925. .vl-tool-bar-item {
  1926. background-color: transparent;
  1927. }
  1928. }
  1929. .vl-legend {
  1930. border: 1px solid #0660b8;
  1931. .legend-panel {
  1932. // background: $bgc;
  1933. background: #02285c;
  1934. color: #00edff;
  1935. .legend-title {
  1936. background: transparent;
  1937. border-bottom: 1px solid #0660b8;
  1938. }
  1939. }
  1940. }
  1941. .vl-layer-tree {
  1942. .layer-dropdown {
  1943. background-color: $bgc;
  1944. }
  1945. }
  1946. }
  1947. .feature-overlay {
  1948. z-index: 999;
  1949. // min-width: 331px;
  1950. // max-width: 400px;
  1951. width: 295px;
  1952. // min-height: 186px;
  1953. // background: url(~@/assets/project/map-overlay.png) no-repeat;
  1954. // background-size: 100% 100%;;
  1955. // padding: 2px 6px 20px;
  1956. color: white;
  1957. background: #fff;
  1958. z-index: 999;
  1959. position: absolute;
  1960. top: 80px;
  1961. right: 20px;
  1962. .title {
  1963. font-size: 18px;
  1964. line-height: 30px;
  1965. font-weight: 600;
  1966. // background: linear-gradient(270deg, #47c4fa 0%, #2390ee 100%);
  1967. background: #2390ee;
  1968. // border-radius: 10px 10px 0px 0px;
  1969. padding-left: 16px;
  1970. .title-label {
  1971. font-size: 16px;
  1972. font-weight: normal;
  1973. float: right;
  1974. cursor: pointer;
  1975. color: #00ffff;
  1976. &:hover {
  1977. font-weight: bolder;
  1978. }
  1979. }
  1980. .detail {
  1981. font-size: 16px;
  1982. color: #22f3e2;
  1983. cursor: pointer;
  1984. margin-left: 5px;
  1985. }
  1986. }
  1987. .section5 {
  1988. padding: 0 20px 10px;
  1989. .name {
  1990. font-weight: 600;
  1991. padding: 10px 0;
  1992. font-size: 17px;
  1993. color: #333333;
  1994. line-height: 22px;
  1995. cursor: default;
  1996. .detail {
  1997. cursor: pointer;
  1998. margin-left: 5px;
  1999. background: #00b9d6;
  2000. border-radius: 3px;
  2001. font-size: 15px;
  2002. color: #ffffff;
  2003. padding: 0 8px;
  2004. }
  2005. }
  2006. table {
  2007. width: 100%;
  2008. font-size: 15px;
  2009. line-height: 15px;
  2010. td,
  2011. th {
  2012. padding: 3px 0;
  2013. }
  2014. th {
  2015. padding-right: 0.5em;
  2016. word-break: keep-all;
  2017. font-weight: normal;
  2018. color: #666666;
  2019. width: 4.3em;
  2020. }
  2021. td {
  2022. min-width: 3em;
  2023. color: #333333;
  2024. font-weight: bold;
  2025. }
  2026. td + th {
  2027. padding-left: 0.5em;
  2028. }
  2029. }
  2030. }
  2031. }
  2032. .ivu-spin-fix {
  2033. z-index: 0 !important;
  2034. background-color: unset;
  2035. color: white;
  2036. background-image: $mask-bgc;
  2037. }
  2038. }
  2039. </style>