feat: Reprocessing功能,及三个Calibration中的Set to Current接口对接

This commit is contained in:
Xu Zhimeng 2023-09-25 16:58:46 +08:00
parent 3aedc2445d
commit 7d29399802
7 changed files with 103 additions and 85 deletions

View File

@ -63,8 +63,10 @@ export default {
if (this.okHandler instanceof Function) { if (this.okHandler instanceof Function) {
try { try {
this.confirmLoading = true this.confirmLoading = true
await this.okHandler() const success = await this.okHandler()
this.visible = false if(success !== false) {
this.visible = false
}
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} finally { } finally {

View File

@ -203,7 +203,7 @@ export default {
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} finally { } finally {
throw new Error('Not Close') return false
} }
}, },
}, },

View File

@ -44,7 +44,7 @@
:pagination="false" :pagination="false"
size="small" size="small"
:class="list.length ? 'has-data' : ''" :class="list.length ? 'has-data' : ''"
:scroll="{ y: 182 }" :scroll="{ y: 193 }"
:selectedRowKeys.sync="selectedRowKeys" :selectedRowKeys.sync="selectedRowKeys"
:canDeselect="false" :canDeselect="false"
@rowClick="handleRowClick" @rowClick="handleRowClick"
@ -116,7 +116,7 @@
import ModalMixin from '@/mixins/ModalMixin' import ModalMixin from '@/mixins/ModalMixin'
import TitleOverBorder from '../TitleOverBorder.vue' import TitleOverBorder from '../TitleOverBorder.vue'
import CustomChart from '@/components/CustomChart/index.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 { cloneDeep } from 'lodash'
import { buildLineSeries } from '@/utils/chartHelper' import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin' import SampleDataMixin from '../../SampleDataMixin'
@ -573,8 +573,20 @@ export default {
this.getData(item) this.getData(item)
}, },
handleSetToCurrent() { async handleSetToCurrent() {
this.appliedDataSource = this.currSelectedDataSource this.appliedDataSource = this.currSelectedDataSource
try {
const { inputFileName: fileName } = this.sampleData
const { success, message } = await putAction(
`/gamma/setCurrentEfficiency?fileName=${fileName}&currentName=${this.currSelectedDataSource}`
)
if (!success) {
this.$message.error(message)
}
} catch (error) {
console.error(error)
}
} }
} }
} }
@ -621,7 +633,7 @@ export default {
&.has-data { &.has-data {
::v-deep { ::v-deep {
.ant-table-body { .ant-table-body {
height: 182px; height: 193px;
background-color: #06282a; background-color: #06282a;
} }
} }
@ -629,7 +641,7 @@ export default {
::v-deep { ::v-deep {
.ant-table-placeholder { .ant-table-placeholder {
height: 183px; height: 194px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -44,7 +44,7 @@
:pagination="false" :pagination="false"
size="small" size="small"
:class="list.length ? 'has-data' : ''" :class="list.length ? 'has-data' : ''"
:scroll="{ y: 182 }" :scroll="{ y: 193 }"
:selectedRowKeys.sync="selectedRowKeys" :selectedRowKeys.sync="selectedRowKeys"
:canDeselect="false" :canDeselect="false"
@rowClick="handleRowClick" @rowClick="handleRowClick"
@ -111,7 +111,7 @@
import ModalMixin from '@/mixins/ModalMixin' import ModalMixin from '@/mixins/ModalMixin'
import TitleOverBorder from '../TitleOverBorder.vue' import TitleOverBorder from '../TitleOverBorder.vue'
import CustomChart from '@/components/CustomChart/index.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 { cloneDeep } from 'lodash'
import { buildLineSeries } from '@/utils/chartHelper' import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin' import SampleDataMixin from '../../SampleDataMixin'
@ -532,8 +532,20 @@ export default {
this.getData(item) this.getData(item)
}, },
handleSetToCurrent() { async handleSetToCurrent() {
this.appliedDataSource = this.currSelectedDataSource this.appliedDataSource = this.currSelectedDataSource
try {
const { inputFileName: fileName } = this.sampleData
const { success, message } = await putAction(
`/gamma/setCurrentEnergy?fileName=${fileName}&currentName=${this.currSelectedDataSource}`
)
if (!success) {
this.$message.error(message)
}
} catch (error) {
console.error(error)
}
} }
} }
} }
@ -580,7 +592,7 @@ export default {
&.has-data { &.has-data {
::v-deep { ::v-deep {
.ant-table-body { .ant-table-body {
height: 182px; height: 193px;
background-color: #06282a; background-color: #06282a;
} }
} }
@ -588,7 +600,7 @@ export default {
::v-deep { ::v-deep {
.ant-table-placeholder { .ant-table-placeholder {
height: 183px; height: 194px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -44,7 +44,7 @@
:pagination="false" :pagination="false"
size="small" size="small"
:class="list.length ? 'has-data' : ''" :class="list.length ? 'has-data' : ''"
:scroll="{ y: 182 }" :scroll="{ y: 193 }"
:selectedRowKeys.sync="selectedRowKeys" :selectedRowKeys.sync="selectedRowKeys"
:canDeselect="false" :canDeselect="false"
@rowClick="handleRowClick" @rowClick="handleRowClick"
@ -111,7 +111,7 @@
import ModalMixin from '@/mixins/ModalMixin' import ModalMixin from '@/mixins/ModalMixin'
import TitleOverBorder from '../TitleOverBorder.vue' import TitleOverBorder from '../TitleOverBorder.vue'
import CustomChart from '@/components/CustomChart/index.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 { cloneDeep } from 'lodash'
import { buildLineSeries } from '@/utils/chartHelper' import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin' import SampleDataMixin from '../../SampleDataMixin'
@ -530,8 +530,20 @@ export default {
this.getData(item) this.getData(item)
}, },
handleSetToCurrent() { async handleSetToCurrent() {
this.appliedDataSource = this.currSelectedDataSource this.appliedDataSource = this.currSelectedDataSource
try {
const { inputFileName: fileName } = this.sampleData
const { success, message } = await putAction(
`/gamma/setCurrentResolution?fileName=${fileName}&currentName=${this.currSelectedDataSource}`
)
if (!success) {
this.$message.error(message)
}
} catch (error) {
console.error(error)
}
} }
} }
} }
@ -578,7 +590,7 @@ export default {
&.has-data { &.has-data {
::v-deep { ::v-deep {
.ant-table-body { .ant-table-body {
height: 182px; height: 193px;
background-color: #06282a; background-color: #06282a;
} }
} }
@ -586,7 +598,7 @@ export default {
::v-deep { ::v-deep {
.ant-table-placeholder { .ant-table-placeholder {
height: 183px; height: 194px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -90,6 +90,9 @@
/> />
<compare-file-list-modal v-model="compareFileListModalVisible" @compareWithFile="handleCompareWithFile" /> <compare-file-list-modal v-model="compareFileListModalVisible" @compareWithFile="handleCompareWithFile" />
<!-- ReProcessing 弹窗开始 -->
<re-processing-modal v-model="reprocessingModalVisible" />
<!-- ReProcessing 弹窗结束 -->
</div> </div>
</template> </template>
@ -101,13 +104,14 @@ import QcFlags from './components/SubOperators/QcFlags.vue'
import GraphAssistance from './components/SubOperators/GraphAssistance.vue' import GraphAssistance from './components/SubOperators/GraphAssistance.vue'
import NuclideLibrary from './components/SubOperators/NuclideLibrary.vue' import NuclideLibrary from './components/SubOperators/NuclideLibrary.vue'
import ButtonWithSwitchIcon from './components/SubOperators/ButtonWithSwitchIcon.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 Response from './response.json'
import { buildLineSeries, findSeriesByName, getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper' import { buildLineSeries, findSeriesByName, getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper'
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' import CompareFileListModal from './components/Modals/CompareFileListModal.vue'
import ReProcessingModal from './components/Modals/ReProcessingModal/index.vue'
// //
const initialOption = { const initialOption = {
@ -273,6 +277,7 @@ export default {
ButtonWithSwitchIcon, ButtonWithSwitchIcon,
NuclideReviewModal, NuclideReviewModal,
CompareFileListModal, CompareFileListModal,
ReProcessingModal,
}, },
data() { data() {
return { return {
@ -308,6 +313,8 @@ export default {
currChannel: -1, currChannel: -1,
compareFileListModalVisible: false, // Compare compareFileListModalVisible: false, // Compare
reprocessingModalVisible: false, //
isProcessing: false, //
} }
}, },
created() { created() {
@ -1086,63 +1093,9 @@ export default {
// //
handleRefresh(data) { handleRefresh(data) {
const { allData, shadowChannelChart, shadowEnergyChart, shapeChannelData, shapeEnergyData } = data this.reset()
data.DetailedInformation = this.detailedInfomation
const channelPeakGroup = allData.filter((item) => item.name == 'Peak' && item.group == 'channel') this.dataProsess(data)
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()
})
}, },
// Accept // Accept
@ -1189,6 +1142,40 @@ export default {
this.energyCompareLine = [] 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 // y
resetThumbnailChartDataMax() { resetThumbnailChartDataMax() {
this.thumbnailOption.yAxis.max = 'dataMax' this.thumbnailOption.yAxis.max = 'dataMax'

View File

@ -89,10 +89,6 @@
<korsum-modal v-model="korsumModalShow" /> <korsum-modal v-model="korsumModalShow" />
<!-- Korsum 弹窗结束 --> <!-- Korsum 弹窗结束 -->
<!-- ReProcessing 弹窗开始 -->
<re-processing-modal v-model="reprocessingModalVisible" />
<!-- ReProcessing 弹窗结束 -->
<!-- Zero Time 弹窗开始 --> <!-- Zero Time 弹窗开始 -->
<zero-time-modal v-model="zeroTimeModalVisible" :sampleId="sampleData.sampleId" /> <zero-time-modal v-model="zeroTimeModalVisible" :sampleId="sampleData.sampleId" />
<!-- Zero Time 弹窗结束 --> <!-- Zero Time 弹窗结束 -->
@ -209,7 +205,6 @@ import SaveSettingModal from './components/Modals/SaveSettingModal.vue'
import AnalyzeSettingModal from './components/Modals/AnalyzeSettingModal.vue' import AnalyzeSettingModal from './components/Modals/AnalyzeSettingModal.vue'
import AnalyzeInteractiveToolModal from './components/Modals/AnalyzeInteractiveToolModal/index.vue' import AnalyzeInteractiveToolModal from './components/Modals/AnalyzeInteractiveToolModal/index.vue'
import KorsumModal from './components/Modals/KorsumModal.vue' import KorsumModal from './components/Modals/KorsumModal.vue'
import ReProcessingModal from './components/Modals/ReProcessingModal/index.vue'
import ZeroTimeModal from './components/Modals/ZeroTimeModal.vue' import ZeroTimeModal from './components/Modals/ZeroTimeModal.vue'
import EfficiencyCalibrationModal from './components/Modals/EfficiencyCalibrationModal.vue' import EfficiencyCalibrationModal from './components/Modals/EfficiencyCalibrationModal.vue'
import EnergyCalibrationModal from './components/Modals/EnergyCalibrationModal.vue' import EnergyCalibrationModal from './components/Modals/EnergyCalibrationModal.vue'
@ -256,7 +251,6 @@ export default {
AnalyzeSettingModal, AnalyzeSettingModal,
AnalyzeInteractiveToolModal, AnalyzeInteractiveToolModal,
KorsumModal, KorsumModal,
ReProcessingModal,
ZeroTimeModal, ZeroTimeModal,
EfficiencyCalibrationModal, EfficiencyCalibrationModal,
EnergyCalibrationModal, EnergyCalibrationModal,
@ -314,7 +308,6 @@ export default {
saveSettingModalVisible: false, // saveSettingModalVisible: false, //
analyzeConfigureModalVisible: false, // analyzeConfigureModalVisible: false, //
reprocessingModalVisible: false, //
analyzeInteractiveToolModalVisible: false, // analyzeInteractiveToolModalVisible: false, //
zeroTimeModalVisible: false, // Zero Time zeroTimeModalVisible: false, // Zero Time
korsumModalShow: false, // Korsum korsumModalShow: false, // Korsum
@ -762,9 +755,9 @@ export default {
}, },
{ {
type: 'a-menu-item', type: 'a-menu-item',
title: 'ReProcessing', title: 'Reprocessing',
show: this.isGamma, show: this.isGamma,
handler: () => (this.reprocessingModalVisible = true), handler: () => this.$refs.gammaAnalysisRef.reProcessing(),
}, },
{ {
type: 'a-menu-item', type: 'a-menu-item',