|
@@ -5,7 +5,7 @@
|
|
|
<transition name='fade'>
|
|
|
<div class="map-tit" v-show="mapshow">
|
|
|
<div class="top-tit">
|
|
|
- <i class="iconfont sj-icon-jkzx"></i>
|
|
|
+ <i class="iconfont sj-icon-jkzx" @click="openTvwall()"></i>
|
|
|
<span><img src="../assets/images/close.svg" @click="mapShow" /></span>
|
|
|
</div>
|
|
|
<div class="map-txt" v-html="bindPopupHtml">
|
|
@@ -33,6 +33,7 @@
|
|
|
return {
|
|
|
bindPopupHtml: null,
|
|
|
mapshow: false,
|
|
|
+ openZt:false,
|
|
|
superMapRootUrl: null,
|
|
|
viewer: null,
|
|
|
scene: null,
|
|
@@ -79,23 +80,24 @@
|
|
|
},
|
|
|
supermapUrls: [
|
|
|
[
|
|
|
- "/3D-sipingchangjing/rest/realspace/datas/siping_2m@spyx4326",//底图
|
|
|
- "/3D-local3DCache-0608XinBanQingXieShiJing/rest/realspace",//3D模型(二级图层)
|
|
|
- "/map-mvt-shuixiMian/restjsr/v1/vectortile/maps/shuixi_Mian",//水系图
|
|
|
- "/map-mvt-lindi/restjsr/v1/vectortile/maps/lindi",//林地图
|
|
|
- "/map-mvt-nongtian/restjsr/v1/vectortile/maps/nongtian",//农田图
|
|
|
- "/map-mvt-roadXian/restjsr/v1/vectortile/maps/road_Xian",//路网图
|
|
|
- "/3D-road_Name_S/rest/realspace",//路网名称
|
|
|
- "ProvinceRoad_L@SiPing#1",//名称图层叠加
|
|
|
- "CountyRoad_L@SiPing#1",//名称图层叠加
|
|
|
- "StateRoad_L@SiPing#1",//名称图层叠加
|
|
|
- "/3D-shuixi_Name/rest/realspace",//水系名称
|
|
|
- "ShuiXi@SiPing#1",//水系名称叠加
|
|
|
- "/map-SIPING/rest/maps/XianJie_XiangZhenJie",//乡镇街界限
|
|
|
- "/3D-Name_he/rest/realspace",//乡镇街名称
|
|
|
- "XianJie@SiPing#1",//县界名称
|
|
|
- "XiangZhenJie@SiPing#2",//乡镇街名称
|
|
|
- "Cun@SiPing#1",//村名称
|
|
|
+ "/3D-sipingchangjing/rest/realspace/datas/siping_2m@spyx4326",//底图0
|
|
|
+ "/3D-local3DCache-0608XinBanQingXieShiJing/rest/realspace",//3D模型(二级图层)1
|
|
|
+ "/map-mvt-shuixiMian/restjsr/v1/vectortile/maps/shuixi_Mian",//水系图2
|
|
|
+ "/map-mvt-lindi/restjsr/v1/vectortile/maps/lindi",//林地图3
|
|
|
+ "/map-mvt-nongtian/restjsr/v1/vectortile/maps/nongtian",//农田图4
|
|
|
+ "/map-mvt-roadXian/restjsr/v1/vectortile/maps/road_Xian",//路网图5
|
|
|
+ "/3D-road_Name_S/rest/realspace",//路网名称6
|
|
|
+ "ProvinceRoad_L@SiPing#1",//名称图层叠加7
|
|
|
+ "CountyRoad_L@SiPing#1",//名称图层叠加8
|
|
|
+ "StateRoad_L@SiPing#1",//名称图层叠加9
|
|
|
+ "/3D-shuixi_Name/rest/realspace",//水系名称10
|
|
|
+ "ShuiXi@SiPing#1",//水系名称叠加11
|
|
|
+ "/map-SIPING/rest/maps/XianJie_XiangZhenJie",//乡镇街界限12
|
|
|
+ "/3D-Name_he/rest/realspace",//乡镇街名称13
|
|
|
+ "XianJie@SiPing#1",//县界名称14
|
|
|
+ "XiangZhenJie@SiPing#2",//乡镇街名称15
|
|
|
+ "Cun@SiPing#1",//村名称16
|
|
|
+ "/map-SIPING/rest/maps/siping",//17
|
|
|
],
|
|
|
[
|
|
|
"/3D-shuangliaoYX/rest/realspace/datas/siping_2m_shuangliao@spyx4326",
|
|
@@ -115,6 +117,7 @@
|
|
|
"shuangliaoshi@gengdi#1",
|
|
|
"XiangZhenJie_shuangliao@gengdi#1",
|
|
|
"Cun_shuangliao@SiPing#1",
|
|
|
+ "/map-SIPING/rest/maps/siping",//17
|
|
|
],
|
|
|
[
|
|
|
"/3D-lishuYX/rest/realspace/datas/siping_2m_lishu@spyx4326",
|
|
@@ -134,6 +137,7 @@
|
|
|
"lishushi@gengdi#1",
|
|
|
"XiangZhenJie_lishu@gengdi#1",
|
|
|
"Cun_lishu@SiPing#1",
|
|
|
+ "/map-SIPING/rest/maps/siping",//17
|
|
|
],
|
|
|
[
|
|
|
"/3D-tiexiYX/rest/realspace/datas/siping_2m_tiexi@spyx4326",
|
|
@@ -153,6 +157,7 @@
|
|
|
"tiexishi@gengdi#1",
|
|
|
"XiangZhenJie_tiexi@gengdi#1",
|
|
|
"Cun_tiexi@SiPing#1",
|
|
|
+ "/map-SIPING/rest/maps/siping"
|
|
|
],
|
|
|
[
|
|
|
"/3D-tiedongYX/rest/realspace/datas/siping_2m_tiedong@spyx4326",
|
|
@@ -172,6 +177,7 @@
|
|
|
"tiedongshi@gengdi#1",
|
|
|
"XiangZhenJie_tiedong@gengdi#1",
|
|
|
"Cun_tiedong@SiPing#1",
|
|
|
+ "/map-SIPING/rest/maps/siping",//17
|
|
|
],
|
|
|
[
|
|
|
"/3D-yitongYX/rest/realspace/datas/siping_2m_yitong@spyx4326",
|
|
@@ -191,6 +197,7 @@
|
|
|
"yitongshi@gengdi#1",
|
|
|
"XiangZhenJie_yitong@gengdi#1",
|
|
|
"Cun_yitong@SiPing#1",
|
|
|
+ "/map-SIPING/rest/maps/siping",//17
|
|
|
],
|
|
|
],
|
|
|
}
|
|
@@ -671,16 +678,16 @@
|
|
|
|
|
|
//开始加载专题图等数据,8秒后开始执行
|
|
|
setTimeout(function() {
|
|
|
- // // 3.水系
|
|
|
- // let shuixi = that.superMapRootUrl+"/map-mvt-shuixiMian/restjsr/v1/vectortile/maps/shuixi_Mian";
|
|
|
- // that.mvtMap0 = that.scene.addVectorTilesMap({
|
|
|
- // url: shuixi,
|
|
|
- // canvasWidth: 512,
|
|
|
- // name: 'mvt_map0',
|
|
|
- // viewer: that.viewer,
|
|
|
- // selectedColor:new Cesium.Color(6,169,254,0.5),
|
|
|
- // show:true,
|
|
|
- // });
|
|
|
+ //3.水系
|
|
|
+ let shuixi = that.superMapRootUrl + withinData[2];
|
|
|
+ that.mvtMap0 = that.scene.addVectorTilesMap({
|
|
|
+ url: shuixi,
|
|
|
+ canvasWidth: 512,
|
|
|
+ name: 'mvt_map0',
|
|
|
+ viewer: that.viewer
|
|
|
+ });
|
|
|
+ that.mvtMap0.selectedColor = new Cesium.Color(6, 169, 254, 0.5);
|
|
|
+ that.mvtMap0.show = false;
|
|
|
|
|
|
// //4.林地
|
|
|
// let lindi = that.superMapRootUrl+"/map-mvt-lindi/restjsr/v1/vectortile/maps/lindi";
|
|
@@ -718,9 +725,17 @@
|
|
|
// let road_name_url = that.superMapRootUrl+'/3D-road_Name_S/rest/realspace';
|
|
|
// that.road_name = that.scene.open(road_name_url);
|
|
|
//
|
|
|
- // // 8.添加水系NAME
|
|
|
- // let shuixi_name_url = that.superMapRootUrl+'/3D-shuixi_Name/rest/realspace';
|
|
|
- // that.shuixi_name = that.scene.open(shuixi_name_url);
|
|
|
+ // 8.添加水系NAME
|
|
|
+ let shuixi_name_url = that.superMapRootUrl + withinData[10];
|
|
|
+ that.shuixi_name = that.scene.open(shuixi_name_url);
|
|
|
+ that.cacheData.ShuiXi = withinData[11]
|
|
|
+ that.shuixi_name.then(function (layers) {
|
|
|
+ let textlayer = that.scene.layers.find(withinData[11]);//文字图层
|
|
|
+ //加载后隐藏
|
|
|
+ textlayer.visible = false;
|
|
|
+ //关闭避让
|
|
|
+ textlayer.isOverlapDisplayed = true;
|
|
|
+ });
|
|
|
|
|
|
//9.添加县界和乡镇界
|
|
|
let layer_xianjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
|
|
@@ -744,7 +759,91 @@
|
|
|
});
|
|
|
|
|
|
}, 3000);
|
|
|
-
|
|
|
+ that.viewer.selectedEntityChanged.addEventListener(function (entity) {
|
|
|
+ if (entity != undefined && Reflect.has(entity, 'layerID')) {
|
|
|
+ that.queryParams.name = entity.pickResult[entity.layerID][0].feature.properties.Name;
|
|
|
+ that.queryParams.mapData = entity.pickResult[entity.layerID][0].feature.properties.SmUserID;
|
|
|
+ that.queryParams.mapName = entity.pickResult[entity.layerID][0].feature.properties.layer;
|
|
|
+ getDeviceList(that.queryParams).then(res => {
|
|
|
+ that.openZt = true;
|
|
|
+ const treeLabels = [{
|
|
|
+ "id": null,
|
|
|
+ "labelCode": "999",
|
|
|
+ "labelName": "电视墙",
|
|
|
+ "cameraType": null,
|
|
|
+ "parentLabelCode": ""
|
|
|
+ }];
|
|
|
+ const labelChannels = [];
|
|
|
+ for (let i in res.data) {
|
|
|
+ treeLabels.push({
|
|
|
+ "id": null,
|
|
|
+ "labelCode": res.data[i].cameraCode,
|
|
|
+ "labelName": res.data[i].cameraName,
|
|
|
+ "cameraType": "1",
|
|
|
+ "parentLabelCode": "999"
|
|
|
+ })
|
|
|
+ labelChannels.push({
|
|
|
+ "labelCode": res.data[i].cameraCode,
|
|
|
+ "channelDates": [
|
|
|
+ {
|
|
|
+ "channelCode": res.data[i].cameraCode,
|
|
|
+ "channelName": res.data[i].cameraName,
|
|
|
+ "channelSn": null,
|
|
|
+ "cameraType": "1",
|
|
|
+ "online": "1",
|
|
|
+ "cameraCode": "1"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ that.dianshiqiang = [
|
|
|
+ {
|
|
|
+ "switchTab": "2",
|
|
|
+ "treeLabels": treeLabels,
|
|
|
+ "labelChannels": labelChannels
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ that.longitude = res.data[0].longitude;
|
|
|
+ that.latitude = res.data[0].latitude;
|
|
|
+ that.userList = res.data[0].userList;
|
|
|
+ let html =
|
|
|
+ '<div class="map-tip">' +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>名称:" + res.data[0].name +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>";
|
|
|
+ for (let i in res.data[0].userList) {
|
|
|
+ html += "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>" + res.data[0].userList[i].position + ":" + res.data[0].userList[i].name + "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>电话:" + (res.data[0].userList[i].phone ? res.data[0].userList[i].phone : "") + "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>";
|
|
|
+ }
|
|
|
+ html += "</div>";
|
|
|
+ that.bindPopupHtml = html;
|
|
|
+ that.mapshow = true
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ openTvwall() {
|
|
|
+ if(this.openZt){
|
|
|
+ this.mapshow=false;
|
|
|
+ this.$emit('fatherMethod', this.dianshiqiang, this.longitude, this.latitude, this.userList);
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 地图落点
|
|
@@ -791,6 +890,7 @@
|
|
|
if (html != undefined && html._value != null && html._value != '' && html != 'cgq') {
|
|
|
that.bindPopupHtml = html
|
|
|
that.mapshow = true
|
|
|
+ that.openZt = false
|
|
|
} else if (html == 'cgq') {
|
|
|
that.timer = setInterval(function() {
|
|
|
var color = "green";
|