@@ -50,68 +50,74 @@ const columns = [
{
title: 'Flag',
align: 'center',
+ dataIndex: 'nidFlag',
scopedSlots: {
- customRender: 'flag'
+ customRender: 'flag',
},
- width: 40
+ width: 40,
},
{
title: 'Isotope',
dataIndex: 'nuclideName',
ellipsis: true,
- width: 76
+ width: 76,
},
{
title: 'Concentration',
dataIndex: 'conc',
scopedSlots: {
- customRender: 'concentration'
+ customRender: 'concentration',
},
- width: 128
+ width: 128,
},
{
title: 'Uncertainty',
dataIndex: 'concErr',
scopedSlots: {
- customRender: 'uncertainty'
+ customRender: 'uncertainty',
},
- width: 118
+ width: 118,
},
{
title: 'MDC[mBq/m3]',
dataIndex: 'mdc',
scopedSlots: {
- customRender: 'mdc'
+ customRender: 'mdc',
},
- width: 133
+ width: 133,
},
{
title: '',
scopedSlots: {
- customRender: 'operator'
+ customRender: 'operator',
},
- width: 34
- }
+ width: 34,
+ },
]
export default {
props: {
data: {
type: Array,
- default: () => []
- }
+ default: () => [],
+ },
},
data() {
this.columns = columns
return {
source1: [],
- source2: []
+ source2: [],
}
},
+ methods: {
+ handleCheckboxChange(e, obj) {
+ this.$emit('sendFlag', e.target.checked, obj)
+ },
+ },
watch: {
data: {
handler(val) {
if (val && Array.isArray(val)) {
- val.forEach(item => {
+ val.forEach((item) => {
if (item.conc < 0) {
item.className = 'error'
} else if (item.conc > 0 && item.conc < item.mdc) {
@@ -124,9 +130,9 @@ export default {
this.source2 = val.slice(2, 4)
}
},
- immediate: true
- }
- }
+ immediate: true,
+ },
+ },
}
diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue
index 405ee0c..3119c73 100644
--- a/src/views/spectrumAnalysis/index.vue
+++ b/src/views/spectrumAnalysis/index.vue
@@ -39,6 +39,7 @@
v-else-if="isBetaGamma"
ref="betaGammaAnalysisRef"
@getFiles="getFiles"
+ @sendInfo="getStationName"
:sample="sampleData"
:analyseCurrentSpectrum="analyseCurrentSpectrumData"
/>
@@ -151,13 +152,18 @@
-
+
@@ -355,6 +361,29 @@ export default {
betaGammaRlrModalVisible: false, // beta-gamma RLR 弹窗
statisticsParamerHistoryModalVisible: false, // beta-gamma Statistics Paramer History 弹窗
analyseCurrentSpectrumData: {},
+ resultDisplayFlag: [],
+ params_toDB: {
+ comment: '',
+ stationName: '',
+ dbName: '',
+ sampleFileName: '',
+ gasFileName: '',
+ detFileName: '',
+ qcFileName: '',
+ bGammaEnergyValidSample: false,
+ bBetaEnergyValidSample: false,
+ bGammaEnergyValidGas: false,
+ bBetaEnergyValidGas: false,
+ bGammaEnergyValidDet: false,
+ bBetaEnergyValidDet: false,
+ checkSample: false,
+ checkGas: false,
+ checkDet: false,
+ xe131mFlag: null,
+ xe133Flag: null,
+ xe133mFlag: null,
+ xe135Flag: null,
+ },
}
},
created() {
@@ -372,6 +401,18 @@ export default {
},
methods: {
+ getcommentsInfo(val) {
+ this.params_toDB.comment = val.spectrumAnalysisCommentInfo
+ },
+ getStationName(arg, val) {
+ this.resultDisplayFlag = arg
+ this.params_toDB.stationName = val
+ },
+ getCheckFlag(val) {
+ this.params_toDB.checkSample = val.checkSample
+ this.params_toDB.checkGas = val.checkGas
+ this.params_toDB.checkDet = val.checkDet
+ },
// formDB 来源 吧接口返回的文件名称添加到sampleData
getFiles(val) {
this.newSampleData = { ...this.sampleData, ...val }
@@ -386,7 +427,6 @@ export default {
this.sampleList = this.sampleList.concat(willAddList)
},
handleLoadSampleFromFile(sampleList) {
- console.log('sampleListsampleListsampleListsampleListsampleList', sampleList)
let arr = sampleList.filter((item) => {
if (Object.keys(item).length > 4) {
if (item.gasFileName && item.detFileName && item.qcFileName && item.gasFileStatus && item.detFileStatus) {
@@ -396,9 +436,8 @@ export default {
}
}
})
- console.log('sampleListsampleList', arr)
arr.forEach((item) => {
- item.dbNames = ''
+ item.dbName = ''
item.sampleId = ''
item.inputFileName = item.sampleFileName
item.sampleType = item.sampleSystemType
@@ -438,6 +477,37 @@ export default {
*/
handleSaveResultsToDB(type) {
console.log('%c [ saveResultsToDB ]-157', 'font-size:13px; background:pink; color:#bf2c9f;', type)
+ if (type === 'current') {
+ this.handleSaveResultsToDB_Cuurrent()
+ }
+ },
+ handleSaveResultsToDB_Cuurrent() {
+ // xeflag params_toDB
+ if (this.resultDisplayFlag.length > 0) {
+ this.resultDisplayFlag.forEach((item) => {
+ if (item.nuclideName === 'Xe131m') {
+ this.params_toDB.xe131mFlag = item.nidFlag
+ } else if (item.nuclideName === 'Xe133') {
+ this.params_toDB.xe133Flag = item.nidFlag
+ } else if (item.nuclideName === 'Xe133m') {
+ this.params_toDB.xe133mFlag = item.nidFlag
+ } else if (item.nuclideName === 'Xe135') {
+ this.params_toDB.xe135Flag = item.nidFlag
+ }
+ })
+ this.params_toDB.sampleFileName = this.newSampleData.inputFileName
+ this.params_toDB.gasFileName = this.newSampleData.gasFileName
+ this.params_toDB.detFileName = this.newSampleData.detFileName
+ this.params_toDB.qcFileName = this.newSampleData.qcFileName
+ this.params_toDB.dbName = this.newSampleData.dbName
+ postAction('/spectrumAnalysis/saveToDB', this.params_toDB).then((res) => {
+ if (res.success) {
+ this.$message.success('Save Successfully!')
+ } else {
+ this.$message.warning('Fail To Save')
+ }
+ })
+ }
},
/**
@@ -498,28 +568,27 @@ export default {
// beta Analyze current spectrum 分析接口
getAnalyzeCurrentSpectrum() {
let params = {
- // dbNames: [''],
- // sampleIds: [''],
- // sampleFileNames: ['AUX09_003-20151226_1855_S_FULL_40184.8.PHD'],
- // gasFileNames: ['AUX09_003-20151226_0655_G_FULL_40184.7.PHD'],
- // detFileNames: ['AUX09_003-20150527_0425_D_FULL_259450.PHD'],
- dbNames: [this.sampleData.dbName],
- sampleIds: [this.sampleData.sampleId],
- sampleFileNames: [this.sampleData.inputFileName],
- gasFileNames: [this.sampleData.gasFileName],
- detFileNames: [this.sampleData.detFileName],
+ dbNames: [this.newSampleData.dbName],
+ sampleIds: [this.newSampleData.sampleId],
+ sampleFileNames: [this.newSampleData.inputFileName],
+ gasFileNames: [this.newSampleData.gasFileName],
+ detFileNames: [this.newSampleData.detFileName],
}
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
if (res.success) {
this.analyseCurrentSpectrumData = res.result
+ this.resultDisplayFlag = res.result.XeData
+ this.resultDisplayFlag.forEach((item) => {
+ item.conc = item.conc.toFixed(6)
+ item.concErr = item.concErr.toFixed(6)
+ item.lc = item.lc.toFixed(6)
+ item.mdc = item.mdc.toFixed(6)
+ })
} else {
this.$message.warning(res.message)
}
})
},
- saveToDb() {
- console.log('savetodb')
- },
handleEnergyCalib() {
if (this.newSampleData.sampleId) {
if (this.newSampleData.qcFileName) {