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

This commit is contained in:
Xu Zhimeng 2025-01-10 14:47:44 +08:00
commit 5e563ac93d
3 changed files with 89 additions and 9 deletions

View File

@ -0,0 +1,71 @@
<template>
<a-select v-bind="$attrs" v-model="innerValue" mode="multiple" allow-clear :options="options">
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
<div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" />
<a-divider style="margin: 4px 0" />
<div style="padding: 4px 12px; cursor: pointer" @mousedown="(e) => e.preventDefault()">
<a-checkbox v-model="isSelectAll" :disabled="!options.length">
<span @click.prevent="isSelectAll = !isSelectAll"> ALL </span>
</a-checkbox>
</div>
</div>
</a-select>
</template>
<script>
export default {
props: {
value: {
type: [Array, Number],
},
options: {
type: Array,
required: true,
},
},
components: {
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
},
},
computed: {
innerValue: {
set(val) {
this.$emit('input', val)
},
get() {
return this.value
},
},
isSelectAll: {
set(val) {
if (val) {
this.$emit(
'input',
this.options.map((item) => item.value)
)
} else {
this.$emit('input', [])
}
},
get() {
return !!this.options.length && this.value.length === this.options.length
},
},
},
}
</script>
<style lang="less" scoped>
.ant-select {
width: 100%;
}
.ant-select-dropdown-content {
position: relative;
background: #03353f;
}
</style>

View File

@ -547,6 +547,8 @@ input[type='number']::-webkit-outer-spin-button {
.ant-select-dropdown-content {
border: 1px solid @borderColor;
overflow: visible !important;
transform: translateZ(0);
&::before {
position: absolute;
top: -6px;

View File

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