fix: WEB模块详情页问题修改

This commit is contained in:
Xu Zhimeng 2024-10-08 11:13:06 +08:00
parent d2947fd203
commit ccb401d7d7

View File

@ -143,7 +143,14 @@
</custom-table> </custom-table>
</template> </template>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="efficiency" tab="EFFICIENCY" v-if="allData.gefficiencyBlock === null ? false : true" forceRender> <a-tab-pane
key="efficiency"
tab="EFFICIENCY"
v-if="allData.gefficiencyBlock || allData.bgEfficiencyBlock || allData.befficiencyBlock"
forceRender
>
<!-- Geff开始 -->
<template v-if="allData.gefficiencyBlock">
<div class="pane-title" style="margin-bottom: 15px">GAMMA EFFICIENCY</div> <div class="pane-title" style="margin-bottom: 15px">GAMMA EFFICIENCY</div>
<custom-table <custom-table
size="middle" size="middle"
@ -154,7 +161,10 @@
:canSelect="false" :canSelect="false"
> >
</custom-table> </custom-table>
<template v-if="allData.bgEfficiencyBlock === null ? false : true"> </template>
<!-- Geff结束 -->
<!-- BG开始 -->
<template v-if="allData.bgEfficiencyBlock">
<div class="pane-title" style="margin: 15px 0">BETA-GAMMA EFFICIENCY</div> <div class="pane-title" style="margin: 15px 0">BETA-GAMMA EFFICIENCY</div>
<custom-table <custom-table
size="middle" size="middle"
@ -166,6 +176,21 @@
> >
</custom-table> </custom-table>
</template> </template>
<!-- BG结束 -->
<!-- Beff开始 -->
<template v-if="allData.befficiencyBlock">
<div class="pane-title" style="margin: 15px 0">BETA EFFICIENCY</div>
<custom-table
size="middle"
:rowKey="getUid()"
:columns="columnsEfficiency_BG"
:list="dataSourceEfficiency_BE"
:pagination="false"
:canSelect="false"
>
</custom-table>
</template>
<!-- Beff结束 -->
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="roi" tab="ROI" v-if="allData.roiLimitsBlock === null ? false : true" forceRender> <a-tab-pane key="roi" tab="ROI" v-if="allData.roiLimitsBlock === null ? false : true" forceRender>
<div class="pane-title" style="margin-bottom: 15px">ROI LIMITS</div> <div class="pane-title" style="margin-bottom: 15px">ROI LIMITS</div>
@ -223,7 +248,7 @@
</div> </div>
<div class="gamma-spectrum-chart" id="spectrumChartRef_B"></div> <div class="gamma-spectrum-chart" id="spectrumChartRef_B"></div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="histogram" tab="HISTOGRAM" v-if="allData.bspectrumBlock === null ? false : true"> <a-tab-pane key="histogram" tab="HISTOGRAM" v-if="allData.histogramBlock === null ? false : true">
<div class="pane-title" style="margin-bottom: 15px">HISTOGRAM</div> <div class="pane-title" style="margin-bottom: 15px">HISTOGRAM</div>
<div class="gamma-spectrum-row"> <div class="gamma-spectrum-row">
<div> <div>
@ -434,6 +459,7 @@ export default {
], ],
dataSourceEfficiency_G: [], dataSourceEfficiency_G: [],
dataSourceEfficiency_BG: [], dataSourceEfficiency_BG: [],
dataSourceEfficiency_BE: [],
columnsRoiLimits: [ columnsRoiLimits: [
{ {
title: 'ROI number', title: 'ROI number',
@ -567,6 +593,7 @@ export default {
this.dataSourceResulution_B = this.allData.bresolutionBlock this.dataSourceResulution_B = this.allData.bresolutionBlock
this.dataSourceEfficiency_G = this.allData.gefficiencyBlock this.dataSourceEfficiency_G = this.allData.gefficiencyBlock
this.dataSourceEfficiency_BG = this.allData.bgEfficiencyBlock this.dataSourceEfficiency_BG = this.allData.bgEfficiencyBlock
this.dataSourceEfficiency_BE = this.allData.befficiencyBlock
this.dataSourceRoiLimits = this.allData.roiLimitsBlock this.dataSourceRoiLimits = this.allData.roiLimitsBlock
this.dataSourceRatios = this.allData.ratiosBlock this.dataSourceRatios = this.allData.ratiosBlock
this.dataSourceSpectrum_G = this.allData.gspectrumBlock && this.allData.gspectrumBlock.gspectrumSubBlock this.dataSourceSpectrum_G = this.allData.gspectrumBlock && this.allData.gspectrumBlock.gspectrumSubBlock
@ -582,6 +609,7 @@ export default {
return index return index
}) })
this.allData.histogramBlock && this.allData.histogramBlock &&
this.allData.histogramBlock.histogramSubBlock &&
this.allData.histogramBlock.histogramSubBlock.forEach((item) => { this.allData.histogramBlock.histogramSubBlock.forEach((item) => {
if (item.c === 1) { if (item.c === 1) {
this.dataSourceHistogray.level_1.push(item) this.dataSourceHistogray.level_1.push(item)
@ -811,20 +839,22 @@ export default {
} }
}, },
drawSpectrumChart_G() { drawSpectrumChart_G() {
if (this.spectrumChart_G) return
this.spectrumChart_G = echarts.init(document.getElementById('spectrumChartRef_G')) this.spectrumChart_G = echarts.init(document.getElementById('spectrumChartRef_G'))
this.spectrumChart_G.setOption(this.getOptions('G')) this.spectrumChart_G.setOption(this.getOptions('G'))
window.addEventListener('resize', function () { window.addEventListener('resize', this.handleSpectrumGChartResize)
this, spectrumChart_G.resize()
})
}, },
drawSpectrumChart_B() { drawSpectrumChart_B() {
if (this.spectrumChart_B) return
this.spectrumChart_B = echarts.init(document.getElementById('spectrumChartRef_B')) this.spectrumChart_B = echarts.init(document.getElementById('spectrumChartRef_B'))
this.spectrumChart_B.setOption(this.getOptions('B')) this.spectrumChart_B.setOption(this.getOptions('B'))
window.addEventListener('resize', function () { window.addEventListener('resize', this.handleSpectrumBChartResize)
this.spectrumChart_B.resize()
})
}, },
drawHistogramChart() { drawHistogramChart() {
if (this.histogramChart) return
let dataset = [], let dataset = [],
series = [] series = []
for (const key in this.dataSourceHistogray) { for (const key in this.dataSourceHistogray) {
@ -846,6 +876,9 @@ export default {
}, },
} }
}) })
const { bchannels, gchannels } = this.allData.histogramBlock || {}
this.histogramChart = echarts.init(document.getElementById('histogramChartRef')) this.histogramChart = echarts.init(document.getElementById('histogramChartRef'))
this.histogramChart.setOption({ this.histogramChart.setOption({
dataset, dataset,
@ -858,7 +891,7 @@ export default {
}, },
}, },
interval: 65, interval: 65,
max: 260, max: bchannels,
}, },
yAxis: { yAxis: {
scale: false, scale: false,
@ -868,8 +901,8 @@ export default {
color: 'rgbA(64, 105, 121, 0.2)', color: 'rgbA(64, 105, 121, 0.2)',
}, },
}, },
interval: 65, interval: gchannels / 4,
max: 260, max: gchannels,
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
@ -887,10 +920,23 @@ export default {
}, },
series, series,
}) })
window.addEventListener('resize', function () { window.addEventListener('resize', this.handleHistogramChartResize)
this.histogramChart.resize()
})
}, },
handleSpectrumGChartResize() {
this.spectrumChart_G.resize()
},
handleSpectrumBChartResize() {
this.spectrumChart_B.resize()
},
handleHistogramChartResize() {
this.histogramChart.resize()
},
},
beforeDestroy() {
window.removeEventListener('resize', this.handleSpectrumGChartResize)
window.removeEventListener('resize', this.handleSpectrumBChartResize)
window.removeEventListener('resize', this.handleHistogramChartResize)
}, },
} }
</script> </script>
@ -1021,7 +1067,6 @@ export default {
padding: 15px 20px !important; padding: 15px 20px !important;
} }
.ant-row { .ant-row {
height: 36px;
line-height: 36px; line-height: 36px;
} }
.ant-tabs-tab-prev, .ant-tabs-tab-prev,