datacenter.vue 27 KB

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