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