Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
c3ecfc4583
|
@ -461,7 +461,6 @@ export default {
|
||||||
qcFileNames: [this.sample.qcFileName],
|
qcFileNames: [this.sample.qcFileName],
|
||||||
}
|
}
|
||||||
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
|
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
|
||||||
console.log('分析分析', res)
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// this.isReAnalyed_beta = true
|
// this.isReAnalyed_beta = true
|
||||||
this.analyseCurrentSpectrum = res.result
|
this.analyseCurrentSpectrum = res.result
|
||||||
|
|
|
@ -550,9 +550,7 @@ export default {
|
||||||
this.option.series = series
|
this.option.series = series
|
||||||
|
|
||||||
this.thumbnailOption.series = this.buildBarChart(bar)
|
this.thumbnailOption.series = this.buildBarChart(bar)
|
||||||
const thumbnailYMax = this.getThumbnailYMax(0, bar.length)
|
this.setThumbnailRange(1, bar.length)
|
||||||
this.thumbnailOption.yAxis.max = thumbnailYMax
|
|
||||||
this.thumbnailOption.yAxis.min = -thumbnailYMax
|
|
||||||
},
|
},
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
|
@ -712,6 +710,8 @@ export default {
|
||||||
let nextMin = xAxis - halfDiff
|
let nextMin = xAxis - halfDiff
|
||||||
chartXAxisOption.max = nextMax > lastChannel ? lastChannel : nextMax
|
chartXAxisOption.max = nextMax > lastChannel ? lastChannel : nextMax
|
||||||
chartXAxisOption.min = nextMin < 1 ? 1 : nextMin
|
chartXAxisOption.min = nextMin < 1 ? 1 : nextMin
|
||||||
|
|
||||||
|
this.setThumbnailRange(chartXAxisOption.min, chartXAxisOption.max)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -960,6 +960,8 @@ export default {
|
||||||
let nextMin = channel - halfDiff
|
let nextMin = channel - halfDiff
|
||||||
chartXAxisOption.max = nextMax > lastChannel ? lastChannel : nextMax
|
chartXAxisOption.max = nextMax > lastChannel ? lastChannel : nextMax
|
||||||
chartXAxisOption.min = nextMin < 1 ? 1 : nextMin
|
chartXAxisOption.min = nextMin < 1 ? 1 : nextMin
|
||||||
|
|
||||||
|
this.setThumbnailRange(chartXAxisOption.min, chartXAxisOption.max)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getSelPosNuclide(row)
|
this.getSelPosNuclide(row)
|
||||||
|
@ -1030,12 +1032,7 @@ export default {
|
||||||
this.option.yAxis.min = y1
|
this.option.yAxis.min = y1
|
||||||
this.option.yAxis.max = y2
|
this.option.yAxis.max = y2
|
||||||
|
|
||||||
const thumbnailYMax = this.getThumbnailYMax(x1 - 1, x2)
|
this.setThumbnailRange(x1, x2)
|
||||||
this.thumbnailOption.xAxis.min = x1
|
|
||||||
this.thumbnailOption.xAxis.max = x2
|
|
||||||
this.thumbnailOption.yAxis.max = thumbnailYMax
|
|
||||||
this.thumbnailOption.yAxis.min = -thumbnailYMax
|
|
||||||
|
|
||||||
if (this.btnGroupType == 2) {
|
if (this.btnGroupType == 2) {
|
||||||
this.buildRect()
|
this.buildRect()
|
||||||
}
|
}
|
||||||
|
@ -1044,12 +1041,17 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查找barChart范围内的最大值
|
// 查找barChart范围内的最大值
|
||||||
getThumbnailYMax(minIndex, maxIndex) {
|
setThumbnailRange(x1, x2) {
|
||||||
const slicedArr = this.barChart.slice(minIndex, maxIndex)
|
const slicedArr = this.barChart.slice(x1 - 1, x2)
|
||||||
const yData = slicedArr.map(({ y }) => y)
|
const yData = slicedArr.map(({ y }) => y)
|
||||||
const max = Math.max(...yData)
|
const max = Math.max(...yData)
|
||||||
const min = Math.min(...yData)
|
const min = Math.min(...yData)
|
||||||
return Math.max(Math.abs(max), Math.abs(min))
|
const thumbnailYMax = Math.max(Math.abs(max), Math.abs(min))
|
||||||
|
|
||||||
|
this.thumbnailOption.xAxis.min = x1
|
||||||
|
this.thumbnailOption.xAxis.max = x2
|
||||||
|
this.thumbnailOption.yAxis.max = thumbnailYMax
|
||||||
|
this.thumbnailOption.yAxis.min = -thumbnailYMax
|
||||||
},
|
},
|
||||||
|
|
||||||
handleResetChart() {
|
handleResetChart() {
|
||||||
|
@ -1058,11 +1060,7 @@ export default {
|
||||||
this.option.yAxis.min = 0.1
|
this.option.yAxis.min = 0.1
|
||||||
this.option.yAxis.max = 'dataMax'
|
this.option.yAxis.max = 'dataMax'
|
||||||
|
|
||||||
const thumbnailYMax = this.getThumbnailYMax(0, this.barChart.length)
|
this.setThumbnailRange(1, this.barChart.length)
|
||||||
this.thumbnailOption.xAxis.min = 1
|
|
||||||
this.thumbnailOption.xAxis.max = 'dataMax'
|
|
||||||
this.thumbnailOption.yAxis.max = thumbnailYMax
|
|
||||||
this.thumbnailOption.yAxis.min = -thumbnailYMax
|
|
||||||
|
|
||||||
if (this.btnGroupType == 2) {
|
if (this.btnGroupType == 2) {
|
||||||
this.buildRect()
|
this.buildRect()
|
||||||
|
|
|
@ -378,18 +378,19 @@ export default {
|
||||||
resultDisplayFlag: [],
|
resultDisplayFlag: [],
|
||||||
params_toDB: {
|
params_toDB: {
|
||||||
comment: '',
|
comment: '',
|
||||||
|
savedAnalysisResult: false,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
dbName: '',
|
dbName: '',
|
||||||
sampleFileName: '',
|
sampleFileName: '',
|
||||||
gasFileName: '',
|
gasFileName: '',
|
||||||
detFileName: '',
|
detFileName: '',
|
||||||
qcFileName: '',
|
qcFileName: '',
|
||||||
bGammaEnergyValidSample: false,
|
// bGammaEnergyValidSample: false,
|
||||||
bBetaEnergyValidSample: false,
|
// bBetaEnergyValidSample: false,
|
||||||
bGammaEnergyValidGas: false,
|
// bGammaEnergyValidGas: false,
|
||||||
bBetaEnergyValidGas: false,
|
// bBetaEnergyValidGas: false,
|
||||||
bGammaEnergyValidDet: false,
|
// bGammaEnergyValidDet: false,
|
||||||
bBetaEnergyValidDet: false,
|
// bBetaEnergyValidDet: false,
|
||||||
checkSample: false,
|
checkSample: false,
|
||||||
checkGas: false,
|
checkGas: false,
|
||||||
checkDet: false,
|
checkDet: false,
|
||||||
|
@ -426,6 +427,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
getReAnalyCurr(flag, val) {
|
getReAnalyCurr(flag, val) {
|
||||||
this.isReAnalyed_beta = flag
|
this.isReAnalyed_beta = flag
|
||||||
|
this.params_toDB.savedAnalysisResult = true
|
||||||
this.resultDisplayFlag = val
|
this.resultDisplayFlag = val
|
||||||
},
|
},
|
||||||
getReAnalyAll(val) {
|
getReAnalyAll(val) {
|
||||||
|
@ -504,6 +506,7 @@ export default {
|
||||||
this.analysisType = ANALYZE_TYPE.GAMMA
|
this.analysisType = ANALYZE_TYPE.GAMMA
|
||||||
}
|
}
|
||||||
this.sampleData = this.newSampleData = sample
|
this.sampleData = this.newSampleData = sample
|
||||||
|
this.params_toDB.savedAnalysisResult = sample.sampleId ? true : false
|
||||||
this.params_toDB.comment = ''
|
this.params_toDB.comment = ''
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -589,11 +592,8 @@ export default {
|
||||||
* @param { 'all' | 'current' } type
|
* @param { 'all' | 'current' } type
|
||||||
*/
|
*/
|
||||||
async handleSaveResultsToDB(type) {
|
async handleSaveResultsToDB(type) {
|
||||||
if (this.isBetaGamma) {
|
if (this.isReAnalyed_gamma) {
|
||||||
if (type === 'current') {
|
this.isSaving = true
|
||||||
this.handleSaveResultsToDB_Cuurrent()
|
|
||||||
}
|
|
||||||
} else if (this.isGamma) {
|
|
||||||
if (type == 'current') {
|
if (type == 'current') {
|
||||||
const hideLoading = this.$message.loading('Saving...', 0)
|
const hideLoading = this.$message.loading('Saving...', 0)
|
||||||
try {
|
try {
|
||||||
|
@ -609,36 +609,42 @@ export default {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
this.isSaving = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSaveResultsToDB_Cuurrent() {
|
handleSaveResultsToDB_Cuurrent() {
|
||||||
// xeflag params_toDB
|
// xeflag params_toDB
|
||||||
if (this.resultDisplayFlag.length > 0) {
|
if (this.params_toDB.savedAnalysisResult) {
|
||||||
this.resultDisplayFlag.forEach((item) => {
|
if (this.resultDisplayFlag.length > 0) {
|
||||||
if (item.nuclideName === 'Xe131m') {
|
this.resultDisplayFlag.forEach((item) => {
|
||||||
this.params_toDB.xe131mFlag = item.nidFlag
|
if (item.nuclideName === 'Xe131m') {
|
||||||
} else if (item.nuclideName === 'Xe133') {
|
this.params_toDB.xe131mFlag = item.nidFlag
|
||||||
this.params_toDB.xe133Flag = item.nidFlag
|
} else if (item.nuclideName === 'Xe133') {
|
||||||
} else if (item.nuclideName === 'Xe133m') {
|
this.params_toDB.xe133Flag = item.nidFlag
|
||||||
this.params_toDB.xe133mFlag = item.nidFlag
|
} else if (item.nuclideName === 'Xe133m') {
|
||||||
} else if (item.nuclideName === 'Xe135') {
|
this.params_toDB.xe133mFlag = item.nidFlag
|
||||||
this.params_toDB.xe135Flag = 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.sampleFileName = this.newSampleData.inputFileName
|
||||||
this.params_toDB.detFileName = this.newSampleData.detFileName
|
this.params_toDB.gasFileName = this.newSampleData.gasFileName
|
||||||
this.params_toDB.qcFileName = this.newSampleData.qcFileName
|
this.params_toDB.detFileName = this.newSampleData.detFileName
|
||||||
this.params_toDB.dbName = this.newSampleData.dbName
|
this.params_toDB.qcFileName = this.newSampleData.qcFileName
|
||||||
postAction('/spectrumAnalysis/saveToDB', this.params_toDB).then((res) => {
|
this.params_toDB.dbName = this.newSampleData.dbName
|
||||||
if (res.success) {
|
this.isSaving = true
|
||||||
this.$message.success('Save Successfully!')
|
postAction('/spectrumAnalysis/saveToDB', this.params_toDB).then((res) => {
|
||||||
} else {
|
if (res.success) {
|
||||||
this.$message.warning('Fail To Save')
|
this.$message.success('Save Successfully!')
|
||||||
}
|
this.isSaving = true
|
||||||
})
|
} else {
|
||||||
|
this.isSaving = true
|
||||||
|
this.$message.warning(`${res.message}`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -852,6 +858,7 @@ export default {
|
||||||
show: this.isBetaGamma,
|
show: this.isBetaGamma,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
key: 'resultsToFile',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Save Results to DB',
|
title: 'Save Results to DB',
|
||||||
|
@ -859,6 +866,7 @@ export default {
|
||||||
{
|
{
|
||||||
title: 'Save Current',
|
title: 'Save Current',
|
||||||
key: 'current',
|
key: 'current',
|
||||||
|
show: this.isGamma,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Save All',
|
title: 'Save All',
|
||||||
|
@ -887,10 +895,14 @@ export default {
|
||||||
width: '170px',
|
width: '170px',
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
menuClick: () => {
|
menuClick: (item) => {
|
||||||
if (this.isGamma) {
|
if (this.isGamma && item.key == 'resultsToFile') {
|
||||||
this.saveSettingModalVisible = true
|
this.saveSettingModalVisible = true
|
||||||
}
|
}
|
||||||
|
if (this.isBetaGamma && item.key == 'resultsToDB') {
|
||||||
|
// beta save to db
|
||||||
|
this.handleSaveResultsToDB_Cuurrent()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
submenuClick: ({ item, child }) => {
|
submenuClick: ({ item, child }) => {
|
||||||
if (item.key == 'resultsToDB') {
|
if (item.key == 'resultsToDB') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user