@kq_npm/client3d_webgl_vue 4.5.30 → 4.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adddata/index.js +1 -1
- package/clientPrint/index.js +461 -672
- package/index.js +461 -672
- package/package.json +1 -1
- package/sceneapp/index.js +461 -672
- package/sceneview/index.js +461 -672
- package/typhoontrac/index.js +43 -9
- package/windyslicing/index.js +366 -115
package/index.js
CHANGED
|
@@ -2612,10 +2612,6 @@ var global_event_default = /*#__PURE__*/__webpack_require__.n(global_event_);
|
|
|
2612
2612
|
|
|
2613
2613
|
class WindyViewModel {
|
|
2614
2614
|
// 气象效果设置全局变量
|
|
2615
|
-
//绘制管理对象
|
|
2616
|
-
//绘制完成监听事件
|
|
2617
|
-
// 是否线剖切
|
|
2618
|
-
// 点剖切
|
|
2619
2615
|
constructor(layerManager) {
|
|
2620
2616
|
_defineProperty(this, "_sceneView", null);
|
|
2621
2617
|
|
|
@@ -2634,7 +2630,7 @@ class WindyViewModel {
|
|
|
2634
2630
|
// 粒子宽度 1-100 对应实际宽度的 0-5px
|
|
2635
2631
|
maxNum: 30,
|
|
2636
2632
|
// 最大粒子数 1-100 对应实际密度 1-1000
|
|
2637
|
-
opacity:
|
|
2633
|
+
opacity: 1 // 不透明度 1-100 对应实际color的aplha通道1-255
|
|
2638
2634
|
|
|
2639
2635
|
}
|
|
2640
2636
|
});
|
|
@@ -2655,8 +2651,8 @@ class WindyViewModel {
|
|
|
2655
2651
|
},
|
|
2656
2652
|
temperature: {
|
|
2657
2653
|
groups: ['TEMPERATURE', 'SCS_SEA_TEMPERATURE', 'SCS_TEMPERATURE', 'SEA_TEMPERATURE_DAILY', 'DONGHAI_TEMPERATURE', 'DONGHAI_SEA_TEMPERATURE_DAILY'],
|
|
2658
|
-
colors: ['
|
|
2659
|
-
ranges: [
|
|
2654
|
+
colors: ['rgb(149, 137, 211)', 'rgb(150, 209, 216)', 'rgb(129, 204, 197)', 'rgb(103, 180, 186)', 'rgb(95, 143, 197)', 'rgb(80, 140, 62)', 'rgb(121, 146, 28)', 'rgb(171, 161, 14)', 'rgb(223, 177, 6)', 'rgb(243, 150, 6)', 'rgb(236, 95, 21)', 'rgb(190, 65, 18)', 'rgb(138, 43, 10)'],
|
|
2655
|
+
ranges: [-20, -10, 0, 10, 20, 40]
|
|
2660
2656
|
},
|
|
2661
2657
|
tp: {
|
|
2662
2658
|
groups: ['PRECIPITATION', 'SCS_PRECIPITATION', 'DONGHAI_PRECIPITATION'],
|
|
@@ -2670,41 +2666,11 @@ class WindyViewModel {
|
|
|
2670
2666
|
}
|
|
2671
2667
|
}));
|
|
2672
2668
|
|
|
2673
|
-
_defineProperty(this, "
|
|
2674
|
-
|
|
2675
|
-
_defineProperty(this, "_windySlicingRemoveEventListener", null);
|
|
2676
|
-
|
|
2677
|
-
_defineProperty(this, "_windySlicingOptions", {});
|
|
2678
|
-
|
|
2679
|
-
_defineProperty(this, "_windySlicingLayerconfig", null);
|
|
2680
|
-
|
|
2681
|
-
_defineProperty(this, "_windySlicingPolylineHandler", null);
|
|
2682
|
-
|
|
2683
|
-
_defineProperty(this, "_isDrawPolyline", false);
|
|
2684
|
-
|
|
2685
|
-
_defineProperty(this, "_pointSlicingHtmlTag", null);
|
|
2686
|
-
|
|
2687
|
-
_defineProperty(this, "_volumePrimitives", []);
|
|
2688
|
-
|
|
2689
|
-
_defineProperty(this, "_volumePrimitive", null);
|
|
2690
|
-
|
|
2691
|
-
_defineProperty(this, "_currentVolumeOption", null);
|
|
2692
|
-
|
|
2693
|
-
_defineProperty(this, "_currentVolumePosition", null);
|
|
2669
|
+
_defineProperty(this, "windyProviders", {});
|
|
2694
2670
|
|
|
2695
2671
|
this._sceneView = layerManager._scenceView;
|
|
2696
2672
|
this._viewer = layerManager._viewer;
|
|
2697
2673
|
this._layerManager = layerManager;
|
|
2698
|
-
this._windySlicingDrawManager = this._sceneView._drawManager;
|
|
2699
|
-
var that = this;
|
|
2700
|
-
that._windySlicingRemoveEventListener = that._windySlicingDrawManager.drawFinishedEvent.addEventListener(shape => {
|
|
2701
|
-
if (shape && shape.type === "rectangle") {
|
|
2702
|
-
that.windySlicingRectangleSlicing(shape.bounds);
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
that._windySlicingDrawManager.clear();
|
|
2706
|
-
});
|
|
2707
|
-
this._windySlicingPolylineHandler = new window.Cesium.ScreenSpaceEventHandler(this._viewer.canvas);
|
|
2708
2674
|
} // 设置全局气象效果参数消息
|
|
2709
2675
|
|
|
2710
2676
|
|
|
@@ -2844,13 +2810,18 @@ class WindyViewModel {
|
|
|
2844
2810
|
const getLayer = suffix => this._layerManager.getLayerByGuid(`${layerData.guid}${suffix}`, "imagerylayer"); // 初始化图层对象和URL参数
|
|
2845
2811
|
|
|
2846
2812
|
|
|
2847
|
-
const layerObj = { ...layerData
|
|
2848
|
-
url: (0,util_.urlAppend)(layerData.url, "limit=false")
|
|
2813
|
+
const layerObj = { ...layerData
|
|
2849
2814
|
};
|
|
2850
2815
|
const [layerMain, layerParticle, layerWind] = ["", "_particle", "_wind"].map(getLayer); // 处理时间索引逻辑
|
|
2851
2816
|
|
|
2852
2817
|
const timeIndex = 'timeIndex' in params && typeof params.timeIndex === 'number' && params.timeIndex >= 1 ? params.timeIndex : 0;
|
|
2853
|
-
[layerMain, layerParticle, layerWind].forEach(layer => updateTimeIndex(layer, timeIndex)); //
|
|
2818
|
+
[layerMain, layerParticle, layerWind].forEach(layer => updateTimeIndex(layer, timeIndex)); // 处理粒子图层参数
|
|
2819
|
+
|
|
2820
|
+
if (params.particle && layerParticle) {
|
|
2821
|
+
this.windyProviders[layerParticle.guid].particleOptions = this.getParticleOptions(null, params);
|
|
2822
|
+
this.windyProviders[layerParticle.guid]._reload?.();
|
|
2823
|
+
} // 处理粒子图层可见性
|
|
2824
|
+
|
|
2854
2825
|
|
|
2855
2826
|
if ('showVelocity' in params) {
|
|
2856
2827
|
const showParticle = bool ?? params.showVelocity;
|
|
@@ -2866,6 +2837,7 @@ class WindyViewModel {
|
|
|
2866
2837
|
|
|
2867
2838
|
if ('removeLayer' in params) {
|
|
2868
2839
|
[layerParticle, layerWind].forEach(layer => layer && this._viewer.imageryLayers.remove(layer));
|
|
2840
|
+
this.windyProvider = {};
|
|
2869
2841
|
}
|
|
2870
2842
|
}
|
|
2871
2843
|
/**
|
|
@@ -2890,6 +2862,7 @@ class WindyViewModel {
|
|
|
2890
2862
|
imageryProvider: imageryProvider,
|
|
2891
2863
|
clampToGround: true,
|
|
2892
2864
|
tileCacheSize: 300,
|
|
2865
|
+
name: item.collectionName + "_test",
|
|
2893
2866
|
mergeTile: true,
|
|
2894
2867
|
netCDFFieldInfor: {
|
|
2895
2868
|
lo1: "lo1",
|
|
@@ -2903,8 +2876,6 @@ class WindyViewModel {
|
|
|
2903
2876
|
classificationType: Cesium.ClassificationType.BOTH,
|
|
2904
2877
|
//CESIUM_3D_TILE BOTH
|
|
2905
2878
|
particleOptions: this.getParticleOptions(item),
|
|
2906
|
-
zValueIndex: 0,
|
|
2907
|
-
timeIndex: 0,
|
|
2908
2879
|
useCache: false
|
|
2909
2880
|
});
|
|
2910
2881
|
|
|
@@ -2914,20 +2885,8 @@ class WindyViewModel {
|
|
|
2914
2885
|
windyLayer._guid = guid + "_particle";
|
|
2915
2886
|
|
|
2916
2887
|
this._viewer.imageryLayers.lowerToBottom(windyLayer);
|
|
2917
|
-
}
|
|
2918
|
-
/**
|
|
2919
|
-
* 更新粒子图层参数
|
|
2920
|
-
* @param {String} guid 图层guid
|
|
2921
|
-
* @param {Object} options 粒子参数
|
|
2922
|
-
*/
|
|
2923
|
-
|
|
2924
2888
|
|
|
2925
|
-
|
|
2926
|
-
let layerParticle = this.getLayerByGuid(guid + "_particle", "imagerylayer");
|
|
2927
|
-
|
|
2928
|
-
if (layerParticle) {
|
|
2929
|
-
Object.assign(layerParticle.particleOptions, options);
|
|
2930
|
-
}
|
|
2889
|
+
this.windyProviders[windyLayer._guid] = windyProvider;
|
|
2931
2890
|
}
|
|
2932
2891
|
/**
|
|
2933
2892
|
* 获取三维粒子图层参数配置
|
|
@@ -2935,32 +2894,35 @@ class WindyViewModel {
|
|
|
2935
2894
|
*/
|
|
2936
2895
|
|
|
2937
2896
|
|
|
2938
|
-
getParticleOptions(options) {
|
|
2897
|
+
getParticleOptions(options, params) {
|
|
2898
|
+
const speedFactor = Number(options?.particle?.speedFactor ?? params?.particle?.speed ?? 25) / 10;
|
|
2899
|
+
const lineWidth = Number(options?.particle?.lineWidth ?? params?.particle?.width ?? 20) / 10;
|
|
2900
|
+
const maxParticles = Number(options?.particle?.maxParticles ?? params?.particle?.maxNum ?? 30) * 1000;
|
|
2939
2901
|
return {
|
|
2940
|
-
maxParticles: Cesium.defaultValue(
|
|
2902
|
+
maxParticles: Cesium.defaultValue(maxParticles, 40000),
|
|
2941
2903
|
//场景中的风粒子最大数量
|
|
2942
|
-
particleHeight: Cesium.defaultValue(options
|
|
2904
|
+
particleHeight: Cesium.defaultValue(options?.particle?.particleHeight, 10000.0),
|
|
2943
2905
|
//风粒子的高度
|
|
2944
|
-
fadeOpacity: Cesium.defaultValue(options
|
|
2906
|
+
fadeOpacity: Cesium.defaultValue(options?.particle?.fadeOpacity, 0.98),
|
|
2945
2907
|
//风粒子的不透明度
|
|
2946
|
-
dropRate: Cesium.defaultValue(options
|
|
2908
|
+
dropRate: Cesium.defaultValue(options?.particle?.dropRate, 0.01),
|
|
2947
2909
|
//风粒子的减少比例
|
|
2948
|
-
dropRateBump: Cesium.defaultValue(options
|
|
2910
|
+
dropRateBump: Cesium.defaultValue(options?.particle?.dropRateBump, 0.001),
|
|
2949
2911
|
//风粒子的消失比例
|
|
2950
|
-
speedFactor: Cesium.defaultValue(
|
|
2912
|
+
speedFactor: Cesium.defaultValue(speedFactor, 3),
|
|
2951
2913
|
//场景中风粒子的消失基本跨度单位。
|
|
2952
|
-
lineWidth: Cesium.defaultValue(
|
|
2914
|
+
lineWidth: Cesium.defaultValue(lineWidth, 3),
|
|
2953
2915
|
//场景中风粒子的线宽
|
|
2954
|
-
isFollowEllipse: typeof options
|
|
2916
|
+
isFollowEllipse: typeof options?.particle?.isFollowEllipse == 'undefined' ? true : options?.particle?.isFollowEllipse,
|
|
2955
2917
|
//场景中风粒子数是否跟随视角进行变化
|
|
2956
|
-
isSpeedOrDir: typeof options
|
|
2918
|
+
isSpeedOrDir: typeof options?.particle?.isSpeedOrDir == 'undefined' ? true : options?.particle?.isSpeedOrDir,
|
|
2957
2919
|
//
|
|
2958
|
-
isLayerFactor: typeof options
|
|
2920
|
+
isLayerFactor: typeof options?.particle?.isLayerFactor == 'undefined' ? false : options?.particle?.isLayerFactor,
|
|
2959
2921
|
//多层数据-是否逐层渐变显示
|
|
2960
|
-
layerHeight: Cesium.defaultValue(options
|
|
2922
|
+
layerHeight: Cesium.defaultValue(options?.particle?.layerHeight, 200),
|
|
2961
2923
|
//多层数据-层间距(m)。
|
|
2962
|
-
isSingleLayer: typeof options
|
|
2963
|
-
currentLayer: Cesium.defaultValue(options
|
|
2924
|
+
isSingleLayer: typeof options?.particle?.isSingleLayer == 'undefined' ? false : options?.particle?.isSingleLayer,
|
|
2925
|
+
currentLayer: Cesium.defaultValue(options?.particle?.currentLayer, 1) //多层数据-单层显示时设置当前层索引
|
|
2964
2926
|
|
|
2965
2927
|
};
|
|
2966
2928
|
}
|
|
@@ -3011,7 +2973,6 @@ class WindyViewModel {
|
|
|
3011
2973
|
V: item.varNames.split(",")[1]
|
|
3012
2974
|
},
|
|
3013
2975
|
classificationType: Cesium.ClassificationType.BOTH,
|
|
3014
|
-
zValueIndex: 0,
|
|
3015
2976
|
timeIndex: 0
|
|
3016
2977
|
});
|
|
3017
2978
|
|
|
@@ -3020,479 +2981,6 @@ class WindyViewModel {
|
|
|
3020
2981
|
windyLayer.show = bool != null ? bool : true;
|
|
3021
2982
|
windyLayer._guid = guid + "_wind";
|
|
3022
2983
|
}
|
|
3023
|
-
/**
|
|
3024
|
-
* 创建并控制气象剖切参数
|
|
3025
|
-
* @param {String} guid 图层guid
|
|
3026
|
-
* @param {Boolean} key 当前操作状态或参数
|
|
3027
|
-
* @param {Object} params 气象剖切参数
|
|
3028
|
-
*/
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
setWindySlicingParams(guid, key, params) {
|
|
3032
|
-
let that = this;
|
|
3033
|
-
this._windySlicingLayerconfig = null;
|
|
3034
|
-
this.getWindySlicingLayer(guid);
|
|
3035
|
-
if (!this._windySlicingLayerconfig) return;
|
|
3036
|
-
this._viewer.scene.globe.showGroundAtmosphere = false;
|
|
3037
|
-
this._viewer.scene.screenSpaceCameraController.maximumZoomDistance = 20_000_000;
|
|
3038
|
-
Object.assign(this._windySlicingOptions, params);
|
|
3039
|
-
|
|
3040
|
-
switch (key) {
|
|
3041
|
-
case "mode":
|
|
3042
|
-
that.removeInputAction();
|
|
3043
|
-
|
|
3044
|
-
if (this._volumePrimitive) {
|
|
3045
|
-
this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
3046
|
-
|
|
3047
|
-
this._volumePrimitive = null;
|
|
3048
|
-
}
|
|
3049
|
-
|
|
3050
|
-
if (this._windySlicingOptions.mode === "point") {
|
|
3051
|
-
this.drawPolylineHandler();
|
|
3052
|
-
} else if (this._windySlicingOptions.mode === "line") {
|
|
3053
|
-
this.drawPolylineHandler(function (newPositions) {
|
|
3054
|
-
that._isDrawPolyline = false;
|
|
3055
|
-
that.windySlicingPolylineSlicing(newPositions);
|
|
3056
|
-
});
|
|
3057
|
-
this._isDrawPolyline = true;
|
|
3058
|
-
|
|
3059
|
-
this._windySlicingDrawManager.startDraw("polyline", {
|
|
3060
|
-
clampToGround: true
|
|
3061
|
-
});
|
|
3062
|
-
} else if (this._windySlicingOptions.mode === "polygon") {
|
|
3063
|
-
this._windySlicingDrawManager.startDraw("rectangle", {
|
|
3064
|
-
clampToGround: true
|
|
3065
|
-
});
|
|
3066
|
-
} else if (this._windySlicingOptions.mode === "clear") {
|
|
3067
|
-
this.windySlicingClear();
|
|
3068
|
-
}
|
|
3069
|
-
|
|
3070
|
-
break;
|
|
3071
|
-
|
|
3072
|
-
case "showAxis":
|
|
3073
|
-
if (this._volumePrimitive) this._volumePrimitive.showAxis(params[key]);
|
|
3074
|
-
break;
|
|
3075
|
-
|
|
3076
|
-
case "slicingType":
|
|
3077
|
-
this.windyVoxelsSingleSlicing();
|
|
3078
|
-
break;
|
|
3079
|
-
|
|
3080
|
-
case "setting":
|
|
3081
|
-
console.log(params);
|
|
3082
|
-
break;
|
|
3083
|
-
|
|
3084
|
-
case "clear":
|
|
3085
|
-
this.windySlicingClear();
|
|
3086
|
-
break;
|
|
3087
|
-
|
|
3088
|
-
case "destroy":
|
|
3089
|
-
this.windySlicingDestroy();
|
|
3090
|
-
break;
|
|
3091
|
-
|
|
3092
|
-
default:
|
|
3093
|
-
break;
|
|
3094
|
-
}
|
|
3095
|
-
}
|
|
3096
|
-
/**
|
|
3097
|
-
* 获取或设置气象剖切图层配置
|
|
3098
|
-
* @param {string} [guid] 可选图层guid
|
|
3099
|
-
* @returns {Object|null} 图层配置对象或null
|
|
3100
|
-
*/
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
getWindySlicingLayer(guid) {
|
|
3104
|
-
// 参数校验:确保guid为有效字符串
|
|
3105
|
-
const isValidGuid = typeof guid === 'string' && guid.trim() !== ''; // 获取图层配置逻辑
|
|
3106
|
-
|
|
3107
|
-
this._windySlicingLayerconfig = isValidGuid ? this._layerManager.getLayerDataByGuid(guid) || null : this._layerManager._layerListData?.find(element => element?.addType === 'kqgisweatherserver') || null; // 可选:添加调试信息或错误处理
|
|
3108
|
-
|
|
3109
|
-
if (!this._windySlicingLayerconfig) {
|
|
3110
|
-
console.warn('未找到匹配的气象剖切图层配置');
|
|
3111
|
-
}
|
|
3112
|
-
|
|
3113
|
-
return this._windySlicingLayerconfig;
|
|
3114
|
-
}
|
|
3115
|
-
|
|
3116
|
-
removeInputAction() {
|
|
3117
|
-
if (this._windySlicingPolylineHandler) {
|
|
3118
|
-
this._windySlicingPolylineHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
3119
|
-
|
|
3120
|
-
this._windySlicingPolylineHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
3121
|
-
} //清除
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
if (this._pointSlicingHtmlTag) {
|
|
3125
|
-
this._pointSlicingHtmlTag.destroy();
|
|
3126
|
-
}
|
|
3127
|
-
} // 两点绘制线结果
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
drawPolylineHandler(callback) {
|
|
3131
|
-
let that = this;
|
|
3132
|
-
let activeShapePoints = [];
|
|
3133
|
-
|
|
3134
|
-
this._windySlicingPolylineHandler.setInputAction(function (event) {
|
|
3135
|
-
if (that._isDrawPolyline) {
|
|
3136
|
-
let earthPosition = that._viewer.scene.pickPosition(event.position);
|
|
3137
|
-
|
|
3138
|
-
if (window.Cesium.defined(earthPosition)) {
|
|
3139
|
-
activeShapePoints.push(earthPosition); //单线分析结果显示
|
|
3140
|
-
|
|
3141
|
-
if (activeShapePoints.length == 2) {
|
|
3142
|
-
that._windySlicingDrawManager.stopDraw();
|
|
3143
|
-
|
|
3144
|
-
that.removeInputAction();
|
|
3145
|
-
var newPositions = [];
|
|
3146
|
-
activeShapePoints.forEach(position => {
|
|
3147
|
-
var newPosition = that._windySlicingDrawManager.transformPosition(position);
|
|
3148
|
-
|
|
3149
|
-
newPositions.push({
|
|
3150
|
-
x: newPosition[0],
|
|
3151
|
-
y: newPosition[1]
|
|
3152
|
-
});
|
|
3153
|
-
});
|
|
3154
|
-
if (callback) callback(newPositions);
|
|
3155
|
-
}
|
|
3156
|
-
}
|
|
3157
|
-
} else {
|
|
3158
|
-
let cartographic = that._viewer.scene.globe.ellipsoid.cartesianToCartographic(that._viewer.camera.pickEllipsoid(event.position, that._viewer.scene.globe.ellipsoid));
|
|
3159
|
-
|
|
3160
|
-
that.getPointSlicingData(cartographic);
|
|
3161
|
-
}
|
|
3162
|
-
}, window.Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
3163
|
-
|
|
3164
|
-
if (!that._isDrawPolyline) {
|
|
3165
|
-
that._windySlicingPolylineHandler.setInputAction(function (event) {
|
|
3166
|
-
that.removeInputAction();
|
|
3167
|
-
}, window.Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
3168
|
-
}
|
|
3169
|
-
}
|
|
3170
|
-
/**
|
|
3171
|
-
* 获取点的气象数据
|
|
3172
|
-
* @param {string} [guid] cartographic拾取的点
|
|
3173
|
-
*/
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
getPointSlicingData(cartographic) {
|
|
3177
|
-
let that = this;
|
|
3178
|
-
let X = window.Cesium.Math.toDegrees(cartographic.longitude);
|
|
3179
|
-
let Y = window.Cesium.Math.toDegrees(cartographic.latitude);
|
|
3180
|
-
let groups = this._PRODUCT_CONFIG[this._windySlicingLayerconfig?.params?.productType]?.groups ?? [];
|
|
3181
|
-
let unit = 'm';
|
|
3182
|
-
|
|
3183
|
-
if (groups.includes("AIR_PRESSURE")) {
|
|
3184
|
-
unit = "hpa";
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
let data = {
|
|
3188
|
-
"collectionName": that._windySlicingLayerconfig?.params?.layer,
|
|
3189
|
-
"point": {
|
|
3190
|
-
"x": X,
|
|
3191
|
-
"y": Y
|
|
3192
|
-
},
|
|
3193
|
-
"geoSRS": "EPSG:4326",
|
|
3194
|
-
type: 1
|
|
3195
|
-
}; //清除
|
|
3196
|
-
|
|
3197
|
-
if (this._pointSlicingHtmlTag) {
|
|
3198
|
-
this._pointSlicingHtmlTag.destroy();
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
let url = this._windySlicingLayerconfig?.url.replaceAll("/wmts", "").replace("/image", "/image/identify");
|
|
3202
|
-
const xhr = new XMLHttpRequest();
|
|
3203
|
-
xhr.open('POST', url);
|
|
3204
|
-
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
3205
|
-
|
|
3206
|
-
xhr.onload = function () {
|
|
3207
|
-
if (xhr.status >= 200 && xhr.status < 300) {
|
|
3208
|
-
const data = JSON.parse(xhr.responseText);
|
|
3209
|
-
|
|
3210
|
-
if (data) {
|
|
3211
|
-
let val;
|
|
3212
|
-
let getAllVal = data.result.RasterNameValue;
|
|
3213
|
-
|
|
3214
|
-
if (that._windySlicingLayerconfig?.params?.layer === 'wind_5' || that._windySlicingLayerconfig?.params?.layer === 'current_global_5') {
|
|
3215
|
-
let U = getAllVal[0].value; //经度
|
|
3216
|
-
|
|
3217
|
-
let V = getAllVal[1].value; //维度
|
|
3218
|
-
|
|
3219
|
-
let directVal = that.direction(U, V);
|
|
3220
|
-
let unitName = that._windySlicingLayerconfig?.params?.layer === 'wind_5' ? '风' : '';
|
|
3221
|
-
val = directVal.direct + unitName + ' ' + directVal.speed.toFixed(2);
|
|
3222
|
-
} else if (that._windySlicingLayerconfig?.params?.layer === 'hailang') {
|
|
3223
|
-
let hldirectVal = that.direction(null, null, getAllVal[4].value); //波浪平均方向
|
|
3224
|
-
|
|
3225
|
-
let period = Number(getAllVal[2].value).toFixed(); // 海洋表面温湿度平均周期
|
|
3226
|
-
|
|
3227
|
-
let alt = Number(getAllVal[0].value).toFixed(); //风浪高度
|
|
3228
|
-
|
|
3229
|
-
val = hldirectVal.direct + ' ' + '周期' + ' ' + period + 's' + ' ' + alt;
|
|
3230
|
-
} else {
|
|
3231
|
-
val = Number(getAllVal[0].value);
|
|
3232
|
-
}
|
|
3233
|
-
|
|
3234
|
-
let value = val + ' ' + unit;
|
|
3235
|
-
that.setWindySlicingPointData(value, cartographic); //显示拾取数据
|
|
3236
|
-
}
|
|
3237
|
-
} else {
|
|
3238
|
-
console.error('Request error:', xhr.statusText);
|
|
3239
|
-
}
|
|
3240
|
-
};
|
|
3241
|
-
|
|
3242
|
-
xhr.onerror = function () {
|
|
3243
|
-
console.error('Request error!');
|
|
3244
|
-
};
|
|
3245
|
-
|
|
3246
|
-
xhr.send(JSON.stringify(data));
|
|
3247
|
-
}
|
|
3248
|
-
/**
|
|
3249
|
-
* 展现气象服务点数据
|
|
3250
|
-
* @param {*} val 数值
|
|
3251
|
-
* @param {*} position 坐标
|
|
3252
|
-
*/
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
setWindySlicingPointData(val, position) {
|
|
3256
|
-
let myposition = window.Cesium.Cartesian3.fromRadians(position.longitude, position.latitude, position.height);
|
|
3257
|
-
let html = `<div class="pickClass" style="">
|
|
3258
|
-
<div style="display: block;position: absolute;left: 0px;right: 0;width: 2px;height: 140px;background: rgba(68,65,65,.84)">
|
|
3259
|
-
<span style="background:rgba(68,65,65,.84);padding:5px 18px;text-align: center;line-height: 1.9;color: #fff;border-top-right-radius: 20px;border-bottom-right-radius: 20px;white-space: nowrap;cursor: move;display: inline-block;">${val}</span>
|
|
3260
|
-
</div>
|
|
3261
|
-
</div>`; // 点标注
|
|
3262
|
-
|
|
3263
|
-
this._pointSlicingHtmlTag = new window.Cesium.Kq3dHtmlTag(this._viewer, {
|
|
3264
|
-
html: html,
|
|
3265
|
-
position: myposition,
|
|
3266
|
-
// 获取到的位置
|
|
3267
|
-
anchor: [0, -140],
|
|
3268
|
-
// 设置标注的偏移量
|
|
3269
|
-
noEvent: false
|
|
3270
|
-
});
|
|
3271
|
-
}
|
|
3272
|
-
/**
|
|
3273
|
-
* 创建线剖切
|
|
3274
|
-
* @param {Object} polyline 绘制的线坐标数据
|
|
3275
|
-
*/
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
windySlicingPolylineSlicing(polyline) {
|
|
3279
|
-
this._currentVolumePosition = polyline;
|
|
3280
|
-
if (!this._windySlicingLayerconfig) return;
|
|
3281
|
-
let proConfig = this._PRODUCT_CONFIG;
|
|
3282
|
-
if (!proConfig) return;
|
|
3283
|
-
let colors = proConfig[this._windySlicingLayerconfig?.params?.productType]?.colors;
|
|
3284
|
-
let ranges = proConfig[this._windySlicingLayerconfig?.params?.productType]?.ranges;
|
|
3285
|
-
let groups = proConfig[this._windySlicingLayerconfig?.params?.productType]?.groups ?? [];
|
|
3286
|
-
let img = colors && this.generateImage(colors);
|
|
3287
|
-
if (!img) return;
|
|
3288
|
-
let unit = 'm';
|
|
3289
|
-
|
|
3290
|
-
if (groups.includes("AIR_PRESSURE")) {
|
|
3291
|
-
unit = "hpa";
|
|
3292
|
-
}
|
|
3293
|
-
|
|
3294
|
-
this._currentVolumeOption = {
|
|
3295
|
-
viewer: this._viewer,
|
|
3296
|
-
url: this._windySlicingLayerconfig.url.replaceAll("/wmts", ""),
|
|
3297
|
-
collectionName: this._windySlicingLayerconfig?.params?.layer,
|
|
3298
|
-
image: img,
|
|
3299
|
-
// 高度偏移
|
|
3300
|
-
offset: 0,
|
|
3301
|
-
// 高度放大比例
|
|
3302
|
-
scale: unit == 'hpa' ? 18 : 300,
|
|
3303
|
-
unit: unit,
|
|
3304
|
-
attrRange: [ranges[0], ranges[ranges.length - 1]],
|
|
3305
|
-
varName: this._windySlicingLayerconfig?.params?.varNames
|
|
3306
|
-
};
|
|
3307
|
-
|
|
3308
|
-
if (this._volumePrimitive) {
|
|
3309
|
-
this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
3310
|
-
|
|
3311
|
-
this._volumePrimitive = null;
|
|
3312
|
-
}
|
|
3313
|
-
|
|
3314
|
-
this._volumePrimitive = new Cesium.Kq3dGridVolumeProvider(this._currentVolumeOption);
|
|
3315
|
-
|
|
3316
|
-
this._volumePrimitive.showSection(polyline); // this._volumePrimitives.push(gridVolumePolyline)
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
this.setViewEntity(calculateBoundingBox(polyline)); // 核心计算方法
|
|
3320
|
-
|
|
3321
|
-
function calculateBoundingBox(points) {
|
|
3322
|
-
// 初始化边界值
|
|
3323
|
-
let minX = Infinity,
|
|
3324
|
-
maxX = -Infinity;
|
|
3325
|
-
let minY = Infinity,
|
|
3326
|
-
maxY = -Infinity; // 遍历所有坐标点
|
|
3327
|
-
|
|
3328
|
-
for (const point of points) {
|
|
3329
|
-
minX = Math.min(minX, point.x);
|
|
3330
|
-
maxX = Math.max(maxX, point.x);
|
|
3331
|
-
minY = Math.min(minY, point.y);
|
|
3332
|
-
maxY = Math.max(maxY, point.y);
|
|
3333
|
-
}
|
|
3334
|
-
|
|
3335
|
-
return {
|
|
3336
|
-
minX: minX,
|
|
3337
|
-
// 西经(最小经度)
|
|
3338
|
-
maxX: maxX,
|
|
3339
|
-
// 东经(最大经度)
|
|
3340
|
-
minY: minY,
|
|
3341
|
-
// 南纬(最小纬度)
|
|
3342
|
-
maxY: maxY // 北纬(最大纬度)
|
|
3343
|
-
|
|
3344
|
-
};
|
|
3345
|
-
}
|
|
3346
|
-
}
|
|
3347
|
-
/**
|
|
3348
|
-
* 面剖切
|
|
3349
|
-
* @param {Object} rect 矩形四至
|
|
3350
|
-
*/
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
windySlicingRectangleSlicing(rect) {
|
|
3354
|
-
this._currentVolumePosition = rect;
|
|
3355
|
-
if (!this._windySlicingLayerconfig) return;
|
|
3356
|
-
let proConfig = this._PRODUCT_CONFIG;
|
|
3357
|
-
if (!proConfig) return;
|
|
3358
|
-
let colors = proConfig[this._windySlicingLayerconfig?.params?.productType]?.colors;
|
|
3359
|
-
let ranges = proConfig[this._windySlicingLayerconfig?.params?.productType]?.ranges;
|
|
3360
|
-
let groups = proConfig[this._windySlicingLayerconfig?.params?.productType]?.groups ?? [];
|
|
3361
|
-
let img = colors && this.generateImage(colors);
|
|
3362
|
-
if (!img) return;
|
|
3363
|
-
let unit = 'm';
|
|
3364
|
-
|
|
3365
|
-
if (groups.includes("AIR_PRESSURE")) {
|
|
3366
|
-
unit = "hpa";
|
|
3367
|
-
}
|
|
3368
|
-
|
|
3369
|
-
if (this._volumePrimitive) {
|
|
3370
|
-
this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
3371
|
-
|
|
3372
|
-
this._volumePrimitive = null;
|
|
3373
|
-
}
|
|
3374
|
-
|
|
3375
|
-
this._currentVolumeOption = {
|
|
3376
|
-
viewer: this._viewer,
|
|
3377
|
-
url: this._windySlicingLayerconfig.url.replaceAll("/wmts", ""),
|
|
3378
|
-
collectionName: this._windySlicingLayerconfig?.params?.layer,
|
|
3379
|
-
image: img,
|
|
3380
|
-
// 高度偏移
|
|
3381
|
-
offset: 1000,
|
|
3382
|
-
// 高度放大比例
|
|
3383
|
-
scale: unit == 'hpa' ? 18 : 300,
|
|
3384
|
-
unit: unit,
|
|
3385
|
-
attrRange: [ranges[0], ranges[ranges.length - 1]],
|
|
3386
|
-
varName: this._windySlicingLayerconfig?.params?.varNames
|
|
3387
|
-
};
|
|
3388
|
-
this._volumePrimitive = new Cesium.Kq3dGridVolumeProvider(this._currentVolumeOption);
|
|
3389
|
-
|
|
3390
|
-
this._volumePrimitive.showSections(rect);
|
|
3391
|
-
|
|
3392
|
-
this.setViewEntity(rect); // this._volumePrimitives.push(gridVolume)
|
|
3393
|
-
}
|
|
3394
|
-
|
|
3395
|
-
windyVoxelsSingleSlicing() {
|
|
3396
|
-
if (!Cesium.Kq3dGridVoxelsSingleProviderExt) {
|
|
3397
|
-
console.log("Kq3dGridVoxelsSingleProviderExt class cannot be empty");
|
|
3398
|
-
return;
|
|
3399
|
-
}
|
|
3400
|
-
|
|
3401
|
-
if (this._volumePrimitive) {
|
|
3402
|
-
this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
3403
|
-
|
|
3404
|
-
this._volumePrimitive = null;
|
|
3405
|
-
}
|
|
3406
|
-
|
|
3407
|
-
if (this._currentVolumeOption && this._currentVolumePosition) {
|
|
3408
|
-
this._volumePrimitive = new Cesium.Kq3dGridVoxelsSingleProviderExt(this.options);
|
|
3409
|
-
this.volumePrimitive.showVoxels(rect);
|
|
3410
|
-
}
|
|
3411
|
-
} // 设置entity视角缩放
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
setViewEntity(rect) {
|
|
3415
|
-
var rectangle = new Cesium.Rectangle(Cesium.Math.toRadians(rect.minX), Cesium.Math.toRadians(rect.minY), Cesium.Math.toRadians(rect.maxX), Cesium.Math.toRadians(rect.maxY));
|
|
3416
|
-
|
|
3417
|
-
let entity = this._viewer.entities.add({
|
|
3418
|
-
name: 'Blue translucent, rotated, and extruded ellipse with outline',
|
|
3419
|
-
rectangle: {
|
|
3420
|
-
coordinates: rectangle,
|
|
3421
|
-
material: Cesium.Color.RED.withAlpha(0)
|
|
3422
|
-
}
|
|
3423
|
-
});
|
|
3424
|
-
|
|
3425
|
-
this._viewer.flyTo(entity, {
|
|
3426
|
-
duration: 1,
|
|
3427
|
-
offset: {
|
|
3428
|
-
heading: Cesium.Math.toRadians(-30),
|
|
3429
|
-
pitch: Cesium.Math.toRadians(-30),
|
|
3430
|
-
range: 1100000
|
|
3431
|
-
}
|
|
3432
|
-
});
|
|
3433
|
-
|
|
3434
|
-
setTimeout(() => {
|
|
3435
|
-
this._viewer.entities.remove(entity);
|
|
3436
|
-
}, 1000);
|
|
3437
|
-
} // 根据颜色表生成图片
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
generateImage(colors) {
|
|
3441
|
-
var canvas = document.createElement('canvas');
|
|
3442
|
-
var context = canvas.getContext('2d'); // 设置画布大小为500x300像素
|
|
3443
|
-
|
|
3444
|
-
canvas.width = 434;
|
|
3445
|
-
canvas.height = 27; // 计算每个颜色所占据的区域大小
|
|
3446
|
-
|
|
3447
|
-
var scale = 1 / (colors.length - 1); // 创建一个线性渐变
|
|
3448
|
-
|
|
3449
|
-
const gradient = context.createLinearGradient(0, 0, canvas.width, canvas.height);
|
|
3450
|
-
gradient.addColorStop(0, colors[0]); // 渐变开始的颜色
|
|
3451
|
-
// 绘制颜色条形
|
|
3452
|
-
|
|
3453
|
-
for (let i = 1; i < colors.length; i++) {
|
|
3454
|
-
gradient.addColorStop(i * scale, colors[i]);
|
|
3455
|
-
} // 填充渐变
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
context.fillStyle = gradient;
|
|
3459
|
-
context.fillRect(0, 0, canvas.width, canvas.height);
|
|
3460
|
-
var imageDataUrl = canvas.toDataURL('image/png');
|
|
3461
|
-
return imageDataUrl;
|
|
3462
|
-
} //清清除剖切分析结果
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
windySlicingClear() {
|
|
3466
|
-
// for (let i = 0; i < this._volumePrimitives.length; i++) {
|
|
3467
|
-
// this._viewer.scene.primitives.remove(this._volumePrimitives[i]);
|
|
3468
|
-
// }
|
|
3469
|
-
// this._volumePrimitives = [];
|
|
3470
|
-
if (this._volumePrimitive) this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
3471
|
-
this.removeInputAction();
|
|
3472
|
-
this._isDrawPolyline = false;
|
|
3473
|
-
this._viewer.scene.globe.showGroundAtmosphere = true;
|
|
3474
|
-
this._viewer.scene.screenSpaceCameraController.maximumZoomDistance = Number.POSITIVE_INFINITY;
|
|
3475
|
-
|
|
3476
|
-
this._windySlicingDrawManager.stopDraw();
|
|
3477
|
-
|
|
3478
|
-
this._windySlicingDrawManager.clear();
|
|
3479
|
-
}
|
|
3480
|
-
/**
|
|
3481
|
-
* 销毁剖切分析
|
|
3482
|
-
* @param {Boolean} isRemoveEventListener 是否删除监听,默认false
|
|
3483
|
-
*/
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
windySlicingDestroy(isRemoveEventListener = false) {
|
|
3487
|
-
this.windySlicingClear();
|
|
3488
|
-
if (this._windySlicingOptions) this._windySlicingOptions = {};
|
|
3489
|
-
|
|
3490
|
-
if (isRemoveEventListener) {
|
|
3491
|
-
//移除监听事件
|
|
3492
|
-
this._windySlicingRemoveEventListener && this._windySlicingRemoveEventListener();
|
|
3493
|
-
this._windySlicingRemoveEventListener = null;
|
|
3494
|
-
}
|
|
3495
|
-
}
|
|
3496
2984
|
|
|
3497
2985
|
}
|
|
3498
2986
|
;// CONCATENATED MODULE: ./src/webgl/sceneview/LayerManager.js
|
|
@@ -4010,7 +3498,7 @@ class LayerManager {
|
|
|
4010
3498
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dKQGISServerImageryProviderExt({
|
|
4011
3499
|
name: name,
|
|
4012
3500
|
url: url,
|
|
4013
|
-
layerName: layerData.layerName,
|
|
3501
|
+
layerName: layerData.layerName || layerData.id,
|
|
4014
3502
|
...params
|
|
4015
3503
|
}));
|
|
4016
3504
|
layer._guid = layerData.guid;
|
|
@@ -4657,7 +4145,7 @@ class LayerManager {
|
|
|
4657
4145
|
}
|
|
4658
4146
|
} else if (this._layerListData[i].addType && this._layerListData[i].addType === 'kqgisweatherserver') {
|
|
4659
4147
|
this.addLayerData(this._layerListData[i]);
|
|
4660
|
-
this.setLayerParams(this._layerListData[i].guid, this._layerListData[i]);
|
|
4148
|
+
this.setLayerParams(this._layerListData[i].guid, Object.assign({}, this._layerListData[i], this._windyViewModel._windyParams));
|
|
4661
4149
|
}
|
|
4662
4150
|
}
|
|
4663
4151
|
}
|
|
@@ -4770,20 +4258,36 @@ class LayerManager {
|
|
|
4770
4258
|
return layer;
|
|
4771
4259
|
}
|
|
4772
4260
|
/**
|
|
4773
|
-
*
|
|
4261
|
+
* 获取所有影像服务显示状态的图层数据-栅格
|
|
4774
4262
|
*/
|
|
4775
4263
|
|
|
4776
4264
|
|
|
4777
4265
|
getImageLayerCheckedList() {
|
|
4778
|
-
let
|
|
4266
|
+
let checkedLayers = [];
|
|
4267
|
+
|
|
4268
|
+
this._layerListData.forEach(layer => {
|
|
4269
|
+
if (layer.visible && layer.addType === "kqgisimageserver") {
|
|
4270
|
+
checkedLayers.push(layer);
|
|
4271
|
+
}
|
|
4272
|
+
}, this);
|
|
4273
|
+
|
|
4274
|
+
return JSON.parse(JSON.stringify(checkedLayers));
|
|
4275
|
+
}
|
|
4276
|
+
/**
|
|
4277
|
+
* 获取所有影像服务显示状态的图层数据-气象
|
|
4278
|
+
*/
|
|
4279
|
+
|
|
4280
|
+
|
|
4281
|
+
getWeatherLayerCheckedList() {
|
|
4282
|
+
let checkedLayers = [];
|
|
4779
4283
|
|
|
4780
4284
|
this._layerListData.forEach(layer => {
|
|
4781
|
-
if (layer.visible && layer
|
|
4285
|
+
if (layer.visible && layer.addType === "kqgisweatherserver") {
|
|
4782
4286
|
checkedLayers.push(layer);
|
|
4783
4287
|
}
|
|
4784
4288
|
}, this);
|
|
4785
4289
|
|
|
4786
|
-
return JSON.parse(JSON.stringify(
|
|
4290
|
+
return JSON.parse(JSON.stringify(checkedLayers));
|
|
4787
4291
|
}
|
|
4788
4292
|
/**
|
|
4789
4293
|
* 删除气象图层
|
|
@@ -22872,7 +22376,7 @@ class WindySlicingViewModel {
|
|
|
22872
22376
|
|
|
22873
22377
|
_defineProperty(this, "callbackParams", null);
|
|
22874
22378
|
|
|
22875
|
-
_defineProperty(this, "
|
|
22379
|
+
_defineProperty(this, "volumelines", null);
|
|
22876
22380
|
|
|
22877
22381
|
this._sceneView = scenceView;
|
|
22878
22382
|
this._layerManager = scenceView._layerManager;
|
|
@@ -22901,13 +22405,8 @@ class WindySlicingViewModel {
|
|
|
22901
22405
|
|
|
22902
22406
|
switch (key) {
|
|
22903
22407
|
case "mode":
|
|
22904
|
-
|
|
22905
|
-
|
|
22906
|
-
if (this._volumePrimitive) {
|
|
22907
|
-
this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
22908
|
-
|
|
22909
|
-
this._volumePrimitive = null;
|
|
22910
|
-
}
|
|
22408
|
+
this.removeInputAction();
|
|
22409
|
+
this.removeVolumePrimitive();
|
|
22911
22410
|
|
|
22912
22411
|
if (this._options.mode === "point") {
|
|
22913
22412
|
this._windySlicingDrawManager.stopDraw();
|
|
@@ -22933,12 +22432,34 @@ class WindySlicingViewModel {
|
|
|
22933
22432
|
|
|
22934
22433
|
break;
|
|
22935
22434
|
|
|
22936
|
-
case "
|
|
22937
|
-
|
|
22435
|
+
case "slicingType":
|
|
22436
|
+
this.removeVolumePrimitive();
|
|
22437
|
+
|
|
22438
|
+
if (this._options.slicingType == 1) {
|
|
22439
|
+
if (this._options.styleType == "1") {
|
|
22440
|
+
if (this._currentVolumePosition) this.windySlicingRectangleSlicing(this._currentVolumePosition);
|
|
22441
|
+
}
|
|
22442
|
+
} else {
|
|
22443
|
+
this.windyVoxelsSingleSlicing();
|
|
22444
|
+
}
|
|
22445
|
+
|
|
22938
22446
|
break;
|
|
22939
22447
|
|
|
22940
|
-
case "
|
|
22941
|
-
this.
|
|
22448
|
+
case "styleType":
|
|
22449
|
+
this.removeVolumePrimitive();
|
|
22450
|
+
|
|
22451
|
+
if (this._options.styleType == "1") {
|
|
22452
|
+
if (this._currentVolumePosition) this.windySlicingRectangleSlicing(this._currentVolumePosition);
|
|
22453
|
+
} else {
|
|
22454
|
+
if (this._currentVolumePosition) {
|
|
22455
|
+
this.windySlicingSurfaceSection(this._currentVolumePosition, this._windySlicingLayerconfig);
|
|
22456
|
+
}
|
|
22457
|
+
}
|
|
22458
|
+
|
|
22459
|
+
break;
|
|
22460
|
+
|
|
22461
|
+
case "showAxis":
|
|
22462
|
+
if (this._volumePrimitive) this._volumePrimitive.showAxis(this._options[key]);
|
|
22942
22463
|
break;
|
|
22943
22464
|
|
|
22944
22465
|
case "enableLayering":
|
|
@@ -22950,6 +22471,18 @@ class WindySlicingViewModel {
|
|
|
22950
22471
|
if (this._volumePrimitive) this._volumePrimitive.scale = this._options[key];
|
|
22951
22472
|
break;
|
|
22952
22473
|
|
|
22474
|
+
case "altitudeControl":
|
|
22475
|
+
this.removeVolumePrimitive();
|
|
22476
|
+
|
|
22477
|
+
if (this._currentVolumePosition) {
|
|
22478
|
+
let layerConfig = JSON.parse(JSON.stringify(this._windySlicingLayerconfig));
|
|
22479
|
+
this.windySlicingSurfaceSection(this._currentVolumePosition, Object.assign(layerConfig, {
|
|
22480
|
+
zValues: val
|
|
22481
|
+
}));
|
|
22482
|
+
}
|
|
22483
|
+
|
|
22484
|
+
break;
|
|
22485
|
+
|
|
22953
22486
|
case "destroy":
|
|
22954
22487
|
this.destroy();
|
|
22955
22488
|
break;
|
|
@@ -22961,7 +22494,7 @@ class WindySlicingViewModel {
|
|
|
22961
22494
|
|
|
22962
22495
|
|
|
22963
22496
|
setEnableLayeringVisible() {
|
|
22964
|
-
let zValues = this._windySlicingLayerconfig?.
|
|
22497
|
+
let zValues = this._windySlicingLayerconfig?.zValues;
|
|
22965
22498
|
let zVisibles = [];
|
|
22966
22499
|
|
|
22967
22500
|
if (this._options?.enableLayering) {
|
|
@@ -22973,7 +22506,7 @@ class WindySlicingViewModel {
|
|
|
22973
22506
|
}
|
|
22974
22507
|
}
|
|
22975
22508
|
|
|
22976
|
-
this._volumePrimitive.updateVisibles(this.
|
|
22509
|
+
this._volumePrimitive.updateVisibles(this._windySlicingLayerconfig.unit == 'hpa' ? zVisibles.reverse() : zVisibles);
|
|
22977
22510
|
} else {
|
|
22978
22511
|
for (let i = zValues.length; i > 0; i--) {
|
|
22979
22512
|
zVisibles.push(false);
|
|
@@ -22999,16 +22532,41 @@ class WindySlicingViewModel {
|
|
|
22999
22532
|
console.warn('未找到匹配的气象剖切图层配置');
|
|
23000
22533
|
}
|
|
23001
22534
|
|
|
23002
|
-
|
|
22535
|
+
this._windySlicingLayerconfig.groups = this._layerManager._windyViewModel?._PRODUCT_CONFIG[this._windySlicingLayerconfig?.params?.productType]?.groups ?? [];
|
|
22536
|
+
this._windySlicingLayerconfig.colors = this._layerManager._windyViewModel?._PRODUCT_CONFIG[this._windySlicingLayerconfig?.params?.productType]?.colors ?? [];
|
|
22537
|
+
this._windySlicingLayerconfig.ranges = this._layerManager._windyViewModel?._PRODUCT_CONFIG[this._windySlicingLayerconfig?.params?.productType]?.ranges ?? [];
|
|
22538
|
+
this._windySlicingLayerconfig.unit = "m";
|
|
23003
22539
|
|
|
23004
|
-
if (groups.includes("AIR_PRESSURE")) {
|
|
23005
|
-
this.
|
|
22540
|
+
if (this._windySlicingLayerconfig.groups.includes("AIR_PRESSURE")) {
|
|
22541
|
+
this._windySlicingLayerconfig.unit = "hpa";
|
|
23006
22542
|
}
|
|
23007
22543
|
|
|
23008
|
-
this.
|
|
23009
|
-
this.callbackParams && this.callbackParams("
|
|
22544
|
+
this._windySlicingLayerconfig.zValues = this._windySlicingLayerconfig?.zValues ?? this._windySlicingLayerconfig?.params?.zValues ?? [];
|
|
22545
|
+
this.callbackParams && this.callbackParams("slicingLayerConfig", this._windySlicingLayerconfig);
|
|
23010
22546
|
return this._windySlicingLayerconfig;
|
|
23011
|
-
}
|
|
22547
|
+
} // 清除剖切分析实例
|
|
22548
|
+
|
|
22549
|
+
|
|
22550
|
+
removeVolumePrimitive() {
|
|
22551
|
+
if (this._volumePrimitive) {
|
|
22552
|
+
this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
22553
|
+
|
|
22554
|
+
this._volumePrimitive = null;
|
|
22555
|
+
}
|
|
22556
|
+
|
|
22557
|
+
if (this._volumePrimitive1) {
|
|
22558
|
+
this._viewer.scene.primitives.remove(this._volumePrimitive1);
|
|
22559
|
+
|
|
22560
|
+
this._volumePrimitive1 = null;
|
|
22561
|
+
}
|
|
22562
|
+
|
|
22563
|
+
if (this._volumePrimitive2) {
|
|
22564
|
+
this._viewer.scene.primitives.remove(this._volumePrimitive2);
|
|
22565
|
+
|
|
22566
|
+
this._volumePrimitive2 = null;
|
|
22567
|
+
}
|
|
22568
|
+
} // 清除左右鼠标点击事件及弹框
|
|
22569
|
+
|
|
23012
22570
|
|
|
23013
22571
|
removeInputAction() {
|
|
23014
22572
|
if (this._windySlicingPolylineHandler) {
|
|
@@ -23074,13 +22632,7 @@ class WindySlicingViewModel {
|
|
|
23074
22632
|
let that = this;
|
|
23075
22633
|
let X = window.Cesium.Math.toDegrees(cartographic.longitude);
|
|
23076
22634
|
let Y = window.Cesium.Math.toDegrees(cartographic.latitude);
|
|
23077
|
-
let
|
|
23078
|
-
let unit = 'm';
|
|
23079
|
-
|
|
23080
|
-
if (groups.includes("AIR_PRESSURE")) {
|
|
23081
|
-
unit = "hpa";
|
|
23082
|
-
}
|
|
23083
|
-
|
|
22635
|
+
let unit = this._windySlicingLayerconfig.unit;
|
|
23084
22636
|
let data = {
|
|
23085
22637
|
"collectionName": that._windySlicingLayerconfig?.params?.layer,
|
|
23086
22638
|
"point": {
|
|
@@ -23168,13 +22720,11 @@ class WindySlicingViewModel {
|
|
|
23168
22720
|
} // 重构剖切参数
|
|
23169
22721
|
|
|
23170
22722
|
|
|
23171
|
-
getSlicingParams(position) {
|
|
22723
|
+
getSlicingParams(position, params) {
|
|
23172
22724
|
this._currentVolumePosition = position;
|
|
23173
22725
|
if (!this._windySlicingLayerconfig) return;
|
|
23174
|
-
let
|
|
23175
|
-
|
|
23176
|
-
let colors = proConfig[this._windySlicingLayerconfig?.params?.productType]?.colors;
|
|
23177
|
-
let ranges = proConfig[this._windySlicingLayerconfig?.params?.productType]?.ranges;
|
|
22726
|
+
let colors = this._windySlicingLayerconfig?.colors ?? [];
|
|
22727
|
+
let ranges = this._windySlicingLayerconfig?.ranges ?? [];
|
|
23178
22728
|
let img = colors && this.generateImage(colors);
|
|
23179
22729
|
if (!img) return;
|
|
23180
22730
|
this._currentVolumeOption = {
|
|
@@ -23183,21 +22733,14 @@ class WindySlicingViewModel {
|
|
|
23183
22733
|
collectionName: this._windySlicingLayerconfig?.params?.layer,
|
|
23184
22734
|
image: img,
|
|
23185
22735
|
// 高度偏移
|
|
23186
|
-
offset:
|
|
22736
|
+
offset: 10000,
|
|
23187
22737
|
// 高度放大比例
|
|
23188
|
-
scale: this.
|
|
23189
|
-
unit: this.
|
|
22738
|
+
scale: this._windySlicingLayerconfig.unit == 'hpa' ? 18 : 300,
|
|
22739
|
+
unit: this._windySlicingLayerconfig.unit,
|
|
23190
22740
|
attrRange: [ranges[0], ranges[ranges.length - 1]],
|
|
23191
22741
|
varName: this._windySlicingLayerconfig?.params?.varNames
|
|
23192
22742
|
};
|
|
23193
|
-
|
|
23194
|
-
if (this._volumePrimitive) {
|
|
23195
|
-
this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
23196
|
-
|
|
23197
|
-
this._volumePrimitive = null;
|
|
23198
|
-
}
|
|
23199
|
-
|
|
23200
|
-
this._volumePrimitive = new Cesium.Kq3dGridVolumeProvider(this._currentVolumeOption);
|
|
22743
|
+
return new Cesium.Kq3dGridVolumeProvider(Object.assign({}, this._currentVolumeOption, params || {}));
|
|
23201
22744
|
}
|
|
23202
22745
|
/**
|
|
23203
22746
|
* 创建线剖切
|
|
@@ -23206,10 +22749,13 @@ class WindySlicingViewModel {
|
|
|
23206
22749
|
|
|
23207
22750
|
|
|
23208
22751
|
windySlicingPolylineSlicing(polyline) {
|
|
23209
|
-
this.getSlicingParams(polyline);
|
|
23210
|
-
|
|
23211
|
-
this._volumePrimitive
|
|
22752
|
+
this._volumePrimitive = this.getSlicingParams(polyline);
|
|
22753
|
+
let that = this;
|
|
22754
|
+
if (!this._volumePrimitive || !this._volumePrimitive.readyPromise) return;
|
|
23212
22755
|
|
|
22756
|
+
this._volumePrimitive.readyPromise.then(() => {
|
|
22757
|
+
that._volumePrimitive.showSection(polyline);
|
|
22758
|
+
});
|
|
23213
22759
|
|
|
23214
22760
|
this.setViewEntity(calculateBoundingBox(polyline)); // 核心计算方法
|
|
23215
22761
|
|
|
@@ -23240,17 +22786,169 @@ class WindySlicingViewModel {
|
|
|
23240
22786
|
}
|
|
23241
22787
|
}
|
|
23242
22788
|
/**
|
|
23243
|
-
*
|
|
22789
|
+
* 面剖切-面分层
|
|
23244
22790
|
* @param {Object} rect 矩形四至
|
|
23245
22791
|
*/
|
|
23246
22792
|
|
|
23247
22793
|
|
|
23248
22794
|
windySlicingRectangleSlicing(rect) {
|
|
23249
|
-
this.getSlicingParams(rect);
|
|
22795
|
+
this._volumePrimitive = this.getSlicingParams(rect);
|
|
22796
|
+
let that = this;
|
|
22797
|
+
if (!this._volumePrimitive || !this._volumePrimitive.readyPromise) return;
|
|
23250
22798
|
|
|
23251
|
-
this._volumePrimitive.
|
|
22799
|
+
this._volumePrimitive.readyPromise.then(() => {
|
|
22800
|
+
that._volumePrimitive.showSections(rect);
|
|
22801
|
+
});
|
|
23252
22802
|
|
|
23253
22803
|
this.setViewEntity(rect);
|
|
22804
|
+
}
|
|
22805
|
+
/**
|
|
22806
|
+
* 面剖切-面剖
|
|
22807
|
+
* @param {Object} rect 矩形四至
|
|
22808
|
+
*/
|
|
22809
|
+
|
|
22810
|
+
|
|
22811
|
+
windySlicingSurfaceSection(rect, data) {
|
|
22812
|
+
let options = {};
|
|
22813
|
+
let zValues = JSON.parse(JSON.stringify(data.zValues));
|
|
22814
|
+
|
|
22815
|
+
if (!zValues || zValues?.length == 0) {
|
|
22816
|
+
zValues = JSON.parse(JSON.stringify(data.ranges));
|
|
22817
|
+
}
|
|
22818
|
+
|
|
22819
|
+
let index = zValues.length - 1;
|
|
22820
|
+
|
|
22821
|
+
if (data.unit != 'hpa') {
|
|
22822
|
+
// options.isReverse = true;
|
|
22823
|
+
index = 0;
|
|
22824
|
+
zValues = zValues.sort((a, b) => a - b);
|
|
22825
|
+
} else {
|
|
22826
|
+
zValues = zValues.sort((a, b) => b - a);
|
|
22827
|
+
}
|
|
22828
|
+
|
|
22829
|
+
options.zValues = zValues;
|
|
22830
|
+
options.showAxis = true;
|
|
22831
|
+
this._volumePrimitive = this.getSlicingParams(rect, options);
|
|
22832
|
+
let that = this;
|
|
22833
|
+
if (!this._volumePrimitive || !this._volumePrimitive.readyPromise) return;
|
|
22834
|
+
|
|
22835
|
+
this._volumePrimitive.readyPromise.then(() => {
|
|
22836
|
+
if (typeof index != 'undefined') {
|
|
22837
|
+
that._volumePrimitive.showPolygonSection(rect, index);
|
|
22838
|
+
} else {
|
|
22839
|
+
that._volumePrimitive.showPolygonSection(rect);
|
|
22840
|
+
}
|
|
22841
|
+
});
|
|
22842
|
+
|
|
22843
|
+
let options1 = JSON.parse(JSON.stringify(options));
|
|
22844
|
+
this.volumelines = this.createXYVolume(this.getRectangle(rect));
|
|
22845
|
+
options1.showAxis = false;
|
|
22846
|
+
this._volumePrimitive1 = this.getSlicingParams(rect, options1);
|
|
22847
|
+
if (!this._volumePrimitive1 || !this._volumePrimitive1.readyPromise) return;
|
|
22848
|
+
|
|
22849
|
+
this._volumePrimitive1.readyPromise.then(() => {
|
|
22850
|
+
that._volumePrimitive1.showSection(that.volumelines?.volumeLine1);
|
|
22851
|
+
});
|
|
22852
|
+
|
|
22853
|
+
this._volumePrimitive2 = this.getSlicingParams(rect, options1);
|
|
22854
|
+
if (!this._volumePrimitive2 || !this._volumePrimitive2.readyPromise) return;
|
|
22855
|
+
|
|
22856
|
+
this._volumePrimitive2.readyPromise.then(() => {
|
|
22857
|
+
that._volumePrimitive2.showSection(that.volumelines?.volumeLine2);
|
|
22858
|
+
});
|
|
22859
|
+
|
|
22860
|
+
this.setViewEntity(rect);
|
|
22861
|
+
}
|
|
22862
|
+
|
|
22863
|
+
getRectangle(rect) {
|
|
22864
|
+
if (typeof rect == 'string') {
|
|
22865
|
+
rect = JSON.parse(rect);
|
|
22866
|
+
}
|
|
22867
|
+
|
|
22868
|
+
let rectangle = new Cesium.Rectangle(Cesium.Math.toRadians(rect.minX), Cesium.Math.toRadians(rect.minY), Cesium.Math.toRadians(rect.maxX), Cesium.Math.toRadians(rect.maxY));
|
|
22869
|
+
return rectangle;
|
|
22870
|
+
}
|
|
22871
|
+
|
|
22872
|
+
createXYVolume(rectangle) {
|
|
22873
|
+
// 获取矩形的四个角点
|
|
22874
|
+
var southwest = Cesium.Rectangle.southwest(rectangle); // 西南角经纬度
|
|
22875
|
+
|
|
22876
|
+
var northwest = Cesium.Rectangle.northwest(rectangle); // 西北角经纬度
|
|
22877
|
+
|
|
22878
|
+
var northeast = Cesium.Rectangle.northeast(rectangle); // 东北角经纬度
|
|
22879
|
+
|
|
22880
|
+
var southeast = Cesium.Rectangle.southeast(rectangle); // 东南角经纬度
|
|
22881
|
+
|
|
22882
|
+
let line1 = [];
|
|
22883
|
+
let line2 = [];
|
|
22884
|
+
let line3 = [];
|
|
22885
|
+
let line4 = []; // 上线
|
|
22886
|
+
|
|
22887
|
+
line1.push({
|
|
22888
|
+
longitude: northeast.longitude / Math.PI * 180,
|
|
22889
|
+
latitude: northeast.latitude / Math.PI * 180
|
|
22890
|
+
});
|
|
22891
|
+
line1.push({
|
|
22892
|
+
longitude: northwest.longitude / Math.PI * 180,
|
|
22893
|
+
latitude: northwest.latitude / Math.PI * 180
|
|
22894
|
+
}); // 下线
|
|
22895
|
+
|
|
22896
|
+
line2.push({
|
|
22897
|
+
longitude: southeast.longitude / Math.PI * 180,
|
|
22898
|
+
latitude: southeast.latitude / Math.PI * 180
|
|
22899
|
+
});
|
|
22900
|
+
line2.push({
|
|
22901
|
+
longitude: southwest.longitude / Math.PI * 180,
|
|
22902
|
+
latitude: southwest.latitude / Math.PI * 180
|
|
22903
|
+
}); // 左线
|
|
22904
|
+
|
|
22905
|
+
line3.push({
|
|
22906
|
+
longitude: northeast.longitude / Math.PI * 180,
|
|
22907
|
+
latitude: northeast.latitude / Math.PI * 180
|
|
22908
|
+
});
|
|
22909
|
+
line3.push({
|
|
22910
|
+
longitude: southeast.longitude / Math.PI * 180,
|
|
22911
|
+
latitude: southeast.latitude / Math.PI * 180
|
|
22912
|
+
}); // 右线
|
|
22913
|
+
|
|
22914
|
+
line4.push({
|
|
22915
|
+
longitude: northwest.longitude / Math.PI * 180,
|
|
22916
|
+
latitude: northwest.latitude / Math.PI * 180
|
|
22917
|
+
});
|
|
22918
|
+
line4.push({
|
|
22919
|
+
longitude: southwest.longitude / Math.PI * 180,
|
|
22920
|
+
latitude: southwest.latitude / Math.PI * 180
|
|
22921
|
+
});
|
|
22922
|
+
let volumeLine1 = [],
|
|
22923
|
+
volumeLine2 = [];
|
|
22924
|
+
volumeLine1.push(this.getLineCenter(line1[0], line1[1]));
|
|
22925
|
+
volumeLine1.push(this.getLineCenter(line2[0], line2[1]));
|
|
22926
|
+
volumeLine2.push(this.getLineCenter(line3[0], line3[1]));
|
|
22927
|
+
volumeLine2.push(this.getLineCenter(line4[0], line4[1]));
|
|
22928
|
+
return {
|
|
22929
|
+
line1,
|
|
22930
|
+
line2,
|
|
22931
|
+
line3,
|
|
22932
|
+
line4,
|
|
22933
|
+
volumeLine1,
|
|
22934
|
+
volumeLine2
|
|
22935
|
+
};
|
|
22936
|
+
} // 获取线段中心点
|
|
22937
|
+
|
|
22938
|
+
|
|
22939
|
+
getLineCenter(startPoint, endPoint) {
|
|
22940
|
+
startPoint = Cesium.Cartesian3.fromDegrees(startPoint.longitude, startPoint.latitude);
|
|
22941
|
+
endPoint = Cesium.Cartesian3.fromDegrees(endPoint.longitude, endPoint.latitude); // 计算线段中心点
|
|
22942
|
+
|
|
22943
|
+
let centerPoint = Cesium.Cartesian3.add(startPoint, endPoint, new Cesium.Cartesian3());
|
|
22944
|
+
centerPoint = Cesium.Cartesian3.divideByScalar(centerPoint, 2.0, new Cesium.Cartesian3()); // 将中心点转换为经纬度
|
|
22945
|
+
|
|
22946
|
+
let centerPointCartographic = Cesium.Cartographic.fromCartesian(centerPoint);
|
|
22947
|
+
let centerPointLatLon = {
|
|
22948
|
+
y: Cesium.Math.toDegrees(centerPointCartographic.latitude),
|
|
22949
|
+
x: Cesium.Math.toDegrees(centerPointCartographic.longitude)
|
|
22950
|
+
};
|
|
22951
|
+
return centerPointLatLon;
|
|
23254
22952
|
} // 体剖切
|
|
23255
22953
|
|
|
23256
22954
|
|
|
@@ -23260,15 +22958,14 @@ class WindySlicingViewModel {
|
|
|
23260
22958
|
return;
|
|
23261
22959
|
}
|
|
23262
22960
|
|
|
23263
|
-
if (this._volumePrimitive) {
|
|
23264
|
-
this._viewer.scene.primitives.remove(this._volumePrimitive);
|
|
23265
|
-
|
|
23266
|
-
this._volumePrimitive = null;
|
|
23267
|
-
}
|
|
23268
|
-
|
|
23269
22961
|
if (this._currentVolumeOption && this._currentVolumePosition) {
|
|
23270
|
-
this._volumePrimitive = new Cesium.Kq3dGridVoxelsSingleProviderExt(this.
|
|
23271
|
-
this
|
|
22962
|
+
this._volumePrimitive = new Cesium.Kq3dGridVoxelsSingleProviderExt(this._currentVolumeOption);
|
|
22963
|
+
let that = this;
|
|
22964
|
+
if (!this._volumePrimitive || !this._volumePrimitive.readyPromise) return;
|
|
22965
|
+
|
|
22966
|
+
this._volumePrimitive.readyPromise.then(() => {
|
|
22967
|
+
that._volumePrimitive.showVoxels(that._currentVolumePosition);
|
|
22968
|
+
});
|
|
23272
22969
|
}
|
|
23273
22970
|
} // 设置entity视角缩放
|
|
23274
22971
|
|
|
@@ -23325,15 +23022,17 @@ class WindySlicingViewModel {
|
|
|
23325
23022
|
|
|
23326
23023
|
|
|
23327
23024
|
clear() {
|
|
23328
|
-
|
|
23025
|
+
this.removeVolumePrimitive();
|
|
23329
23026
|
this.removeInputAction();
|
|
23330
23027
|
this._isDrawPolyline = false;
|
|
23331
|
-
this._viewer.scene.globe.showGroundAtmosphere = true;
|
|
23332
|
-
this._viewer.scene.screenSpaceCameraController.maximumZoomDistance = Number.POSITIVE_INFINITY;
|
|
23333
23028
|
|
|
23334
23029
|
this._windySlicingDrawManager.stopDraw();
|
|
23335
23030
|
|
|
23336
23031
|
this._windySlicingDrawManager.clear();
|
|
23032
|
+
|
|
23033
|
+
this._currentVolumePosition = null;
|
|
23034
|
+
this._currentVolumeOption = null;
|
|
23035
|
+
this.volumelines = null;
|
|
23337
23036
|
} //销毁
|
|
23338
23037
|
|
|
23339
23038
|
|
|
@@ -23346,6 +23045,9 @@ class WindySlicingViewModel {
|
|
|
23346
23045
|
this._windySlicingRemoveEventListener && this._windySlicingRemoveEventListener();
|
|
23347
23046
|
this._windySlicingRemoveEventListener = null;
|
|
23348
23047
|
}
|
|
23048
|
+
|
|
23049
|
+
this._viewer.scene.globe.showGroundAtmosphere = true;
|
|
23050
|
+
this._viewer.scene.screenSpaceCameraController.maximumZoomDistance = Number.POSITIVE_INFINITY;
|
|
23349
23051
|
}
|
|
23350
23052
|
|
|
23351
23053
|
}
|
|
@@ -23444,23 +23146,37 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
23444
23146
|
maxLayerScale: props.settingParams?.maxLayerScale ?? 300,
|
|
23445
23147
|
// 分层缩放最大值
|
|
23446
23148
|
altitudeControl: props.settingParams?.altitudeControl ?? 50,
|
|
23149
|
+
// 高度控制
|
|
23150
|
+
maxAltitudeControl: props.settingParams?.maxAltitudeControl ?? 100,
|
|
23151
|
+
// 高度控制
|
|
23447
23152
|
enableLongSection: props.settingParams?.enableLongSection ?? true,
|
|
23448
23153
|
// 是否启动经度剖面
|
|
23449
23154
|
longSectionValue: props.settingParams?.longSectionValue ?? 50,
|
|
23450
23155
|
// 经度剖面值
|
|
23156
|
+
longSectionValueStep: 1,
|
|
23157
|
+
longSectionValueMin: 1,
|
|
23158
|
+
longSectionValueMax: 10,
|
|
23451
23159
|
enableLatSection: props.settingParams?.enableLatSection ?? true,
|
|
23452
23160
|
// 是否启动纬度剖面
|
|
23453
23161
|
latSectionValue: props.settingParams?.latSectionValue ?? 50,
|
|
23454
23162
|
// 纬度剖面值
|
|
23163
|
+
latSectionValueStep: 1,
|
|
23164
|
+
latSectionValueMin: 1,
|
|
23165
|
+
latSectionValueMax: 10,
|
|
23455
23166
|
enableHeightSection: props.settingParams?.enableHeightSection ?? true,
|
|
23456
23167
|
// 高度剖面
|
|
23168
|
+
heightSectionValueMax: 10,
|
|
23169
|
+
//高度剖面最大值
|
|
23457
23170
|
heightSectionValue: props.settingParams?.heightSectionValue ?? 50,
|
|
23458
23171
|
// 等值面高度
|
|
23459
23172
|
bodyDissectionAxis: props.settingParams?.bodyDissectionAxis ?? true,
|
|
23460
23173
|
// 体剖切刻度线
|
|
23461
23174
|
bodyDissectionAlpha: props.settingParams?.bodyDissectionAlpha ?? 1 //体剖切透明度
|
|
23462
23175
|
|
|
23463
|
-
});
|
|
23176
|
+
}); // 创建深度复制
|
|
23177
|
+
|
|
23178
|
+
let formItemDef = JSON.parse(JSON.stringify(formItem));
|
|
23179
|
+
delete formItemDef.collapseValue;
|
|
23464
23180
|
let viewModel = null; // 组件容器Ref
|
|
23465
23181
|
|
|
23466
23182
|
let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
|
|
@@ -23517,8 +23233,8 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
23517
23233
|
|
|
23518
23234
|
|
|
23519
23235
|
const handleWindyTypeChange = data => {
|
|
23520
|
-
console.log(data);
|
|
23521
23236
|
clear();
|
|
23237
|
+
Object.assign(formItem, formItemDef);
|
|
23522
23238
|
|
|
23523
23239
|
if (data?.windyType == "exit") {
|
|
23524
23240
|
showWindySlicing.value = false;
|
|
@@ -23537,14 +23253,19 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
23537
23253
|
showSlicingSetting.value = val;
|
|
23538
23254
|
break;
|
|
23539
23255
|
|
|
23540
|
-
case "
|
|
23541
|
-
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23256
|
+
case "slicingLayerConfig":
|
|
23257
|
+
if (!Array.isArray(val.zValues) || val.zValues.length === 0) {
|
|
23258
|
+
showWindySlicing.value = false;
|
|
23259
|
+
} else {
|
|
23260
|
+
showWindySlicing.value = true;
|
|
23261
|
+
enableLayerings.value = val.zValues;
|
|
23262
|
+
formItem.enableLayerings = val.zValues;
|
|
23263
|
+
viewModel._options["enableLayerings"] = val.zValues;
|
|
23264
|
+
formItem.altitudeControl = val.zValues.length;
|
|
23265
|
+
formItem.maxAltitudeControl = val.zValues.length;
|
|
23266
|
+
}
|
|
23545
23267
|
|
|
23546
|
-
|
|
23547
|
-
unit.value = val;
|
|
23268
|
+
unit.value = val.unit;
|
|
23548
23269
|
break;
|
|
23549
23270
|
|
|
23550
23271
|
default:
|
|
@@ -23561,33 +23282,67 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
23561
23282
|
formItem.mode = mode;
|
|
23562
23283
|
viewModel._options.mode = formItem.mode;
|
|
23563
23284
|
viewModel && viewModel.paramsChanged("mode");
|
|
23285
|
+
|
|
23286
|
+
if (mode == "delete") {
|
|
23287
|
+
Object.assign(formItem, formItemDef);
|
|
23288
|
+
}
|
|
23564
23289
|
}
|
|
23565
23290
|
}
|
|
23566
23291
|
|
|
23567
23292
|
function paramsChanged(key) {
|
|
23568
|
-
if (!viewModel) return;
|
|
23293
|
+
if (!viewModel) return;
|
|
23294
|
+
viewModel._options[key] = formItem[key]; // 处理 slicingType 的特殊逻辑
|
|
23569
23295
|
|
|
23570
|
-
|
|
23571
|
-
viewModel.paramsChanged?.(key); // 使用可选链调用方法
|
|
23572
|
-
// 处理 slicingType 的特殊逻辑
|
|
23296
|
+
let defaultValues = null;
|
|
23573
23297
|
|
|
23574
|
-
|
|
23575
|
-
|
|
23576
|
-
|
|
23577
|
-
|
|
23578
|
-
|
|
23579
|
-
|
|
23298
|
+
switch (key) {
|
|
23299
|
+
case "slicingType":
|
|
23300
|
+
const VALID_SLICING_TYPES = {
|
|
23301
|
+
1: "1",
|
|
23302
|
+
3: "3"
|
|
23303
|
+
};
|
|
23304
|
+
const newStyleType = VALID_SLICING_TYPES[formItem.slicingType];
|
|
23580
23305
|
|
|
23581
|
-
|
|
23582
|
-
|
|
23583
|
-
|
|
23584
|
-
|
|
23306
|
+
if (newStyleType) {
|
|
23307
|
+
viewModel._options.styleType = formItem.styleType = newStyleType;
|
|
23308
|
+
}
|
|
23309
|
+
|
|
23310
|
+
break;
|
|
23311
|
+
|
|
23312
|
+
case "altitudeControl":
|
|
23313
|
+
let gdzValues = enableLayerings.value.slice(0, formItem.altitudeControl);
|
|
23314
|
+
formItem.heightSectionValueMax = gdzValues.length;
|
|
23315
|
+
defaultValues = gdzValues;
|
|
23316
|
+
if (!viewModel?.volumelines) return;
|
|
23317
|
+
let jdValue = Math.abs(viewModel?.volumelines.line1[0].longitude - viewModel?.volumelines.line1[1].longitude);
|
|
23318
|
+
jdValue = jdValue.toFixed(3);
|
|
23319
|
+
formItem.longSectionValueStep = jdValue / 100;
|
|
23320
|
+
formItem.longSectionValueMin = -(jdValue / 2);
|
|
23321
|
+
formItem.longSectionValueMax = jdValue / 2;
|
|
23322
|
+
formItem.longSectionValue = 0;
|
|
23323
|
+
let wdValue = Math.abs(viewModel?.volumelines.line4[0].latitude - viewModel?.volumelines.line4[1].latitude);
|
|
23324
|
+
wdValue = wdValue.toFixed(3);
|
|
23325
|
+
formItem.latSectionValueStep = wdValue / 100;
|
|
23326
|
+
formItem.latSectionValueMin = -(wdValue / 2);
|
|
23327
|
+
formItem.latSectionValueMax = wdValue / 2;
|
|
23328
|
+
formItem.latSectionValue = 0;
|
|
23329
|
+
break;
|
|
23330
|
+
|
|
23331
|
+
default:
|
|
23332
|
+
break;
|
|
23585
23333
|
}
|
|
23334
|
+
|
|
23335
|
+
viewModel.paramsChanged?.(key, defaultValues); // 使用可选链调用方法
|
|
23586
23336
|
}
|
|
23587
23337
|
|
|
23588
23338
|
function clear() {
|
|
23589
23339
|
showSlicingSetting.value = false;
|
|
23590
23340
|
viewModel && viewModel.clear();
|
|
23341
|
+
} // 显示提示信息
|
|
23342
|
+
|
|
23343
|
+
|
|
23344
|
+
function formatTooltip(val) {
|
|
23345
|
+
return enableLayerings.value[val - 1] + unit.value;
|
|
23591
23346
|
} // 销毁
|
|
23592
23347
|
|
|
23593
23348
|
|
|
@@ -23990,14 +23745,14 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
23990
23745
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_slider, {
|
|
23991
23746
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).altitudeControl,
|
|
23992
23747
|
"onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).altitudeControl = $event),
|
|
23993
|
-
"show-tooltip": false,
|
|
23994
23748
|
step: 1,
|
|
23995
|
-
min:
|
|
23996
|
-
|
|
23749
|
+
min: 1,
|
|
23750
|
+
"format-tooltip": formatTooltip,
|
|
23751
|
+
max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).maxAltitudeControl,
|
|
23997
23752
|
onChange: _cache[19] || (_cache[19] = $event => paramsChanged('altitudeControl'))
|
|
23998
23753
|
}, null, 8
|
|
23999
23754
|
/* PROPS */
|
|
24000
|
-
, ["modelValue"])]),
|
|
23755
|
+
, ["modelValue", "max"])]),
|
|
24001
23756
|
_: 1
|
|
24002
23757
|
/* STABLE */
|
|
24003
23758
|
|
|
@@ -24007,14 +23762,14 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
24007
23762
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_input_number, {
|
|
24008
23763
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).altitudeControl,
|
|
24009
23764
|
"onUpdate:modelValue": _cache[20] || (_cache[20] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).altitudeControl = $event),
|
|
24010
|
-
min:
|
|
24011
|
-
max:
|
|
23765
|
+
min: 1,
|
|
23766
|
+
max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).maxAltitudeControl,
|
|
24012
23767
|
step: 1,
|
|
24013
23768
|
"controls-position": "right",
|
|
24014
23769
|
onChange: _cache[21] || (_cache[21] = $event => paramsChanged('altitudeControl'))
|
|
24015
23770
|
}, null, 8
|
|
24016
23771
|
/* PROPS */
|
|
24017
|
-
, ["modelValue"])]),
|
|
23772
|
+
, ["modelValue", "max"])]),
|
|
24018
23773
|
_: 1
|
|
24019
23774
|
/* STABLE */
|
|
24020
23775
|
|
|
@@ -24071,13 +23826,13 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
24071
23826
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValue,
|
|
24072
23827
|
"onUpdate:modelValue": _cache[23] || (_cache[23] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValue = $event),
|
|
24073
23828
|
"show-tooltip": false,
|
|
24074
|
-
step:
|
|
24075
|
-
min: 0,
|
|
24076
|
-
max:
|
|
23829
|
+
step: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValueStep,
|
|
23830
|
+
min: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValueMin,
|
|
23831
|
+
max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValueMax,
|
|
24077
23832
|
onChange: _cache[24] || (_cache[24] = $event => paramsChanged('longSectionValue'))
|
|
24078
23833
|
}, null, 8
|
|
24079
23834
|
/* PROPS */
|
|
24080
|
-
, ["modelValue"])]),
|
|
23835
|
+
, ["modelValue", "step", "min", "max"])]),
|
|
24081
23836
|
_: 1
|
|
24082
23837
|
/* STABLE */
|
|
24083
23838
|
|
|
@@ -24087,14 +23842,14 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
24087
23842
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_input_number, {
|
|
24088
23843
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValue,
|
|
24089
23844
|
"onUpdate:modelValue": _cache[25] || (_cache[25] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValue = $event),
|
|
24090
|
-
|
|
24091
|
-
|
|
24092
|
-
|
|
23845
|
+
step: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValueStep,
|
|
23846
|
+
min: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValueMin,
|
|
23847
|
+
max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).longSectionValueMax,
|
|
24093
23848
|
"controls-position": "right",
|
|
24094
23849
|
onChange: _cache[26] || (_cache[26] = $event => paramsChanged('longSectionValue'))
|
|
24095
23850
|
}, null, 8
|
|
24096
23851
|
/* PROPS */
|
|
24097
|
-
, ["modelValue"])]),
|
|
23852
|
+
, ["modelValue", "step", "min", "max"])]),
|
|
24098
23853
|
_: 1
|
|
24099
23854
|
/* STABLE */
|
|
24100
23855
|
|
|
@@ -24151,13 +23906,13 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
24151
23906
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValue,
|
|
24152
23907
|
"onUpdate:modelValue": _cache[28] || (_cache[28] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValue = $event),
|
|
24153
23908
|
"show-tooltip": false,
|
|
24154
|
-
step:
|
|
24155
|
-
min: 0,
|
|
24156
|
-
max:
|
|
23909
|
+
step: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValueStep,
|
|
23910
|
+
min: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValueMin,
|
|
23911
|
+
max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValueMax,
|
|
24157
23912
|
onChange: _cache[29] || (_cache[29] = $event => paramsChanged('latSectionValue'))
|
|
24158
23913
|
}, null, 8
|
|
24159
23914
|
/* PROPS */
|
|
24160
|
-
, ["modelValue"])]),
|
|
23915
|
+
, ["modelValue", "step", "min", "max"])]),
|
|
24161
23916
|
_: 1
|
|
24162
23917
|
/* STABLE */
|
|
24163
23918
|
|
|
@@ -24167,14 +23922,14 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
24167
23922
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_input_number, {
|
|
24168
23923
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValue,
|
|
24169
23924
|
"onUpdate:modelValue": _cache[30] || (_cache[30] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValue = $event),
|
|
24170
|
-
|
|
24171
|
-
|
|
24172
|
-
|
|
23925
|
+
step: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValueStep,
|
|
23926
|
+
min: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValueMin,
|
|
23927
|
+
max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).latSectionValueMax,
|
|
24173
23928
|
"controls-position": "right",
|
|
24174
23929
|
onChange: _cache[31] || (_cache[31] = $event => paramsChanged('latSectionValue'))
|
|
24175
23930
|
}, null, 8
|
|
24176
23931
|
/* PROPS */
|
|
24177
|
-
, ["modelValue"])]),
|
|
23932
|
+
, ["modelValue", "step", "min", "max"])]),
|
|
24178
23933
|
_: 1
|
|
24179
23934
|
/* STABLE */
|
|
24180
23935
|
|
|
@@ -24233,11 +23988,11 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
24233
23988
|
"show-tooltip": false,
|
|
24234
23989
|
step: 1,
|
|
24235
23990
|
min: 0,
|
|
24236
|
-
max:
|
|
23991
|
+
max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).heightSectionValueMax,
|
|
24237
23992
|
onChange: _cache[34] || (_cache[34] = $event => paramsChanged('heightSectionValue'))
|
|
24238
23993
|
}, null, 8
|
|
24239
23994
|
/* PROPS */
|
|
24240
|
-
, ["modelValue"])]),
|
|
23995
|
+
, ["modelValue", "max"])]),
|
|
24241
23996
|
_: 1
|
|
24242
23997
|
/* STABLE */
|
|
24243
23998
|
|
|
@@ -24247,14 +24002,14 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
24247
24002
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_input_number, {
|
|
24248
24003
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).heightSectionValue,
|
|
24249
24004
|
"onUpdate:modelValue": _cache[35] || (_cache[35] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).heightSectionValue = $event),
|
|
24250
|
-
min: 0,
|
|
24251
|
-
max: 100,
|
|
24252
24005
|
step: 1,
|
|
24006
|
+
min: 0,
|
|
24007
|
+
max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).heightSectionValueMax,
|
|
24253
24008
|
"controls-position": "right",
|
|
24254
24009
|
onChange: _cache[36] || (_cache[36] = $event => paramsChanged('heightSectionValue'))
|
|
24255
24010
|
}, null, 8
|
|
24256
24011
|
/* PROPS */
|
|
24257
|
-
, ["modelValue"])]),
|
|
24012
|
+
, ["modelValue", "max"])]),
|
|
24258
24013
|
_: 1
|
|
24259
24014
|
/* STABLE */
|
|
24260
24015
|
|
|
@@ -24274,7 +24029,7 @@ const WindySlicingvue_type_script_setup_true_lang_js_default_ = {
|
|
|
24274
24029
|
|
|
24275
24030
|
})], 64
|
|
24276
24031
|
/* STABLE_FRAGMENT */
|
|
24277
|
-
)) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("
|
|
24032
|
+
)) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" 体剖切设置 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).slicingType === 3 ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, {
|
|
24278
24033
|
key: 2
|
|
24279
24034
|
}, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
|
|
24280
24035
|
class: "rowclass"
|
|
@@ -24602,10 +24357,6 @@ class TyphoonTracViewModel {
|
|
|
24602
24357
|
|
|
24603
24358
|
_defineProperty(this, "divPoint", null);
|
|
24604
24359
|
|
|
24605
|
-
_defineProperty(this, "warningLine_24", null);
|
|
24606
|
-
|
|
24607
|
-
_defineProperty(this, "warningLine_48", null);
|
|
24608
|
-
|
|
24609
24360
|
_defineProperty(this, "eventListener", null);
|
|
24610
24361
|
|
|
24611
24362
|
_defineProperty(this, "eventListener2", null);
|
|
@@ -24901,6 +24652,25 @@ class TyphoonTracViewModel {
|
|
|
24901
24652
|
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
24902
24653
|
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
24903
24654
|
}
|
|
24655
|
+
});
|
|
24656
|
+
this.warningText_24 = this._viewer.entities.add({
|
|
24657
|
+
rectangle: {
|
|
24658
|
+
coordinates: Cesium.Rectangle.fromDegrees(124.81268223770111, 28.97726827231024, 129.27365416588438, 29.506550516414443),
|
|
24659
|
+
classificationType: Cesium.ClassificationType.BOTH,
|
|
24660
|
+
material: new Cesium.Kq3dTextMaterial({
|
|
24661
|
+
text: '24小时警戒线',
|
|
24662
|
+
textStyles: {
|
|
24663
|
+
font: "80px sans-serif",
|
|
24664
|
+
fill: true,
|
|
24665
|
+
fillColor: Cesium.Color.fromCssColorString('#828314'),
|
|
24666
|
+
stroke: false,
|
|
24667
|
+
backgroundColor: new Cesium.Color(0, 0, 0, 0),
|
|
24668
|
+
padding: 5
|
|
24669
|
+
}
|
|
24670
|
+
}),
|
|
24671
|
+
rotation: Cesium.Math.toRadians(90),
|
|
24672
|
+
stRotation: Cesium.Math.toRadians(90)
|
|
24673
|
+
}
|
|
24904
24674
|
}); // 48小时警戒线
|
|
24905
24675
|
|
|
24906
24676
|
this.warningLine_48 = this._viewer.entities.add({
|
|
@@ -24916,6 +24686,25 @@ class TyphoonTracViewModel {
|
|
|
24916
24686
|
clampToGround: true
|
|
24917
24687
|
}
|
|
24918
24688
|
});
|
|
24689
|
+
this.warningText_48 = this._viewer.entities.add({
|
|
24690
|
+
rectangle: {
|
|
24691
|
+
coordinates: Cesium.Rectangle.fromDegrees(130.11221856757763, 29.95719074491648, 134.07046985436628, 30.639828156283777),
|
|
24692
|
+
classificationType: Cesium.ClassificationType.BOTH,
|
|
24693
|
+
material: new Cesium.Kq3dTextMaterial({
|
|
24694
|
+
text: '48小时警戒线',
|
|
24695
|
+
textStyles: {
|
|
24696
|
+
font: "60px sans-serif",
|
|
24697
|
+
fill: true,
|
|
24698
|
+
fillColor: Cesium.Color.fromCssColorString('#4dba3d'),
|
|
24699
|
+
stroke: false,
|
|
24700
|
+
backgroundColor: new Cesium.Color(0, 0, 0, 0),
|
|
24701
|
+
padding: 5
|
|
24702
|
+
}
|
|
24703
|
+
}),
|
|
24704
|
+
rotation: Cesium.Math.toRadians(90),
|
|
24705
|
+
stRotation: Cesium.Math.toRadians(90)
|
|
24706
|
+
}
|
|
24707
|
+
});
|
|
24919
24708
|
}
|
|
24920
24709
|
|
|
24921
24710
|
remove(tfid) {
|
|
@@ -24975,10 +24764,10 @@ class TyphoonTracViewModel {
|
|
|
24975
24764
|
|
|
24976
24765
|
|
|
24977
24766
|
destroy() {
|
|
24978
|
-
this._viewer.entities.remove(this.warningLine_48);
|
|
24979
|
-
|
|
24980
|
-
this._viewer.entities.remove(this.warningLine_24);
|
|
24981
|
-
|
|
24767
|
+
this.warningLine_48 && this._viewer.entities.remove(this.warningLine_48);
|
|
24768
|
+
this.warningText_48 && this._viewer.entities.remove(this.warningText_48);
|
|
24769
|
+
this.warningLine_24 && this._viewer.entities.remove(this.warningLine_24);
|
|
24770
|
+
this.warningText_24 && this._viewer.entities.remove(this.warningText_24);
|
|
24982
24771
|
this.clear();
|
|
24983
24772
|
}
|
|
24984
24773
|
|
|
@@ -25166,7 +24955,6 @@ const TyphoonTracvue_type_script_setup_true_lang_js_default_ = {
|
|
|
25166
24955
|
if (scenceView) {
|
|
25167
24956
|
viewModel = new TyphoonTracViewModel(scenceView);
|
|
25168
24957
|
viewModel._language = language.value;
|
|
25169
|
-
formItem.showWarningLine && viewModel && viewModel.createWarningLine();
|
|
25170
24958
|
formItem.typhoonTracPath && getDataByPath();
|
|
25171
24959
|
|
|
25172
24960
|
if (props.getTyphoonTracListByApi) {
|
|
@@ -25350,6 +25138,7 @@ const TyphoonTracvue_type_script_setup_true_lang_js_default_ = {
|
|
|
25350
25138
|
}
|
|
25351
25139
|
|
|
25352
25140
|
tableData.value = res;
|
|
25141
|
+
formItem.showWarningLine && viewModel && viewModel.createWarningLine();
|
|
25353
25142
|
clear();
|
|
25354
25143
|
}
|
|
25355
25144
|
});
|
|
@@ -41744,7 +41533,7 @@ const AddDatavue_type_script_setup_true_lang_js_default_ = {
|
|
|
41744
41533
|
expose: __expose
|
|
41745
41534
|
}) {
|
|
41746
41535
|
const props = __props;
|
|
41747
|
-
let accept = ".zip,.geojson,.topojson,.json,.kml,.kmz,.czml,.csv,.xls,.xlsx,.txt,.dwg,.
|
|
41536
|
+
let accept = ".zip,.geojson,.topojson,.json,.kml,.kmz,.czml,.csv,.xls,.xlsx,.txt,.dwg,.dxf,.kqgeobody";
|
|
41748
41537
|
const {
|
|
41749
41538
|
proxy
|
|
41750
41539
|
} = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
|