删除 cesium 相关代码

This commit is contained in:
hym 2026-04-03 11:10:58 +08:00
parent f61af1183d
commit c2cf9ae0f4
332 changed files with 111 additions and 15631 deletions

View File

@ -10,8 +10,6 @@
<link rel="apple-touch-icon" href="./static/images/logo_map.png" />
<link rel="stylesheet" href="./static/css/reset.css">
<link rel="stylesheet" href="./static/js/Cesium/Widgets/widgets.css">
<script type="text/javascript" src="./static/js/Cesium/Cesium.js"></script>
<!-- 引入 Mapbox GL JS -->
<link href="./static/css/mapbox-gl-v3.16.0.css" rel="stylesheet">

44
package-lock.json generated
View File

@ -1462,41 +1462,6 @@
"to-fast-properties": "^2.0.0"
}
},
"@cesium/engine": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@cesium/engine/-/engine-11.1.0.tgz",
"integrity": "sha512-vrEQAbYQuXt2cMYF9BpBu4Kxu+8uje1CrFHfyI5aNp7gCrUK1RYquldyqT7TDr3YKe7oZMHL+Xeb5Vm8ua6gZQ==",
"requires": {
"@tweenjs/tween.js": "^25.0.0",
"@zip.js/zip.js": "^2.7.34",
"autolinker": "^4.0.0",
"bitmap-sdf": "^1.0.3",
"dompurify": "^3.0.2",
"draco3d": "^1.5.1",
"earcut": "^3.0.0",
"grapheme-splitter": "^1.0.4",
"jsep": "^1.3.8",
"kdbush": "^4.0.1",
"ktx-parse": "^0.7.0",
"lerc": "^2.0.0",
"mersenne-twister": "^1.1.0",
"meshoptimizer": "^0.21.0",
"pako": "^2.0.4",
"protobufjs": "^7.1.0",
"rbush": "3.0.1",
"topojson-client": "^3.1.0",
"urijs": "^1.19.7"
}
},
"@cesium/widgets": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@cesium/widgets/-/widgets-8.1.0.tgz",
"integrity": "sha512-WD5eokNfSQmB3oqe97KmdmDefwzooHaMWBm9kE/Af9edyD2j3eQVTrbNhiJ06UIyEjd01U1af2iDOawI9adAgA==",
"requires": {
"@cesium/engine": "^11.1.0",
"nosleep.js": "^0.12.0"
}
},
"@eslint/eslintrc": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
@ -4565,15 +4530,6 @@
"lazy-cache": "^1.0.3"
}
},
"cesium": {
"version": "1.121.1",
"resolved": "https://registry.npmjs.org/cesium/-/cesium-1.121.1.tgz",
"integrity": "sha512-WpdaGFd8qCOHiE9khV0sWWjCMXAX1U9Aou8MzMC/F0Akp6YqcOk4HLk4LLhZKeOjO/Bh27iTIW2mxEZ5+dtCxg==",
"requires": {
"@cesium/engine": "^11.0.0",
"@cesium/widgets": "^8.0.0"
}
},
"chai-nightwatch": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/chai-nightwatch/-/chai-nightwatch-0.1.1.tgz",

View File

@ -15,8 +15,6 @@
},
"dependencies": {
"axios": "^0.19.2",
"baidu-map": "^0.1.4",
"cesium": "^1.117.0",
"echarts": "^4.9.0",
"echarts-gl": "^1.1.0",
"element-ui": "^2.13.0",
@ -32,9 +30,7 @@
"swiper": "^6.8.4",
"vue": "^2.5.2",
"vue-awesome-swiper": "^3.1.3",
"vue-baidu-map": "^0.21.22",
"vue-router": "^3.0.1",
"vue2-google-maps": "^0.10.7",
"vuex": "^3.1.1",
"xml2js": "^0.6.2"
},

View File

