beta gamma 模块,弹窗中的字体样式修改
This commit is contained in:
parent
feecc5e8b5
commit
0f3297cc8d
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<custom-modal v-model="visible" :width="1000" title="Auto Process Log Viewer">
|
||||
<a-spin :spinning="isLoading">
|
||||
<pre>
|
||||
<pre style="font-family: 宋体">
|
||||
{{ content }}
|
||||
</pre>
|
||||
</a-spin>
|
||||
<div slot="custom-footer" style="text-align: center;">
|
||||
<div slot="custom-footer" style="text-align: center">
|
||||
<a-space :size="20">
|
||||
<a-button type="primary" @click="handleOk">Save</a-button>
|
||||
<a-button @click="visible = false">Cancel</a-button>
|
||||
|
@ -18,19 +18,19 @@
|
|||
import { getAction } from '@/api/manage'
|
||||
import ModalMixin from '@/mixins/ModalMixin'
|
||||
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||
import { saveAs } from 'file-saver';
|
||||
import { saveAs } from 'file-saver'
|
||||
|
||||
export default {
|
||||
mixins: [ModalMixin, SampleDataMixin],
|
||||
props: {
|
||||
type: {
|
||||
type: Number
|
||||
}
|
||||
type: Number,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
content: '',
|
||||
fileName: ''
|
||||
fileName: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -38,13 +38,17 @@ export default {
|
|||
try {
|
||||
this.isLoading = true
|
||||
const { sampleId, sampleFileName } = this.sampleData
|
||||
const res = await getAction(this.type == 1 ? '/gamma/viewAutomaticAnalysisLog' : '/spectrumAnalysis/viewAutomaticAnalysisLog', { // 自动分析日志接口暂用都是gammam,beta暂时没有
|
||||
sampleId,
|
||||
sampleFileName
|
||||
})
|
||||
if(typeof res == 'string') {
|
||||
const res = await getAction(
|
||||
this.type == 1 ? '/gamma/viewAutomaticAnalysisLog' : '/spectrumAnalysis/viewAutomaticAnalysisLog',
|
||||
{
|
||||
// 自动分析日志接口暂用都是gammam,beta暂时没有
|
||||
sampleId,
|
||||
sampleFileName,
|
||||
}
|
||||
)
|
||||
if (typeof res == 'string') {
|
||||
this.content = res
|
||||
} else if(typeof res == 'object') {
|
||||
} else if (typeof res == 'object') {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
} catch (error) {
|
||||
|
@ -59,32 +63,32 @@ export default {
|
|||
},
|
||||
|
||||
handleOk() {
|
||||
this.fileName=""
|
||||
this.fileName = ''
|
||||
if (this.content) {
|
||||
let _this = this
|
||||
let strData = new Blob([this.content], { type: 'text/plain;charset=utf-8' });
|
||||
let strData = new Blob([this.content], { type: 'text/plain;charset=utf-8' })
|
||||
// saveAs(strData, `${this.type == 1 ?'Gamma-':'Beta-'}Automatic Analysis Log.txt`)
|
||||
this.$confirm({
|
||||
title: 'Please enter file name',
|
||||
content: h => <a-input v-model={_this.fileName} />,
|
||||
content: (h) => <a-input v-model={_this.fileName} />,
|
||||
okText: 'Cancle',
|
||||
cancelText: 'Save',
|
||||
okButtonProps: {style: {backgroundColor: "#b98326", color: "#fff", borderColor: "transparent"}},
|
||||
cancelButtonProps: {style: {color: "#fff", backgroundColor: "#31aab0", borderColor: "transparent"}},
|
||||
okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
|
||||
cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
|
||||
onOk() {
|
||||
console.log('Cancel');
|
||||
console.log('Cancel')
|
||||
},
|
||||
onCancel() {
|
||||
if (_this.fileName) {
|
||||
saveAs(strData, `${_this.fileName}.txt`)
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
} else {
|
||||
this.$message.warning("No data can be saved!")
|
||||
this.$message.warning('No data can be saved!')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<custom-modal v-model="visible" title="BetaGamma Analyser Log" :width="1200">
|
||||
<a-spin :spinning="isLoading">
|
||||
<a-textarea v-model="content"></a-textarea>
|
||||
<a-textarea v-model="content" style="font-family: 宋体"></a-textarea>
|
||||
</a-spin>
|
||||
<div slot="custom-footer">
|
||||
<a-button type="primary" @click="handleClick">Save As</a-button>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<custom-modal v-model="visible" :width="1000" title="View Sample Infomation">
|
||||
<a-spin :spinning="isLoading">
|
||||
<a-textarea v-model="content"></a-textarea>
|
||||
<a-textarea v-model="content" style="font-family: 宋体"></a-textarea>
|
||||
</a-spin>
|
||||
|
||||
<div slot="custom-footer">
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
<a-spin :spinning="isLoading">
|
||||
<a-tabs :animated="false" @change="handleTabChange">
|
||||
<a-tab-pane tab="Sample Spectrum" :key="1">
|
||||
<a-textarea v-model="content.sample"></a-textarea>
|
||||
<a-textarea v-model="content.sample" style="font-family: 宋体"></a-textarea>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="GasBg Spectrum" :key="2">
|
||||
<a-textarea v-model="content.gasBg"></a-textarea>
|
||||
<a-textarea v-model="content.gasBg" style="font-family: 宋体"></a-textarea>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="DetBg Spectrum" :key="3">
|
||||
<a-textarea v-model="content.detBg"></a-textarea>
|
||||
<a-textarea v-model="content.detBg" style="font-family: 宋体"></a-textarea>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="QC Spectrum" :key="4">
|
||||
<a-textarea v-model="content.qc"></a-textarea>
|
||||
<a-textarea v-model="content.qc" style="font-family: 宋体"></a-textarea>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-spin>
|
||||
|
@ -67,7 +67,7 @@ export default {
|
|||
if (success) {
|
||||
if (result) {
|
||||
const keys = ['sample', 'gasBg', 'detBg', 'qc']
|
||||
keys.forEach(key => {
|
||||
keys.forEach((key) => {
|
||||
result[key] = result[key].join('\n')
|
||||
})
|
||||
this.content = result
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<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" style="font-family: 宋体">{{ text }}</pre>
|
||||
</a-spin>
|
||||
<div slot="custom-footer" style="text-align: center">
|
||||
<a-space :size="20">
|
||||
|
|
Loading…
Reference in New Issue
Block a user