datacenter.vue 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392
  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: 13rem !important">
  10. <div class="forthis">
  11. <dv-border-box-13
  12. backgroundColor="rgba(12, 19, 38, .90)"
  13. style="padding-bottom: 1rem"
  14. >
  15. <img
  16. src="../assets/images/integrated/light.png"
  17. style="width: 100%; margin-top: 0.4rem"
  18. />
  19. <div class="i-list-con h-78">
  20. <div class="i-list-con h-65" v-show="showSearch == true">
  21. <div class="head-container" v-show="showSearch == true">
  22. <el-input
  23. v-model="searchName"
  24. placeholder="请输入名称"
  25. @blur="searchByName()"
  26. clearable
  27. size="small"
  28. prefix-icon="el-icon-search"
  29. style="margin-bottom: 20px"
  30. />
  31. </div>
  32. </div>
  33. <div class="d-l-con-icon">
  34. <div
  35. class="icon-con"
  36. :class="{ on: iconCurrentIndex == item.resourceTable }"
  37. v-for="(item, index) in resourcesList"
  38. v-on:click="fireControlViewPoint(item.type, searchName)"
  39. >
  40. <div
  41. class="iconfont icon icon-normal"
  42. :class="item.icon"
  43. :style="'background:' + item.bg"
  44. ></div>
  45. <div class="icon-text">
  46. <h6>{{ item.num }}</h6>
  47. <h5>{{ item.name }}</h5>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </dv-border-box-13>
  53. </div>
  54. </div>
  55. <!-- 地图 -->
  56. <supermap ref="supermap" style="width: 100%; height: 100vh"></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. getResource,
  107. fireControlViewList,
  108. getResourcePoint,
  109. fireControlViewPoint,
  110. getResourcePointByDeptId,
  111. getPointByDeptId,
  112. } from "@/api/datacenter";
  113. import supermap from "@/components/supermap-2.5d"; //超图
  114. import vheader from "@/components/v-header.vue"; //一体化共用头部
  115. import vBottomMenu from "@/components/vBottomMenu.vue"; //一体化公共底部菜单
  116. import eventLocation from "@/components/eventLocation.vue"; //事件定位弹窗
  117. import TVWall from "@/components/TVWall.vue"; //电视墙弹窗
  118. import { getIconBg } from "@/api/components/sookaMapIcon"; //资源底色控制文件
  119. // import echarts from 'echarts'
  120. let echarts = require("echarts");
  121. export default {
  122. components: {
  123. supermap,
  124. vheader,
  125. vBottomMenu,
  126. eventLocation,
  127. TVWall,
  128. },
  129. created() {
  130. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  131. window.showDialog = this.showDialog;
  132. window.choseLayerSwitching = this.choseLayerSwitching;
  133. window.choseLayerSwitchingList = this.choseLayerSwitchingList;
  134. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  135. },
  136. mounted() {
  137. // this.getResource()
  138. this.fireControlViewList();
  139. this.bottomMenuList(); //获取底部公共组件消息和任务
  140. },
  141. data() {
  142. return {
  143. // 搜索框
  144. showSearch: false,
  145. // 搜索名称
  146. searchName: undefined,
  147. // 搜索类型
  148. searchType: undefined,
  149. iconCurrentIndex: "",
  150. listCurrentIndex: "",
  151. markersList: [],
  152. iframeBoo: true,
  153. open: false,
  154. iframeVue: null,
  155. activeName: "info",
  156. radio: "1",
  157. //类型
  158. resourceTable: "",
  159. //左侧资源
  160. resourcesList: [],
  161. //右侧资源
  162. deptGroupList: [],
  163. source: [],
  164. };
  165. },
  166. watch: {
  167. // // 根据名称筛选资源点位
  168. // searchName(searchName) {
  169. // // alert(val)
  170. // this.fireControlViewPoint(this.searchType, searchName);
  171. // },
  172. },
  173. methods: {
  174. // 根据名称筛选资源点位
  175. searchByName() {
  176. this.$modal.msgSuccess("正在查询,请稍后...");
  177. this.fireControlViewPoint(this.searchType, this.searchName);
  178. },
  179. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  180. bottomMenuList() {
  181. this.$refs.bottomMenu.selectTaskList(); //获取任务列表
  182. this.$refs.bottomMenu.selectMessageList(); //获取消息列表
  183. },
  184. showDialog(click) {
  185. if (click == "eventLocation") {
  186. this.$refs.eventLocation.showEventLocation();
  187. this.$refs.supermap.isEditableLayers = false;
  188. this.$refs.bottomMenu.showChild = false;
  189. } else if (click == "editableLayers") {
  190. this.$refs.bottomMenu.showChild = false;
  191. if (!this.$refs.supermap.isEditableLayers) {
  192. this.$refs.supermap.isEditableLayers = true;
  193. } else {
  194. this.$refs.supermap.isEditableLayers = false;
  195. }
  196. } else if (click == "layerSwitching") {
  197. this.$refs.supermap.isEditableLayers = false;
  198. if (!this.$refs.bottomMenu.showChild) {
  199. this.$refs.bottomMenu.showChild = true;
  200. } else {
  201. this.$refs.bottomMenu.showChild = false;
  202. }
  203. } else if (click == "TVWall") {
  204. this.$refs.TVWall.showTVWall();
  205. this.$refs.supermap.isEditableLayers = false;
  206. this.$refs.bottomMenu.showChild = false;
  207. }
  208. },
  209. //选择图层
  210. choseLayerSwitching(url, isClear) {
  211. this.$refs.supermap.layerSwitching(url, isClear);
  212. },
  213. //选择图层(传递数组)
  214. choseLayerSwitchingList(urlList) {
  215. this.$refs.supermap.layerSwitchingList(urlList);
  216. },
  217. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  218. //数据分布chart
  219. dataChat() {
  220. // 基于准备好的dom,初始化echarts实例
  221. let myChart = echarts.init(document.getElementById("data-chart"));
  222. // 绘制图表
  223. const dfColor = ["#92E1FF", "#0097FB", "#30ECA6", "#FFC227", "#FF4848"];
  224. myChart.setOption({
  225. dataset: {
  226. source: this.source,
  227. },
  228. tooltip: {
  229. trigger: "item",
  230. },
  231. grid: {
  232. top: "5%",
  233. left: "2%",
  234. // right: "4%",
  235. bottom: "-15%",
  236. width: "75%",
  237. containLabel: true,
  238. },
  239. xAxis: {
  240. show: false,
  241. type: "value",
  242. },
  243. yAxis: {
  244. type: "category", // 不设置类目轴,抽离的dataset数据展示不出来
  245. inverse: true,
  246. axisLabel: {
  247. show: true,
  248. textStyle: {
  249. color: "#5deaff",
  250. fontSize: "12",
  251. },
  252. },
  253. splitLine: {
  254. show: false,
  255. },
  256. axisTick: {
  257. show: false,
  258. },
  259. axisLine: {
  260. show: false,
  261. },
  262. },
  263. series: [
  264. {
  265. type: "bar",
  266. animationCurve: "easeOutBack",
  267. barWidth: 5,
  268. label: {
  269. show: true,
  270. position: "right",
  271. offset: [0, 0],
  272. color: "#88dfd5",
  273. // fontSize: "12",
  274. style: {
  275. fill: "#fff",
  276. },
  277. },
  278. backgroundBar: {
  279. show: true,
  280. style: {
  281. fill: "rgba(97,152,255,0.20)",
  282. },
  283. },
  284. barStyle: {
  285. stroke: "rgba(41,244,236,1)",
  286. },
  287. gradient: {
  288. color: ["rgba(41,244,236,1)", "rgba(41,244,236,0)"],
  289. },
  290. itemStyle: {
  291. label: {
  292. show: true,
  293. },
  294. labelLine: {
  295. show: false,
  296. },
  297. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  298. {
  299. offset: 0,
  300. color: "rgba(41,244,236,0)",
  301. },
  302. {
  303. offset: 1,
  304. color: "rgba(41,244,236,.5)",
  305. },
  306. ]),
  307. borderColor: "#a2f9f7",
  308. shadowBlur: 16,
  309. shadowColor: "#a2f9f7",
  310. },
  311. },
  312. ],
  313. });
  314. },
  315. // 弹层方法
  316. showEventInfo1() {
  317. this.eventInfoVisible1 = true;
  318. },
  319. showEventInfo2() {
  320. this.eventInfoVisible2 = true;
  321. },
  322. fireControlViewList() {
  323. let that = this;
  324. fireControlViewList().then(function (res) {
  325. that.resourcesList = res.data;
  326. //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
  327. res.data.forEach(function (data, index) {
  328. let icon =
  329. "sj" +
  330. "-" +
  331. "icon" +
  332. "-" +
  333. data.type.replaceAll("_", "-").replaceAll("@", "-");
  334. console.log("icon_" + (index + 1) + "=", icon);
  335. that.$set(that.resourcesList[index], "icon", icon);
  336. //每个图标对应固定颜色
  337. that.$set(that.resourcesList[index], "bg", getIconBg(icon));
  338. // if(index < 5){
  339. // // that.fireControlViewPoint(data.type, 'undefined');
  340. // that.fireControlViewPoint(data.type, '所有');
  341. // }
  342. });
  343. //数据自动落点开始
  344. let maxCount = 100; //落点数超过这个数的资源不落点
  345. let list = res.data;
  346. let counts = [];
  347. let points = [];
  348. let types = [];
  349. for (let i = 0; i < list.length; i++) {
  350. //获取符合要求的类型及数量
  351. if (list[i].num <= maxCount) {
  352. counts.push(list[i].num);
  353. points.push({
  354. type: list[i].type,
  355. count: list[i].num,
  356. });
  357. }
  358. }
  359. for (let i = 0; i < points.length; i++) {
  360. if (points[i].count == Math.max(...counts)) {
  361. types.push(points[i].type);
  362. let countsTemp = [];
  363. for (let j = 0; j < counts.length; j++) {
  364. if (counts[j] != Math.max(...counts)) {
  365. countsTemp.push(counts[j]);
  366. }
  367. }
  368. counts = countsTemp;
  369. break;
  370. }
  371. }
  372. for (let i = 0; i < points.length; i++) {
  373. if (points[i].count == Math.max(...counts)) {
  374. types.push(points[i].type);
  375. break;
  376. }
  377. }
  378. for (let i = 0; i < types.length; i++) {
  379. that.fireControlViewPoint(types[i], "所有");
  380. }
  381. //数据自动落点结束
  382. });
  383. },
  384. /* getResource() {
  385. let that = this
  386. //获取左侧菜单列表
  387. getResource().then(res => {
  388. that.resourcesList = res.data
  389. //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
  390. res.data.forEach(function(data, index) {
  391. that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data.icon.split('_').slice(-1))
  392. })
  393. })
  394. },*/
  395. fireControlViewPoint(resourceTable, name) {
  396. // 搜索框
  397. // if(name == 'undefined' && this.showSearch == false){
  398. // if(name == '所有' && this.showSearch == false){
  399. if (name == "所有") {
  400. name = undefined;
  401. } else {
  402. this.showSearch = true;
  403. }
  404. // console.log("name=", name = "111111111235464")
  405. console.log("name=", name);
  406. console.log("this.showSearch=", this.showSearch);
  407. // 搜索类型
  408. this.searchType = resourceTable;
  409. let that = this;
  410. that.resourceTable = resourceTable;
  411. that.markersList = [];
  412. that.source = [];
  413. fireControlViewPoint(resourceTable, name).then((res) => {
  414. let pointList = res.data.pointList;
  415. that.deptGroupList = res.data.deptList;
  416. if (res.data.deptList != null && res.data.deptList.length > 0) {
  417. for (let i = 0; i < res.data.deptList.length; i++) {
  418. let aa = [
  419. res.data.deptList[i].deptName,
  420. res.data.deptList[i].count,
  421. ];
  422. that.source.push(aa);
  423. }
  424. }
  425. if (res.data.pointList != null && res.data.pointList.length > 0) {
  426. for (let i = 0; i < res.data.pointList.length; i++) {
  427. let markersMap = {
  428. lng: res.data.pointList[i].longitude,
  429. lat: res.data.pointList[i].latitude,
  430. icon: "marker",
  431. bindPopupHtml: "",
  432. click: "",
  433. name: i,
  434. keepBindPopup: false,
  435. isAggregation: false,
  436. };
  437. that.markersList.push(
  438. this.getMarkersMap(
  439. resourceTable,
  440. markersMap,
  441. res.data.pointList[i]
  442. )
  443. );
  444. // that.markersList.push(markersMap)
  445. }
  446. }
  447. if (this.showSearch == true) {
  448. this.dataChat();
  449. }
  450. that.$refs.supermap.clearM(false);
  451. that.$refs.supermap.setMarkers(that.markersList);
  452. });
  453. },
  454. getMarkersMap(resourceTable, markersMap, item) {
  455. if (resourceTable == "centerdata_t_firecontrol_basic_linkage_force") {
  456. //基本联动力量
  457. markersMap.icon =
  458. "sj-icon-map-centerdata-t-firecontrol-basic-linkage-force";
  459. markersMap.lng = item.longitude;
  460. markersMap.lat = item.latitude;
  461. markersMap.bindPopupHtml =
  462. '<div class="map-tip">' +
  463. "<span>" +
  464. ' <div class="d-l-con">' +
  465. ' <div class="d-l-l-text">' +
  466. " <h4>经纬度:" +
  467. (item.longitude ? item.longitude : "") +
  468. "," +
  469. (item.latitude ? item.latitude : "") +
  470. "</h4>" +
  471. " </div>" +
  472. " </div>" +
  473. " </span>" +
  474. "<span>" +
  475. ' <div class="d-l-con">' +
  476. ' <div class="d-l-l-text">' +
  477. " <h4>单位名称:" +
  478. (item.company ? item.company : "") +
  479. "</h4>" +
  480. " </div>" +
  481. " </div>" +
  482. " </span>" +
  483. "</div>";
  484. } else if (resourceTable == "centerdata_t_firecontrol_fire_force") {
  485. //消防力量
  486. markersMap.icon = "sj-icon-map-centerdata-t-firecontrol-fire-force";
  487. markersMap.lng = item.longitude;
  488. markersMap.lat = item.latitude;
  489. markersMap.bindPopupHtml =
  490. '<div class="map-tip">' +
  491. "<span>" +
  492. ' <div class="d-l-con">' +
  493. ' <div class="d-l-l-text">' +
  494. " <h4>经纬度:" +
  495. (item.longitude ? item.longitude : "") +
  496. "," +
  497. (item.latitude ? item.latitude : "") +
  498. "</h4>" +
  499. " </div>" +
  500. " </div>" +
  501. " </span>" +
  502. "<span>" +
  503. ' <div class="d-l-con">' +
  504. ' <div class="d-l-l-text">' +
  505. " <h4>地址:" +
  506. (item.address ? item.address : "") +
  507. "</h4>" +
  508. " </div>" +
  509. " </div>" +
  510. " </span>" +
  511. "<span>" +
  512. ' <div class="d-l-con">' +
  513. ' <div class="d-l-l-text">' +
  514. " <h4>负责人:" +
  515. (item.principal ? item.principal : "") +
  516. "</h4>" +
  517. " </div>" +
  518. " </div>" +
  519. " </span>" +
  520. "<span>" +
  521. ' <div class="d-l-con">' +
  522. ' <div class="d-l-l-text">' +
  523. " <h4>联系电话:" +
  524. (item.contact ? item.contact : "") +
  525. "</h4>" +
  526. " </div>" +
  527. " </div>" +
  528. " </span></div>";
  529. } else if (resourceTable == "centerdata_t_forest_waterintake") {
  530. //取水口
  531. markersMap.icon = "sj-icon-map-centerdata-t-forest-waterintake";
  532. markersMap.lng = item.longitude;
  533. markersMap.lat = item.latitude;
  534. markersMap.bindPopupHtml =
  535. '<div class="map-tip">' +
  536. "<span>" +
  537. ' <div class="d-l-con">' +
  538. ' <div class="d-l-l-text">' +
  539. " <h4>经纬度:" +
  540. (item.longitude ? item.longitude : "") +
  541. "," +
  542. (item.latitude ? item.latitude : "") +
  543. "</h4>" +
  544. " </div>" +
  545. " </div>" +
  546. " </span>" +
  547. "<span>" +
  548. ' <div class="d-l-con">' +
  549. ' <div class="d-l-l-text">' +
  550. " <h4>取水口名称:" +
  551. (item.name ? item.name : "") +
  552. "</h4>" +
  553. " </div>" +
  554. " </div>" +
  555. " </span>" +
  556. "<span>" +
  557. ' <div class="d-l-con">' +
  558. ' <div class="d-l-l-text">' +
  559. " <h4>负责人:" +
  560. (item.contacts ? item.contacts : "") +
  561. "</h4>" +
  562. " </div>" +
  563. " </div>" +
  564. " </span>" +
  565. (item.phone
  566. ? "<span>" +
  567. ' <div class="d-l-con">' +
  568. ' <div class="d-l-l-text">' +
  569. " <h4>联系电话:" +
  570. item.phone +
  571. "</h4>" +
  572. " </div>" +
  573. " </div>" +
  574. " </span></div>"
  575. : "");
  576. } else if (resourceTable == "centerdata_t_forest_watercrane") {
  577. //水鹤
  578. markersMap.icon = "sj-icon-map-centerdata-t-forest-watercrane";
  579. markersMap.lng = item.longitude;
  580. markersMap.lat = item.latitude;
  581. markersMap.bindPopupHtml =
  582. '<div class="map-tip">' +
  583. "<span>" +
  584. ' <div class="d-l-con">' +
  585. ' <div class="d-l-l-text">' +
  586. " <h4>经纬度:" +
  587. (item.longitude ? item.longitude : "") +
  588. "," +
  589. (item.latitude ? item.latitude : "") +
  590. "</h4>" +
  591. " </div>" +
  592. " </div>" +
  593. " </span>" +
  594. "<span>" +
  595. ' <div class="d-l-con">' +
  596. ' <div class="d-l-l-text">' +
  597. " <h4>水鹤名称:" +
  598. (item.name ? item.name : "") +
  599. "</h4>" +
  600. " </div>" +
  601. " </div>" +
  602. " </span>" +
  603. "<span>" +
  604. ' <div class="d-l-con">' +
  605. ' <div class="d-l-l-text">' +
  606. " <h4>负责人:" +
  607. (item.contacts ? item.contacts : "") +
  608. "</h4>" +
  609. " </div>" +
  610. " </div>" +
  611. " </span>" +
  612. "<span>" +
  613. ' <div class="d-l-con">' +
  614. ' <div class="d-l-l-text">' +
  615. " <h4>联系电话:" +
  616. (item.phone ? item.phone : "") +
  617. "</h4>" +
  618. " </div>" +
  619. " </div>" +
  620. " </span></div>";
  621. } else if (
  622. resourceTable == "centerdata_t_forest_firehydrant@1" ||
  623. resourceTable == "centerdata_t_forest_firehydrant@2" ||
  624. resourceTable == "centerdata_t_forest_firehydrant@3"
  625. ) {
  626. //消火栓
  627. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-foam-liquid'
  628. let icon =
  629. "sj-icon-map-centerdata-t-forest-firehydrant-" +
  630. resourceTable.slice(-1);
  631. // sj-icon-map-centerdata-t-forest-firehydrant-1
  632. console.log("icon=", icon);
  633. markersMap.icon = icon;
  634. markersMap.lng = item.longitude;
  635. markersMap.lat = item.latitude;
  636. markersMap.bindPopupHtml =
  637. '<div class="map-tip">' +
  638. "<span>" +
  639. ' <div class="d-l-con">' +
  640. ' <div class="d-l-l-text">' +
  641. " <h4>经纬度:" +
  642. (item.longitude ? item.longitude : "") +
  643. "," +
  644. (item.latitude ? item.latitude : "") +
  645. "</h4>" +
  646. " </div>" +
  647. " </div>" +
  648. " </span>" +
  649. "<span>" +
  650. ' <div class="d-l-con">' +
  651. ' <div class="d-l-l-text">' +
  652. " <h4>消火栓名称:" +
  653. (item.name ? item.name : "") +
  654. "</h4>" +
  655. " </div>" +
  656. " </div>" +
  657. " </span>" +
  658. "<span>" +
  659. ' <div class="d-l-con">' +
  660. ' <div class="d-l-l-text">' +
  661. " <h4>负责人:" +
  662. (item.contacts ? item.contacts : "") +
  663. "</h4>" +
  664. " </div>" +
  665. " </div>" +
  666. " </span>" +
  667. "<span>" +
  668. ' <div class="d-l-con">' +
  669. ' <div class="d-l-l-text">' +
  670. " <h4>联系电话:" +
  671. (item.phone ? item.phone : "") +
  672. "</h4>" +
  673. " </div>" +
  674. " </div>" +
  675. " </span></div>";
  676. } else if (resourceTable == "centerdata_t_firecontrol_fire_key_places") {
  677. //重点场所
  678. markersMap.icon =
  679. "sj-icon-map-centerdata-t-firecontrol-fire-key-places";
  680. markersMap.lng = item.longitude;
  681. markersMap.lat = item.latitude;
  682. markersMap.bindPopupHtml =
  683. '<div class="map-tip">' +
  684. "<span>" +
  685. ' <div class="d-l-con">' +
  686. ' <div class="d-l-l-text">' +
  687. " <h4>经纬度:" +
  688. (item.longitude ? item.longitude : "") +
  689. "," +
  690. (item.latitude ? item.latitude : "") +
  691. "</h4>" +
  692. " </div>" +
  693. " </div>" +
  694. " </span>" +
  695. "<span>" +
  696. ' <div class="d-l-con">' +
  697. ' <div class="d-l-l-text">' +
  698. " <h4>重点场所名称:" +
  699. (item.name ? item.name : "") +
  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.person ? item.person : "") +
  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.phone ? item.phone : "") +
  718. "</h4>" +
  719. " </div>" +
  720. " </div>" +
  721. " </span></div>";
  722. } else if (
  723. resourceTable == "centerdata_t_firecontrol_fire_pressure_sensor"
  724. ) {
  725. //压力传感器
  726. markersMap.icon =
  727. "sj-icon-map-centerdata-t-firecontrol-fire-pressure-sensor";
  728. markersMap.lng = item.longitude;
  729. markersMap.lat = item.latitude;
  730. markersMap.bindPopupHtml =
  731. '<div class="map-tip">' +
  732. "<span>" +
  733. ' <div class="d-l-con">' +
  734. ' <div class="d-l-l-text">' +
  735. " <h4>经纬度:" +
  736. (item.longitude ? item.longitude : "") +
  737. "," +
  738. (item.latitude ? item.latitude : "") +
  739. "</h4>" +
  740. " </div>" +
  741. " </div>" +
  742. " </span>" +
  743. "<span>" +
  744. ' <div class="d-l-con">' +
  745. ' <div class="d-l-l-text">' +
  746. " <h4>压力传感器名称:" +
  747. (item.name ? item.name : "") +
  748. "</h4>" +
  749. " </div>" +
  750. " </div>" +
  751. " </span>" +
  752. "<span>" +
  753. ' <div class="d-l-con">' +
  754. ' <div class="d-l-l-text">' +
  755. " <h4>数量:" +
  756. (item.number ? item.number : "") +
  757. "</h4>" +
  758. " </div>" +
  759. " </div>" +
  760. " </span>" +
  761. "<span>" +
  762. ' <div class="d-l-con">' +
  763. ' <div class="d-l-l-text">' +
  764. " <h4>参数:" +
  765. (item.parameters ? item.parameters : "") +
  766. "</h4>" +
  767. " </div>" +
  768. " </div>" +
  769. " </span></div>";
  770. } else if (resourceTable == "centerdata_t_firecontrol_foam_liquid") {
  771. //泡沫液
  772. markersMap.icon = "sj-icon-map-centerdata-t-firecontrol-foam-liquid";
  773. markersMap.lng = item.longitude;
  774. markersMap.lat = item.latitude;
  775. markersMap.bindPopupHtml =
  776. '<div class="map-tip">' +
  777. "<span>" +
  778. ' <div class="d-l-con">' +
  779. ' <div class="d-l-l-text">' +
  780. " <h4>经纬度:" +
  781. (item.longitude ? item.longitude : "") +
  782. "," +
  783. (item.latitude ? item.latitude : "") +
  784. "</h4>" +
  785. " </div>" +
  786. " </div>" +
  787. " </span>" +
  788. "<span>" +
  789. ' <div class="d-l-con">' +
  790. ' <div class="d-l-l-text">' +
  791. " <h4>单位名称:" +
  792. (item.company ? item.company : "") +
  793. "</h4>" +
  794. " </div>" +
  795. " </div>" +
  796. " </span>" +
  797. "<span>" +
  798. ' <div class="d-l-con">' +
  799. ' <div class="d-l-l-text">' +
  800. " <h4>联系人:" +
  801. (item.contacts ? item.contacts : "") +
  802. "</h4>" +
  803. " </div>" +
  804. " </div>" +
  805. " </span>" +
  806. "<span>" +
  807. ' <div class="d-l-con">' +
  808. ' <div class="d-l-l-text">' +
  809. " <h4>联系电话:" +
  810. (item.contacts_phone ? item.contacts_phone : "") +
  811. "</h4>" +
  812. " </div>" +
  813. " </div>" +
  814. " </span></div>";
  815. } else if (resourceTable == "centerdata_t_firecontrol_fulltime_station") {
  816. //专职站
  817. markersMap.icon =
  818. "sj-icon-map-centerdata-t-firecontrol-fulltime-station";
  819. markersMap.lng = item.longitude;
  820. markersMap.lat = item.latitude;
  821. markersMap.bindPopupHtml =
  822. '<div class="map-tip">' +
  823. "<span>" +
  824. ' <div class="d-l-con">' +
  825. ' <div class="d-l-l-text">' +
  826. " <h4>经纬度:" +
  827. (item.longitude ? item.longitude : "") +
  828. "," +
  829. (item.latitude ? item.latitude : "") +
  830. "</h4>" +
  831. " </div>" +
  832. " </div>" +
  833. " </span>" +
  834. "<span>" +
  835. ' <div class="d-l-con">' +
  836. ' <div class="d-l-l-text">' +
  837. " <h4>地址:" +
  838. (item.address ? item.address : "") +
  839. "</h4>" +
  840. " </div>" +
  841. " </div>" +
  842. " </span>" +
  843. "<span>" +
  844. ' <div class="d-l-con">' +
  845. ' <div class="d-l-l-text">' +
  846. " <h4>负责人:" +
  847. (item.principal ? item.principal : "") +
  848. "</h4>" +
  849. " </div>" +
  850. " </div>" +
  851. " </span>" +
  852. "<span>" +
  853. ' <div class="d-l-con">' +
  854. ' <div class="d-l-l-text">' +
  855. " <h4>电话:" +
  856. (item.contacts_phone ? item.contacts_phone : "") +
  857. "</h4>" +
  858. " </div>" +
  859. " </div>" +
  860. " </span>" +
  861. "</div>";
  862. } else if (
  863. resourceTable == "centerdata_t_firecontrol_other_linkage_force"
  864. ) {
  865. //其他联动力量
  866. markersMap.icon =
  867. "sj-icon-map-centerdata-t-firecontrol-other-linkage-force";
  868. markersMap.lng = item.longitude;
  869. markersMap.lat = item.latitude;
  870. markersMap.bindPopupHtml =
  871. '<div class="map-tip">' +
  872. "<span>" +
  873. ' <div class="d-l-con">' +
  874. ' <div class="d-l-l-text">' +
  875. " <h4>经纬度:" +
  876. (item.longitude ? item.longitude : "") +
  877. "," +
  878. (item.latitude ? item.latitude : "") +
  879. "</h4>" +
  880. " </div>" +
  881. " </div>" +
  882. " </span>" +
  883. "<span>" +
  884. ' <div class="d-l-con">' +
  885. ' <div class="d-l-l-text">' +
  886. " <h4>单位名称:" +
  887. (item.company ? item.company : "") +
  888. "</h4>" +
  889. " </div>" +
  890. " </div>" +
  891. " </span>" +
  892. "<span>" +
  893. ' <div class="d-l-con">' +
  894. ' <div class="d-l-l-text">' +
  895. " <h4>单位电话:" +
  896. (item.company_phone ? item.company_phone : "") +
  897. "</h4>" +
  898. " </div>" +
  899. " </div>" +
  900. " </span>" +
  901. "<span>" +
  902. ' <div class="d-l-con">' +
  903. ' <div class="d-l-l-text">' +
  904. " <h4>联系人:" +
  905. (item.contacts ? item.contacts : "") +
  906. "</h4>" +
  907. " </div>" +
  908. " </div>" +
  909. " </span>" +
  910. "<span>" +
  911. ' <div class="d-l-con">' +
  912. ' <div class="d-l-l-text">' +
  913. " <h4>联系电话:" +
  914. (item.contacts_phone ? item.contacts_phone : "") +
  915. "</h4>" +
  916. " </div>" +
  917. " </div>" +
  918. " </span></div>";
  919. }
  920. return markersMap;
  921. },
  922. indentleftSetMarkers(resourceTable) {
  923. this.iconCurrentIndex = resourceTable;
  924. let that = this;
  925. that.resourceTable = resourceTable;
  926. that.markersList = [];
  927. that.source = [];
  928. //点击左侧地图落点
  929. getResourcePoint(resourceTable).then((res) => {
  930. that.deptGroupList = res.data.deptGroupList;
  931. if (
  932. res.data.deptGroupList != null &&
  933. res.data.deptGroupList.length > 0
  934. ) {
  935. for (let i = 0; i < res.data.deptGroupList.length; i++) {
  936. let aa = [
  937. res.data.deptGroupList[i].deptName,
  938. res.data.deptGroupList[i].count,
  939. ];
  940. that.source.push(aa);
  941. }
  942. }
  943. if (res.data.resourceList != null && res.data.resourceList.length > 0) {
  944. for (let i = 0; i < res.data.resourceList.length; i++) {
  945. let markersMap = {
  946. lng: 124.59,
  947. lat: 43.02,
  948. icon: "marker",
  949. name: i,
  950. bindPopupHtml: "",
  951. click: "",
  952. keepBindPopup: false,
  953. isAggregation: false,
  954. };
  955. // if (resourceTable == 'centerdata_t_firecontrol_basic_linkage_force') { //基本联动力量
  956. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-basic-linkage-force'
  957. // markersMap.lng = res.data.resourceList[i].longitude
  958. // markersMap.lat = res.data.resourceList[i].latitude
  959. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  960. // '<span>' +
  961. // ' <div class="d-l-con">' +
  962. // ' <div class="d-l-l-text">' +
  963. // ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
  964. // .data.resourceList[i].latitude + '</h4>' +
  965. // ' </div>' +
  966. // ' </div>' +
  967. // ' </span>' +
  968. // '<span>' +
  969. // ' <div class="d-l-con">' +
  970. // ' <div class="d-l-l-text">' +
  971. // ' <h4>单位名称:' + res.data.resourceList[i].company +
  972. // '</h4>' +
  973. // ' </div>' +
  974. // ' </div>' +
  975. // ' </span>' +
  976. // '</div>'
  977. // } else if (resourceTable == 'centerdata_t_firecontrol_fire_force') { //消防力量
  978. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-fire-force'
  979. // markersMap.lng = res.data.resourceList[i].longitude
  980. // markersMap.lat = res.data.resourceList[i].latitude
  981. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  982. // '<span>' +
  983. // ' <div class="d-l-con">' +
  984. // ' <div class="d-l-l-text">' +
  985. // ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
  986. // .data.resourceList[i].latitude + '</h4>' +
  987. // ' </div>' +
  988. // ' </div>' +
  989. // ' </span>' +
  990. // '<span>' +
  991. // ' <div class="d-l-con">' +
  992. // ' <div class="d-l-l-text">' +
  993. // ' <h4>地址:' + res.data.resourceList[i].address + '</h4>' +
  994. // ' </div>' +
  995. // ' </div>' +
  996. // ' </span>' +
  997. // '<span>' +
  998. // ' <div class="d-l-con">' +
  999. // ' <div class="d-l-l-text">' +
  1000. // ' <h4>负责人:' + res.data.resourceList[i].principal + '</h4>' +
  1001. // ' </div>' +
  1002. // ' </div>' +
  1003. // ' </span>' +
  1004. // '<span>' +
  1005. // ' <div class="d-l-con">' +
  1006. // ' <div class="d-l-l-text">' +
  1007. // ' <h4>联系电话:' + res.data.resourceList[i].contact + '</h4>' +
  1008. // ' </div>' +
  1009. // ' </div>' +
  1010. // ' </span></div>'
  1011. // } else if (resourceTable == 'centerdata_t_firecontrol_foam_liquid') { //泡沫液
  1012. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-foam-liquid'
  1013. // markersMap.lng = res.data.resourceList[i].longitude
  1014. // markersMap.lat = res.data.resourceList[i].latitude
  1015. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1016. // '<span>' +
  1017. // ' <div class="d-l-con">' +
  1018. // ' <div class="d-l-l-text">' +
  1019. // ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
  1020. // .data.resourceList[i].latitude + '</h4>' +
  1021. // ' </div>' +
  1022. // ' </div>' +
  1023. // ' </span>' +
  1024. // '<span>' +
  1025. // ' <div class="d-l-con">' +
  1026. // ' <div class="d-l-l-text">' +
  1027. // ' <h4>单位名称:' + res.data.resourceList[i].company +
  1028. // '</h4>' +
  1029. // ' </div>' +
  1030. // ' </div>' +
  1031. // ' </span>' +
  1032. // '<span>' +
  1033. // ' <div class="d-l-con">' +
  1034. // ' <div class="d-l-l-text">' +
  1035. // ' <h4>联系人:' + res.data.resourceList[i].contacts +
  1036. // '</h4>' +
  1037. // ' </div>' +
  1038. // ' </div>' +
  1039. // ' </span>' +
  1040. // '<span>' +
  1041. // ' <div class="d-l-con">' +
  1042. // ' <div class="d-l-l-text">' +
  1043. // ' <h4>联系电话:' + res.data.resourceList[i].contactsPhone + '</h4>' +
  1044. // ' </div>' +
  1045. // ' </div>' +
  1046. // ' </span></div>'
  1047. // } else if (resourceTable == 'centerdata_t_firecontrol_fulltime_station') { //专职站
  1048. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-fulltime-station'
  1049. // markersMap.lng = res.data.resourceList[i].longitude
  1050. // markersMap.lat = res.data.resourceList[i].latitude
  1051. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1052. // '<span>' +
  1053. // ' <div class="d-l-con">' +
  1054. // ' <div class="d-l-l-text">' +
  1055. // ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
  1056. // .data.resourceList[i].latitude + '</h4>' +
  1057. // ' </div>' +
  1058. // ' </div>' +
  1059. // ' </span>' +
  1060. // '<span>' +
  1061. // ' <div class="d-l-con">' +
  1062. // ' <div class="d-l-l-text">' +
  1063. // ' <h4>地址:' + res.data.resourceList[i].address +
  1064. // '</h4>' +
  1065. // ' </div>' +
  1066. // ' </div>' +
  1067. // ' </span>' +
  1068. // '<span>' +
  1069. // ' <div class="d-l-con">' +
  1070. // ' <div class="d-l-l-text">' +
  1071. // ' <h4>负责人:' + res.data.resourceList[i].principal + '</h4>' +
  1072. // ' </div>' +
  1073. // ' </div>' +
  1074. // ' </span>' +
  1075. // '<span>' +
  1076. // ' <div class="d-l-con">' +
  1077. // ' <div class="d-l-l-text">' +
  1078. // ' <h4>电话:' + res.data.resourceList[i].contactsPhone + '</h4>' +
  1079. // ' </div>' +
  1080. // ' </div>' +
  1081. // ' </span>' +
  1082. // '</div>'
  1083. // } else if (resourceTable == 'centerdata_t_firecontrol_other_linkage_force') { //其他联动力量
  1084. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-other-linkage-force'
  1085. // markersMap.lng = res.data.resourceList[i].longitude
  1086. // markersMap.lat = res.data.resourceList[i].latitude
  1087. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1088. // '<span>' +
  1089. // ' <div class="d-l-con">' +
  1090. // ' <div class="d-l-l-text">' +
  1091. // ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
  1092. // .data.resourceList[i].latitude + '</h4>' +
  1093. // ' </div>' +
  1094. // ' </div>' +
  1095. // ' </span>' +
  1096. // '<span>' +
  1097. // ' <div class="d-l-con">' +
  1098. // ' <div class="d-l-l-text">' +
  1099. // ' <h4>单位名称:' + res.data.resourceList[i].company +
  1100. // '</h4>' +
  1101. // ' </div>' +
  1102. // ' </div>' +
  1103. // ' </span>' +
  1104. // '<span>' +
  1105. // ' <div class="d-l-con">' +
  1106. // ' <div class="d-l-l-text">' +
  1107. // ' <h4>单位电话:' + res.data.resourceList[i].companyPhone +
  1108. // '</h4>' +
  1109. // ' </div>' +
  1110. // ' </div>' +
  1111. // ' </span>' +
  1112. // '<span>' +
  1113. // ' <div class="d-l-con">' +
  1114. // ' <div class="d-l-l-text">' +
  1115. // ' <h4>联系人:' + res.data.resourceList[i].contacts +
  1116. // '</h4>' +
  1117. // ' </div>' +
  1118. // ' </div>' +
  1119. // ' </span>' +
  1120. // '<span>' +
  1121. // ' <div class="d-l-con">' +
  1122. // ' <div class="d-l-l-text">' +
  1123. // ' <h4>联系电话:' + res.data.resourceList[i].contactsPhone +
  1124. // '</h4>' +
  1125. // ' </div>' +
  1126. // ' </div>' +
  1127. // ' </span></div>'
  1128. // }
  1129. that.markersList.push(markersMap);
  1130. }
  1131. }
  1132. this.dataChat();
  1133. that.$refs.supermap.clearM();
  1134. that.$refs.supermap.setMarkers(that.markersList);
  1135. });
  1136. },
  1137. indentleftByDeptIdSetMarkers(deptId) {
  1138. this.listCurrentIndex = deptId;
  1139. let that = this;
  1140. //点击左侧地图落点
  1141. getPointByDeptId(that.resourceTable, deptId).then((res) => {
  1142. that.markersList = [];
  1143. if (res.data != null && res.data.length > 0) {
  1144. for (let i = 0; i < res.data.length; i++) {
  1145. let markersMap = {
  1146. lng: res.data[i].longitude,
  1147. lat: res.data[i].latitude,
  1148. icon: "marker",
  1149. bindPopupHtml: "",
  1150. click: "",
  1151. name: i,
  1152. keepBindPopup: false,
  1153. isAggregation: false,
  1154. };
  1155. console.log("resourceTable=", that.resourceTable);
  1156. console.log("res.data[i]=", res.data[i]);
  1157. // if (that.resourceTable == 'centerdata_t_firecontrol_basic_linkage_force') { //基本联动力量
  1158. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-basic-linkage-force'
  1159. // markersMap.lng = res.data[i].longitude
  1160. // markersMap.lat = res.data[i].latitude
  1161. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1162. // '<span>' +
  1163. // ' <div class="d-l-con">' +
  1164. // ' <div class="d-l-l-text">' +
  1165. // ' <h4>经纬度:' + res.data[i].longitude + ',' + res
  1166. // .data[i].latitude + '</h4>' +
  1167. // ' </div>' +
  1168. // ' </div>' +
  1169. // ' </span>' +
  1170. // '<span>' +
  1171. // ' <div class="d-l-con">' +
  1172. // ' <div class="d-l-l-text">' +
  1173. // ' <h4>单位名称:' + res.data[i].company +
  1174. // '</h4>' +
  1175. // ' </div>' +
  1176. // ' </div>' +
  1177. // ' </span>' +
  1178. // '</div>'
  1179. // } else if (that.resourceTable == 'centerdata_t_firecontrol_fire_force') { //消防力量
  1180. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-fire-force'
  1181. // markersMap.lng = res.data[i].longitude
  1182. // markersMap.lat = res.data[i].latitude
  1183. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1184. // '<span>' +
  1185. // ' <div class="d-l-con">' +
  1186. // ' <div class="d-l-l-text">' +
  1187. // ' <h4>经纬度:' + res.data[i].longitude + ',' + res
  1188. // .data[i].latitude + '</h4>' +
  1189. // ' </div>' +
  1190. // ' </div>' +
  1191. // ' </span>' +
  1192. // '<span>' +
  1193. // ' <div class="d-l-con">' +
  1194. // ' <div class="d-l-l-text">' +
  1195. // ' <h4>地址:' + res.data[i].address + '</h4>' +
  1196. // ' </div>' +
  1197. // ' </div>' +
  1198. // ' </span>' +
  1199. // '<span>' +
  1200. // ' <div class="d-l-con">' +
  1201. // ' <div class="d-l-l-text">' +
  1202. // ' <h4>负责人:' + res.data[i].principal + '</h4>' +
  1203. // ' </div>' +
  1204. // ' </div>' +
  1205. // ' </span>' +
  1206. // '<span>' +
  1207. // ' <div class="d-l-con">' +
  1208. // ' <div class="d-l-l-text">' +
  1209. // ' <h4>联系电话:' + res.data[i].contact + '</h4>' +
  1210. // ' </div>' +
  1211. // ' </div>' +
  1212. // ' </span></div>'
  1213. // } else if (that.resourceTable == 'centerdata_t_forest_waterintake') { //取水口
  1214. // // markersMap.icon = 'sj-icon-centerdata-t-forest-waterintake'
  1215. // // markersMap.icon = 'sj-icon-map-centerdata-t-forest-waterintake'
  1216. // markersMap.lng = res.data[i].longitude
  1217. // markersMap.lat = res.data[i].latitude
  1218. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1219. // '<span>' +
  1220. // ' <div class="d-l-con">' +
  1221. // ' <div class="d-l-l-text">' +
  1222. // ' <h4>经纬度:' + res.data[i].longitude + ',' + res
  1223. // .data[i].latitude + '</h4>' +
  1224. // ' </div>' +
  1225. // ' </div>' +
  1226. // ' </span>' +
  1227. // '<span>' +
  1228. // ' <div class="d-l-con">' +
  1229. // ' <div class="d-l-l-text">' +
  1230. // ' <h4>取水口名称:' + res.data[i].name + '</h4>' +
  1231. // ' </div>' +
  1232. // ' </div>' +
  1233. // ' </span>' +
  1234. // '<span>' +
  1235. // ' <div class="d-l-con">' +
  1236. // ' <div class="d-l-l-text">' +
  1237. // ' <h4>负责人:' + res.data[i].contacts + '</h4>' +
  1238. // ' </div>' +
  1239. // ' </div>' +
  1240. // ' </span>' +
  1241. // '<span>' +
  1242. // ' <div class="d-l-con">' +
  1243. // ' <div class="d-l-l-text">' +
  1244. // ' <h4>联系电话:' + res.data[i].phone + '</h4>' +
  1245. // ' </div>' +
  1246. // ' </div>' +
  1247. // ' </span></div>'
  1248. // } else if (that.resourceTable == 'centerdata_t_firecontrol_foam_liquid') { //泡沫液
  1249. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-foam-liquid'
  1250. // markersMap.lng = res.data[i].longitude
  1251. // markersMap.lat = res.data[i].latitude
  1252. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1253. // '<span>' +
  1254. // ' <div class="d-l-con">' +
  1255. // ' <div class="d-l-l-text">' +
  1256. // ' <h4>经纬度:' + res.data[i].longitude + ',' + res
  1257. // .data[i].latitude + '</h4>' +
  1258. // ' </div>' +
  1259. // ' </div>' +
  1260. // ' </span>' +
  1261. // '<span>' +
  1262. // ' <div class="d-l-con">' +
  1263. // ' <div class="d-l-l-text">' +
  1264. // ' <h4>单位名称:' + res.data[i].company +
  1265. // '</h4>' +
  1266. // ' </div>' +
  1267. // ' </div>' +
  1268. // ' </span>' +
  1269. // '<span>' +
  1270. // ' <div class="d-l-con">' +
  1271. // ' <div class="d-l-l-text">' +
  1272. // ' <h4>联系人:' + res.data[i].contacts +
  1273. // '</h4>' +
  1274. // ' </div>' +
  1275. // ' </div>' +
  1276. // ' </span>' +
  1277. // '<span>' +
  1278. // ' <div class="d-l-con">' +
  1279. // ' <div class="d-l-l-text">' +
  1280. // ' <h4>联系电话:' + res.data[i].contactsPhone + '</h4>' +
  1281. // ' </div>' +
  1282. // ' </div>' +
  1283. // ' </span></div>'
  1284. // } else if (that.resourceTable == 'centerdata_t_firecontrol_fulltime_station') { //专职站
  1285. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-fulltime-station'
  1286. // markersMap.lng = res.data[i].longitude
  1287. // markersMap.lat = res.data[i].latitude
  1288. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1289. // '<span>' +
  1290. // ' <div class="d-l-con">' +
  1291. // ' <div class="d-l-l-text">' +
  1292. // ' <h4>经纬度:' + res.data[i].longitude + ',' + res
  1293. // .data[i].latitude + '</h4>' +
  1294. // ' </div>' +
  1295. // ' </div>' +
  1296. // ' </span>' +
  1297. // '<span>' +
  1298. // ' <div class="d-l-con">' +
  1299. // ' <div class="d-l-l-text">' +
  1300. // ' <h4>地址:' + res.data[i].address +
  1301. // '</h4>' +
  1302. // ' </div>' +
  1303. // ' </div>' +
  1304. // ' </span>' +
  1305. // '<span>' +
  1306. // ' <div class="d-l-con">' +
  1307. // ' <div class="d-l-l-text">' +
  1308. // ' <h4>负责人:' + res.data[i].principal + '</h4>' +
  1309. // ' </div>' +
  1310. // ' </div>' +
  1311. // ' </span>' +
  1312. // '<span>' +
  1313. // ' <div class="d-l-con">' +
  1314. // ' <div class="d-l-l-text">' +
  1315. // ' <h4>电话:' + res.data[i].contactsPhone + '</h4>' +
  1316. // ' </div>' +
  1317. // ' </div>' +
  1318. // ' </span>' +
  1319. // '</div>'
  1320. // } else if (that.resourceTable == 'centerdata_t_firecontrol_other_linkage_force') { //其他联动力量
  1321. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-other-linkage-force'
  1322. // markersMap.lng = res.data[i].longitude
  1323. // markersMap.lat = res.data[i].latitude
  1324. // markersMap.bindPopupHtml = '<div class="map-tip">' +
  1325. // '<span>' +
  1326. // ' <div class="d-l-con">' +
  1327. // ' <div class="d-l-l-text">' +
  1328. // ' <h4>经纬度:' + res.data[i].longitude + ',' + res
  1329. // .data[i].latitude + '</h4>' +
  1330. // ' </div>' +
  1331. // ' </div>' +
  1332. // ' </span>' +
  1333. // '<span>' +
  1334. // ' <div class="d-l-con">' +
  1335. // ' <div class="d-l-l-text">' +
  1336. // ' <h4>单位名称:' + res.data[i].company +
  1337. // '</h4>' +
  1338. // ' </div>' +
  1339. // ' </div>' +
  1340. // ' </span>' +
  1341. // '<span>' +
  1342. // ' <div class="d-l-con">' +
  1343. // ' <div class="d-l-l-text">' +
  1344. // ' <h4>单位电话:' + res.data[i].companyPhone +
  1345. // '</h4>' +
  1346. // ' </div>' +
  1347. // ' </div>' +
  1348. // ' </span>' +
  1349. // '<span>' +
  1350. // ' <div class="d-l-con">' +
  1351. // ' <div class="d-l-l-text">' +
  1352. // ' <h4>联系人:' + res.data[i].contacts +
  1353. // '</h4>' +
  1354. // ' </div>' +
  1355. // ' </div>' +
  1356. // ' </span>' +
  1357. // '<span>' +
  1358. // ' <div class="d-l-con">' +
  1359. // ' <div class="d-l-l-text">' +
  1360. // ' <h4>联系电话:' + res.data[i].contactsPhone +
  1361. // '</h4>' +
  1362. // ' </div>' +
  1363. // ' </div>' +
  1364. // ' </span></div>'
  1365. // }
  1366. that.markersList.push(
  1367. this.getMarkersMap(that.resourceTable, markersMap, res.data[i])
  1368. );
  1369. // that.markersList.push(markersMap)
  1370. }
  1371. }
  1372. that.$refs.supermap.clearM();
  1373. that.$refs.supermap.setMarkers(that.markersList);
  1374. });
  1375. },
  1376. },
  1377. };
  1378. </script>
  1379. <style rel="stylesheet/scss" lang="scss" scoped>
  1380. @import "@/assets/styles/base.scss";
  1381. </style>