datacenter.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  1. <!--信息中心-->
  2. <template>
  3. <div class="visual-con">
  4. <!--头部-->
  5. <vheader></vheader>
  6. <!--主体-->
  7. <div class="visual-body">
  8. <!-- 左侧 -->
  9. <div
  10. class="leftbar w-10"
  11. :class="indentleft"
  12. ref="left"
  13. style="width: 12rem !important; height: 80vh; overflow-y: hidden"
  14. >
  15. <div class="forthis">
  16. <dv-border-box-13
  17. backgroundColor="rgba(12, 19, 38, .90)"
  18. style="padding-bottom: 1rem; height: 80vh"
  19. >
  20. <img
  21. src="../assets/images/integrated/light.png"
  22. style="width: 100%; margin-top: 0.4rem"
  23. />
  24. <div class="sj-search" v-show="showSearch">
  25. <el-input
  26. v-model="searchName"
  27. placeholder="请输入名称"
  28. @blur="searchByName()"
  29. clearable
  30. size="small"
  31. prefix-icon="el-icon-search"
  32. />
  33. </div>
  34. <div class="i-list-con" style="height: 71vh">
  35. <div class="d-l-con-icon">
  36. <div
  37. class="icon-con"
  38. :class="{ on: iconCurrentIndex == item.resourceTable }"
  39. v-for="(item, index) in resourcesList"
  40. v-on:click="indentleftSetMarkers(item.type, item.searchName)"
  41. >
  42. <!--v-on:click="indentleftSetMarkers(item.resourceTable)">-->
  43. <div
  44. class="iconfont icon icon-normal"
  45. :class="item.icon"
  46. :style="'background:' + item.bg"
  47. ></div>
  48. <div class="icon-text">
  49. <h6>{{ item.num }}</h6>
  50. <!--<h6>{{ item.count }}</h6>-->
  51. <h5>{{ item.name }}</h5>
  52. <!--<h5>{{ item.resourceName }}</h5>-->
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </dv-border-box-13>
  58. </div>
  59. </div>
  60. <!-- 地图 -->
  61. <!-- <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" class="indexSupermapClass"-->
  62. <!-- :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>-->
  63. <supermap ref="supermap" style="width: 100%;height: 100vh;" @sewageOutletClick="sewageOutletClick"></supermap>
  64. <!-- <button @click="showEventInfo1" style="position: absolute; right: 50%;top: 45%;z-index: 1000;">弹层事件演示用按钮-->
  65. <!-- </button>-->
  66. <!-- 右侧 -->
  67. <div
  68. class="rightbar"
  69. :class="indentright"
  70. ref="right"
  71. v-if="showSearch == true"
  72. >
  73. <div class="forthis">
  74. <dv-border-box-13
  75. backgroundColor="rgba(12, 19, 38, .90)"
  76. style="padding-bottom: 1rem"
  77. >
  78. <img
  79. src="../assets/images/integrated/light.png"
  80. style="width: 100%; margin-top: 0.4rem"
  81. />
  82. <div class="this-title">
  83. <span>数据分布</span>
  84. <dv-decoration-3
  85. style="width: 150px; height: 15px; margin-right: 1rem"
  86. />
  87. </div>
  88. <div class="i-list-con h-73">
  89. <div class="overflow-y" style="height: 39vh">
  90. <div
  91. class="d-l-con"
  92. :class="{ on: listCurrentIndex == item.deptId }"
  93. v-for="(item, index) in deptGroupList"
  94. v-on:click="indentleftByDeptIdSetMarkers(item.deptId)"
  95. >
  96. <div class="d-l-l-text">
  97. <i class="i-small"></i>
  98. <h4>{{ item.deptName }}</h4>
  99. </div>
  100. <div class="d-l-l-count">{{ item.count }}</div>
  101. </div>
  102. </div>
  103. <div class="overflow-y" style="height: 34vh">
  104. <div id="data-chart" style="width: 100%; height: 34vh"></div>
  105. </div>
  106. </div>
  107. </dv-border-box-13>
  108. </div>
  109. </div>
  110. <vBottomMenu ref="bottomMenu"></vBottomMenu>
  111. <!-- <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">-->
  112. <!-- <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img-->
  113. <!-- src="@/assets/images/mascot.png"/>-->
  114. <!-- </div>-->
  115. <!-- </el-tooltip>-->
  116. </div>
  117. <eventLocation ref="eventLocation"></eventLocation>
  118. <TVWall ref="TVWall"></TVWall>
  119. </div>
  120. </template>
  121. <script>
  122. import {
  123. getResource,
  124. getResourcePoint,
  125. getResourcePointByDeptId,
  126. } from "@/api/datacenter";
  127. import supermap from "@/components/supermap-2.5d"; //超图
  128. import vheader from "@/components/v-header.vue"; //一体化共用头部
  129. import vBottomMenu from "@/components/vBottomMenu.vue"; //一体化公共底部菜单
  130. import eventLocation from "@/components/eventLocation.vue"; //事件定位弹窗
  131. import TVWall from "@/components/TVWall.vue"; //电视墙弹窗
  132. import { getIconBg } from "@/api/components/sookaMapIcon"; //资源底色控制文件
  133. // import echarts from 'echarts'
  134. let echarts = require("echarts");
  135. export default {
  136. components: {
  137. supermap,
  138. vheader,
  139. vBottomMenu,
  140. eventLocation,
  141. TVWall,
  142. },
  143. created() {
  144. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  145. window.showDialog = this.showDialog;
  146. window.choseLayerSwitching = this.choseLayerSwitching;
  147. window.choseLayerSwitchingList = this.choseLayerSwitchingList;
  148. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  149. },
  150. mounted() {
  151. this.getResource();
  152. this.bottomMenuList(); //获取底部公共组件消息和任务
  153. },
  154. data() {
  155. return {
  156. // 搜索框
  157. showSearch: false,
  158. // 搜索名称
  159. searchName: undefined,
  160. // 搜索类型
  161. searchType: undefined,
  162. iconCurrentIndex: "",
  163. listCurrentIndex: "",
  164. markersList: [],
  165. iframeBoo: true,
  166. open: false,
  167. iframeVue: null,
  168. activeName: "info",
  169. radio: "1",
  170. //类型
  171. resourceTable: "",
  172. //左侧资源
  173. resourcesList: [],
  174. //右侧资源
  175. deptGroupList: [],
  176. source: [],
  177. //左右缩进
  178. indentStyle: "",
  179. indentleft: "",
  180. indentright: "",
  181. indentText: "收起左右栏",
  182. indentdisabled: false,
  183. };
  184. },
  185. methods: {
  186. // 根据名称筛选资源点位
  187. searchByName() {
  188. this.$modal.msgSuccess("正在查询,请稍后...");
  189. this.indentleftSetMarkers(this.searchType, this.searchName);
  190. },
  191. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  192. bottomMenuList() {
  193. this.$refs.bottomMenu.selectTaskList(); //获取任务列表
  194. this.$refs.bottomMenu.selectMessageList(); //获取消息列表
  195. },
  196. showDialog(click) {
  197. if (click == "eventLocation") {
  198. this.$refs.eventLocation.showEventLocation();
  199. this.$refs.bottomMenu.showMeasure = false;
  200. this.$refs.bottomMenu.showChild = false;
  201. } else if (click == "editableLayers") {
  202. this.$refs.bottomMenu.showChild = false;
  203. if (!this.$refs.bottomMenu.showMeasure) {
  204. this.$refs.bottomMenu.showMeasure = true;
  205. } else {
  206. this.$refs.bottomMenu.showMeasure = false;
  207. }
  208. } else if (click == "layerSwitching") {
  209. this.$refs.bottomMenu.showMeasure = false;
  210. if (!this.$refs.bottomMenu.showChild) {
  211. this.$refs.bottomMenu.showChild = true;
  212. } else {
  213. this.$refs.bottomMenu.showChild = false;
  214. }
  215. } else if (click == "TVWall") {
  216. this.$refs.TVWall.showTVWall();
  217. this.$refs.bottomMenu.showMeasure = false;
  218. this.$refs.bottomMenu.showChild = false;
  219. }
  220. },
  221. //选择图层
  222. choseLayerSwitching(url, isClear) {
  223. this.$refs.supermap.layerSwitching(url, isClear);
  224. },
  225. //选择图层(传递数组)
  226. choseLayerSwitchingList(urlList) {
  227. this.$refs.supermap.layerSwitchingList(urlList);
  228. },
  229. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  230. //数据分布chart
  231. dataChat() {
  232. // 基于准备好的dom,初始化echarts实例
  233. let myChart = echarts.init(document.getElementById("data-chart"));
  234. // 绘制图表
  235. const dfColor = ["#92E1FF", "#0097FB", "#30ECA6", "#FFC227", "#FF4848"];
  236. myChart.setOption({
  237. dataset: {
  238. source: this.source,
  239. },
  240. tooltip: {
  241. trigger: "item",
  242. },
  243. dataZoom: [
  244. {
  245. show: this.source.length > 8 ? true : false,
  246. type: "slider",
  247. yAxisIndex: 0,
  248. left: 0,
  249. start: 0,
  250. end: this.source.length > 8 ? 8 : 100,
  251. width: 15,
  252. },
  253. ],
  254. grid: {
  255. top: "5%",
  256. left: "2%",
  257. // right: "4%",
  258. bottom: "-15%",
  259. width: "75%",
  260. containLabel: true,
  261. },
  262. xAxis: {
  263. show: false,
  264. type: "value",
  265. },
  266. yAxis: {
  267. type: "category", // 不设置类目轴,抽离的dataset数据展示不出来
  268. inverse: true,
  269. axisLabel: {
  270. show: true,
  271. textStyle: {
  272. color: "#5deaff",
  273. fontSize: "12",
  274. },
  275. },
  276. splitLine: {
  277. show: false,
  278. },
  279. axisTick: {
  280. show: false,
  281. },
  282. axisLine: {
  283. show: false,
  284. },
  285. },
  286. series: [
  287. {
  288. type: "bar",
  289. animationCurve: "easeOutBack",
  290. barWidth: 5,
  291. label: {
  292. show: true,
  293. position: "right",
  294. offset: [0, 0],
  295. color: "#88dfd5",
  296. // fontSize: "12",
  297. style: {
  298. fill: "#fff",
  299. },
  300. },
  301. backgroundBar: {
  302. show: true,
  303. style: {
  304. fill: "rgba(97,152,255,0.20)",
  305. },
  306. },
  307. barStyle: {
  308. stroke: "rgba(41,244,236,1)",
  309. },
  310. gradient: {
  311. color: ["rgba(41,244,236,1)", "rgba(41,244,236,0)"],
  312. },
  313. itemStyle: {
  314. label: {
  315. show: true,
  316. },
  317. labelLine: {
  318. show: false,
  319. },
  320. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  321. {
  322. offset: 0,
  323. color: "rgba(41,244,236,0)",
  324. },
  325. {
  326. offset: 1,
  327. color: "rgba(41,244,236,.5)",
  328. },
  329. ]),
  330. borderColor: "#a2f9f7",
  331. shadowBlur: 16,
  332. shadowColor: "#a2f9f7",
  333. },
  334. },
  335. ],
  336. });
  337. },
  338. //吉祥物收起左右框
  339. indent() {
  340. let list = document.getElementsByClassName("el-tooltip__popper");
  341. list[list.length - 1].style.display = "none";
  342. if (this.indentStyle == "") {
  343. this.indentStyle = "indent-style";
  344. this.indentleft = "indent-left";
  345. this.indentright = "indent-right";
  346. this.indentText = "展开左右栏";
  347. } else if (this.indentText == "展开左右栏") {
  348. this.indentStyle = "";
  349. this.indentleft = "";
  350. this.indentright = "";
  351. this.indentText = "收起左右栏";
  352. }
  353. },
  354. // 弹层方法
  355. // 弹层方法
  356. showEventInfo1() {
  357. this.eventInfoVisible1 = true;
  358. },
  359. showEventInfo2() {
  360. this.eventInfoVisible2 = true;
  361. },
  362. getResource() {
  363. let that = this;
  364. //获取左侧菜单列表
  365. getResource().then((res) => {
  366. that.resourcesList = res.data;
  367. console.log("数据中心", that.resourcesList);
  368. //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
  369. res.data.forEach(function (data, index) {
  370. // console.log("data.type.split('_').slice(-1)", data.type.split('_').slice(-1));
  371. // that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-"));
  372. // // that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data.resourceTable.split('_').slice(-1))
  373. let icon =
  374. "sj" +
  375. "-" +
  376. "icon" +
  377. "-" +
  378. data.type.replaceAll("_", "-").replaceAll("@", "-");
  379. console.log("icon_" + (index + 1) + "=", icon);
  380. that.$set(that.resourcesList[index], "icon", icon);
  381. that.$set(that.resourcesList[index], "bg", getIconBg(icon));
  382. // if(index < 5){
  383. // // that.fireControlViewPoint(data.type, 'undefined');
  384. // that.indentleftSetMarkers(data.type, '所有');
  385. // }
  386. });
  387. //数据自动落点开始
  388. let maxCount = 100; //落点数超过这个数的资源不落点
  389. let list = res.data;
  390. let counts = [];
  391. let points = [];
  392. let types = [];
  393. for (let i = 0; i < list.length; i++) {
  394. //获取符合要求的类型及数量
  395. if (list[i].num <= maxCount) {
  396. counts.push(list[i].num);
  397. points.push({
  398. type: list[i].type,
  399. count: list[i].num,
  400. });
  401. }
  402. }
  403. // alert(counts)//5,1,2,2,3,3,24,17,3
  404. for (let i = 0; i < points.length; i++) {
  405. if (points[i].count == Math.max(...counts)) {
  406. // alert(points[i].count +"==Math.max(...counts)==" + Math.max(...counts))
  407. types.push(points[i].type);
  408. let countsTemp = [];
  409. let pointsTemp = [];
  410. for (let j = 0; j < counts.length; j++) {
  411. // alert("aaa="+counts[j] +"=="+ Math.max(...counts))
  412. if (counts[j] != Math.max(...counts)) {
  413. countsTemp.push(counts[j]);
  414. }
  415. }
  416. // for (let j = 0; j < points.length && points[i].count != counts[j]; j++) {
  417. // pointsTemp.push({
  418. // "type": list[i].type,
  419. // "count": list[i].num
  420. // });
  421. // }
  422. // alert(countsTemp)//5,1,2,2,3,3,24,17,3
  423. // alert(pointsTemp)
  424. // return
  425. counts = countsTemp;
  426. // points = pointsTemp;
  427. // let tail = counts.splice(i+1, counts.length);
  428. // counts = counts.splice(0, i);
  429. // counts.push(tail);
  430. // alert(Math.max(...countsTemp)+"max")
  431. break;
  432. }
  433. }
  434. for (let i = 0; i < points.length; i++) {
  435. // alert(points[i].count +"=="+ Math.max(...counts))
  436. if (points[i].count == Math.max(...counts)) {
  437. types.push(points[i].type);
  438. break;
  439. }
  440. }
  441. for (let i = 0; i < types.length; i++) {
  442. // console.log("if(i < 5){types[i]=", types[i])
  443. that.indentleftSetMarkers(types[i], "所有");
  444. }
  445. //数据自动落点结束
  446. });
  447. },
  448. indentleftSetMarkers(resourceTable, name) {
  449. // 搜索框
  450. // if(name == 'undefined' && this.showSearch == false){
  451. // if(name == '所有' && this.showSearch == false){
  452. if (name == "所有") {
  453. name = undefined;
  454. } else {
  455. this.showSearch = true;
  456. }
  457. // 搜索类型
  458. this.searchType = resourceTable;
  459. this.iconCurrentIndex = resourceTable;
  460. let that = this;
  461. that.resourceTable = resourceTable;
  462. that.markersList = [];
  463. that.source = [];
  464. //点击左侧地图落点
  465. getResourcePoint(resourceTable, name).then((res) => {
  466. that.deptGroupList = res.data.deptGroupList;
  467. if (
  468. res.data.deptGroupList != null &&
  469. res.data.deptGroupList.length > 0
  470. ) {
  471. for (let i = 0; i < res.data.deptGroupList.length; i++) {
  472. let aa = [
  473. res.data.deptGroupList[i].deptName,
  474. res.data.deptGroupList[i].count,
  475. ];
  476. that.source.push(aa);
  477. }
  478. }
  479. if (res.data.resourceList != null && res.data.resourceList.length > 0) {
  480. for (let i = 0; i < res.data.resourceList.length; i++) {
  481. let markersMap = {
  482. lng: 124.59,
  483. lat: 43.02,
  484. icon: "marker",
  485. bindPopupHtml: "",
  486. click: "",
  487. keepBindPopup: false,
  488. isAggregation: false,
  489. };
  490. that.markersList.push(
  491. this.getMarkersMap(
  492. resourceTable,
  493. markersMap,
  494. res.data.resourceList[i]
  495. )
  496. );
  497. // that.markersList.push(markersMap)
  498. }
  499. }
  500. if (this.showSearch == true) {
  501. this.dataChat();
  502. }
  503. that.$refs.supermap.clearM();
  504. that.$refs.supermap.setMarkers(that.markersList);
  505. });
  506. },
  507. indentleftByDeptIdSetMarkers(deptId) {
  508. this.listCurrentIndex = deptId;
  509. let that = this;
  510. //点击左侧地图落点
  511. getResourcePointByDeptId(that.resourceTable, deptId).then((res) => {
  512. console.log("res.data.resourceList=", res.data.resourceList);
  513. // alert(that.resourceTable)
  514. that.markersList = [];
  515. if (res.data.resourceList != null && res.data.resourceList.length > 0) {
  516. for (let i = 0; i < res.data.resourceList.length; i++) {
  517. let markersMap = {
  518. lng: 124.59,
  519. lat: 43.02,
  520. icon: "marker",
  521. bindPopupHtml: "",
  522. click: "",
  523. keepBindPopup: false,
  524. isAggregation: false,
  525. };
  526. that.markersList.push(
  527. this.getMarkersMap(
  528. that.resourceTable,
  529. markersMap,
  530. res.data.resourceList[i]
  531. )
  532. );
  533. // that.markersList.push(markersMap)
  534. }
  535. }
  536. that.$refs.supermap.clearM();
  537. that.$refs.supermap.setMarkers(that.markersList);
  538. });
  539. },
  540. sewageOutletClick(data) {
  541. console.log(data);
  542. const params = Object.assign({});
  543. params.longitude = data.longitude;
  544. params.latitude = data.latitude;
  545. const treeLabels = [
  546. {
  547. id: null,
  548. labelCode: "999",
  549. labelName: "电视墙",
  550. cameraType: null,
  551. parentLabelCode: "",
  552. },
  553. ];
  554. const labelChannels = [];
  555. for (let i in data.cameraList) {
  556. treeLabels.push({
  557. id: null,
  558. labelCode: data.cameraList[i].cameraCode,
  559. labelName: data.cameraList[i].cameraName,
  560. cameraType: "1",
  561. parentLabelCode: "999",
  562. });
  563. labelChannels.push({
  564. labelCode: data.cameraList[i].cameraCode,
  565. channelDates: [
  566. {
  567. channelCode: data.cameraList[i].cameraCode,
  568. channelName: data.cameraList[i].cameraName,
  569. channelSn: null,
  570. cameraType: "1",
  571. online: "1",
  572. cameraCode: "1",
  573. },
  574. ],
  575. });
  576. }
  577. const dianshiqiang = [
  578. {
  579. switchTab: "2",
  580. treeLabels: treeLabels,
  581. labelChannels: labelChannels,
  582. },
  583. ];
  584. if (data.cameraList.length > 0) {
  585. this.$refs.TVWall.showTVWall1(
  586. data.longitude,
  587. data.latitude,
  588. dianshiqiang
  589. );
  590. }
  591. },
  592. getMarkersMap(resourceTable, markersMap, item) {
  593. markersMap.click = "sewageOutletClick";
  594. markersMap.parameter = item;
  595. if (resourceTable == "centerdata_t_resources_illegal_construction") {
  596. //违建信息
  597. markersMap.icon =
  598. "sj-icon-map-centerdata-t-resources-illegal-constructionon";
  599. markersMap.lng = item.longitude ? item.longitude : "";
  600. markersMap.lat = item.latitude ? item.latitude : "";
  601. markersMap.bindPopupHtml =
  602. '<div class="map-tip">' +
  603. "<span>" +
  604. ' <div class="d-l-con">' +
  605. ' <div class="d-l-l-text">' +
  606. " <h4>经纬度:" +
  607. (item.longitude ? item.longitude : "") +
  608. "," +
  609. (item.latitude ? item.latitude : "") +
  610. "</h4>" +
  611. " </div>" +
  612. " </div>" +
  613. " </span>" +
  614. "<span>" +
  615. ' <div class="d-l-con">' +
  616. ' <div class="d-l-l-text">' +
  617. " <h4>名称:" +
  618. (item.name ? item.name : "") +
  619. "</h4>" +
  620. " </div>" +
  621. " </div>" +
  622. " </span>" +
  623. "<span>" +
  624. ' <div class="d-l-con">' +
  625. ' <div class="d-l-l-text">' +
  626. " <h4>违建处理负责人:" +
  627. (item.person ? item.person : "") +
  628. "</h4>" +
  629. " </div>" +
  630. " </div>" +
  631. " </span>" +
  632. "<span>" +
  633. ' <div class="d-l-con">' +
  634. ' <div class="d-l-l-text">' +
  635. " <h4>联系方式:" +
  636. (item.phone ? item.phone : "") +
  637. "</h4>" +
  638. " </div>" +
  639. " </div>" +
  640. " </span></div>";
  641. } else if (resourceTable == "centerdata_t_resources_deposit") {
  642. //矿产资源
  643. markersMap.icon = "sj-icon-map-centerdata-t-resources-deposit";
  644. markersMap.lng = item.longitude ? item.longitude : "";
  645. markersMap.lat = item.latitude ? item.latitude : "";
  646. markersMap.bindPopupHtml =
  647. '<div class="map-tip">' +
  648. "<span>" +
  649. ' <div class="d-l-con">' +
  650. ' <div class="d-l-l-text">' +
  651. " <h4>经纬度:" +
  652. (item.longitude ? item.longitude : "") +
  653. "," +
  654. (item.latitude ? item.latitude : "") +
  655. "</h4>" +
  656. " </div>" +
  657. " </div>" +
  658. " </span>" +
  659. "<span>" +
  660. ' <div class="d-l-con">' +
  661. ' <div class="d-l-l-text">' +
  662. " <h4>名称:" +
  663. (item.name ? item.name : "") +
  664. "</h4>" +
  665. " </div>" +
  666. " </div>" +
  667. " </span>" +
  668. "<span>" +
  669. ' <div class="d-l-con">' +
  670. ' <div class="d-l-l-text">' +
  671. " <h4>联系人:" +
  672. (item.person ? item.person : "") +
  673. "</h4>" +
  674. " </div>" +
  675. " </div>" +
  676. " </span>" +
  677. "<span>" +
  678. ' <div class="d-l-con">' +
  679. ' <div class="d-l-l-text">' +
  680. " <h4>电话:" +
  681. (item.phone ? item.phone : "") +
  682. "</h4>" +
  683. " </div>" +
  684. " </div>" +
  685. " </span></div>";
  686. } else if (resourceTable == "centerdata_t_resources_forest") {
  687. //森林资源管理信息
  688. markersMap.icon = "sj-icon-map-centerdata-t-forest-landing";
  689. markersMap.lng = item.longitude ? item.longitude : "";
  690. markersMap.lat = item.latitude ? item.latitude : "";
  691. markersMap.bindPopupHtml =
  692. '<div class="map-tip">' +
  693. "<span>" +
  694. ' <div class="d-l-con">' +
  695. ' <div class="d-l-l-text">' +
  696. " <h4>经纬度:" +
  697. (item.longitude ? item.longitude : "") +
  698. "," +
  699. (item.latitude ? item.latitude : "") +
  700. "</h4>" +
  701. " </div>" +
  702. " </div>" +
  703. " </span>" +
  704. "<span>" +
  705. ' <div class="d-l-con">' +
  706. ' <div class="d-l-l-text">' +
  707. " <h4>名称:" +
  708. (item.name ? item.name : "") +
  709. "</h4>" +
  710. " </div>" +
  711. " </div>" +
  712. " </span>" +
  713. "<span>" +
  714. ' <div class="d-l-con">' +
  715. ' <div class="d-l-l-text">' +
  716. " <h4>占地范围:" +
  717. (item.zdfw ? item.zdfw : "") +
  718. "</h4>" +
  719. " </div>" +
  720. " </div>" +
  721. " </span>" +
  722. "<span>" +
  723. ' <div class="d-l-con">' +
  724. ' <div class="d-l-l-text">' +
  725. " <h4>占地面积(万公顷):" +
  726. (item.landArea ? item.landArea : "") +
  727. "</h4>" +
  728. " </div>" +
  729. " </div>" +
  730. " </span></div>";
  731. } else if (resourceTable == "centerdata_t_resources_geologic_hazard") {
  732. //地质灾害易发区
  733. markersMap.icon = "sj-icon-map-centerdata-t-resources-geologic-hazard";
  734. markersMap.lng = item.longitude ? item.longitude : "";
  735. markersMap.lat = item.latitude ? item.latitude : "";
  736. markersMap.bindPopupHtml =
  737. '<div class="map-tip">' +
  738. "<span>" +
  739. ' <div class="d-l-con">' +
  740. ' <div class="d-l-l-text">' +
  741. " <h4>经纬度:" +
  742. (item.longitude ? item.longitude : "") +
  743. "," +
  744. (item.latitude ? item.latitude : "") +
  745. "</h4>" +
  746. " </div>" +
  747. " </div>" +
  748. " </span>" +
  749. "<span>" +
  750. ' <div class="d-l-con">' +
  751. ' <div class="d-l-l-text">' +
  752. " <h4>名称:" +
  753. (item.name ? item.name : "") +
  754. "</h4>" +
  755. " </div>" +
  756. " </div>" +
  757. " </span>" +
  758. "<span>" +
  759. ' <div class="d-l-con">' +
  760. ' <div class="d-l-l-text">' +
  761. " <h4>联系人:" +
  762. (item.person ? item.person : "") +
  763. "</h4>" +
  764. " </div>" +
  765. " </div>" +
  766. " </span>" +
  767. "<span>" +
  768. ' <div class="d-l-con">' +
  769. ' <div class="d-l-l-text">' +
  770. " <h4>电话:" +
  771. (item.phone ? item.phone : "") +
  772. "</h4>" +
  773. " </div>" +
  774. " </div>" +
  775. " </span></div>";
  776. } else if (resourceTable == "centerdata_t_resources_hydroenergy") {
  777. //水能资源
  778. markersMap.icon = "sj-icon-map-centerdata-t-forest-checkpoint";
  779. markersMap.lng = item.longitude ? item.longitude : "";
  780. markersMap.lat = item.latitude ? item.latitude : "";
  781. markersMap.bindPopupHtml =
  782. '<div class="map-tip">' +
  783. "<span>" +
  784. ' <div class="d-l-con">' +
  785. ' <div class="d-l-l-text">' +
  786. " <h4>经纬度:" +
  787. (item.longitude ? item.longitude : "") +
  788. "," +
  789. (item.latitude ? item.latitude : "") +
  790. "</h4>" +
  791. " </div>" +
  792. " </div>" +
  793. " </span>" +
  794. "<span>" +
  795. ' <div class="d-l-con">' +
  796. ' <div class="d-l-l-text">' +
  797. " <h4>名称:" +
  798. (item.name ? item.name : "") +
  799. "</h4>" +
  800. " </div>" +
  801. " </div>" +
  802. " </span>" +
  803. "<span>" +
  804. ' <div class="d-l-con">' +
  805. ' <div class="d-l-l-text">' +
  806. " <h4>联系人:" +
  807. (item.person ? item.person : "") +
  808. "</h4>" +
  809. " </div>" +
  810. " </div>" +
  811. " </span>" +
  812. "<span>" +
  813. ' <div class="d-l-con">' +
  814. ' <div class="d-l-l-text">' +
  815. " <h4>位置:" +
  816. (item.address ? item.address : "") +
  817. "</h4>" +
  818. " </div>" +
  819. " </div>" +
  820. " </span>" +
  821. "<span>" +
  822. ' <div class="d-l-con">' +
  823. ' <div class="d-l-l-text">' +
  824. " <h4>电话:" +
  825. (item.phone ? item.phone : "") +
  826. "</h4>" +
  827. " </div>" +
  828. " </div>" +
  829. " </span></div>";
  830. } else if (resourceTable == "centerdata_t_resources_land") {
  831. //土地资源管理信息
  832. markersMap.icon = "sj-icon-map-centerdata-t-forest-waterintake";
  833. markersMap.lng = item.longitude ? item.longitude : "";
  834. markersMap.lat = item.latitude ? item.latitude : "";
  835. markersMap.bindPopupHtml =
  836. '<div class="map-tip">' +
  837. "<span>" +
  838. ' <div class="d-l-con">' +
  839. ' <div class="d-l-l-text">' +
  840. " <h4>经纬度:" +
  841. (item.longitude ? item.longitude : "") +
  842. "," +
  843. (item.latitude ? item.latitude : "") +
  844. "</h4>" +
  845. " </div>" +
  846. " </div>" +
  847. " </span>" +
  848. "<span>" +
  849. ' <div class="d-l-con">' +
  850. ' <div class="d-l-l-text">' +
  851. " <h4>名称:" +
  852. (item.name ? item.name : "") +
  853. "</h4>";
  854. " </div>" +
  855. " </div>" +
  856. " </span>" +
  857. "<span>" +
  858. ' <div class="d-l-con">' +
  859. ' <div class="d-l-l-text">' +
  860. " <h4>占地面积(万公顷):" +
  861. (item.landArea ? item.landArea : "") +
  862. "</h4>" +
  863. " </div>" +
  864. " </div>" +
  865. " </span></div>";
  866. }
  867. return markersMap;
  868. },
  869. },
  870. };
  871. </script>
  872. <style rel="stylesheet/scss" lang="scss" scoped>
  873. @import "@/assets/styles/base.scss";
  874. </style>