2023-07-13 19:18:23 +08:00
|
|
|
<template>
|
|
|
|
<custom-modal v-model="visible" :width="1000" title="Data Processing Log">
|
2023-08-31 09:59:14 +08:00
|
|
|
<a-spin :spinning="isLoading">
|
|
|
|
<pre class="data-processing-log">{{ text }}</pre>
|
|
|
|
</a-spin>
|
|
|
|
<div slot="custom-footer" style="text-align: center;">
|
|
|
|
<a-space :size="20">
|
2023-09-05 16:31:09 +08:00
|
|
|
<a-button type="primary" @click="handleOk">Export</a-button>
|
2023-08-31 09:59:14 +08:00
|
|
|
<a-button @click="visible = false">Cancel</a-button>
|
|
|
|
</a-space>
|
|
|
|
</div>
|
2023-07-13 19:18:23 +08:00
|
|
|
</custom-modal>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import ModalMixin from '@/mixins/ModalMixin'
|
2023-08-31 09:59:14 +08:00
|
|
|
import { getAction } from '@/api/manage'
|
2023-09-05 16:31:09 +08:00
|
|
|
import { saveAs } from 'file-saver';
|
2023-07-13 19:18:23 +08:00
|
|
|
export default {
|
|
|
|
mixins: [ModalMixin],
|
2023-08-31 09:59:14 +08:00
|
|
|
props: {
|
|
|
|
sampleId: {
|
|
|
|
type: Number
|
|
|
|
}
|
|
|
|
},
|
2023-07-13 19:18:23 +08:00
|
|
|
data() {
|
|
|
|
return {
|
2023-08-31 09:59:14 +08:00
|
|
|
text: "",
|
|
|
|
isLoading: false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
beforeModalOpen() {
|
|
|
|
this.getViewGammaviewerLog();
|
|
|
|
},
|
|
|
|
getViewGammaviewerLog() {
|
|
|
|
this.isLoading = true
|
|
|
|
let params = {
|
2023-09-05 16:31:09 +08:00
|
|
|
sampleId: this.sampleId,
|
|
|
|
fileName:"CAX05_001-20230731_1528_S_FULL_37563.6.PHD"
|
2023-08-31 09:59:14 +08:00
|
|
|
}
|
|
|
|
getAction("/gamma/viewGammaviewerLog", params).then(res => {
|
|
|
|
this.isLoading = false
|
|
|
|
if (res.success) {
|
|
|
|
this.text = res.result
|
|
|
|
} else {
|
|
|
|
this.$message.warning("This operation fails. Contact your system administrator")
|
|
|
|
}
|
|
|
|
})
|
2023-09-05 16:31:09 +08:00
|
|
|
},
|
|
|
|
handleOk() {
|
|
|
|
let strData = new Blob([this.text], { type: 'text/plain;charset=utf-8' });
|
|
|
|
saveAs(strData, `GammaViewer Log.txt`)
|
2023-07-13 19:18:23 +08:00
|
|
|
}
|
2023-08-31 09:59:14 +08:00
|
|
|
},
|
2023-07-13 19:18:23 +08:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
.data-processing-log {
|
2023-08-31 09:59:14 +08:00
|
|
|
height: 450px;
|
2023-07-17 19:37:46 +08:00
|
|
|
max-height: 450px;
|
2023-07-13 19:18:23 +08:00
|
|
|
padding: 5px;
|
|
|
|
overflow: auto;
|
|
|
|
background-color: #285367;
|
|
|
|
}
|
|
|
|
</style>
|