bugfix: 编辑时无法回显用户邮箱
This commit is contained in:
@@ -245,7 +245,7 @@
|
||||
Admin Account:
|
||||
<span>*</span>
|
||||
</span>
|
||||
<SelectUser v-model="formState.adminAccId" labelKey="email" />
|
||||
<SelectUser ref="userRef" v-model="formState.adminAccId" labelKey="email" />
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>
|
||||
@@ -403,8 +403,6 @@ import type { FormInstance, Rule } from 'ant-design-vue/es/form'
|
||||
import { debounce } from 'lodash-es'
|
||||
import dayjs, { Dayjs } from 'dayjs'
|
||||
|
||||
const testuser = ref('')
|
||||
|
||||
type PlanStatus = 'PENDING' | 'ACTIVE' | 'EXPIRED'
|
||||
interface SubscriptionPlan {
|
||||
id: number
|
||||
@@ -425,6 +423,7 @@ const disabledDate = (current: Dayjs) => {
|
||||
}
|
||||
|
||||
const countryList = ref([])
|
||||
const userRef = ref(null)
|
||||
|
||||
const searchForm = reactive({
|
||||
name: '',
|
||||
@@ -667,7 +666,6 @@ const openEdit = (record: SubscriptionPlan) => {
|
||||
String(org.id) === String(record.organizationId)
|
||||
)
|
||||
if (!orgExists) {
|
||||
// 从表格数据中获取组织名称,如果存在则添加临时项
|
||||
const orgName = (record as any).organizationName
|
||||
if (orgName) {
|
||||
organizationOptions.value = [
|
||||
@@ -680,6 +678,16 @@ const openEdit = (record: SubscriptionPlan) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (record.adminAccId) {
|
||||
console.log(userRef.value)
|
||||
nextTick(() => {
|
||||
userRef.value.patchList({
|
||||
label: record.name,
|
||||
value: record.adminAccId,
|
||||
email: record.adminAccEmail
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
modalVisible.value = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user