beta 模块的RLR 弹窗查询接口调整

beta 模块的RLR 弹窗save下载文件接口联调
This commit is contained in:
任珮宇 2023-09-13 19:01:21 +08:00
parent c2fde1336e
commit e4732fbb55
11 changed files with 803 additions and 495 deletions

View File

@ -14,52 +14,67 @@ const api = {
export default api
//post
export function postAction(url,parameter) {
export function postAction(url, parameter) {
let sign = signMd5Utils.getSign(url, parameter);
//将签名和时间戳,添加在请求接口 Header
// update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getTimestamp()};
let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() };
// update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
return axios({
url: url,
method:'post' ,
method: 'post',
data: parameter,
headers: signHeader
})
}
export function postFileAction(url, parameter) {
let sign = signMd5Utils.getSign(url, parameter);
//将签名和时间戳,添加在请求接口 Header
// update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() };
// update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
return axios({
url: url,
method: 'post',
data: parameter,
responseType: "blob",
headers: signHeader
})
}
//post method= {post | put}
export function httpAction(url,parameter,method) {
export function httpAction(url, parameter, method) {
let sign = signMd5Utils.getSign(url, parameter);
//将签名和时间戳,添加在请求接口 Header
// update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getTimestamp()};
let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() };
// update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
return axios({
url: url,
method:method ,
method: method,
data: parameter,
headers: signHeader
})
}
//put
export function putAction(url,parameter) {
export function putAction(url, parameter) {
return axios({
url: url,
method:'put',
method: 'put',
data: parameter
})
}
//get
export function getAction(url,parameter) {
export function getAction(url, parameter) {
let sign = signMd5Utils.getSign(url, parameter);
//将签名和时间戳,添加在请求接口 Header
// update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getTimestamp()};
let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() };
// update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
return axios({
@ -70,26 +85,26 @@ export function getAction(url,parameter) {
})
}
export function getFileAction(url,parameter) {
export function getFileAction(url, parameter) {
let sign = signMd5Utils.getSign(url, parameter);
//将签名和时间戳,添加在请求接口 Header
// update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getTimestamp()};
let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() };
// update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
return axios({
url: url,
method: 'get',
params: parameter,
responseType:"blob",
paramsSerializer: function (params) {
return qs.stringify(params, { arrayFormat: "repeat" });
responseType: "blob",
paramsSerializer: function (params) {
return qs.stringify(params, { arrayFormat: "repeat" });
},
headers: signHeader
})
}
//deleteAction
export function deleteAction(url,parameter) {
export function deleteAction(url, parameter) {
return axios({
url: url,
method: 'delete',
@ -145,15 +160,15 @@ export function saveService(parameter) {
* @param parameter
* @returns {*}
*/
export function downFile(url,parameter, method='get'){
if(method=='get'){
export function downFile(url, parameter, method = 'get') {
if (method == 'get') {
return axios({
url: url,
params: parameter,
method: method ,
method: method,
responseType: 'blob'
})
}else{
} else {
return axios({
url: url,
method: method,
@ -199,11 +214,11 @@ export function downloadFile(url, fileName, parameter, method) {
* @param parameter
* @returns {*}
*/
export function uploadAction(url,parameter){
export function uploadAction(url, parameter) {
return axios({
url: url,
data: parameter,
method:'post' ,
method: 'post',
headers: {
'Content-Type': 'multipart/form-data', // 文件上传
},
@ -216,17 +231,17 @@ export function uploadAction(url,parameter){
* @param subStr
* @returns {*}
*/
export function getFileAccessHttpUrl(avatar,subStr) {
if(!subStr) subStr = 'http'
export function getFileAccessHttpUrl(avatar, subStr) {
if (!subStr) subStr = 'http'
try {
if(avatar && avatar.startsWith(subStr)){
if (avatar && avatar.startsWith(subStr)) {
return avatar;
}else{
if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){
} else {
if (avatar && avatar.length > 0 && avatar.indexOf('[') == -1) {
return window._CONFIG['staticDomainURL'] + "/" + avatar;
}
}
}catch(err){
return;
} catch (err) {
return;
}
}

View File

@ -11,7 +11,12 @@
QC Flags
<beta-gamma-qc-flags slot="content" :data="qcFlags" @click="handleQcFlagClick" />
</pop-over-with-icon>
<custom-select v-model="spectraType" :options="SampleType" @change="changeChartByType" style="width: 246px;"></custom-select>
<custom-select
v-model="spectraType"
:options="SampleType"
@change="changeChartByType"
style="width: 246px"
></custom-select>
</div>
<!-- 二级交互栏结束 -->
@ -20,9 +25,7 @@
<!-- 左侧图表 -->
<div class="beta-gamma-spectrum-sample">
<beta-gamma-chart-container>
<template slot="title">
Beta-Gamma Spectrum: Sample
</template>
<template slot="title"> Beta-Gamma Spectrum: Sample </template>
<beta-gamma-spectrum-chart
ref="betaGammaChartRef"
:histogramDataList="histogramDataList"
@ -42,9 +45,7 @@
<div class="gamma-spectrum">
<div class="gamma-spectrum-item">
<beta-gamma-chart-container>
<template slot="title">
Gamma Spectrum: Original
</template>
<template slot="title"> Gamma Spectrum: Original </template>
<spectrum-line-chart
ref="lineChart1Ref"
:data="gammaOriginalData"
@ -55,9 +56,7 @@
</div>
<div class="gamma-spectrum-item">
<beta-gamma-chart-container>
<template slot="title">
Gamma Spectrum: Projected
</template>
<template slot="title"> Gamma Spectrum: Projected </template>
<spectrum-line-chart
ref="lineChart2Ref"
:data="gammaProjectedData"
@ -70,9 +69,7 @@
<div class="gamma-spectrum">
<div class="gamma-spectrum-item">
<beta-gamma-chart-container>
<template slot="title">
Beta Spectrum: Original
</template>
<template slot="title"> Beta Spectrum: Original </template>
<spectrum-line-chart
ref="lineChart3Ref"
:data="betaOriginalData"
@ -85,9 +82,7 @@
</div>
<div class="gamma-spectrum-item">
<beta-gamma-chart-container>
<template slot="title">
Beta Spectrum: Projected
</template>
<template slot="title"> Beta Spectrum: Projected </template>
<spectrum-line-chart
ref="lineChart4Ref"
:data="betaProjectedData"
@ -105,9 +100,7 @@
<!-- 结果显示开始 -->
<div class="result-display">
<beta-gamma-chart-container>
<template slot="title">
Result display
</template>
<template slot="title"> Result display </template>
<result-display :data="resultDisplay"></result-display>
</beta-gamma-chart-container>
</div>
@ -122,7 +115,11 @@
<!-- 主体部分结束 -->
</a-spin>
<statistics-paramer-history-modal-for-qc-flags v-model="statisticModalVisible" :sampleId="sample.sampleId" :statisticsType="statisticsType" />
<statistics-paramer-history-modal-for-qc-flags
v-model="statisticModalVisible"
:sampleId="sample.sampleId"
:statisticsType="statisticsType"
/>
</div>
</template>
@ -144,26 +141,26 @@ const StatisticsType = {
'Collection Time': 'Colloc_Time',
'Acq Time': 'Acq_Time',
'Xe Volume': 'Xe_volumn',
'Air Volume': 'Sample_Volumn'
'Air Volume': 'Sample_Volumn',
}
const SampleType = [
{
label: 'Sample Data',
value: 'sample'
value: 'sample',
},
{
label: 'GasBg Data',
value: 'gasBg'
value: 'gasBg',
},
{
label: 'DetBg Data',
value: 'detBg'
value: 'detBg',
},
{
label: 'QC Data',
value: 'qc'
}
value: 'qc',
},
]
export default {
@ -179,12 +176,12 @@ export default {
BetaGammaQcFlags,
BetaGammaDetailedInfomation,
StatisticsParamerHistoryModalForQcFlags,
CustomSelect
CustomSelect,
},
props: {
sample: {
type: Object
}
type: Object,
},
},
data() {
this.SampleType = SampleType
@ -217,7 +214,7 @@ export default {
comparisonModalVisible: false,
statisticModalVisible: false, // Qc Flags
statisticsType: StatisticsType['Collection Time']
statisticsType: StatisticsType['Collection Time'],
}
},
methods: {
@ -229,12 +226,13 @@ export default {
this.isLoading = true
const { success, result, message } = await getAction('/spectrumAnalysis/getDBSpectrumChart', {
dbName,
sampleId
sampleId,
})
if (success) {
this.sampleDetail = result
this.changeChartByType('sample')
this.isLoading = false
// this.$emit("getFiles",{detFileName:result.detBg.fileName,gasFileName:result.gasBg.fileName})
} else {
this.$message.error(message)
}
@ -248,7 +246,7 @@ export default {
sampleFileName: this.sample.sampleFileName,
gasFileName: this.sample.gasFileName,
detFileName: this.sample.detFileName,
qcFileName: this.sample.qcFileStatus?this.sample.qcFileName:"",
qcFileName: this.sample.qcFileStatus ? this.sample.qcFileName : '',
}
try {
this.isLoading = true
@ -266,56 +264,56 @@ export default {
},
changeChartByType(val) {
if (val==="qc"&&!this.sample.qcFileStatus) {
this.$message.warning("No qc spectrum file!")
if (val === 'qc' && !this.sample.qcFileStatus) {
this.$message.warning('No qc spectrum file!')
} else {
const {
betaOriginalData,
betaProjectedData,
betaEnergyData,
gammaOriginalData,
gammaProjectedData,
gammaEnergyData,
histogramDataList, // Beta-Gamma Spectrum: Sample
histogramDataDList, // Beta-Gamma Spectrum: Sample 3D
Boundary, // 2d
XeData, // Result Display
spectrumData,
AcqTimeBtn, // QC Flags
CollectTimeBtn, // QC Flags
SampleVolumeBtn, // QC Flags
XeVolumeBtn, // QC Flags
GasBgBtn, // QC Flags
DetBgBtn // QC Flags
DetBgBtn, // QC Flags
} = this.sampleDetail[this.spectraType]
this.spectrumData = spectrumData
this.histogramDataList = histogramDataList
this.histogramDataDList = histogramDataDList
this.boundaryList = Boundary
this.gammaOriginalData = gammaOriginalData
this.gammaProjectedData = gammaProjectedData
this.gammaEnergyData = gammaEnergyData
this.betaOriginalData = betaOriginalData
this.betaProjectedData = betaProjectedData
this.betaEnergyData = betaEnergyData
this.resultDisplay = XeData
this.qcFlags = {
AcqTimeBtn,
CollectTimeBtn,
SampleVolumeBtn,
XeVolumeBtn,
GasBgBtn,
DetBgBtn
DetBgBtn,
}
}
},
@ -378,28 +376,27 @@ export default {
// 线Energy
reanalyse([type, data]) {
const energy = data.map(item => [item.y])
if(type == 'gamma') {
const energy = data.map((item) => [item.y])
if (type == 'gamma') {
this.gammaEnergyData = energy
} else {
this.betaEnergyData = energy
}
}
},
},
watch: {
sample: {
handler(newVal, oldVal) {
console.log("newValnewVal", newVal);
console.log('newValnewVal', newVal)
if (newVal.sampleId) {
this.getSampleDetail()
} else {
this.getSampleDetail_file()
}
},
immediate: true
}
}
immediate: true,
},
},
}
</script>

View File

@ -4,37 +4,81 @@
<a-form-model-item
label="(rel.) Xe transfer efficiency (Xe Volume in the measurement cell/Xe colume in the archive bottle) a description, how this is calculated shall be provided in the Comment section"
>
<a-textarea :rows="4"></a-textarea>
<a-textarea
:rows="4"
v-model="addInfo.xeTransfer"
@change="(e) => handleValueChange(e.target.value)"
></a-textarea>
</a-form-model-item>
<a-form-model-item label="uncertainty of the Xe transfer efficiency [%]">
<a-input></a-input>
<a-input v-model="addInfo.uncertaintyOfXe" @change="(e) => handleValueChange(e.target.value)"></a-input>
</a-form-model-item>
<a-form-model-item label="Comments">
<a-textarea :rows="4"></a-textarea>
<a-textarea
:rows="4"
v-model="addInfo.commentsInfo"
@change="(e) => handleValueChange(e.target.value)"
></a-textarea>
</a-form-model-item>
<a-form-model-item label="Detailed description of the measurement system">
<a-textarea :rows="4"></a-textarea>
<a-textarea
:rows="4"
v-model="addInfo.detailedDescriptionM"
@change="(e) => handleValueChange(e.target.value)"
></a-textarea>
</a-form-model-item>
<a-form-model-item label="Detailed description of the sample analysis process">
<a-textarea :rows="4"></a-textarea>
<a-textarea
:rows="4"
v-model="addInfo.detailedDescriptionS"
@change="(e) => handleValueChange(e.target.value)"
></a-textarea>
</a-form-model-item>
<a-form-model-item label="Uncertainty budget">
<a-textarea :rows="4"></a-textarea>
<a-textarea
:rows="4"
v-model="addInfo.uncertaintyBudget"
@change="(e) => handleValueChange(e.target.value)"
></a-textarea>
</a-form-model-item>
<a-form-model-item
label="Information on any changes to the system and/or the process (including recalibrations] since the time of the previous exercise "
>
<a-textarea :rows="4"></a-textarea>
<a-textarea
:rows="4"
v-model="addInfo.informationOn"
@change="(e) => handleValueChange(e.target.value)"
></a-textarea>
</a-form-model-item>
<a-form-model-item label="ysical Constants used (branching ratios, half lifes,..)">
<a-textarea :rows="4"></a-textarea>
<a-textarea :rows="4" v-model="addInfo.ysical" @change="(e) => handleValueChange(e.target.value)"></a-textarea>
</a-form-model-item>
</a-form-model>
</div>
</template>
<script>
export default {}
export default {
data() {
return {
addInfo: {
xeTransfer: '',
uncertaintyOfXe: '',
commentsInfo: '',
detailedDescriptionM: '',
detailedDescriptionS: '',
uncertaintyBudget: '',
informationOn: '',
ysical: '',
},
}
},
methods: {
handleValueChange() {
this.$emit('valChange', this.transInfo)
},
},
}
</script>
<style lang="less" scoped>

View File

@ -4,7 +4,13 @@
<a-row v-for="(column, index) in columns" :key="index">
<a-col class="label" :span="12"> {{ column.label }} </a-col>
<a-col :span="12">
<component :is="column.type" v-bind="column.attrs" v-model="detail[column.dataIndex]" :disabled="column.disabled" />
<component
:is="column.type"
v-bind="column.attrs"
v-model="detail[column.dataIndex]"
:disabled="column.disabled"
v-on="column.on"
/>
</a-col>
</a-row>
</div>
@ -12,90 +18,139 @@
</template>
<script>
const columns = [
{
label: 'Pressure in the archive bottle [Pa] at STP corrected',
type: 'a-input',
dataIndex: 'pressureInTheArchiveBottle'
},
{
label: 'Volume of Archive bottle [m3]',
type: 'a-input',
dataIndex: 'volumeOfArchiveBottle'
},
{
label: 'Gas composition [%]',
type: 'a-input',
dataIndex: 'gasComposition'
},
{
label: 'Stable Xe meas. start date [YYYY/MM/DD]',
type: 'a-date-picker',
dataIndex: 'stableXeMeasStartDate',
attrs: {
format: 'YYYY/MM/DD'
}
},
{
label: 'Stable Xe meas. start time [HH:MM:SS.S]',
type: 'a-time-picker',
dataIndex: 'stableXeMeasStartTime',
attrs: {
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss'
}
},
{
label: 'Stable Xenon volume in the archive bottle [cm3] STP corrected',
type: 'a-input',
dataIndex: 'stableXenonVolumeInTheArchiveBottle'
},
{
label: 'Uncertainty of stable Xenon volume (%)',
type: 'a-input',
dataIndex: 'uncertaintyOfStableXenonVolume'
},
{
label: 'Stable Xenon volume in the measurement cell [cm3] STP corrected',
type: 'a-input',
dataIndex: 'stableXenonVolumeInTheMeasurementCell'
},
{
label: 'Uncertainty of stable Xenon volume [%]',
type: 'a-input',
dataIndex: 'uncertaintyOfStableXenonVolume2'
},
{
label: 'Radioactive Xe meas. start date [YYYY/MM/DD]',
type: 'a-input',
dataIndex: 'acq_start_date',
disabled: true
},
{
label: 'Radioactive Xe meas. start time [HH:MM:SS.S]',
type: 'a-input',
dataIndex: 'acq_start_time',
disabled: true
},
{
label: 'Acquisition live time [s]',
type: 'a-input',
dataIndex: 'acq_live_time',
disabled: true
}
]
export default {
computed: {
columns() {
return [
{
label: 'Pressure in the archive bottle [Pa] at STP corrected',
type: 'a-input',
dataIndex: 'pressureInTheArchiveBottle',
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Volume of Archive bottle [m3]',
type: 'a-input',
dataIndex: 'volumeOfArchiveBottle',
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Gas composition [%]',
type: 'a-input',
dataIndex: 'gasComposition',
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Stable Xe meas. start date [YYYY/MM/DD]',
type: 'a-date-picker',
dataIndex: 'stableXeMeasStartDate',
attrs: {
format: 'YYYY/MM/DD',
},
on: {
change: (mont, date) => {
this.detail.receiptDate = date
this.handleValChange(date)
},
},
},
{
label: 'Stable Xe meas. start time [HH:MM:SS.S]',
type: 'a-time-picker',
dataIndex: 'stableXeMeasStartTime',
attrs: {
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
},
on: {
change: (mont, date) => {
this.detail.receiptTime = date
this.handleValChange(date)
},
},
},
{
label: 'Stable Xenon volume in the archive bottle [cm3] STP corrected',
type: 'a-input',
dataIndex: 'stableXenonVolumeInTheArchiveBottle',
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Uncertainty of stable Xenon volume (%)',
type: 'a-input',
dataIndex: 'uncertaintyOfStableXenonVolume',
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Stable Xenon volume in the measurement cell [cm3] STP corrected',
type: 'a-input',
dataIndex: 'stableXenonVolumeInTheMeasurementCell',
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Uncertainty of stable Xenon volume [%]',
type: 'a-input',
dataIndex: 'uncertaintyOfStableXenonVolume2',
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Radioactive Xe meas. start date [YYYY/MM/DD]',
type: 'a-input',
dataIndex: 'acq_start_date',
disabled: true,
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Radioactive Xe meas. start time [HH:MM:SS.S]',
type: 'a-input',
dataIndex: 'acq_start_time',
disabled: true,
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Acquisition live time [s]',
type: 'a-input',
dataIndex: 'acq_live_time',
disabled: true,
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
]
},
},
props: {
detail: {
type: Object
}
type: Object,
},
},
data() {
this.columns = columns
return { }
}
return {}
},
methods: {
handleValChange(val) {
console.log('valval', val)
this.$emit('valChange', this.detail)
},
},
}
</script>

View File

@ -10,6 +10,7 @@
v-bind="column.attrs"
v-model="detail[column.dataIndex]"
:disabled="column.disabled"
v-on="column.on"
/>
</a-col>
</a-row>
@ -18,88 +19,135 @@
</template>
<script>
const columns = [
{
label: 'Laboratory (CTBTO code)',
type: 'a-input',
dataIndex: 'laboratory'
},
{
label: 'Sample ID (SRID or other)',
type: 'a-input',
dataIndex: 'srid',
disabled: true
},
{
label: 'Collection start date or reference date [YYYY/MM/DD]',
type: 'a-input',
dataIndex: 'colloct_start_date',
disabled: true
},
{
label: 'Collection start time or reference time [HH:mm:ss.S]',
type: 'a-input',
dataIndex: 'colloct_start_time',
disabled: true
},
{
label: 'Collection stop date [YYYY/MM/DD]',
type: 'a-input',
dataIndex: 'colloct_stop_date',
disabled: true
},
{
label: 'Collection stop time [HH:mm:ss.S]',
type: 'a-input',
dataIndex: 'colloct_stop_time',
disabled: true
},
{
label: 'Receipt date [YYYY/MM/DD]',
type: 'a-date-picker',
dataIndex: 'receiptDate',
attrs: {
format: 'YYYY/MM/DD'
}
},
{
label: 'Receipt time [HH:mm:ss.S]',
type: 'a-time-picker',
dataIndex: 'receiptTime',
attrs: {
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss'
}
},
{
label: 'Report transmission date [YYYY/MM/DD]',
type: 'a-date-picker',
dataIndex: 'reportTransmissionDate',
attrs: {
format: 'YYYY/MM/DD'
}
},
{
label: 'Report transmission time [HH:mm:ss.S]',
type: 'a-time-picker',
dataIndex: 'reportTransmissionTime',
attrs: {
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss'
}
}
]
export default {
computed: {
columns() {
return [
{
label: 'Laboratory (CTBTO code)',
type: 'a-input',
dataIndex: 'laboratory',
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Sample ID (SRID or other)',
type: 'a-input',
dataIndex: 'srid',
disabled: true,
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Collection start date or reference date [YYYY/MM/DD]',
type: 'a-input',
dataIndex: 'colloct_start_date',
disabled: true,
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Collection start time or reference time [HH:mm:ss.S]',
type: 'a-input',
dataIndex: 'colloct_start_time',
disabled: true,
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Collection stop date [YYYY/MM/DD]',
type: 'a-input',
dataIndex: 'colloct_stop_date',
disabled: true,
},
{
label: 'Collection stop time [HH:mm:ss.S]',
type: 'a-input',
dataIndex: 'colloct_stop_time',
disabled: true,
on: {
change: (e) => this.handleValChange(e.target.value),
},
},
{
label: 'Receipt date [YYYY/MM/DD]',
type: 'a-date-picker',
dataIndex: 'receiptDate',
attrs: {
format: 'YYYY/MM/DD',
},
on: {
change: (mont, date) => {
this.detail.receiptDate = date
this.handleValChange(date)
},
},
},
{
label: 'Receipt time [HH:mm:ss.S]',
type: 'a-time-picker',
dataIndex: 'receiptTime',
attrs: {
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
},
on: {
change: (mont, date) => {
this.detail.receiptTime = date
this.handleValChange(date)
},
},
},
{
label: 'Report transmission date [YYYY/MM/DD]',
type: 'a-date-picker',
dataIndex: 'reportTransmissionDate',
attrs: {
format: 'YYYY/MM/DD',
},
on: {
change: (mont, date) => {
this.detail.reportTransmissionDate = date
this.handleValChange(date)
},
},
},
{
label: 'Report transmission time [HH:mm:ss.S]',
type: 'a-time-picker',
dataIndex: 'reportTransmissionTime',
attrs: {
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
},
on: {
change: (mont, date) => {
this.detail.reportTransmissionTime = date
this.handleValChange(date)
},
},
},
]
},
},
props: {
detail: {
type: Object
}
type: Object,
},
},
data() {
this.columns = columns
return {}
}
},
methods: {
handleValChange(val) {
console.log('valval', val)
this.$emit('valChange', this.detail)
},
},
}
</script>

View File

@ -2,26 +2,41 @@
<div class="methods">
<a-form-model layout="vertical">
<a-form-model-item label="Sampling handling">
<a-input></a-input>
<a-input v-model="methodsInfo.samplingHandling" @change="(e) => handleValueChange(e.target.value)"></a-input>
</a-form-model-item>
<a-form-model-item label="Equipment used">
<a-input></a-input>
<a-input v-model="methodsInfo.equipmentUsed" @change="(e) => handleValueChange(e.target.value)"></a-input>
</a-form-model-item>
<a-form-model-item label="Software used">
<a-input></a-input>
<a-input v-model="methodsInfo.softwareUsed" @change="(e) => handleValueChange(e.target.value)"></a-input>
</a-form-model-item>
</a-form-model>
</div>
</template>
<script>
export default {}
export default {
data() {
return {
methodsInfo: {
samplingHandling: '',
equipmentUsed: '',
softwareUsed: '',
},
}
},
methods: {
handleValueChange() {
this.$emit('valChange', this.transInfo)
},
},
}
</script>
<style lang="less" scoped>
.methods {
.ant-form-item {
margin-bottom: 0;
}
.ant-form-item {
margin-bottom: 0;
}
}
</style>

View File

@ -2,7 +2,11 @@
<div>
<a-table size="small" :columns="columns" :dataSource="list" :pagination="false" :scroll="{ x: true }">
<template v-for="slotName in slots" :slot="slotName" slot-scope="text, record">
<a-input v-model="record[slotName]" :key="slotName"></a-input>
<a-input
v-model="record[slotName]"
:key="slotName"
@change="(e) => cellChange(e.target.value, record, slotName)"
></a-input>
</template>
</a-table>
</div>
@ -15,7 +19,7 @@ const columns = [
dataIndex: 'name',
align: 'center',
width: 80,
fixed: 'left'
fixed: 'left',
},
{
title: 'Activity [Bq]',
@ -23,8 +27,8 @@ const columns = [
align: 'center',
width: 90,
scopedSlots: {
customRender: 'activity'
}
customRender: 'activity',
},
},
{
title: 'Uncert.Activity [%]',
@ -32,8 +36,8 @@ const columns = [
align: 'center',
width: 140,
scopedSlots: {
customRender: 'uncertActivity'
}
customRender: 'uncertActivity',
},
},
{
title: 'MDA [Bq]',
@ -41,8 +45,8 @@ const columns = [
align: 'center',
width: 100,
scopedSlots: {
customRender: 'mda'
}
customRender: 'mda',
},
},
{
title: 'Concentration [Bq/m3]',
@ -50,8 +54,8 @@ const columns = [
align: 'center',
width: 170,
scopedSlots: {
customRender: 'concentration'
}
customRender: 'concentration',
},
},
{
title: 'Uncert.concentration [%]',
@ -59,8 +63,8 @@ const columns = [
align: 'center',
width: 190,
scopedSlots: {
customRender: 'uncertConcentration'
}
customRender: 'uncertConcentration',
},
},
{
title: 'MDC [Bq/m3]',
@ -68,8 +72,8 @@ const columns = [
align: 'center',
width: 120,
scopedSlots: {
customRender: 'mdc'
}
customRender: 'mdc',
},
},
{
title: 'Lc [Bq/m3]',
@ -77,62 +81,76 @@ const columns = [
align: 'center',
width: 100,
scopedSlots: {
customRender: 'lc'
}
}
customRender: 'lc',
},
},
]
const nameMapper = [
{ name: 'Xe-131m', mapTo: 'xe131m' },
{ name: 'Xe-133m', mapTo: 'xe133m' },
{ name: 'Xe-133', mapTo: 'xe133' },
{ name: 'Xe-135', mapTo: 'xe135' }
{ name: 'Xe-135', mapTo: 'xe135' },
]
const columnNameMapper = [
{
name: 'concentration',
mapTo: 'conc'
mapTo: 'conc',
},
{
name: 'uncertConcentration',
mapTo: 'uncert_conc'
mapTo: 'uncert_conc',
},
{
name: 'mdc',
mapTo: 'MDC'
mapTo: 'MDC',
},
{
name: 'lc',
mapTo: 'LC'
}
mapTo: 'LC',
},
]
export default {
props: {
detail: {
type: Object
}
type: Object,
},
},
data() {
this.columns = columns
return {}
return {
list: [],
}
},
computed: {
slots() {
return columns.filter(item => item.scopedSlots).map(item => item.scopedSlots.customRender)
return columns.filter((item) => item.scopedSlots).map((item) => item.scopedSlots.customRender)
},
list() {
return nameMapper.map(item => {
},
mounted() {
this.list = this.getList()
this.$emit('valChange', this.list)
},
methods: {
getList() {
return nameMapper.map((item) => {
const obj = { name: item.name }
columnNameMapper.forEach(it => {
columnNameMapper.forEach((it) => {
const key = `${item.mapTo}_${it.mapTo}`
obj[it.name] = this.detail[key]
obj.activity = ''
obj.uncertActivity = ''
obj.mda = ''
})
return obj
})
}
}
},
cellChange(val, record, key) {
record[key] = val
this.$emit('valChange', this.list)
},
},
}
</script>

View File

@ -2,7 +2,11 @@
<div>
<a-table :columns="columns" :dataSource="list" :pagination="false">
<template v-for="slotName in slots" :slot="slotName" slot-scope="text, record">
<a-input v-model="record[slotName]" :key="slotName"></a-input>
<a-input
v-model="record[slotName]"
:key="slotName"
@change="(e) => cellChange(e.target.value, record, slotName)"
></a-input>
</template>
</a-table>
</div>
@ -17,7 +21,7 @@ const columns = [
width: 100,
customRender: (_, __, index) => {
return index + 1
}
},
},
{
title: 'Nuclide1',
@ -25,8 +29,8 @@ const columns = [
align: 'center',
width: 100,
scopedSlots: {
customRender: 'nuclide1'
}
customRender: 'nuclide1',
},
},
{
title: 'Nuclide2',
@ -34,8 +38,8 @@ const columns = [
align: 'center',
width: 150,
scopedSlots: {
customRender: 'nuclide2'
}
customRender: 'nuclide2',
},
},
{
title: 'Isotope ratio',
@ -43,8 +47,8 @@ const columns = [
align: 'center',
width: 100,
scopedSlots: {
customRender: 'isotopeRatio'
}
customRender: 'isotopeRatio',
},
},
{
title: 'Uncert.Ratio [%]',
@ -52,36 +56,29 @@ const columns = [
align: 'center',
width: 200,
scopedSlots: {
customRender: 'uncertRatio'
}
}
customRender: 'uncertRatio',
},
},
]
export default {
data() {
this.columns = columns
return {
list: [
{
nuclide1: 'nuclide1',
nuclide2: 'nuclide2',
isotopeRatio: 'isotopeRatio',
uncertRatio: 'uncertRatio'
},
{
nuclide1: 'nuclide1',
nuclide2: 'nuclide2',
isotopeRatio: 'isotopeRatio',
uncertRatio: 'uncertRatio'
}
]
list: [],
}
},
computed: {
slots() {
return columns.filter(item => item.scopedSlots).map(item => item.scopedSlots.customRender)
}
}
return columns.filter((item) => item.scopedSlots).map((item) => item.scopedSlots.customRender)
},
},
methods: {
cellChange(val, record, key) {
record[key] = val
this.$emit('valChange', this.list)
},
},
}
</script>

View File

@ -1,25 +1,45 @@
<template>
<div class="transport-infomation">
<a-form-model layout="vertical">
<a-form-model-item label="Comments on transport">
<a-textarea :rows="12"></a-textarea>
</a-form-model-item>
<a-form-model-item label="Other comments, e.g. on sample container conditions">
<a-textarea :rows="12"></a-textarea>
</a-form-model-item>
<a-form-model-item label="Comments on transport">
<a-textarea
:rows="12"
v-model="transInfo.comments"
@change="(e) => handleValueChange(e.target.value)"
></a-textarea>
</a-form-model-item>
<a-form-model-item label="Other comments, e.g. on sample container conditions">
<a-textarea
:rows="12"
v-model="transInfo.otherComments"
@change="(e) => handleValueChange(e.target.value)"
></a-textarea>
</a-form-model-item>
</a-form-model>
</div>
</template>
<script>
export default {
data() {
return {
transInfo: {
comments: '',
otherComments: '',
},
}
},
methods: {
handleValueChange() {
this.$emit('valChange', this.transInfo)
},
},
}
</script>
<style lang="less" scoped>
.transport-infomation {
.ant-form-item {
margin-bottom: 0;
}
.ant-form-item {
margin-bottom: 0;
}
}
</style>

View File

@ -17,25 +17,25 @@
<a-spin :spinning="isLoading">
<div class="rlr-content-detail">
<template v-if="activeKey == 0">
<general-infomation :detail="detail" />
<general-infomation :detail="detail" @valChange="getNewVal_generalInfo" />
</template>
<template v-if="activeKey == 1">
<transport-infomation :detail="detail" />
<transport-infomation :detail="detail" @valChange="getNewVal_transInfo" />
</template>
<template v-if="activeKey == 2">
<analysis-results :detail="detail" />
<analysis-results :detail="detail" @valChange="getNewVal_analysisResults" />
</template>
<template v-if="activeKey == 3">
<nuclides :detail="detail" />
<nuclides :detail="detail" @valChange="getNewVal_nuclidesList" />
</template>
<template v-if="activeKey == 4">
<ratios :detail="detail" />
<ratios :detail="detail" @valChange="getNewVal_rationsList" />
</template>
<template v-if="activeKey == 5">
<methods :detail="detail" />
<methods :detail="detail" @valChange="getNewVal_methodsInfo" />
</template>
<template v-if="activeKey == 6">
<additional-info :detail="detail" />
<additional-info :detail="detail" @valChange="getNewVal_addInfo" />
</template>
<template v-if="activeKey == 7">
<notes :detail="detail" />
@ -57,7 +57,8 @@ import Ratios from './components/Ratios.vue'
import Methods from './components/Methods.vue'
import AdditionalInfo from './components/AdditionalInfo.vue'
import Notes from './components/Notes.vue'
import { getAction } from '@/api/manage'
import { getAction, postFileAction } from '@/api/manage'
import { saveAs } from 'file-saver'
import { TagsInputCell } from '@/components/jeecg/JVxeTable/components/cells/JVxeTagsCell'
const tabs = [
@ -68,7 +69,7 @@ const tabs = [
'Ratios',
'Methods',
'Additional Info',
'Notes'
'Notes',
]
export default {
@ -81,12 +82,12 @@ export default {
Ratios,
Methods,
AdditionalInfo,
Notes
Notes,
},
props: {
sampleData: {
type: Object
}
type: Object,
},
},
data() {
this.tabs = tabs
@ -94,18 +95,27 @@ export default {
activeKey: 0,
detail: {},
isLoading: false,
text: "- All dates and times shall be given in UTC \n"+
"- If a Xe isotope is not detected, i.e., below Lc, then leave the related activity and activity concentration fields for this isotope empty. \n"+
"- Activity shall be decay corrected to radioactive Xe measuring start \n"+
"- Activity concentrations shall be decay corrected to sampling period, under the assumption of a constant concentration during sampling; or a reference time if provided (see also Notes below) \n"+
"- MDAs shall be decay corrected to radioactive Xe measuring start \n"+
"- MDCs shall be decay corrected to the sampling period, under the assumption of a constant concentration during sampling; or a reference time if provided \n"+
"- LC shall be decay corrected to the sampling period, under the assumption of a constant concentration during sampling; or a reference time if provided \n"+
"- Isotopic ratios shall be decay corrected to sampling period, under the assumption of a constant concentration during sampling; or a reference time if provided (see also Notes below) \n"+
"- Uncertainties values shall be reported as relative standard uncertainties (k=1) and shall include associated combined uncertainties \n"
newDetail: {},
transInfo: {},
methodsInfo: {},
addInfo: {},
nuclidesList: [],
rationsList: [],
fileName: '',
text:
'- All dates and times shall be given in UTC \n' +
'- If a Xe isotope is not detected, i.e., below Lc, then leave the related activity and activity concentration fields for this isotope empty. \n' +
'- Activity shall be decay corrected to radioactive Xe measuring start \n' +
'- Activity concentrations shall be decay corrected to sampling period, under the assumption of a constant concentration during sampling; or a reference time if provided (see also Notes below) \n' +
'- MDAs shall be decay corrected to radioactive Xe measuring start \n' +
'- MDCs shall be decay corrected to the sampling period, under the assumption of a constant concentration during sampling; or a reference time if provided \n' +
'- LC shall be decay corrected to the sampling period, under the assumption of a constant concentration during sampling; or a reference time if provided \n' +
'- Isotopic ratios shall be decay corrected to sampling period, under the assumption of a constant concentration during sampling; or a reference time if provided (see also Notes below) \n' +
'- Uncertainties values shall be reported as relative standard uncertainties (k=1) and shall include associated combined uncertainties \n',
}
},
mounted(){
mounted() {
console.log('this.sampleData23334', this.sampleData)
this.getInfo()
},
methods: {
@ -115,14 +125,21 @@ export default {
},
async getInfo() {
console.log('this.sampleData23334', this.sampleData)
try {
this.isLoading = true
let param = {
sampleId: this.sampleData.sampleId,
sampleFileName: this.sampleData.sampleFileName,
sampleFileName: this.sampleData.inputFileName,
gasFileName: this.sampleData.gasFileName,
detFileName: this.sampleData.detFileName
detFileName: this.sampleData.detFileName,
}
// let param = {
// sampleId: 470725,
// sampleFileName: 'AUX04_005-20230907_1404_S_FULL_40184.PHD',
// gasFileName: 'AUX04_005-20230907_0204_G_FULL_40189.4.PHD',
// detFileName: 'AUX04_005-20220422_1327_D_FULL_259525.PHD',
// }
const { success, result, message } = await getAction('/spectrumAnalysis/viewRLR', param)
if (success) {
this.detail = result
@ -135,11 +152,97 @@ export default {
console.error(error)
}
},
getNewVal_generalInfo(val) {
console.log('新的val', val)
this.newDetail = val
},
getNewVal_transInfo(val) {
console.log('新的val', val)
this.transInfo = val
},
getNewVal_analysisResults(val) {
console.log('新的val', val)
this.newDetail = val
},
getNewVal_nuclidesList(val) {
console.log('新的val', val)
this.nuclidesList = val
},
getNewVal_rationsList(val) {
console.log('新的val', val)
this.rationsList = val
},
getNewVal_methodsInfo(val) {
console.log('新的val', val)
this.methodsInfo = val
},
getNewVal_addInfo(val) {
console.log('新的val', val)
this.addInfo = val
},
handleOk() {
console.log('%c [ ]-62', 'font-size:13px; background:pink; color:#bf2c9f;')
}
}
let params = {
laboratory: this.newDetail.laboratory || '',
srid: this.newDetail.srid || this.detail.srid,
colloct_start_date: this.newDetail.colloct_start_date || this.detail.colloct_start_date,
colloct_start_time: this.newDetail.colloct_start_time || this.detail.colloct_start_time,
colloct_stop_date: this.newDetail.colloct_stop_date || this.detail.colloct_stop_date,
colloct_stop_time: this.newDetail.colloct_stop_time || this.detail.colloct_stop_time,
receiptDate: this.newDetail.receiptDate || '',
receiptTime: this.newDetail.receiptTime || '',
reportTransmissionDate: this.newDetail.reportTransmissionDate || '',
reportTransmissionTime: this.newDetail.reportTransmissionTime || '',
comments: this.transInfo.comments || '',
otherComments: this.transInfo.otherComments || '',
pressureInTheArchiveBottle: this.newDetail.pressureInTheArchiveBottle || '',
volumeOfArchiveBottle: this.newDetail.volumeOfArchiveBottle || '',
gasComposition: this.newDetail.gasComposition || '',
stableXeMeasStartDate: this.newDetail.stableXeMeasStartDate || this.detail.stableXeMeasStartDate,
stableXeMeasStartTime: this.newDetail.stableXeMeasStartTime || this.detail.stableXeMeasStartTime,
stableXenonVolumeInTheArchiveBottle: this.newDetail.stableXenonVolumeInTheArchiveBottle || '',
uncertaintyOfStableXenonVolume: this.newDetail.uncertaintyOfStableXenonVolume || '',
stableXenonVolumeInTheMeasurementCell: this.newDetail.stableXenonVolumeInTheMeasurementCell || '',
uncertaintyOfStableXenonVolume2: this.newDetail.uncertaintyOfStableXenonVolume2 || '',
acq_start_date: this.newDetail.acq_start_date || this.detail.acq_start_date,
acq_start_time: this.newDetail.acq_start_time || this.detail.acq_start_time,
acq_live_time: this.newDetail.acq_live_time || this.detail.acq_live_time,
nuclides: this.nuclidesList,
rations: this.rationsList,
samplingHandling: this.methodsInfo.samplingHandling || '',
equipmentUsed: this.methodsInfo.equipmentUsed || '',
softwareUsed: this.methodsInfo.softwareUsed || '',
xeTransfer: this.addInfo.xeTransfer || '',
uncertaintyOfXe: this.addInfo.uncertaintyOfXe || '',
commentsInfo: this.addInfo.commentsInfo || '',
detailedDescriptionM: this.addInfo.detailedDescriptionM || '',
detailedDescriptionS: this.addInfo.detailedDescriptionS || '',
uncertaintyBudget: this.addInfo.uncertaintyBudget || '',
informationOn: this.addInfo.informationOn || '',
ysical: this.addInfo.ysical || '',
}
postFileAction('/spectrumAnalysis/exportRLR', params).then((res) => {
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
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() {
if (_this.fileName) {
saveAs(blob, `${_this.fileName}`)
}
},
})
})
},
},
}
</script>

View File

@ -35,10 +35,9 @@
<!-- Beta-Gamma 分析 -->
<beta-gamma-analysis v-else-if="isBetaGamma" ref="betaGammaAnalysisRef" :sample="sampleData" />
<!-- <beta-gamma-analysis v-else-if="isBetaGamma" ref="betaGammaAnalysisRef" @getFiles="getFiles" :sample="sampleData" /> -->
<!-- Beta-Gamma 分析 -->
<div v-else class="empty">
Please Select a Sample
</div>
<div v-else class="empty">Please Select a Sample</div>
<resize-observer @notify="handleResize" />
</div>
<!-- 频谱分析部分结束 -->
@ -76,7 +75,11 @@
<!-- 分析-设置弹窗结束 -->
<!-- 分析工具弹窗开始 -->
<analyze-interactive-tool-modal v-model="analyzeInteractiveToolModalVisible" :sampleId="sampleData.sampleId" @refresh="handleRefreshGamma" />
<analyze-interactive-tool-modal
v-model="analyzeInteractiveToolModalVisible"
:sampleId="sampleData.sampleId"
@refresh="handleRefreshGamma"
/>
<!-- 分析工具弹窗结束 -->
<!-- Korsum 弹窗开始 -->
@ -104,10 +107,7 @@
<!-- Resolution Calibration 弹窗结束 -->
<!-- SpectrumComments 弹窗开始 -->
<spectrum-comments-modal
v-model="gammaCommentsModalVisible"
:isAdd="isGammaCommentsAdd"
/>
<spectrum-comments-modal v-model="gammaCommentsModalVisible" :isAdd="isGammaCommentsAdd" />
<!-- SpectrumComments 弹窗结束 -->
<!-- Color Config 弹窗开始 -->
@ -127,11 +127,7 @@
<!-- Nuclide Library 弹窗结束 -->
<!-- Arr RRR 弹窗开始 -->
<arr-rrr-modal
v-model="arrOrRRRModalVisible"
:type="arrOrRRRModalType"
:extraData="this.arrOrRRRModalExtraData"
/>
<arr-rrr-modal v-model="arrOrRRRModalVisible" :type="arrOrRRRModalType" :extraData="this.arrOrRRRModalExtraData" />
<!-- Arr 弹窗结束 -->
<!-- Spectrum 弹窗开始 -->
@ -153,10 +149,7 @@
<automatic-analysis-log-modal v-model="autoAnalysisMogModalVisible" :type="autoAnalysisMogModalType" />
<!-- Beta-Gamma 的Comments 弹窗 -->
<beta-gamma-comments-modal
v-model="betaGammaCommentsModalVisible"
:isAdd="isBetaGammaCommentsAdd"
/>
<beta-gamma-comments-modal v-model="betaGammaCommentsModalVisible" :isAdd="isBetaGammaCommentsAdd" />
<!-- Beta-Gamma 的Comments 结束 -->
<!-- Beta-Gamma 的Energy Calibration开始 -->
@ -240,7 +233,7 @@ import BetaGammaExtrapolationModal from './components/Modals/BetaGammaModals/Bet
//
const ANALYZE_TYPE = {
GAMMA: 'gammaAnalysis',
BETA_GAMMA: 'betaGammaAnalysis'
BETA_GAMMA: 'betaGammaAnalysis',
}
export default {
components: {
@ -281,14 +274,14 @@ export default {
BetaGammaEnergyCalibrationModal,
StripModal,
AutomaticAnalysisLogModal,
BetaGammaExtrapolationModal
BetaGammaExtrapolationModal,
},
provide() {
return {
sample: () => {
return this.sampleData
}
},
}
},
@ -355,8 +348,8 @@ export default {
betaGammaSpectrumModalVisible: false, // beta-gamma spectrum
betaGammaSampleInfomationModalVisible: false, // beta-gamma sample infomation
betaGammaQCResultsModalVisible: false, // beta-gamma QC Result
betaGammaRlrModalVisible: true, // beta-gamma RLR
statisticsParamerHistoryModalVisible: false // beta-gamma Statistics Paramer History
betaGammaRlrModalVisible: false, // beta-gamma RLR
statisticsParamerHistoryModalVisible: false, // beta-gamma Statistics Paramer History
}
},
created() {
@ -365,7 +358,7 @@ export default {
sampleId: 426530,
sampleType: 'G',
dbName: 'auto',
inputFileName: 'CAX05_001-20230731_1528_S_FULL_37563.6.PHD'
inputFileName: 'CAX05_001-20230731_1528_S_FULL_37563.6.PHD',
})
},
@ -374,34 +367,37 @@ export default {
},
methods: {
// getFiles(val){
// this.sampleData={...this.sampleData,...val}
// },
/**
* 从数据库加载-选择完成
* @param {any[]} sampleList
*/
handleLoadSampleFromDB(sampleList) {
const ids = this.sampleList.map(item => item.sampleId) // Sampleid
const willAddList = sampleList.filter(item => !ids.includes(item.sampleId))
const ids = this.sampleList.map((item) => item.sampleId) // Sampleid
const willAddList = sampleList.filter((item) => !ids.includes(item.sampleId))
this.sampleList = this.sampleList.concat(willAddList)
},
handleLoadSampleFromFile(sampleList) {
console.log("sampleListsampleListsampleListsampleListsampleList",sampleList);
let arr = sampleList.filter(item => {
if (Object.keys(item).length>4) {
if (item.gasFileName&&item.detFileName&&item.qcFileName&&item.gasFileStatus&&item.detFileStatus) {
console.log('sampleListsampleListsampleListsampleListsampleList', sampleList)
let arr = sampleList.filter((item) => {
if (Object.keys(item).length > 4) {
if (item.gasFileName && item.detFileName && item.qcFileName && item.gasFileStatus && item.detFileStatus) {
return item
} else if (!item.gasFileName && !item.detFileName && !item.qcFileName) {
return item
}
}
})
console.log("sampleListsampleList",arr);
arr.forEach(item => {
item.sampleId = ""
console.log('sampleListsampleList', arr)
arr.forEach((item) => {
item.sampleId = ''
item.inputFileName = item.sampleFileName
item.sampleType = item.sampleSystemType
})
const names = this.sampleList.map(item => item.inputFileName) // Sampleid
const willAddList = arr.filter(item => !names.includes(item.inputFileName))
const names = this.sampleList.map((item) => item.inputFileName) // Sampleid
const willAddList = arr.filter((item) => !names.includes(item.inputFileName))
this.sampleList = this.sampleList.concat(willAddList)
},
@ -496,7 +492,7 @@ export default {
// Beta-Gamma Energy Calibration
handleReanalyse(...data) {
this.$refs.betaGammaAnalysisRef.reanalyse(data)
}
},
},
computed: {
//
@ -511,31 +507,31 @@ export default {
{
type: 'a-menu-item',
title: 'Load From DB',
handler: () => (this.loadFromDbModalVisible = true)
handler: () => (this.loadFromDbModalVisible = true),
},
{
type: 'a-menu-item',
title: 'Load From File',
handler: () => (this.loadFromFileModalVisible = true)
handler: () => (this.loadFromFileModalVisible = true),
},
{
type: 'a-menu-item',
title: 'Clean All',
handler: this.handleCleanAll
handler: this.handleCleanAll,
},
{
type: 'a-menu-item',
title: 'Strip',
show: this.isGamma,
handler: () => (this.stripModalVisible = true)
handler: () => (this.stripModalVisible = true),
},
{
type: 'a-menu-item',
title: 'Ftransit',
show: this.isGamma,
handler: () => (this.ftransltModalVisible = true)
}
]
handler: () => (this.ftransltModalVisible = true),
},
],
},
{
type: 'a-divider',
@ -543,27 +539,27 @@ export default {
style: {
marginTop: '5px',
marginBottom: '5px',
display: this.sampleList.length ? '' : 'none'
}
}
display: this.sampleList.length ? '' : 'none',
},
},
},
{
type: 'SpectraListInMenu',
attrs: {
list: this.sampleList
list: this.sampleList,
},
on: {
change: spectra => {
change: (spectra) => {
if (spectra) {
this.loadSelectedSample(spectra)
} else {
this.analysisType = undefined
this.sampleData = {}
}
}
}
}
]
},
},
},
],
},
{
title: 'SAVE',
@ -573,36 +569,36 @@ export default {
attrs: {
children: [
{
title: 'Save Results to File'
title: 'Save Results to File',
},
{
title: 'Save Results to DB',
children: [
{
title: 'Save Current',
key: 'current'
key: 'current',
},
{
title: 'Save All',
key: 'all'
}
]
key: 'all',
},
],
},
{
title: 'Save PHD to File',
children: [
{
title: 'Save Current',
key: 'current'
key: 'current',
},
{
title: 'Save All',
key: 'all'
}
]
}
key: 'all',
},
],
},
],
width: '170px'
width: '170px',
},
on: {
menuClick: () => {
@ -614,10 +610,10 @@ export default {
} else if (item.title == 'Save PHD to File') {
this.handleSavePHDToFile(child.key)
}
}
}
}
]
},
},
},
],
},
{
title: 'ANALYZE',
@ -629,53 +625,53 @@ export default {
type: 'a-menu-item',
title: 'Configure',
show: this.isGamma,
handler: () => (this.analyzeConfigureModalVisible = true)
handler: () => (this.analyzeConfigureModalVisible = true),
},
{
type: 'a-menu-item',
title: 'ReProcessing',
show: this.isGamma,
handler: () => (this.reprocessingModalVisible = true)
handler: () => (this.reprocessingModalVisible = true),
},
{
type: 'a-menu-item',
title: 'Reprocess All',
show: this.isGamma,
handler: this.handleReprocessAll
handler: this.handleReprocessAll,
},
{
type: 'a-menu-item',
title: 'Interactive Tool',
show: this.isGamma,
handler: () => (this.analyzeInteractiveToolModalVisible = true)
handler: () => (this.analyzeInteractiveToolModalVisible = true),
},
{
type: 'a-menu-item',
title: 'Zero Time',
show: this.isGamma,
handler: () => (this.zeroTimeModalVisible = true)
handler: () => (this.zeroTimeModalVisible = true),
},
{
type: 'a-menu-item',
title: 'Korsum',
show: this.isGamma,
handler: () => (this.korsumModalShow = true)
handler: () => (this.korsumModalShow = true),
},
{
type: 'a-menu-item',
title: 'Analyze current spectrum',
show: this.isBetaGamma,
handler: () => {}
handler: () => {},
},
{
type: 'a-menu-item',
title: 'Analyze all spectra',
show: this.isBetaGamma,
handler: () => {}
}
]
}
]
handler: () => {},
},
],
},
],
},
{
title: 'CALIBRATION',
@ -687,35 +683,35 @@ export default {
type: 'a-menu-item',
title: 'Energy',
show: this.isGamma,
handler: () => (this.energyCalibrationModalShow = true)
handler: () => (this.energyCalibrationModalShow = true),
},
{
type: 'a-menu-item',
title: 'Resolution',
show: this.isGamma,
handler: () => (this.resolutionCalibrationModalShow = true)
handler: () => (this.resolutionCalibrationModalShow = true),
},
{
type: 'a-menu-item',
title: 'Efficiency',
show: this.isGamma,
handler: () => (this.efficiencyCalibrationModalShow = true)
handler: () => (this.efficiencyCalibrationModalShow = true),
},
{
type: 'a-menu-item',
title: 'Energy Calibration',
show: this.isBetaGamma,
handler: () => (this.betaGammaEnergyCalibrationModalVisible = true)
handler: () => (this.betaGammaEnergyCalibrationModalVisible = true),
},
{
type: 'a-menu-item',
title: 'Extrapolation',
show: this.isBetaGamma,
handler: () => (this.betaGammaExtrapolationModalVisible = true)
}
]
}
]
handler: () => (this.betaGammaExtrapolationModalVisible = true),
},
],
},
],
},
{
title: 'NUCLIDELIBRARY',
@ -727,16 +723,16 @@ export default {
{
type: 'a-menu-item',
title: 'Nuclide Library',
handler: () => (this.nuclideLibraryModalVisible = true)
handler: () => (this.nuclideLibraryModalVisible = true),
},
{
type: 'a-menu-item',
title: 'Config User Library',
handler: () => (this.configUserLibModalVisible = true)
}
]
}
]
handler: () => (this.configUserLibModalVisible = true),
},
],
},
],
},
{
title: 'STATISTIC',
@ -748,11 +744,11 @@ export default {
{
type: 'a-menu-item',
title: 'MDC & Activity Concentration',
handler: () => (this.statisticsParamerHistoryModalVisible = true)
}
]
}
]
handler: () => (this.statisticsParamerHistoryModalVisible = true),
},
],
},
],
},
{
title: 'COMMENTS',
@ -764,29 +760,29 @@ export default {
type: 'a-menu-item',
title: 'View Comments',
show: this.isBetaGamma,
handler: this.handleViewComments
handler: this.handleViewComments,
},
{
type: 'a-menu-item',
title: 'Add Comments',
show: this.isBetaGamma,
handler: this.handleAddComments
handler: this.handleAddComments,
},
{
type: 'a-menu-item',
title: 'View',
show: this.isGamma,
handler: this.handleViewComments
handler: this.handleViewComments,
},
{
type: 'a-menu-item',
title: 'Add',
show: this.isGamma,
handler: this.handleAddComments
}
]
}
]
handler: this.handleAddComments,
},
],
},
],
},
{
title: 'REPORTS',
@ -798,7 +794,7 @@ export default {
type: 'a-menu-item',
title: 'Peak Infomation',
handler: () => (this.peakInfomationModalVisible = true),
show: this.isGamma
show: this.isGamma,
},
{
type: 'a-menu-item',
@ -808,7 +804,7 @@ export default {
this.arrOrRRRModalExtraData = {}
this.arrOrRRRModalType = 1
},
show: this.isGamma
show: this.isGamma,
},
{
type: 'a-menu-item',
@ -818,39 +814,39 @@ export default {
this.arrOrRRRModalExtraData = {}
this.arrOrRRRModalType = 2
},
show: this.isGamma
show: this.isGamma,
},
{
type: 'a-menu-item',
title: 'Radionuclide Activity',
handler: () => (this.nuclideActivityAndMDCModalVisible = true),
show: this.isGamma
show: this.isGamma,
},
{
type: 'a-menu-item',
title: 'Spectrum',
handler: () => (this.spectrumModalVisible = true),
show: this.isGamma
show: this.isGamma,
},
{
type: 'a-menu-item',
title: 'Sample Infomation',
handler: () => (this.sampleInfomationModalVisible = true),
show: this.isGamma
show: this.isGamma,
},
{
type: 'a-menu-item',
title: 'QC Results',
handler: () => (this.qcResultsModalVisible = true),
show: this.isGamma
show: this.isGamma,
},
{
type: 'a-menu-item',
title: 'RLR',
handler: () => (this.rlrModalVisible = true),
show: this.isGamma
show: this.isGamma,
},
// beta-gamma
@ -862,7 +858,7 @@ export default {
this.arrOrRRRModalExtraData = {}
this.arrOrRRRModalType = 3
},
show: this.isBetaGamma
show: this.isBetaGamma,
},
{
type: 'a-menu-item',
@ -876,39 +872,39 @@ export default {
DetBgData: false,
QCData: false,
bGammaEnergyValid: false,
bBetaEnergyValid: false
bBetaEnergyValid: false,
}
this.arrOrRRRModalType = 4
},
show: this.isBetaGamma
show: this.isBetaGamma,
},
{
type: 'a-menu-item',
title: 'View spectrum',
handler: () => (this.betaGammaSpectrumModalVisible = true),
show: this.isBetaGamma
show: this.isBetaGamma,
},
{
type: 'a-menu-item',
title: 'View Sample Infomation',
handler: () => (this.betaGammaSampleInfomationModalVisible = true),
show: this.isBetaGamma
show: this.isBetaGamma,
},
{
type: 'a-menu-item',
title: 'QC results',
handler: () => (this.betaGammaQCResultsModalVisible = true),
show: this.isBetaGamma
show: this.isBetaGamma,
},
{
type: 'a-menu-item',
title: 'RLR',
handler: () => (this.betaGammaRlrModalVisible = true),
show: this.isBetaGamma
}
]
}
]
show: this.isBetaGamma,
},
],
},
],
},
{
title: 'LOG',
@ -920,25 +916,25 @@ export default {
type: 'a-menu-item',
title: 'Automatic Analysis Log',
handler: () => {
this.autoAnalysisMogModalType = this.isGamma?1:this.isBetaGamma?2:1
this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1
this.autoAnalysisMogModalVisible = true
}
},
},
{
type: 'a-menu-item',
title: 'BG log viewer',
show: this.isBetaGamma,
handler: () => {}
handler: () => {},
},
{
type: 'a-menu-item',
title: 'GammaViewer Log',
show: this.isGamma,
handler: () => (this.dataProcessingLogModalVisible = true)
}
]
}
]
handler: () => (this.dataProcessingLogModalVisible = true),
},
],
},
],
},
{
title: 'HELP',
@ -949,17 +945,17 @@ export default {
{
type: 'a-menu-item',
title: 'Help',
handler: this.handleHelp
handler: this.handleHelp,
},
{
type: 'a-menu-item',
title: 'Color Config',
handler: () => (this.colorConfigModalVisible = true)
}
]
}
]
}
handler: () => (this.colorConfigModalVisible = true),
},
],
},
],
},
]
},
@ -971,8 +967,8 @@ export default {
// Beta-Gamma
isBetaGamma() {
return this.analysisType == ANALYZE_TYPE.BETA_GAMMA
}
}
},
},
}
</script>
<style lang="less" scoped>