index.vue 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090
  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. let tempLayerIds = this.visibleLayerIds.filter(
  1509. (it) =>
  1510. it !== 'xzqh-s' &&
  1511. it !== 'xzqh-s-search' &&
  1512. it !== 'xzqh-x-search' &&
  1513. it !== 'xzqh-x-search-dzl' &&
  1514. it !== 'xzqh-x' &&
  1515. it !== 'xzqh-z' &&
  1516. it !== 'hzyx-202311' &&
  1517. it !== 'hzyx-202310' &&
  1518. it !== 'hzyx-202308' &&
  1519. it !== 'hzyx-202309' &&
  1520. it !== 'bj-czkfbj' &&
  1521. it !== 'bj-stbhhx' &&
  1522. it !== 'bj-kfbjw',
  1523. );
  1524. if (tempLayerIds.length === 1) {
  1525. const layerConfig = this.$refs.configLayer.getLayerConfigById(
  1526. this.visibleLayerId,
  1527. );
  1528. // 带上图层显示参数,只拾取显示的图斑
  1529. let where = '1=1';
  1530. try {
  1531. where = layerConfig.params.layerDefs[0];
  1532. if (!where) {
  1533. where = '1=1';
  1534. }
  1535. } catch (e) {
  1536. // 获取图层 参数
  1537. }
  1538. const [x, y] = e.coordinate;
  1539. const param = {
  1540. where,
  1541. f: 'json',
  1542. inSR: getSrid(this.map),
  1543. outFields: TABLE_COMP_MAPPING[this.visibleLayerId]
  1544. ? TABLE_COMP_MAPPING[this.visibleLayerId]['outFields']
  1545. : '',
  1546. returnGeometry: 'true',
  1547. geometry: JSON.stringify({ x, y }),
  1548. geometryType: 'esriGeometryPoint',
  1549. };
  1550. if (layerConfig.serverType === 'wms') {
  1551. await GeoServerQuery(`${layerConfig.queryUrl}`, {
  1552. typeName: layerConfig.params.layers,
  1553. cql_filter: where
  1554. }, true).then(({ features: [feature] }) => {
  1555. if (feature) {
  1556. this.locationFeature(null, this.visibleLayerId, { feature });
  1557. } else {
  1558. this.feature = undefined;
  1559. }
  1560. })
  1561. } else {
  1562. arcgisQuery(
  1563. `${layerConfig.url}/${this.layerIndex}/query`,
  1564. param,
  1565. true,
  1566. ).then(({ features: [feature] }) => {
  1567. if (feature) {
  1568. this.locationFeature(null, this.visibleLayerId, { feature });
  1569. } else {
  1570. this.feature = undefined;
  1571. }
  1572. });
  1573. }
  1574. } else if (tempLayerIds.length > 1) {
  1575. // 带上图层显示参数,只拾取显示的图斑
  1576. const where = '1=1';
  1577. const [x, y] = e.coordinate;
  1578. const param = {
  1579. where,
  1580. f: 'json',
  1581. inSR: getSrid(this.map),
  1582. outFields: '',
  1583. returnGeometry: 'true',
  1584. geometry: JSON.stringify({ x, y }),
  1585. geometryType: 'esriGeometryPoint',
  1586. };
  1587. const urls = tempLayerIds.map((i) => this.getLayerConfigById(i));
  1588. const promiseArr = urls.map((i) => {
  1589. param.outFields = TABLE_COMP_MAPPING[i.id]
  1590. ? TABLE_COMP_MAPPING[i.id]['outFields']
  1591. : '';
  1592. return arcgisQuery(`${i.url}/${this.layerIndex}/query`, param, true);
  1593. });
  1594. const feature = await Promise.all(promiseArr).then((resp) => {
  1595. if (this.visibleLayerIds.includes('bj-gyyd-new')) {
  1596. for (let i = 0; i < resp.length; i++) {
  1597. if (resp[i].features.length != 0) {
  1598. this.isgyyd = resp[i].displayFieldName;
  1599. }
  1600. }
  1601. }
  1602. for (let i = 0; i < resp.length; i++) {
  1603. if (resp[i].features.length) {
  1604. this.visibleLayerId = tempLayerIds[i];
  1605. break;
  1606. }
  1607. }
  1608. const features = resp
  1609. .filter((i) => i.features.length)
  1610. .map((i) => i.features[0]);
  1611. return features[0];
  1612. });
  1613. if (feature) {
  1614. this.locationFeature(null, this.visibleLayerId, { feature });
  1615. } else {
  1616. this.feature = undefined;
  1617. }
  1618. }
  1619. },
  1620. async locationFeature(
  1621. bsm,
  1622. layerId,
  1623. { feature = undefined, row = undefined } = {},
  1624. ) {
  1625. if (feature) {
  1626. const geometry = feature.getGeometry();
  1627. const wkt = WkxGeometry.parseGeoJSON(
  1628. new GeoJSON().writeGeometryObject(geometry),
  1629. ).toWkt();
  1630. feature.set('wkt', wkt);
  1631. this.feature = feature;
  1632. this.$vm.$emit('getGeoData', feature); //初始化土地生命周期geo/feature参数
  1633. this.$vm.$emit(
  1634. 'mapClickHandle',
  1635. feature.getProperties(),
  1636. this.visibleLayerId,
  1637. );
  1638. this.$emit('mapClick', feature.getProperties(), this.visibleLayerId);
  1639. }
  1640. this.drawendFeaturePop(this.feature);
  1641. },
  1642. locationMoreFeatureWithShade(where, layerId, setting = {}) {
  1643. this.spinShow = true;
  1644. const layer = this.$refs.configLayer.getLayerConfigById(layerId);
  1645. if (!layer) {
  1646. console.error(`no layer id`);
  1647. return;
  1648. }
  1649. arcgisQuery(
  1650. `${layer.url}/${this.layerIndex}/query`,
  1651. {
  1652. outSR: getSrid(this.map),
  1653. where,
  1654. ...setting,
  1655. },
  1656. false,
  1657. ).then(({ features }) => {
  1658. this.spinShow = false;
  1659. const geos = {
  1660. type: 'FeatureCollection',
  1661. features: [
  1662. {
  1663. type: 'Feature',
  1664. geometry: {
  1665. type: 'MultiPolygon',
  1666. coordinates: [],
  1667. },
  1668. properties: {},
  1669. },
  1670. ],
  1671. };
  1672. let temp = [];
  1673. features.forEach((it) => {
  1674. temp = [...temp, ...it['geometry']['rings']];
  1675. });
  1676. geos['features'][0]['geometry']['coordinates'] = [[...temp]];
  1677. this.addGeoLayer2(geos);
  1678. // MapUtils.drawShade(this.map, JSON.stringify(geos))
  1679. });
  1680. },
  1681. drawendFeaturePop(drawFeature) {
  1682. if (!drawFeature) {
  1683. this.drawFeature = drawFeature;
  1684. return;
  1685. }
  1686. const geometry = drawFeature.getGeometry();
  1687. const area = getArea(geometry, {
  1688. projection: this.map.getView().getProjection(),
  1689. });
  1690. drawFeature.set('area', (area / 666.67).toFixed(2));
  1691. this.drawendDistrict(drawFeature);
  1692. },
  1693. drawendDistrict(drawFeature) {
  1694. // const urls = ['xzqh-s', 'xzqh-x', 'xzqh-z'].map(i => this.getLayerConfigById(i).url)
  1695. const urls = ['xzqh-z'].map((i) => this.getLayerConfigById(i).url);
  1696. const srid = getSrid(this.map);
  1697. const param = {
  1698. geometry: toArcGIS(drawFeature.getGeometry(), true),
  1699. geometryType: 'esriGeometryPolygon',
  1700. spatialRel: 'esriSpatialRelIntersects',
  1701. inSR: srid,
  1702. outSR: srid,
  1703. returnGeometry: false,
  1704. where: `1=1`,
  1705. };
  1706. const promiseArr = urls.map((i) =>
  1707. arcgisQuery(`${i}/${this.layerIndex}/query`, param, false),
  1708. );
  1709. Promise.all(promiseArr).then((resp) => {
  1710. const features = resp
  1711. .filter((i) => i.features.length)
  1712. .map((i) => i.features);
  1713. drawFeature.set(
  1714. 'areaList',
  1715. features.flat().map((i) => i.attributes.FULLNAME.substr(3)),
  1716. );
  1717. this.drawFeature = drawFeature;
  1718. });
  1719. },
  1720. resetMapView() {
  1721. const { districtFeature, map } = this;
  1722. if (districtFeature) {
  1723. mapFit(districtFeature, map);
  1724. } else {
  1725. this.$refs.configLayer.resetMapView();
  1726. }
  1727. },
  1728. drawend(features) {
  1729. // 绘制结束或清空绘制
  1730. const multiPolygon = features
  1731. ? new MultiPolygon(features.map((i) => i.getGeometry()))
  1732. : features;
  1733. const payload = {
  1734. geometry: multiPolygon ? toArcGIS(multiPolygon, true) : '',
  1735. srid: getSrid(this.map),
  1736. };
  1737. this.$store.dispatch('spacemap/setSketchRangeAnalysis', payload);
  1738. },
  1739. getLayerConfigById(layerId) {
  1740. return this.$refs.configLayer.getLayerConfigById(layerId);
  1741. },
  1742. dateFormat(date) {
  1743. if (date === null || date === undefined || date === '') {
  1744. console.log('时间格式化有误,时间为null');
  1745. return '';
  1746. }
  1747. if (typeof date === 'string') {
  1748. return date.substr(0, 10);
  1749. }
  1750. var time = new Date(date);
  1751. var y = time.getFullYear();
  1752. var m = time.getMonth() + 1;
  1753. var d = time.getDate();
  1754. return y + '-' + this.add0(m) + '-' + this.add0(d);
  1755. },
  1756. add0(m) {
  1757. return m < 10 ? '0' + m : m;
  1758. },
  1759. getLayerById(id) {
  1760. return this.$refs.configLayer.getLayerById(id);
  1761. },
  1762. mockDetail(props) {
  1763. this.$vm.$emit('getMockDetail', props);
  1764. },
  1765. bjmockDetail(props) {
  1766. this.$vm.$emit('getBjMockDetail', props);
  1767. },
  1768. locationTsxzDetail(props) {
  1769. this.$vm.$emit('locationTsxzDetail', props);
  1770. },
  1771. tzzxDetail(props) {
  1772. this.$vm.$emit('getTzzxDetail', props);
  1773. },
  1774. statisticsLayer(layerId, setting) {
  1775. const layerById = this.$refs.configLayer.getLayerConfigById(layerId);
  1776. arcgisQuery(
  1777. `${layerById.url}/${this.layerIndex}/query`,
  1778. setting,
  1779. false,
  1780. ).then(({ features }) => {
  1781. this.$vm.$emit(
  1782. 'statisticsLayerCallback',
  1783. features,
  1784. setting['groupByFieldsForStatistics'],
  1785. );
  1786. });
  1787. },
  1788. skyb(p) {
  1789. window.open(`https://yt.zjasm.net/kjzlptv2/blockTool?geometry=${p.wkt}`);
  1790. },
  1791. },
  1792. };
  1793. </script>
  1794. <style lang="scss" scoped>
  1795. .vl-tool-bar {
  1796. display: flex;
  1797. top: 5px !important;
  1798. right: 10px !important;
  1799. > li {
  1800. display: flex;
  1801. align-items: center;
  1802. justify-content: center;
  1803. cursor: pointer;
  1804. width: 34px !important;
  1805. height: 34px !important;
  1806. border: 1px solid #468ec0;
  1807. background: linear-gradient(0deg, #102a54 0%, #3d5a93 100%);
  1808. border-radius: 4px;
  1809. .img {
  1810. width: 18px !important;
  1811. height: 18px !important;
  1812. }
  1813. > div {
  1814. display: flex;
  1815. align-items: center;
  1816. justify-content: center;
  1817. }
  1818. }
  1819. }
  1820. .overlayBox {
  1821. background: url('../../../assets/images/dk_detail_bg.png') no-repeat;
  1822. background-size: 100% 100%;
  1823. padding: 12px 15px;
  1824. border-radius: 2px;
  1825. position: relative;
  1826. font-family: Alibaba PuHuiTi;
  1827. margin-bottom: 40px;
  1828. min-width: 340px;
  1829. > .fixedIcon {
  1830. position: absolute;
  1831. width: 50px;
  1832. height: 50px;
  1833. bottom: -50px;
  1834. left: 0px;
  1835. right: 0px;
  1836. margin: auto;
  1837. background: url('../../../assets/images/map_icon.png') no-repeat;
  1838. background-size: 100% 100%;
  1839. }
  1840. > .title {
  1841. color: #fff;
  1842. position: relative;
  1843. top: -5px;
  1844. font-size: 16px;
  1845. font-weight: bold;
  1846. > .btn {
  1847. float: right;
  1848. cursor: pointer;
  1849. background-color: #0178cd;
  1850. padding: 5px 10px;
  1851. display: inline-block;
  1852. border-radius: 2px;
  1853. margin-top: -5px;
  1854. color: #fff;
  1855. &:hover {
  1856. color: #22f3e2;
  1857. }
  1858. }
  1859. .label {
  1860. float: right;
  1861. color: #22f3e2;
  1862. margin-top: 8px;
  1863. }
  1864. }
  1865. > .content {
  1866. padding: 15px 5px;
  1867. max-width: 360px;
  1868. > h2,
  1869. p {
  1870. color: #fff;
  1871. }
  1872. > h2 {
  1873. font-size: 16px !important;
  1874. margin-bottom: 10px;
  1875. white-space: nowrap;
  1876. text-overflow: ellipsis;
  1877. overflow: hidden;
  1878. font-weight: bold;
  1879. }
  1880. > p {
  1881. font-size: 15px;
  1882. margin: 5px 0px;
  1883. }
  1884. }
  1885. }
  1886. .overview-map {
  1887. position: relative;
  1888. width: 100%;
  1889. height: 100%;
  1890. overflow: hidden;
  1891. $mask-bgc: radial-gradient(
  1892. closest-side at 50%,
  1893. rgba(4, 18, 41, 0) 0,
  1894. rgba(0, 15, 51, 0.2)
  1895. );
  1896. .space-map-mask {
  1897. position: absolute;
  1898. top: 0;
  1899. left: 0;
  1900. z-index: 0;
  1901. width: 100%;
  1902. height: 100%;
  1903. background-image: $mask-bgc;
  1904. pointer-events: none;
  1905. }
  1906. .map-view-info {
  1907. position: absolute;
  1908. bottom: 10px;
  1909. left: 15px;
  1910. width: 350px;
  1911. height: 32px;
  1912. background: rgba(56, 150, 236, 0.64);
  1913. box-shadow: 0 0 20px 1px #012357;
  1914. font-size: 14px;
  1915. font-weight: 400;
  1916. color: #ffffff;
  1917. line-height: 32px;
  1918. text-indent: 1em;
  1919. }
  1920. $bgc: rgba(255, 255, 255, 0.9);
  1921. &::v-deep {
  1922. .vl-tool-bar {
  1923. .vl-tool-bar-item {
  1924. background-color: transparent;
  1925. }
  1926. }
  1927. .vl-legend {
  1928. border: 1px solid #0660b8;
  1929. .legend-panel {
  1930. // background: $bgc;
  1931. background: #02285c;
  1932. color: #00edff;
  1933. .legend-title {
  1934. background: transparent;
  1935. border-bottom: 1px solid #0660b8;
  1936. }
  1937. }
  1938. }
  1939. .vl-layer-tree {
  1940. .layer-dropdown {
  1941. background-color: $bgc;
  1942. }
  1943. }
  1944. }
  1945. .feature-overlay {
  1946. z-index: 999;
  1947. // min-width: 331px;
  1948. // max-width: 400px;
  1949. width: 295px;
  1950. // min-height: 186px;
  1951. // background: url(~@/assets/project/map-overlay.png) no-repeat;
  1952. // background-size: 100% 100%;;
  1953. // padding: 2px 6px 20px;
  1954. color: white;
  1955. background: #fff;
  1956. z-index: 999;
  1957. position: absolute;
  1958. top: 80px;
  1959. right: 20px;
  1960. .title {
  1961. font-size: 18px;
  1962. line-height: 30px;
  1963. font-weight: 600;
  1964. // background: linear-gradient(270deg, #47c4fa 0%, #2390ee 100%);
  1965. background: #2390ee;
  1966. // border-radius: 10px 10px 0px 0px;
  1967. padding-left: 16px;
  1968. .title-label {
  1969. font-size: 16px;
  1970. font-weight: normal;
  1971. float: right;
  1972. cursor: pointer;
  1973. color: #00ffff;
  1974. &:hover {
  1975. font-weight: bolder;
  1976. }
  1977. }
  1978. .detail {
  1979. font-size: 16px;
  1980. color: #22f3e2;
  1981. cursor: pointer;
  1982. margin-left: 5px;
  1983. }
  1984. }
  1985. .section5 {
  1986. padding: 0 20px 10px;
  1987. .name {
  1988. font-weight: 600;
  1989. padding: 10px 0;
  1990. font-size: 17px;
  1991. color: #333333;
  1992. line-height: 22px;
  1993. cursor: default;
  1994. .detail {
  1995. cursor: pointer;
  1996. margin-left: 5px;
  1997. background: #00b9d6;
  1998. border-radius: 3px;
  1999. font-size: 15px;
  2000. color: #ffffff;
  2001. padding: 0 8px;
  2002. }
  2003. }
  2004. table {
  2005. width: 100%;
  2006. font-size: 15px;
  2007. line-height: 15px;
  2008. td,
  2009. th {
  2010. padding: 3px 0;
  2011. }
  2012. th {
  2013. padding-right: 0.5em;
  2014. word-break: keep-all;
  2015. font-weight: normal;
  2016. color: #666666;
  2017. width: 4.3em;
  2018. }
  2019. td {
  2020. min-width: 3em;
  2021. color: #333333;
  2022. font-weight: bold;
  2023. }
  2024. td + th {
  2025. padding-left: 0.5em;
  2026. }
  2027. }
  2028. }
  2029. }
  2030. .ivu-spin-fix {
  2031. z-index: 0 !important;
  2032. background-color: unset;
  2033. color: white;
  2034. background-image: $mask-bgc;
  2035. }
  2036. }
  2037. </style>