feat: 修改Nuclide为带全选的下拉菜单,修改Identify nuclides为非必填

This commit is contained in:
Xu Zhimeng 2025-01-10 14:17:38 +08:00
parent 4d4ae0f58d
commit d7cb283121
2 changed files with 16 additions and 10 deletions

View File

@ -18,7 +18,6 @@ export default {
props: { props: {
value: { value: {
type: [Array, Number], type: [Array, Number],
default: () => [],
}, },
options: { options: {
type: Array, type: Array,

View File

@ -214,7 +214,7 @@
prop="station" prop="station"
:rules="[{ required: true, message: 'Please select station!' }]" :rules="[{ required: true, message: 'Please select station!' }]"
> >
<a-select <!-- <a-select
class="form-select" class="form-select"
mode="multiple" mode="multiple"
placeholder="select..." placeholder="select..."
@ -224,7 +224,16 @@
v-model="formVal.station" v-model="formVal.station"
> >
<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> -->
<custom-select-with-all-checking
class="form-select"
placeholder="select..."
:options="filteredStationList"
:filter-option="filterOption"
:max-tag-count="1"
v-model="formVal.station"
>
</custom-select-with-all-checking>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
label="Nuclide" label="Nuclide"
@ -320,11 +329,7 @@
</dic-select> </dic-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item label="Identify nuclides" prop="identifyNuclides">
label="Identify nuclides"
prop="identifyNuclides"
:rules="[{ required: true, message: 'Please select Identify nuclides!' }]"
>
<a-select <a-select
class="form-select" class="form-select"
mode="multiple" mode="multiple"
@ -375,6 +380,7 @@ import { getAction, postAction, httpAction, deleteAction, putAction } from '@/ap
import DicSelect from '../../components/dicSelect.vue' import DicSelect from '../../components/dicSelect.vue'
import { MenuNameMap, QcFlagOptions, SampleMap, SampleTypeOptions } from './config' import { MenuNameMap, QcFlagOptions, SampleMap, SampleTypeOptions } from './config'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
import CustomSelectWithAllChecking from '@/components/CustomSelectWithAllChecking.vue'
const InitialFormVal = { const InitialFormVal = {
name: '', name: '',
@ -397,6 +403,7 @@ const InitialFormVal = {
export default { export default {
components: { components: {
DicSelect, DicSelect,
CustomSelectWithAllChecking,
}, },
data() { data() {
return { return {
@ -583,7 +590,7 @@ export default {
colTime: colTime ? (colTime.length > 1 ? colTime : colTime[0]) : null, colTime: colTime ? (colTime.length > 1 ? colTime : colTime[0]) : null,
xe133MDC: xe133MDC ? (xe133MDC.length > 1 ? xe133MDC : xe133MDC[0]) : null, xe133MDC: xe133MDC ? (xe133MDC.length > 1 ? xe133MDC : xe133MDC[0]) : null,
identifyNuclides: identifyNuclidesChecked, identifyNuclides: identifyNuclidesChecked || null,
station: stationChecked, station: stationChecked,
nuclide: nuclidesChecked, nuclide: nuclidesChecked,
@ -704,7 +711,7 @@ export default {
conditions: condition, conditions: condition,
stations: station.join(','), stations: station.join(','),
nuclides: nuclide.join(','), nuclides: nuclide.join(','),
identifyNuclides: identifyNuclides.join(','), identifyNuclides: identifyNuclides && identifyNuclides.length ? identifyNuclides.join(',') : null,
...qcFlags, ...qcFlags,
} }
if (this.isAdd) { if (this.isAdd) {