@ -208,16 +208,6 @@ export const constantRoutes = [
loginAuthority: true
}
},
// {
// path: 'GMRT',
// name: 'GMRT',
// component: () => import('@/views/GMRT.vue'),
// meta: {
// title: '地图',
// icon: 'peoples',
// loginAuthority: true
// }
// },
{
path: 'dataSearch',
name: 'dataSearch',
@ -298,16 +288,16 @@ export const constantRoutes = [
loginAuthority: true
}
},
{
path: 'physicalDataSearchCTD',
name: 'physicalDataSearchCTD',
component: () => import('@/views/sublibrary/physicalDataSearchCTD.vue'),
meta: {
title: '温盐深(CTD) 数据应用',
icon: 'peoples',
loginAuthority: true
}
},
// {
// path: 'physicalDataSearchCTD',
// name: 'physicalDataSearchCTD',
// component: () => import('@/views/sublibrary/physicalDataSearchCTD.vue'),
// meta: {
// title: '温盐深(CTD) 数据应用',
// icon: 'peoples',
// loginAuthority: true
// }
// },
{
path: 'phoneVideoIndex',
name: 'phoneVideoIndex',
@ -328,16 +318,6 @@ export const constantRoutes = [
loginAuthority: true
}
},
// {
// path: 'analyse',
// name: 'analyse',
// component: () => import('@/views/analyse.vue'),
// meta: {
// title: '统计分析',
// icon: 'peoples',
// loginAuthority: true
// }
// },
{
path: 'statistics',
name: 'statistics',

View File

@ -1,83 +1 @@
import { getParamsList } from '../api/home'
export function modifyCesiumMouseWheel(viewer) {
// 地图缩放改为按下 Ctrl + 鼠标滚轮
viewer.scene.screenSpaceCameraController.zoomEventTypes = [{ eventType: Cesium.CameraEventType.WHEEL, modifier: Cesium.KeyboardEventModifier.CTRL }];
// 改写 Cesium 原生鼠标滚轮事件
const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction((event) => {
if (event < 0) {
window.scrollBy({ left: 0, top: 15, behavior: 'auto' });
} else {
window.scrollBy({ left: 0, top: -15, behavior: 'auto' });
}
}, Cesium.ScreenSpaceEventType.WHEEL);
// 鼠标移动时显示提示信息
handler.setInputAction((event) => {
document.getElementById('mouseWheelTip').style.display = '';
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
}
let imageryViewModels = [];
export function setImageryViewModels(cesiumHostAddr) {
if (imageryViewModels.length == 0) {
// 世界影像地图
const world_imagery = new Cesium.WebMapTileServiceImageryProvider(
{
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
// url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
// url: 'https://services.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer'
}
);
// 彩色地形底图
const colorMap = new Cesium.WebMapTileServiceImageryProvider(
{
url: cesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:world/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg',
layer: 'ougp:world',
style: 'default',
format: 'image/jpeg',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
);
// 灰度地形底图
const grayMap = new Cesium.WebMapTileServiceImageryProvider(
{
url: cesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:world_gray/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg',
layer: 'ougp:world_gray',
style: 'default',
format: 'image/jpeg',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
);
// 自定义底图
imageryViewModels.push(new Cesium.ProviderViewModel({
name: "世界影像地图",
iconUrl: "static/images/world_imagery.png",
tooltip: "世界影像地图",
creationFunction: function () {
return world_imagery;
}
}));
imageryViewModels.push(new Cesium.ProviderViewModel({
name: "地形地图",
iconUrl: "static/images/world_color.png",
tooltip: "彩色地形底图",
creationFunction: function () {
return colorMap;
}
}));
imageryViewModels.push(new Cesium.ProviderViewModel({
name: "灰度地图",
iconUrl: "static/images/world_gray.png",
tooltip: "灰度地形底图",
creationFunction: function () {
return grayMap;
}
}));
}
return imageryViewModels;
}

View File

@ -61,7 +61,7 @@ export function initMapbox(mapId, options = {}) {
attributionControl: false,
boxZoom: true,//如果为true则启用了“缩放框”交互按住shift并在地图上拖框放大
preserveDrawingBuffer: false,//如果为true地图的canvas可以使用导出到png通过map.getCanvas().toDataURL()。默认为false会提高地图性能。
projection: 'equirectangular', // 设置投影方式经纬度直投解决缩放级别大于26时瓦片消失的问题
// projection: 'equirectangular', // 设置投影方式经纬度直投解决缩放级别大于26时瓦片消失的问题
});
Vue.config.maps[mapId] = map;

View File

@ -1,527 +0,0 @@
<template>
<div style="height:100%;" class="GMRT">
<div id="cesiumContainer" class="" />
<!-- <div class="father">
<ul>
<li onclick="addRain()"><a href="#">城镇预报</a></li>
<li onclick="detale()"><a href="#">清除</a></li>
</ul>
</div> -->
<div class="son" style="display: none;">弹框插槽</div>
<div v-if="imgFlag" class="image_v">
<img src="../../static/images/01.jpg" alt="">
</div>
<!-- 左下角坐标 -->
<div id="latlng_show">
<p class="coordinate">
经度°
<span id="longitude_show" />
</p>
<p class="coordinate">
纬度°
<span id="latitude_show" />
</p>
<p class="coordinate">
水深 <span id="elevation_show" /> m
</p>
<p class="coordinate">
视角高 <span id="altitude_show" /> km
</p>
</div>
</div>
</template>
<script>
/* 初始化变量 */
var viewer
var stationArrList = [] //
var stationPrev = '' //
var handler = ''
var ellipsoid = null
var elevation_show = document.getElementById('elevation_show') //
var altitude_show = document.getElementById('altitude_show') //
export default {
/* eslint-disable */
name: 'GMRT',
props: {
isLine: {
type: Boolean,
default: false
},
//
isImg: {
type: Boolean,
default: false
},
},
data() {
return {
//
imgFlag:false,
relatedLinksLoading:false,
relatedLinksList:[],
iconImgY:require("../../static/images/13-y.png"),
iconImgW:require("../../static/images/14-w.png"),
iconImgYB:require("../../static/images/13-b.png"),
iconImgWB:require("../../static/images/14-b.png"),
movementTimer:null
}
},
computed: {},
created() {
},
mounted() {
this.init()
},
methods: {
init() {
// Cesium.Ion.defaultAccessToken='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkY2Y5NWY2Ni1mODQ1LTQ3YTUtYjc4Zi1jYzhjMGI2YzcxMWYiLCJpZCI6MTI5ODMwLCJpYXQiOjE2Nzk0Njk5NTd9.DTH54ioOH-HLqeNIetBe9hFyrPOX2Vp1AQmZzw8TIZ4'
// viewer = new Cesium.Viewer('cesiumContainer', {
// animation: false,//
// timeline: false,// 线
// navigationHelpButton: false,//
// baseLayerPicker: true,//
// geocoder: true,// 使bing
// vrButton: false,//
// selectionIndicator: true,// falsetrue
// infoBox: false,//
// fullscreenButton: false,//
// selectionIndicator: false,// 绿
// });
// console.log(viewer)
// // (GMRT)
// var localProvider = new Cesium.createTileMapServiceImageryProvider({
// url: '../../static/js/Cesium-1.53/Build/Cesium/Assets/Textures/NaturalEarthII',
// fileExtension: 'jpg'
// });
// viewer.imageryLayers.addImageryProvider(localProvider);
// // GMRT
// var provider = new Cesium.WebMapServiceImageryProvider({
// url: 'https://www.gmrt.org/services/mapserver/wms_merc',
// layers: 'GMRT',
// style: "default",
// format: "image/jpeg",
// service: 'WMS',
// version: '1.3.0',
// request: 'GetCapabilities'
// });
// viewer.imageryLayers.addImageryProvider(provider);
let earthMap = new Cesium.WebMapTileServiceImageryProvider(
{
url: 'http://124.16.219.154:8080/geoserver/gwc/service/wmts/rest/ne:gmrt_20231018/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg',
layer: 'ne:gmrt_20231018',
style: 'default',
tileMatrixSetID: 'EPSG:4326',
format: 'image/jpeg',
tilingScheme: new Cesium.GeographicTilingScheme()
});
viewer = new Cesium.Viewer('cesiumContainer', {
shadows: false,
timeline: false,
baseLayerPicker: false,
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false,
imageryProvider: earthMap
});
viewer._cesiumWidget._creditContainer.style.display = 'none'
viewer.scene.sun.show = false
viewer.scene.moon.show = false
viewer.scene.fog.enabled = false
viewer.scene.skyAtmosphere.show = false
viewer.scene.sun.show = false
viewer.scene.skyBox.show = false
viewer.scene.globe.enableLighting = false;
viewer.shadowMap.darkness=0.8;
viewer.scene._sunBloom = false
viewer.scene.globe.showGroundAtmosphere = false;
// let coastline = new Cesium.WebMapTileServiceImageryProvider(
// {
// url: 'http://124.16.219.154:8080/geoserver/gwc/service/wmts/rest/ne:GSHHS_f_L1/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
// layer: 'ne:GSHHS_f_L1',
// style: 'default',
// tileMatrixSetID: 'EPSG:4326',
// format: 'image/png',
// tilingScheme: new Cesium.GeographicTilingScheme()
// }
// );
// viewer.imageryLayers.addImageryProvider(coastline);
Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees(104.479207, 14.209234, 114.479207, 22.209234);
viewer.camera.flyHome();
handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function (wheelment) {
var height = viewer.camera.positionCartographic.height;
console.log(height)
if (height > 16576914.758292207) {
viewer.camera.setView({
destination: Cesium.Cartesian3.fromRadians(viewer.camera.positionCartographic.longitude, viewer.camera.positionCartographic.latitude, 16576914.758292207)
});
}
},
Cesium.ScreenSpaceEventType.WHEEL);
viewer.scene.screenSpaceCameraController.enableZoom = true;
let dataList=[
{
diveNum: "TY-22",
latitude: 0,
launchLatitude: 10.99454,
launchLongtitude: 141.936603,
longtitude: 0,
platTypeId: "深海着陆器",
platformName: "天涯号1",
processStatus: "seatrial",
sampleNo: "",
shipId: 1,
id: 1,
stationNum: "TS03-S043LANDER01"
},
{
diveNum: "TY-24",
expedition: "TS03",
id: 16,
jobType: "0",
latitude: 0,
launchLatitude: 11.326952,
launchLongtitude: 142.19354,
longtitude: 0,
platTypeId: "深海着陆器",
platformName: "天涯号2",
processStatus: "seatrial",
sampleNo: "",
shipId: 1,
stationNum: "TS03-S085LANDER08"
},
{
diveNum: "TY-25",
expedition: "TS04",
id: 18,
jobType: "0",
latitude: 0,
launchLatitude: 13.25944,
launchLongtitude: 140.841087,
longtitude: 0,
platTypeId: "深海着陆器",
platformName: "天涯号3",
processStatus: "seatrial",
sampleNo: "",
shipId: 1,
stationNum: "TS03-S085LANDER08"
}
]
let degreeArr=[]
for (var i = 0; i < dataList.length; i++) {
this.stationData(dataList[i], i);
degreeArr=[]
if(i<dataList.length-1){
degreeArr.push(dataList[i].launchLongtitude,dataList[i].launchLatitude,dataList[i+1].launchLongtitude,dataList[i+1].launchLatitude)
if(this.isLine){
this.drawLine(degreeArr);
}
}
}
let data=[
{
id:1,
expedition:"TS03",
track:[
{
longtitude:141.936603,
latitude:10.99454
},
{
longtitude:142.19354,
latitude:11.326952
},
{
longtitude:140.841087,
latitude:13.25944
},
// {
// longtitude:141.9394,
// latitude:10.991922
// }
]
}
]
// for (var i = 0; i < data.length; i++) {
// var item = data[i];
// var trackArr = item.track;
// var trackId = item.id;
// var textName = item.expedition;
// var degreeArr = [];
// for (var j = 0; j < trackArr.length; j++) {
// var trackItem = trackArr[j];
// var latitude = trackItem.latitude;
// var longtitude = trackItem.longtitude;
// degreeArr.push(longtitude, latitude);
// }
// if (degreeArr.length != 0) {
// console.log("degreeArr",degreeArr,degreeArr[0],degreeArr[1])
// this.drawLine(degreeArr, trackId, textName);
// }
// }
},
//
stationData(data, index) {
var longtitude = data.longtitude == 0 ? data.launchLongtitude : data.longtitude;
var latitude = data.latitude == 0 ? data.launchLatitude : data.latitude;
var id = data.id; //
var shipId = data.shipId; // Id
var stationNum = data.stationNum; //
var diveNum = data.diveNum; //
var sampleNo = data.sampleNo//
viewer.entities.add({
description:data,
id: id,
name: sampleNo !== '' ? sampleNo : (diveNum !== '' ? stationNum !== '' || stationNum !== 'undefined' ? diveNum : '' : stationNum),
position: Cesium.Cartesian3.fromDegrees(longtitude, latitude),
//
label: { //
text: sampleNo !== '' ? sampleNo : (diveNum !== '' ? stationNum !== '' || stationNum !== 'undefined' ? diveNum : '' : stationNum),
font: '700 16px Arial',
fillColor: Cesium.Color.WHITE,//
outlineColor: Cesium.Color.BLACK,//
outlineWidth: 3,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,//
pixelOffset: new Cesium.Cartesian2(0, 50), //
style: Cesium.LabelStyle.FILL_AND_OUTLINE, //FILL , OUTLINE,FILL_AND_OUTLINE
horizontalOrigin:Cesium.HorizontalOrigin.CENTER, //, CENTER RIGHT LEFT
// showBackground:true,    //,
// backgroundColor: new Cesium.Color.fromCssColorString('#141414'),
},
billboard: { //
image: this.iconImgW,
scale: 1,
}
});
this.addbounced()
// viewer.zoomTo(viewer.entities); //zoomTo */
// stationArrList.push(this.stationObj);
// if (index === 0) {
// stationPrev = index;
// viewer.camera.flyTo({
// destination: Cesium.Cartesian3.fromDegrees(longtitude, latitude, 300000)
// });
// }
},
//
addbounced() {
let _this=this
var scene = viewer.scene;
var num = {};
this.movementTimer = null;
ellipsoid = viewer.scene.globe.ellipsoid;
//
handler.setInputAction(function (movement) {
if (scene.mode !== Cesium.SceneMode.MORPHING) {
let pickedObject = scene.pick(movement.endPosition);
if (
scene.pickPositionSupported &&
Cesium.defined(pickedObject) &&
pickedObject.id !== ""&&
pickedObject.id._description
) {
$(".son").html("");//
var windowPosition = movement.startPosition;//
num.x = windowPosition.x + 50 + document.getElementById("cesiumContainer").offsetLeft;
num.y = windowPosition.y + 50;
// description
var todo = pickedObject.id._description._value;
//
$(".son").css("display", "block");
$(".son").css("left", num.x);
$(".son").css("top", num.y);
//
//es6
var addHtml = `
<h4 style="">科考船只探索一号</h4>
<p>经度°${todo.launchLongtitude}</p>
<p>纬度°${todo.launchLatitude}</p>
<p>航迹向56°</p>
<p>航艏向252°</p>
<p>航速56km</p>
<p>状态停泊</p>
<p>更新时间2022-3-12 11:23:24</p>`;
$(".son").append(addHtml);
} else {
$(".son").html("");
$(".son").css("display", "none");
}
}
var cartesian = viewer.camera.pickEllipsoid(movement.endPosition, ellipsoid);
if (cartesian) {
viewer.scene.screenSpaceCameraController.enableZoom = true;
//
var cartographic = viewer.scene.globe.ellipsoid.cartesianToCartographic(cartesian);
//
var log_String = Cesium.Math.toDegrees(cartographic.longitude).toFixed(4); //
var lat_String = Cesium.Math.toDegrees(cartographic.latitude).toFixed(4); //
var alti_String = (viewer.camera.positionCartographic.height / 1000).toFixed(2); //
clearTimeout(_this.movementTimer);
_this.movementTimer = setTimeout(function () {
$.ajax({
type: "GET",
url: "https://www.gmrt.org/services/pointserver.php",
data: {
'latitude': lat_String,
'longitude': log_String,
'statsoff': 'true'
},
async: true,
success: function (msg) {
$("#elevation_show").text(msg); //
}
});
},
200);
$("#longitude_show").text(log_String); //
$("#latitude_show").text(lat_String); //
$("#altitude_show").text(alti_String); //
}
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE)
// if(_this.isImg){
// handler.setInputAction(function(movement){
// if (scene.mode !== Cesium.SceneMode.MORPHING) {
// let pickedObject = scene.pick(movement.position);
// if (pickedObject) {
// _this.imgFlag=true
// }else{
// _this.imgFlag=false
// }
// }
// },Cesium.ScreenSpaceEventType.LEFT_CLICK);
// }
},
/* cesium 绘制线 */
drawLine(degreeArr, sourceId, textName) {
viewer.entities.add({
// id: sourceId,
// name: textName,
// position: Cesium.Cartesian3.fromDegrees(degreeArr[0], degreeArr[1]),
//
// label: { //
// text: textName,
// font: '700 16px Arial',
// fillColor: Cesium.Color.YELLOW,//
// outlineColor: Cesium.Color.BLACK,//
// outlineWidth: 3,//
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// pixelOffset: new Cesium.Cartesian2(0,20),
// horizontalOrigin: Cesium.HorizontalOrigin.BOTTOM
// },
// billboard: { //
// image: this.iconImg,
// scale: 1,
// },
polyline: { //polyline线
positions: Cesium.Cartesian3.fromDegreesArray(degreeArr),//
width: 20,//线
material: new Cesium.PolylineArrowMaterialProperty(
// glowPower: 0.2,//线(0-1.0)
// Cesium.Color.BLUE //
new Cesium.Color.fromCssColorString('#ff9000')
),//
clampToGround: true //,
}
});
// viewer.zoomTo(viewer.entities); //zoomTo
// viewer.camera.flyTo({
// destination: Cesium.Cartesian3.fromDegrees(degreeArr[0], degreeArr[1], 60000)
// });
},
//
async getLinks() {
this.relatedLinksLoading = true
try {
} catch (error) {
console.log(error)
}
this.relatedLinksLoading = false
},
handleDetail(row){
}
}
}
</script>
<style>
#cesiumContainer {
width: 100%;
height: calc(100% + 1px);
background-color: #a4acac;
}
.father{
position: absolute;
top: 100px;
left: 100px;
}
.father li{
list-style: none;
line-height: 50px;
}
.father a{
color: aliceblue;
}
.son{
position: absolute;
left: 1450px;
top: 418px;
background-color: #062f59c7;
color: rgb(253, 253, 253);
border-radius: 10px;
padding: 20px;
border:1px solid #7ba9cacf;
font-size: 12px;
}
.cesium-viewer-bottom{
display: none !important;
}
.GMRT{
position: relative;
}
.GMRT .image_v{
position: absolute;
left:26%;
top:2%;
}
#latlng_show{
position: absolute;
bottom:0px;
color: white;
padding:10px;
}
</style>

View File

@ -1,681 +0,0 @@
<template>
<div class="fenxi">
<div class="banner">
<img src="../../static/images/bannerny1.jpg" alt="">
<div class="banner_con">
<div class="con">
<h1>探索一号</h1>
<ul>
<li>
<div class="t">
<p>26</p>
<span></span>
</div>
<div class="b">
<p>航次次数</p>
</div>
</li>
<li>
<div class="t">
<p>286</p>
<span></span>
</div>
<div class="b">
<p>航次天数</p>
</div>
</li>
<li>
<div class="t">
<p>23</p>
<span></span>
</div>
<div class="b">
<p>参航单位</p>
</div>
</li>
<li>
<div class="t">
<p>279</p>
<span></span>
</div>
<div class="b">
<p>作业站位个数</p>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="fenxi_con">
<div class="fenxi1">
<div id="xinxi" class="ccc" />
</div>
<div class="fenxi1">
<h2 class="white">参航单位</h2>
<div id="danwei" class="ccc">
<baidu-map
:center="center1"
:zoom="zoom1"
:scroll-wheel-zoom="true"
map-type="BMAP_SATELLITE_MAP"
style="width: 100%; height: 100%"
@ready="handler1"
>
<bm-marker
v-for="(item, index) in listxia"
:key="index"
:position="item.dingwei"
:dragging="true"
:icon="item.pic"
@click="totap1(item)"
>
<bm-label
:content="item.content"
:offset="{ width: -35, height: 30 }"
/>
</bm-marker>
</baidu-map>
</div>
</div>
<div class="fenxi1">
<div id="renyuan" class="ccc" />
</div>
<div class="fenxi1">
<h2 class="white">作业站位</h2>
<div id="zhanwei" class="ccc">
<GMRT />
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
import GMRT from './GMRT.vue'
export default {
name: 'Fenxi',
components: {
GMRT
},
data() {
return {
center: { lng: 118.962643, lat: 35.618913 },
zoom: 3,
center1: { lng: 56.761382, lat: 10.897877 },
zoom1: 2,
list: [
{
dingwei: {
lng: 119.054629,
lat: 36.373917
},
content: '',
pic: {
url: 'http://shipin.hey17.com/dingwei.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 119.919302,
lat: 34.226755
},
content: '',
pic: {
url: 'http://shipin.hey17.com/dingwei.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 119.560555,
lat: 34.421374
},
content: '',
pic: {
url: 'http://shipin.hey17.com/dingwei.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 116.442213,
lat: 35.556921
},
content: '',
pic: {
url: 'http://shipin.hey17.com/dingwei.png',
size: { width: 16, height: 21 }
}
}
],
listxia: [
{
dingwei: {
lng: 56.761382,
lat: 10.897877
},
content: '',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 59.116236,
lat: -0.00034
},
content: '',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 47.783501,
lat: -2.370556
},
content: '',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 41.160475,
lat: -5.474589
},
content: '',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
}
],
dataShuju: {
value: [800, 1200, 900, 1700, 1410, 1600, 1000, 1100],
color: '#ffe866',
name: 'Observed'
},
dataQushi: {
value: [1000, 1150, 850, 1600, 1510, 1700, 1100, 1300],
color: '#02c464',
name: 'Predicted',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
}
}
},
mounted() {
this.getecharts()
this.gettubiao2()
const originShadow = Element.prototype.attachShadow;
Element.prototype.attachShadow = (...args) => {
const shadowRoot = originShadow.call(this, ...args)
const style = document.createElement("style")
style.innerHTML = "div { display: none !important; }"
shadowRoot.appendChild(style)
return shadowRoot
};
},
methods: {
getecharts() {
var myChart = this.$echarts.init(document.getElementById('xinxi'))
var option = {
title: {
top: '20',
left: '20',
text: '航次信息统计',
textStyle: {
color: '#212121',
fontSize: '22px'
}
},
grid: {
left: '2%',
right: '4%',
bottom: '10%',
top: '20%',
containLabel: true
// borderColor:'#dce8fe',
// borderWidth: 5 ,
// show:true,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
shadowStyle: { color: 'rgba(0,0,0,0.1)' },
z: 1
},
padding: [15, 22],
backgroundColor: 'rgba(0,0,0,0.9)',
borderColor: '#01a3ce',
borderWidth: 1,
textStyle: { fontSize: 15, lineHeight: 32, color: '#ffffff' }
},
xAxis: {
data: [
'TS03',
'TS04',
'TS05',
'TS06',
'TS07',
'TS08',
'TS09',
'TS010',
'TS011',
'TS012',
'TS013'
],
axisLine: { show: true },
axisTick: {
show: false,
lineStyle: { color: '#0187c4', width: 1, opacity: 1 }
},
axisLabel: {
textStyle: { fontSize: 15, color: '#212121' },
margin: 25,
interval: 0
},
splitLine: { show: false }
},
yAxis: {
type: 'value',
name: '天数',
nameTextStyle: {
fontSize: '14px',
padding: [3, 14, 5, -30]
},
axisLine: { show: false },
axisTick: {
show: false,
lineStyle: { color: '#0187c4', width: 1, opacity: 1 }
},
axisLabel: {
textStyle: { fontSize: 14, color: '#212121' },
opacity: 0.7,
margin: 15
},
splitLine: {
show: true,
lineStyle: { color: '#212121', width: 1, opacity: 0.2 }
}
},
dataZoom: [
{
id: 'dataZoomX',
type: 'slider',
xAxisIndex: [0],
filterMode: 'filter'
}
],
series: [
// {
// type: "pictorialBar",
// z: 13,
// symbolSize: [30, 12],
// symbolOffset: [0, -7],
// symbolPosition: "end",
// tooltip: { show: false },
// itemStyle: { color: "#00a8e6" },
// data: [120, 200, 150, 80, 70, 110, 130, 150, 80],
// },
{
type: 'bar',
z: 12,
itemStyle: {
color: '#13a1f0',
borderRadius: [5, 5, 0, 0] //
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// { offset: 0, color: "#00e7ff" },
// { offset: 1, color: "rgba(0,146,255,0.05)" },
// ]),
},
label: {
show: true,
position: 'top',
distance: 5,
fontSize: 16,
color: '#212121',
lineHeight: 30,
fontFamily: 'DIN-Bold'
},
// emphasis: {
// label: { color: "#f1e06e" },
// },
barWidth: 20,
data: [120, 200, 150, 80, 70, 110, 130, 150, 80, 110, 130]
}
]
}
myChart.setOption(option)
},
gettubiao2() {
var myChart = this.$echarts.init(document.getElementById('renyuan'))
var option = {
title: {
top: '20',
left: '20',
text: '航次参航人员工作量统计',
textStyle: {
color: '#212121',
fontSize: '22px'
}
},
legend: {
data: ['天数', '次数'],
right: '5%',
top: '5%',
textStyle: {
color: '#212121',
fontSize: '15'
},
icon: 'roundRect'
},
grid: {
left: '2%',
right: '4%',
bottom: '10%',
top: '20%',
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
shadowStyle: { color: 'rgba(0,0,0,0.1)' },
z: 1
},
padding: [15, 22],
backgroundColor: 'rgba(255,255,255,0.9)',
borderColor: '#01a3ce',
borderWidth: 1,
textStyle: { fontSize: 16, lineHeight: 32, color: '#212121' }
},
dataZoom: [
{
id: 'dataZoomX',
type: 'slider',
xAxisIndex: [0],
filterMode: 'filter'
}
],
xAxis: {
data: [
'高文清',
'秋雪玲',
'陈传旭',
'何恩怨',
'金文明',
'罗腾也',
'唐元贵',
'王飒',
'李珊珊'
],
axisLine: { show: false },
axisTick: {
show: false,
lineStyle: { color: '#0187c4', width: 1, opacity: 1 }
},
axisLabel: {
textStyle: { fontSize: 16, color: '#212121' },
margin: 15,
interval: 0
},
splitLine: { show: false }
},
yAxis: {
type: 'value',
name: '天数/次数',
nameTextStyle: {
fontSize: '14px',
padding: [3, 14, 5, -10]
},
axisLine: { show: false },
axisTick: {
show: false,
lineStyle: { color: '#212121', width: 1, opacity: 1 }
},
axisLabel: {
textStyle: { fontSize: 15, color: '#212121' },
opacity: 0.7,
margin: 15
},
splitLine: {
show: true,
lineStyle: { color: '#212121', width: 1, opacity: 0.2 }
}
},
animationDelay: 900,
animationDuration: 2000,
animationDurationUpdate: 800,
series: [
// {
// type: "pictorialBar",
// z: 13,
// symbolSize: [26, 10],
// symbolOffset: [0, -6],
// symbolPosition: "end",
// tooltip: { show: false },
// itemStyle: { color: "#ffe866" },
// data: [120, 200, 150, 80, 70, 110, 130, 150, 80],
// },
{
type: 'bar',
name: '天数',
z: 8,
barGap: '30%',
itemStyle: {
color: '#13a1f0',
borderRadius: [5, 5, 0, 0]
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// { offset: 0, color: "#cdc060" },
// { offset: 1, color: "rgba(205,192,96,0.05)" },
// ]),
},
barWidth: 20,
data: [120, 200, 150, 80, 70, 110, 130, 150, 80]
},
{
name: '次数',
type: 'line',
stack: 'Total',
smooth: true,
symbol: 'circle',
symbolSize: 10,
showSymbol: true,
z: 10,
data: [100, 150, 200, 100, 80, 90, 100, 110, 100],
itemStyle: {
color: '#fff',
borderColor: '#ffab34',
borderWidth: 2,
borderType: 'solid'
},
lineStyle: {
color: '#ffab34',
width: 4
}
// areaStyle: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// { offset: 0, color: "#3cefc8" },
// { offset: 1, color: "transparent" },
// ]),
// opacity: 0.15,
// },
}
]
}
myChart.setOption(option)
},
handler({ BMap, map }) {
console.log(BMap, map)
this.center.lng = 116.404
this.center.lat = 39.915
this.zoom = 6
},
handler1({ BMap, map }) {
console.log(BMap, map)
this.center1.lng = 56.761382
this.center1.lat = 10.897877
this.zoom1 = 1
},
totap(e) {
console.log(e)
e.pic.url = 'http://shipin.hey17.com/dingwei_a.png'
e.pic.size.width = 22
e.pic.size.height = 28
for (var i = 0; i < this.list.length; i++) {
if (this.list[i] != e) {
this.list[i].pic.url = 'http://shipin.hey17.com/dingwei.png'
this.list[i].pic.size.width = 16
this.list[i].pic.size.height = 21
}
}
},
totap1(e) {
console.log(e)
e.pic.url = 'http://shipin.hey17.com/dingwei_a.png'
e.pic.size.width = 22
e.pic.size.height = 28
for (var i = 0; i < this.listxia.length; i++) {
if (this.listxia[i] != e) {
this.listxia[i].pic.url = 'http://shipin.hey17.com/dingwei1.png'
this.listxia[i].pic.size.width = 16
this.listxia[i].pic.size.height = 21
}
}
}
}
}
</script>
<style scoped lang="scss">
.fenxi {
width: 100%;
height: 100%;
.banner {
width: 100%;
height: 20%;
position: relative;
img {
width: 100%;
// height: 100%;
object-fit: contain;
}
.banner_con {
position: absolute;
top: 0;
left: 0;
z-index: 888;
width: 100%;
height: 100%;
display: flex;
align-items: center;
.con {
margin: auto;
margin-top: 40px;
width: 85%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
h1 {
display: block;
margin-bottom: 40px;
font-size: 56px;
color: #fff;
font-weight: bold;
}
ul {
width: 100%;
height: auto;
display: flex;
align-items: center;
justify-content: center;
li {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 0 80px;
.t {
display: flex;
align-items: baseline;
p {
font-size: 56px;
color: #fff;
font-family: DIN-Bold;
font-weight: bold;
}
span {
font-size: 26px;
color: #fff;
}
}
.b {
width: auto;
text-align: center;
p {
font-size: 18px;
color: #fff;
}
}
}
}
}
}
}
.fenxi_con {
margin: auto;
margin-top: 40px;
margin-bottom: 90px;
width: 85%;
height: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.fenxi1 {
position: relative;
margin-bottom: 40px;
width: 48%;
height: 520px;
border-radius: 10px;
border: 1px solid #ccc;
overflow: hidden;
h2{
position: absolute;
top: 20px;
left: 20px;
z-index: 8888;
font-size: 22px;
color: #212121;
&.white{
color: #fff;
}
}
.ccc {
width: 100%;
height: 100%;
}
}
}
}
</style>
<style>
.anchorBL{
display: none;
}
</style>

