完成analysis模块Gamma下面 log 菜单弹窗中的文件保存功能
This commit is contained in:
parent
595e71c2f4
commit
ac6f99933b
|
@ -26,6 +26,7 @@
|
||||||
"echarts": "^5.4.2",
|
"echarts": "^5.4.2",
|
||||||
"echarts-gl": "^2.0.9",
|
"echarts-gl": "^2.0.9",
|
||||||
"enquire.js": "^2.1.6",
|
"enquire.js": "^2.1.6",
|
||||||
|
"file-saver": "^2.0.5",
|
||||||
"js-cookie": "^2.2.0",
|
"js-cookie": "^2.2.0",
|
||||||
"lodash.get": "^4.4.2",
|
"lodash.get": "^4.4.2",
|
||||||
"lodash.pick": "^4.4.0",
|
"lodash.pick": "^4.4.0",
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
"xss": "^1.0.13"
|
"xss": "^1.0.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
||||||
"@babel/polyfill": "^7.2.5",
|
"@babel/polyfill": "^7.2.5",
|
||||||
"@types/crypto-js": "^4.1.1",
|
"@types/crypto-js": "^4.1.1",
|
||||||
"@vue/cli-plugin-babel": "^3.3.0",
|
"@vue/cli-plugin-babel": "^3.3.0",
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||||
|
import { saveAs } from 'file-saver';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin, SampleDataMixin],
|
mixins: [ModalMixin, SampleDataMixin],
|
||||||
|
@ -46,7 +47,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleOk() {
|
handleOk() {
|
||||||
console.log('%c [ ]-15', 'font-size:13px; background:pink; color:#bf2c9f;')
|
let strData = new Blob([this.content], { type: 'text/plain;charset=utf-8' });
|
||||||
|
saveAs(strData, `Automatic Analysis Log.txt`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<div slot="custom-footer" style="text-align: center;">
|
<div slot="custom-footer" style="text-align: center;">
|
||||||
<a-space :size="20">
|
<a-space :size="20">
|
||||||
<a-button type="primary">Export</a-button>
|
<a-button type="primary" @click="handleOk">Export</a-button>
|
||||||
<a-button @click="visible = false">Cancel</a-button>
|
<a-button @click="visible = false">Cancel</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,6 +15,7 @@
|
||||||
<script>
|
<script>
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
|
import { saveAs } from 'file-saver';
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin],
|
mixins: [ModalMixin],
|
||||||
props: {
|
props: {
|
||||||
|
@ -35,7 +36,8 @@ export default {
|
||||||
getViewGammaviewerLog() {
|
getViewGammaviewerLog() {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
let params = {
|
let params = {
|
||||||
sampleId: this.sampleId
|
sampleId: this.sampleId,
|
||||||
|
fileName:"CAX05_001-20230731_1528_S_FULL_37563.6.PHD"
|
||||||
}
|
}
|
||||||
getAction("/gamma/viewGammaviewerLog", params).then(res => {
|
getAction("/gamma/viewGammaviewerLog", params).then(res => {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
@ -45,6 +47,10 @@ export default {
|
||||||
this.$message.warning("This operation fails. Contact your system administrator")
|
this.$message.warning("This operation fails. Contact your system administrator")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
let strData = new Blob([this.text], { type: 'text/plain;charset=utf-8' });
|
||||||
|
saveAs(strData, `GammaViewer Log.txt`)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,19 @@ module.exports = {
|
||||||
.use()
|
.use()
|
||||||
.loader('babel-loader')
|
.loader('babel-loader')
|
||||||
.end()
|
.end()
|
||||||
|
config.module
|
||||||
|
.rule('ol')
|
||||||
|
.test(/\.js$/)
|
||||||
|
.include
|
||||||
|
.add(resolve('node_modules/ol'))
|
||||||
|
.end()
|
||||||
|
.use()
|
||||||
|
.loader('babel-loader')
|
||||||
|
.options({
|
||||||
|
presets: ['@babel/preset-env'],
|
||||||
|
plugins: ['@babel/plugin-proposal-nullish-coalescing-operator']
|
||||||
|
})
|
||||||
|
.end()
|
||||||
},
|
},
|
||||||
|
|
||||||
css: {
|
css: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user