gammaView log弹窗内容的接口调试,增加loading效果

This commit is contained in:
renpy 2023-08-31 09:59:14 +08:00
parent 4a77ea8f82
commit c33fb7ecc3
2 changed files with 39 additions and 33 deletions

View File

@ -1,6 +1,8 @@
<template> <template>
<custom-modal v-model="visible" :width="1000" title="Data Processing Log"> <custom-modal v-model="visible" :width="1000" title="Data Processing Log">
<a-spin :spinning="isLoading">
<pre class="data-processing-log">{{ text }}</pre> <pre class="data-processing-log">{{ text }}</pre>
</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">Export</a-button>
@ -12,41 +14,45 @@
<script> <script>
import ModalMixin from '@/mixins/ModalMixin' import ModalMixin from '@/mixins/ModalMixin'
import { getAction } from '@/api/manage'
export default { export default {
mixins: [ModalMixin], mixins: [ModalMixin],
props: {
sampleId: {
type: Number
}
},
data() { data() {
return { return {
text: `-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 -------------------------- text: "",
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 -------------------------- isLoading: false,
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
-------------------------- SampleAnalyse Beginning at 2023-07-10 11:44:56 --------------------------
`
} }
},
methods: {
beforeModalOpen() {
this.getViewGammaviewerLog();
},
getViewGammaviewerLog() {
this.isLoading = true
let params = {
sampleId: this.sampleId
} }
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")
}
})
}
},
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.data-processing-log { .data-processing-log {
height: 450px;
max-height: 450px; max-height: 450px;
padding: 5px; padding: 5px;
overflow: auto; overflow: auto;

View File

@ -116,7 +116,7 @@
<!-- Color Config 弹窗结束 --> <!-- Color Config 弹窗结束 -->
<!-- Data Processing Log 弹窗开始 --> <!-- Data Processing Log 弹窗开始 -->
<data-processing-log-modal v-model="dataProcessingLogModalVisible" /> <data-processing-log-modal v-model="dataProcessingLogModalVisible" :sampleId="sampleData.sampleId" />
<!-- Data Processing Log 弹窗结束 --> <!-- Data Processing Log 弹窗结束 -->
<!-- Config User Library 弹窗开始 --> <!-- Config User Library 弹窗开始 -->