View File

@ -239,7 +239,6 @@ import { loadVectorLayer, loadJsonLineFeature, loadJsonPointFeature, highlightFe
import { ColorGenerator } from '@/utils/color-generator';
import { initMapbox, handleWheel, initSprites, triggerLayerClick } from "@/utils/mapbox-utils";
const Cesium = window.Cesium
export default {
name: 'Shuju',
data() {
@ -247,7 +246,6 @@ export default {
show: false,
viewer: null,
filter: null,
color: [Cesium.Color.RED, Cesium.Color.GREEN, Cesium.Color.BLUE, Cesium.Color.CHARTREUSE, Cesium.Color.DARKBLUE],
searchType: [
{
label: '航次名称',
@ -307,8 +305,6 @@ export default {
chooseLine: null,
currentVoyage: null, //
currentSample: null, //
//
CesiumHostAddr: '',
//
imageryViewModels: [],
//
@ -362,16 +358,13 @@ export default {
mounted() {
initMapbox("dataSearchMap", {
tileKey: "world_horizon_1",
zoom: 4,
zoom: 3,
center: [122, 15],
minZoom: 2,
maxZoom: 29,
coastlineOn:false,
contourOn:false
});
// this.imageryViewModels = setImageryViewModels(this.CesiumHostAddr)
// this.initCesium()
},
methods: {
//
@ -488,20 +481,6 @@ export default {
addHighlightLayer(voyageName, i) {
Vue.config.maps["dataSearchMap"].setPaintProperty(`vector-${voyageName}-line`, "line-width", 4);
this.dataList[i].highlight = true;
return;
this.clearHighlight()
const highlightLayer = new Cesium.WebMapTileServiceImageryProvider({
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${voyageName}-highlight/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${voyageName}-highlight`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
});
this.highlightLayer = this.viewer.imageryLayers.addImageryProvider(highlightLayer);
this.dataList[i].highlight = true;
},
//
clearHighlight(voyageName, i) {
@ -515,14 +494,6 @@ export default {
];
Vue.config.maps["dataSearchMap"].setPaintProperty(`vector-${voyageName}-line`, "line-width", lineWidthExpression);
this.dataList[i].highlight = false;
return;
this.dataList.map(item => { item.highlight = false })
//
if (this.highlightLayer) {
this.viewer.imageryLayers.remove(this.highlightLayer);
this.highlightLayer = null;
}
},
//
addSingleLineImg(voyageName, i) {
@ -532,29 +503,6 @@ export default {
//
Vue.config.maps["dataSearchMap"].setLayoutProperty(`vector-${voyageName}-symbol`, "visibility", "visible");
Vue.config.maps["dataSearchMap"].setLayoutProperty(`vector-${voyageName}-line`, "visibility", "visible");
return;
//
if (this.trackLayerMap[voyageName]) {
console.warn(`航次 ${voyageName} 的轨迹图层已存在`);
return;
}
//
const trackLine = new Cesium.WebMapTileServiceImageryProvider({
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${voyageName}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${voyageName}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
});
// Cesium
const layerInstance = this.viewer.imageryLayers.addImageryProvider(trackLine);
this.trackLayerMap[voyageName] = layerInstance; //
if (i !== null) {
this.dataList[i].show = true;
}
},
//
@ -567,68 +515,6 @@ export default {
// visibility = visibility == "visible" ? "none" : "visible";
Vue.config.maps["dataSearchMap"].setLayoutProperty(`vector-${voyageName}-symbol`, "visibility", "none");
Vue.config.maps["dataSearchMap"].setLayoutProperty(`vector-${voyageName}-line`, "visibility", "none");
return;
const layerInstance = this.trackLayerMap[voyageName];
if (layerInstance) {
// CesiumimageryLayers
this.viewer.imageryLayers.remove(layerInstance);
//
delete this.trackLayerMap[voyageName];
if (i !== null) {
this.dataList[i].show = false;
}
} else {
console.warn(`未找到航次 ${voyageName} 的轨迹图层`);
}
},
// 线
sampleLineImage(item) {
//
if (this.rendered.length) {
const isRendered = this.rendered.find(ele => ele === item.sample_name)
if (isRendered) return
}
if (!item.sample_name) return
//
const trackLine = new Cesium.WebMapTileServiceImageryProvider(
{
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${item.sample_name}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${item.sample_name}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
const trackLineLayer = this.viewer.imageryLayers.addImageryProvider(trackLine)
this.trackLineLayers.push(trackLineLayer)
//
this.rendered.push(item.sample_name)
},
//
divingImage(item) {
//
if (this.rendered.length) {
const isRendered = this.rendered.find(ele => ele === item.diving_sn)
if (isRendered) return
}
if (!item.diving_sn) return
//
const trackLine = new Cesium.WebMapTileServiceImageryProvider(
{
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${item.diving_sn}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${item.diving_sn}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
const trackLineLayer = this.viewer.imageryLayers.addImageryProvider(trackLine)
this.trackLineLayers.push(trackLineLayer)
//
this.rendered.push(item.diving_sn)
},
//
clearAll() {
@ -658,10 +544,6 @@ export default {
loadVectorLayer(`sample_station_${item.dataset_name}`, ["symbol"], ["#FFFFFF", "#FFFFFF"], "visible", "dataSearchMap", "dsds", "sample_name");
}
i++;
// this.addSingleLineImg(item.voyage_name, null)
// this.dataList[i].show = true;
// this.divingImage(item)
})
const voyageList = arr
voyageList.map(item => {
@ -671,11 +553,6 @@ export default {
dataset_id: item.tsy_id
}).then(res => {
item.sampleArray = res.array
// if (res.array.length) {
// res.array.forEach(sample => {
// this.sampleLineImage(sample)
// })
// }
})
}
if (item.job_type === '站位作业') {
@ -684,104 +561,12 @@ export default {
dataset_id: item.tsy_id
}).then(res => {
item.sampleArray = res.array
//
// if (res.array.length) {
// res.array.forEach(sample => {
// this.sampleLineImage(sample)
// });
// }
})
}
})
this.dataList = voyageList
},
// cesium
initCesium() {
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkY2Y5NWY2Ni1mODQ1LTQ3YTUtYjc4Zi1jYzhjMGI2YzcxMWYiLCJpZCI6MTI5ODMwLCJpYXQiOjE2Nzk0Njk5NTd9.DTH54ioOH-HLqeNIetBe9hFyrPOX2Vp1AQmZzw8TIZ4'
this.viewer = new Cesium.Viewer('dataSearchMap', {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
//
imageryProviderViewModels: this.imageryViewModels,
//
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.viewer._cesiumWidget._creditContainer.style.display = 'none'
this.viewer.scene.sun.show = false
this.viewer.scene.moon.show = false
this.viewer.scene.fog.enabled = false
this.viewer.scene.skyAtmosphere.show = false
this.viewer.scene.sun.show = false
this.viewer.scene.skyBox.show = false
this.viewer.scene.globe.enableLighting = false
this.viewer.shadowMap.darkness = 0.8
this.viewer.scene._sunBloom = false
this.viewer.scene.globe.showGroundAtmosphere = false
this.viewer.scene.postProcessStages.fxaa.enabled = true
// homeButton
// this.viewer.homeButton.viewModel.command.beforeExecute.addEventListener((e) => {
// e.cancel = true;
// this.viewer.camera.flyTo({
// //
// destination: Cesium.Cartesian3.fromDegrees(112, 18, 4000000),
// duration: 0.5
// });
// });
this.viewer.camera.setView({
//
destination: Cesium.Cartesian3.fromDegrees(112, 18, 4000000)
})
// // 线
// const coastline = new Cesium.WebMapTileServiceImageryProvider(
// {
// url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:GSHHS_f_L1/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
// layer: 'ougp:GSHHS_f_L1',
// style: 'default',
// format: 'image/png',
// tileMatrixSetID: 'EPSG:4326',
// tilingScheme: new Cesium.GeographicTilingScheme()
// }
// )
// this.viewer.imageryLayers.addImageryProvider(coastline)
//
const shipline = new Cesium.WebMapTileServiceImageryProvider(
{
url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:正射影像图_GM输出_20240516/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
layer: 'ougp:正射影像图_GM输出_20240516',
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
this.viewer.imageryLayers.addImageryProvider(shipline)
// 6000线
const contour6000 = new Cesium.WebMapTileServiceImageryProvider(
{
url: Vue.config.baseUrl + 'geoserver/gwc/service/wmts/rest/ougp:contour6000/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
layer: 'ougp:contour6000',
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
this.viewer.imageryLayers.addImageryProvider(contour6000)
},
turnDeatilPage(item) {
this.dialog5 = true
regInfo({ voyage_name: item.voyage_name }).then(res => {

File diff suppressed because it is too large Load Diff

View File

@ -234,15 +234,10 @@ import { getVoyage, statisticsNums } from '../api/home'
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/swiper-bundle.css'
import { sampleDatasetList, voyageRegList } from '@/api/dataTransfer'
import {
modifyCesiumMouseWheel, setImageryViewModels
} from '@/utils/common'
import { loadVectorLayer } from '@/utils/vector-layer-utils'
import { ColorGenerator } from '@/utils/color-generator';
import { initMapbox, handleWheel, initSprites, triggerLayerClick } from "@/utils/mapbox-utils";
const Cesium = window.Cesium
export default {
name: 'Index',
components: {
@ -296,11 +291,6 @@ export default {
highlightLayer: null, //
dataUpdateList: [],
sampleDataUpdateList: [],
viewer: null,
//
CesiumHostAddr: '',
//
imageryViewModels: [],
multipleSelection: [], //
trackLayerMap: {}, // { voyage_name: layerInstance }
depthOptions: [4500, 6000], //
@ -315,7 +305,6 @@ export default {
}
},
created() {
this.CesiumHostAddr = process.env.NODE_ENV === 'development' ? 'http://124.222.8.13:9801/' : `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`
this.getVoyageList()
this.getStatisticsNums()
this.dataUpdate()
@ -324,9 +313,9 @@ export default {
mounted() {
initMapbox("homeMap", {
tileKey: "World_Imagery",
zoom: 4,
zoom: 1.5,
center: [122, 15],
minZoom: 2,
minZoom: 1,
maxZoom: 29,
coastlineOn: false,
contourOn: false
@ -342,8 +331,6 @@ export default {
loadVectorLayer("contour-4500m", ["line"], ["#FEFEFE"], "none", "homeMap", 'ougp');
loadVectorLayer("contour-6000m", ["line"], ["#FEFEFE"], "none", "homeMap", 'ougp');
});
// this.imageryViewModels = setImageryViewModels(this.CesiumHostAddr)
},
methods: {
//
@ -369,83 +356,6 @@ export default {
})
},
// cesium
initCesium() {
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkY2Y5NWY2Ni1mODQ1LTQ3YTUtYjc4Zi1jYzhjMGI2YzcxMWYiLCJpZCI6MTI5ODMwLCJpYXQiOjE2Nzk0Njk5NTd9.DTH54ioOH-HLqeNIetBe9hFyrPOX2Vp1AQmZzw8TIZ4'
this.viewer = new Cesium.Viewer('homeMap', {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
//
imageryProviderViewModels: this.imageryViewModels,
//
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.viewer._cesiumWidget._creditContainer.style.display = 'none'
this.viewer.scene.sun.show = false
this.viewer.scene.moon.show = false
this.viewer.scene.fog.enabled = false
this.viewer.scene.skyAtmosphere.show = false
this.viewer.scene.sun.show = false
this.viewer.scene.skyBox.show = false
this.viewer.scene.globe.enableLighting = false
this.viewer.shadowMap.darkness = 0.8
this.viewer.scene._sunBloom = false
this.viewer.scene.globe.showGroundAtmosphere = false
this.viewer.scene.postProcessStages.fxaa.enabled = true
// homeButton
// this.viewer.homeButton.viewModel.command.beforeExecute.addEventListener((e) => {
// e.cancel = true;
// this.viewer.camera.flyTo({
// //
// destination: Cesium.Cartesian3.fromDegrees(112, 18, 4000000),
// duration: 0.5
// });
// });
this.viewer.camera.setView({
//
destination: Cesium.Cartesian3.fromDegrees(112, 18, 4000000)
});
// Cesium Ctrl +
modifyCesiumMouseWheel(this.viewer);
// // 线
// const coastline = new Cesium.WebMapTileServiceImageryProvider(
// {
// url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:GSHHS_f_L1/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
// layer: 'ougp:GSHHS_f_L1',
// style: 'default',
// format: 'image/png',
// tileMatrixSetID: 'EPSG:4326',
// tilingScheme: new Cesium.GeographicTilingScheme()
// }
// )
// this.viewer.imageryLayers.addImageryProvider(coastline)
//
const shipline = new Cesium.WebMapTileServiceImageryProvider(
{
url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:正射影像图_GM输出_20240516/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
layer: 'ougp:正射影像图_GM输出_20240516',
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
this.viewer.imageryLayers.addImageryProvider(shipline)
},
//
handleRowClick(row, column, event) {
// /
@ -454,55 +364,8 @@ export default {
Vue.config.maps["homeMap"].setLayoutProperty(`vector-${row.voyage_name}-symbol`, "visibility", visibility);
Vue.config.maps["homeMap"].setLayoutProperty(`vector-${row.voyage_name}-line`, "visibility", visibility);
this.$refs.multipleTable.toggleRowSelection(row);
return;
//
if (this.currentVoyage === row.voyage_name) {
this.clearHighlight();
return;
}
//
this.currentVoyage = row.voyage_name;
//
if (this.highlightLayer) {
this.viewer.imageryLayers.remove(this.highlightLayer);
this.highlightLayer = null;
}
//
this.addHighlightLayer(row.voyage_name);
},
//
addHighlightLayer(voyageName) {
const highlightLayer = new Cesium.WebMapTileServiceImageryProvider({
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${voyageName}-highlight/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${voyageName}-highlight`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
});
this.highlightLayer = this.viewer.imageryLayers.addImageryProvider(highlightLayer);
},
//
clearHighlight() {
//
if (this.highlightLayer) {
this.viewer.imageryLayers.remove(this.highlightLayer);
this.highlightLayer = null;
}
//
this.currentVoyage = null;
// El-Table
this.$refs.multipleTable.setCurrentRow(null);
},
//
handleSelectionChange(val) {
//
@ -516,7 +379,6 @@ export default {
//
voyagesToRemove.forEach(voyage => {
// this.removeSingleLineImg(voyage);
Vue.config.maps["homeMap"].setLayoutProperty(`vector-${voyage}-symbol`, "visibility", "none");
Vue.config.maps["homeMap"].setLayoutProperty(`vector-${voyage}-line`, "visibility", "none");
});
@ -526,7 +388,6 @@ export default {
// val
const correspondingItem = val.find(item => item.voyage_name === voyage);
if (correspondingItem) {
// this.addSingleLineImg(correspondingItem);
Vue.config.maps["homeMap"].setLayoutProperty(`vector-${voyage}-symbol`, "visibility", "visible");
Vue.config.maps["homeMap"].setLayoutProperty(`vector-${voyage}-line`, "visibility", "visible");
}
@ -535,42 +396,7 @@ export default {
//
this.multipleSelection = val;
},
//
addSingleLineImg(item) {
const voyageName = item.voyage_name;
//
if (this.trackLayerMap[voyageName]) {
console.warn(`航次 ${voyageName} 的轨迹图层已存在`);
return;
}
const trackLine = new Cesium.WebMapTileServiceImageryProvider({
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${voyageName}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${voyageName}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
});
// Cesium
const layerInstance = this.viewer.imageryLayers.addImageryProvider(trackLine);
this.trackLayerMap[voyageName] = layerInstance; //
},
//
removeSingleLineImg(voyageName) {
const layerInstance = this.trackLayerMap[voyageName];
if (layerInstance) {
// CesiumimageryLayers
this.viewer.imageryLayers.remove(layerInstance);
//
delete this.trackLayerMap[voyageName];
} else {
console.warn(`未找到航次 ${voyageName} 的轨迹图层`);
}
},
toggleDepth(depth) {
// **1: **
// this.selectedDepths = [depth]; //
@ -579,50 +405,13 @@ export default {
const index = this.selectedDepths.indexOf(depth);
if (index > -1) {
this.selectedDepths.splice(index, 1); //
// this.removeSingleContourLine(depth); // 线
Vue.config.maps["homeMap"].setLayoutProperty(`vector-contour-${depth}m-line`, "visibility", "none");
} else {
this.selectedDepths.push(depth); //
// this.addSingleContourLine(depth); // 线
Vue.config.maps["homeMap"].setLayoutProperty(`vector-contour-${depth}m-line`, "visibility", "visible");
}
},
// 线
addSingleContourLine(deep) {
//
if (this.contourLayerMap[deep]) {
//
console.warn(`等深线 ${deep} 米图层已存在`);
return;
}
const contour = new Cesium.WebMapTileServiceImageryProvider({
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/ougp:contour${deep}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `ougp:contour${deep}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
});
//
const layerInstance = this.viewer.imageryLayers.addImageryProvider(contour);
this.contourLayerMap[deep] = layerInstance; //
},
// 线
removeSingleContourLine(deep) {
//
const layerInstance = this.contourLayerMap[deep];
if (layerInstance) {
// CesiumimageryLayers
this.viewer.imageryLayers.remove(layerInstance);
//
delete this.contourLayerMap[deep];
} else {
console.warn(`未找到 ${deep} 米等深线图层`);
}
},
//
getStatisticsNums() {
statisticsNums().then(res => {
@ -1428,10 +1217,6 @@ export default {
color: #fff;
}
.cesium-viewer-bottom {
display: none !important;
}
#map {
position: relative;
}

View File

@ -2,31 +2,17 @@
<div class="statistics">
<div class="banner">
<div class="banner-title-picker">
<el-dropdown
class="banner-type-dropdown"
trigger="click"
@command="handleCommand"
>
<el-dropdown class="banner-type-dropdown" trigger="click" @command="handleCommand">
<span class="banner-select-trigger">
<span class="banner-select-text">{{ currentTitle }}</span>
<svg
class="banner-select-chevron"
viewBox="0 0 24 24"
width="40"
height="40"
aria-hidden="true"
focusable="false"
>
<svg class="banner-select-chevron" viewBox="0 0 24 24" width="40" height="40" aria-hidden="true"
focusable="false">
<path fill="#ffffff" d="M7 10l5 5 5-5H7z" />
</svg>
</span>
<el-dropdown-menu slot="dropdown" class="banner-type-dropdown-popper">
<el-dropdown-item command="全部无人航行潜水器">全部无人航行潜水器</el-dropdown-item>
<el-dropdown-item
v-for="item in titles"
:key="item.tsy_id"
:command="item.report_name"
>
<el-dropdown-item v-for="item in titles" :key="item.tsy_id" :command="item.report_name">
{{ item.report_name }}
</el-dropdown-item>
</el-dropdown-menu>
@ -79,17 +65,15 @@
<script>
/**
* 无人航行潜水器汇总统计页请求 `/report/platform/auv` 系列接口交互与遥控潜水器汇总页一致Cesium + ECharts
* 无人航行潜水器汇总统计页请求 `/report/platform/auv` 系列接口交互与遥控潜水器汇总页一致ECharts
*/
import BarChart from './components/BarChart.vue'
import PieChart from './components/PieChart.vue'
import { setImageryViewModels } from '../../utils/common'
import { reportList, platformAuv, auvUnit, auvUnitYear, auvDiving } from '../../api/statistics'
import { filterDictItems } from '../../utils/index'
import { initMapbox, handleWheel, initSprites, triggerLayerClick } from "@/utils/mapbox-utils";
import { loadVectorLayer, loadJsonLineFeature, loadJsonPointFeature, highlightFeaturesByProperty } from '@/utils/vector-layer-utils'
import { ColorGenerator } from '@/utils/color-generator';
const Cesium = window.Cesium
export default {
components: {
@ -122,13 +106,6 @@ export default {
unit: '个'
}
],
// Cesium -
baiduCesiumViewer: null,
baiduCesiumEntities: [], //
viewer: null,
//
CesiumHostAddr: `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`,
trackLineLayers: [],
barData1: {},
barData2: {},
barData3: {},
@ -155,24 +132,14 @@ export default {
});
initMapbox("voyageMap_auv", {
tileKey: "GEBCO_basemap_NCEI",
zoom: 4,
zoom: 3,
center: [113, 15],
minZoom: 2,
maxZoom: 29
});
// this.imageryViewModels = setImageryViewModels(this.CesiumHostAddr)
// this.initCesium() //
// this.initBaiduCesium() //
},
beforeDestroy() {
// Cesium
if (this.baiduCesiumViewer) {
this.baiduCesiumViewer.destroy()
}
if (this.viewer) {
this.viewer.destroy()
}
},
methods: {
//
@ -231,11 +198,6 @@ export default {
});
loadJsonPointFeature("workUnit", "blue", geojson, "unit_name", "workUnitMap_auv");
// //
// this.clearBaiduCesiumMarkers()
// //
// this.createBaiduCesiumMarkers(res.array)
const typeCount = res.array.reduce((acc, unit) => {
const type = unit.unit_type
acc[type] = (acc[type] || 0) + 1 // +11
@ -247,55 +209,7 @@ export default {
}))
})
},
// Cesium
createBaiduCesiumMarkers(units) {
if (!this.baiduCesiumViewer) return
const entities = []
units.forEach((item, index) => {
//
const entity = this.baiduCesiumViewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(item.unit_lon, item.unit_lat),
billboard: {
image: '../../../static/img/01.png', //
width: 32,
height: 32,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
horizontalOrigin: Cesium.HorizontalOrigin.CENTER
},
label: {
text: item.unit_name,
font: '14pt monospace',
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth: 2,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
pixelOffset: new Cesium.Cartesian2(0, -40), //
fillColor: Cesium.Color.WHITE,
outlineColor: Cesium.Color.BLACK
},
unitData: item, //
index: index //
})
entities.push(entity)
})
this.baiduCesiumEntities = entities
//
if (entities.length > 0) {
this.baiduCesiumViewer.zoomTo(entities)
}
},
//
clearBaiduCesiumMarkers() {
if (this.baiduCesiumViewer && this.baiduCesiumEntities.length > 0) {
this.baiduCesiumEntities.forEach(entity => {
this.baiduCesiumViewer.entities.remove(entity)
})
this.baiduCesiumEntities = []
}
},
//
gitAuvDiving(params = {}) {
auvDiving(params).then(res => {
@ -306,108 +220,10 @@ export default {
//
loadVectorLayer(item.diving_sn, ["line", "symbol"], [colors[i], "#FFFFFF"], "visible", "voyageMap_auv", "dsds");
i++;
})
})
},
// this.addSingleLineImg(item)
})
})
},
// Cesium -
initBaiduCesium() {
this.baiduCesiumViewer = new Cesium.Viewer(this.$refs.workUnitMap_auv, {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
imageryProviderViewModels: this.imageryViewModels,
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.baiduCesiumViewer._cesiumWidget._creditContainer.style.display = 'none'
this.baiduCesiumViewer.scene.sun.show = false
this.baiduCesiumViewer.scene.moon.show = false
this.baiduCesiumViewer.scene.fog.enabled = false
this.baiduCesiumViewer.scene.skyAtmosphere.show = false
this.baiduCesiumViewer.scene.sun.show = false
this.baiduCesiumViewer.scene.skyBox.show = false
this.baiduCesiumViewer.scene.globe.enableLighting = false
this.baiduCesiumViewer.shadowMap.darkness = 0.8
this.baiduCesiumViewer.scene._sunBloom = false
this.baiduCesiumViewer.scene.globe.showGroundAtmosphere = false
this.baiduCesiumViewer.scene.postProcessStages.fxaa.enabled = true
this.baiduCesiumViewer.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(114.4040, 30.5196, 4000000)
})
},
// cesium
initCesium() {
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkY2Y5NWY2Ni1mODQ1LTQ3YTUtYjc4Zi1jYzhjMGI2YzcxMWYiLCJpZCI6MTI5ODMwLCJpYXQiOjE2Nzk0Njk5NTd9.DTH54ioOH-HLqeNIetBe9hFyrPOX2Vp1AQmZzw8TIZ4'
this.viewer = new Cesium.Viewer(this.$refs.voyageMap_auv, {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
//
imageryProviderViewModels: this.imageryViewModels,
//
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.viewer._cesiumWidget._creditContainer.style.display = 'none'
this.viewer.scene.sun.show = false
this.viewer.scene.moon.show = false
this.viewer.scene.fog.enabled = false
this.viewer.scene.skyAtmosphere.show = false
this.viewer.scene.sun.show = false
this.viewer.scene.skyBox.show = false
this.viewer.scene.globe.enableLighting = false
this.viewer.shadowMap.darkness = 0.8
this.viewer.scene._sunBloom = false
this.viewer.scene.globe.showGroundAtmosphere = false
this.viewer.scene.postProcessStages.fxaa.enabled = true
this.viewer.camera.setView({
//
destination: Cesium.Cartesian3.fromDegrees(112, 18, 4000000)
})
},
//
addSingleLineImg(item) {
const trackLine = new Cesium.WebMapTileServiceImageryProvider(
{
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${item.diving_sn}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${item.diving_sn}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
const trackLineLayer = this.viewer.imageryLayers.addImageryProvider(trackLine)
this.trackLineLayers.push(trackLineLayer)
},
//
removeSingleLineImg() {
if (this.trackLineLayers.length) {
this.trackLineLayers.forEach(line => {
this.viewer.imageryLayers.remove(line)
})
}
},
//
gitAuvUnitYear(params = {}) {
auvUnitYear(params).then(res => {

View File

@ -2,31 +2,17 @@
<div class="statistics">
<div class="banner">
<div class="banner-title-picker">
<el-dropdown
class="banner-type-dropdown"
trigger="click"
@command="handleCommand"
>
<el-dropdown class="banner-type-dropdown" trigger="click" @command="handleCommand">
<span class="banner-select-trigger">
<span class="banner-select-text">{{ currentTitle }}</span>
<svg
class="banner-select-chevron"
viewBox="0 0 24 24"
width="40"
height="40"
aria-hidden="true"
focusable="false"
>
<svg class="banner-select-chevron" viewBox="0 0 24 24" width="40" height="40" aria-hidden="true"
focusable="false">
<path fill="#ffffff" d="M7 10l5 5 5-5H7z" />
</svg>
</span>
<el-dropdown-menu slot="dropdown" class="banner-type-dropdown-popper">
<el-dropdown-item command="全部载人潜水器">全部载人潜水器</el-dropdown-item>
<el-dropdown-item
v-for="item in titles"
:key="item.tsy_id"
:command="item.report_name"
>
<el-dropdown-item v-for="item in titles" :key="item.tsy_id" :command="item.report_name">
{{ item.report_name }}
</el-dropdown-item>
</el-dropdown-menu>
@ -54,49 +40,24 @@
<!-- echarts板块-->
<div class="echarts-module">
<div class="bezel">
<BarChart
:title="barData1.title"
:chart-data="barData1.salesData"
:categories="barData1.productCategories"
chart-type="single"
/>
<BarChart :title="barData1.title" :chart-data="barData1.salesData" :categories="barData1.productCategories"
chart-type="single" />
</div>
<div class="bezel">
<BarChart
:title="barData2.title"
:chart-data="barData2.salesData"
:categories="barData2.productCategories"
chart-type="stacked"
stack-name="新增单位数"
/>
<BarChart :title="barData2.title" :chart-data="barData2.salesData" :categories="barData2.productCategories"
chart-type="stacked" stack-name="新增单位数" />
</div>
<div class="bezel">
<BarChart
:title="barData3.title"
:chart-data="barData3.salesData"
:categories="barData3.productCategories"
/>
<BarChart :title="barData3.title" :chart-data="barData3.salesData" :categories="barData3.productCategories" />
</div>
<div class="bezel">
<BarChart
:title="barData4.title"
:chart-data="barData4.salesData"
:categories="barData4.productCategories"
/>
<BarChart :title="barData4.title" :chart-data="barData4.salesData" :categories="barData4.productCategories" />
</div>
<div class="bezel">
<BarChart
:title="barData5.title"
:chart-data="barData5.salesData"
:categories="barData5.productCategories"
/>
<BarChart :title="barData5.title" :chart-data="barData5.salesData" :categories="barData5.productCategories" />
</div>
<div class="bezel">
<PieChart
:chart-data="pieData"
title="下潜单位类型"
chart-type="ring"
/>
<PieChart :chart-data="pieData" title="下潜单位类型" chart-type="ring" />
</div>
</div>
</div>
@ -111,7 +72,6 @@ import { filterDictItems } from '../../utils/index'
import { initMapbox, handleWheel, initSprites, triggerLayerClick } from "@/utils/mapbox-utils";
import { loadVectorLayer, loadJsonLineFeature, loadJsonPointFeature, highlightFeaturesByProperty } from '@/utils/vector-layer-utils'
import { ColorGenerator } from '@/utils/color-generator';
const Cesium = window.Cesium
export default {
components: {
@ -144,13 +104,6 @@ export default {
unit: '个'
}
],
// Cesium -
baiduCesiumViewer: null,
baiduCesiumEntities: [], //
viewer: null,
//
CesiumHostAddr: `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`,
trackLineLayers: [],
barData1: {},
barData2: {},
barData3: {},
@ -177,24 +130,14 @@ export default {
});
initMapbox("voyageMap_hov", {
tileKey: "GEBCO_basemap_NCEI",
zoom: 4,
zoom: 3,
center: [113, 15],
minZoom: 2,
maxZoom: 29
});
// this.imageryViewModels = setImageryViewModels(this.CesiumHostAddr)
// this.initCesium() //
// this.initBaiduCesium() //
},
beforeDestroy() {
// Cesium
if (this.baiduCesiumViewer) {
this.baiduCesiumViewer.destroy()
}
if (this.viewer) {
this.viewer.destroy()
}
},
methods: {
//
@ -253,11 +196,6 @@ export default {
});
loadJsonPointFeature("workUnit", "blue", geojson, "unit_name", "workUnitMap_hov");
// //
// this.clearBaiduCesiumMarkers()
// //
// this.createBaiduCesiumMarkers(res.array)
const typeCount = res.array.reduce((acc, unit) => {
const type = unit.unit_type
acc[type] = (acc[type] || 0) + 1 // +11
@ -269,55 +207,7 @@ export default {
}))
})
},
// Cesium
createBaiduCesiumMarkers(units) {
if (!this.baiduCesiumViewer) return
const entities = []
units.forEach((item, index) => {
//
const entity = this.baiduCesiumViewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(item.unit_lon, item.unit_lat),
billboard: {
image: '../../../static/img/01.png', //
width: 32,
height: 32,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
horizontalOrigin: Cesium.HorizontalOrigin.CENTER
},
label: {
text: item.unit_name,
font: '14pt monospace',
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth: 2,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
pixelOffset: new Cesium.Cartesian2(0, -40), //
fillColor: Cesium.Color.WHITE,
outlineColor: Cesium.Color.BLACK
},
unitData: item, //
index: index //
})
entities.push(entity)
})
this.baiduCesiumEntities = entities
//
if (entities.length > 0) {
this.baiduCesiumViewer.zoomTo(entities)
}
},
//
clearBaiduCesiumMarkers() {
if (this.baiduCesiumViewer && this.baiduCesiumEntities.length > 0) {
this.baiduCesiumEntities.forEach(entity => {
this.baiduCesiumViewer.entities.remove(entity)
})
this.baiduCesiumEntities = []
}
},
//
gitHovDiving(params = {}) {
hovDiving(params).then(res => {
@ -333,103 +223,7 @@ export default {
})
})
},
// Cesium -
initBaiduCesium() {
this.baiduCesiumViewer = new Cesium.Viewer(this.$refs.workUnitMap_hov, {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
imageryProviderViewModels: this.imageryViewModels,
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.baiduCesiumViewer._cesiumWidget._creditContainer.style.display = 'none'
this.baiduCesiumViewer.scene.sun.show = false
this.baiduCesiumViewer.scene.moon.show = false
this.baiduCesiumViewer.scene.fog.enabled = false
this.baiduCesiumViewer.scene.skyAtmosphere.show = false
this.baiduCesiumViewer.scene.sun.show = false
this.baiduCesiumViewer.scene.skyBox.show = false
this.baiduCesiumViewer.scene.globe.enableLighting = false
this.baiduCesiumViewer.shadowMap.darkness = 0.8
this.baiduCesiumViewer.scene._sunBloom = false
this.baiduCesiumViewer.scene.globe.showGroundAtmosphere = false
this.baiduCesiumViewer.scene.postProcessStages.fxaa.enabled = true
this.baiduCesiumViewer.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(114.4040, 30.5196, 4000000)
})
},
// cesium
initCesium() {
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkY2Y5NWY2Ni1mODQ1LTQ3YTUtYjc4Zi1jYzhjMGI2YzcxMWYiLCJpZCI6MTI5ODMwLCJpYXQiOjE2Nzk0Njk5NTd9.DTH54ioOH-HLqeNIetBe9hFyrPOX2Vp1AQmZzw8TIZ4'
this.viewer = new Cesium.Viewer('voyageMap_hov', {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
//
imageryProviderViewModels: this.imageryViewModels,
//
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.viewer._cesiumWidget._creditContainer.style.display = 'none'
this.viewer.scene.sun.show = false
this.viewer.scene.moon.show = false
this.viewer.scene.fog.enabled = false
this.viewer.scene.skyAtmosphere.show = false
this.viewer.scene.sun.show = false
this.viewer.scene.skyBox.show = false
this.viewer.scene.globe.enableLighting = false
this.viewer.shadowMap.darkness = 0.8
this.viewer.scene._sunBloom = false
this.viewer.scene.globe.showGroundAtmosphere = false
this.viewer.scene.postProcessStages.fxaa.enabled = true
this.viewer.camera.setView({
//
destination: Cesium.Cartesian3.fromDegrees(112, 18, 4000000)
})
},
//
addSingleLineImg(item) {
const trackLine = new Cesium.WebMapTileServiceImageryProvider(
{
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${item.diving_sn}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${item.diving_sn}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
const trackLineLayer = this.viewer.imageryLayers.addImageryProvider(trackLine)
this.trackLineLayers.push(trackLineLayer)
},
//
removeSingleLineImg() {
if (this.trackLineLayers.length) {
this.trackLineLayers.forEach(line => {
this.viewer.imageryLayers.remove(line)
})
}
},
//
gitHovUnitYear(params = {}) {
hovUnitYear(params).then(res => {
@ -576,24 +370,29 @@ export default {
flex-direction: column;
justify-content: center;
align-items: center;
.value {
font-size: 56px;
font-weight: bold;
.unit {
font-size: 26px;
}
}
.label {
font-size: 18px;
}
}
}
}
.map-module {
padding: 50px 50px;
display: flex;
justify-content: space-between;
gap: 50px;
.bezel {
flex: 1;
width: 100%;
@ -611,6 +410,7 @@ export default {
z-index: 8888;
font-size: 22px;
}
.map-year {
position: absolute;
top: 20px;
@ -621,6 +421,7 @@ export default {
}
}
}
.echarts-module {
padding: 0 50px 50px;
display: grid;

View File

@ -2,31 +2,17 @@
<div class="statistics">
<div class="banner">
<div class="banner-title-picker">
<el-dropdown
class="banner-type-dropdown"
trigger="click"
@command="handleCommand"
>
<el-dropdown class="banner-type-dropdown" trigger="click" @command="handleCommand">
<span class="banner-select-trigger">
<span class="banner-select-text">{{ currentTitle }}</span>
<svg
class="banner-select-chevron"
viewBox="0 0 24 24"
width="40"
height="40"
aria-hidden="true"
focusable="false"
>
<svg class="banner-select-chevron" viewBox="0 0 24 24" width="40" height="40" aria-hidden="true"
focusable="false">
<path fill="#ffffff" d="M7 10l5 5 5-5H7z" />
</svg>
</span>
<el-dropdown-menu slot="dropdown" class="banner-type-dropdown-popper">
<el-dropdown-item command="全部遥控潜水器">全部遥控潜水器</el-dropdown-item>
<el-dropdown-item
v-for="item in titles"
:key="item.tsy_id"
:command="item.report_name"
>
<el-dropdown-item v-for="item in titles" :key="item.tsy_id" :command="item.report_name">
{{ item.report_name }}
</el-dropdown-item>
</el-dropdown-menu>
@ -83,13 +69,11 @@
*/
import BarChart from './components/BarChart.vue'
import PieChart from './components/PieChart.vue'
import { setImageryViewModels } from '../../utils/common'
import { reportList, platformRov, rovUnit, rovUnitYear, rovDiving } from '../../api/statistics'
import { filterDictItems } from '../../utils/index'
import { initMapbox, handleWheel, initSprites, triggerLayerClick } from "@/utils/mapbox-utils";
import { loadVectorLayer, loadJsonLineFeature, loadJsonPointFeature, highlightFeaturesByProperty } from '@/utils/vector-layer-utils'
import { ColorGenerator } from '@/utils/color-generator';
const Cesium = window.Cesium
export default {
components: {
@ -122,13 +106,6 @@ export default {
unit: '个'
}
],
// Cesium -
baiduCesiumViewer: null,
baiduCesiumEntities: [], //
viewer: null,
//
CesiumHostAddr: `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`,
trackLineLayers: [],
barData1: {},
barData2: {},
barData3: {},
@ -155,24 +132,14 @@ export default {
});
initMapbox("voyageMap_rov", {
tileKey: "GEBCO_basemap_NCEI",
zoom: 4,
zoom: 3,
center: [113, 15],
minZoom: 2,
maxZoom: 29
});
// this.imageryViewModels = setImageryViewModels(this.CesiumHostAddr)
// this.initCesium() //
// this.initBaiduCesium() //
},
beforeDestroy() {
// Cesium
if (this.baiduCesiumViewer) {
this.baiduCesiumViewer.destroy()
}
if (this.viewer) {
this.viewer.destroy()
}
},
methods: {
//
@ -184,7 +151,7 @@ export default {
//
handleCommand(command) {
this.currentTitle = command
this.removeSingleLineImg()
// this.removeSingleLineImg()
if (command === '全部遥控潜水器') {
this.getRovList()
this.gitRovDiving()
@ -231,11 +198,6 @@ export default {
});
loadJsonPointFeature("workUnit", "blue", geojson, "unit_name", "workUnitMap_rov");
// //
// this.clearBaiduCesiumMarkers()
// //
// this.createBaiduCesiumMarkers(res.array)
const typeCount = res.array.reduce((acc, unit) => {
const type = unit.unit_type
acc[type] = (acc[type] || 0) + 1 // +11
@ -247,55 +209,7 @@ export default {
}))
})
},
// Cesium
createBaiduCesiumMarkers(units) {
if (!this.baiduCesiumViewer) return
const entities = []
units.forEach((item, index) => {
//
const entity = this.baiduCesiumViewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(item.unit_lon, item.unit_lat),
billboard: {
image: '../../../static/img/01.png', //
width: 32,
height: 32,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
horizontalOrigin: Cesium.HorizontalOrigin.CENTER
},
label: {
text: item.unit_name,
font: '14pt monospace',
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth: 2,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
pixelOffset: new Cesium.Cartesian2(0, -40), //
fillColor: Cesium.Color.WHITE,
outlineColor: Cesium.Color.BLACK
},
unitData: item, //
index: index //
})
entities.push(entity)
})
this.baiduCesiumEntities = entities
//
if (entities.length > 0) {
this.baiduCesiumViewer.zoomTo(entities)
}
},
//
clearBaiduCesiumMarkers() {
if (this.baiduCesiumViewer && this.baiduCesiumEntities.length > 0) {
this.baiduCesiumEntities.forEach(entity => {
this.baiduCesiumViewer.entities.remove(entity)
})
this.baiduCesiumEntities = []
}
},
//
gitRovDiving(params = {}) {
rovDiving(params).then(res => {
@ -306,108 +220,9 @@ export default {
//
loadVectorLayer(item.diving_sn, ["line", "symbol"], [colors[i], "#FFFFFF"], "visible", "voyageMap_rov", "dsds");
i++;
// this.addSingleLineImg(item)
})
})
},
// Cesium -
initBaiduCesium() {
this.baiduCesiumViewer = new Cesium.Viewer(this.$refs.workUnitMap_rov, {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
imageryProviderViewModels: this.imageryViewModels,
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.baiduCesiumViewer._cesiumWidget._creditContainer.style.display = 'none'
this.baiduCesiumViewer.scene.sun.show = false
this.baiduCesiumViewer.scene.moon.show = false
this.baiduCesiumViewer.scene.fog.enabled = false
this.baiduCesiumViewer.scene.skyAtmosphere.show = false
this.baiduCesiumViewer.scene.sun.show = false
this.baiduCesiumViewer.scene.skyBox.show = false
this.baiduCesiumViewer.scene.globe.enableLighting = false
this.baiduCesiumViewer.shadowMap.darkness = 0.8
this.baiduCesiumViewer.scene._sunBloom = false
this.baiduCesiumViewer.scene.globe.showGroundAtmosphere = false
this.baiduCesiumViewer.scene.postProcessStages.fxaa.enabled = true
this.baiduCesiumViewer.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(114.4040, 30.5196, 4000000)
})
},
// cesium
initCesium() {
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkY2Y5NWY2Ni1mODQ1LTQ3YTUtYjc4Zi1jYzhjMGI2YzcxMWYiLCJpZCI6MTI5ODMwLCJpYXQiOjE2Nzk0Njk5NTd9.DTH54ioOH-HLqeNIetBe9hFyrPOX2Vp1AQmZzw8TIZ4'
this.viewer = new Cesium.Viewer(this.$refs.voyageMap_rov, {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
//
imageryProviderViewModels: this.imageryViewModels,
//
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.viewer._cesiumWidget._creditContainer.style.display = 'none'
this.viewer.scene.sun.show = false
this.viewer.scene.moon.show = false
this.viewer.scene.fog.enabled = false
this.viewer.scene.skyAtmosphere.show = false
this.viewer.scene.sun.show = false
this.viewer.scene.skyBox.show = false
this.viewer.scene.globe.enableLighting = false
this.viewer.shadowMap.darkness = 0.8
this.viewer.scene._sunBloom = false
this.viewer.scene.globe.showGroundAtmosphere = false
this.viewer.scene.postProcessStages.fxaa.enabled = true
this.viewer.camera.setView({
//
destination: Cesium.Cartesian3.fromDegrees(112, 18, 4000000)
})
},
//
addSingleLineImg(item) {
const trackLine = new Cesium.WebMapTileServiceImageryProvider(
{
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${item.diving_sn}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${item.diving_sn}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
const trackLineLayer = this.viewer.imageryLayers.addImageryProvider(trackLine)
this.trackLineLayers.push(trackLineLayer)
},
//
removeSingleLineImg() {
if (this.trackLineLayers.length) {
this.trackLineLayers.forEach(line => {
this.viewer.imageryLayers.remove(line)
})
}
},
//
gitRovUnitYear(params = {}) {
rovUnitYear(params).then(res => {

View File

@ -2,31 +2,17 @@
<div class="statistics">
<div class="banner">
<div class="banner-title-picker">
<el-dropdown
class="banner-type-dropdown"
trigger="click"
@command="handleCommand"
>
<el-dropdown class="banner-type-dropdown" trigger="click" @command="handleCommand">
<span class="banner-select-trigger">
<span class="banner-select-text">{{ currentTitle }}</span>
<svg
class="banner-select-chevron"
viewBox="0 0 24 24"
width="40"
height="40"
aria-hidden="true"
focusable="false"
>
<svg class="banner-select-chevron" viewBox="0 0 24 24" width="40" height="40" aria-hidden="true"
focusable="false">
<path fill="#ffffff" d="M7 10l5 5 5-5H7z" />
</svg>
</span>
<el-dropdown-menu slot="dropdown" class="banner-type-dropdown-popper">
<el-dropdown-item command="全部科考船">全部科考船</el-dropdown-item>
<el-dropdown-item
v-for="item in titles"
:key="item.tsy_id"
:command="item.report_name"
>
<el-dropdown-item v-for="item in titles" :key="item.tsy_id" :command="item.report_name">
{{ item.report_name }}
</el-dropdown-item>
</el-dropdown-menu>
@ -50,16 +36,8 @@
<div class="map-title">航次地图</div>
<div class="map-year-panel">
<span class="map-year-label">年份</span>
<el-date-picker
v-model="voyageYear"
type="year"
size="small"
placeholder="全部"
class="map-year"
clearable
format="yyyy"
@change="selectVoyageYear"
/>
<el-date-picker v-model="voyageYear" type="year" size="small" placeholder="全部" class="map-year" clearable
format="yyyy" @change="selectVoyageYear" />
</div>
<div id="voyageMap_ship" ref="voyageMap_ship" style="height: 100%;width:100%;" />
</div>
@ -71,21 +49,12 @@
chart-type="single" />
</div>
<div class="bezel">
<BarChart
:title="barDataDays.title"
:chart-data="barDataDays.salesData"
:categories="barDataDays.productCategories"
chart-type="single"
/>
<BarChart :title="barDataDays.title" :chart-data="barDataDays.salesData"
:categories="barDataDays.productCategories" chart-type="single" />
</div>
<div class="bezel">
<BarChart
:title="barData2.title"
:chart-data="barData2.salesData"
:categories="barData2.productCategories"
chart-type="stacked"
stack-name="新增单位数"
/>
<BarChart :title="barData2.title" :chart-data="barData2.salesData" :categories="barData2.productCategories"
chart-type="stacked" stack-name="新增单位数" />
</div>
<div class="bezel">
<BarChart :title="barData3.title" :chart-data="barData3.salesData" :categories="barData3.productCategories" />
@ -104,15 +73,12 @@
import Vue from 'vue'
import BarChart from './components/BarChart.vue'
import PieChart from './components/PieChart.vue'
import { setImageryViewModels } from '../../utils/common'
import { reportList, shipTotal, shipUnit, shipUnitYear, shipVoyage } from '../../api/statistics'
import { getYearRange, filterDictItems } from '../../utils/index'
import { initMapbox, handleWheel, initSprites, triggerLayerClick } from "@/utils/mapbox-utils";
import { loadVectorLayer, loadJsonLineFeature, loadJsonPointFeature, highlightFeaturesByProperty } from '@/utils/vector-layer-utils'
import { ColorGenerator } from '@/utils/color-generator';
const Cesium = window.Cesium
export default {
components: {
BarChart,
@ -149,13 +115,6 @@ export default {
unit: 'km'
}
],
// Cesium -
baiduCesiumViewer: null,
baiduCesiumEntities: [], //
viewer: null,
//
CesiumHostAddr: `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`,
trackLineLayers: [],
voyageYear: '',
barData1: {},
/** 年度航次天数(与 barData1 同源接口按年) */
@ -184,23 +143,14 @@ export default {
});
initMapbox("voyageMap_ship", {
tileKey: "GEBCO_basemap_NCEI",
zoom: 4,
zoom: 3,
center: [113, 15],
minZoom: 2,
maxZoom: 29
});
// this.imageryViewModels = setImageryViewModels(this.CesiumHostAddr)
// this.initBaiduCesium() //
// this.initCesium() //
},
beforeDestroy() {
// Cesium
if (this.baiduCesiumViewer) {
this.baiduCesiumViewer.destroy()
}
if (this.viewer) {
this.viewer.destroy()
}
},
methods: {
//
@ -212,7 +162,7 @@ export default {
//
handleCommand(command) {
this.currentTitle = command
this.removeSingleLineImg()
// this.removeSingleLineImg()
if (command === '全部科考船') {
this.getShipList()
this.gitShipVoyage()
@ -260,11 +210,6 @@ export default {
});
loadJsonPointFeature("workUnit", "blue", geojson, "unit_name", "workUnitMap_ship");
// //
// this.clearBaiduCesiumMarkers()
// //
// this.createBaiduCesiumMarkers(res.array)
const typeCount = res.array.reduce((acc, unit) => {
const type = unit.unit_type
acc[type] = (acc[type] || 0) + 1 // +11
@ -276,55 +221,7 @@ export default {
}))
})
},
// Cesium
createBaiduCesiumMarkers(units) {
if (!this.baiduCesiumViewer) return
const entities = []
units.forEach((item, index) => {
//
const entity = this.baiduCesiumViewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(item.unit_lon, item.unit_lat),
billboard: {
image: '../../../static/img/01.png', //
width: 32,
height: 32,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
horizontalOrigin: Cesium.HorizontalOrigin.CENTER
},
label: {
text: item.unit_name,
font: '14pt monospace',
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth: 2,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
pixelOffset: new Cesium.Cartesian2(0, -40), //
fillColor: Cesium.Color.WHITE,
outlineColor: Cesium.Color.BLACK
},
unitData: item, //
index: index //
})
entities.push(entity)
})
this.baiduCesiumEntities = entities
//
if (entities.length > 0) {
this.baiduCesiumViewer.zoomTo(entities)
}
},
//
clearBaiduCesiumMarkers() {
if (this.baiduCesiumViewer && this.baiduCesiumEntities.length > 0) {
this.baiduCesiumEntities.forEach(entity => {
this.baiduCesiumViewer.entities.remove(entity)
})
this.baiduCesiumEntities = []
}
},
//
gitShipVoyage(params = {}) {
shipVoyage(params).then(res => {
@ -335,115 +232,15 @@ export default {
//
loadVectorLayer(item.voyage_name, ["line", "symbol"], [colors[i], "#FFFFFF"], "visible", "voyageMap_ship", "dsds");
i++;
// this.addSingleLineImg(item)
})
})
},
// Cesium -
initBaiduCesium() {
this.baiduCesiumViewer = new Cesium.Viewer(this.$refs.workUnitMap_ship, {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
imageryProviderViewModels: this.imageryViewModels,
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.baiduCesiumViewer._cesiumWidget._creditContainer.style.display = 'none'
this.baiduCesiumViewer.scene.sun.show = false
this.baiduCesiumViewer.scene.moon.show = false
this.baiduCesiumViewer.scene.fog.enabled = false
this.baiduCesiumViewer.scene.skyAtmosphere.show = false
this.baiduCesiumViewer.scene.sun.show = false
this.baiduCesiumViewer.scene.skyBox.show = false
this.baiduCesiumViewer.scene.globe.enableLighting = false
this.baiduCesiumViewer.shadowMap.darkness = 0.8
this.baiduCesiumViewer.scene._sunBloom = false
this.baiduCesiumViewer.scene.globe.showGroundAtmosphere = false
this.baiduCesiumViewer.scene.postProcessStages.fxaa.enabled = true
this.baiduCesiumViewer.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(114.4040, 30.5196, 4000000)
})
},
// cesium
initCesium() {
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkY2Y5NWY2Ni1mODQ1LTQ3YTUtYjc4Zi1jYzhjMGI2YzcxMWYiLCJpZCI6MTI5ODMwLCJpYXQiOjE2Nzk0Njk5NTd9.DTH54ioOH-HLqeNIetBe9hFyrPOX2Vp1AQmZzw8TIZ4'
this.viewer = new Cesium.Viewer(this.$refs.voyageMap_ship, {
sceneMode: Cesium.SceneMode.SCENE2D,
shadows: false,
timeline: false,
baseLayerPicker: false,
//
imageryProviderViewModels: this.imageryViewModels,
//
terrainProviderViewModels: [],
fullscreenButton: false,
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
animation: false,
infoBox: false,
geocoder: false,
navigationHelpButton: false
})
this.viewer._cesiumWidget._creditContainer.style.display = 'none'
this.viewer.scene.sun.show = false
this.viewer.scene.moon.show = false
this.viewer.scene.fog.enabled = false
this.viewer.scene.skyAtmosphere.show = false
this.viewer.scene.sun.show = false
this.viewer.scene.skyBox.show = false
this.viewer.scene.globe.enableLighting = false
this.viewer.shadowMap.darkness = 0.8
this.viewer.scene._sunBloom = false
this.viewer.scene.globe.showGroundAtmosphere = false
this.viewer.scene.postProcessStages.fxaa.enabled = true
this.viewer.camera.setView({
//
destination: Cesium.Cartesian3.fromDegrees(112, 18, 4000000)
});
},
//
addSingleLineImg(item) {
const trackLine = new Cesium.WebMapTileServiceImageryProvider(
{
url: `${this.CesiumHostAddr}geoserver/gwc/service/wmts/rest/dsds:${item.voyage_name}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png`,
layer: `dsds:${item.voyage_name}`,
style: 'default',
format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme()
}
)
const trackLineLayer = this.viewer.imageryLayers.addImageryProvider(trackLine)
this.trackLineLayers.push(trackLineLayer)
},
//
removeSingleLineImg() {
if (this.trackLineLayers.length) {
this.trackLineLayers.forEach(line => {
this.viewer.imageryLayers.remove(line)
})
}
},
//
selectVoyageYear(val) {
const shipName = this.currentTitle === '全部科考船' ? '' : this.currentTitle
if (val) {
this.removeSingleLineImg()
// this.removeSingleLineImg()
const params = getYearRange(val)
this.gitShipVoyage({ ...params, ship_name: shipName })
} else {

View File

@ -13,24 +13,10 @@
<div class="unit-toolbar-inner">
<div class="unit-filter-box">
<span class="banner-unit-label">统计单位</span>
<el-select
v-model="selectedUnits"
class="banner-unit-select"
multiple
filterable
clearable
size="small"
placeholder="请选择单位(不选表示全部)"
value-key="unit_name"
collapse-tags
@change="onBannerUnitsChange"
>
<el-option
v-for="unit in unitOptions"
:key="unit.unit_id || unit.unit_name"
:label="unit.unit_name"
:value="unit"
/>
<el-select v-model="selectedUnits" class="banner-unit-select" multiple filterable clearable size="small"
placeholder="请选择单位(不选表示全部)" value-key="unit_name" collapse-tags @change="onBannerUnitsChange">
<el-option v-for="unit in unitOptions" :key="unit.unit_id || unit.unit_name" :label="unit.unit_name"
:value="unit" />
</el-select>
</div>
</div>
@ -45,16 +31,8 @@
<div class="map-title">航次地图</div>
<div class="map-year-panel">
<span class="map-year-label">年份</span>
<el-date-picker
v-model="voyageYear"
type="year"
size="small"
placeholder="全部"
class="map-year"
clearable
format="yyyy"
@change="selectVoyageYear"
/>
<el-date-picker v-model="voyageYear" type="year" size="small" placeholder="全部" class="map-year" clearable
format="yyyy" @change="selectVoyageYear" />
</div>
<div id="voyageMap_uuv" ref="voyageMap_uuv" style="height: 100%;width:100%;" />
</div>
@ -62,47 +40,24 @@
<!-- echarts板块-->
<div class="echarts-module">
<div class="bezel">
<BarChart
:title="barVoyageCount.title"
:chart-data="barVoyageCount.salesData"
:categories="barVoyageCount.productCategories"
chart-type="single"
/>
<BarChart :title="barVoyageCount.title" :chart-data="barVoyageCount.salesData"
:categories="barVoyageCount.productCategories" chart-type="single" />
</div>
<div class="bezel">
<BarChart
:title="barVoyageDays.title"
:chart-data="barVoyageDays.salesData"
:categories="barVoyageDays.productCategories"
chart-type="single"
/>
<BarChart :title="barVoyageDays.title" :chart-data="barVoyageDays.salesData"
:categories="barVoyageDays.productCategories" chart-type="single" />
</div>
<div class="bezel">
<BarChart
:title="barPeopleDiving.title"
:chart-data="barPeopleDiving.salesData"
:categories="barPeopleDiving.productCategories"
chart-type="multiple"
/>
<BarChart :title="barPeopleDiving.title" :chart-data="barPeopleDiving.salesData"
:categories="barPeopleDiving.productCategories" chart-type="multiple" />
</div>
<div class="bezel">
<BarChart
:title="barFirstPeopleDiving.title"
:chart-data="barFirstPeopleDiving.salesData"
:categories="barFirstPeopleDiving.productCategories"
chart-type="multiple"
/>
<BarChart :title="barFirstPeopleDiving.title" :chart-data="barFirstPeopleDiving.salesData"
:categories="barFirstPeopleDiving.productCategories" chart-type="multiple" />
</div>
<div class="bezel">
<BarChart
:title="mixedMileage.title"
:chart-data="mixedMileage.series"
:categories="mixedMileage.categories"
chart-type="mixed"
:dual-y-axis="true"
left-axis-name="次数"
right-axis-name="天数"
/>
<BarChart :title="mixedMileage.title" :chart-data="mixedMileage.series" :categories="mixedMileage.categories"
chart-type="mixed" :dual-y-axis="true" left-axis-name="次数" right-axis-name="天数" />
</div>
</div>
</div>
@ -206,7 +161,7 @@ export default {
})
initMapbox('voyageMap_uuv', {
tileKey: 'GEBCO_basemap_NCEI',
zoom: 4,
zoom: 3,
center: [113, 15],
minZoom: 2,
maxZoom: 29
@ -532,13 +487,16 @@ export default {
flex-direction: column;
justify-content: center;
align-items: center;
.value {
font-size: 56px;
font-weight: bold;
.unit {
font-size: 26px;
}
}
.label {
font-size: 18px;
}
@ -605,6 +563,7 @@ export default {
display: flex;
justify-content: space-between;
gap: 50px;
.bezel {
flex: 1;
width: 100%;

View File

@ -1,448 +0,0 @@
<template>
<div class="shuju">
<div class="header">
<div class="header_con">
<div class="header1">
<div class="time">
<!-- <p>{{ date }}&nbsp;&nbsp;{{ week }}</p> -->
</div>
<div class="login">
<p>个人中心</p>
<div class="log1">
<img src="../../../static/images/index/logo1.png" alt="">
<p>中国科技云通行证登录</p>
<p>注册</p>
</div>
<p>English</p>
</div>
</div>
<div class="header2">
<div class="logo">
<img src="../../../static/images/index/logo2.png" alt="" @click="turnPage('home')">
</div>
<div class="nav">
<ul>
<li>
<router-link to="/container/physicalIndex">首页</router-link>
</li>
<li>
<router-link to="" @click.native="turnPage('physicalDataDelivery')">数据汇交</router-link>
</li>
<li>
<router-link to="" @click.native="jumpTo('http://120.48.105.88:8081/source')">数据检索</router-link>
</li>
<li>
<router-link to="">数据应用</router-link>
</li>
<li>
<router-link to="/container/news">新闻动态</router-link>
</li>
<li>
<router-link to="">联系我们</router-link>
</li>
</ul>
</div>
</div>
</div>
<img class="di" src="../../../static/images/index/banner.jpg" alt="">
</div>
<div class="shuju_con">
<div v-show="showa == false" class="left">
<div class="left1">
<div class="xiala">
<el-select v-model="value" placeholder="平台类型">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<el-input v-model="type_b" placeholder="" />
<el-button
class="sousuo"
type="primary"
icon="el-icon-search"
/>
<el-button
class="caidan"
type="default"
icon="el-icon-s-operation"
@click="openList(0,'列表')"
/>
</div>
<div class="left2">
<el-tag v-for="tag in tags" :key="tag.name" closable :type="tag.type" @close="handleClose(tag)" @click="tosearch(tag.name)">
{{ tag.name }}
</el-tag>
</div>
<div class="left3">
<p>搜索结果</p>
<div class="left3_1">
<el-radio-group v-model="radio">
<el-radio :label="3">数据样品</el-radio>
<el-radio :label="6">航次</el-radio>
</el-radio-group>
</div>
<div class="left3_2">
<span>排序:</span>
<el-select v-model="value1" placeholder="航次名称">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div>
<div class="left4">
<div v-for="(item,index) in detail" :key="index" class="left4_1" @click="turnDeatilPage(item)">
<div class="left4_top">
<p>{{ item.title }}</p>
<span>{{ item.year }}</span>
</div>
<div class="left4_list">
<div class="list1">
<p>航次</p>
<span>{{ item.hangci }}</span>
</div>
<div class="list1">
<p>平台</p>
<span>{{ item.pingtai }}</span>
</div>
<div class="list1">
<p>设备</p>
<span>{{ item.shebei }}</span>
</div>
<div class="list1">
<p>数据样品</p>
<span>{{ item.shuju }}</span>
</div>
<div class="list1">
<p>航次首席</p>
<span>{{ item.shouxi }}</span>
</div>
</div>
</div>
</div>
<div class="arrow">
<img src="../../../static/images/arrow_nav.png" alt="" @click="shousuo">
</div>
</div>
<div v-show="showa" class="arrow_r" @click="toshow">
<img src="../../../static/images/arrow_nav1.png" alt="">
</div>
<div class="right">
<GMRT :is-img="img" :is-line="line" />
</div>
</div>
<el-dialog
:title="dialogTitle"
:visible.sync="showListDialog"
:close-on-click-modal="false"
:height="300"
:append-to-body="true"
width="800px"
>
<list-dialog v-if="showListDialog" :choose-data="chooseData" @handleClose="closeListForm" @handleConfirm="confirmListForm" />
</el-dialog>
</div>
</template>
<script>
import ListDialog from '../listDialog.vue'
import GMRT from '../GMRT.vue'
export default {
name: 'Shuju',
components: {
ListDialog,
GMRT
},
data() {
return {
img: true,
date: '',
week: '',
line: true,
showListDialog: false,
chooseData: '',
dialogTitle: '',
type_b: '',
showa: false,
center: { lng: 118.962643, lat: 35.618913 },
zoom: 3,
list: [
{
dingwei: {
lng: 119.054629,
lat: 36.373917
},
content: 'DY31-II-W1306-BC',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 119.919302,
lat: 34.226755
},
content: 'DY31-II-W1306-BC',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 119.560555,
lat: 34.421374
},
content: 'DY31-II-W1306-BC',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
},
{
dingwei: {
lng: 116.442213,
lat: 35.556921
},
content: 'DY31-II-W1306-BC',
pic: {
url: 'http://shipin.hey17.com/dingwei1.png',
size: { width: 16, height: 21 }
}
}
],
radio: 3,
options: [
{
value: '选项1',
label: '类型1'
},
{
value: '选项2',
label: '类型2'
},
{
value: '选项3',
label: '类型3'
},
{
value: '选项4',
label: '类型4'
},
{
value: '选项5',
label: '类型5'
}
],
value: '',
options1: [
{
value: '选项1',
label: '航次1'
},
{
value: '选项2',
label: '航次2'
},
{
value: '选项3',
label: '航次3'
},
{
value: '选项4',
label: '航次4'
},
{
value: '选项5',
label: '航次5'
}
],
value1: '',
tags: [
{ name: '探索一号', type: 'info' },
{ name: '船载CTD', type: 'info' }
],
detail: [
{
title: '岩石SY510-TXS-YS-01',
year: '2012',
hangci: 'TS-14',
pingtai: '着陆器',
shebei: '机械手',
shuju: '岩石',
shouxi: 'MERY'
},
{
title: '岩石SY510-TXS-YS-01',
year: '2012',
hangci: 'TS-14',
pingtai: '着陆器',
shebei: '机械手',
shuju: '岩石',
shouxi: 'MERY'
},
{
title: '岩石SY510-TXS-YS-01',
year: '2012',
hangci: 'TS-14',
pingtai: '着陆器',
shebei: '机械手',
shuju: '岩石',
shouxi: 'MERY'
}
]
}
},
mounted() {
this.getTime2()
},
methods: {
turnDeatilPage() {
this.$router.push({ name: 'dataDetail' })
},
turnPage(val, a) {
if (!a) {
this.$router.push({ name: val })
} else {
window.open(val, '_blank')
}
},
handleClose(tag) {
this.tags.splice(this.tags.indexOf(tag), 1)
},
tosearch(e) {
this.input = e
},
/** 跳转到子网地址 */
jumpTo(url) {
window.open(url, '_blank')
},
getTime2() {
setInterval(this.getTime, 1000)
},
getTime() {
var today = new Date()
var y = today.getFullYear() + '.'
var month = today.getMonth() + 1 + '.'
var t = today.getDate() + ''
var h = ''
var m = ''
var s = ''
if (today.getHours() < 10) {
h = '0' + today.getHours() + ':'
} else {
h = today.getHours() + ':'
}
if (today.getMinutes() < 10) {
m = '0' + today.getMinutes() + ':'
} else {
m = today.getMinutes() + ':'
}
if (today.getSeconds() < 10) {
s = '0' + today.getSeconds()
} else {
s = today.getSeconds()
}
var day = today.getDay()
var weeks = new Array(
'星期日',
'星期一',
'星期二',
'星期三',
'星期四',
'星期五',
'星期六'
)
var week = weeks[day]
// this.date_time = "<span>"+y+month+t+"</span><b>"+h+m+s+"</b>"
this.time = h + m + s
this.date = y + month + t
this.week = week
},
openList(value, title) {
this.dialogTitle = title
this.showListDialog = true
},
//
closeListForm() {
this.showListDialog = false
// this.init()
},
//
confirmListForm(val) {
this.showListDialog = false
if (val) {
this.type_b = val
}
// this.init()
},
handler({ BMap, map }) {
console.log(BMap, map)
this.center.lng = 116.404
this.center.lat = 39.915
this.zoom = 6
},
totap(e) {
console.log(e)
e.pic.url = 'http://shipin.hey17.com/dingwei_a.png'
e.pic.size.width = 22
e.pic.size.height = 28
for (var i = 0; i < this.list.length; i++) {
if (this.list[i] != e) {
this.list[i].pic.url = 'http://shipin.hey17.com/dingwei1.png'
this.list[i].pic.size.width = 16
this.list[i].pic.size.height = 21
}
}
},
shousuo() {
this.showa = true
},
toshow() {
this.showa = false
}
}
}
</script>
<style scoped lang="scss">
</style>
<style >
.left3_1 .el-radio {
margin-right: 15px;
}
.left3_1 .el-radio__label {
font-size: 15px;
}
.el-input__inner::-webkit-input-placeholder {
color: #333;
}
.left3_2 .el-input__inner {
padding-left: 0;
border: none;
font-size: 15px;
}
.BMapLabel{
border: none !important;
color: #fff;
background: none !important;
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
<Title>NE2_HR_LC_SR_W_DR_recolored.tif</Title>
<Abstract></Abstract>
<SRS>EPSG:4326</SRS>
<BoundingBox miny="-90.00000000000000" minx="-180.00000000000000" maxy="90.00000000000000" maxx="180.00000000000000"/>
<Origin y="-90.00000000000000" x="-180.00000000000000"/>
<TileFormat width="256" height="256" mime-type="image/jpg" extension="jpg"/>
<TileSets profile="geodetic">
<TileSet href="0" units-per-pixel="0.70312500000000" order="0"/>
<TileSet href="1" units-per-pixel="0.35156250000000" order="1"/>
<TileSet href="2" units-per-pixel="0.17578125000000" order="2"/>
</TileSets>
</TileMap>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

Some files were not shown because too many files have changed in this diff Show More