datacenter.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137
  1. <!--信息中心-->
  2. <template>
  3. <div class="visual-con">
  4. <!--头部-->
  5. <vheader></vheader>
  6. <!--主体-->
  7. <div class="visual-body">
  8. <!-- 左侧 -->
  9. <div
  10. class="leftbar"
  11. :class="indentleft"
  12. ref="left"
  13. >
  14. <div class="forthis" style="width:12rem !important;height: 80vh;overflow-y: hidden;">
  15. <dv-border-box-13
  16. backgroundColor="rgba(12, 19, 38, .90)"
  17. style="padding-bottom: 1rem;height: 80vh"
  18. >
  19. <img
  20. src="../assets/images/integrated/light.png"
  21. style="width: 100%; margin-top: 0.4rem"
  22. />
  23. <div class="sj-search" v-show="showSearch">
  24. <el-input
  25. v-model="searchName"
  26. placeholder="请输入名称"
  27. @blur="searchByName()"
  28. clearable
  29. size="small"
  30. prefix-icon="el-icon-search"
  31. />
  32. </div>
  33. <div class="i-list-con" style="height: 71vh">
  34. <div class="d-l-con-icon">
  35. <div
  36. class="icon-con"
  37. :class="{ on: iconCurrentIndex == item.resourceTable }"
  38. v-for="(item, index) in resourcesList"
  39. v-on:click="indentleftSetMarkers(item.type, searchName)"
  40. >
  41. <!--v-on:click="indentleftSetMarkers(item.resourceTable)">-->
  42. <div
  43. class="iconfont icon icon-normal"
  44. :class="item.icon"
  45. :style="'background:' + item.bg"
  46. ></div>
  47. <div class="icon-text">
  48. <h6>{{ item.num }}</h6>
  49. <!--<h6>{{ item.count }}</h6>-->
  50. <h5>{{ item.name }}</h5>
  51. <!--<h5>{{ item.resourceName }}</h5>-->
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </dv-border-box-13>
  57. </div>
  58. </div>
  59. <!-- 地图 -->
  60. <supermap
  61. ref="supermap"
  62. style="width: 100%; height: 100vh"
  63. @sewageOutletClick="sewageOutletClick"
  64. ></supermap>
  65. <!-- <button @click="showEventInfo1" style="position: absolute; right: 50%;top: 45%;z-index: 1000;">弹层事件演示用按钮-->
  66. <!-- </button>-->
  67. <vBottomMenu ref="bottomMenu"></vBottomMenu>
  68. <!-- <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">-->
  69. <!-- <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img-->
  70. <!-- src="@/assets/images/mascot.png"/>-->
  71. <!-- </div>-->
  72. <!-- </el-tooltip>-->
  73. </div>
  74. <eventLocation ref="eventLocation"></eventLocation>
  75. <TVWall ref="TVWall"></TVWall>
  76. </div>
  77. </template>
  78. <script>
  79. import { getResource, getResourcePoint } from "@/api/datacenter";
  80. import supermap from "@/components/supermap-2.5d"; //超图
  81. import vheader from "@/components/v-header.vue"; //一体化共用头部
  82. import vBottomMenu from "@/components/vBottomMenu.vue"; //一体化公共底部菜单
  83. import eventLocation from "@/components/eventLocation.vue"; //事件定位弹窗
  84. import TVWall from "@/components/TVWall.vue"; //电视墙弹窗
  85. import { getIconBg } from "@/api/components/sookaMapIcon"; //资源底色控制文件
  86. // import echarts from 'echarts'
  87. let echarts = require("echarts");
  88. import {getUserProfile} from "@/api/system/user";
  89. export default {
  90. components: {
  91. supermap,
  92. vheader,
  93. vBottomMenu,
  94. eventLocation,
  95. TVWall,
  96. },
  97. created() {
  98. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  99. window.showDialog = this.showDialog;
  100. window.choseLayerSwitching = this.choseLayerSwitching;
  101. window.choseLayerSwitchingList = this.choseLayerSwitchingList;
  102. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  103. },
  104. mounted() {
  105. // 初始化地图数据
  106. this.getSuperMapUrl();
  107. setTimeout(() => {
  108. this.getResource();
  109. }, 2000)
  110. this.bottomMenuList(); //获取底部公共组件消息和任务
  111. },
  112. data() {
  113. return {
  114. // 搜索框
  115. showSearch: false,
  116. // 搜索名称
  117. searchName: undefined,
  118. // 搜索类型
  119. searchType: undefined,
  120. iconCurrentIndex: "",
  121. listCurrentIndex: "",
  122. markersList: [],
  123. iframeBoo: true,
  124. open: false,
  125. iframeVue: null,
  126. activeName: "info",
  127. radio: "1",
  128. //类型
  129. resourceTable: "",
  130. //左侧资源
  131. resourcesList: [],
  132. //右侧资源
  133. deptGroupList: [],
  134. source: [],
  135. //左右缩进
  136. indentStyle: "",
  137. indentleft: "",
  138. indentright: "",
  139. indentText: "收起左右栏",
  140. indentdisabled: false,
  141. };
  142. },
  143. methods: {
  144. //初始化地图数据
  145. getSuperMapUrl(){
  146. getUserProfile().then(response => {
  147. let mapDeptId=response.mapDeptId
  148. let num = 0;
  149. if (mapDeptId == "365") {
  150. num = 0;
  151. } else if (mapDeptId == "369") {
  152. num = 1;
  153. } else if (mapDeptId == "371") {
  154. num = 2;
  155. } else if (mapDeptId == "373") {
  156. num = 3;
  157. } else if (mapDeptId == "372") {
  158. num = 4;
  159. } else if (mapDeptId == "370") {
  160. num = 5;
  161. }
  162. this.$refs.supermap.removeAllviewer(num, -1);
  163. });
  164. },
  165. // 根据名称筛选资源点位
  166. searchByName() {
  167. this.$modal.msgSuccess("正在查询,请稍后...");
  168. this.indentleftSetMarkers(this.searchType, this.searchName);
  169. },
  170. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  171. bottomMenuList() {
  172. this.$refs.bottomMenu.selectTaskList(); //获取任务列表
  173. this.$refs.bottomMenu.selectMessageList(); //获取消息列表
  174. },
  175. showDialog(click) {
  176. if (click == "eventLocation") {
  177. this.$refs.eventLocation.showEventLocation();
  178. this.$refs.bottomMenu.showMeasure = false;
  179. this.$refs.bottomMenu.showChild = false;
  180. this.$refs.bottomMenu.showBanChild = false;
  181. this.$refs.bottomMenu.showChangChild = false;
  182. } else if (click == "editableLayers") {
  183. this.$refs.bottomMenu.showChild = false;
  184. this.$refs.bottomMenu.showBanChild = false;
  185. this.$refs.bottomMenu.showChangChild = false;
  186. if (!this.$refs.bottomMenu.showMeasure) {
  187. this.$refs.bottomMenu.showMeasure = true;
  188. } else {
  189. this.$refs.bottomMenu.showMeasure = false;
  190. }
  191. } else if (click == "layerSwitching") {
  192. this.$refs.bottomMenu.showMeasure = false;
  193. this.$refs.bottomMenu.showBanChild = false;
  194. this.$refs.bottomMenu.showChangChild = false;
  195. if (!this.$refs.bottomMenu.showChild) {
  196. this.$refs.bottomMenu.showChild = true;
  197. } else {
  198. this.$refs.bottomMenu.showChild = false;
  199. }
  200. } else if (click == "TVWall") {
  201. this.$refs.TVWall.showTVWall();
  202. this.$refs.bottomMenu.showMeasure = false;
  203. this.$refs.bottomMenu.showChild = false;
  204. this.$refs.bottomMenu.showBanChild = false;
  205. this.$refs.bottomMenu.showChangChild = false;
  206. } else if (click == "forestban") {
  207. this.$refs.bottomMenu.showMeasure = false;
  208. this.$refs.bottomMenu.showChild = false;
  209. this.$refs.bottomMenu.showChangChild = false;
  210. if (!this.$refs.bottomMenu.showBanChild) {
  211. this.$refs.bottomMenu.showBanChild = true;
  212. } else {
  213. this.$refs.bottomMenu.showBanChild = false;
  214. }
  215. } else if (click == "forestchang") {
  216. this.$refs.bottomMenu.showMeasure = false;
  217. this.$refs.bottomMenu.showBanChild = false;
  218. this.$refs.bottomMenu.showChild = false;
  219. if (!this.$refs.bottomMenu.showChangChild) {
  220. this.$refs.bottomMenu.showChangChild = true;
  221. } else {
  222. this.$refs.bottomMenu.showChangChild = false;
  223. }
  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. //吉祥物收起左右框
  236. indent() {
  237. let list = document.getElementsByClassName("el-tooltip__popper");
  238. list[list.length - 1].style.display = "none";
  239. if (this.indentStyle == "") {
  240. this.indentStyle = "indent-style";
  241. this.indentleft = "indent-left";
  242. this.indentright = "indent-right";
  243. this.indentText = "展开左右栏";
  244. } else if (this.indentText == "展开左右栏") {
  245. this.indentStyle = "";
  246. this.indentleft = "";
  247. this.indentright = "";
  248. this.indentText = "收起左右栏";
  249. }
  250. },
  251. // 弹层方法
  252. // 弹层方法
  253. showEventInfo1() {
  254. this.eventInfoVisible1 = true;
  255. },
  256. showEventInfo2() {
  257. this.eventInfoVisible2 = true;
  258. },
  259. getResource() {
  260. let that = this;
  261. //获取左侧菜单列表
  262. getResource().then((res) => {
  263. console.log("res.data=", res.data);
  264. that.resourcesList = res.data;
  265. //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
  266. res.data.forEach(function (data, index) {
  267. // that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data.resourceTable.split('_').slice(-1))
  268. let icon =
  269. "sj" +
  270. "-" +
  271. "icon" +
  272. "-" +
  273. data.type.replaceAll("_", "-").replaceAll("@", "-");
  274. console.log("icon_" + (index + 1) + "=", icon);
  275. that.$set(that.resourcesList[index], "icon", icon);
  276. that.$set(that.resourcesList[index], "bg", getIconBg(icon));
  277. // if(index < 5){
  278. // // that.fireControlViewPoint(data.type, 'undefined');
  279. // that.indentleftSetMarkers(data.type, '所有');
  280. // }
  281. });
  282. //数据自动落点开始
  283. let maxCount = 100; //落点数超过这个数的资源不落点
  284. let list = res.data;
  285. let counts = [];
  286. let points = [];
  287. let types = [];
  288. for (let i = 0; i < list.length; i++) {
  289. //获取符合要求的类型及数量
  290. if (list[i].num <= maxCount) {
  291. counts.push(list[i].num);
  292. points.push({
  293. type: list[i].type,
  294. count: list[i].num,
  295. });
  296. }
  297. }
  298. for (let i = 0; i < points.length; i++) {
  299. if (points[i].count == Math.max(...counts)) {
  300. types.push(points[i].type);
  301. let countsTemp = [];
  302. for (let j = 0; j < counts.length; j++) {
  303. if (counts[j] != Math.max(...counts)) {
  304. countsTemp.push(counts[j]);
  305. }
  306. }
  307. counts = countsTemp;
  308. break;
  309. }
  310. }
  311. for (let i = 0; i < points.length; i++) {
  312. if (points[i].count == Math.max(...counts)) {
  313. types.push(points[i].type);
  314. break;
  315. }
  316. }
  317. for (let i = 0; i < types.length; i++) {
  318. that.indentleftSetMarkers(types[i], "所有");
  319. }
  320. //数据自动落点结束
  321. });
  322. },
  323. indentleftSetMarkers(resourceTable, name) {
  324. // 搜索框
  325. // if(name == 'undefined' && this.showSearch == false){
  326. // if(name == '所有' && this.showSearch == false){
  327. if (name == "所有") {
  328. name = undefined;
  329. } else {
  330. this.showSearch = true;
  331. }
  332. // 搜索类型
  333. this.searchType = resourceTable;
  334. this.iconCurrentIndex = resourceTable;
  335. let that = this;
  336. that.resourceTable = resourceTable;
  337. that.markersList = [];
  338. that.source = [];
  339. //点击左侧地图落点
  340. getResourcePoint(resourceTable, name).then((res) => {
  341. that.deptGroupList = res.data.deptGroupList;
  342. if (
  343. res.data.deptGroupList != null &&
  344. res.data.deptGroupList.length > 0
  345. ) {
  346. for (let i = 0; i < res.data.deptGroupList.length; i++) {
  347. let aa = [
  348. res.data.deptGroupList[i].deptName,
  349. res.data.deptGroupList[i].count,
  350. ];
  351. that.source.push(aa);
  352. }
  353. }
  354. if (res.data.resourceList != null && res.data.resourceList.length > 0) {
  355. for (let i = 0; i < res.data.resourceList.length; i++) {
  356. let markersMap = {
  357. lng: 124.59,
  358. lat: 43.02,
  359. icon: "marker",
  360. bindPopupHtml: "",
  361. click: "",
  362. keepBindPopup: false,
  363. isAggregation: false,
  364. };
  365. console.log("res.data.resourceList[i]=", res.data.resourceList[i]);
  366. that.markersList.push(
  367. this.getMarkersMap(
  368. resourceTable,
  369. markersMap,
  370. res.data.resourceList[i]
  371. )
  372. );
  373. // that.markersList.push(markersMap)
  374. }
  375. }
  376. that.$refs.supermap.clearM();
  377. that.$refs.supermap.setMarkers(that.markersList);
  378. });
  379. },
  380. sewageOutletClick(data) {
  381. console.log(data);
  382. const params = Object.assign({});
  383. params.longitude = data.longitude;
  384. params.latitude = data.latitude;
  385. const treeLabels = [
  386. {
  387. id: null,
  388. labelCode: "999",
  389. labelName: "电视墙",
  390. cameraType: null,
  391. parentLabelCode: "",
  392. },
  393. ];
  394. const labelChannels = [];
  395. for (let i in data.cameraList) {
  396. treeLabels.push({
  397. id: null,
  398. labelCode: data.cameraList[i].cameraCode,
  399. labelName: data.cameraList[i].cameraName,
  400. cameraType: "1",
  401. parentLabelCode: "999",
  402. });
  403. labelChannels.push({
  404. labelCode: data.cameraList[i].cameraCode,
  405. channelDates: [
  406. {
  407. channelCode: data.cameraList[i].cameraCode,
  408. channelName: data.cameraList[i].cameraName,
  409. channelSn: null,
  410. cameraType: "1",
  411. online: "1",
  412. cameraCode: "1",
  413. },
  414. ],
  415. });
  416. }
  417. const dianshiqiang = [
  418. {
  419. switchTab: "2",
  420. treeLabels: treeLabels,
  421. labelChannels: labelChannels,
  422. },
  423. ];
  424. if (data.cameraList.length > 0) {
  425. this.$refs.TVWall.showTVWall1(
  426. data.longitude,
  427. data.latitude,
  428. dianshiqiang
  429. );
  430. }
  431. },
  432. getMarkersMap(resourceTable, markersMap, item) {
  433. markersMap.click = "sewageOutletClick";
  434. markersMap.parameter = item;
  435. if (resourceTable == "centerdata_t_firecontrol_basic_linkage_force") {
  436. //基本联动力量
  437. markersMap.icon =
  438. "sj-icon-map-centerdata-t-firecontrol-basic-linkage-force";
  439. markersMap.lng = item.longitude;
  440. markersMap.lat = item.latitude;
  441. markersMap.bindPopupHtml =
  442. '<div class="map-tip">' +
  443. "<span>" +
  444. ' <div class="d-l-con">' +
  445. ' <div class="d-l-l-text">' +
  446. " <h4>经纬度:" +
  447. (item.longitude ? item.longitude : "") +
  448. "," +
  449. (item.latitude ? item.latitude : "") +
  450. "</h4>" +
  451. " </div>" +
  452. " </div>" +
  453. " </span>" +
  454. "<span>" +
  455. ' <div class="d-l-con">' +
  456. ' <div class="d-l-l-text">' +
  457. " <h4>单位名称:" +
  458. (item.company ? item.company : "") +
  459. "</h4>" +
  460. " </div>" +
  461. " </div>" +
  462. " </span>" +
  463. "</div>";
  464. } else if (resourceTable == "centerdata_t_firecontrol_fire_force") {
  465. //消防力量
  466. markersMap.icon = "sj-icon-map-centerdata-t-firecontrol-fire-force";
  467. markersMap.lng = item.longitude;
  468. markersMap.lat = item.latitude;
  469. markersMap.bindPopupHtml =
  470. '<div class="map-tip">' +
  471. "<span>" +
  472. ' <div class="d-l-con">' +
  473. ' <div class="d-l-l-text">' +
  474. " <h4>经纬度:" +
  475. (item.longitude ? item.longitude : "") +
  476. "," +
  477. (item.latitude ? item.latitude : "") +
  478. "</h4>" +
  479. " </div>" +
  480. " </div>" +
  481. " </span>" +
  482. "<span>" +
  483. ' <div class="d-l-con">' +
  484. ' <div class="d-l-l-text">' +
  485. " <h4>地址:" +
  486. (item.address ? item.address : "") +
  487. "</h4>" +
  488. " </div>" +
  489. " </div>" +
  490. " </span>" +
  491. "<span>" +
  492. ' <div class="d-l-con">' +
  493. ' <div class="d-l-l-text">' +
  494. " <h4>负责人:" +
  495. (item.principal ? item.principal : "") +
  496. "</h4>" +
  497. " </div>" +
  498. " </div>" +
  499. " </span>" +
  500. "<span>" +
  501. ' <div class="d-l-con">' +
  502. ' <div class="d-l-l-text">' +
  503. " <h4>联系电话:" +
  504. (item.contact ? item.contact : "") +
  505. "</h4>" +
  506. " </div>" +
  507. " </div>" +
  508. " </span></div>";
  509. } else if (resourceTable == "centerdata_t_emergency_warehouse") {
  510. //应急仓库
  511. markersMap.icon = "sj-icon-map-centerdata-t-emergency-warehouse";
  512. markersMap.lng = item.longitude;
  513. markersMap.lat = item.latitude;
  514. markersMap.bindPopupHtml =
  515. '<div class="map-tip">' +
  516. "<span>" +
  517. ' <div class="d-l-con">' +
  518. ' <div class="d-l-l-text">' +
  519. " <h4>经纬度:" +
  520. (item.longitude ? item.longitude : "") +
  521. "," +
  522. (item.latitude ? item.latitude : "") +
  523. "</h4>" +
  524. " </div>" +
  525. " </div>" +
  526. " </span>" +
  527. "<span>" +
  528. ' <div class="d-l-con">' +
  529. ' <div class="d-l-l-text">' +
  530. " <h4>仓库名称:" +
  531. (item.name ? item.name : "") +
  532. "</h4>" +
  533. " </div>" +
  534. " </div>" +
  535. " </span>" +
  536. "<span>" +
  537. ' <div class="d-l-con">' +
  538. ' <div class="d-l-l-text">' +
  539. " <h4>所属部门:" +
  540. (item.dept_name ? item.dept_name : "") +
  541. "</h4>" +
  542. " </div>" +
  543. " </div>" +
  544. " </span>" +
  545. (item.phone
  546. ? "<span>" +
  547. ' <div class="d-l-con">' +
  548. ' <div class="d-l-l-text">' +
  549. " <h4>联系电话:" +
  550. item.phone +
  551. "</h4>" +
  552. " </div>" +
  553. " </div>" +
  554. " </span></div>"
  555. : "");
  556. } else if (resourceTable == "centerdata_t_emergency_team") {
  557. //应急队伍
  558. markersMap.icon = "sj-icon-map-centerdata-t-emergency-team";
  559. markersMap.lng = item.longitude;
  560. markersMap.lat = item.latitude;
  561. markersMap.bindPopupHtml =
  562. '<div class="map-tip">' +
  563. "<span>" +
  564. ' <div class="d-l-con">' +
  565. ' <div class="d-l-l-text">' +
  566. " <h4>经纬度:" +
  567. (item.longitude ? item.longitude : "") +
  568. "," +
  569. (item.latitude ? item.latitude : "") +
  570. "</h4>" +
  571. " </div>" +
  572. " </div>" +
  573. " </span>" +
  574. "<span>" +
  575. ' <div class="d-l-con">' +
  576. ' <div class="d-l-l-text">' +
  577. " <h4>队伍名称:" +
  578. (item.name ? item.name : "") +
  579. "</h4>" +
  580. " </div>" +
  581. " </div>" +
  582. " </span>" +
  583. "<span>" +
  584. ' <div class="d-l-con">' +
  585. ' <div class="d-l-l-text">' +
  586. " <h4>负责人:" +
  587. (item.charger ? item.charger : "") +
  588. "</h4>" +
  589. " </div>" +
  590. " </div>" +
  591. " </span>" +
  592. (item.emergency_phone
  593. ? "<span>" +
  594. ' <div class="d-l-con">' +
  595. ' <div class="d-l-l-text">' +
  596. " <h4>联系电话:" +
  597. item.emergency_phone +
  598. "</h4>" +
  599. " </div>" +
  600. " </div>" +
  601. " </span>"
  602. : "") +
  603. (item.equipment
  604. ? "<span>" +
  605. ' <div class="d-l-con">' +
  606. ' <div class="d-l-l-text">' +
  607. " <h4>核心装备及数量:" +
  608. item.equipment +
  609. "</h4>" +
  610. " </div>" +
  611. " </div>" +
  612. " </span>"
  613. : "") +
  614. "</div>";
  615. } else if (resourceTable == "centerdata_t_forest_fireteam") {
  616. //防火队
  617. markersMap.icon = "sj-icon-map-centerdata-t-forest-fireteam";
  618. markersMap.lng = item.longitude;
  619. markersMap.lat = item.latitude;
  620. markersMap.bindPopupHtml =
  621. '<div class="map-tip">' +
  622. "<span>" +
  623. ' <div class="d-l-con">' +
  624. ' <div class="d-l-l-text">' +
  625. " <h4>经纬度:" +
  626. (item.longitude ? item.longitude : "") +
  627. "," +
  628. (item.latitude ? item.latitude : "") +
  629. "</h4>" +
  630. " </div>" +
  631. " </div>" +
  632. " </span>" +
  633. "<span>" +
  634. ' <div class="d-l-con">' +
  635. ' <div class="d-l-l-text">' +
  636. " <h4>队伍名称:" +
  637. (item.name ? item.name : "") +
  638. "</h4>" +
  639. " </div>" +
  640. " </div>" +
  641. " </span>" +
  642. "<span>" +
  643. ' <div class="d-l-con">' +
  644. ' <div class="d-l-l-text">' +
  645. " <h4>联系人:" +
  646. (item.fireteam_person ? item.fireteam_person : "") +
  647. "</h4>" +
  648. " </div>" +
  649. " </div>" +
  650. " </span>" +
  651. (item.fireteam_tel
  652. ? "<span>" +
  653. ' <div class="d-l-con">' +
  654. ' <div class="d-l-l-text">' +
  655. " <h4>联系电话:" +
  656. item.fireteam_tel +
  657. "</h4>" +
  658. " </div>" +
  659. " </div>" +
  660. " </span>"
  661. : "") +
  662. (item.equipment
  663. ? "<span>" +
  664. ' <div class="d-l-con">' +
  665. ' <div class="d-l-l-text">' +
  666. " <h4>设备数量:" +
  667. item.equipment +
  668. "</h4>" +
  669. " </div>" +
  670. " </div>" +
  671. " </span>"
  672. : "") +
  673. "</div>";
  674. } else if (resourceTable == "centerdata_t_emergency_enterprise") {
  675. //应急企业
  676. markersMap.icon = "sj-icon-map-centerdata-t-emergency-enterprise";
  677. markersMap.lng = item.longitude;
  678. markersMap.lat = item.latitude;
  679. markersMap.bindPopupHtml =
  680. '<div class="map-tip">' +
  681. "<span>" +
  682. ' <div class="d-l-con">' +
  683. ' <div class="d-l-l-text">' +
  684. " <h4>经纬度:" +
  685. (item.longitude ? item.longitude : "") +
  686. "," +
  687. (item.latitude ? item.latitude : "") +
  688. "</h4>" +
  689. " </div>" +
  690. " </div>" +
  691. " </span>" +
  692. "<span>" +
  693. ' <div class="d-l-con">' +
  694. ' <div class="d-l-l-text">' +
  695. " <h4>企业名称:" +
  696. (item.name ? item.name : "") +
  697. "</h4>" +
  698. " </div>" +
  699. " </div>" +
  700. " </span>" +
  701. "<span>" +
  702. ' <div class="d-l-con">' +
  703. ' <div class="d-l-l-text">' +
  704. " <h4>负责人:" +
  705. (item.contacts ? item.contacts : "") +
  706. "</h4>" +
  707. " </div>" +
  708. " </div>" +
  709. " </span>" +
  710. (item.phone
  711. ? "<span>" +
  712. ' <div class="d-l-con">' +
  713. ' <div class="d-l-l-text">' +
  714. " <h4>联系电话:" +
  715. item.phone +
  716. "</h4>" +
  717. " </div>" +
  718. " </div>" +
  719. " </span></div>"
  720. : "");
  721. } else if (resourceTable == "centerdata_t_forest_waterintake") {
  722. //取水口
  723. markersMap.icon = "sj-icon-map-centerdata-t-forest-waterintake";
  724. markersMap.lng = item.longitude;
  725. markersMap.lat = item.latitude;
  726. markersMap.bindPopupHtml =
  727. '<div class="map-tip">' +
  728. "<span>" +
  729. ' <div class="d-l-con">' +
  730. ' <div class="d-l-l-text">' +
  731. " <h4>经纬度:" +
  732. (item.longitude ? item.longitude : "") +
  733. "," +
  734. (item.latitude ? item.latitude : "") +
  735. "</h4>" +
  736. " </div>" +
  737. " </div>" +
  738. " </span>" +
  739. "<span>" +
  740. ' <div class="d-l-con">' +
  741. ' <div class="d-l-l-text">' +
  742. " <h4>取水口名称:" +
  743. (item.name ? item.name : "") +
  744. "</h4>" +
  745. " </div>" +
  746. " </div>" +
  747. " </span>" +
  748. "<span>" +
  749. ' <div class="d-l-con">' +
  750. ' <div class="d-l-l-text">' +
  751. " <h4>负责人:" +
  752. (item.contacts ? item.contacts : "") +
  753. "</h4>" +
  754. " </div>" +
  755. " </div>" +
  756. " </span>" +
  757. (item.phone
  758. ? "<span>" +
  759. ' <div class="d-l-con">' +
  760. ' <div class="d-l-l-text">' +
  761. " <h4>联系电话:" +
  762. item.phone +
  763. "</h4>" +
  764. " </div>" +
  765. " </div>" +
  766. " </span></div>"
  767. : "");
  768. } else if (resourceTable == "centerdata_t_forest_watercrane") {
  769. //水鹤
  770. markersMap.icon = "sj-icon-map-centerdata-t-forest-watercrane";
  771. markersMap.lng = item.longitude;
  772. markersMap.lat = item.latitude;
  773. markersMap.bindPopupHtml =
  774. '<div class="map-tip">' +
  775. "<span>" +
  776. ' <div class="d-l-con">' +
  777. ' <div class="d-l-l-text">' +
  778. " <h4>经纬度:" +
  779. (item.longitude ? item.longitude : "") +
  780. "," +
  781. (item.latitude ? item.latitude : "") +
  782. "</h4>" +
  783. " </div>" +
  784. " </div>" +
  785. " </span>" +
  786. "<span>" +
  787. ' <div class="d-l-con">' +
  788. ' <div class="d-l-l-text">' +
  789. " <h4>水鹤名称:" +
  790. (item.name ? item.name : "") +
  791. "</h4>" +
  792. " </div>" +
  793. " </div>" +
  794. " </span>" +
  795. "<span>" +
  796. ' <div class="d-l-con">' +
  797. ' <div class="d-l-l-text">' +
  798. " <h4>负责人:" +
  799. (item.contacts ? item.contacts : "") +
  800. "</h4>" +
  801. " </div>" +
  802. " </div>" +
  803. " </span>" +
  804. "<span>" +
  805. ' <div class="d-l-con">' +
  806. ' <div class="d-l-l-text">' +
  807. " <h4>联系电话:" +
  808. (item.phone ? item.phone : "") +
  809. "</h4>" +
  810. " </div>" +
  811. " </div>" +
  812. " </span></div>";
  813. } else if (
  814. resourceTable == "centerdata_t_forest_firehydrant@1" ||
  815. resourceTable == "centerdata_t_forest_firehydrant@2" ||
  816. resourceTable == "centerdata_t_forest_firehydrant@3"
  817. ) {
  818. //消火栓
  819. // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-foam-liquid'
  820. let icon =
  821. "sj-icon-map-centerdata-t-forest-firehydrant-" +
  822. resourceTable.slice(-1);
  823. // sj-icon-map-centerdata-t-forest-firehydrant-1
  824. console.log("icon=", icon);
  825. markersMap.icon = icon;
  826. markersMap.lng = item.longitude;
  827. markersMap.lat = item.latitude;
  828. markersMap.bindPopupHtml =
  829. '<div class="map-tip">' +
  830. "<span>" +
  831. ' <div class="d-l-con">' +
  832. ' <div class="d-l-l-text">' +
  833. " <h4>经纬度:" +
  834. (item.longitude ? item.longitude : "") +
  835. "," +
  836. (item.latitude ? item.latitude : "") +
  837. "</h4>" +
  838. " </div>" +
  839. " </div>" +
  840. " </span>" +
  841. "<span>" +
  842. ' <div class="d-l-con">' +
  843. ' <div class="d-l-l-text">' +
  844. " <h4>消火栓名称:" +
  845. (item.name ? item.name : "") +
  846. "</h4>" +
  847. " </div>" +
  848. " </div>" +
  849. " </span>" +
  850. "<span>" +
  851. ' <div class="d-l-con">' +
  852. ' <div class="d-l-l-text">' +
  853. " <h4>地址:" +
  854. (item.firehydrant_address ? item.firehydrant_address : "") +
  855. "</h4>" +
  856. " </div>" +
  857. " </div>" +
  858. " </span>" +
  859. "<span>" +
  860. ' <div class="d-l-con">' +
  861. ' <div class="d-l-l-text">' +
  862. " <h4>负责人:" +
  863. (item.contacts ? item.contacts : "") +
  864. "</h4>" +
  865. " </div>" +
  866. " </div>" +
  867. " </span>" +
  868. "<span>" +
  869. ' <div class="d-l-con">' +
  870. ' <div class="d-l-l-text">' +
  871. " <h4>联系电话:" +
  872. (item.phone ? item.phone : "") +
  873. "</h4>" +
  874. " </div>" +
  875. " </div>" +
  876. " </span></div>";
  877. } else if (resourceTable == "centerdata_t_firecontrol_fire_key_places") {
  878. //重点场所
  879. markersMap.icon =
  880. "sj-icon-map-centerdata-t-firecontrol-fire-key-places";
  881. markersMap.lng = item.longitude;
  882. markersMap.lat = item.latitude;
  883. markersMap.bindPopupHtml =
  884. '<div class="map-tip">' +
  885. "<span>" +
  886. ' <div class="d-l-con">' +
  887. ' <div class="d-l-l-text">' +
  888. " <h4>经纬度:" +
  889. (item.longitude ? item.longitude : "") +
  890. "," +
  891. (item.latitude ? item.latitude : "") +
  892. "</h4>" +
  893. " </div>" +
  894. " </div>" +
  895. " </span>" +
  896. "<span>" +
  897. ' <div class="d-l-con">' +
  898. ' <div class="d-l-l-text">' +
  899. " <h4>重点场所名称:" +
  900. (item.name ? item.name : "") +
  901. "</h4>" +
  902. " </div>" +
  903. " </div>" +
  904. " </span>" +
  905. "<span>" +
  906. ' <div class="d-l-con">' +
  907. ' <div class="d-l-l-text">' +
  908. " <h4>负责人:" +
  909. (item.person ? item.person : "") +
  910. "</h4>" +
  911. " </div>" +
  912. " </div>" +
  913. " </span>" +
  914. "<span>" +
  915. ' <div class="d-l-con">' +
  916. ' <div class="d-l-l-text">' +
  917. " <h4>联系电话:" +
  918. (item.phone ? item.phone : "") +
  919. "</h4>" +
  920. " </div>" +
  921. " </div>" +
  922. " </span></div>";
  923. } else if (
  924. resourceTable == "centerdata_t_firecontrol_fire_pressure_sensor"
  925. ) {
  926. //压力传感器
  927. markersMap.icon =
  928. "sj-icon-map-centerdata-t-firecontrol-fire-pressure-sensor";
  929. markersMap.lng = item.longitude;
  930. markersMap.lat = item.latitude;
  931. markersMap.bindPopupHtml =
  932. '<div class="map-tip">' +
  933. "<span>" +
  934. ' <div class="d-l-con">' +
  935. ' <div class="d-l-l-text">' +
  936. " <h4>经纬度:" +
  937. (item.longitude ? item.longitude : "") +
  938. "," +
  939. (item.latitude ? item.latitude : "") +
  940. "</h4>" +
  941. " </div>" +
  942. " </div>" +
  943. " </span>" +
  944. "<span>" +
  945. ' <div class="d-l-con">' +
  946. ' <div class="d-l-l-text">' +
  947. " <h4>压力传感器名称:" +
  948. (item.name ? item.name : "") +
  949. "</h4>" +
  950. " </div>" +
  951. " </div>" +
  952. " </span>" +
  953. "<span>" +
  954. ' <div class="d-l-con">' +
  955. ' <div class="d-l-l-text">' +
  956. " <h4>数量:" +
  957. (item.number ? item.number : "") +
  958. "</h4>" +
  959. " </div>" +
  960. " </div>" +
  961. " </span>" +
  962. "<span>" +
  963. ' <div class="d-l-con">' +
  964. ' <div class="d-l-l-text">' +
  965. " <h4>参数:" +
  966. (item.parameters ? item.parameters : "") +
  967. "</h4>" +
  968. " </div>" +
  969. " </div>" +
  970. " </span></div>";
  971. } else if (resourceTable == "centerdata_t_firecontrol_foam_liquid") {
  972. //泡沫液
  973. markersMap.icon = "sj-icon-map-centerdata-t-firecontrol-foam-liquid";
  974. markersMap.lng = item.longitude;
  975. markersMap.lat = item.latitude;
  976. markersMap.bindPopupHtml =
  977. '<div class="map-tip">' +
  978. "<span>" +
  979. ' <div class="d-l-con">' +
  980. ' <div class="d-l-l-text">' +
  981. " <h4>经纬度:" +
  982. (item.longitude ? item.longitude : "") +
  983. "," +
  984. (item.latitude ? item.latitude : "") +
  985. "</h4>" +
  986. " </div>" +
  987. " </div>" +
  988. " </span>" +
  989. "<span>" +
  990. ' <div class="d-l-con">' +
  991. ' <div class="d-l-l-text">' +
  992. " <h4>单位名称:" +
  993. (item.company ? item.company : "") +
  994. "</h4>" +
  995. " </div>" +
  996. " </div>" +
  997. " </span>" +
  998. "<span>" +
  999. ' <div class="d-l-con">' +
  1000. ' <div class="d-l-l-text">' +
  1001. " <h4>联系人:" +
  1002. (item.contacts ? item.contacts : "") +
  1003. "</h4>" +
  1004. " </div>" +
  1005. " </div>" +
  1006. " </span>" +
  1007. "<span>" +
  1008. ' <div class="d-l-con">' +
  1009. ' <div class="d-l-l-text">' +
  1010. " <h4>联系电话:" +
  1011. (item.contacts_phone ? item.contacts_phone : "") +
  1012. "</h4>" +
  1013. " </div>" +
  1014. " </div>" +
  1015. " </span></div>";
  1016. } else if (resourceTable == "centerdata_t_firecontrol_fulltime_station") {
  1017. //专职站
  1018. markersMap.icon =
  1019. "sj-icon-map-centerdata-t-firecontrol-fulltime-station";
  1020. markersMap.lng = item.longitude;
  1021. markersMap.lat = item.latitude;
  1022. markersMap.bindPopupHtml =
  1023. '<div class="map-tip">' +
  1024. "<span>" +
  1025. ' <div class="d-l-con">' +
  1026. ' <div class="d-l-l-text">' +
  1027. " <h4>经纬度:" +
  1028. (item.longitude ? item.longitude : "") +
  1029. "," +
  1030. (item.latitude ? item.latitude : "") +
  1031. "</h4>" +
  1032. " </div>" +
  1033. " </div>" +
  1034. " </span>" +
  1035. "<span>" +
  1036. ' <div class="d-l-con">' +
  1037. ' <div class="d-l-l-text">' +
  1038. " <h4>地址:" +
  1039. (item.address ? item.address : "") +
  1040. "</h4>" +
  1041. " </div>" +
  1042. " </div>" +
  1043. " </span>" +
  1044. "<span>" +
  1045. ' <div class="d-l-con">' +
  1046. ' <div class="d-l-l-text">' +
  1047. " <h4>负责人:" +
  1048. (item.principal ? item.principal : "") +
  1049. "</h4>" +
  1050. " </div>" +
  1051. " </div>" +
  1052. " </span>" +
  1053. "<span>" +
  1054. ' <div class="d-l-con">' +
  1055. ' <div class="d-l-l-text">' +
  1056. " <h4>电话:" +
  1057. (item.contacts_phone ? item.contacts_phone : "") +
  1058. "</h4>" +
  1059. " </div>" +
  1060. " </div>" +
  1061. " </span>" +
  1062. "</div>";
  1063. } else if (
  1064. resourceTable == "centerdata_t_firecontrol_other_linkage_force"
  1065. ) {
  1066. //其他联动力量
  1067. markersMap.icon =
  1068. "sj-icon-map-centerdata-t-firecontrol-other-linkage-force";
  1069. markersMap.lng = item.longitude;
  1070. markersMap.lat = item.latitude;
  1071. markersMap.bindPopupHtml =
  1072. '<div class="map-tip">' +
  1073. "<span>" +
  1074. ' <div class="d-l-con">' +
  1075. ' <div class="d-l-l-text">' +
  1076. " <h4>经纬度:" +
  1077. (item.longitude ? item.longitude : "") +
  1078. "," +
  1079. (item.latitude ? item.latitude : "") +
  1080. "</h4>" +
  1081. " </div>" +
  1082. " </div>" +
  1083. " </span>" +
  1084. "<span>" +
  1085. ' <div class="d-l-con">' +
  1086. ' <div class="d-l-l-text">' +
  1087. " <h4>单位名称:" +
  1088. (item.company ? item.company : "") +
  1089. "</h4>" +
  1090. " </div>" +
  1091. " </div>" +
  1092. " </span>" +
  1093. "<span>" +
  1094. ' <div class="d-l-con">' +
  1095. ' <div class="d-l-l-text">' +
  1096. " <h4>单位电话:" +
  1097. (item.company_phone ? item.company_phone : "") +
  1098. "</h4>" +
  1099. " </div>" +
  1100. " </div>" +
  1101. " </span>" +
  1102. "<span>" +
  1103. ' <div class="d-l-con">' +
  1104. ' <div class="d-l-l-text">' +
  1105. " <h4>联系人:" +
  1106. (item.contacts ? item.contacts : "") +
  1107. "</h4>" +
  1108. " </div>" +
  1109. " </div>" +
  1110. " </span>" +
  1111. "<span>" +
  1112. ' <div class="d-l-con">' +
  1113. ' <div class="d-l-l-text">' +
  1114. " <h4>联系电话:" +
  1115. (item.contacts_phone ? item.contacts_phone : "") +
  1116. "</h4>" +
  1117. " </div>" +
  1118. " </div>" +
  1119. " </span></div>";
  1120. }
  1121. return markersMap;
  1122. },
  1123. },
  1124. };
  1125. </script>
  1126. <style rel="stylesheet/scss" lang="scss" scoped>
  1127. @import "@/assets/styles/base.scss";
  1128. </style>