From 0bd8b193385c2a28b77647b8807a88c1075f9864 Mon Sep 17 00:00:00 2001 From: aq Date: Mon, 28 Apr 2025 11:23:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=A3=85=E5=A4=87=E5=A4=9A=E8=BD=BD?= =?UTF-8?q?=E8=8D=B7=E9=83=A8=E5=88=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/entity.ts | 274 +++++++++++------- .../HisImages/components/imageRoller.vue | 242 ++++------------ .../BaseMB/components/HisImages/index.vue | 8 +- src/views/Mubiao/hooks/mubiao.ts | 69 ++++- src/views/Mubiao/hooks/mubiaoDetail.jsx | 272 ++++++++++++----- src/views/Payload/Detection.jsx | 11 +- 6 files changed, 488 insertions(+), 388 deletions(-) diff --git a/src/hooks/entity.ts b/src/hooks/entity.ts index f78d04b5d..f853c7b09 100644 --- a/src/hooks/entity.ts +++ b/src/hooks/entity.ts @@ -4,6 +4,8 @@ import { getMubiaoHisTraj } from '@/api/Mubiao' const baseMap = new Map() const mubiaoMap = new Map() const mubiaoConicMap = new Map() +const ellipsoidSensorMap = new Map() + const satelliteMap = new Map() const satelliteBeamMap = new Map() @@ -17,6 +19,7 @@ export const useEntity = () => { baseMap, mubiaoMap, mubiaoConicMap, + ellipsoidSensorMap, satelliteMap, satelliteBeamMap, mbPayloadShowMap, @@ -27,6 +30,7 @@ export const useEntity = () => { getHisTraj, getMBEntityOpt, createMBConicSensor, + createMBEllipsoidSensor, iconOrModel, changeIconOrModel, showOrHideLoad, @@ -79,164 +83,150 @@ async function getHisTraj({ return { points, posArray, timeArray } } +/** + * 获取目标实体配置选项 + * @param id 目标ID + * @param targetType 目标类型 + * @param country 国家代码 + * @returns 返回创建的实体对象 + */ async function getMBEntityOpt({ id, targetType, country, - extendInfo, }: { id: string targetType: string country: string - extendInfo?: { detectingPayload: Record } }) { - const mubiaoDict = window.settings.mbDict[targetType] - const countryColor = window.settings.mbCountryDict[country] + // 从全局设置获取目标字典和国家颜色 + const mubiaoDict = window.settings.mbDict[targetType]; + const countryColor = window.settings.mbCountryDict[country]; - // console.log(country, countryColor) + // 静态方向配置(北京附近,高度10km) const staticOrientation = { - position: Cesium.Cartesian3.fromDegrees(116.0, 39.9, 10000), // 初始位置(北京附近,高度10km) + position: Cesium.Cartesian3.fromDegrees(116.0, 39.9, 10000), // 初始位置(经度,纬度,高度) orientation: Cesium.Transforms.headingPitchRollQuaternion( Cesium.Cartesian3.fromDegrees(116.0, 39.9, 10000), new Cesium.HeadingPitchRoll( - Cesium.Math.toRadians(90), // 航向:正东方向(0=正北,90=正东) - Cesium.Math.toRadians(-90), // 俯仰:轻微下倾(模拟地球曲率) + Cesium.Math.toRadians(90), // 航向:正东方向 + Cesium.Math.toRadians(-90), // 俯仰:垂直向下 Cesium.Math.toRadians(0) // 滚转:保持水平 ) ), properties: { - velocity: 800, // 飞行速度(km/h) - heading: 90.0, // 当前航向(度) - pitch: -90, // 当前俯仰(度) - roll: 0.0, // 当前滚转(度) - altitude: 10000 // 当前高度(米) + velocity: 800, // 飞行速度(km/h) + heading: 90.0, // 当前航向(度) + pitch: -90, // 当前俯仰(度) + roll: 0.0, // 当前滚转(度) + altitude: 10000 // 当前高度(米) } }; - // console.log(country, countryColor) - let ellipsoid; - console.log(extendInfo,targetType,id,'----exteninfo') - let flag = false ; - if(id == 'xx19' || id == 'xx42' || id == 'xx42' || id == 'xxx1' || id == 'xx14' || id == 'xx30' || id == 'xx48' || id == 'xx24' || id == 'xx'){ - flag = true - } - if (extendInfo) { - const { - angle, - maximumCone, - minimumCone, - minimumClock, - maximumClock, - radius, - } = extendInfo.detectingPayload - if (maximumClock || minimumClock || minimumCone) { - ellipsoid = { - ellipsoid: { - show: mbPayloadShowMap.get(id)?.detectingPayload?.show || false, - radii: new Cesium.Cartesian3(radius, radius, radius), - innerRadii: new Cesium.Cartesian3(1.0, 1.0, 1.0), - maximumCone: Cesium.Math.toRadians(90), - minimumCone: Cesium.Math.toRadians(minimumCone), - minimumClock: Cesium.Math.toRadians(minimumClock), - maximumClock: Cesium.Math.toRadians(maximumClock), - material: Cesium.Color.fromCssColorString('#00dcff44'), - outline: true, - outlineColor: Cesium.Color.fromCssColorString('#00dcff'), - outlineWidth: 1, - distanceDisplayCondition: new Cesium.DistanceDisplayCondition( - 0.0, - 10.5e8 - ), - slicePartitions: 24, - stackPartitions: 36, - }, - } - } + // 检查是否为特殊ID + let flag = false; + const specialIds = ['xx19', 'xx42', 'xxx1', 'xx14', 'xx30', 'xx48', 'xx24', 'xx']; + if (specialIds.includes(id)) { + flag = true; } + + // 获取着色后的图标 const image = await getImageByColor({ img: mubiaoDict.icon, color: countryColor, - }) - // console.log(image.img, (+image.height / +image.width) * 30) + }); + + // 创建并返回主实体配置 return { + // 标签配置 label: { text: `${id}`, font: '12pt sans-serif', fillColor: Cesium.Color.fromCssColorString(countryColor), - // fillColor: Cesium.Color.YELLOW, outlineColor: Cesium.Color.BLACK, outlineWidth: 2, style: Cesium.LabelStyle.FILL_AND_OUTLINE, pixelOffset: new Cesium.Cartesian2(20, -20), - pixelOffsetScaleByDistance: new Cesium.NearFarScalar( - 7000000, - 1.0, - 18000000, - 0.4 - ), + pixelOffsetScaleByDistance: new Cesium.NearFarScalar(7000000, 1.0, 18000000, 0.4), scaleByDistance: new Cesium.NearFarScalar(7000000, 1.0, 18000000, 0.4), }, + // 公告牌配置 billboard: { show: !iconOrModel.value, - image: image.img, - // image: mubiaoDict.icon, + image: image.img, width: 35, height: (+image.height / +image.width) * 35, - // height: 30, color: Cesium.Color.fromCssColorString(countryColor), scaleByDistance: new Cesium.NearFarScalar(7000000, 1.0, 18000000, 0.4), }, + // 模型配置 model: { show: iconOrModel.value, uri: mubiaoDict.model, scale: 100, minimumPixelSize: 5, }, + // 如果是特殊ID,添加静态方向属性 ...(flag ? { orientation: staticOrientation.orientation, properties: staticOrientation.properties } : {}), - ...ellipsoid, - } + }; } +/** + * 创建椭球体传感器实体 + * @param entity 关联的主实体 + * @param show 是否显示 + * @param radius 半径(单位:千米) + * @param minimumCone 最小锥角(度) + * @param maximumCone 最大锥角(度) + * @param minimumClock 最小时钟角(度) + * @param maximumClock 最大时钟角(度) + * @returns 返回创建的椭球体传感器实体 + */ +function createMBEllipsoidSensor({ + entity, + show, + radius, + minimumCone, + maximumCone, + minimumClock, + maximumClock, +}: { + entity: Cesium.Entity + show: boolean + radius: number + minimumCone?: number + maximumCone?: number + minimumClock?: number + maximumClock?: number +}) { + // 创建椭球体图形对象 + const ellipsoid = new Cesium.EllipsoidGraphics({ + show, + radii: new Cesium.Cartesian3(radius, radius, radius), // 设置XYZ轴半径 + innerRadii: new Cesium.Cartesian3(1.0, 1.0, 1.0), // 内半径 + maximumCone: maximumCone !== undefined ? Cesium.Math.toRadians(maximumCone) : Cesium.Math.toRadians(90), // 最大锥角(弧度) + minimumCone: minimumCone !== undefined ? Cesium.Math.toRadians(minimumCone) : 0, // 最小锥角(弧度) + minimumClock: minimumClock !== undefined ? Cesium.Math.toRadians(minimumClock) : 0, // 最小时钟角(弧度) + maximumClock: maximumClock !== undefined ? Cesium.Math.toRadians(maximumClock) : 2 * Math.PI, // 最大时钟角(弧度) + material: Cesium.Color.fromCssColorString('#00dcff44'), // 材质颜色(半透明青色) + outline: true, // 显示轮廓线 + outlineColor: Cesium.Color.fromCssColorString('#00dcff'), // 轮廓线颜色 + outlineWidth: 1, // 轮廓线宽度 + distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0.0, 10.5e8), // 显示距离范围 + slicePartitions: 24, // 切片分区数 + stackPartitions: 36, // 堆叠分区数 + }); -async function getImageByColor({ img: url, color: newColor }) { - // 步骤 1: 获取 SVG 内容 - const svg = await fetch(url) - const svgContent = await svg.text() + // 创建并添加椭球体传感器实体 + const mbEllipsoid = viewer.entities.add({ + position: entity.position, // 使用主实体位置 + orientation: entity.orientation, // 使用主实体方向 + ellipsoid: ellipsoid // 添加椭球体图形 + }); - // 步骤 2: 修改 SVG 的颜色 - const parser = new DOMParser() - const svgDoc = parser.parseFromString(svgContent, 'image/svg+xml') - - // 修改所有路径、圆形、矩形等元素的填充颜色 - const elements = svgDoc.querySelectorAll('path, circle, rect, polygon, line') - elements.forEach(element => { - // 修改 fill 属性 - element.setAttribute('fill', newColor) - // 也可以修改 stroke 颜色,防止可能的边框颜色问题 - element.setAttribute('stroke', newColor) - }) - - const svgElement = svgDoc.documentElement - // console.log(svgElement) - - // const transformValue = `rotate(${90}, 50, 50)` - // svgElement.setAttribute('transform', transformValue) - - // 获取 SVG 的宽度和高度 - const width = svgElement.getAttribute('width') - const height = svgElement.getAttribute('height') - - // 步骤 3: 转换为 Base64 编码 - const serializer = new XMLSerializer() - const modifiedSVG = serializer.serializeToString(svgDoc.documentElement) - - // 输出修改后的 SVG,确保颜色正确 - const base64SVG = 'data:image/svg+xml;base64,' + btoa(modifiedSVG) - - console.log(base64SVG) - return { img: base64SVG, width, height } + return mbEllipsoid; } function createMBConicSensor({ @@ -285,6 +275,46 @@ function createMBConicSensor({ }) return mbConic } +async function getImageByColor({ img: url, color: newColor }) { + // 步骤 1: 获取 SVG 内容 + const svg = await fetch(url) + const svgContent = await svg.text() + + // 步骤 2: 修改 SVG 的颜色 + const parser = new DOMParser() + const svgDoc = parser.parseFromString(svgContent, 'image/svg+xml') + + // 修改所有路径、圆形、矩形等元素的填充颜色 + const elements = svgDoc.querySelectorAll('path, circle, rect, polygon, line') + elements.forEach(element => { + // 修改 fill 属性 + element.setAttribute('fill', newColor) + // 也可以修改 stroke 颜色,防止可能的边框颜色问题 + element.setAttribute('stroke', newColor) + }) + + const svgElement = svgDoc.documentElement + // console.log(svgElement) + + // const transformValue = `rotate(${90}, 50, 50)` + // svgElement.setAttribute('transform', transformValue) + + // 获取 SVG 的宽度和高度 + const width = svgElement.getAttribute('width') + const height = svgElement.getAttribute('height') + + // 步骤 3: 转换为 Base64 编码 + const serializer = new XMLSerializer() + const modifiedSVG = serializer.serializeToString(svgDoc.documentElement) + + // 输出修改后的 SVG,确保颜色正确 + const base64SVG = 'data:image/svg+xml;base64,' + btoa(modifiedSVG) + + console.log(base64SVG) + return { img: base64SVG, width, height } +} + + const iconOrModel = ref(false) function changeIconOrModel() { @@ -300,16 +330,46 @@ const showOrHideLoad = ref(false) watch([mbPayloadShowMap, satellitePayloadShowMap], ([newMb, newSatellite]) => { ;[...newMb.keys()].forEach(key => { let show = false + console.log('newMb.get(key)',newMb.get(key)) + console.log('--------------watch',key,show) if (newMb.get(key).detectingPayload) { show = newMb.get(key).detectingPayload.show } - if (mubiaoMap.has(key)) { - // console.log(mubiaoMap.get(key).ellipsoid) - mubiaoMap.get(key).ellipsoid && (mubiaoMap.get(key).ellipsoid.show = show) + if(newMb.get(key)?.extendInfo){ + const airplaneConicPayload=newMb.get(key)?.extendInfo?.airplaneConicPayload; + const radarPayload=newMb.get(key)?.extendInfo?.radarPayload + if(airplaneConicPayload){ + for(let i=0;i { let show = false diff --git a/src/views/BaseMB/components/HisImages/components/imageRoller.vue b/src/views/BaseMB/components/HisImages/components/imageRoller.vue index 98066bb52..5df0d945b 100644 --- a/src/views/BaseMB/components/HisImages/components/imageRoller.vue +++ b/src/views/BaseMB/components/HisImages/components/imageRoller.vue @@ -1,44 +1,17 @@ - - diff --git a/src/views/BaseMB/components/HisImages/index.vue b/src/views/BaseMB/components/HisImages/index.vue index a5356dccb..bda23c314 100644 --- a/src/views/BaseMB/components/HisImages/index.vue +++ b/src/views/BaseMB/components/HisImages/index.vue @@ -7,7 +7,6 @@ import Panel from '@/components/Panel/index.vue' import LImage from './components/LImage' import JImage from './components/JImage' import imageRoller from './components/imageRoller.vue' -import TimeLine from './components/timeLine.vue' @@ -42,7 +41,7 @@ const rangeShortcuts = { return [cur - 365 * 24 * 60 * 60 * 1000, cur] }, } -const showPreview = ref(true) +const showPreview = ref(false) const previewIndex = ref(0) @@ -119,7 +118,7 @@ const compareImages = () => { showPreview.value = true activeIndex.value = -1 previewIndex.value = 0 - // showPreview.value = true + showPreview.value = true isCompare.value = true } } else { @@ -182,11 +181,8 @@ const formatTime = (time) => { {{ btnText }}
- - -
diff --git a/src/views/Mubiao/hooks/mubiao.ts b/src/views/Mubiao/hooks/mubiao.ts index 97675b5a3..47934e567 100644 --- a/src/views/Mubiao/hooks/mubiao.ts +++ b/src/views/Mubiao/hooks/mubiao.ts @@ -31,7 +31,9 @@ const { mubiaoMap, getMBEntityOpt, createMBConicSensor, + createMBEllipsoidSensor, mubiaoConicMap, + ellipsoidSensorMap, mbPayloadShowMap, } = useEntity() // const { mubiaoMap } = storeToRefs(entity) @@ -128,17 +130,51 @@ export const useMubiao = () => { ...mbEntityOpt, }) - if (extendInfo?.detectingPayload?.angle) { - const conic = createMBConicSensor({ - entity: mubiaoEntity, - radius: extendInfo?.detectingPayload?.radius, + // 设置多载荷分类 + console.log(extendInfo,'=======extendInfo') + console.log(mbPayloadShowMap.get(id),'-----mbPayloadShowMap.get(id)') - angle: extendInfo?.detectingPayload?.angle, - heading: extendInfo?.detectingPayload?.heading, - pitch: extendInfo?.detectingPayload?.pitch, - show: mbPayloadShowMap.get(id).detectingPayload.show, - }) - mubiaoConicMap.set(id, conic) + if (extendInfo?.airplaneConicPayload) { + console.log(extendInfo?.airplaneConicPayload) + for(let i=0;i { viewer.entities.remove(mubiaoConicMap.get(id)) mubiaoConicMap.delete(id) } + if (ellipsoidSensorMap.has(id)) { + viewer.entities.remove(ellipsoidSensorMap.get(id)) + ellipsoidSensorMap.delete(id) + } } const updateMubiaoPos = async ( @@ -264,15 +304,22 @@ async function getMubiaoData() { function getAllNodesToPayload() { const mbList = getLeafNode(data.value[0]) + console.log(mbList,'--mbList--') mbList.forEach(node => { const { dataId, data: nodeData } = node const { extendInfo } = nodeData const detectingShow = mbPayloadShowMap.get(dataId)?.detectingPayload?.show || false + if (extendInfo) { + // mbPayloadShowMap.set(dataId, { + // data: toRaw(nodeData), + // detectingPayload: { ...extendInfo, show: detectingShow }, + // }) + mbPayloadShowMap.set(dataId, { data: toRaw(nodeData), - detectingPayload: { ...extendInfo, show: detectingShow }, + extendInfo }) } }) diff --git a/src/views/Mubiao/hooks/mubiaoDetail.jsx b/src/views/Mubiao/hooks/mubiaoDetail.jsx index f1154fddd..481673c19 100644 --- a/src/views/Mubiao/hooks/mubiaoDetail.jsx +++ b/src/views/Mubiao/hooks/mubiaoDetail.jsx @@ -1,5 +1,5 @@ // import { h } from 'vue' -import { NButton, NInputNumber, NSwitch } from 'naive-ui' +import { NButton, NInputNumber, NSwitch , NRadioButton,NRadioGroup} from 'naive-ui' import { useModal } from '@/views/Content/hooks/modal' import Detection from '@/views/Payload/Detection.jsx' import Communication from '@/views/Payload/Communication.jsx' @@ -11,35 +11,38 @@ import { isNull, isUndefined } from 'es-toolkit' const { openDetailsModal } = useModal() export const useMubiaoDetail = () => { const payloadData = ref([]) + const payloadTabType=ref('radar') + const payLoadTypeRef=ref('') function addCommunicationPayload(mbData) { const { id, targetType, extendInfo } = mbData + console.log(mbData,'-000--mbData') +console.log(extendInfo,'-------extendInfo') +console.log(payloadTabType.value,'-------payloadTabType.value') +console.log(payloadData.value,'-0000-payloadData') - const payLoadType = window.settings.mbDict[targetType].payload + const payLoadType = payloadTabType.value if (payLoadType === 'radar') { - payloadData.value = [ - { - id, - radius: null, - minimumClock: null, - maximumClock: 90, - minimumCone: null, - maximumCone: null, - show: false, - zhName:'' - }, - ] + + // payloadData.value = extendInfo.radarPayload ? extendInfo.radarPayload : [] + payloadData.value.push({ + radius: null, + minimumClock: null, + maximumClock: 90, + minimumCone: null, + maximumCone: null, + show: false, + zhName:'' + }) } else if (payLoadType === 'airplaneConic') { - payloadData.value = [ - { - id, - angle: 30, - radius: 10, - heading: 90, - pitch: 180, - show: false, - }, - ] + // payloadData.value = extendInfo.airplaneConicPayload ? extendInfo.airplaneConicPayload : [] + payloadData.value.push( { + angle: 30, + radius: 10, + heading: 90, + pitch: 180, + show: false, + }) } } @@ -49,19 +52,31 @@ export const useMubiaoDetail = () => { const { mbPayloadShowMap } = useEntity() function renderMubiaoDetailsContent(mbData) { + console.log(mbData,'-----mbData000') payloadData.value = [] const { id, targetType, extendInfo } = mbData - const payLoadType = window.settings.mbDict[targetType].payload + console.log(extendInfo,'---extendInfoextendInfo') + console.log(extendInfo && payloadTabType.value == 'radar' && extendInfo.radarPayload,'-999-00-') + console.log('--00-') - if (extendInfo) { - payloadData.value = [ - { - id, - ...extendInfo.detectingPayload, - show: mbPayloadShowMap.get(id).detectingPayload.show, - }, - ] + if(extendInfo && payloadTabType.value == 'radar' && extendInfo.radarPayload){ + payloadData.value = extendInfo.radarPayload + console.log(extendInfo.radarPayload,'--00extendInfo.radarPayload') + }else if(extendInfo && payloadTabType.value == 'airplaneConic'&&extendInfo.airplaneConicPayload){ + payloadData.value = extendInfo.airplaneConicPayload } + + console.log(payloadData.value,'---payloadData--') + + // if (extendInfo) { + // payloadData.value = [ + // { + // id, + // ...extendInfo.detectingPayload, + // show: mbPayloadShowMap.get(id).detectingPayload.show, + // }, + // ] + // } // return h( // 'div', // {}, @@ -80,8 +95,21 @@ export const useMubiaoDetail = () => { {/*
探测载荷
*/}
-
探测载荷
- {payloadData.value.length === 0 ? ( +
+ {/*
*/} + + changePayloadType(mbData)} + > + + + +
+ + + {/* {payloadData.value.length === 0 ? ( { > 删除载荷 - )} + )} */} + + + addCommunicationPayload(mbData)} + > + 添加载荷 + + + removeCommunicationPayload()} + > + 删除载荷 + +
{payloadData.value.length > 0 && ( - + )}
@@ -126,47 +172,127 @@ export const useMubiaoDetail = () => { contentSlot: renderMubiaoDetailsContent(mbData), }) } +function changePayloadType(mbData){ + // if(payloadTabType.value == 'radar'){ + // payLoadTypeRef.value=payloadTabType.value + // }else if(payloadTabType.value == 'airplaneConic'){ + // payLoadTypeRef.value=payloadTabType.value + // } + console.log(mbData,'-----changePayloadType') + payloadData.value = [] + const { id, targetType, extendInfo } = mbData + + if(extendInfo && payloadTabType.value == 'radar' && extendInfo.radarPayload){ + payloadData.value = extendInfo.radarPayload + console.log(extendInfo.radarPayload,'--00extendInfo.radarPayload') + }else if(extendInfo && payloadTabType.value == 'airplaneConic'&&extendInfo.airplaneConicPayload){ + payloadData.value = extendInfo.airplaneConicPayload + } + + console.log(payloadTabType.value,'-------payloadType') +} function updateMbLoad({ mbData, detection }) { - - - console.log('------------', detection) - const { getMubiaoData } = useMubiao() - - if(!detection[0]){ - const payloadData = { - id: mbData.id, - extendInfo: { - detectingPayload: {}, - }, - } - // console.log(payloadData) - updateMbPayload(payloadData).then(res => { - if (res.code === '200') { - window.$message.success('保存成功') - getMubiaoData() - } - }) - return - } - const { id, show, ...detectionData } = detection[0] - console.log('------------') + const { id, targetType, extendInfo } = mbData - if ( - Object.values(detectionData).some( - item => isNull(item) || isUndefined(item) - ) - ) { - window.$message.error('探测载荷信息不完整') - return + + console.log(mbData,'---mbDatambDatambData') + console.log('------------', detection) + + + const { getMubiaoData } = useMubiao() + + if(!detection[0]){ + const payloadData = { + id: mbData.id, + extendInfo: { + radarPayload:[], + airplaneConicPayload:[] + }, + } + // console.log(payloadData) + updateMbPayload(payloadData).then(res => { + if (res.code === '200') { + window.$message.success('保存成功') + getMubiaoData() + } + }) + return } - const payloadData = { - id: mbData.id, - extendInfo: { - detectingPayload: { ...detectionData }, - }, + + // const { id, show, ...detectionData } = detection[0] + // console.log('------------') + + // if ( + // Object.values(detectionData).some( + // item => isNull(item) || isUndefined(item) + // ) + // ) { + // window.$message.error('探测载荷信息不完整') + // return + // } + // const payloadData = { + // id: mbData.id, + // extendInfo: { + // detectingPayload: { ...detectionData }, + // }, + // } + let payloadData={} + if(payloadTabType.value == 'radar'){ + let detectingPayload=[] + // payloadData.value = extendInfo.radarPayload ? extendInfo.radarPayload : [] + for(let i=0;i isNull(item) || isUndefined(item) + ) + ) { + window.$message.error('存在扇形载荷信息不完整项') + return + } + detectingPayload.push({...detectionData,id:`${mbData.id}_${payloadTabType.value}_${i}`}) + console.log(detectingPayload,'--00---detectingPayload---radar----') + console.log(extendInfo.airplaneConicPayload,'---extendInfo.airplaneConicPayload') + payloadData = { + id: mbData.id, + extendInfo: { + radarPayload:detectingPayload, + airplaneConicPayload:extendInfo.airplaneConicPayload + }, + } + } + + }else if(payloadTabType.value == 'airplaneConic'){ + let detectingPayload=[] + // payloadData.value = extendInfo.radarPayload ? extendInfo.radarPayload : [] + for(let i=0;i isNull(item) || isUndefined(item) + ) + ) { + window.$message.error('存在扇形载荷信息不完整项') + return + } + detectingPayload.push({...detectionData,id:`${mbData.id}_${payloadTabType.value}_${i}`}) + console.log(detectingPayload,'--00---detectingPayload----airplaneConic---') + console.log(extendInfo.radarPayload,'---extendInfo.radarPayload') + payloadData = { + id: mbData.id, + extendInfo: { + radarPayload:extendInfo.radarPayload, + airplaneConicPayload:detectingPayload + }, + } + } } - console.log(payloadData,'--payloadData---') + + + + console.log(payloadData,'---payloadData----') + // return updateMbPayload(payloadData).then(res => { if (res.code === '200') { window.$message.success('保存成功') diff --git a/src/views/Payload/Detection.jsx b/src/views/Payload/Detection.jsx index 5c5f4815d..a1514541a 100644 --- a/src/views/Payload/Detection.jsx +++ b/src/views/Payload/Detection.jsx @@ -232,15 +232,18 @@ export default defineComponent({ } function changePayloadStatus(row) { - console.log('changePayloadStatus--',mbPayloadShowMap,props.target) + // console.log('changePayloadStatus--',mbPayloadShowMap,props.target) const { id, show } = row + debugger const mapDict = { mb: mbPayloadShowMap, satellite: satellitePayloadShowMap, } - const map = mapDict[props.target] - console.log(map,'---map',id) - map.has(id) && (map.get(id).detectingPayload.show = show) + // const map = mapDict[props.target] + // console.log(map,'---map',id) + + // console.log(map.get(id),'--------map.get(id)') + // map.has(id) && (map.get(id).detectingPayload.show = show) } console.log(props.data,'----props') return () => (