feat:修改图片亮度问题
This commit is contained in:
parent
a31693bad3
commit
539ba7d5d2
@ -18,7 +18,7 @@ export default class OrthoImageryManager {
|
|||||||
/**
|
/**
|
||||||
* 添加或更新新推送的图片
|
* 添加或更新新推送的图片
|
||||||
*/
|
*/
|
||||||
add(data) {
|
add(data, brightness) {
|
||||||
const key = `${data.jobId}-${data.uavId}~${data.fileId}`;
|
const key = `${data.jobId}-${data.uavId}~${data.fileId}`;
|
||||||
|
|
||||||
// 已存在则跳过
|
// 已存在则跳过
|
||||||
@ -39,7 +39,7 @@ export default class OrthoImageryManager {
|
|||||||
const layer = this.viewer.cesiumViewer.imageryLayers.addImageryProvider(provider);
|
const layer = this.viewer.cesiumViewer.imageryLayers.addImageryProvider(provider);
|
||||||
|
|
||||||
// ✅ 使用全局亮度和透明度,保证新图生效
|
// ✅ 使用全局亮度和透明度,保证新图生效
|
||||||
layer.brightness = this.globalBrightness;
|
layer.brightness = brightness ? brightness : this.globalBrightness;
|
||||||
layer.alpha = this.globalAlpha;
|
layer.alpha = this.globalAlpha;
|
||||||
|
|
||||||
this.layerMap.set(key, layer);
|
this.layerMap.set(key, layer);
|
||||||
@ -52,7 +52,7 @@ export default class OrthoImageryManager {
|
|||||||
* 设置全局亮度,影响所有已有图片和未来新推送的图片
|
* 设置全局亮度,影响所有已有图片和未来新推送的图片
|
||||||
*/
|
*/
|
||||||
setBrightness(value) {
|
setBrightness(value) {
|
||||||
this.globalBrightness = value;
|
// this.globalBrightness = value;
|
||||||
this.layerMap.forEach(layer => {
|
this.layerMap.forEach(layer => {
|
||||||
layer.brightness = value;
|
layer.brightness = value;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -581,10 +581,10 @@ export default {
|
|||||||
onLightChange: debounce(function (val) {
|
onLightChange: debounce(function (val) {
|
||||||
const imageInfos = { ...this.imageInfos }
|
const imageInfos = { ...this.imageInfos }
|
||||||
orthoManager.setBrightness(val / 10)
|
orthoManager.setBrightness(val / 10)
|
||||||
execBrightnessexport(imageInfos).then(res => {
|
// execBrightnessexport(imageInfos).then(res => {
|
||||||
console.log('亮度调整成功');
|
// console.log('亮度调整成功');
|
||||||
// this.$message.success('亮度调整成功')
|
// // this.$message.success('亮度调整成功')
|
||||||
})
|
// })
|
||||||
}, 500),
|
}, 500),
|
||||||
// startTest() {
|
// startTest() {
|
||||||
// let testHeight = 1000
|
// let testHeight = 1000
|
||||||
@ -2818,10 +2818,10 @@ export default {
|
|||||||
handleWebsocketImage(info) {
|
handleWebsocketImage(info) {
|
||||||
// console.log('SAR图像', info.body)
|
// console.log('SAR图像', info.body)
|
||||||
let data = JSON.parse(info.body)
|
let data = JSON.parse(info.body)
|
||||||
this.imageInfos = Object.assign({}, this.imageInfos, data)
|
// this.imageInfos = Object.assign({}, this.imageInfos, data)
|
||||||
this.imageInfos.brightness = data.brightness
|
// this.imageInfos.brightness = data.brightness
|
||||||
console.log('SAR图像2', data)
|
console.log('SAR图像2', data)
|
||||||
orthoManager.add(data)
|
orthoManager.add(data, this.imageInfos.brightness)
|
||||||
// this.addMarkPicture2(data)
|
// this.addMarkPicture2(data)
|
||||||
// console.log('灭有匹配到吗taskUavCollection', taskUavCollection, taskUavCollection[data.jobId])
|
// console.log('灭有匹配到吗taskUavCollection', taskUavCollection, taskUavCollection[data.jobId])
|
||||||
// if (taskUavCollection[data.jobId]) {
|
// if (taskUavCollection[data.jobId]) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user