feat: 修改所有选择用户名 /邮箱的组件

This commit is contained in:
2026-01-07 11:50:02 +08:00
parent 6cd54cda18
commit b9112a5606
11 changed files with 84 additions and 151 deletions

View File

@@ -48,16 +48,7 @@
</a-select>
</a-form-item>
<a-form-item label="Admin Account">
<!-- <a-select
v-model:value="searchForm.adminAccId"
allow-clear
show-search
:filter-option="filterOption"
placeholder="Select Account"
style="width: 180px"
:options="allUserList"
></a-select> -->
<SelectUser v-model="testuser" />
<SelectUser v-model="searchForm.adminAccId" labelKey="email" />
</a-form-item>
<a-form-item label="Status">
<a-select
@@ -71,12 +62,12 @@
</a-form-item>
<a-form-item label="Country or Region">
<a-select
v-model:value="searchForm.country"
v-model:value="searchForm.countryOrRegion"
:allowClear="true"
show-search
style="width: 250px"
:filter-option="filterOption"
placeholder="Select Item..."
placeholder="Select the country or region"
max-tag-count="responsive"
:options="countryList"
/>
@@ -127,9 +118,6 @@
{{ record.status }}
</a-tag>
</template>
<template v-if="column.key === 'adminAccId'">
{{ allUserList.find(item => item.value === record.adminAccId)?.label }}
</template>
<template v-else-if="column.key === 'actions'">
<a-space>
@@ -239,19 +227,26 @@
</div>
<div class="admin_state_item">
<span>
Admin Account:
Country Or Region:
<span>*</span>
</span>
<a-select
v-model:value="formState.adminAccId"
placeholder="Select the admin account"
v-model:value="formState.countryOrRegion"
placeholder="Select the country or region"
allow-clear
show-search
:filter-option="filterOption"
style="width: 250px"
:options="allUserList"
:options="countryList"
></a-select>
</div>
<div class="admin_state_item">
<span>
Admin Account:
<span>*</span>
</span>
<SelectUser v-model="formState.adminAccId" labelKey="email" />
</div>
<div class="admin_state_item">
<span>
Start Time:
@@ -439,6 +434,7 @@ const searchForm = reactive({
adminAccId: undefined as string | undefined,
status: [] as PlanStatus[] | [],
id: '',
countryOrRegion: null,
page: 1,
size: 10,
total: 0
@@ -461,7 +457,8 @@ const formState = reactive({
adminAccId: undefined as string | undefined,
creditLimit: null as number | null,
accountNum: null as number | null,
status: undefined as PlanStatus | undefined
status: undefined as PlanStatus | undefined,
countryOrRegion: null as string | null
})
const organizationModalVisible = ref(false)
@@ -607,6 +604,7 @@ const resetFormState = () => {
formState.creditLimit = null
formState.accountNum = null
formState.status = undefined
formState.countryOrRegion = null
}
const changePage = (pagination: any) => {
@@ -628,12 +626,10 @@ const handleReset = () => {
searchForm.adminAccId = undefined
searchForm.status = []
searchForm.id = ''
searchForm.countryOrRegion = ''
handleSearch()
}
const allUserList = computed(() => {
return store.state.adminPage.allUserList
})
const openCreate = () => {
modalTitle.value = 'New Subscription Plan'
isEditMode.value = false
@@ -971,7 +967,7 @@ const filterOption = (input: string, option: any) => {
}
.subscriptionPlan_modal {
.form_content{
.form_content {
width: 100%;
display: flex;
flex-wrap: wrap;