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