gamma 的 save to file功能(Save as Txt ,Save as Excel)接口对接联调

gamma 的 Save PHD to File 功能接口对接,联调
This commit is contained in:
任珮宇 2023-10-16 16:12:04 +08:00
parent eddab8db4c
commit aa6ac23fd5
3 changed files with 46 additions and 34 deletions

View File

@ -2,16 +2,14 @@
<custom-modal v-model="visible" title="Save Setting" :width="380" :okHandler="handleOk">
<div class="save-setting">
<div class="save-setting-all">
<a-checkbox v-model="saveAll">
Save All
</a-checkbox>
<a-checkbox v-model="saveAll"> Save All </a-checkbox>
</div>
<div>
<title-over-border title="Format">
<a-radio-group v-model="saveFormat" class="format-radio-group">
<a-radio value="txt">Save as Txt</a-radio>
<a-radio value="xls">Save as Excel</a-radio>
<a-radio value="html">Save as Html</a-radio>
<!-- <a-radio value="html">Save as Html</a-radio> -->
</a-radio-group>
</title-over-border>
</div>
@ -25,13 +23,13 @@ export default {
components: { TitleOverBorder },
props: {
value: {
type: Boolean
}
type: Boolean,
},
},
data() {
return {
saveAll: false,
saveFormat: 'txt'
saveFormat: 'txt',
}
},
methods: {
@ -42,7 +40,7 @@ export default {
handleOk() {
this.$emit('save', this.saveFormat)
}
},
},
computed: {
visible: {
@ -55,9 +53,9 @@ export default {
}
return this.value
}
}
}
},
},
},
}
</script>

View File

@ -1193,7 +1193,6 @@ export default {
this.channelData.baseLineCP = shapeChannelData
this.energyData.baseLineCP = shapeEnergyData
this.redrawCtrlPointBySeriesName()
},
//
@ -1475,7 +1474,6 @@ export default {
watch: {
currStep: {
handler(val) {
console.log('dfad', val)
if (val && val == '0') {
this.abc = true
this.reprocessingModalVisible = true
@ -1496,7 +1494,6 @@ export default {
},
updateFlag: {
handler(val) {
console.log('dfad', val)
this.newCheckBox_updateCal = val
},
immediate: true,

View File

@ -481,6 +481,14 @@ export default {
//
async handleSaveResultsToFile(saveFormat) {
if (this.isGamma) {
const url = saveFormat == 'xls' ? '/gamma/saveToExcel' : saveFormat == 'txt' ? '/gamma/saveToTxt' : ''
let params = {
fileName: this.newSampleData.inputFileName,
}
downloadFile(url, `result.${saveFormat}`, params, 'get')
}
if (this.isBetaGamma) {
const url =
saveFormat == 'xls'
? '/spectrumAnalysis/saveToExcel'
@ -505,6 +513,7 @@ export default {
this.params_toDB.dbName = this.newSampleData.dbName
downloadFile(url, `result.${saveFormat}`, this.params_toDB, 'post')
}
},
/**
@ -572,6 +581,13 @@ export default {
*/
handleSavePHDToFile(type) {
console.log('%c [ savePHDToFile ]-162', 'font-size:13px; background:pink; color:#bf2c9f;', type)
if (this.isGamma) {
const url = '/gamma/saveToPHD'
let params = {
fileName: this.newSampleData.inputFileName,
}
downloadFile(url, `result.PHD`, params, 'get')
}
},
handleReprocessAll() {
@ -797,6 +813,7 @@ export default {
},
on: {
menuClick: () => {
console.log(this.isBetaGamma, this.isGamma)
this.saveSettingModalVisible = true
},
submenuClick: ({ item, child }) => {