Merge branch 'feature-Beta-dev-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into feature-Beta-dev-renpy

This commit is contained in:
orgin 2024-02-20 18:22:00 +08:00
commit 2748cb167b
4 changed files with 78 additions and 16 deletions

View File

@ -124,14 +124,63 @@ export default {
boundaryList: [],
sampleDetail: {},
qcFlags: {},
resultDisplay: [],
resultDisplay: [
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe131m',
conc: -0.049,
concErr: 0.04272,
mdc: 0.14539,
lc: 0.06362626536110005,
nidFlag: 0,
moddate: null,
color: 'red',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe133',
conc: 0.07727,
concErr: 0.0631,
mdc: 0.23981,
lc: 0.09916332268275692,
nidFlag: 0,
moddate: null,
color: '#ffcc30',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe133m',
conc: -0.07186,
concErr: 0.03596,
mdc: 0.11014,
lc: 0.044521536189968125,
nidFlag: 0,
moddate: null,
color: 'red',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe135',
conc: 0.26636,
concErr: 0.23193,
mdc: 0.77578,
lc: 0.3655879636569543,
nidFlag: 0,
moddate: null,
color: '#ffcc30',
},
],
currIdx: 0,
}
},
watch: {
sample: {
async handler(newVal, oldVal) {
this.resultDisplay = []
// this.resultDisplay = []
const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName)
if (sampleData) {
const { data, from } = sampleData
@ -263,7 +312,11 @@ export default {
console.log(item)
},
handleGetFlag(val, obj) {
console.log(val, obj)
this.resultDisplay.forEach((item) => {
if (item.nuclideName === obj.nuclideName) {
item.nidFlag = val ? 1 : 0
}
})
},
resize() {},
},

View File

@ -1,9 +1,14 @@
<template>
<custom-modal v-model="visible" :width="800" title="Spectrum" :footer="null">
<a-spin :spinning="isLoading">
<pre>
{{ content }}
</pre>
<a-tabs :animated="false">
<a-tab-pane tab="phd" key="1">
<pre key="1">{{ spectrum }}</pre>
</a-tab-pane>
<a-tab-pane tab="phd:raw" key="2">
<pre key="2">{{ phdSpectrum }}</pre>
</a-tab-pane>
</a-tabs>
</a-spin>
</custom-modal>
</template>
@ -16,8 +21,9 @@ export default {
mixins: [ModalMixin, SampleDataMixin],
data() {
return {
content: '',
isLoading: true
spectrum: '',
phdSpectrum: '',
isLoading: true,
}
},
methods: {
@ -27,10 +33,12 @@ export default {
const { sampleId, inputFileName: fileName } = this.sampleData
const { success, result, message } = await getAction('/gamma/Spectrum', {
sampleId,
fileName
fileName,
})
if (success) {
this.content = result
const { Spectrum, phdSpectrum } = result
this.spectrum = Spectrum
this.phdSpectrum = (phdSpectrum || []).join('\r\n')
} else {
this.$message.error(message)
}
@ -43,8 +51,8 @@ export default {
beforeModalOpen() {
this.getContent()
}
}
},
},
}
</script>

View File

@ -60,7 +60,7 @@ const columns = [
title: 'Isotope',
dataIndex: 'nuclideName',
ellipsis: true,
width: 60,
width: 76,
},
{
title: 'Concentration',
@ -76,7 +76,7 @@ const columns = [
scopedSlots: {
customRender: 'uncertainty',
},
width: 88,
width: 108,
},
{
title: 'MDC[mBq/m3]',

View File

@ -73,7 +73,7 @@ const initialOption = {
formatter: (params) => {
return `
<div>${params.marker}${params.name}</div>
<div>START${dayjs(new Date(params.value[1])).format('YYYY-MM-DD HH:mm:ss')}</div>
<div>START${dayjs(new Date(params.value[4])).format('YYYY-MM-DD HH:mm:ss')}</div>
<div style="white-space: pre"> END${dayjs(new Date(params.value[2])).format('YYYY-MM-DD HH:mm:ss')}</div>
`
},
@ -249,6 +249,7 @@ export default {
item.dataList.forEach((item) => {
this.convertStatus(item)
let originalTime = new Date(item.beginTime * 1000).getTime()
let startTime = new Date(item.beginTime * 1000).getTime()
if (item.type == 'PHD') {
startTime = item.endTime * 1000 - 60 * 1000 * 30
@ -261,7 +262,7 @@ export default {
if (find.isShow) {
data.push({
name: item.status,
value: [index, startTime, endTime, duration],
value: [index, startTime, endTime, duration, originalTime],
itemStyle: {
normal: {
color: find.color,