|
@@ -16,7 +16,7 @@
|
|
|
src="../assets/images/integrated/light.png"
|
|
|
style="width: 100%; margin-top: 0.4rem"
|
|
|
/>
|
|
|
- <div class="sj-search" v-show="showSearch">
|
|
|
+ <div class="sj-search">
|
|
|
<el-input
|
|
|
v-model="searchName"
|
|
|
placeholder="请输入名称"
|
|
@@ -107,7 +107,6 @@
|
|
|
import {
|
|
|
fireControlViewList,
|
|
|
fireControlViewPoint,
|
|
|
- getPointByDeptId,
|
|
|
} from "@/api/datacenter";
|
|
|
|
|
|
import supermap from "@/components/supermap-2.5d"; //超图
|
|
@@ -116,12 +115,14 @@ import vBottomMenu from "@/components/vBottomMenu.vue"; //一体化公共底部
|
|
|
import eventLocation from "@/components/eventLocation.vue"; //事件定位弹窗
|
|
|
import TVWall from "@/components/TVWall.vue"; //电视墙弹窗
|
|
|
import { getIconBg } from "@/api/components/sookaMapIcon";
|
|
|
-import {getUserProfile} from "@/api/system/user"; //资源底色控制文件
|
|
|
+import {getUserProfile} from "@/api/system/user";
|
|
|
+import { Button } from '@/dahua/TVWalllib/iview' //资源底色控制文件
|
|
|
|
|
|
// import echarts from 'echarts'
|
|
|
let echarts = require("echarts");
|
|
|
export default {
|
|
|
components: {
|
|
|
+ Button,
|
|
|
supermap,
|
|
|
vheader,
|
|
|
vBottomMenu,
|
|
@@ -140,7 +141,6 @@ export default {
|
|
|
this.getSuperMapUrl();
|
|
|
|
|
|
setTimeout(() => {
|
|
|
- // this.getResource()
|
|
|
this.fireControlViewList();
|
|
|
}, 2000)
|
|
|
this.bottomMenuList(); //获取底部公共组件消息和任务
|
|
@@ -148,11 +148,10 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
// 搜索框
|
|
|
- showSearch: false,
|
|
|
+ showSearch: true,
|
|
|
// 搜索名称
|
|
|
- searchName: undefined,
|
|
|
+ searchName: "",
|
|
|
// 搜索类型
|
|
|
- searchType: undefined,
|
|
|
iconCurrentIndex: "",
|
|
|
listCurrentIndex: "",
|
|
|
markersList: [],
|
|
@@ -197,7 +196,7 @@ export default {
|
|
|
// 根据名称筛选资源点位
|
|
|
searchByName() {
|
|
|
this.$modal.msgSuccess("正在查询,请稍后...");
|
|
|
- this.fireControlViewPoint(this.searchType, this.searchName);
|
|
|
+ this.fireControlViewPoint(this.resourceTable, this.searchName);
|
|
|
},
|
|
|
/** ----------------------------------底部按钮公用组件开始------------------------------------- */
|
|
|
bottomMenuList() {
|
|
@@ -350,9 +349,11 @@ export default {
|
|
|
},
|
|
|
fireControlViewList() {
|
|
|
let that = this;
|
|
|
- fireControlViewList().then(function (res) {
|
|
|
- for (let i = 1; i < res.data.length; i++) {
|
|
|
- that.resourcesList.push(res.data[i]);
|
|
|
+ fireControlViewList("xiaofang").then(function (res) {
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ if(res.data[i].type !='centerdata_t_forest_fireteam'){
|
|
|
+ that.resourcesList.push(res.data[i]);
|
|
|
+ }
|
|
|
}
|
|
|
//截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
|
|
|
that.resourcesList.forEach(function (data, index) {
|
|
@@ -364,75 +365,29 @@ export default {
|
|
|
data.type.replaceAll("_", "-").replaceAll("@", "-");
|
|
|
console.log("icon_" + (index + 1) + "=", icon);
|
|
|
that.$set(that.resourcesList[index], "icon", icon);
|
|
|
-
|
|
|
//每个图标对应固定颜色
|
|
|
that.$set(that.resourcesList[index], "bg", getIconBg(icon));
|
|
|
- // if(index < 5){
|
|
|
- // // that.fireControlViewPoint(data.type, 'undefined');
|
|
|
- // that.fireControlViewPoint(data.type, '所有');
|
|
|
- // }
|
|
|
});
|
|
|
-
|
|
|
- //数据自动落点开始
|
|
|
- let maxCount = 100; //落点数超过这个数的资源不落点
|
|
|
- let list = res.data;
|
|
|
- let counts = [];
|
|
|
- let points = [];
|
|
|
- let types = [];
|
|
|
- for (let i = 0; i < list.length; i++) {
|
|
|
- //获取符合要求的类型及数量
|
|
|
- if (list[i].num <= maxCount) {
|
|
|
- counts.push(list[i].num);
|
|
|
- points.push({
|
|
|
- type: list[i].type,
|
|
|
- count: list[i].num,
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- for (let i = 0; i < points.length; i++) {
|
|
|
- if (points[i].count == Math.max(...counts)) {
|
|
|
- types.push(points[i].type);
|
|
|
- let countsTemp = [];
|
|
|
- for (let j = 0; j < counts.length; j++) {
|
|
|
- if (counts[j] != Math.max(...counts)) {
|
|
|
- countsTemp.push(counts[j]);
|
|
|
- }
|
|
|
- }
|
|
|
- counts = countsTemp;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- for (let i = 0; i < points.length; i++) {
|
|
|
- if (points[i].count == Math.max(...counts)) {
|
|
|
- types.push(points[i].type);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- for (let i = 0; i < types.length; i++) {
|
|
|
- that.fireControlViewPoint(types[i], "所有");
|
|
|
- }
|
|
|
- //数据自动落点结束
|
|
|
+ that.fireControlViewPoint("xiaofang", "");
|
|
|
});
|
|
|
},
|
|
|
fireControlViewPoint(resourceTable, name) {
|
|
|
// 搜索框
|
|
|
- // if(name == 'undefined' && this.showSearch == false){
|
|
|
- // if(name == '所有' && this.showSearch == false){
|
|
|
- if (name == "所有") {
|
|
|
- name = undefined;
|
|
|
+ if (name == "" || name == null || name == undefined) {
|
|
|
+ name = "";
|
|
|
} else {
|
|
|
this.showSearch = true;
|
|
|
}
|
|
|
- // console.log("name=", name = "111111111235464")
|
|
|
console.log("name=", name);
|
|
|
console.log("this.showSearch=", this.showSearch);
|
|
|
- // 搜索类型
|
|
|
- this.searchType = resourceTable;
|
|
|
+ if(resourceTable == this.resourceTable){
|
|
|
+ resourceTable = "xiaofang"
|
|
|
+ }
|
|
|
let that = this;
|
|
|
that.resourceTable = resourceTable;
|
|
|
that.markersList = [];
|
|
|
that.source = [];
|
|
|
- fireControlViewPoint(resourceTable, name).then((res) => {
|
|
|
+ fireControlViewPoint(resourceTable, name,"").then((res) => {
|
|
|
let pointList = res.data.pointList;
|
|
|
that.deptGroupList = res.data.deptList;
|
|
|
if (res.data.deptList != null && res.data.deptList.length > 0) {
|
|
@@ -447,24 +402,25 @@ export default {
|
|
|
|
|
|
if (res.data.pointList != null && res.data.pointList.length > 0) {
|
|
|
for (let i = 0; i < res.data.pointList.length; i++) {
|
|
|
- let markersMap = {
|
|
|
- lng: res.data.pointList[i].longitude,
|
|
|
- lat: res.data.pointList[i].latitude,
|
|
|
- icon: "marker",
|
|
|
- bindPopupHtml: "",
|
|
|
- click: "",
|
|
|
- name: i,
|
|
|
- keepBindPopup: false,
|
|
|
- isAggregation: false,
|
|
|
- };
|
|
|
- that.markersList.push(
|
|
|
- this.getMarkersMap(
|
|
|
- resourceTable,
|
|
|
- markersMap,
|
|
|
- res.data.pointList[i]
|
|
|
- )
|
|
|
- );
|
|
|
- // that.markersList.push(markersMap)
|
|
|
+ if(res.data.pointList[i].indexName != 'centerdata_t_forest_fireteam'){
|
|
|
+ let markersMap = {
|
|
|
+ lng: res.data.pointList[i].longitude,
|
|
|
+ lat: res.data.pointList[i].latitude,
|
|
|
+ icon: "marker",
|
|
|
+ bindPopupHtml: "",
|
|
|
+ click: "",
|
|
|
+ name: i,
|
|
|
+ keepBindPopup: false,
|
|
|
+ isAggregation: false,
|
|
|
+ };
|
|
|
+ that.markersList.push(
|
|
|
+ this.getMarkersMap(
|
|
|
+ resourceTable == "xiaofang" ? res.data.pointList[i].indexName:resourceTable,
|
|
|
+ markersMap,
|
|
|
+ res.data.pointList[i]
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (this.showSearch == true) {
|
|
@@ -475,500 +431,61 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getMarkersMap(resourceTable, markersMap, item) {
|
|
|
- if (resourceTable == "centerdata_t_firecontrol_basic_linkage_force") {
|
|
|
- //基本联动力量
|
|
|
- markersMap.icon =
|
|
|
- "sj-icon-map-centerdata-t-firecontrol-basic-linkage-force";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>单位名称:" +
|
|
|
- (item.company ? item.company : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "</div>";
|
|
|
- } else if (resourceTable == "centerdata_t_firecontrol_fire_force") {
|
|
|
- //消防力量
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-firecontrol-fire-force";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>地址:" +
|
|
|
- (item.address ? item.address : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>负责人:" +
|
|
|
- (item.principal ? item.principal : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系电话:" +
|
|
|
- (item.contact ? item.contact : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- } else if (resourceTable == "centerdata_t_forest_waterintake") {
|
|
|
- //取水口
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-forest-waterintake";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>取水口名称:" +
|
|
|
- (item.name ? item.name : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>负责人:" +
|
|
|
- (item.contacts ? item.contacts : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- (item.phone
|
|
|
- ? "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系电话:" +
|
|
|
- item.phone +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>"
|
|
|
- : "");
|
|
|
- } else if (resourceTable == "centerdata_t_forest_watercrane") {
|
|
|
- //水鹤
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-forest-watercrane";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>水鹤名称:" +
|
|
|
- (item.name ? item.name : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>负责人:" +
|
|
|
- (item.contacts ? item.contacts : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系电话:" +
|
|
|
- (item.phone ? item.phone : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- } else if (
|
|
|
- resourceTable == "centerdata_t_forest_firehydrant@1" ||
|
|
|
- resourceTable == "centerdata_t_forest_firehydrant@2" ||
|
|
|
- resourceTable == "centerdata_t_forest_firehydrant@3"
|
|
|
- ) {
|
|
|
- //消火栓
|
|
|
- // markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-foam-liquid'
|
|
|
- let icon =
|
|
|
- "sj-icon-map-centerdata-t-forest-firehydrant-" +
|
|
|
- resourceTable.slice(-1);
|
|
|
- // sj-icon-map-centerdata-t-forest-firehydrant-1
|
|
|
- console.log("icon=", icon);
|
|
|
- markersMap.icon = icon;
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>消火栓名称:" +
|
|
|
- (item.name ? item.name : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>地址:" +
|
|
|
- (item.firehydrant_address ? item.firehydrant_address : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>负责人:" +
|
|
|
- (item.contacts ? item.contacts : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系电话:" +
|
|
|
- (item.phone ? item.phone : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- } else if (resourceTable == "centerdata_t_firecontrol_fire_key_places") {
|
|
|
- //重点场所
|
|
|
- markersMap.icon =
|
|
|
- "sj-icon-map-centerdata-t-firecontrol-fire-key-places";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>重点场所名称:" +
|
|
|
- (item.name ? item.name : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>负责人:" +
|
|
|
- (item.person ? item.person : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系电话:" +
|
|
|
- (item.phone ? item.phone : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- } else if (
|
|
|
- resourceTable == "centerdata_t_firecontrol_fire_pressure_sensor"
|
|
|
- ) {
|
|
|
- //压力传感器
|
|
|
- markersMap.icon =
|
|
|
- "sj-icon-map-centerdata-t-firecontrol-fire-pressure-sensor";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>压力传感器名称:" +
|
|
|
- (item.name ? item.name : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>编号:" +
|
|
|
- (item.number ? item.number : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>参数:" +
|
|
|
- (item.parameters ? item.parameters : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- } else if (resourceTable == "centerdata_t_firecontrol_foam_liquid") {
|
|
|
- //泡沫液
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-firecontrol-foam-liquid";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>单位名称:" +
|
|
|
- (item.company ? item.company : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系人:" +
|
|
|
- (item.contacts ? item.contacts : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系电话:" +
|
|
|
- (item.contacts_phone ? item.contacts_phone : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- } else if (resourceTable == "centerdata_t_firecontrol_fulltime_station") {
|
|
|
- //专职站
|
|
|
- markersMap.icon =
|
|
|
- "sj-icon-map-centerdata-t-firecontrol-fulltime-station";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>地址:" +
|
|
|
- (item.address ? item.address : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>负责人:" +
|
|
|
- (item.principal ? item.principal : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>电话:" +
|
|
|
- (item.contacts_phone ? item.contacts_phone : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "</div>";
|
|
|
- } else if (
|
|
|
- resourceTable == "centerdata_t_firecontrol_other_linkage_force"
|
|
|
- ) {
|
|
|
- //其他联动力量
|
|
|
- markersMap.icon =
|
|
|
- "sj-icon-map-centerdata-t-firecontrol-other-linkage-force";
|
|
|
- markersMap.lng = item.longitude;
|
|
|
- markersMap.lat = item.latitude;
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- markersMap.bindPopupHtml =
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>经纬度:" +
|
|
|
- (item.longitude ? item.longitude : "") +
|
|
|
- "," +
|
|
|
- (item.latitude ? item.latitude : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>单位名称:" +
|
|
|
- (item.company ? item.company : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>单位电话:" +
|
|
|
- (item.company_phone ? item.company_phone : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系人:" +
|
|
|
- (item.contacts ? item.contacts : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>联系电话:" +
|
|
|
- (item.contacts_phone ? item.contacts_phone : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- }
|
|
|
+ let icon = "sj-icon-map-"+resourceTable.replaceAll("_", "-");
|
|
|
+ markersMap.lng = item.longitude;
|
|
|
+ markersMap.lat = item.latitude;
|
|
|
+ markersMap.click = "sewageOutletClick";
|
|
|
+ markersMap.parameter = item;
|
|
|
+ markersMap.icon = icon;
|
|
|
+ markersMap.bindPopupHtml =
|
|
|
+ '<div class="map-tip">' +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>经纬度:" +
|
|
|
+ (item.longitude ? item.longitude : "") +
|
|
|
+ "," +
|
|
|
+ (item.latitude ? item.latitude : "") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>名称:" +
|
|
|
+ (item.name ? item.name : "") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>地址:" +
|
|
|
+ (item.address ? item.address : "") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>联系人:" +
|
|
|
+ (item.contacts ? item.contacts : "") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>联系电话:" +
|
|
|
+ (item.phone ? item.phone : "") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span></div>";
|
|
|
return markersMap;
|
|
|
},
|
|
|
sewageOutletClick(data) {
|
|
@@ -1028,13 +545,13 @@ export default {
|
|
|
this.listCurrentIndex = deptId;
|
|
|
let that = this;
|
|
|
//点击左侧地图落点
|
|
|
- getPointByDeptId(that.resourceTable, deptId).then((res) => {
|
|
|
+ fireControlViewPoint(that.resourceTable,that.searchName, deptId).then((res) => {
|
|
|
that.markersList = [];
|
|
|
- if (res.data != null && res.data.length > 0) {
|
|
|
- for (let i = 0; i < res.data.length; i++) {
|
|
|
+ if (res.data != null && res.data.pointList.length>0) {
|
|
|
+ for (let i = 0; i < res.data.pointList.length; i++) {
|
|
|
let markersMap = {
|
|
|
- lng: res.data[i].longitude,
|
|
|
- lat: res.data[i].latitude,
|
|
|
+ lng: res.data.pointList[i].longitude,
|
|
|
+ lat: res.data.pointList[i].latitude,
|
|
|
icon: "marker",
|
|
|
bindPopupHtml: "",
|
|
|
click: "",
|
|
@@ -1043,9 +560,11 @@ export default {
|
|
|
isAggregation: false,
|
|
|
};
|
|
|
console.log("resourceTable=", that.resourceTable);
|
|
|
- console.log("res.data[i]=", res.data[i]);
|
|
|
+ console.log("res.data[i]=", res.data.pointList[i]);
|
|
|
that.markersList.push(
|
|
|
- this.getMarkersMap(that.resourceTable, markersMap, res.data[i])
|
|
|
+ that.getMarkersMap(
|
|
|
+ that.resourceTable == "xiaofang" ? res.data.pointList[i].indexName:that.resourceTable,
|
|
|
+ markersMap, res.data.pointList[i])
|
|
|
);
|
|
|
}
|
|
|
}
|