beta 新谱页面 result display 添加数据

This commit is contained in:
任珮宇 2024-02-20 16:28:37 +08:00
parent 9ff3cbf619
commit 69ca835d93
2 changed files with 58 additions and 5 deletions

View File

@ -124,14 +124,63 @@ export default {
boundaryList: [], boundaryList: [],
sampleDetail: {}, sampleDetail: {},
qcFlags: {}, 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, currIdx: 0,
} }
}, },
watch: { watch: {
sample: { sample: {
async handler(newVal, oldVal) { async handler(newVal, oldVal) {
this.resultDisplay = [] // this.resultDisplay = []
const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName) const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName)
if (sampleData) { if (sampleData) {
const { data, from } = sampleData const { data, from } = sampleData
@ -263,7 +312,11 @@ export default {
console.log(item) console.log(item)
}, },
handleGetFlag(val, obj) { handleGetFlag(val, obj) {
console.log(val, obj) this.resultDisplay.forEach((item) => {
if (item.nuclideName === obj.nuclideName) {
item.nidFlag = val ? 1 : 0
}
})
}, },
resize() {}, resize() {},
}, },

View File

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