@@ -50,9 +50,10 @@ export function useColumns(
50
50
field : 'seq' ,
51
51
title : $t ( 'common.table.id' ) ,
52
52
type : 'seq' ,
53
+ fixed : 'left' ,
53
54
width : 50 ,
54
55
} ,
55
- { field : 'username' , title : '用户名' , width : 100 } ,
56
+ { field : 'username' , title : '用户名' , fixed : 'left' , width : 100 } ,
56
57
{ field : 'nickname' , title : '昵称' , width : 100 } ,
57
58
{
58
59
field : 'avatar' ,
@@ -73,7 +74,6 @@ export function useColumns(
73
74
showOverflow : 'ellipsis' ,
74
75
slots : { default : 'roles' } ,
75
76
} ,
76
- { field : 'email' , title : '邮箱' , width : 150 } ,
77
77
{
78
78
field : 'phone' ,
79
79
title : '手机号' ,
@@ -82,6 +82,14 @@ export function useColumns(
82
82
return cellValue || '暂无' ;
83
83
} ,
84
84
} ,
85
+ {
86
+ field : 'email' ,
87
+ title : '邮箱' ,
88
+ width : 150 ,
89
+ formatter ( { cellValue } ) {
90
+ return cellValue || '暂无' ;
91
+ } ,
92
+ } ,
85
93
{
86
94
field : 'status' ,
87
95
title : '状态' ,
@@ -184,19 +192,6 @@ export function useColumns(
184
192
185
193
export function useEditSchema ( roleSelectOptions : any ) : VbenFormSchema [ ] {
186
194
return [
187
- {
188
- component : 'ApiTreeSelect' ,
189
- componentProps : {
190
- allowClear : true ,
191
- api : getSysDeptTreeApi ,
192
- class : 'w-full' ,
193
- labelField : 'name' ,
194
- valueField : 'id' ,
195
- childrenField : 'children' ,
196
- } ,
197
- fieldName : 'dept_id' ,
198
- label : '部门' ,
199
- } ,
200
195
{
201
196
component : 'Input' ,
202
197
fieldName : 'username' ,
@@ -214,6 +209,29 @@ export function useEditSchema(roleSelectOptions: any): VbenFormSchema[] {
214
209
fieldName : 'avatar' ,
215
210
label : '头像地址' ,
216
211
} ,
212
+ {
213
+ component : 'Input' ,
214
+ fieldName : 'phone' ,
215
+ label : '手机号码' ,
216
+ } ,
217
+ {
218
+ component : 'Input' ,
219
+ fieldName : 'email' ,
220
+ label : '邮箱' ,
221
+ } ,
222
+ {
223
+ component : 'ApiTreeSelect' ,
224
+ componentProps : {
225
+ allowClear : true ,
226
+ api : getSysDeptTreeApi ,
227
+ class : 'w-full' ,
228
+ labelField : 'name' ,
229
+ valueField : 'id' ,
230
+ childrenField : 'children' ,
231
+ } ,
232
+ fieldName : 'dept_id' ,
233
+ label : '所属部门' ,
234
+ } ,
217
235
{
218
236
component : 'Select' ,
219
237
componentProps : {
@@ -236,20 +254,6 @@ export function useEditSchema(roleSelectOptions: any): VbenFormSchema[] {
236
254
237
255
export function useAddSchema ( roleSelectOptions : any ) : VbenFormSchema [ ] {
238
256
return [
239
- {
240
- component : 'ApiTreeSelect' ,
241
- componentProps : {
242
- allowClear : true ,
243
- api : getSysDeptTreeApi ,
244
- class : 'w-full' ,
245
- labelField : 'name' ,
246
- valueField : 'id' ,
247
- childrenField : 'children' ,
248
- } ,
249
- fieldName : 'dept_id' ,
250
- label : '部门' ,
251
- rules : 'required' ,
252
- } ,
253
257
{
254
258
component : 'Input' ,
255
259
fieldName : 'username' ,
@@ -267,6 +271,30 @@ export function useAddSchema(roleSelectOptions: any): VbenFormSchema[] {
267
271
label : '密码' ,
268
272
rules : 'required' ,
269
273
} ,
274
+ {
275
+ component : 'Input' ,
276
+ fieldName : 'phone' ,
277
+ label : '手机号码' ,
278
+ } ,
279
+ {
280
+ component : 'Input' ,
281
+ fieldName : 'email' ,
282
+ label : '邮箱' ,
283
+ } ,
284
+ {
285
+ component : 'ApiTreeSelect' ,
286
+ componentProps : {
287
+ allowClear : true ,
288
+ api : getSysDeptTreeApi ,
289
+ class : 'w-full' ,
290
+ labelField : 'name' ,
291
+ valueField : 'id' ,
292
+ childrenField : 'children' ,
293
+ } ,
294
+ fieldName : 'dept_id' ,
295
+ label : '所属部门' ,
296
+ rules : 'required' ,
297
+ } ,
270
298
{
271
299
component : 'Select' ,
272
300
componentProps : {
0 commit comments