|
@@ -6,22 +6,17 @@
|
|
|
<!--主体-->
|
|
|
<div class="visual-body">
|
|
|
<!-- 左侧 -->
|
|
|
- <div
|
|
|
- class="leftbar w-10"
|
|
|
- :class="indentleft"
|
|
|
- ref="left"
|
|
|
- style="width: 12rem !important; height: 80vh; overflow-y: hidden"
|
|
|
- >
|
|
|
+ <div class="leftbar w-10" ref="left" style="width:12rem !important;height: 80vh;overflow-y: hidden;">
|
|
|
<div class="forthis">
|
|
|
<dv-border-box-13
|
|
|
backgroundColor="rgba(12, 19, 38, .90)"
|
|
|
- style="padding-bottom: 1rem; height: 80vh"
|
|
|
+ style="padding-bottom: 1rem;height: 80vh;"
|
|
|
>
|
|
|
<img
|
|
|
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="请输入名称"
|
|
@@ -31,15 +26,14 @@
|
|
|
prefix-icon="el-icon-search"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div class="i-list-con" style="height: 71vh">
|
|
|
+ <div class="i-list-con" style="height: 71vh;">
|
|
|
<div class="d-l-con-icon">
|
|
|
<div
|
|
|
class="icon-con"
|
|
|
:class="{ on: iconCurrentIndex == item.resourceTable }"
|
|
|
v-for="(item, index) in resourcesList"
|
|
|
- v-on:click="indentleftSetMarkers(item.type, item.searchName)"
|
|
|
+ v-on:click="fireControlViewPoint(item.type, searchName)"
|
|
|
>
|
|
|
- <!--v-on:click="indentleftSetMarkers(item.resourceTable)">-->
|
|
|
<div
|
|
|
class="iconfont icon icon-normal"
|
|
|
:class="item.icon"
|
|
@@ -47,9 +41,7 @@
|
|
|
></div>
|
|
|
<div class="icon-text">
|
|
|
<h6>{{ item.num }}</h6>
|
|
|
- <!--<h6>{{ item.count }}</h6>-->
|
|
|
<h5>{{ item.name }}</h5>
|
|
|
- <!--<h5>{{ item.resourceName }}</h5>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -58,18 +50,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 地图 -->
|
|
|
- <!-- <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" class="indexSupermapClass"-->
|
|
|
- <!-- :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>-->
|
|
|
- <supermap ref="supermap" style="width: 100%;height: 100vh;" @sewageOutletClick="sewageOutletClick"></supermap>
|
|
|
+ <supermap
|
|
|
+ ref="supermap"
|
|
|
+ style="width: 100%; height: 100vh"
|
|
|
+ @sewageOutletClick="sewageOutletClick"
|
|
|
+ ></supermap>
|
|
|
<!-- <button @click="showEventInfo1" style="position: absolute; right: 50%;top: 45%;z-index: 1000;">弹层事件演示用按钮-->
|
|
|
<!-- </button>-->
|
|
|
<!-- 右侧 -->
|
|
|
- <div
|
|
|
- class="rightbar"
|
|
|
- :class="indentright"
|
|
|
- ref="right"
|
|
|
- v-if="showSearch == true"
|
|
|
- >
|
|
|
+ <div class="rightbar" ref="right" v-if="showSearch == true">
|
|
|
<div class="forthis">
|
|
|
<dv-border-box-13
|
|
|
backgroundColor="rgba(12, 19, 38, .90)"
|
|
@@ -108,11 +97,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<vBottomMenu ref="bottomMenu"></vBottomMenu>
|
|
|
- <!-- <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">-->
|
|
|
- <!-- <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img-->
|
|
|
- <!-- src="@/assets/images/mascot.png"/>-->
|
|
|
- <!-- </div>-->
|
|
|
- <!-- </el-tooltip>-->
|
|
|
</div>
|
|
|
<eventLocation ref="eventLocation"></eventLocation>
|
|
|
<TVWall ref="TVWall"></TVWall>
|
|
@@ -121,9 +105,8 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- getResource,
|
|
|
- getResourcePoint,
|
|
|
- getResourcePointByDeptId,
|
|
|
+ fireControlViewList,
|
|
|
+ fireControlViewPoint,
|
|
|
} from "@/api/datacenter";
|
|
|
|
|
|
import supermap from "@/components/supermap-2.5d"; //超图
|
|
@@ -132,11 +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,
|
|
@@ -153,19 +139,19 @@ export default {
|
|
|
mounted() {
|
|
|
// 初始化地图数据
|
|
|
this.getSuperMapUrl();
|
|
|
+
|
|
|
setTimeout(() => {
|
|
|
- this.getResource();
|
|
|
+ this.fireControlViewList();
|
|
|
}, 2000)
|
|
|
this.bottomMenuList(); //获取底部公共组件消息和任务
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
// 搜索框
|
|
|
- showSearch: false,
|
|
|
+ showSearch: true,
|
|
|
// 搜索名称
|
|
|
- searchName: undefined,
|
|
|
+ searchName: "",
|
|
|
// 搜索类型
|
|
|
- searchType: undefined,
|
|
|
iconCurrentIndex: "",
|
|
|
listCurrentIndex: "",
|
|
|
markersList: [],
|
|
@@ -181,15 +167,10 @@ export default {
|
|
|
//右侧资源
|
|
|
deptGroupList: [],
|
|
|
source: [],
|
|
|
- //左右缩进
|
|
|
- indentStyle: "",
|
|
|
- indentleft: "",
|
|
|
- indentright: "",
|
|
|
- indentText: "收起左右栏",
|
|
|
- indentdisabled: false,
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
+ watch: {
|
|
|
+ },
|
|
|
methods: {
|
|
|
//初始化地图数据
|
|
|
getSuperMapUrl(){
|
|
@@ -215,7 +196,7 @@ export default {
|
|
|
// 根据名称筛选资源点位
|
|
|
searchByName() {
|
|
|
this.$modal.msgSuccess("正在查询,请稍后...");
|
|
|
- this.indentleftSetMarkers(this.searchType, this.searchName);
|
|
|
+ this.fireControlViewPoint(this.resourceTable, this.searchName);
|
|
|
},
|
|
|
/** ----------------------------------底部按钮公用组件开始------------------------------------- */
|
|
|
bottomMenuList() {
|
|
@@ -272,6 +253,7 @@ export default {
|
|
|
dataZoom: [
|
|
|
{
|
|
|
show: this.source.length > 8 ? true : false,
|
|
|
+ // show: true,
|
|
|
type: "slider",
|
|
|
yAxisIndex: 0,
|
|
|
left: 0,
|
|
@@ -282,7 +264,7 @@ export default {
|
|
|
],
|
|
|
grid: {
|
|
|
top: "5%",
|
|
|
- left: "2%",
|
|
|
+ left: "12%",
|
|
|
// right: "4%",
|
|
|
bottom: "-15%",
|
|
|
width: "75%",
|
|
@@ -365,44 +347,16 @@ export default {
|
|
|
],
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- //吉祥物收起左右框
|
|
|
- indent() {
|
|
|
- let list = document.getElementsByClassName("el-tooltip__popper");
|
|
|
- list[list.length - 1].style.display = "none";
|
|
|
- if (this.indentStyle == "") {
|
|
|
- this.indentStyle = "indent-style";
|
|
|
- this.indentleft = "indent-left";
|
|
|
- this.indentright = "indent-right";
|
|
|
- this.indentText = "展开左右栏";
|
|
|
- } else if (this.indentText == "展开左右栏") {
|
|
|
- this.indentStyle = "";
|
|
|
- this.indentleft = "";
|
|
|
- this.indentright = "";
|
|
|
- this.indentText = "收起左右栏";
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 弹层方法
|
|
|
- // 弹层方法
|
|
|
- showEventInfo1() {
|
|
|
- this.eventInfoVisible1 = true;
|
|
|
- },
|
|
|
- showEventInfo2() {
|
|
|
- this.eventInfoVisible2 = true;
|
|
|
- },
|
|
|
- getResource() {
|
|
|
+ fireControlViewList() {
|
|
|
let that = this;
|
|
|
- //获取左侧菜单列表
|
|
|
- getResource().then((res) => {
|
|
|
- that.resourcesList = res.data;
|
|
|
- console.log("数据中心", that.resourcesList);
|
|
|
+ fireControlViewList("ziyuan").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回原数组
|
|
|
- res.data.forEach(function (data, index) {
|
|
|
- // console.log("data.type.split('_').slice(-1)", data.type.split('_').slice(-1));
|
|
|
- // that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-"));
|
|
|
- // // that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data.resourceTable.split('_').slice(-1))
|
|
|
-
|
|
|
+ that.resourcesList.forEach(function (data, index) {
|
|
|
let icon =
|
|
|
"sj" +
|
|
|
"-" +
|
|
@@ -411,165 +365,128 @@ 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.indentleftSetMarkers(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,
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- // alert(counts)//5,1,2,2,3,3,24,17,3
|
|
|
- for (let i = 0; i < points.length; i++) {
|
|
|
- if (points[i].count == Math.max(...counts)) {
|
|
|
- // alert(points[i].count +"==Math.max(...counts)==" + Math.max(...counts))
|
|
|
- types.push(points[i].type);
|
|
|
- let countsTemp = [];
|
|
|
- let pointsTemp = [];
|
|
|
- for (let j = 0; j < counts.length; j++) {
|
|
|
- // alert("aaa="+counts[j] +"=="+ Math.max(...counts))
|
|
|
- if (counts[j] != Math.max(...counts)) {
|
|
|
- countsTemp.push(counts[j]);
|
|
|
- }
|
|
|
- }
|
|
|
- // for (let j = 0; j < points.length && points[i].count != counts[j]; j++) {
|
|
|
- // pointsTemp.push({
|
|
|
- // "type": list[i].type,
|
|
|
- // "count": list[i].num
|
|
|
- // });
|
|
|
- // }
|
|
|
- // alert(countsTemp)//5,1,2,2,3,3,24,17,3
|
|
|
- // alert(pointsTemp)
|
|
|
- // return
|
|
|
- counts = countsTemp;
|
|
|
- // points = pointsTemp;
|
|
|
- // let tail = counts.splice(i+1, counts.length);
|
|
|
- // counts = counts.splice(0, i);
|
|
|
- // counts.push(tail);
|
|
|
- // alert(Math.max(...countsTemp)+"max")
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- for (let i = 0; i < points.length; i++) {
|
|
|
- // alert(points[i].count +"=="+ Math.max(...counts))
|
|
|
- if (points[i].count == Math.max(...counts)) {
|
|
|
- types.push(points[i].type);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- for (let i = 0; i < types.length; i++) {
|
|
|
- // console.log("if(i < 5){types[i]=", types[i])
|
|
|
- that.indentleftSetMarkers(types[i], "所有");
|
|
|
- }
|
|
|
- //数据自动落点结束
|
|
|
+ that.fireControlViewPoint("ziyuan", "");
|
|
|
});
|
|
|
},
|
|
|
- indentleftSetMarkers(resourceTable, name) {
|
|
|
+ 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;
|
|
|
}
|
|
|
- // 搜索类型
|
|
|
- this.searchType = resourceTable;
|
|
|
- this.iconCurrentIndex = resourceTable;
|
|
|
+ console.log("name=", name);
|
|
|
+ console.log("this.showSearch=", this.showSearch);
|
|
|
+ if(resourceTable == this.resourceTable){
|
|
|
+ resourceTable = "ziyuan"
|
|
|
+ }
|
|
|
let that = this;
|
|
|
that.resourceTable = resourceTable;
|
|
|
that.markersList = [];
|
|
|
that.source = [];
|
|
|
- //点击左侧地图落点
|
|
|
- getResourcePoint(resourceTable, name).then((res) => {
|
|
|
- that.deptGroupList = res.data.deptGroupList;
|
|
|
- if (
|
|
|
- res.data.deptGroupList != null &&
|
|
|
- res.data.deptGroupList.length > 0
|
|
|
- ) {
|
|
|
- for (let i = 0; i < res.data.deptGroupList.length; i++) {
|
|
|
+ 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) {
|
|
|
+ for (let i = 0; i < res.data.deptList.length; i++) {
|
|
|
let aa = [
|
|
|
- res.data.deptGroupList[i].deptName,
|
|
|
- res.data.deptGroupList[i].count,
|
|
|
+ res.data.deptList[i].deptName,
|
|
|
+ res.data.deptList[i].count,
|
|
|
];
|
|
|
that.source.push(aa);
|
|
|
}
|
|
|
}
|
|
|
- if (res.data.resourceList != null && res.data.resourceList.length > 0) {
|
|
|
- for (let i = 0; i < res.data.resourceList.length; i++) {
|
|
|
- let markersMap = {
|
|
|
- lng: 124.59,
|
|
|
- lat: 43.02,
|
|
|
- icon: "marker",
|
|
|
- bindPopupHtml: "",
|
|
|
- click: "",
|
|
|
- keepBindPopup: false,
|
|
|
- isAggregation: false,
|
|
|
- };
|
|
|
- that.markersList.push(
|
|
|
- this.getMarkersMap(
|
|
|
- resourceTable,
|
|
|
- markersMap,
|
|
|
- res.data.resourceList[i]
|
|
|
- )
|
|
|
- );
|
|
|
- // that.markersList.push(markersMap)
|
|
|
+
|
|
|
+ if (res.data.pointList != null && res.data.pointList.length > 0) {
|
|
|
+ for (let i = 0; i < res.data.pointList.length; i++) {
|
|
|
+ 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 == "ziyuan" ? res.data.pointList[i].indexName:resourceTable,
|
|
|
+ markersMap,
|
|
|
+ res.data.pointList[i]
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (this.showSearch == true) {
|
|
|
this.dataChat();
|
|
|
}
|
|
|
- that.$refs.supermap.clearM();
|
|
|
+ that.$refs.supermap.clearM(false);
|
|
|
that.$refs.supermap.setMarkers(that.markersList);
|
|
|
});
|
|
|
},
|
|
|
- indentleftByDeptIdSetMarkers(deptId) {
|
|
|
- this.listCurrentIndex = deptId;
|
|
|
- let that = this;
|
|
|
- //点击左侧地图落点
|
|
|
- getResourcePointByDeptId(that.resourceTable, deptId).then((res) => {
|
|
|
- console.log("res.data.resourceList=", res.data.resourceList);
|
|
|
- // alert(that.resourceTable)
|
|
|
- that.markersList = [];
|
|
|
- if (res.data.resourceList != null && res.data.resourceList.length > 0) {
|
|
|
- for (let i = 0; i < res.data.resourceList.length; i++) {
|
|
|
- let markersMap = {
|
|
|
- lng: 124.59,
|
|
|
- lat: 43.02,
|
|
|
- icon: "marker",
|
|
|
- bindPopupHtml: "",
|
|
|
- click: "",
|
|
|
- keepBindPopup: false,
|
|
|
- isAggregation: false,
|
|
|
- };
|
|
|
- that.markersList.push(
|
|
|
- this.getMarkersMap(
|
|
|
- that.resourceTable,
|
|
|
- markersMap,
|
|
|
- res.data.resourceList[i]
|
|
|
- )
|
|
|
- );
|
|
|
- // that.markersList.push(markersMap)
|
|
|
- }
|
|
|
- }
|
|
|
- that.$refs.supermap.clearM();
|
|
|
- that.$refs.supermap.setMarkers(that.markersList);
|
|
|
- });
|
|
|
+ getMarkersMap(resourceTable, markersMap, item) {
|
|
|
+ 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) {
|
|
|
console.log(data);
|
|
@@ -592,7 +509,7 @@ export default {
|
|
|
id: null,
|
|
|
labelCode: data.cameraList[i].cameraCode,
|
|
|
labelName: data.cameraList[i].cameraName,
|
|
|
- cameraType:data.cameraList[i].cameraType,
|
|
|
+ cameraType: data.cameraList[i].cameraType,
|
|
|
parentLabelCode: "999",
|
|
|
});
|
|
|
labelChannels.push({
|
|
@@ -602,7 +519,7 @@ export default {
|
|
|
channelCode: data.cameraList[i].cameraCode,
|
|
|
channelName: data.cameraList[i].cameraName,
|
|
|
channelSn: null,
|
|
|
- cameraType:data.cameraList[i].cameraType,
|
|
|
+ cameraType: data.cameraList[i].cameraType,
|
|
|
online: "1",
|
|
|
cameraCode: "1",
|
|
|
},
|
|
@@ -624,282 +541,36 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
- getMarkersMap(resourceTable, markersMap, item) {
|
|
|
- markersMap.click = "sewageOutletClick";
|
|
|
- markersMap.parameter = item;
|
|
|
- if (resourceTable == "centerdata_t_resources_illegal_construction") {
|
|
|
- //违建信息
|
|
|
- markersMap.icon =
|
|
|
- "sj-icon-map-centerdata-t-resources-illegal-constructionon";
|
|
|
- markersMap.lng = item.longitude ? item.longitude : "";
|
|
|
- markersMap.lat = item.latitude ? item.latitude : "";
|
|
|
- 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_resources_deposit") {
|
|
|
- //矿产资源
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-resources-deposit";
|
|
|
- markersMap.lng = item.longitude ? item.longitude : "";
|
|
|
- markersMap.lat = item.latitude ? item.latitude : "";
|
|
|
- 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_resources_forest") {
|
|
|
- //森林资源管理信息
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-forest-landing";
|
|
|
- markersMap.lng = item.longitude ? item.longitude : "";
|
|
|
- markersMap.lat = item.latitude ? item.latitude : "";
|
|
|
- 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.zdfw ? item.zdfw : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>占地面积(万公顷):" +
|
|
|
- (item.landArea ? item.landArea : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- } else if (resourceTable == "centerdata_t_resources_geologic_hazard") {
|
|
|
- //地质灾害易发区
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-resources-geologic-hazard";
|
|
|
- markersMap.lng = item.longitude ? item.longitude : "";
|
|
|
- markersMap.lat = item.latitude ? item.latitude : "";
|
|
|
- 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_resources_hydroenergy") {
|
|
|
- //水能资源
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-forest-checkpoint";
|
|
|
- markersMap.lng = item.longitude ? item.longitude : "";
|
|
|
- markersMap.lat = item.latitude ? item.latitude : "";
|
|
|
- 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.address ? item.address : "") +
|
|
|
- "</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_resources_land") {
|
|
|
- //土地资源管理信息
|
|
|
- markersMap.icon = "sj-icon-map-centerdata-t-forest-waterintake";
|
|
|
- markersMap.lng = item.longitude ? item.longitude : "";
|
|
|
- markersMap.lat = item.latitude ? item.latitude : "";
|
|
|
- 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.landArea ? item.landArea : "") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span></div>";
|
|
|
- }
|
|
|
- return markersMap;
|
|
|
+ indentleftByDeptIdSetMarkers(deptId) {
|
|
|
+ this.listCurrentIndex = deptId;
|
|
|
+ let that = this;
|
|
|
+ //点击左侧地图落点
|
|
|
+ fireControlViewPoint(that.resourceTable,that.searchName, deptId).then((res) => {
|
|
|
+ that.markersList = [];
|
|
|
+ if (res.data != 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,
|
|
|
+ };
|
|
|
+ console.log("resourceTable=", that.resourceTable);
|
|
|
+ console.log("res.data[i]=", res.data.pointList[i]);
|
|
|
+ that.markersList.push(
|
|
|
+ that.getMarkersMap(
|
|
|
+ that.resourceTable == "ziyuan" ? res.data.pointList[i].indexName:that.resourceTable,
|
|
|
+ markersMap, res.data.pointList[i])
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ that.$refs.supermap.clearM();
|
|
|
+ that.$refs.supermap.setMarkers(that.markersList);
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|