| | |
| | | > |
| | | <ProFormText placeholder="请输入手机号" v-model.trim="form.phoneNumber"></ProFormText> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 label="渠道:" prop="channel" :check-rules="[{ message: '请输入渠道' }]"> |
| | | <ProFormText |
| | | placeholder="请输入渠道" |
| | | v-model.trim="form.channel" |
| | | :maxlength="30" |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | v-if="!isEdit" |
| | | label="密码:" |
| | | prop="password" |
| | | :check-rules="[{ message: '请输入密码', required: !form.id }]" |
| | |
| | | v-model.trim="form.password" |
| | | :maxlength="30" |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 label="角色:" prop="roleName" :check-rules="[{ message: '请选择角色' }]"> |
| | | <ProFormRadio |
| | | v-model.trim="form.roleName" |
| | | :value-enum="allRoleList" |
| | | :button-style="false" |
| | | enum-label-key="name" |
| | | enum-value-key="realName" |
| | | :disabled="!!form.id" |
| | | /> |
| | | </ProFormItemV2> |
| | | |
| | | <ProFormItemV2 label="备注:" prop="remark"> |
| | |
| | | ProForm, |
| | | ProFormItemV2, |
| | | ProFormText, |
| | | ProFormRadio, |
| | | ProFormTextArea, |
| | | ProFormCheckbox, |
| | | } from '@bole-core/components'; |
| | | import { BooleanOptions } from '@/constants'; |
| | | import { useAllRoleList } from '@/hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'AddOrEditAccountDialog', |
| | |
| | | userName: string; |
| | | name: string; |
| | | phoneNumber: string; |
| | | channel: string; |
| | | password: string; |
| | | roleName: string; |
| | | remark: string; |
| | | isSendMessage?: boolean; |
| | | sendClaimMessage?: boolean; |
| | | sendBillExpireMessage?: boolean; |
| | | }; |
| | | |
| | | const form = defineModel<Form>('form'); |
| | | |
| | | const isEdit = computed(() => !!form.value?.id); |
| | | const emit = defineEmits<{ |
| | | (e: 'onConfirm'): void; |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | const { allRoleList } = useAllRoleList(); |
| | | |
| | | function onDialogClose() { |
| | | if (!dialogForm.value) return; |