beta-gamma 增加 Xe results Compare 弹窗

This commit is contained in:
任珮宇 2024-01-18 18:02:09 +08:00
parent 320dab11f0
commit bd7dcfa030
2 changed files with 153 additions and 0 deletions

View File

@ -0,0 +1,140 @@
<template>
<custom-modal v-model="visible" title="Xe Results Compare" :width="1231" :footer="null" class="peak-infomation">
<a-spin :spinning="isLoading">
<div class="comparison-list">
<div class="comparison-list-item">
<div class="comparison-list-item-title">ARMD</div>
<custom-table :list="resultDisplayFlag" :scroll="{ y: 230 }" :columns="columns">
<template slot="uncertainty" slot-scope="{ text }">
<div class="uncertainty">+/-{{ text }}</div>
</template>
</custom-table>
</div>
<div class="comparison-list-item">
<div class="comparison-list-item-title">IDC</div>
<custom-table :list="compareList" :scroll="{ y: 230 }" :columns="columns"></custom-table>
</div>
</div>
</a-spin>
</custom-modal>
</template>
<script>
import ModalMixin from '@/mixins/ModalMixin'
import { getAction, getFileAction } from '@/api/manage'
import { saveAs } from 'file-saver'
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
const columns = [
{
title: 'Isotope',
dataIndex: 'nuclideName',
},
{
title: 'Concentration',
dataIndex: 'conc',
},
{
title: 'Uncertainty',
dataIndex: 'concErr',
scopedSlots: {
customRender: 'uncertainty',
},
},
{
title: 'MDC[mBq/m3]',
dataIndex: 'mdc',
ellipsis: true,
},
]
export default {
mixins: [ModalMixin, SampleDataMixin],
props: {
resultDisplayFlag: {
type: Array,
default: () => [],
},
},
watch: {
resultDisplayFlag: {
handler(newVal) {
this.list = newVal
},
},
},
data() {
this.columns = columns
return {
list: [],
compareList: [],
isLoading: false,
fileName: '',
}
},
mounted() {
console.log(this.newSampleData)
},
methods: {
async getInfo() {
console.log(this.newSampleData)
try {
this.isLoading = true
const { sampleId, inputFileName: fileName } = this.sampleData
const { success, result, message } = await getAction('/spectrumAnalysis/xeComparison', {
sampleId,
sampleFileName: fileName,
})
if (success) {
this.compareList = result
} else {
this.$message.error(message)
}
} catch (error) {
console.error(error)
} finally {
this.isLoading = false
}
},
beforeModalOpen() {
this.getInfo()
},
},
}
</script>
<style lang="less" scoped>
.peak-infomation {
::v-deep {
.ant-modal-body {
padding: 20px 16px 16px;
}
}
&-footer {
margin-top: 10px;
text-align: right;
.ant-btn {
display: flex;
align-items: center;
img {
margin-right: 10px;
}
}
}
}
.comparison-list {
&-item {
&-title {
color: #0cebc9;
}
&:last-child {
margin-top: 12px;
}
}
}
</style>

View File

@ -233,6 +233,10 @@
<beta-gamma-rlr-modal v-model="betaGammaRlrModalVisible" />
<!-- Beta-Gamma RLR 弹窗 结束 -->
<!-- Beta-Gamma Xe results Compare 弹窗 -->
<beta-gamma-xe-modal v-model="betaGammaXeModalVisible" :resultDisplayFlag="resultDisplayFlag" />
<!-- Beta-Gamma Xe results Compare 弹窗 结束 -->
<!-- Beta-Gamma Statistics Paramer History 弹窗 -->
<statistics-paramer-history-modal v-model="statisticsParamerHistoryModalVisible" />
<!-- Beta-Gamma Statistics Paramer History 弹窗 结束 -->
@ -277,6 +281,7 @@ import BetaGammaCommentsModal from './components/Modals/BetaGammaModals/BetaGamm
import BetaGammaSpectrumModal from './components/Modals/BetaGammaModals/BetaGammaSpectrumModal.vue'
import BetaGammaSampleInfomationModal from './components/Modals/BetaGammaModals/BetaGammaSampleInfomationModal.vue'
import BetaGammaQcResultsModal from './components/Modals/BetaGammaModals/BetaGammaQCResultsModal.vue'
import BetaGammaXeModal from './components/Modals/BetaGammaModals/BetaGammaXeModal.vue'
import BetaGammaRlrModal from './components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue'
import StatisticsParamerHistoryModal from './components/Modals/BetaGammaModals/StatisticsParamerHistoryModal.vue'
import FtransltModal from './components/Modals/FtransltModal/index.vue'
@ -336,6 +341,7 @@ export default {
BetaGammaSpectrumModal,
BetaGammaSampleInfomationModal,
BetaGammaQcResultsModal,
BetaGammaXeModal,
BetaGammaRlrModal,
StatisticsParamerHistoryModal,
FtransltModal,
@ -424,6 +430,7 @@ export default {
betaGammaSampleInfomationModalVisible: false, // beta-gamma sample infomation
betaGammaQCResultsModalVisible: false, // beta-gamma QC Result
betaGammaRlrModalVisible: false, // beta-gamma RLR
betaGammaXeModalVisible: false, // beta-gamma Xe
statisticsParamerHistoryModalVisible: false, // beta-gamma Statistics Paramer History
bgLogViewerVisible: false, // beta-gamma Log BG log viewer
analyseCurrentSpectrumData: {},
@ -1605,6 +1612,12 @@ export default {
handler: () => (this.betaGammaRlrModalVisible = true),
show: this.isBetaGamma,
},
{
type: 'a-menu-item',
title: 'Xe Results Compare',
handler: () => (this.betaGammaXeModalVisible = true),
show: this.isBetaGamma,
},
],
},
],