beta 的 Save Results to File 功能调整

增加 save to Html 功能,及接口调试
This commit is contained in:
任珮宇 2023-10-30 19:39:02 +08:00
parent 9eeb9435b5
commit 4c84da88ea
2 changed files with 40 additions and 12 deletions

View File

@ -22,23 +22,23 @@ export default {
props: {
children: {
type: Array,
default: () => []
default: () => [],
},
width: {
type: String,
default: 'auto'
}
default: 'auto',
},
},
methods: {
handleMenuClick(item) {
if (!item.children) {
// if (!item.children) {
this.$emit('menuClick', item)
}
// }
},
handleSubMenuClick(item, child) {
this.$emit('submenuClick', { item, child })
}
}
},
},
}
</script>

View File

@ -637,7 +637,7 @@ export default {
})
// reprocessing
if(inputFileName && sampleType !== 'B') {
if (inputFileName && sampleType !== 'B') {
this.$refs.gammaAnalysisRef.reProcessing(false)
}
},
@ -833,6 +833,23 @@ export default {
children: [
{
title: 'Save Results to File',
children: [
{
title: 'Save Txt',
key: 'saveTxt',
show: this.isBetaGamma,
},
{
title: 'Save Excel',
key: 'saveExcel',
show: this.isBetaGamma,
},
{
title: 'Save Html',
key: 'saveHtml',
show: this.isBetaGamma,
},
],
},
{
title: 'Save Results to DB',
@ -844,6 +861,7 @@ export default {
{
title: 'Save All',
key: 'all',
show: this.isGamma,
},
],
key: 'resultsToDB',
@ -869,13 +887,23 @@ export default {
on: {
menuClick: () => {
console.log(this.isBetaGamma, this.isGamma)
if (this.isGamma) {
this.saveSettingModalVisible = true
}
},
submenuClick: ({ item, child }) => {
console.log('item, child', item, child)
debugger
if (item.key == 'resultsToDB') {
this.handleSaveResultsToDB(child.key)
} else if (item.key == 'phdToFile') {
this.handleSavePHDToFile(child.key)
} else if (child.key == 'saveTxt') {
this.handleSaveResultsToFile('txt')
} else if (child.key == 'saveExcel') {
this.handleSaveResultsToFile('xls')
} else if (child.key == 'saveHtml') {
this.handleSaveResultsToFile('html')
}
},
},