fix: Compare功能,和Configure的Save对接,及部分主页面的修改

This commit is contained in:
Xu Zhimeng 2023-09-25 14:55:51 +08:00
parent fc63d2c568
commit 3aedc2445d
5 changed files with 339 additions and 52 deletions

View File

@ -407,6 +407,12 @@ const thumbnailOption = {
series: null series: null
} }
const nuclideIdentifyModal = {
possibleNuclide: '',
tolerance: 0.5,
identifiedNuclide: ''
}
// //
export const Operators = { export const Operators = {
ADD: 1, // ADD: 1, //
@ -442,6 +448,7 @@ export default {
energy: [], energy: [],
list: [], list: [],
BaseCtrls: {}, BaseCtrls: {},
FitBaseLine: '#fff',
sampleId: -1, sampleId: -1,
peakCommentModalVisible: false, // Comment peakCommentModalVisible: false, // Comment
@ -454,11 +461,7 @@ export default {
fitPeaksAndBaselineModalVisible: false, // Fit Peaks And Base Line fitPeaksAndBaselineModalVisible: false, // Fit Peaks And Base Line
nuclideReviewModalVisible: false, // Nuclide Review nuclideReviewModalVisible: false, // Nuclide Review
model: { model: cloneDeep(nuclideIdentifyModal),
possibleNuclide: '',
tolerance: 0.5,
identifiedNuclide: ''
},
currChannel: undefined, // currChannelchannel currChannel: undefined, // currChannelchannel
selectedTableItem: undefined, // selectedTableItem: undefined, //
@ -483,6 +486,9 @@ export default {
try { try {
this.isLoading = true this.isLoading = true
this.option.series = [] this.option.series = []
this.thumbnailOption.series = []
this.list = []
this.model = cloneDeep(nuclideIdentifyModal)
const { success, result, message } = await getAction('/gamma/InteractiveTool', { const { success, result, message } = await getAction('/gamma/InteractiveTool', {
sampleId: this.sampleId, sampleId: this.sampleId,
@ -501,7 +507,8 @@ export default {
channelPeakChart, channelPeakChart,
energy, energy,
table, table,
BaseCtrls BaseCtrls,
FitBaseLine
} = result } = result
console.log('%c [ ]-374', 'font-size:13px; background:pink; color:#bf2c9f;', result) console.log('%c [ ]-374', 'font-size:13px; background:pink; color:#bf2c9f;', result)
@ -512,6 +519,7 @@ export default {
this.channelPeakChart = channelPeakChart this.channelPeakChart = channelPeakChart
this.energy = energy this.energy = energy
this.BaseCtrls = BaseCtrls this.BaseCtrls = BaseCtrls
this.FitBaseLine = FitBaseLine
const series = [] const series = []
@ -1246,7 +1254,7 @@ export default {
const baseLineEditSeries = buildLineSeries( const baseLineEditSeries = buildLineSeries(
'BaseLine_Edit', 'BaseLine_Edit',
this._channelBaseLineChart.pointlist.map(({ x, y }) => [x, y]), this._channelBaseLineChart.pointlist.map(({ x, y }) => [x, y]),
'#fff', this.FitBaseLine,
{ {
zlevel: 21 zlevel: 21
} }
@ -1296,6 +1304,8 @@ export default {
buildGraphicRect(xAxis, yAxis) { buildGraphicRect(xAxis, yAxis) {
const chart = this.$refs.chartRef.getChartInstance() const chart = this.$refs.chartRef.getChartInstance()
const [xPix, yPix] = chart.convertToPixel('grid', [xAxis, yAxis]) const [xPix, yPix] = chart.convertToPixel('grid', [xAxis, yAxis])
const that = this
return { return {
type: 'rect', type: 'rect',
id: Math.random().toString(), id: Math.random().toString(),
@ -1312,12 +1322,12 @@ export default {
fill: 'transparent', fill: 'transparent',
lineWidth: 2 lineWidth: 2
}, },
draggable: false, draggable: this.isModifying,
ondrag: function() { ondrag: function() {
const [xPixel] = chart.convertToPixel('grid', [xAxis, yAxis]) const [xPixel] = chart.convertToPixel('grid', [xAxis, yAxis])
// x // x
this.position[0] = xPixel this.position[0] = xPixel
this.redrawBaseLine() that.redrawBaseLine()
}, },
ondragend: ({ offsetY }) => { ondragend: ({ offsetY }) => {
this.setGraphicDraggable(false) this.setGraphicDraggable(false)
@ -1351,7 +1361,7 @@ export default {
// 线 // 线
redrawBaseLine() { redrawBaseLine() {
console.log('%c [ 重新生成基线 ]-1355', 'font-size:13px; background:pink; color:#bf2c9f;', ) console.log('%c [ 重新生成基线 ]-1355', 'font-size:13px; background:pink; color:#bf2c9f;')
}, },
// + // +
@ -1472,7 +1482,7 @@ export default {
// //
handleModifyCP() { handleModifyCP() {
this.setGraphicDraggable(true) this.setGraphicDraggable(!this.isModifying)
}, },
// //

View File

@ -13,44 +13,40 @@
<a-form-model :colon="false" :labelCol="{ style: { width: '160px' } }"> <a-form-model :colon="false" :labelCol="{ style: { width: '160px' } }">
<a-form-model-item label="ECutAnalysis_Low"> <a-form-model-item label="ECutAnalysis_Low">
<div class="input-with-unit"> <div class="input-with-unit">
<a-input-number v-model="model.edit_ps_low"></a-input-number> <a-input v-model="model.edit_ps_low"></a-input>
KeV KeV
</div> </div>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="ECutAnalysis_High"> <a-form-model-item label="ECutAnalysis_High">
<div class="input-with-unit"> <div class="input-with-unit">
<a-input-number v-model="model.edit_ps_high"></a-input-number> <a-input v-model="model.edit_ps_high"></a-input>
KeV KeV
</div> </div>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="EnergyTolerance"> <a-form-model-item label="EnergyTolerance">
<div class="input-with-unit"> <div class="input-with-unit">
<a-input-number v-model="model.edit_energy"></a-input-number> <a-input v-model="model.edit_energy"></a-input>
KeV KeV
</div> </div>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="PSS_low"> <a-form-model-item label="PSS_low">
<a-input-number v-model="model.edit_pss_low"></a-input-number> <a-input v-model="model.edit_pss_low"></a-input>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</title-over-border> </title-over-border>
<title-over-border title="Calibration Peak Searching"> <title-over-border title="Calibration Peak Searching">
<a-form-model :colon="false" :labelCol="{ style: { width: '170px' } }"> <a-form-model :colon="false" :labelCol="{ style: { width: '170px' } }">
<a-form-model-item label="CalibrationPSS_low"> <a-form-model-item label="CalibrationPSS_low">
<a-input-number v-model="model.edit_cal_low" disabled></a-input-number> <a-input v-model="model.edit_cal_low" disabled></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="CalibrationPSS_high"> <a-form-model-item label="CalibrationPSS_high">
<a-input-number v-model="model.edit_cal_high" disabled></a-input-number> <a-input v-model="model.edit_cal_high" disabled></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item> <a-form-model-item>
<a-checkbox v-model="model.checkBox_updateCal" disabled> <a-checkbox v-model="model.checkBox_updateCal" disabled> Update Calibration </a-checkbox>
Update Calibration
</a-checkbox>
</a-form-model-item> </a-form-model-item>
<a-form-model-item> <a-form-model-item>
<a-checkbox v-model="model.checkBox_keepPeak" disabled> <a-checkbox v-model="model.checkBox_keepPeak" disabled> Keep Calibration Peak Search Peaks </a-checkbox>
Keep Calibration Peak Search Peaks
</a-checkbox>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</title-over-border> </title-over-border>
@ -61,13 +57,13 @@
<title-over-border title="Baseline Param"> <title-over-border title="Baseline Param">
<a-form-model :colon="false" :labelCol="{ style: { width: '90px' } }"> <a-form-model :colon="false" :labelCol="{ style: { width: '90px' } }">
<a-form-model-item label="k_back"> <a-form-model-item label="k_back">
<a-input-number v-model="model.edit_k_back"></a-input-number> <a-input v-model="model.edit_k_back"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="k_alpha"> <a-form-model-item label="k_alpha">
<a-input-number v-model="model.edit_k_alpha"></a-input-number> <a-input v-model="model.edit_k_alpha"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="k_beta"> <a-form-model-item label="k_beta">
<a-input-number v-model="model.edit_k_beta"></a-input-number> <a-input v-model="model.edit_k_beta"></a-input>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</title-over-border> </title-over-border>
@ -75,12 +71,12 @@
<a-form-model :colon="false" :labelCol="{ style: { width: '150px' } }"> <a-form-model :colon="false" :labelCol="{ style: { width: '150px' } }">
<title-over-border title="BaseImprove"> <title-over-border title="BaseImprove">
<a-form-model-item label="BaseImprovePSS"> <a-form-model-item label="BaseImprovePSS">
<a-input-number v-model="model.edit_bi_pss"></a-input-number> <a-input v-model="model.edit_bi_pss"></a-input>
</a-form-model-item> </a-form-model-item>
</title-over-border> </title-over-border>
<title-over-border title="LC Computing" style="margin-top: 20px"> <title-over-border title="LC Computing" style="margin-top: 20px">
<a-form-model-item label="RiskLevelK"> <a-form-model-item label="RiskLevelK">
<a-input-number v-model="model.edit_riskLevelK"></a-input-number> <a-input v-model="model.edit_riskLevelK"></a-input>
</a-form-model-item> </a-form-model-item>
</title-over-border> </title-over-border>
</a-form-model> </a-form-model>
@ -90,10 +86,20 @@
<!-- 第三行 --> <!-- 第三行 -->
<div class="analysis-settings-item"> <div class="analysis-settings-item">
<title-over-border title="Activity Reference Time"> <title-over-border title="Activity Reference Time">
<custom-date-picker show-time v-model="model.dateTime_Act"></custom-date-picker> <custom-date-picker
show-time
format="YYYY/MM/DD HH:mm:ss"
valueFormat="YYYY/MM/DD HH:mm:ss"
v-model="model.dateTime_Act"
></custom-date-picker>
</title-over-border> </title-over-border>
<title-over-border title="Concentration Reference Time"> <title-over-border title="Concentration Reference Time">
<custom-date-picker show-time v-model="model.dateTime_Conc"></custom-date-picker> <custom-date-picker
show-time
format="YYYY/MM/DD HH:mm:ss"
valueFormat="YYYY/MM/DD HH:mm:ss"
v-model="model.dateTime_Conc"
></custom-date-picker>
</title-over-border> </title-over-border>
</div> </div>
@ -106,10 +112,11 @@
</template> </template>
<script> <script>
import { getAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import TitleOverBorder from '../TitleOverBorder.vue' import TitleOverBorder from '../TitleOverBorder.vue'
import ModalMixin from '@/mixins/ModalMixin' import ModalMixin from '@/mixins/ModalMixin'
import SampleDataMixin from '../../SampleDataMixin' import SampleDataMixin from '../../SampleDataMixin'
import moment from 'moment'
export default { export default {
components: { TitleOverBorder }, components: { TitleOverBorder },
@ -117,7 +124,7 @@ export default {
data() { data() {
return { return {
isLoading: false, isLoading: false,
model: {} model: {},
} }
}, },
methods: { methods: {
@ -127,13 +134,18 @@ export default {
const { sampleId, inputFileName: fileName } = this.sampleData const { sampleId, inputFileName: fileName } = this.sampleData
const { success, result, message } = await getAction('/gamma/configure', { const { success, result, message } = await getAction('/gamma/configure', {
sampleId, sampleId,
fileName fileName,
}) })
this.isLoading = false this.isLoading = false
if (success) { if (success) {
this.model = result if (result.edit_ps_high == -9999) {
result.edit_ps_high = 'inf'
}
console.log('%c [ ]-137', 'font-size:13px; background:pink; color:#bf2c9f;', result) result.dateTime_Act = moment(result.dateTime_Act).format('YYYY/MM/DD HH:mm:ss')
result.dateTime_Conc = moment(result.dateTime_Conc).format('YYYY/MM/DD HH:mm:ss')
this.model = result
} else { } else {
this.$message.error(message) this.$message.error(message)
} }
@ -145,10 +157,56 @@ export default {
beforeModalOpen() { beforeModalOpen() {
this.getInfo() this.getInfo()
}, },
handleOk() { async handleOk() {
console.log('%c [ handleOk ]-121', 'font-size:13px; background:pink; color:#bf2c9f;') try {
} const { inputFileName: fileName } = this.sampleData
}
const {
edit_ps_low,
edit_ps_high,
edit_energy,
edit_pss_low,
edit_cal_low,
edit_cal_high,
edit_k_back,
edit_k_alpha,
edit_k_beta,
edit_bi_pss,
edit_riskLevelK,
dateTime_Act,
dateTime_Conc,
} = this.model
const param = {
fileName,
ecutAnalysis_Low: edit_ps_low,
ecutAnalysis_High: edit_ps_high == 'inf' ? -9999 : edit_ps_high,
energyTolerance: edit_energy,
pss_low: edit_pss_low,
calibrationPSS_low: edit_cal_low,
calibrationPSS_high: edit_cal_high,
k_back: edit_k_back,
k_alpha: edit_k_alpha,
k_beta: edit_k_beta,
baseImprovePSS: edit_bi_pss,
riskLevelK: edit_riskLevelK,
refTime_act: dateTime_Act,
refTime_conc: dateTime_Conc,
}
const { success, message } = await postAction('/gamma/configureSave', param)
if (success) {
this.$message.success('Save Success')
} else {
this.$message.error(message)
}
} catch (error) {
console.error(error)
} finally {
throw new Error('Not Close')
}
},
},
} }
</script> </script>
@ -198,7 +256,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
.ant-input-number { .ant-input {
margin-right: 10px; margin-right: 10px;
} }
} }

View File

@ -0,0 +1,138 @@
<template>
<custom-modal v-model="visible" :width="1200" title="File List">
<search-form :items="formItems" v-model="queryParam" @search="searchQuery"></search-form>
<custom-table
:columns="columns"
:list="dataSource"
:loading="loading"
:pagination="ipagination"
:selectedRowKeys.sync="selectedRowKeys"
:selectionRows.sync="selectionRows"
:scroll="{ y: 440 }"
@change="handleTableChange"
></custom-table>
<div slot="custom-footer">
<a-button type="primary" :loading="isComparing" @click="handleOk">Compare</a-button>
<a-button @click="visible = false">Cancel</a-button>
</div>
</custom-modal>
</template>
<script>
import { getAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ModalMixin from '@/mixins/ModalMixin'
import SampleDataMixin from '../../SampleDataMixin'
const columns = [
{
title: 'Name',
dataIndex: 'name',
width: '45%',
align: 'left',
ellipsis: true
},
{
title: 'UpdateDate',
dataIndex: 'updateDate',
align: 'left'
},
{
title: 'Size',
dataIndex: 'size',
align: 'left'
}
]
const formItems = [
{
label: '',
type: 'a-input',
name: 'searchName',
props: {
placeholder: 'search...'
}
}
]
export default {
mixins: [ModalMixin, JeecgListMixin, SampleDataMixin],
data() {
this.columns = columns
this.formItems = formItems
return {
queryParam: {},
selectedRowKeys: [],
selectionRows: [],
isComparing: false
}
},
methods: {
beforeModalOpen() {
this.selectedRowKeys = []
},
loadData(arg) {
// 1
if (arg === 1) {
this.ipagination.current = 1
}
this.onClearSelected()
const params = this.getQueryParams() //
const searchName = this.queryParam.searchName
params.name = `${searchName ? `${searchName},` : ''}_S_`
this.loading = true
getAction('/spectrumFile/get', params)
.then(res => {
if (res.success) {
this.dataSource = res.result.records
this.dataSource.forEach((item, index) => {
item.id = index
})
if (res.result.total) {
this.ipagination.total = res.result.total
} else {
this.ipagination.total = 0
}
} else {
this.$message.warning(res.message)
}
})
.finally(() => {
this.loading = false
})
},
async handleOk() {
if (!this.selectedRowKeys.length) {
this.$message.warn('Please Select A File to Compare')
return
}
try {
const { inputFileName: fileName } = this.sampleData
const compareFileName = this.selectionRows[0].name
this.isComparing = true
const { success, result, message } = await getAction('/gamma/Compare', {
fileName,
compareFileName
})
if (success) {
this.visible = false
this.$emit('compareWithFile', result)
} else {
this.$message.error(message)
}
} catch (error) {
console.error(error)
} finally {
this.isComparing = false
}
}
}
}
</script>
<style></style>

View File

@ -88,6 +88,8 @@
:channel="currChannel" :channel="currChannel"
:nuclide="nuclideReview.nuclide" :nuclide="nuclideReview.nuclide"
/> />
<compare-file-list-modal v-model="compareFileListModalVisible" @compareWithFile="handleCompareWithFile" />
</div> </div>
</template> </template>
@ -105,6 +107,7 @@ import { buildLineSeries, findSeriesByName, getXAxisAndYAxisByPosition, rangeNum
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
import axios from 'axios' import axios from 'axios'
import NuclideReviewModal from './components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue' import NuclideReviewModal from './components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue'
import CompareFileListModal from './components/Modals/CompareFileListModal.vue'
// //
const initialOption = { const initialOption = {
@ -269,6 +272,7 @@ export default {
NuclideLibrary, NuclideLibrary,
ButtonWithSwitchIcon, ButtonWithSwitchIcon,
NuclideReviewModal, NuclideReviewModal,
CompareFileListModal,
}, },
data() { data() {
return { return {
@ -302,6 +306,8 @@ export default {
nuclide: '', nuclide: '',
}, },
currChannel: -1, currChannel: -1,
compareFileListModalVisible: false, // Compare
} }
}, },
created() { created() {
@ -359,8 +365,7 @@ export default {
const { inputFileName: fileName } = this.sample const { inputFileName: fileName } = this.sample
try { try {
this.isLoading = true this.isLoading = true
this.option.series = [] this.reset()
this.thumbnailOption.series = []
// const { success, result, message } = Response // const { success, result, message } = Response
const { success, result, message } = await getAction('/gamma/gammaByFile', { const { success, result, message } = await getAction('/gamma/gammaByFile', {
fileName, fileName,
@ -439,11 +444,8 @@ export default {
this.shapeChannelData = shapeChannelData this.shapeChannelData = shapeChannelData
this.shapeEnergyData = shapeEnergyData this.shapeEnergyData = shapeEnergyData
this.option.yAxis.max = this.option.yAxis.max = 'dataMax'
shadowChannelChart.pointlist && Math.ceil(Math.max(...shadowChannelChart.pointlist.map((item) => item.y)) * 1.1) this.resetThumbnailChartDataMax()
this.thumbnailOption.yAxis.max =
shadowChannelChart.pointlist && Math.ceil(Math.max(...shadowChannelChart.pointlist.map((item) => item.y)) * 1.1)
const series = [] const series = []
// Spectrum Line // Spectrum Line
@ -566,6 +568,13 @@ export default {
) )
}) })
series.push(...peakLines) series.push(...peakLines)
series.push(
buildLineSeries('Compare', [], '#fff', {
symbolSize: 2,
})
)
this.option.series = series this.option.series = series
this.option.tooltip.formatter = this.tooltipFormatter this.option.tooltip.formatter = this.tooltipFormatter
@ -590,6 +599,8 @@ export default {
// Graph Assistance // Graph Assistance
handleGraphAssistanceChange({ type, label, value }) { handleGraphAssistanceChange({ type, label, value }) {
const compareLineSeries = findSeriesByName(this.option.series, 'Compare')
// //
if (type == 'labelChange') { if (type == 'labelChange') {
switch (label) { switch (label) {
@ -629,6 +640,8 @@ export default {
this.redrawPeakLine() this.redrawPeakLine()
this.redrawThumbnailChart() this.redrawThumbnailChart()
this.redrawLineBySeriesName('Compare', this.energyCompareLine, this.channelCompareLine)
break break
case 'Lines': case 'Lines':
this.option.series[0].type = 'line' this.option.series[0].type = 'line'
@ -636,6 +649,9 @@ export default {
this.thumbnailOption.series[0].type = 'line' this.thumbnailOption.series[0].type = 'line'
this.thumbnailOption.series[0].symbol = 'none' this.thumbnailOption.series[0].symbol = 'none'
compareLineSeries.type = 'line'
compareLineSeries.symbol = 'none'
break break
case 'Scatter': case 'Scatter':
this.option.series[0].type = 'scatterGL' this.option.series[0].type = 'scatterGL'
@ -643,6 +659,9 @@ export default {
this.thumbnailOption.series[0].type = 'scatterGL' this.thumbnailOption.series[0].type = 'scatterGL'
this.thumbnailOption.series[0].symbol = 'circle' this.thumbnailOption.series[0].symbol = 'circle'
compareLineSeries.type = 'scatterGL'
compareLineSeries.symbol = 'circle'
break break
} }
} }
@ -677,7 +696,7 @@ export default {
}, },
// seriesName线 // seriesName线
redrawLineBySeriesName(seriesName, energyData, channelData, isShow = true) { redrawLineBySeriesName(seriesName, energyData, channelData, isShow = true, color) {
const series = findSeriesByName(this.option.series, seriesName) const series = findSeriesByName(this.option.series, seriesName)
if (isShow) { if (isShow) {
const data = this.isEnergy() ? energyData : channelData const data = this.isEnergy() ? energyData : channelData
@ -685,6 +704,9 @@ export default {
} else { } else {
series.data = [] series.data = []
} }
if (color) {
series.itemStyle.color = color
}
}, },
// //
@ -1055,7 +1077,7 @@ export default {
this.option.xAxis.min = 1 this.option.xAxis.min = 1
this.option.xAxis.max = 'dataMax' this.option.xAxis.max = 'dataMax'
this.option.yAxis.min = 1 this.option.yAxis.min = 1
this.option.yAxis.max = Math.ceil(Math.max(...this.shadowChannelChart.pointlist.map((item) => item.y)) * 1.1) this.option.yAxis.max = 'dataMax'
this.thumbnailOption.series[0].markLine.data = [] this.thumbnailOption.series[0].markLine.data = []
this.thumbnailChartRect = [] this.thumbnailChartRect = []
@ -1115,6 +1137,9 @@ export default {
this.redrawLineBySeriesName('Spectrum', this.shadowEnergyChart, this.shadowChannelChart) this.redrawLineBySeriesName('Spectrum', this.shadowEnergyChart, this.shadowChannelChart)
this.redrawThumbnailChart() this.redrawThumbnailChart()
this.clearCompareLine()
this.$nextTick(() => { this.$nextTick(() => {
this.resetChartOpts() this.resetChartOpts()
}) })
@ -1123,6 +1148,50 @@ export default {
// Accept // Accept
handleAccept() { handleAccept() {
console.log('%c [ 分析工具Accept时刷新部分数据 ]-1046', 'font-size:13px; background:pink; color:#bf2c9f;') console.log('%c [ 分析工具Accept时刷新部分数据 ]-1046', 'font-size:13px; background:pink; color:#bf2c9f;')
this.clearCompareLine()
},
//
showCompareModal() {
if (this.isLoading) {
this.$message.warn('Sample is Loading')
return
}
this.clearCompareLine()
this.compareFileListModalVisible = true
},
//
handleCompareWithFile([channelData, energyData]) {
this.channelCompareLine = channelData
this.energyCompareLine = energyData
this.redrawLineBySeriesName('Compare', energyData, channelData, true, channelData.color)
if (this.option.series[0].type == 'scatterGL') {
lineSeries.type = 'scatterGL'
}
this.$nextTick(() => {
const chart = this.$refs.chartRef.getChartInstance()
const yAxisMax = chart.getModel().getComponent('yAxis').axis.scale._extent[1]
this.thumbnailOption.yAxis.max = yAxisMax
})
},
// Compare 线
clearCompareLine() {
const compareLine = findSeriesByName(this.option.series, 'Compare')
if (compareLine) {
compareLine.data = []
this.resetThumbnailChartDataMax()
}
this.channelCompareLine = []
this.energyCompareLine = []
},
// y
resetThumbnailChartDataMax() {
this.thumbnailOption.yAxis.max = 'dataMax'
}, },
// //
@ -1220,11 +1289,17 @@ export default {
this.channelScacLine.color = Color_Scac this.channelScacLine.color = Color_Scac
this.energyScacLine.color = Color_Scac this.energyScacLine.color = Color_Scac
if (this.channelCompareLine) {
this.channelCompareLine.color = Color_Compare
this.energyCompareLine.color = Color_Compare
}
this.changeColorBySeriesName('Spectrum', Color_Spec) this.changeColorBySeriesName('Spectrum', Color_Spec)
this.changePeakLineColor(Color_Peak) this.changePeakLineColor(Color_Peak)
this.changeColorBySeriesName('LcLine', Color_Lc) this.changeColorBySeriesName('LcLine', Color_Lc)
this.changeColorBySeriesName('BaseLine', Color_Base) this.changeColorBySeriesName('BaseLine', Color_Base)
this.changeColorBySeriesName('ScacLine', Color_Scac) this.changeColorBySeriesName('ScacLine', Color_Scac)
this.changeColorBySeriesName('Compare', Color_Compare)
const thumbnailChartSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum') const thumbnailChartSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
thumbnailChartSeries.itemStyle.color = Color_Spec thumbnailChartSeries.itemStyle.color = Color_Spec

View File

@ -643,8 +643,9 @@ export default {
}, },
{ {
type: 'a-menu-item', type: 'a-menu-item',
title: 'Clean All', title: 'Compare',
handler: this.handleCleanAll, show: this.isGamma,
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(),
}, },
{ {
type: 'a-menu-item', type: 'a-menu-item',
@ -658,6 +659,11 @@ export default {
show: this.isGamma, show: this.isGamma,
handler: () => (this.ftransltModalVisible = true), handler: () => (this.ftransltModalVisible = true),
}, },
{
type: 'a-menu-item',
title: 'Clean All',
handler: this.handleCleanAll,
},
], ],
}, },
{ {