Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
2b3731322c
|
@ -1,6 +1,11 @@
|
||||||
import { Modal } from 'ant-design-vue'
|
import { Modal } from 'ant-design-vue'
|
||||||
import { saveAs } from 'file-saver'
|
import { saveAs } from 'file-saver'
|
||||||
import JSZip from 'jszip'
|
import JSZip from 'jszip'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import signMd5Utils from '@/utils/encryption/signMd5Utils'
|
||||||
|
import Axios from 'axios'
|
||||||
|
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
|
||||||
|
import { message } from 'ant-design-vue'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 弹窗填入文件名保存文件
|
* 弹窗填入文件名保存文件
|
||||||
|
@ -85,3 +90,52 @@ export const zipFile = async (fileList, zipName) => {
|
||||||
const content = await zip.generateAsync({ type: 'blob' })
|
const content = await zip.generateAsync({ type: 'blob' })
|
||||||
return new File([content], zipName, { type: content.type })
|
return new File([content], zipName, { type: content.type })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据响应头获取文件名
|
||||||
|
* @param {String} contentDisposition
|
||||||
|
*/
|
||||||
|
export function getFileNameByHeaderContentDisposition(contentDisposition) {
|
||||||
|
const patt = new RegExp('file[Nn]ame=([^;]+\\.[^\\.;]+);*')
|
||||||
|
contentDisposition = decodeURI(contentDisposition)
|
||||||
|
const result = patt.exec(contentDisposition)
|
||||||
|
let fileName = result[1]
|
||||||
|
fileName = fileName.replace(/"/g, '')
|
||||||
|
return fileName
|
||||||
|
}
|
||||||
|
|
||||||
|
export const fetchAndDownload = async (url, data) => {
|
||||||
|
const apiBaseUrl = window._CONFIG['domianURL'] || '/jeecg-boot'
|
||||||
|
const sign = signMd5Utils.getSign(url, data)
|
||||||
|
const response = await Axios({
|
||||||
|
baseURL: apiBaseUrl,
|
||||||
|
method: 'post',
|
||||||
|
url,
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'X-Sign': sign,
|
||||||
|
'X-TIMESTAMP': signMd5Utils.getTimestamp(),
|
||||||
|
'X-Access-Token': Vue.ls.get(ACCESS_TOKEN),
|
||||||
|
'tenant-id': Vue.ls.get(TENANT_ID)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const { status, headers, data: responseData } = response
|
||||||
|
if (status == 200) {
|
||||||
|
if (typeof responseData == 'object') {
|
||||||
|
const { message: msg } = responseData
|
||||||
|
message.error(msg)
|
||||||
|
throw new Error(msg)
|
||||||
|
} else {
|
||||||
|
const disposition = headers['content-disposition']
|
||||||
|
const fileName = getFileNameByHeaderContentDisposition(disposition)
|
||||||
|
if (typeof responseData == 'string') {
|
||||||
|
const blob = new Blob([responseData], { type: headers['content-type'] })
|
||||||
|
saveAs(blob, fileName)
|
||||||
|
return fileName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.error('This operation fails. Contact your system administrator')
|
||||||
|
throw new Error('This operation fails. Contact your system administrator')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
17
src/views/spectrumAnalysis/clearSampleCache.js
Normal file
17
src/views/spectrumAnalysis/clearSampleCache.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import { deleteAction } from '@/api/manage'
|
||||||
|
/**
|
||||||
|
* 发起请求清理后端对sample的缓存
|
||||||
|
* @param {Array<any>} sampleList
|
||||||
|
*/
|
||||||
|
export const clearSampleCache = (sampleList) => {
|
||||||
|
sampleList.forEach(sample => {
|
||||||
|
const { inputFileName: fileName, sampleFileName, qcFileName } = sample
|
||||||
|
let url = '/gamma/delPHDCache',
|
||||||
|
params = { fileName }
|
||||||
|
if (sample.sampleType == 'B') {
|
||||||
|
url = '/spectrumAnalysis/deleteSpectrumCacheData'
|
||||||
|
params = { sampleFileName , qcFileName }
|
||||||
|
}
|
||||||
|
deleteAction(url, params)
|
||||||
|
})
|
||||||
|
}
|
|
@ -51,7 +51,7 @@
|
||||||
class="custom-tool-tip"
|
class="custom-tool-tip"
|
||||||
:style="{
|
:style="{
|
||||||
top: customToolTip.top + 'px',
|
top: customToolTip.top + 'px',
|
||||||
left: customToolTip.left + 'px'
|
left: customToolTip.left + 'px',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="channel">Channel: {{ customToolTip.channel }}</div>
|
<div class="channel">Channel: {{ customToolTip.channel }}</div>
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
class="custom-tool-tip"
|
class="custom-tool-tip"
|
||||||
:style="{
|
:style="{
|
||||||
top: customToolTip2.top + 'px',
|
top: customToolTip2.top + 'px',
|
||||||
left: customToolTip2.left + 'px'
|
left: customToolTip2.left + 'px',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="channel">Channel: {{ customToolTip2.channel }}</div>
|
<div class="channel">Channel: {{ customToolTip2.channel }}</div>
|
||||||
|
@ -89,10 +89,18 @@
|
||||||
<div class="title">Gamma Window Setting</div>
|
<div class="title">Gamma Window Setting</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="label">Gamma Window Begin:</div>
|
<div class="label">Gamma Window Begin:</div>
|
||||||
<a-input-number size="small" v-model="model.windowBegin" @change="calculateTotalCount"></a-input-number>
|
<a-input-number
|
||||||
|
size="small"
|
||||||
|
v-model="model.windowBegin"
|
||||||
|
@change="handleGammaWindowSettingChange"
|
||||||
|
></a-input-number>
|
||||||
Channel
|
Channel
|
||||||
<div class="label">Gamma Window End:</div>
|
<div class="label">Gamma Window End:</div>
|
||||||
<a-input-number size="small" v-model="model.windowEnd" @change="calculateTotalCount"></a-input-number>
|
<a-input-number
|
||||||
|
size="small"
|
||||||
|
v-model="model.windowEnd"
|
||||||
|
@change="handleGammaWindowSettingChange"
|
||||||
|
></a-input-number>
|
||||||
Channel
|
Channel
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,9 +108,19 @@
|
||||||
<div class="title">Parameter Setting</div>
|
<div class="title">Parameter Setting</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="label">Min of Energy:</div>
|
<div class="label">Min of Energy:</div>
|
||||||
<a-input-number size="small" v-model="model.minEnergy"></a-input-number> keV
|
<a-input-number
|
||||||
|
size="small"
|
||||||
|
v-model="model.minEnergy"
|
||||||
|
@change="handleParameterSettingChange"
|
||||||
|
></a-input-number>
|
||||||
|
keV
|
||||||
<div class="label">Half Life:</div>
|
<div class="label">Half Life:</div>
|
||||||
<a-input-number size="small" v-model="model.halfLife"></a-input-number> Day
|
<a-input-number
|
||||||
|
size="small"
|
||||||
|
v-model="model.halfLife"
|
||||||
|
@change="handleParameterSettingChange"
|
||||||
|
></a-input-number>
|
||||||
|
Day
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
|
@ -137,7 +155,7 @@
|
||||||
>
|
>
|
||||||
<template slot="delete" slot-scope="text, record, index">
|
<template slot="delete" slot-scope="text, record, index">
|
||||||
<a-button type="link" size="small" @click="handleDel(index)">
|
<a-button type="link" size="small" @click="handleDel(index)">
|
||||||
<a-icon type="delete" style="color: red;"></a-icon>
|
<a-icon type="delete" style="color: red"></a-icon>
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
@ -196,7 +214,7 @@ import { getAction, postAction } from '@/api/manage'
|
||||||
import { useBaseChartSetting } from '../../../useChart'
|
import { useBaseChartSetting } from '../../../useChart'
|
||||||
import TitleOverBorder from '../../TitleOverBorder.vue'
|
import TitleOverBorder from '../../TitleOverBorder.vue'
|
||||||
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||||
import { isNullOrUndefined } from '@/utils/util'
|
import { isNumber } from 'xe-utils/methods'
|
||||||
|
|
||||||
const initialGammaChartOption = {
|
const initialGammaChartOption = {
|
||||||
grid: {
|
grid: {
|
||||||
|
@ -204,7 +222,7 @@ const initialGammaChartOption = {
|
||||||
right: 15,
|
right: 15,
|
||||||
bottom: 10,
|
bottom: 10,
|
||||||
left: 10,
|
left: 10,
|
||||||
containLabel: true
|
containLabel: true,
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
|
@ -212,21 +230,21 @@ const initialGammaChartOption = {
|
||||||
interval: 64,
|
interval: 64,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgb(119, 181, 213, 0.5)'
|
color: 'rgb(119, 181, 213, 0.5)',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgba(119, 181, 213, .2)'
|
color: 'rgba(119, 181, 213, .2)',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#ade6ee'
|
color: '#ade6ee',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
|
@ -235,57 +253,57 @@ const initialGammaChartOption = {
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgb(119, 181, 213, 0.5)'
|
color: 'rgb(119, 181, 213, 0.5)',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgba(119, 181, 213, .2)'
|
color: 'rgba(119, 181, 213, .2)',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#ade6ee'
|
color: '#ade6ee',
|
||||||
},
|
},
|
||||||
animation: false
|
animation: false,
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#04ADD9'
|
color: '#04ADD9',
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: [],
|
data: [],
|
||||||
markLine: {
|
markLine: {
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
label: {
|
label: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
animation: false,
|
animation: false,
|
||||||
emphasis: {
|
emphasis: {
|
||||||
disabled: true
|
disabled: true,
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#f00'
|
color: '#f00',
|
||||||
},
|
},
|
||||||
data: [{ xAxis: -1 }, { xAxis: -1 }]
|
data: [{ xAxis: -1 }, { xAxis: -1 }],
|
||||||
},
|
},
|
||||||
animation: false
|
animation: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#A8DA56'
|
color: '#A8DA56',
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: [],
|
data: [],
|
||||||
animation: false
|
animation: false,
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
const initialBetaChartOption = {
|
const initialBetaChartOption = {
|
||||||
|
@ -294,7 +312,7 @@ const initialBetaChartOption = {
|
||||||
right: 15,
|
right: 15,
|
||||||
bottom: 10,
|
bottom: 10,
|
||||||
left: 10,
|
left: 10,
|
||||||
containLabel: true
|
containLabel: true,
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
|
@ -302,21 +320,21 @@ const initialBetaChartOption = {
|
||||||
interval: 64,
|
interval: 64,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgb(119, 181, 213, 0.5)'
|
color: 'rgb(119, 181, 213, 0.5)',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgba(119, 181, 213, .2)'
|
color: 'rgba(119, 181, 213, .2)',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#ade6ee'
|
color: '#ade6ee',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
|
@ -325,57 +343,57 @@ const initialBetaChartOption = {
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgb(119, 181, 213, 0.5)'
|
color: 'rgb(119, 181, 213, 0.5)',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgba(119, 181, 213, .2)'
|
color: 'rgba(119, 181, 213, .2)',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#ade6ee'
|
color: '#ade6ee',
|
||||||
},
|
},
|
||||||
animation: false
|
animation: false,
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#04ADD9'
|
color: '#04ADD9',
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: [],
|
data: [],
|
||||||
markLine: {
|
markLine: {
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
label: {
|
label: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
animation: false,
|
animation: false,
|
||||||
emphasis: {
|
emphasis: {
|
||||||
disabled: true
|
disabled: true,
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#f00'
|
color: '#f00',
|
||||||
},
|
},
|
||||||
data: []
|
data: [],
|
||||||
},
|
},
|
||||||
animation: false
|
animation: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#A8DA56'
|
color: '#A8DA56',
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: [],
|
data: [],
|
||||||
animation: false
|
animation: false,
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
const initialResultChartOption = {
|
const initialResultChartOption = {
|
||||||
|
@ -384,23 +402,23 @@ const initialResultChartOption = {
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#04ADD9'
|
color: '#04ADD9',
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: [],
|
data: [],
|
||||||
animation: false
|
animation: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'scatter',
|
type: 'scatter',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: 'red'
|
color: 'red',
|
||||||
},
|
},
|
||||||
symbolSize: 6,
|
symbolSize: 6,
|
||||||
data: [],
|
data: [],
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
animation: false
|
animation: false,
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
initialResultChartOption.yAxis.boundaryGap = ['20%', '20%']
|
initialResultChartOption.yAxis.boundaryGap = ['20%', '20%']
|
||||||
|
@ -411,30 +429,30 @@ const columns = [
|
||||||
customRender: (_, __, index) => {
|
customRender: (_, __, index) => {
|
||||||
return index + 1
|
return index + 1
|
||||||
},
|
},
|
||||||
align: 'center'
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Eb',
|
title: 'Eb',
|
||||||
dataIndex: 'eb',
|
dataIndex: 'eb',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Nx',
|
title: 'Nx',
|
||||||
dataIndex: 'nx',
|
dataIndex: 'nx',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Ny',
|
title: 'Ny',
|
||||||
dataIndex: 'ny',
|
dataIndex: 'ny',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Delete',
|
title: 'Delete',
|
||||||
scopedSlots: {
|
scopedSlots: {
|
||||||
customRender: 'delete'
|
customRender: 'delete',
|
||||||
},
|
},
|
||||||
align: 'center'
|
align: 'center',
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const initialModel = {
|
const initialModel = {
|
||||||
|
@ -442,20 +460,20 @@ const initialModel = {
|
||||||
windowEnd: undefined,
|
windowEnd: undefined,
|
||||||
minEnergy: 0.1,
|
minEnergy: 0.1,
|
||||||
halfLife: 5.243,
|
halfLife: 5.243,
|
||||||
fitType: 'liner'
|
fitType: 'liner',
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function of Fitting
|
// Function of Fitting
|
||||||
const funcList = {
|
const funcList = {
|
||||||
liner: 'y = ax + b',
|
liner: 'y = ax + b',
|
||||||
poly2: 'y = axx + bx + c'
|
poly2: 'y = axx + bx + c',
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin, SampleDataMixin],
|
mixins: [ModalMixin, SampleDataMixin],
|
||||||
components: {
|
components: {
|
||||||
CustomChart,
|
CustomChart,
|
||||||
TitleOverBorder
|
TitleOverBorder,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
|
@ -469,14 +487,14 @@ export default {
|
||||||
left: 0,
|
left: 0,
|
||||||
visible: false,
|
visible: false,
|
||||||
channel: '',
|
channel: '',
|
||||||
energy: ''
|
energy: '',
|
||||||
},
|
},
|
||||||
customToolTip2: {
|
customToolTip2: {
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
visible: false,
|
visible: false,
|
||||||
channel: '',
|
channel: '',
|
||||||
energy: ''
|
energy: '',
|
||||||
},
|
},
|
||||||
|
|
||||||
totalCount: [0, 0],
|
totalCount: [0, 0],
|
||||||
|
@ -490,7 +508,7 @@ export default {
|
||||||
|
|
||||||
model: cloneDeep(initialModel),
|
model: cloneDeep(initialModel),
|
||||||
tableList: [],
|
tableList: [],
|
||||||
isAnalysing: false
|
isAnalysing: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -502,7 +520,7 @@ export default {
|
||||||
this.resultChartOption = cloneDeep(initialResultChartOption)
|
this.resultChartOption = cloneDeep(initialResultChartOption)
|
||||||
|
|
||||||
this.model = cloneDeep(initialModel)
|
this.model = cloneDeep(initialModel)
|
||||||
this.currFunction = funcList[this.model.fitType]
|
this.handleFuncChange()
|
||||||
this.tableList = []
|
this.tableList = []
|
||||||
|
|
||||||
this.calculateTotalCount()
|
this.calculateTotalCount()
|
||||||
|
@ -516,7 +534,7 @@ export default {
|
||||||
const { sampleId, inputFileName: sampleFileName } = this.sampleData
|
const { sampleId, inputFileName: sampleFileName } = this.sampleData
|
||||||
const { success, result, message } = await getAction('/spectrumAnalysis/viewExtrapolation', {
|
const { success, result, message } = await getAction('/spectrumAnalysis/viewExtrapolation', {
|
||||||
sampleId,
|
sampleId,
|
||||||
sampleFileName
|
sampleFileName,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.detail = result
|
this.detail = result
|
||||||
|
@ -526,7 +544,7 @@ export default {
|
||||||
betaProjectedSeriseData,
|
betaProjectedSeriseData,
|
||||||
gammaChannelEnergy,
|
gammaChannelEnergy,
|
||||||
gammaOriginSeriseData,
|
gammaOriginSeriseData,
|
||||||
gammaProjectedSeriseData
|
gammaProjectedSeriseData,
|
||||||
} = result
|
} = result
|
||||||
|
|
||||||
this.gammaChannelEnergy = gammaChannelEnergy
|
this.gammaChannelEnergy = gammaChannelEnergy
|
||||||
|
@ -579,8 +597,8 @@ export default {
|
||||||
// 如果是左键
|
// 如果是左键
|
||||||
if (isMouseLeft) {
|
if (isMouseLeft) {
|
||||||
// 如果有右值且左值大于等于右值,清空
|
// 如果有右值且左值大于等于右值,清空
|
||||||
if (!isNullOrUndefined(this.model.windowEnd) && xAxis >= this.model.windowEnd) {
|
if (!isNumber(this.model.windowEnd) && xAxis >= this.model.windowEnd) {
|
||||||
this.clearMarkLineAndToolTip()
|
this.reset()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,8 +609,8 @@ export default {
|
||||||
}
|
}
|
||||||
// 如果是右键
|
// 如果是右键
|
||||||
else {
|
else {
|
||||||
if (!isNullOrUndefined(this.model.windowBegin) && xAxis <= this.model.windowBegin) {
|
if (!isNumber(this.model.windowBegin) && xAxis <= this.model.windowBegin) {
|
||||||
this.clearMarkLineAndToolTip()
|
this.reset()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -612,10 +630,11 @@ export default {
|
||||||
currToolTip.energy = parseInt(energy) + 'keV'
|
currToolTip.energy = parseInt(energy) + 'keV'
|
||||||
|
|
||||||
this.calculateTotalCount()
|
this.calculateTotalCount()
|
||||||
|
this.getTableAndChartData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
clearMarkLineAndToolTip() {
|
reset() {
|
||||||
const markLineData = this.gammaSpectrumChartOption.series[0].markLine.data
|
const markLineData = this.gammaSpectrumChartOption.series[0].markLine.data
|
||||||
markLineData[0].xAxis = -1
|
markLineData[0].xAxis = -1
|
||||||
markLineData[1].xAxis = -1
|
markLineData[1].xAxis = -1
|
||||||
|
@ -626,12 +645,18 @@ export default {
|
||||||
this.model.windowBegin = null
|
this.model.windowBegin = null
|
||||||
this.model.windowEnd = null
|
this.model.windowEnd = null
|
||||||
|
|
||||||
|
this.tableList = []
|
||||||
|
const [lineSeries, scatterSeries] = this.resultChartOption.series
|
||||||
|
lineSeries.data = []
|
||||||
|
scatterSeries.data = []
|
||||||
|
|
||||||
this.calculateTotalCount()
|
this.calculateTotalCount()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 计算Total Count
|
// 计算Total Count
|
||||||
calculateTotalCount() {
|
calculateTotalCount() {
|
||||||
if (!this.model.windowBegin || !this.model.windowEnd || this.model.windowBegin >= this.model.windowEnd) {
|
const { windowBegin, windowEnd } = this.model
|
||||||
|
if (!isNumber(windowBegin) || !isNumber(windowEnd) || windowBegin >= windowEnd) {
|
||||||
this.totalCount = [0, 0]
|
this.totalCount = [0, 0]
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -658,56 +683,96 @@ export default {
|
||||||
exportEchartImg(this.$refs.chartRef.getChartInstance())
|
exportEchartImg(this.$refs.chartRef.getChartInstance())
|
||||||
},
|
},
|
||||||
|
|
||||||
// 分析
|
handleGammaWindowSettingChange() {
|
||||||
async handleAnalyse() {
|
this.calculateTotalCount()
|
||||||
|
this.getTableAndChartData()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleParameterSettingChange() {
|
||||||
|
this.getTableAndChartData()
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取表格和图表数据
|
||||||
|
*/
|
||||||
|
async getTableAndChartData() {
|
||||||
const { windowBegin, windowEnd, minEnergy, halfLife, fitType } = this.model
|
const { windowBegin, windowEnd, minEnergy, halfLife, fitType } = this.model
|
||||||
if (
|
const [lineSeries, scatterSeries] = this.resultChartOption.series
|
||||||
isNullOrUndefined(windowBegin) ||
|
lineSeries.data = []
|
||||||
isNullOrUndefined(windowEnd) ||
|
|
||||||
isNullOrUndefined(minEnergy) ||
|
if (!this.validateSettingValue()) {
|
||||||
isNullOrUndefined(halfLife)
|
scatterSeries.data = []
|
||||||
) {
|
this.tableList = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
const { sampleFileName, detFileName } = this.sampleData
|
|
||||||
|
|
||||||
|
const { sampleId, dbName, sampleFileName, detFileName } = this.sampleData
|
||||||
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
sampleId: null,
|
sampleId,
|
||||||
dbName: '',
|
dbName,
|
||||||
sampleFileName,
|
sampleFileName,
|
||||||
detFileName,
|
detFileName,
|
||||||
gammaBegin: windowBegin,
|
gammaBegin: windowBegin,
|
||||||
gammaEnd: windowEnd,
|
gammaEnd: windowEnd,
|
||||||
minEnergy,
|
minEnergy,
|
||||||
halfLife,
|
halfLife,
|
||||||
fitType //选择Linear 传 liner 选择2-Polynomial 传 poly2
|
fitType, //选择Linear 传 liner 选择2-Polynomial 传 poly2
|
||||||
}
|
}
|
||||||
|
const { success, result, message } = await postAction('/spectrumAnalysis/changeDataExtrapolation', params)
|
||||||
|
if (success) {
|
||||||
|
const { resultViewScatterDataValue, tableData } = result
|
||||||
|
scatterSeries.data = resultViewScatterDataValue.map(({ x, y }) => [x, y])
|
||||||
|
this.resetResultChartPerform()
|
||||||
|
|
||||||
|
this.tableList = tableData
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 分析
|
||||||
|
async handleAnalyse() {
|
||||||
|
const { minEnergy, halfLife, fitType } = this.model
|
||||||
|
if (!this.validateSettingValue()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const { acquisitionRealTime: acqRealTime, acquisitionStart: acqStartTime } = this.detail
|
||||||
|
|
||||||
|
const params = {
|
||||||
|
eb: this.tableList.map(({ eb }) => eb),
|
||||||
|
nx: this.tableList.map(({ nx }) => nx),
|
||||||
|
ny: this.tableList.map(({ ny }) => ny),
|
||||||
|
acqRealTime,
|
||||||
|
minEnergy,
|
||||||
|
halfLife,
|
||||||
|
acqStartTime,
|
||||||
|
fitType,
|
||||||
|
}
|
||||||
|
|
||||||
this.isAnalysing = true
|
this.isAnalysing = true
|
||||||
const { success, result, message } = await postAction('/spectrumAnalysis/analyseExtrapolation', params)
|
const { success, result, message } = await postAction('/spectrumAnalysis/analyseExtrapolation', params)
|
||||||
if (success) {
|
if (success) {
|
||||||
console.log('%c [ ]-679', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
|
||||||
const {
|
const {
|
||||||
functionFit, // Function of Fitting
|
functionFit, // Function of Fitting
|
||||||
resultViewLineDataValue, // 折线
|
resultViewLineDataValue, // 折线
|
||||||
resultViewScatterDataValue, // 原点
|
xeAct,
|
||||||
tableData, // 表格数据
|
|
||||||
xeAct
|
|
||||||
} = result
|
} = result
|
||||||
|
|
||||||
this.currFunction = functionFit
|
this.currFunction = functionFit
|
||||||
|
|
||||||
const [lineSeries, scatterSeries] = this.resultChartOption.series
|
const [lineSeries] = this.resultChartOption.series
|
||||||
lineSeries.data = resultViewLineDataValue.map(({ x, y }) => [x, y])
|
lineSeries.data = resultViewLineDataValue.map(({ x, y }) => [x, y])
|
||||||
scatterSeries.data = resultViewScatterDataValue.map(({ x, y }) => [x, y])
|
|
||||||
this.resetResultChartPerform()
|
this.resetResultChartPerform()
|
||||||
|
|
||||||
this.xeActivity = {
|
this.xeActivity = {
|
||||||
referenceTime: this.detail.acquisitionStart,
|
referenceTime: this.detail.acquisitionStart,
|
||||||
activity: Number.isNaN(xeAct)? xeAct: Number(xeAct).toPrecision(6)
|
activity: Number.isNaN(xeAct) ? xeAct : Number(xeAct).toPrecision(6),
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tableList = tableData
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -718,6 +783,18 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
validateSettingValue() {
|
||||||
|
const { windowBegin, windowEnd, minEnergy, halfLife } = this.model
|
||||||
|
if (!isNumber(windowBegin) || !isNumber(windowEnd) || !isNumber(minEnergy) || !isNumber(halfLife)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图表最大值、最小值等设为按实际情况取值
|
||||||
|
*/
|
||||||
resetResultChartPerform() {
|
resetResultChartPerform() {
|
||||||
this.resultChartOption.yAxis.min = undefined
|
this.resultChartOption.yAxis.min = undefined
|
||||||
this.resultChartOption.yAxis.max = undefined
|
this.resultChartOption.yAxis.max = undefined
|
||||||
|
@ -731,8 +808,8 @@ export default {
|
||||||
handleDel(index) {
|
handleDel(index) {
|
||||||
this.tableList.splice(index, 1)
|
this.tableList.splice(index, 1)
|
||||||
this.resultChartOption.series[1].data.splice(index, 1)
|
this.resultChartOption.series[1].data.splice(index, 1)
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
<a-form-model class="settings" :labelCol="{ style: { width: '75px', textAlign: 'center' } }">
|
<a-form-model class="settings" :labelCol="{ style: { width: '75px', textAlign: 'center' } }">
|
||||||
<div class="top-left">
|
<div class="top-left">
|
||||||
<a-form-model-item label="MSG_ID">
|
<a-form-model-item label="MSG_ID">
|
||||||
<a-input v-model="canberraIecImsParams.msgId"></a-input>
|
<a-input v-model="params.msg_id"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Comment">
|
<a-form-model-item label="Comment">
|
||||||
<a-textarea v-model="canberraIecImsParams.comment"></a-textarea>
|
<a-textarea v-model="params.comment"></a-textarea>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<title-over-border title="Collection Block">
|
<title-over-border title="Collection Block">
|
||||||
<a-form-model-item label="Start Time">
|
<a-form-model-item label="Start Time">
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="canberraIecImsParams.startTime"
|
v-model="params.collect_start"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Stop Time">
|
<a-form-model-item label="Stop Time">
|
||||||
|
@ -22,12 +22,12 @@
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="canberraIecImsParams.stopTime"
|
v-model="params.collect_stop"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<div>
|
<div>
|
||||||
<p>Total air volume sampled</p>
|
<p>Total air volume sampled</p>
|
||||||
<a-input v-model="canberraIecImsParams.totalAir"></a-input>
|
<a-input-number v-model="params.air_volume" style="width: 100%;"></a-input-number>
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,43 +35,43 @@
|
||||||
<div class="header-block-list">
|
<div class="header-block-list">
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.designatorEditable"></a-checkbox>
|
||||||
Designator
|
Designator
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="canberraIecImsParams.designator"></a-input>
|
<a-input :disabled="!states.designatorEditable" v-model="params.designator"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.stationCodeEditable"></a-checkbox>
|
||||||
Station code
|
Station code
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="canberraIecImsParams.stationCode"></a-input>
|
<a-input :disabled="!states.stationCodeEditable" v-model="params.station"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.detectorCodeEditable"></a-checkbox>
|
||||||
Detector code
|
Detector code
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="canberraIecImsParams.detectorCode"></a-input>
|
<a-input :disabled="!states.detectorCodeEditable" v-model="params.detector"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.sampleGeometryEditable"></a-checkbox>
|
||||||
Sample geometry
|
Sample geometry
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="canberraIecImsParams.sampleGeometry"></a-input>
|
<a-input :disabled="!states.sampleGeometryEditable" v-model="params.sam_geom"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="system-type-and-spectrum-qualifier">
|
<div class="system-type-and-spectrum-qualifier">
|
||||||
<title-over-border title="System type" class="system-type">
|
<title-over-border title="System type" class="system-type">
|
||||||
<a-radio-group v-model="canberraIecImsParams.systemType">
|
<a-radio-group v-model="params.sys_type">
|
||||||
<a-radio value="P">P</a-radio>
|
<a-radio value="P">P</a-radio>
|
||||||
<a-radio value="G">G</a-radio>
|
<a-radio value="G">G</a-radio>
|
||||||
<a-radio value="B">B</a-radio>
|
<a-radio value="B">B</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Spectrum qualifier" class="spectrum-qualifier">
|
<title-over-border title="Spectrum qualifier" class="spectrum-qualifier">
|
||||||
<a-radio-group v-model="canberraIecImsParams.spectrumQualifier">
|
<a-radio-group v-model="params.quantity">
|
||||||
<a-radio value="PREL">PREL</a-radio>
|
<a-radio value="PREL">PREL</a-radio>
|
||||||
<a-radio value="FULL">FULL</a-radio>
|
<a-radio value="FULL">FULL</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
|
@ -80,44 +80,27 @@
|
||||||
<div class="identifications">
|
<div class="identifications">
|
||||||
<div>
|
<div>
|
||||||
<p>Sample reference identification</p>
|
<p>Sample reference identification</p>
|
||||||
<a-input v-model="canberraIecImsParams.sampleRef"></a-input>
|
<a-input v-model="params.srId"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>Background measurement identification</p>
|
<p>Background measurement identification</p>
|
||||||
<a-input v-model="canberraIecImsParams.backgroundMea"></a-input>
|
<a-input v-model="params.bgMeasureId"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="transmit-time">
|
<div class="transmit-time">
|
||||||
<a-checkbox>Transmit time</a-checkbox>
|
<a-checkbox v-model="states.transmitTimeEditable">Transmit time</a-checkbox>
|
||||||
<custom-date-picker
|
<custom-date-picker
|
||||||
|
:disabled="!states.transmitTimeEditable"
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="canberraIecImsParams.transmitTime"
|
v-model="params.transmit"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
<title-over-border title="Spectrum Transfer" class="spectrum-transfer">
|
<title-over-border title="Spectrum Transfer" class="spectrum-transfer">
|
||||||
<div class="title-container">
|
<spectrum-transfer-com :params="params" :fileOptions="fileOptions" />
|
||||||
<div class="title">
|
|
||||||
<a-upload name="file" :multiple="true" :showUploadList="false" :beforeUpload="ortecBeforeUpload">
|
|
||||||
<div>Canberra IEC1455(.IEC)</div>
|
|
||||||
</a-upload>
|
|
||||||
</div>
|
|
||||||
<div class="data-type">
|
|
||||||
Data type
|
|
||||||
<div class="data-type-select">
|
|
||||||
<custom-select :option="[{ label: 'SAMPLEPHD', value: 1 }]" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="title">
|
|
||||||
<a-upload name="file" :multiple="true" :showUploadList="false" :beforeUpload="imsBeforeUpload">
|
|
||||||
<div>IMS .ims .rms</div>
|
|
||||||
</a-upload>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a-transfer :render="(item) => item.title" :data-source="dataSource" :target-keys="targetKeys" />
|
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -125,50 +108,58 @@
|
||||||
<script>
|
<script>
|
||||||
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
import SpectrumTransferCom from './SpectrumTransferCom.vue'
|
||||||
|
|
||||||
|
const initParams = {
|
||||||
|
msg_id: '123456789',
|
||||||
|
comment: '',
|
||||||
|
collect_start: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
collect_stop: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
air_volume: '0',
|
||||||
|
designator: '3',
|
||||||
|
station: 'CNL06',
|
||||||
|
detector: 'CNL06_001',
|
||||||
|
sam_geom: 'DISC70MMX5MM',
|
||||||
|
sys_type: 'P',
|
||||||
|
quantity: 'FULL',
|
||||||
|
srId: '123456789',
|
||||||
|
bgMeasureId: '0',
|
||||||
|
transmit: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
}
|
||||||
|
|
||||||
|
const initStates = {
|
||||||
|
designatorEditable: false,
|
||||||
|
stationCodeEditable: false,
|
||||||
|
detectorCodeEditable: false,
|
||||||
|
sampleGeometryEditable: false,
|
||||||
|
transmitTimeEditable: false,
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder },
|
components: { TitleOverBorder, SpectrumTransferCom },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
canberraIecImsParams: {
|
params: cloneDeep(initParams),
|
||||||
msgId: '123456789',
|
states: cloneDeep(initStates),
|
||||||
comment: '',
|
fileOptions: [
|
||||||
startTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
{
|
||||||
stopTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
title: 'Canberra IEC1455(.IEC)',
|
||||||
totalAir: '0',
|
accept: '.IEC',
|
||||||
designator: '3',
|
transformUrl: '/gamma/ftransit/IecToIms',
|
||||||
stationCode: 'CNL06',
|
},
|
||||||
detectorCode: 'CNL06_001',
|
{
|
||||||
sampleGeometry: 'DISC70MMX5MM',
|
title: 'IMS.ims.rms',
|
||||||
systemType: 'P',
|
accept: '.IMS,.RMS,.PHD',
|
||||||
spectrumQualifier: 'FULL',
|
transformUrl: '/gamma/ftransit/ImsToIec'
|
||||||
sampleRef: '123456789',
|
},
|
||||||
backgroundMea: '0',
|
],
|
||||||
transmitTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
|
||||||
},
|
|
||||||
dataSource: [],
|
|
||||||
targetKeys: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
ortecBeforeUpload(file, fileList) {
|
beforeModalOpen() {
|
||||||
console.log(file, fileList)
|
this.params = cloneDeep(initParams)
|
||||||
this.dataSource = fileList.map((item) => {
|
this.states = cloneDeep(initStates)
|
||||||
return {
|
|
||||||
key: item.uid,
|
|
||||||
title: item.name,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
imsBeforeUpload(file, fileList) {
|
|
||||||
console.log(file, fileList)
|
|
||||||
let arr = fileList.map((item) => {
|
|
||||||
return {
|
|
||||||
key: item.uid,
|
|
||||||
title: item.name,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.targetKeys = arr.map((item) => item.key)
|
|
||||||
this.dataSource.push(...arr)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -261,67 +252,5 @@ export default {
|
||||||
|
|
||||||
.spectrum-transfer {
|
.spectrum-transfer {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.title-container {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #225a6a;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
/deep/.ant-upload {
|
|
||||||
width: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-type {
|
|
||||||
width: 166px;
|
|
||||||
padding: 0 8px;
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
z-index: 1;
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
&-select {
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
padding: 8px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-transfer {
|
|
||||||
margin-top: 8px;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
|
|
||||||
::v-deep {
|
|
||||||
.ant-transfer {
|
|
||||||
&-list {
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-operation {
|
|
||||||
width: 150px;
|
|
||||||
|
|
||||||
.ant-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="int-spc-canberra-iec-transfer">
|
<div class="int-spc-canberra-iec-transfer">
|
||||||
<div class="spectrum-transfer">
|
<div class="spectrum-transfer">
|
||||||
<div class="title-container">
|
<spectrum-transfer-com :fileOptions="fileOptions" :showDataType="false" />
|
||||||
<div class="title">Select .SPC File</div>
|
|
||||||
<div class="title">Select .IEC File</div>
|
|
||||||
</div>
|
|
||||||
<a-transfer></a-transfer>
|
|
||||||
|
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
<p>使用说明</p>
|
<p>使用说明</p>
|
||||||
|
@ -17,64 +13,31 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
import SpectrumTransferCom from './SpectrumTransferCom.vue'
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder }
|
components: { SpectrumTransferCom },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fileOptions: [
|
||||||
|
{
|
||||||
|
title: 'Select .SPC File',
|
||||||
|
accept: '.SPC',
|
||||||
|
transformUrl: '/gamma/ftransit/SpcToIec',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Select .IEC File',
|
||||||
|
accept: '.IEC',
|
||||||
|
transformUrl: '/gamma/ftransit/IecToSpc',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
|
||||||
.spectrum-transfer {
|
.spectrum-transfer {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.title-container {
|
|
||||||
display: flex;
|
|
||||||
gap: 66px;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #225a6a;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-transfer {
|
|
||||||
margin-top: 8px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
::v-deep {
|
|
||||||
.ant-transfer {
|
|
||||||
&-list {
|
|
||||||
flex: 1;
|
|
||||||
height: 400px;
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-operation {
|
|
||||||
width: 50px;
|
|
||||||
|
|
||||||
.ant-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
margin-bottom: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.desc {
|
.desc {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
|
@ -82,5 +45,17 @@ export default {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spectrum-transfer-com {
|
||||||
|
grid-template-rows: 30px 450px;
|
||||||
|
grid-template-columns: 1fr 75px 1fr;
|
||||||
|
|
||||||
|
::v-deep {
|
||||||
|
.operators {
|
||||||
|
justify-content: center;
|
||||||
|
gap: 80px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
<a-form-model class="settings" :labelCol="{ style: { width: '75px', textAlign: 'center' } }">
|
<a-form-model class="settings" :labelCol="{ style: { width: '75px', textAlign: 'center' } }">
|
||||||
<div class="top-left">
|
<div class="top-left">
|
||||||
<a-form-model-item label="MSG_ID">
|
<a-form-model-item label="MSG_ID">
|
||||||
<a-input v-model="intSpacImsParams.msgId"></a-input>
|
<a-input v-model="params.msg_id"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Comment">
|
<a-form-model-item label="Comment">
|
||||||
<a-textarea v-model="intSpacImsParams.comment"></a-textarea>
|
<a-textarea v-model="params.comment"></a-textarea>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<title-over-border title="Collection Block">
|
<title-over-border title="Collection Block">
|
||||||
<a-form-model-item label="Start Time">
|
<a-form-model-item label="Start Time">
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="intSpacImsParams.startTime"
|
v-model="params.collect_start"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Stop Time">
|
<a-form-model-item label="Stop Time">
|
||||||
|
@ -22,12 +22,12 @@
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="intSpacImsParams.stopTime"
|
v-model="params.collect_stop"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<div>
|
<div>
|
||||||
<p>Total air volume sampled</p>
|
<p>Total air volume sampled</p>
|
||||||
<a-input v-model="intSpacImsParams.totalAir"></a-input>
|
<a-input-number v-model="params.air_volume" style="width: 100%;"></a-input-number>
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,43 +35,43 @@
|
||||||
<div class="header-block-list">
|
<div class="header-block-list">
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.designatorEditable"></a-checkbox>
|
||||||
Designator
|
Designator
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="intSpacImsParams.designator"></a-input>
|
<a-input :disabled="!states.designatorEditable" v-model="params.designator"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.stationCodeEditable"></a-checkbox>
|
||||||
Station code
|
Station code
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="intSpacImsParams.stationCode"></a-input>
|
<a-input :disabled="!states.stationCodeEditable" v-model="params.station"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.detectorCodeEditable"></a-checkbox>
|
||||||
Detector code
|
Detector code
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="intSpacImsParams.detectorCode"></a-input>
|
<a-input :disabled="!states.detectorCodeEditable" v-model="params.detector"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.sampleGeometryEditable"></a-checkbox>
|
||||||
Sample geometry
|
Sample geometry
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="intSpacImsParams.sampleGeometry"></a-input>
|
<a-input :disabled="!states.sampleGeometryEditable" v-model="params.sam_geom"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="system-type-and-spectrum-qualifier">
|
<div class="system-type-and-spectrum-qualifier">
|
||||||
<title-over-border title="System type" class="system-type">
|
<title-over-border title="System type" class="system-type">
|
||||||
<a-radio-group v-model="intSpacImsParams.systemType">
|
<a-radio-group v-model="params.sys_type">
|
||||||
<a-radio value="P">P</a-radio>
|
<a-radio value="P">P</a-radio>
|
||||||
<a-radio value="G">G</a-radio>
|
<a-radio value="G">G</a-radio>
|
||||||
<a-radio value="B">B</a-radio>
|
<a-radio value="B">B</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Spectrum qualifier" class="spectrum-qualifier">
|
<title-over-border title="Spectrum qualifier" class="spectrum-qualifier">
|
||||||
<a-radio-group v-model="intSpacImsParams.spectrumQualifier">
|
<a-radio-group v-model="params.quantity">
|
||||||
<a-radio value="PREL">PREL</a-radio>
|
<a-radio value="PREL">PREL</a-radio>
|
||||||
<a-radio value="FULL">FULL</a-radio>
|
<a-radio value="FULL">FULL</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
|
@ -80,44 +80,27 @@
|
||||||
<div class="identifications">
|
<div class="identifications">
|
||||||
<div>
|
<div>
|
||||||
<p>Sample reference identification</p>
|
<p>Sample reference identification</p>
|
||||||
<a-input v-model="intSpacImsParams.sampleRef"></a-input>
|
<a-input v-model="params.srId"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>Background measurement identification</p>
|
<p>Background measurement identification</p>
|
||||||
<a-input v-model="intSpacImsParams.backgroundMea"></a-input>
|
<a-input v-model="params.bgMeasureId"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="transmit-time">
|
<div class="transmit-time">
|
||||||
<a-checkbox>Transmit time</a-checkbox>
|
<a-checkbox v-model="states.transmitTimeEditable">Transmit time</a-checkbox>
|
||||||
<custom-date-picker
|
<custom-date-picker
|
||||||
|
:disabled="!states.transmitTimeEditable"
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="intSpacImsParams.transmitTime"
|
v-model="params.transmit"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
<title-over-border title="Spectrum Transfer" class="spectrum-transfer">
|
<title-over-border title="Spectrum Transfer" class="spectrum-transfer">
|
||||||
<div class="title-container">
|
<spectrum-transfer-com :params="params" :fileOptions="fileOptions" />
|
||||||
<div class="title">
|
|
||||||
<a-upload name="file" :multiple="true" :showUploadList="false" :beforeUpload="ortecBeforeUpload">
|
|
||||||
<div>ORTEC int.spc</div>
|
|
||||||
</a-upload>
|
|
||||||
</div>
|
|
||||||
<div class="data-type">
|
|
||||||
Data type
|
|
||||||
<div class="data-type-select">
|
|
||||||
<custom-select :option="[{ label: 'SAMPLEPHD', value: 1 }]" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="title">
|
|
||||||
<a-upload name="file" :multiple="true" :showUploadList="false" :beforeUpload="imsBeforeUpload">
|
|
||||||
<div>IMS .ims .rms</div>
|
|
||||||
</a-upload>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a-transfer :render="(item) => item.title" :data-source="dataSource" :target-keys="targetKeys" />
|
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -125,50 +108,58 @@
|
||||||
<script>
|
<script>
|
||||||
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
import SpectrumTransferCom from './SpectrumTransferCom.vue'
|
||||||
|
|
||||||
|
const initParams = {
|
||||||
|
msg_id: '123456789',
|
||||||
|
comment: '',
|
||||||
|
collect_start: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
collect_stop: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
air_volume: '0',
|
||||||
|
designator: '3',
|
||||||
|
station: 'CNL06',
|
||||||
|
detector: 'CNL06_001',
|
||||||
|
sam_geom: 'DISC70MMX5MM',
|
||||||
|
sys_type: 'P',
|
||||||
|
quantity: 'FULL',
|
||||||
|
srId: '123456789',
|
||||||
|
bgMeasureId: '0',
|
||||||
|
transmit: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
}
|
||||||
|
|
||||||
|
const initStates = {
|
||||||
|
designatorEditable: false,
|
||||||
|
stationCodeEditable: false,
|
||||||
|
detectorCodeEditable: false,
|
||||||
|
sampleGeometryEditable: false,
|
||||||
|
transmitTimeEditable: false,
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder },
|
components: { TitleOverBorder, SpectrumTransferCom },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
intSpacImsParams: {
|
params: cloneDeep(initParams),
|
||||||
msgId: '123456789',
|
states: cloneDeep(initStates),
|
||||||
comment: '',
|
fileOptions: [
|
||||||
startTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
{
|
||||||
stopTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
title: 'ORTEC int.spc',
|
||||||
totalAir: '0',
|
accept: '.SPC',
|
||||||
designator: '3',
|
transformUrl: '/gamma/ftransit/SpcToIms',
|
||||||
stationCode: 'CNL06',
|
},
|
||||||
detectorCode: 'CNL06_001',
|
{
|
||||||
sampleGeometry: 'DISC70MMX5MM',
|
title: 'IMS.ims.rms',
|
||||||
systemType: 'P',
|
accept: '.IMS,.RMS,.PHD',
|
||||||
spectrumQualifier: 'FULL',
|
transformUrl: '/gamma/ftransit/ImsToSpc'
|
||||||
sampleRef: '123456789',
|
},
|
||||||
backgroundMea: '0',
|
],
|
||||||
transmitTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
|
||||||
},
|
|
||||||
dataSource: [],
|
|
||||||
targetKeys: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
ortecBeforeUpload(file, fileList) {
|
beforeModalOpen() {
|
||||||
console.log(file, fileList)
|
this.params = cloneDeep(initParams)
|
||||||
this.dataSource = fileList.map((item) => {
|
this.states = cloneDeep(initStates)
|
||||||
return {
|
|
||||||
key: item.uid,
|
|
||||||
title: item.name,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
imsBeforeUpload(file, fileList) {
|
|
||||||
console.log(file, fileList)
|
|
||||||
let arr = fileList.map((item) => {
|
|
||||||
return {
|
|
||||||
key: item.uid,
|
|
||||||
title: item.name,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.targetKeys = arr.map((item) => item.key)
|
|
||||||
this.dataSource.push(...arr)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -261,67 +252,5 @@ export default {
|
||||||
|
|
||||||
.spectrum-transfer {
|
.spectrum-transfer {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.title-container {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #225a6a;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
/deep/.ant-upload {
|
|
||||||
width: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-type {
|
|
||||||
width: 166px;
|
|
||||||
padding: 0 8px;
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
z-index: 1;
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
&-select {
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
padding: 8px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-transfer {
|
|
||||||
margin-top: 8px;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
|
|
||||||
::v-deep {
|
|
||||||
.ant-transfer {
|
|
||||||
&-list {
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-operation {
|
|
||||||
width: 150px;
|
|
||||||
|
|
||||||
.ant-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -0,0 +1,255 @@
|
||||||
|
<template>
|
||||||
|
<div class="spectrum-transfer-com">
|
||||||
|
<div class="title">
|
||||||
|
<a-upload
|
||||||
|
name="file"
|
||||||
|
:multiple="true"
|
||||||
|
:showUploadList="false"
|
||||||
|
:beforeUpload="beforeLeftFileUpload"
|
||||||
|
:accept="fileOptions[0].accept"
|
||||||
|
>
|
||||||
|
<div>{{ fileOptions[0].title }}</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
|
<div class="data-type">
|
||||||
|
<template v-if="showDataType"> Data type </template>
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<a-upload
|
||||||
|
name="file"
|
||||||
|
:multiple="true"
|
||||||
|
:showUploadList="false"
|
||||||
|
:beforeUpload="beforeRightFileUpload"
|
||||||
|
:accept="fileOptions[1].accept"
|
||||||
|
>
|
||||||
|
<div>{{ fileOptions[1].title }}</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
|
<div class="file-list">
|
||||||
|
<div
|
||||||
|
class="file-item"
|
||||||
|
:class="{ active: leftSelFileIndex == index }"
|
||||||
|
v-for="(file, index) in leftFileList"
|
||||||
|
:key="index"
|
||||||
|
@click="handleFileClick('left', index)"
|
||||||
|
>
|
||||||
|
{{ file.name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="operators">
|
||||||
|
<div class="data-type-select" v-if="showDataType">
|
||||||
|
<custom-select :options="dataTypeList" v-model="dataType" />
|
||||||
|
</div>
|
||||||
|
<div class="transit">
|
||||||
|
<a-button :disabled="leftSelFileIndex == null" type="primary" @click="handleTransfer('right')">
|
||||||
|
<a-icon type="double-right" />
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
<div class="transit">
|
||||||
|
<a-button :disabled="rightSelFileIndex == null" type="primary" @click="handleTransfer('left')">
|
||||||
|
<a-icon type="double-left" />
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="file-list">
|
||||||
|
<div
|
||||||
|
class="file-item"
|
||||||
|
:class="{ active: rightSelFileIndex == index }"
|
||||||
|
v-for="(file, index) in rightFileList"
|
||||||
|
:key="index"
|
||||||
|
@click="handleFileClick('right', index)"
|
||||||
|
>
|
||||||
|
{{ file.name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { fetchAndDownload } from '@/utils/file'
|
||||||
|
import { isNullOrUndefined } from '@/utils/util'
|
||||||
|
const dataTypeList = ['SAMPLEPHD', 'BLANKPHD', 'DETBKPHD', 'CALIBPHD', 'QCPHD']
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
msg_id: `MSG_ID can't be null`,
|
||||||
|
designator: `Designator can't be null!`,
|
||||||
|
station: `Station code can't be null!`,
|
||||||
|
detector: `Detector code can't be null!`,
|
||||||
|
sam_geom: `Sample geometry can't be null!`,
|
||||||
|
srId: `Sample reference identification can't be null!`,
|
||||||
|
air_volume: `The format of Total air volume sampled is error!`,
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
params: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
fileOptions: {
|
||||||
|
type: Array,
|
||||||
|
},
|
||||||
|
showDataType: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
this.dataTypeList = dataTypeList.map((item) => ({
|
||||||
|
label: item,
|
||||||
|
value: item,
|
||||||
|
}))
|
||||||
|
|
||||||
|
return {
|
||||||
|
dataType: dataTypeList[0],
|
||||||
|
leftFileList: [],
|
||||||
|
rightFileList: [],
|
||||||
|
|
||||||
|
leftSelFileIndex: null,
|
||||||
|
rightSelFileIndex: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
beforeLeftFileUpload(file) {
|
||||||
|
this.leftFileList = [...this.leftFileList, file]
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeRightFileUpload(file) {
|
||||||
|
this.rightFileList = [...this.rightFileList, file]
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFileClick(side, index) {
|
||||||
|
if (side == 'left') {
|
||||||
|
this.leftSelFileIndex = index
|
||||||
|
} else {
|
||||||
|
this.rightSelFileIndex = index
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
validateForm() {
|
||||||
|
const entries = Object.entries(this.params)
|
||||||
|
if (entries.length) {
|
||||||
|
for (const item of entries) {
|
||||||
|
const [k, v] = item
|
||||||
|
const rule = rules[k]
|
||||||
|
if (rule) {
|
||||||
|
// 如果这个字段需要验证
|
||||||
|
if (typeof v == 'string' && (!v || !v.trim())) {
|
||||||
|
this.$message.warn(rule)
|
||||||
|
return false
|
||||||
|
} else if (typeof v == 'object' && isNullOrUndefined(v)) {
|
||||||
|
this.$message.warn(rule)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 转换
|
||||||
|
async handleTransfer(target) {
|
||||||
|
const validate = this.validateForm()
|
||||||
|
if (!validate) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let url = this.fileOptions[1].transformUrl
|
||||||
|
let file = this.rightFileList[this.rightSelFileIndex]
|
||||||
|
const formData = new FormData()
|
||||||
|
|
||||||
|
if (target == 'right') {
|
||||||
|
url = this.fileOptions[0].transformUrl
|
||||||
|
file = this.leftFileList[this.leftSelFileIndex]
|
||||||
|
Object.entries(this.params).forEach(([k, v]) => {
|
||||||
|
if (['collect_start', 'collect_stop', 'transmit'].includes(k)) {
|
||||||
|
v = v + '.0'
|
||||||
|
}
|
||||||
|
formData.append(k, v)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file.size) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
formData.append('file', file)
|
||||||
|
|
||||||
|
if (this.showDataType) {
|
||||||
|
formData.append('data_type', this.dataType)
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const fileName = await fetchAndDownload(url, formData)
|
||||||
|
if (target == 'left') {
|
||||||
|
this.leftFileList.push({
|
||||||
|
name: fileName,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.rightFileList.push({
|
||||||
|
name: fileName,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.spectrum-transfer-com {
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: 30px 175px;
|
||||||
|
grid-template-columns: 1fr 166px 1fr;
|
||||||
|
row-gap: 8px;
|
||||||
|
column-gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: center;
|
||||||
|
background-color: #225a6a;
|
||||||
|
line-height: 30px;
|
||||||
|
/deep/.ant-upload {
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-type {
|
||||||
|
text-align: center;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-list {
|
||||||
|
background-color: #225a6a;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-item {
|
||||||
|
padding: 0 5px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #296d81;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.operators {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.transit {
|
||||||
|
.ant-btn {
|
||||||
|
height: 40px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<custom-modal v-model="visible" :width="1080" title="File-Format-Ftransit" :footer="null">
|
<custom-modal v-model="visible" :width="1080" title="File-Format-Ftransit" :footer="null" destroy-on-close>
|
||||||
<a-tabs :animated="false">
|
<a-tabs :animated="false">
|
||||||
<a-tab-pane tab="INT.SPC<=>.IMS" key="1">
|
<a-tab-pane tab="INT.SPC<=>.IMS" key="1">
|
||||||
<int-spc-ims-transfer />
|
<int-spc-ims-transfer />
|
||||||
|
|
|
@ -148,6 +148,7 @@
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
import * as XLSX from 'xlsx';
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
@ -183,15 +184,18 @@ const columns = [
|
||||||
const outputColumns = [
|
const outputColumns = [
|
||||||
{
|
{
|
||||||
title: 'Energy',
|
title: 'Energy',
|
||||||
dataIndex: 'energy'
|
dataIndex: 'energy',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Correct Factor',
|
title: 'Correct Factor',
|
||||||
dataIndex: 'correctFactor'
|
dataIndex: 'correctFactor',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Uncertainty(%)',
|
title: 'Uncertainty(%)',
|
||||||
dataIndex: 'uncertainty'
|
dataIndex: 'uncertainty',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6))
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
|
@ -210,7 +214,10 @@ export default {
|
||||||
selectedItem: {}, // output中左侧选中的项
|
selectedItem: {}, // output中左侧选中的项
|
||||||
outputTableList: [], // output中表格列表数据
|
outputTableList: [], // output中表格列表数据
|
||||||
|
|
||||||
filterWord: '' // 筛选
|
filterWord: '', // 筛选
|
||||||
|
|
||||||
|
fileName: '', // save excel name
|
||||||
|
analyseData: {} // 分析结果
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -264,6 +271,7 @@ export default {
|
||||||
...this.efficiency,
|
...this.efficiency,
|
||||||
energys: this.list.map(item => item.energy)
|
energys: this.list.map(item => item.energy)
|
||||||
})
|
})
|
||||||
|
console.log(success);
|
||||||
if (success) {
|
if (success) {
|
||||||
this.list = result
|
this.list = result
|
||||||
} else {
|
} else {
|
||||||
|
@ -275,8 +283,22 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 分析
|
// 分析
|
||||||
handleAnalyze() {
|
async handleAnalyze() {
|
||||||
console.log('%c [ 分析 ]-178', 'font-size:13px; background:pink; color:#bf2c9f;')
|
console.log('%c [ 分析 ]-178', 'font-size:13px; background:pink; color:#bf2c9f;')
|
||||||
|
try {
|
||||||
|
this.isLoading = true
|
||||||
|
const { success, result, message } = await postAction('/gamma/KorSumAnalyse', this.list)
|
||||||
|
this.isLoading = false
|
||||||
|
if (success) {
|
||||||
|
this.analyseData = result
|
||||||
|
console.log(result);
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.isLoading = false;
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 退出
|
// 退出
|
||||||
|
@ -286,12 +308,66 @@ export default {
|
||||||
|
|
||||||
// output栏点击左侧列表
|
// output栏点击左侧列表
|
||||||
handleOutputItemClick(item) {
|
handleOutputItemClick(item) {
|
||||||
|
if(!this.analyseData) {
|
||||||
|
this.$message.error("Analyse Fail!")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
this.selectedItem = item
|
this.selectedItem = item
|
||||||
|
this.outputTableList = [];
|
||||||
|
|
||||||
|
// 根据核素名获取结果集
|
||||||
|
let data = this.analyseData[this.selectedItem]
|
||||||
|
if(!data || data.energy.length < 1) {
|
||||||
|
this.$message.error("Analyse Fail!")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let result = [];
|
||||||
|
for(let i = 0; i < data.energy.length; i++ ) {
|
||||||
|
// 将数据进行填充并
|
||||||
|
let obj = {
|
||||||
|
"energy": data.energy[i],
|
||||||
|
"correctFactor" : data.factor[i],
|
||||||
|
"uncertainty" : (data.factor[i] - 1) / 10 * 100
|
||||||
|
}
|
||||||
|
result.push(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.outputTableList = result;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导出到excel
|
// 导出到excel
|
||||||
handleExport() {
|
handleExport() {
|
||||||
console.log('%c [ 导出到excel ]-246', 'font-size:13px; background:pink; color:#bf2c9f;')
|
console.log('%c [ 导出到excel ]-246', 'font-size:13px; background:pink; color:#bf2c9f;')
|
||||||
|
let _this = this
|
||||||
|
this.$confirm({
|
||||||
|
title: 'Please enter file name',
|
||||||
|
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' } },
|
||||||
|
onOk() {
|
||||||
|
console.log('Cancel')
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
console.log(_this.fileName);
|
||||||
|
if (_this.fileName) {
|
||||||
|
// saveAs(blob, `${_this.fileName}`)
|
||||||
|
// 创建工作簿
|
||||||
|
const workbook = XLSX.utils.book_new();
|
||||||
|
|
||||||
|
// 创建工作表
|
||||||
|
const worksheet = XLSX.utils.json_to_sheet(_this.outputTableList);
|
||||||
|
|
||||||
|
// 将工作表添加到工作簿
|
||||||
|
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
|
||||||
|
|
||||||
|
// 导出Excel文件
|
||||||
|
XLSX.writeFile(workbook, _this.fileName + ".xlsx");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { clearSampleCache } from '../clearSampleCache'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
list: {
|
list: {
|
||||||
|
@ -43,7 +45,8 @@ export default {
|
||||||
this.handleClick(this.list[index + 1])
|
this.handleClick(this.list[index + 1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.list.splice(index, 1)
|
const deleted = this.list.splice(index, 1)
|
||||||
|
clearSampleCache(deleted)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -313,7 +313,7 @@ export default {
|
||||||
)
|
)
|
||||||
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||||
if (success) {
|
if (success) {
|
||||||
this.dataProsess(result, 'db')
|
this.dataProcess(result, 'db')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
@ -343,7 +343,7 @@ export default {
|
||||||
)
|
)
|
||||||
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||||
if (success) {
|
if (success) {
|
||||||
this.dataProsess(result, 'file')
|
this.dataProcess(result, 'file')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
@ -367,7 +367,7 @@ export default {
|
||||||
return cancelToken
|
return cancelToken
|
||||||
},
|
},
|
||||||
|
|
||||||
dataProsess(result, flag) {
|
dataProcess(result, flag) {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -527,7 +527,12 @@ export default {
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
this.opts.notMerge = true
|
||||||
this.option.series = series
|
this.option.series = series
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetChartOpts()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// chart 的 tooltip
|
// chart 的 tooltip
|
||||||
|
@ -788,7 +793,7 @@ export default {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.list = []
|
this.nuclideLibraryList = []
|
||||||
console.error(error)
|
console.error(error)
|
||||||
} finally {
|
} finally {
|
||||||
this.isLoadingNuclide = false
|
this.isLoadingNuclide = false
|
||||||
|
@ -1169,7 +1174,7 @@ export default {
|
||||||
this.handleResetState()
|
this.handleResetState()
|
||||||
data.DetailedInformation = this.detailedInfomation
|
data.DetailedInformation = this.detailedInfomation
|
||||||
this.clearCompareLine()
|
this.clearCompareLine()
|
||||||
this.dataProsess(data)
|
this.dataProcess(data)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 分析工具Accept时刷新部分数据
|
// 分析工具Accept时刷新部分数据
|
||||||
|
@ -1278,7 +1283,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重新分析
|
// 重新分析
|
||||||
async reProcessing() {
|
async reProcessing(showMessage = true) {
|
||||||
if (this.isProcessing) {
|
if (this.isProcessing) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1297,14 +1302,16 @@ export default {
|
||||||
this.$emit('reAnalyed', this.isReAnalyed)
|
this.$emit('reAnalyed', this.isReAnalyed)
|
||||||
this.handleResetState()
|
this.handleResetState()
|
||||||
result.DetailedInformation = this.detailedInfomation
|
result.DetailedInformation = this.detailedInfomation
|
||||||
this.dataProsess(result)
|
this.dataProcess(result)
|
||||||
} else {
|
} else {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
const arr = message.split('\n')
|
if(showMessage) {
|
||||||
this.$warning({
|
const arr = message.split('\n')
|
||||||
title: 'Warning',
|
this.$warning({
|
||||||
content: () => arr.map((text) => <div>{text}</div>),
|
title: 'Warning',
|
||||||
})
|
content: () => arr.map((text) => <div>{text}</div>),
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
|
|
@ -236,6 +236,7 @@ import BetaGammaEnergyCalibrationModal from './components/Modals/BetaGammaModals
|
||||||
import AutomaticAnalysisLogModal from './components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue'
|
import AutomaticAnalysisLogModal from './components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue'
|
||||||
import BetaGammaExtrapolationModal from './components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue'
|
import BetaGammaExtrapolationModal from './components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
|
import { clearSampleCache } from './clearSampleCache'
|
||||||
|
|
||||||
// 分析类型
|
// 分析类型
|
||||||
const ANALYZE_TYPE = {
|
const ANALYZE_TYPE = {
|
||||||
|
@ -479,6 +480,8 @@ export default {
|
||||||
|
|
||||||
// 清理全部
|
// 清理全部
|
||||||
handleCleanAll() {
|
handleCleanAll() {
|
||||||
|
clearSampleCache(this.sampleList)
|
||||||
|
|
||||||
this.sampleList = []
|
this.sampleList = []
|
||||||
this.analysisType = undefined
|
this.analysisType = undefined
|
||||||
this.sampleData = {}
|
this.sampleData = {}
|
||||||
|
@ -596,7 +599,21 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleReprocessAll() {
|
handleReprocessAll() {
|
||||||
console.log('%c [ handleReprocessAll ]-216', 'font-size:13px; background:pink; color:#bf2c9f;')
|
const { inputFileName, sampleType } = this.sampleData
|
||||||
|
|
||||||
|
// 先排除当前的谱
|
||||||
|
const otherSampleList = this.sampleList.filter((sample) => sample.inputFileName !== inputFileName)
|
||||||
|
|
||||||
|
const betaSamples = otherSampleList.filter((sample) => sample.sampleType == 'B')
|
||||||
|
const gammaSamples = otherSampleList.filter((sample) => sample.sampleType !== 'B')
|
||||||
|
gammaSamples.forEach((gammaSample) => {
|
||||||
|
postAction(`/gamma/Reprocessing?fileName=${gammaSample.inputFileName}`)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 处理当前的谱的reprocessing
|
||||||
|
if(inputFileName && sampleType !== 'B') {
|
||||||
|
this.$refs.gammaAnalysisRef.reProcessing(false)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查看Comments
|
// 查看Comments
|
||||||
|
@ -740,13 +757,14 @@ export default {
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Ftransit',
|
title: 'Ftransit',
|
||||||
show: this.isGamma || this.isBetaGamma,
|
|
||||||
handler: () => (this.ftransltModalVisible = true),
|
handler: () => (this.ftransltModalVisible = true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Clean All',
|
title: 'Clean All',
|
||||||
handler: this.handleCleanAll,
|
handler: () => {
|
||||||
|
this.handleCleanAll()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -770,7 +788,8 @@ export default {
|
||||||
if (spectra) {
|
if (spectra) {
|
||||||
this.loadSelectedSample(spectra)
|
this.loadSelectedSample(spectra)
|
||||||
} else {
|
} else {
|
||||||
this.handleCleanAll()
|
this.analysisType = undefined
|
||||||
|
this.sampleData = {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user