feat: 增加Avg cycle和Identify nuclides属性,Station增加搜索功能

This commit is contained in:
Xu Zhimeng 2025-01-03 17:56:56 +08:00
parent 8bb9016a42
commit 80b35bef86
2 changed files with 67 additions and 9 deletions

View File

@ -244,13 +244,34 @@
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" /> <img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select> </a-select>
</a-form-model-item> </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 <a-form-model-item
label="Coefficient" label="Coefficient"
prop="coefficient" prop="coefficient"
:rules="[{ required: true, message: 'Please input 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-input type="number" v-model="formVal.coefficient"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col>
</a-row>
<a-form-model-item v-if="formVal.sample" label="Qc Flags" style="margin-bottom: 0"> <a-form-model-item v-if="formVal.sample" label="Qc Flags" style="margin-bottom: 0">
<a-row :gutter="10"> <a-row :gutter="10">
<a-col <a-col
@ -298,6 +319,26 @@
> >
</dic-select> </dic-select>
</a-form-model-item> </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 <a-form-model-item
label="Contact Group" label="Contact Group"
prop="contactGroup" prop="contactGroup"
@ -348,7 +389,9 @@ const InitialFormVal = {
// Sample TypeSampleCoefficient // Sample TypeSampleCoefficient
sampleType: null, sampleType: null,
sample: null, sample: null,
days: null,
coefficient: 1.0, coefficient: 1.0,
identifyNuclides: undefined,
} }
export default { export default {
@ -647,8 +690,8 @@ export default {
if (this.isAdd) { if (this.isAdd) {
const { success } = await postAction('/alarmAnalysisRule/add', params) const { success } = await postAction('/alarmAnalysisRule/add', params)
if (success) { if (success) {
this.visible = false
this.$refs.form.resetFields() this.$refs.form.resetFields()
this.visible = false
this.$message.success('success') this.$message.success('success')
this.getAlarmRulesPage() this.getAlarmRulesPage()
} else { } else {
@ -657,8 +700,8 @@ export default {
} else { } else {
const { success } = await httpAction('/alarmAnalysisRule/edit', { ...params, id: this.currId }, 'put') const { success } = await httpAction('/alarmAnalysisRule/edit', { ...params, id: this.currId }, 'put')
if (success) { if (success) {
this.visible = false
this.$refs.form.resetFields() this.$refs.form.resetFields()
this.visible = false
this.$message.success('success') this.$message.success('success')
this.getAlarmRulesPage() this.getAlarmRulesPage()
} else { } else {
@ -904,4 +947,18 @@ export default {
flex-shrink: 0; flex-shrink: 0;
} }
} }
.flex {
display: flex;
align-items: center;
gap: 10px;
}
.avg-cycle {
::v-deep {
.ant-input {
padding-right: 42px;
}
}
}
</style> </style>

View File

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