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

This commit is contained in:
orgin 2023-10-28 20:52:08 +08:00
commit 9ac29bd072
3 changed files with 26 additions and 25 deletions

View File

@ -256,9 +256,8 @@ export default {
this.$store.commit('ADD_SAMPLE_DATA', { this.$store.commit('ADD_SAMPLE_DATA', {
inputFileName, inputFileName,
data: result, data: result,
from: 'db' from: 'db',
}) })
} else { } else {
this.$message.error(message) this.$message.error(message)
} }
@ -273,7 +272,7 @@ export default {
this.$emit('getFiles', { this.$emit('getFiles', {
detFileName: result.detBg.fileName, detFileName: result.detBg.fileName,
gasFileName: result.gasBg.fileName, gasFileName: result.gasBg.fileName,
qcFileName: result.qc ? result.qc.fileName : '' qcFileName: result.qc ? result.qc.fileName : '',
}) })
}, },
@ -301,7 +300,7 @@ export default {
this.$store.commit('ADD_SAMPLE_DATA', { this.$store.commit('ADD_SAMPLE_DATA', {
inputFileName: this.sample.sampleFileName, inputFileName: this.sample.sampleFileName,
data: result, data: result,
from: 'file' from: 'file',
}) })
this.isLoading = false this.isLoading = false
} else { } else {
@ -326,7 +325,7 @@ export default {
}, },
changeChartByType(val) { changeChartByType(val) {
if (val === 'qc' && !this.sample.qcFileStatus) { if (val === 'qc' && !this.sampleDetail.qc) {
this.$message.warning('No qc spectrum file!') this.$message.warning('No qc spectrum file!')
} else { } else {
const { const {

View File

@ -304,7 +304,7 @@ export default {
postFileAction('/spectrumAnalysis/exportRLR', params).then((res) => { postFileAction('/spectrumAnalysis/exportRLR', params).then((res) => {
let name = this.newSampleData.inputFileName.split('.')[0] let name = this.newSampleData.inputFileName.split('.')[0]
const blob = new Blob([res], { type: 'application/vnd.ms-excel' }) const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
saveAs(blob, `${name}RLR`) saveAs(blob, `${name}_RLR`)
// let _this = this // let _this = this
// this.$confirm({ // this.$confirm({
// title: 'Please enter file name', // title: 'Please enter file name',

View File

@ -282,25 +282,27 @@ export default {
Conclusion_Res: this.conclusionVal.conclusionRes || this.allInfo.Conclusion_Res, Conclusion_Res: this.conclusionVal.conclusionRes || this.allInfo.Conclusion_Res,
Comment: this.commentVal.comment || this.allInfo.Comment, Comment: this.commentVal.comment || this.allInfo.Comment,
} }
let name = this.newSampleData.inputFileName.split('.')[0]
postAction('/gamma/exportRLR', params).then((res) => { postAction('/gamma/exportRLR', params).then((res) => {
const blob = new Blob([res]) const blob = new Blob([res])
let _this = this saveAs(blob, `${name}_RLR`)
this.$confirm({ // let _this = this
title: 'Please enter file name', // this.$confirm({
content: (h) => <a-input v-model={_this.fileName} />, // title: 'Please enter file name',
okText: 'Cancle', // content: (h) => <a-input v-model={_this.fileName} />,
cancelText: 'Save', // okText: 'Cancle',
okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } }, // cancelText: 'Save',
cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } }, // okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
onOk() { // cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
console.log('Cancel') // onOk() {
}, // console.log('Cancel')
onCancel() { // },
if (_this.fileName) { // onCancel() {
saveAs(blob, `${_this.fileName}.RLR`) // if (_this.fileName) {
} // saveAs(blob, `${_this.fileName}.RLR`)
}, // }
}) // },
// })
}) })
} else { } else {
this.$message.warning('Please finishi ti edit new inserted row first.') this.$message.warning('Please finishi ti edit new inserted row first.')