2023-07-17 19:37:46 +08:00
|
|
|
<template>
|
2023-07-20 14:11:37 +08:00
|
|
|
<custom-modal v-model="visible" :width="1000" :title="type == 1 || type == 3 ? 'ARR' : 'RRR'">
|
|
|
|
<a-spin :spinning="isLoading">
|
|
|
|
<pre>{{ content }}</pre>
|
|
|
|
</a-spin>
|
2023-07-17 19:37:46 +08:00
|
|
|
<div slot="custom-footer" style="text-align: center;">
|
|
|
|
<a-space :size="20">
|
|
|
|
<a-button type="primary">Export</a-button>
|
|
|
|
<a-button @click="visible = false">Cancel</a-button>
|
|
|
|
</a-space>
|
|
|
|
</div>
|
|
|
|
</custom-modal>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import ModalMixin from '@/mixins/ModalMixin'
|
|
|
|
import { getAction } from '../../../../api/manage'
|
|
|
|
export default {
|
|
|
|
mixins: [ModalMixin],
|
|
|
|
props: {
|
|
|
|
type: {
|
2023-07-20 14:11:37 +08:00
|
|
|
type: Number
|
|
|
|
},
|
|
|
|
sampleId: {
|
2023-07-25 20:03:29 +08:00
|
|
|
type: Number
|
2023-07-17 19:37:46 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2023-07-20 14:11:37 +08:00
|
|
|
content: '',
|
2023-07-17 19:37:46 +08:00
|
|
|
isLoading: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
async getContent() {
|
2023-07-20 14:11:37 +08:00
|
|
|
let url = ''
|
|
|
|
switch (this.type) {
|
|
|
|
case 3:
|
|
|
|
url = '/spectrumAnalysis/viewARR'
|
|
|
|
break
|
|
|
|
}
|
2023-07-17 19:37:46 +08:00
|
|
|
try {
|
2023-07-20 14:11:37 +08:00
|
|
|
this.content = ''
|
|
|
|
this.isLoading = true
|
|
|
|
const res = await getAction(url, { sampleId: this.sampleId })
|
|
|
|
this.content = res
|
2023-07-17 19:37:46 +08:00
|
|
|
} catch (error) {
|
|
|
|
console.error(error)
|
2023-07-20 14:11:37 +08:00
|
|
|
} finally {
|
|
|
|
this.isLoading = false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
beforeModalOpen() {
|
|
|
|
if (this.sampleId) {
|
|
|
|
this.getContent()
|
2023-07-17 19:37:46 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
pre {
|
2023-07-20 14:11:37 +08:00
|
|
|
height: 450px;
|
2023-07-17 19:37:46 +08:00
|
|
|
padding: 5px;
|
|
|
|
overflow: auto;
|
|
|
|
background-color: #285367;
|
|
|
|
}
|
|
|
|
</style>
|