feat: Reprocessing功能,及三个Calibration中的Set to Current接口对接
This commit is contained in:
parent
3aedc2445d
commit
7d29399802
|
@ -63,8 +63,10 @@ export default {
|
|||
if (this.okHandler instanceof Function) {
|
||||
try {
|
||||
this.confirmLoading = true
|
||||
await this.okHandler()
|
||||
this.visible = false
|
||||
const success = await this.okHandler()
|
||||
if(success !== false) {
|
||||
this.visible = false
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
|
|
|
@ -203,7 +203,7 @@ export default {
|
|||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
throw new Error('Not Close')
|
||||
return false
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
:pagination="false"
|
||||
size="small"
|
||||
:class="list.length ? 'has-data' : ''"
|
||||
:scroll="{ y: 182 }"
|
||||
:scroll="{ y: 193 }"
|
||||
:selectedRowKeys.sync="selectedRowKeys"
|
||||
:canDeselect="false"
|
||||
@rowClick="handleRowClick"
|
||||
|
@ -116,7 +116,7 @@
|
|||
import ModalMixin from '@/mixins/ModalMixin'
|
||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||
import CustomChart from '@/components/CustomChart/index.vue'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { buildLineSeries } from '@/utils/chartHelper'
|
||||
import SampleDataMixin from '../../SampleDataMixin'
|
||||
|
@ -573,8 +573,20 @@ export default {
|
|||
this.getData(item)
|
||||
},
|
||||
|
||||
handleSetToCurrent() {
|
||||
async handleSetToCurrent() {
|
||||
this.appliedDataSource = this.currSelectedDataSource
|
||||
try {
|
||||
const { inputFileName: fileName } = this.sampleData
|
||||
|
||||
const { success, message } = await putAction(
|
||||
`/gamma/setCurrentEfficiency?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||
)
|
||||
if (!success) {
|
||||
this.$message.error(message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -621,7 +633,7 @@ export default {
|
|||
&.has-data {
|
||||
::v-deep {
|
||||
.ant-table-body {
|
||||
height: 182px;
|
||||
height: 193px;
|
||||
background-color: #06282a;
|
||||
}
|
||||
}
|
||||
|
@ -629,7 +641,7 @@ export default {
|
|||
|
||||
::v-deep {
|
||||
.ant-table-placeholder {
|
||||
height: 183px;
|
||||
height: 194px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
:pagination="false"
|
||||
size="small"
|
||||
:class="list.length ? 'has-data' : ''"
|
||||
:scroll="{ y: 182 }"
|
||||
:scroll="{ y: 193 }"
|
||||
:selectedRowKeys.sync="selectedRowKeys"
|
||||
:canDeselect="false"
|
||||
@rowClick="handleRowClick"
|
||||
|
@ -111,7 +111,7 @@
|
|||
import ModalMixin from '@/mixins/ModalMixin'
|
||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||
import CustomChart from '@/components/CustomChart/index.vue'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { buildLineSeries } from '@/utils/chartHelper'
|
||||
import SampleDataMixin from '../../SampleDataMixin'
|
||||
|
@ -532,8 +532,20 @@ export default {
|
|||
this.getData(item)
|
||||
},
|
||||
|
||||
handleSetToCurrent() {
|
||||
async handleSetToCurrent() {
|
||||
this.appliedDataSource = this.currSelectedDataSource
|
||||
try {
|
||||
const { inputFileName: fileName } = this.sampleData
|
||||
|
||||
const { success, message } = await putAction(
|
||||
`/gamma/setCurrentEnergy?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||
)
|
||||
if (!success) {
|
||||
this.$message.error(message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -580,7 +592,7 @@ export default {
|
|||
&.has-data {
|
||||
::v-deep {
|
||||
.ant-table-body {
|
||||
height: 182px;
|
||||
height: 193px;
|
||||
background-color: #06282a;
|
||||
}
|
||||
}
|
||||
|
@ -588,7 +600,7 @@ export default {
|
|||
|
||||
::v-deep {
|
||||
.ant-table-placeholder {
|
||||
height: 183px;
|
||||
height: 194px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
:pagination="false"
|
||||
size="small"
|
||||
:class="list.length ? 'has-data' : ''"
|
||||
:scroll="{ y: 182 }"
|
||||
:scroll="{ y: 193 }"
|
||||
:selectedRowKeys.sync="selectedRowKeys"
|
||||
:canDeselect="false"
|
||||
@rowClick="handleRowClick"
|
||||
|
@ -111,7 +111,7 @@
|
|||
import ModalMixin from '@/mixins/ModalMixin'
|
||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||
import CustomChart from '@/components/CustomChart/index.vue'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { buildLineSeries } from '@/utils/chartHelper'
|
||||
import SampleDataMixin from '../../SampleDataMixin'
|
||||
|
@ -530,8 +530,20 @@ export default {
|
|||
this.getData(item)
|
||||
},
|
||||
|
||||
handleSetToCurrent() {
|
||||
async handleSetToCurrent() {
|
||||
this.appliedDataSource = this.currSelectedDataSource
|
||||
try {
|
||||
const { inputFileName: fileName } = this.sampleData
|
||||
|
||||
const { success, message } = await putAction(
|
||||
`/gamma/setCurrentResolution?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||
)
|
||||
if (!success) {
|
||||
this.$message.error(message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -578,7 +590,7 @@ export default {
|
|||
&.has-data {
|
||||
::v-deep {
|
||||
.ant-table-body {
|
||||
height: 182px;
|
||||
height: 193px;
|
||||
background-color: #06282a;
|
||||
}
|
||||
}
|
||||
|
@ -586,7 +598,7 @@ export default {
|
|||
|
||||
::v-deep {
|
||||
.ant-table-placeholder {
|
||||
height: 183px;
|
||||
height: 194px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
|
@ -90,6 +90,9 @@
|
|||
/>
|
||||
|
||||
<compare-file-list-modal v-model="compareFileListModalVisible" @compareWithFile="handleCompareWithFile" />
|
||||
<!-- ReProcessing 弹窗开始 -->
|
||||
<re-processing-modal v-model="reprocessingModalVisible" />
|
||||
<!-- ReProcessing 弹窗结束 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -101,13 +104,14 @@ import QcFlags from './components/SubOperators/QcFlags.vue'
|
|||
import GraphAssistance from './components/SubOperators/GraphAssistance.vue'
|
||||
import NuclideLibrary from './components/SubOperators/NuclideLibrary.vue'
|
||||
import ButtonWithSwitchIcon from './components/SubOperators/ButtonWithSwitchIcon.vue'
|
||||
import { getAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import Response from './response.json'
|
||||
import { buildLineSeries, findSeriesByName, getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import axios from 'axios'
|
||||
import NuclideReviewModal from './components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue'
|
||||
import CompareFileListModal from './components/Modals/CompareFileListModal.vue'
|
||||
import ReProcessingModal from './components/Modals/ReProcessingModal/index.vue'
|
||||
|
||||
// 初始配置
|
||||
const initialOption = {
|
||||
|
@ -273,6 +277,7 @@ export default {
|
|||
ButtonWithSwitchIcon,
|
||||
NuclideReviewModal,
|
||||
CompareFileListModal,
|
||||
ReProcessingModal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -308,6 +313,8 @@ export default {
|
|||
currChannel: -1,
|
||||
|
||||
compareFileListModalVisible: false, // Compare 弹窗
|
||||
reprocessingModalVisible: false, // 重新分析弹窗
|
||||
isProcessing: false, // 正在处理
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -1086,63 +1093,9 @@ export default {
|
|||
|
||||
// 从分析工具刷新部分数据
|
||||
handleRefresh(data) {
|
||||
const { allData, shadowChannelChart, shadowEnergyChart, shapeChannelData, shapeEnergyData } = data
|
||||
|
||||
const channelPeakGroup = allData.filter((item) => item.name == 'Peak' && item.group == 'channel')
|
||||
const energyPeakGroup = allData.filter((item) => item.name == 'Peak' && item.group == 'energy')
|
||||
|
||||
const channelBaseLine = allData.find((item) => item.name == 'BaseLine' && item.group == 'channel')
|
||||
const energyBaseLine = allData.find((item) => item.name == 'BaseLine' && item.group == 'energy')
|
||||
|
||||
const channelLcLine = allData.find((item) => item.name == 'Lc' && item.group == 'channel')
|
||||
const energyLcLine = allData.find((item) => item.name == 'Lc' && item.group == 'energy')
|
||||
|
||||
const channelScacLine = allData.find((item) => item.name == 'Scac' && item.group == 'channel')
|
||||
const energyScacLine = allData.find((item) => item.name == 'Scac' && item.group == 'energy')
|
||||
|
||||
this.allEnergy = allData.find((item) => item.name == 'Energy' && item.group == 'energy')
|
||||
this.allChannel = allData.find((item) => item.name == 'Count' && item.group == 'channel')
|
||||
|
||||
// 保存Peak Line
|
||||
this.channelPeakGroup = channelPeakGroup
|
||||
this.energyPeakGroup = energyPeakGroup
|
||||
|
||||
// 保存 Spectrum Line
|
||||
this.shadowChannelChart = shadowChannelChart
|
||||
this.shadowEnergyChart = shadowEnergyChart
|
||||
|
||||
// 保存基线
|
||||
this.channelBaseLine = channelBaseLine
|
||||
this.energyBaseLine = energyBaseLine
|
||||
|
||||
// 保存Lc
|
||||
this.channelLcLine = channelLcLine
|
||||
this.energyLcLine = energyLcLine
|
||||
|
||||
// 保存Scac
|
||||
this.channelScacLine = channelScacLine
|
||||
this.energyScacLine = energyScacLine
|
||||
|
||||
// 保存 基线控制点
|
||||
this.shapeChannelData = shapeChannelData
|
||||
this.shapeEnergyData = shapeEnergyData
|
||||
|
||||
this.opts.notMerge = true
|
||||
this.redrawPeakLine()
|
||||
this.redrawCtrlPointBySeriesName()
|
||||
|
||||
this.redrawLineBySeriesName('BaseLine', this.energyBaseLine, this.channelBaseLine, this.graphAssistance.Baseline)
|
||||
this.redrawLineBySeriesName('LcLine', this.energyLcLine, this.channelLcLine, this.graphAssistance.Lc)
|
||||
this.redrawLineBySeriesName('ScacLine', this.energyScacLine, this.channelScacLine, this.graphAssistance.SCAC)
|
||||
this.redrawLineBySeriesName('Spectrum', this.shadowEnergyChart, this.shadowChannelChart)
|
||||
|
||||
this.redrawThumbnailChart()
|
||||
|
||||
this.clearCompareLine()
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.resetChartOpts()
|
||||
})
|
||||
this.reset()
|
||||
data.DetailedInformation = this.detailedInfomation
|
||||
this.dataProsess(data)
|
||||
},
|
||||
|
||||
// 分析工具Accept时刷新部分数据
|
||||
|
@ -1189,6 +1142,40 @@ export default {
|
|||
this.energyCompareLine = []
|
||||
},
|
||||
|
||||
// 重新分析
|
||||
async reProcessing() {
|
||||
if (this.isProcessing) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.isLoading) {
|
||||
this.$message.warn('Sample is Loading')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
this.isLoading = true
|
||||
this.reset()
|
||||
|
||||
const { inputFileName: fileName } = this.sample
|
||||
const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileName}`)
|
||||
if (success) {
|
||||
result.DetailedInformation = this.detailedInfomation
|
||||
this.dataProsess(result)
|
||||
} else {
|
||||
this.isLoading = false
|
||||
const arr = message.split('\n')
|
||||
this.$warning({
|
||||
title: 'Warning',
|
||||
content: () => arr.map((text) => <div>{text}</div>),
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
// this.reprocessingModalVisible = true
|
||||
},
|
||||
|
||||
// 重置缩略图表y轴最大值
|
||||
resetThumbnailChartDataMax() {
|
||||
this.thumbnailOption.yAxis.max = 'dataMax'
|
||||
|
|
|
@ -89,10 +89,6 @@
|
|||
<korsum-modal v-model="korsumModalShow" />
|
||||
<!-- Korsum 弹窗结束 -->
|
||||
|
||||
<!-- ReProcessing 弹窗开始 -->
|
||||
<re-processing-modal v-model="reprocessingModalVisible" />
|
||||
<!-- ReProcessing 弹窗结束 -->
|
||||
|
||||
<!-- Zero Time 弹窗开始 -->
|
||||
<zero-time-modal v-model="zeroTimeModalVisible" :sampleId="sampleData.sampleId" />
|
||||
<!-- Zero Time 弹窗结束 -->
|
||||
|
@ -209,7 +205,6 @@ import SaveSettingModal from './components/Modals/SaveSettingModal.vue'
|
|||
import AnalyzeSettingModal from './components/Modals/AnalyzeSettingModal.vue'
|
||||
import AnalyzeInteractiveToolModal from './components/Modals/AnalyzeInteractiveToolModal/index.vue'
|
||||
import KorsumModal from './components/Modals/KorsumModal.vue'
|
||||
import ReProcessingModal from './components/Modals/ReProcessingModal/index.vue'
|
||||
import ZeroTimeModal from './components/Modals/ZeroTimeModal.vue'
|
||||
import EfficiencyCalibrationModal from './components/Modals/EfficiencyCalibrationModal.vue'
|
||||
import EnergyCalibrationModal from './components/Modals/EnergyCalibrationModal.vue'
|
||||
|
@ -256,7 +251,6 @@ export default {
|
|||
AnalyzeSettingModal,
|
||||
AnalyzeInteractiveToolModal,
|
||||
KorsumModal,
|
||||
ReProcessingModal,
|
||||
ZeroTimeModal,
|
||||
EfficiencyCalibrationModal,
|
||||
EnergyCalibrationModal,
|
||||
|
@ -314,7 +308,6 @@ export default {
|
|||
saveSettingModalVisible: false, // 保存设置弹窗
|
||||
|
||||
analyzeConfigureModalVisible: false, // 分析设置弹窗
|
||||
reprocessingModalVisible: false, // 重新分析弹窗
|
||||
analyzeInteractiveToolModalVisible: false, // 分析工具弹窗
|
||||
zeroTimeModalVisible: false, // Zero Time 弹窗
|
||||
korsumModalShow: false, // Korsum 弹窗
|
||||
|
@ -762,9 +755,9 @@ export default {
|
|||
},
|
||||
{
|
||||
type: 'a-menu-item',
|
||||
title: 'ReProcessing',
|
||||
title: 'Reprocessing',
|
||||
show: this.isGamma,
|
||||
handler: () => (this.reprocessingModalVisible = true),
|
||||
handler: () => this.$refs.gammaAnalysisRef.reProcessing(),
|
||||
},
|
||||
{
|
||||
type: 'a-menu-item',
|
||||
|
|
Loading…
Reference in New Issue
Block a user