Merge branch 'feature-Beta-dev-renpy' into master-dev

This commit is contained in:
Xu Zhimeng 2025-01-09 15:57:17 +08:00
commit a2c2299a30
19 changed files with 637 additions and 967449 deletions

View File

@ -0,0 +1,68 @@
export const SampleTypeOptions = [
{
label: 'All',
value: 'All'
},
{
label: 'Gamma',
value: 'Gamma'
},
{
label: 'Beta',
value: 'Beta'
}
]
export const SampleMap = {
All: ['P', 'B', 'G', 'C'],
Gamma: ['P', 'G'],
Beta: ['B', 'C']
}
export const MenuNameMap = {
P: 'Particulate',
G: 'Noble Gas HPGe',
B: 'Noble Gas Beta-Gamma',
C: 'Self-Station'
}
export const QcFlagOptions = {
P: [
{ label: 'acq_time (h)', isArray: false, value: 18, prop: 'acqTime' },
{ label: 'airFlow (m3/h)', isArray: false, value: 500, prop: 'airFlow' },
{ label: 'decay_time (h)', isArray: false, value: 26.4, prop: 'decayTime' },
{ label: 'samp_vol (m3)', isArray: false, value: 10800, prop: 'sampVol' },
{ label: 'Be7-FWHM (keV)', isArray: false, value: 1.7, prop: 'be7FWHM' },
{
label: 'Ba140-MDC (uBq/m3)',
isArray: false,
value: 30,
prop: 'ba140MDC'
},
{ label: 'col_time (h)', isArray: true, value: [21.6, 26.4], prop: 'colTime' }
],
B: [
{ label: 'Xenon Volume (ml)', isArray: false, value: 0.2, prop: 'xeVol' },
{ label: 'Collection Time (h)', isArray: true, value: [6.0, 24.0], prop: 'colTime' },
{ label: 'Acqusition Time (h)', isArray: true, value: [6.0, 24.0], prop: 'acqTime' },
{ label: 'MDC for Xe133 (mBq/m3)', isArray: true, value: [0.001, 5], prop: 'xe133MDC' },
{ label: 'Xe131m Flag', isArray: false, value: 1, disabled: true, prop: 'xe131mFlag' },
{ label: 'Xe133m Flag', isArray: false, value: 1, disabled: true, prop: 'xe133mFlag' },
{ label: 'Xe133 Flag', isArray: false, value: 1, disabled: true, prop: 'xe133Flag' },
{ label: 'Xe135 Flag', isArray: false, value: 1, disabled: true, prop: 'xe135Flag' }
],
G: [
{ label: 'airFlow (m3/h)', isArray: false, value: 0.4, prop: 'airFlow' },
{ label: 'decay_time (h)', isArray: false, value: 10.0, prop: 'decayTime' },
{ label: 'samp_vol (m3)', isArray: false, value: 10, prop: 'sampVol' },
{ label: 'Xe133-MDC (uBq/m3)', isArray: false, value: 1000, prop: 'xe133MDC' },
{ label: 'acq_time (h)', isArray: true, value: [16.0, 24.0], prop: 'acqTime' },
{ label: 'col_time (h)', isArray: true, value: [21.6, 24.0], prop: 'colTime' },
],
C: [
{ label: 'Xe131m Flag', isArray: false, value: 1, disabled: true, prop: 'xe131mFlag' },
{ label: 'Xe133m Flag', isArray: false, value: 1, disabled: true, prop: 'xe133mFlag' },
{ label: 'Xe133 Flag', isArray: false, value: 1, disabled: true, prop: 'xe133Flag' },
{ label: 'Xe135 Flag', isArray: false, value: 1, disabled: true, prop: 'xe135Flag' }
]
}

View File

