干燥机配套车间生产管理系统/云平台服务端
baoshiwei
2024-05-27 fa3ac93010bea3805438ee3ab0a182bfbf7423da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
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的list
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: '第三方APP',
    //   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),
    },
]