From fa3ac93010bea3805438ee3ab0a182bfbf7423da Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期一, 27 五月 2024 16:19:31 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/system/usersetting/UserSetting.data.ts | 145 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 145 insertions(+), 0 deletions(-) diff --git a/src/views/system/usersetting/UserSetting.data.ts b/src/views/system/usersetting/UserSetting.data.ts new file mode 100644 index 0000000..f0c83f4 --- /dev/null +++ b/src/views/system/usersetting/UserSetting.data.ts @@ -0,0 +1,145 @@ +import { FormSchema } from '/@/components/Form/index' +import { rules } from '/@/utils/helper/validator' + +export interface ListItem { + key: string + title: string + description: string + extra?: string + avatar?: string + color?: string +} + +// tab鐨刲ist +export const settingList = [ + { + key: '1', + name: '涓汉淇℃伅', + component: 'BaseSetting', + icon: 'ant-design:user-outlined', + }, + // { + // key: '2', + // name: '鎴戠殑绉熸埛', + // component: 'TenantSetting', + // icon:'ant-design:team-outlined' + // }, + // { + // key: '3', + // name: '璐﹀彿瀹夊叏', + // component: 'AccountSetting', + // icon:'ant-design:lock-outlined' + // }, + // { + // key: '4', + // name: '绗笁鏂笰PP', + // component: 'WeChatDingSetting', + // icon: 'ant-design:contacts-outlined', + // }, +] + +/** + * 鐢ㄦ埛琛ㄥ崟 + */ +export const formSchema: FormSchema[] = [ + { + field: 'realname', + component: 'Input', + label: '濮撳悕', + colProps: { span: 24 }, + required: true, + }, + { + field: 'birthday', + component: 'DatePicker', + label: '鐢熸棩', + colProps: { span: 24 }, + componentProps: { + showTime: false, + valueFormat: 'YYYY-MM-DD', + getPopupContainer: () => document.body, + }, + }, + { + field: 'sex', + component: 'RadioGroup', + label: '鎬у埆', + colProps: { span: 24 }, + componentProps: { + options: [ + { + label: '鐢�', + value: 1, + }, + { + label: '濂�', + value: 2, + }, + ], + }, + }, + { + field: 'relTenantIds', + component: 'JDictSelectTag', + label: '绉熸埛', + colProps: { span: 24 }, + componentProps: { + mode: 'multiple', + dictCode: 'sys_tenant,name,id', + disabled: true, + }, + }, + { + field: 'post', + component: 'JDictSelectTag', + label: '鑱屼綅', + colProps: { span: 24 }, + componentProps: { + mode: 'multiple', + dictCode: 'sys_position,name,code', + disabled: true, + }, + }, + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +] + +//瀵嗙爜寮圭獥 +export const formPasswordSchema: FormSchema[] = [ + { + label: '鐢ㄦ埛璐﹀彿', + field: 'username', + component: 'Input', + componentProps: { readOnly: true }, + }, + { + label: '鏃у瘑鐮�', + field: 'oldpassword', + component: 'InputPassword', + required: true, + }, + { + label: '鏂板瘑鐮�', + field: 'password', + component: 'StrengthMeter', + componentProps: { + placeholder: '璇疯緭鍏ユ柊瀵嗙爜', + }, + rules: [ + { + required: true, + message: '璇疯緭鍏ユ柊瀵嗙爜', + }, + ], + }, + { + label: '纭鏂板瘑鐮�', + field: 'confirmpassword', + component: 'InputPassword', + dynamicRules: ({ values }) => rules.confirmPassword(values, true), + }, +] -- Gitblit v1.9.3