@ -154,6 +154,8 @@
@showSizeChange="handleSizeChange"
/>
</div>
<!-- 新增/编辑规则弹窗 -->
<a-modal
:title="isAdd ? 'Add Rule' : 'Edit Rule'"
:width="800"
@ -161,52 +163,74 @@
:maskClosable="false"
@cancel="onCancel"
>
<a-form :form="form" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="Name">
<a-input
v-decorator="[
'name',
{
rules: [{ required: true, message: 'Please input name!' }],
initialVale: this.formVal.name,
},
]"
/>
</a-form-item>
<a-form-model
ref="form"
:model="formVal"
:label-col="labelCol"
:wrapper-col="wrapperCol"
style="max-height: calc(100vh - 341px); overflow: hidden auto"
>
<a-form-model-item label="Name" prop="name" :rules="[{ required: true, message: 'Please input name!' }]">
<a-input v-model="formVal.name" />
</a-form-model-item>
<a-form-item label="Source">
<dic-select
type="checkbox"
dictCode="alarm_analyse_rule_source"
v-decorator="[
'source',
{
rules: [{ required: true }],
initialVale: this.formVal.source,
},
]"
/>
</a-form-item>
<a-form-item label="Station">
<a-form-model-item label="Source" prop="source" :rules="[{ required: true, message: 'Please select source!' }]">
<dic-select type="checkbox" dictCode="alarm_analyse_rule_source" v-model="formVal.source" />
</a-form-model-item>
<a-row>
<a-col :span="12">
<a-form-model-item
label="Sample Type"
prop="sampleType"
:rules="[{ required: true, message: 'Please select sample type!' }]"
:label-col="{ span: 8 }"
:wrapper-col="{ span: 16 }"
>
<a-select v-model="formVal.sampleType" @change="handleSampleTypeChange" style="width: 100%">
<a-select-option v-for="item in SampleTypeOptions" :key="item.value" :value="item.value">
{{ item.label }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item
label="Sample"
prop="sample"
:rules="[{ required: true, message: 'Please select sample!' }]"
:label-col="{ span: 8 }"
:wrapper-col="{ span: 12 }"
>
<a-select v-model="formVal.sample" @change="handleSampleChange" style="width: 100%">
<a-select-option v-for="item in sampleList" :key="item" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-form-model-item
label="Station"
prop="station"
:rules="[{ required: true, message: 'Please select station!' }]"
>
<a-select
class="form-select"
mode="multiple"
placeholder="select..."
:filter-option="filterOption"
show-arrow
:options="stationOptions"
v-decorator="[
'station',
{
rules: [{ required: true, message: 'Please select station' }],
initialVale: this.formVal.station,
},
]"
:options="filteredStationList"
v-model="formVal.station"
>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-form-item>
<a-form-item label="Nuclide">
</a-form-model-item>
<a-form-model-item
label="Nuclide"
prop="nuclide"
:rules="[{ required: true, message: 'Please select nuclide!' }]"
>
<a-select
class="form-select"
mode="multiple"
@ -215,75 +239,126 @@
:filter-option="filterOption"
show-arrow
:options="nuclideOptions"
v-decorator="[
'nuclide',
{
rules: [{ required: true, message: 'Please select nuclide' }],
initialVale: this.formVal.nuclide,
},
]"
v-model="formVal.nuclide"
>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-form-item>
<a-form-item label="Qualifier">
<dic-select
type="checkbox"
dictCode="spectral_qualifier"
v-decorator="[
'qualifier',
{
rules: [{ required: true }],
initialVale: this.formVal.qualifier,
},
]"
/>
</a-form-item>
<a-form-item label="Condition">
</a-form-model-item>
<a-row :gutter="10">
<a-col :span="12">
<a-form-model-item
label="Avg cycle"
prop="days"
:rules="[{ required: true, message: 'Please input Avg cycle!' }]"
:label-col="{ span: 8 }"
:wrapper-col="{ span: 16 }"
>
<a-input class="avg-cycle" type="number" v-model="formVal.days">
<template #suffix>days</template>
</a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item
label="Coefficient"
prop="coefficient"
:rules="[{ required: true, message: 'Please input coefficient!' }]"
:label-col="{ span: 6 }"
:wrapper-col="{ span: 14 }"
>
<a-input type="number" v-model="formVal.coefficient"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-form-model-item v-if="formVal.sample" label="Qc Flags" style="margin-bottom: 0">
<a-row :gutter="10">
<a-col
class="qc-item"
:span="item.disabled ? 6 : item.isArray ? 24 : 12"
v-for="(item, index) in qcFlagList"
:key="index"
>
<a-checkbox v-model="item.checked"></a-checkbox>
<span>{{ item.label }}</span>
<!-- 如果有两个值 -->
<template v-if="item.isArray">
<a-input type="number" v-model="item.value[0]" placeholder="min" :readOnly="!item.checked"></a-input>
<a-input type="number" v-model="item.value[1]" placeholder="max" :readOnly="!item.checked"></a-input>
</template>
<template v-else>
<a-input
v-if="!item.disabled"
type="number"
v-model="item.value"
:readOnly="item.disabled || !item.checked"
placeholder="请输入..."
/>
</template>
</a-col>
</a-row>
</a-form-model-item>
<a-form-model-item
label="Qualifier"
prop="qualifier"
:rules="[{ required: true, message: 'Please select qualifier!' }]"
>
<dic-select type="checkbox" dictCode="spectral_qualifier" v-model="formVal.qualifier" />
</a-form-model-item>
<a-form-model-item
label="Condition"
prop="condition"
:rules="[{ required: true, message: 'Please select condition!' }]"
>
<dic-select
type="checkbox"
layout="vertical"
dictCode="alarm_analyse_rule_condition"
v-decorator="[
'condition',
{
rules: [{ required: true }],
initialVale: this.formVal.condition,
},
]"
v-model="formVal.condition"
>
</dic-select>
</a-form-item>
<a-form-item label="Contact Group">
</a-form-model-item>
<a-form-model-item
label="Identify nuclides"
prop="identifyNuclides"
:rules="[{ required: true, message: 'Please select Identify nuclides!' }]"
>
<a-select
class="form-select"
mode="multiple"
placeholder="select..."
:maxTagCount="5"
:filter-option="filterOption"
show-arrow
:options="nuclideOptions"
v-model="formVal.identifyNuclides"
>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-form-model-item>
<a-form-model-item
label="Contact Group"
prop="contactGroup"
:rules="[{ required: true, message: 'Please select contact group!' }]"
>
<a-select
class="form-select"
:options="contactGroupOptions"
show-arrow
allowClear
placeholder="select..."
v-decorator="[
'contactGroup',
{
rules: [{ required: true }],
initialVale: this.formVal.contactGroup,
},
]"
v-model="formVal.contactGroup"
>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-form-item>
<a-form-item label="Remark">
<a-input
type="textarea"
v-decorator="[
'remark',
{
initialVale: this.formVal.remark,
},
]"
/>
</a-form-item>
</a-form>
</a-form-model-item>
<a-form-model-item label="Remark">
<a-input type="textarea" v-model="formVal.remark" />
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-space class="operators" :size="20">
<a-button type="success" @click="onSave">Save</a-button>
@ -291,12 +366,34 @@
</a-space>
</template>
</a-modal>
<!-- 新增/编辑规则弹窗 -->
</div>
</template>
<script>
import { getAction, postAction, httpAction, deleteAction, putAction } from '@/api/manage'
import DicSelect from '../../components/dicSelect.vue'
import { MenuNameMap, QcFlagOptions, SampleMap, SampleTypeOptions } from './config'
import { cloneDeep } from 'lodash'
const InitialFormVal = {
name: '',
source: null,
station: undefined,
nuclide: undefined,
qualifier: null,
condition: null,
contactGroup: null,
remark: '',
// Sample TypeSampleCoefficient
sampleType: null,
sample: null,
days: null,
coefficient: 1.0,
identifyNuclides: undefined,
}
export default {
components: {
DicSelect,
@ -339,18 +436,14 @@ export default {
wrapperCol: { span: 18 },
form: this.$form.createForm(this),
contactGroupOptions: [],
formVal: {
name: '',
source: null,
station: undefined,
nuclide: undefined,
qualifier: null,
condition: null,
contactGroup: undefined,
remark: '',
},
formVal: cloneDeep(InitialFormVal),
monitorList: [],
currId: '',
SampleTypeOptions,
sampleList: [],
qcFlagList: [],
filteredStationList: [],
}
},
created() {
@ -360,29 +453,35 @@ export default {
this.getAlarmRulesPage()
},
methods: {
getStationList() {
getAction('/webStatistics/findStationList', { menuName: '' }).then((res) => {
if (res.success) {
if (res.result.length > 0) {
this.stationOptions = res.result.map((item) => {
return {
label: item.stationCode,
value: `${item.stationId}`,
}
})
} else {
this.stationOptions = []
}
async getStationList() {
this.stationOptions = await this.stationRequest('')
},
async stationRequest(menuName) {
try {
const { success, result } = await getAction('/webStatistics/findStationList', { menuName })
if (success) {
return result.map((item) => {
return {
label: item.stationCode,
value: `${item.stationId}`,
}
})
} else {
this.$message.warning('This operation fails. Contact your system administrator')
return []
}
})
} catch (error) {
this.$message.error(error)
return []
}
},
getNuclideList() {
getAction('/sys/defaultNuclide/allName', { useType: 2 }).then((res) => {
if (res.success) {
if (res.result.length > 0) {
this.nuclideOptions = res.result.map((item) => {
this.nuclideOptions = Array.from(new Set(res.result)).map((item) => {
return {
label: item,
value: item,
@ -399,10 +498,32 @@ export default {
handleAdd() {
this.isAdd = true
this.visible = true
this.formVal = cloneDeep(InitialFormVal)
this.sampleList = []
this.qcFlagList = []
this.filteredStationList = []
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
// Sample Type
handleSampleTypeChange() {
this.sampleList = SampleMap[this.formVal.sampleType]
this.formVal.sample = undefined
this.formVal.station = undefined
this.filteredStationList = []
},
// sample
async handleSampleChange() {
this.qcFlagList = QcFlagOptions[this.formVal.sample]
this.filteredStationList = []
this.formVal.station = undefined
this.filteredStationList = await this.stationRequest(MenuNameMap[this.formVal.sample])
},
onStationChange(val) {
this.queryParams.station = val
},
@ -435,28 +556,61 @@ export default {
this.ipagination.current = 1
this.getAlarmRulesPage()
},
editItem(id) {
this.currId = id
getAction('/alarmAnalysisRule/finInfo', { id }).then((res) => {
if (res.success) {
async editItem(id) {
try {
this.currId = id
const { success, result, message } = await getAction('/alarmAnalysisRule/finInfo', { id })
if (success) {
this.isAdd = false
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue({
name: res.result.name,
source: res.result.sourceChecked.join(','),
station: res.result.stationChecked,
nuclide: res.result.nuclidesChecked,
qualifier: res.result.qualifierChecked.join(','),
condition: res.result.conditionChecked.join(','),
contactGroup: res.result.contactGroup,
remark: res.result.remark,
})
const {
sourceChecked,
qualifierChecked,
conditionChecked,
stationChecked,
nuclidesChecked,
identifyNuclidesChecked,
acqTime,
colTime,
xe133MDC,
} = result
this.formVal = {
...result,
acqTime: acqTime ? (acqTime.length > 1 ? acqTime : acqTime[0]) : null,
colTime: colTime ? (colTime.length > 1 ? colTime : colTime[0]) : null,
xe133MDC: xe133MDC ? (xe133MDC.length > 1 ? xe133MDC : xe133MDC[0]) : null,
identifyNuclides: identifyNuclidesChecked,
station: stationChecked,
nuclide: nuclidesChecked,
source: sourceChecked.join(','),
qualifier: qualifierChecked.join(','),
condition: conditionChecked.join(','),
}
this.sampleList = SampleMap[this.formVal.sampleType]
this.qcFlagList = this.qcFlagList = QcFlagOptions[this.formVal.sample].map((item) => {
const val = this.formVal[item.prop]
const hasVal = val !== null && val !== undefined
return {
...item,
checked: hasVal,
value: hasVal ? val : item.value,
}
})
this.filteredStationList = await this.stationRequest(MenuNameMap[this.formVal.sample])
} else {
this.$message.warning('This operation fails. Contact your system administrator')
console.log(message)
}
})
} catch (error) {
console.log(error)
}
},
deleteItem(id) {
let _this = this
@ -515,47 +669,71 @@ export default {
}
})
},
onSave() {
this.form.validateFields((err, values) => {
if (!err) {
let params = {
conditions: values.condition,
name: values.name,
remark: values.remark,
stations: values.station.join(','),
source: values.source,
nuclides: values.nuclide.join(','),
contactGroup: values.contactGroup,
spectralQualifier: values.qualifier,
}
if (this.isAdd) {
postAction('/alarmAnalysisRule/add', params).then((res) => {
if (res.success) {
this.visible = false
this.form.resetFields()
this.$message.success('success')
this.getAlarmRulesPage()
} else {
this.$message.warning('This operation fails. Contact your system administrator')
}
})
async onSave() {
try {
await this.$refs.form.validate()
const qcFlagsHasBlank = this.qcFlagList.some(({ isArray, value, checked }) => {
return checked && (!value || (isArray && value.some((v) => !v)))
})
if (qcFlagsHasBlank) {
this.$message.warning('Please fill in the QC Flag value')
return
}
const qcFlags = this.qcFlagList.reduce((acc, { prop, value, isArray, checked }) => {
const val = checked ? (isArray ? value.join(',') : value) : null
acc[prop] = val
return acc
}, {})
// qc flags
Object.values(QcFlagOptions).forEach((v) => {
v.forEach((item) => {
this.formVal[item.prop] = null
})
})
const { station, nuclide, qualifier, condition, identifyNuclides } = this.formVal
const params = {
...this.formVal,
nuclide: undefined,
station: undefined,
condition: undefined,
spectralQualifier: qualifier,
conditions: condition,
stations: station.join(','),
nuclides: nuclide.join(','),
identifyNuclides: identifyNuclides.join(','),
...qcFlags,
}
if (this.isAdd) {
const { success } = await postAction('/alarmAnalysisRule/add', params)
if (success) {
this.$refs.form.resetFields()
this.visible = false
this.$message.success('success')
this.getAlarmRulesPage()
} else {
httpAction('/alarmAnalysisRule/edit', { ...params, id: this.currId }, 'put').then((res) => {
if (res.success) {
this.visible = false
this.form.resetFields()
this.$message.success('success')
this.getAlarmRulesPage()
} else {
this.$message.warning('This operation fails. Contact your system administrator')
}
})
this.$message.warning('This operation fails. Contact your system administrator')
}
} else {
const { success } = await httpAction('/alarmAnalysisRule/edit', { ...params, id: this.currId }, 'put')
if (success) {
this.$refs.form.resetFields()
this.visible = false
this.$message.success('success')
this.getAlarmRulesPage()
} else {
this.$message.warning('This operation fails. Contact your system administrator')
}
}
})
} catch (error) {
console.log(error)
}
},
onCancel() {
this.form.resetFields()
this.$refs.form.resetFields()
this.visible = false
},
},
@ -779,4 +957,28 @@ export default {
}
}
}
.qc-item {
display: flex;
align-items: center;
gap: 8px;
span {
flex-shrink: 0;
}
}
.flex {
display: flex;
align-items: center;
gap: 10px;
}
.avg-cycle {
::v-deep {
.ant-input {
padding-right: 42px;
}
}
}
</style>

View File

@ -18,6 +18,7 @@
style="width: 180px"
v-model="queryParams.stationId"
placeholder="select..."
show-search
:filter-option="filterOption"
show-arrow
allowClear

File diff suppressed because it is too large Load Diff

View File

@ -73,7 +73,6 @@
ref="RoiChartRef"
:ROILists="ROILists"
:ROIAnalyzeLists="ROIAnalyzeLists"
:gammaEnergyData="gammaEnergyData"
/>
</beta-gamma-chart-container>
<!-- 底部显示 -->
@ -281,14 +280,30 @@ export default {
data: analyseList,
})
// XeData
updateSampleData({
inputFileName,
key: 'XeData',
data: result.XeData,
})
// XeData
this.resultDisplay = result.XeData
const { betaEnergyData, gammaEnergyData } = result
// betaEnergyData gammaEnergyData
this.betaEnergyData = betaEnergyData
this.gammaEnergyData = gammaEnergyData
// sample betaEnergyData gammaEnergyData
updateSampleData({
inputFileName,
key: 'sample.betaEnergyData',
data: betaEnergyData,
})
updateSampleData({
inputFileName,
key: 'sample.gammaEnergyData',
data: gammaEnergyData,
})
} else {
const arr = message.split('\n')
this.$warning({
@ -562,7 +577,7 @@ export default {
//
handleRefresh(data, index) {
this.ROIAnalyzeLists[index] = this.$set(this.ROIAnalyzeLists, index, data)
this.$set(this.ROIAnalyzeLists, index, data)
const { inputFileName } = this.sample
updateSampleData({
@ -585,7 +600,7 @@ export default {
BaseCtrls,
} = data
this.ROIAnalyzeLists[index] = this.$set(this.ROIAnalyzeLists, index, {
this.$set(this.ROIAnalyzeLists, index, {
allData,
peak,
shadowChannelChart,

View File

@ -337,6 +337,7 @@ export default {
})
} else {
this.$message.error(message)
this.isLoading = false
}
} catch (error) {
console.error(error)

View File

@ -228,7 +228,7 @@ import { updateBaseLine } from '@/utils/WasmHelper'
import RectList from './components/RectList.vue'
import { isNullOrUndefined } from '@/utils/util'
import { findNearPeak, getLineData, transformPointListData } from '@/utils/sampleHelper'
import { getSampleData } from '@/utils/SampleStore'
import { getSampleData, updateSampleData } from '@/utils/SampleStore'
//
const initialOption = {
@ -1536,6 +1536,7 @@ export default {
nuclideName: possibleNuclide,
fileName,
list_identify: nuclides,
energyTolerance: this.model.tolerance
})
if (success) {
nuclides.push(possibleNuclide)
@ -1573,6 +1574,13 @@ export default {
const { identify, table } = result
this.selectedTableItem.nuclides = identify
this.list = table
//
/** fix解决删除核素再次打开弹窗还能显示被删除的核素问题 20241128:xiao */
updateSampleData({
inputFileName: fileName,
key: 'peak',
data: table,
})
} else {
this.$message.error(message)
}

View File

@ -668,9 +668,11 @@ export default {
oldScatterSeries,
newCToE,
newEToC,
tableWidgets,
} = res.result
this.c2e = CToE
this.e2c = EToC
this.list = tableWidgets
this.oldScatterSeries = oldScatterSeries
this.count = oldScatterSeries.length
@ -695,6 +697,11 @@ export default {
this.oldChartOption = cloneDeep(this.figureChartOption)
this.figureChartOption.series[1].markPoint.data = tableWidgets.map((item) => ({
xAxis: item.channel,
yAxis: item.energy,
}))
// reanalyzefittingReanalyze 20231101xiao
// todo fitting
if (this.getCache('CALIBRATION_BETA_' + this.newSampleData.inputFileName)) {

View File

@ -1603,6 +1603,7 @@ export default {
fileName,
list_identify: nuclides,
gammaRoiNum: this.currROIIndex + 1,
energyTolerance: this.model.tolerance
})
if (success) {
nuclides.push(possibleNuclide)

View File

@ -122,6 +122,7 @@ export default {
open(seriesData, energys) {
this.option.series.data = (seriesData || []).map(({ x, y }) => [x, y])
this.energys = energys || []
this.axisInfo = cloneDeep(initialAxisInfo)
this.visible = true
},

View File

@ -122,6 +122,7 @@ export default {
open(seriesData, energys) {
this.option.series.data = (seriesData || []).map(({ x, y }) => [x, y])
this.energys = energys || []
this.axisInfo = cloneDeep(initialAxisInfo)
this.visible = true
},

View File

@ -5,7 +5,6 @@
:key="index"
:title="`ROI${index + 1}`"
:title-color="RoiTitleColors[index]"
:energys="gammaEnergyData"
:roi-list="ROILists[index]"
:analyze-result="ROIAnalyzeLists[index]"
@toggle="handleToggle"
@ -34,10 +33,6 @@ export default {
type: Array,
default: () => [],
},
gammaEnergyData: {
type: Array,
default: () => [],
},
},
data() {
this.RoiTitleColors = RoiTitleColors

View File

@ -132,10 +132,6 @@ export default {
props: {
title: String,
titleColor: String,
energys: {
type: Array,
default: () => [],
},
roiList: {
type: Array,
default: () => [],
@ -191,14 +187,24 @@ export default {
this.$bus.$off('SelfStationBetaSpectrumChange', this.handleLimitItemChange)
},
methods: {
/**
* 根据channel获取energy
* @param {number} channel
*/
getEnergyByChannel(channel) {
const energyItem = this.allEnergy ? this.allEnergy[channel - 1] : null
return energyItem ? energyItem.x : 0
},
handleTooltipFormat(params) {
const [xAxis, count] = params[0].value
const channel = Math.round(xAxis)
const channelData = this.channelData.all && this.channelData.all.pointlist[channel]
const energy = this.getEnergyByChannel(channel)
this.axisInfo = {
channel,
count: channelData ? channelData.y : count,
energy: (this.energys[channel] || 0).toFixed(3),
energy: energy.toFixed(2),
}
},
@ -323,6 +329,9 @@ export default {
baseLineCP: shapeChannelData,
}
const allEnergy = this.getLineData(allData, 'Energy', 'energy')
this.allEnergy = allEnergy.pointlist
// Spectrum Line
this.setSeriesData(
this.option.series,

View File

@ -1109,6 +1109,22 @@ export default {
//
handleHelp() {
let docPath = null
let apiBaseUrl = window._CONFIG['onlinePreviewDomainURL'] || "/jeecg-boot";
if(this.isGamma) {
docPath = `/armd-help/Gamma.pdf`;
} else if (this.isBeta) {
docPath = `/armd-help/Self-Beta-Gamma.pdf`;
} else if(this.isBetaGamma) {
docPath = `/armd-help/Beta-Gamma.pdf`;
}
if(!docPath) {
this.$message.warning('Please load an spectrum first!')
return ;
}
window.open(apiBaseUrl + docPath, '_blank');
console.log('%c [ handleHelp ]-221', 'font-size:13px; background:pink; color:#bf2c9f;')
},

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,7 @@ export const scacLineSeries = buildLineSeries('ScacLine', [], '#fff', {
export const baseLineCtrlPoint = {
name: 'BaseLine_Ctrl_Point',
type: 'scatter',
symbolSize: 10,
data: [],
emphasis: {
disabled: true

View File

@ -228,6 +228,80 @@ export default {
key: 'phdMetSoh'
}
],
[MarkerType.GroudMonitoringStation]: [
{
label: 'STATIONCODE',
key: 'stationCode'
},
{
label: 'STATIONID',
key: 'stationId'
},
{
label: 'COUNTRYCODE',
key: 'countryCode'
},
{
label: 'DATEBEGIN',
key: 'dateBegin'
},
{
label: 'DATEEND',
key: 'dateEnd'
},
{
label: 'DESCRIPTION',
key: 'description'
},
{
label: 'ELEVATION',
key: 'elevation'
},
{
label: 'LATITUDE',
key: 'lat'
},
{
label: 'LONGITUDE',
key: 'lon'
},
{
label: 'MODDATE',
key: 'moddate'
},
{
label: 'STATUS',
key: 'status'
},
{
label: 'TYPE',
key: 'type'
},
{
label: 'USED',
key: 'used'
},
{
label: 'PHD',
key: 'phd'
},
{
label: 'PHDF',
key: 'phdf'
},
{
label: 'MET',
key: 'met'
},
{
label: 'SOH',
key: 'soh'
},
{
label: 'PHDF+MET+SOH',
key: 'phdMetSoh'
}
],
[MarkerType.NRL]: [
{
label: 'STATIONCODE',

View File

@ -115,7 +115,19 @@
<!-- 增加/编辑排班弹窗 -->
<custom-modal :title="isAdd ? 'Add' : 'Edit'" :width="845" v-model="visible" :okHandler="submit" destroy-on-close>
<a-spin :spinning="isGettingDetail">
<div style=" margin: 0 auto;display: flex; width: 672px;">
</div>
<div class="account-assign">
<div class="scheduling-date">
<label>Task Date</label>
<a-range-picker
dropdownClassName="asd"
:default-value="[moment(startTime), moment(endTime)]"
@change="onRangeDateChange"
:allowClear="false"
:style="{width:'200px'}"
/>
</div>
<div class="search">
<!-- 穿梭框左上方搜索 -->
<div class="station-search">
@ -252,7 +264,10 @@ export default {
checkedAccount: '', // 穿
rightAccountChildSelectedKeys: [], // 穿
rightAccountChildExpandedKeys: [], // 穿
startTime: moment().format('YYYY-MM-DD'),
endTime: moment().format('YYYY-MM-DD'),
isChanging: false,
dragItem: null,
fromUserId: '',
@ -299,6 +314,7 @@ export default {
this.getStationList()
},
methods: {
moment,
//
async getList() {
this.spinningMain = true
@ -538,11 +554,17 @@ export default {
successMsg = 'Add Success'
failMsg = 'Add Fail'
}
const params = []
if(!this.startTime || !this.endTime) {
this.$message.warn('Please select a date!')
return;
}
const tasks = []
this.accountTreeData.forEach((accountTreeItem) => {
if (accountTreeItem.children.length) {
params.push({
schedulingDate: this.currentDate.format('YYYY-MM-DD HH:mm:ss'),
tasks.push({
// fix: 20241112
// schedulingDate: this.currentDate.format('YYYY-MM-DD HH:mm:ss'),
stationList: accountTreeItem.children.map((child) => {
return {
stationId: child.key,
@ -552,6 +574,11 @@ export default {
})
}
})
const params = {
startTime: this.startTime,
endTime: this.endTime,
sysTasks: tasks
}
const { success } = await method(url, params)
if (success) {
this.$message.success(successMsg)
@ -668,6 +695,11 @@ export default {
}
this.targetKeys = targetKeys
},
onRangeDateChange(date, dateString) {
// this.timer = 0
this.startTime = dateString[0]
this.endTime = dateString[1]
},
},
computed: {
treeData() {
@ -935,23 +967,31 @@ export default {
width: 672px;
margin: 0 auto;
.scheduling-date{
margin-bottom: 15px;
label {
width: 81px;
}
}
.scheduling-date,
.station-search,
.account-search {
width: 282px;
display: flex;
align-items: center;
label {
color: #5b9cba;
font-size: 16px;
flex-shrink: 0;
margin-right: 10px;
user-select: none;
}
}
.search {
display: flex;
justify-content: space-between;
.station-search,
.account-search {
width: 282px;
display: flex;
align-items: center;
label {
color: #5b9cba;
font-size: 16px;
flex-shrink: 0;
margin-right: 10px;
user-select: none;
}
}
}
.ant-transfer {