From d9411a6692197efabcf132d61c051e51cb85e219 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 11 三月 2026 13:33:36 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/user/user.js | 3782 +++++-----------------------------------------------------
1 files changed, 374 insertions(+), 3,408 deletions(-)
diff --git a/src/main/webapp/static/js/user/user.js b/src/main/webapp/static/js/user/user.js
index c12cb8d..07b1c31 100644
--- a/src/main/webapp/static/js/user/user.js
+++ b/src/main/webapp/static/js/user/user.js
@@ -1,3440 +1,406 @@
(function () {
- var simpleEntityName = 'user';
- var entityName = 'User';
- var primaryKeyField = 'id';
- var fieldMeta = dedupeFieldMeta([
- {
- field: 'id',
- columnName: 'id',
- label: 'I銆�銆�D',
- tableProp: 'id',
- exportField: 'id',
- kind: 'text',
- valueType: 'number',
- required: true,
- primaryKey: true,
- sortable: true,
- textarea: false,
- minWidth: 90,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'username',
- columnName: 'username',
- label: '璐︺��銆�鍙�',
- tableProp: 'username',
- exportField: 'username',
- kind: 'text',
- valueType: 'string',
- required: true,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'password',
- columnName: 'password',
- label: '瀵嗐��銆�鐮�',
- tableProp: 'password',
- exportField: 'password',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'nickname',
- columnName: 'nickname',
- label: '鏄点��銆�绉�',
- tableProp: 'nickname',
- exportField: 'nickname',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'avatar',
- columnName: 'avatar',
- label: '澶淬��銆�鍍�',
- tableProp: 'avatar',
- exportField: 'avatar',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'code',
- columnName: 'code',
- label: '宸ャ��銆�鍙�',
- tableProp: 'code',
- exportField: 'code',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'sex',
- columnName: 'sex',
- label: '鎬с��銆�鍒�',
- tableProp: 'sex$',
- exportField: 'sex$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '0', label: '鏈煡' }, { rawValue: '1', label: '鐢�' }, { rawValue: '2', label: '濂�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'phone',
- columnName: 'phone',
- label: '鎵� 鏈� 鍙�',
- tableProp: 'phone',
- exportField: 'phone',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 116,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'email',
- columnName: 'email',
- label: '閭��銆�绠�',
- tableProp: 'email',
- exportField: 'email',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'emailVerified',
- columnName: 'email_verified',
- label: '閭楠岃瘉',
- tableProp: 'emailVerified$',
- exportField: 'emailVerified$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '0', label: '鍚�' }, { rawValue: '1', label: '鏄�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deptId',
- columnName: 'dept_id',
- label: '鎵�灞為儴闂�',
- tableProp: 'deptId$',
- exportField: 'deptId$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'dept',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'realName',
- columnName: 'real_name',
- label: '鐪熷疄濮撳悕',
- tableProp: 'realName',
- exportField: 'realName',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'idCard',
- columnName: 'id_card',
- label: '韬唤璇佸彿',
- tableProp: 'idCard',
- exportField: 'idCard',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'birthday',
- columnName: 'birthday',
- label: '鍑虹敓鏃ユ湡',
- tableProp: 'birthday',
- exportField: 'birthday',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'introduction',
- columnName: 'introduction',
- label: '涓汉绠�浠�',
- tableProp: 'introduction',
- exportField: 'introduction',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'hostId',
- columnName: 'host_id',
- label: '鎵�灞炴満鏋�',
- tableProp: 'hostId$',
- exportField: 'hostId$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'host',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'status',
- columnName: 'status',
- label: '鐘躲��銆�鎬�',
- tableProp: 'status$',
- exportField: 'status$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '1', label: '姝e父' }, { rawValue: '0', label: '绂佺敤' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deleted',
- columnName: 'deleted',
- label: '鏄惁鍒犻櫎',
- tableProp: 'deleted$',
- exportField: 'deleted$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '1', label: '鏄�' }, { rawValue: '0', label: '鍚�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'createTime',
- columnName: 'create_time',
- label: '娣诲姞鏃堕棿',
- tableProp: 'createTime$',
- exportField: 'createTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'createBy',
- columnName: 'create_by',
- label: '娣诲姞浜哄憳',
- tableProp: 'createBy$',
- exportField: 'createBy$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'user',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'updateTime',
- columnName: 'update_time',
- label: '淇敼鏃堕棿',
- tableProp: 'updateTime$',
- exportField: 'updateTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'updateBy',
- columnName: 'update_by',
- label: '淇敼浜哄憳',
- tableProp: 'updateBy$',
- exportField: 'updateBy$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'user',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'memo',
- columnName: 'memo',
- label: '澶囥��銆�娉�',
- tableProp: 'memo',
- exportField: 'memo',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: true,
- minWidth: 180,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'id',
- columnName: 'id',
- label: '*缂栥��銆�鍙�',
- tableProp: 'id',
- exportField: 'id',
- kind: 'text',
- valueType: 'number',
- required: true,
- primaryKey: true,
- sortable: true,
- textarea: false,
- minWidth: 90,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'hostId',
- columnName: 'host_id',
- label: '*鎺堟潈鍟嗘埛',
- tableProp: 'hostId',
- exportField: 'hostId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deptId',
- columnName: 'dept_id',
- label: '',
- tableProp: 'deptId',
- exportField: 'deptId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'roleId',
- columnName: 'role_id',
- label: '*瑙掋��銆�鑹�',
- tableProp: 'roleId',
- exportField: 'roleId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'username',
- columnName: 'username',
- label: '鐧诲綍璐︽埛',
- tableProp: 'username',
- exportField: 'username',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'nickname',
- columnName: 'nickname',
- label: '鐢ㄦ埛鍚�',
- tableProp: 'nickname',
- exportField: 'nickname',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'mobile',
- columnName: 'mobile',
- label: '鎵嬫満鍙�',
- tableProp: 'mobile',
- exportField: 'mobile',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'password',
- columnName: 'password',
- label: '瀵嗐��銆�鐮�',
- tableProp: 'password',
- exportField: 'password',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'avatar',
- columnName: 'avatar',
- label: '',
- tableProp: 'avatar',
- exportField: 'avatar',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'email',
- columnName: 'email',
- label: '閭',
- tableProp: 'email',
- exportField: 'email',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'sex',
- columnName: 'sex',
- label: '鎬у埆',
- tableProp: 'sex',
- exportField: 'sex',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'createTime',
- columnName: 'create_time',
- label: '娉ㄥ唽鏃堕棿',
- tableProp: 'createTime$',
- exportField: 'createTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'status',
- columnName: 'status',
- label: '鐘舵��',
- tableProp: 'status',
- exportField: 'status',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'id',
- columnName: 'id',
- label: '*缂栥��銆�鍙�',
- tableProp: 'id',
- exportField: 'id',
- kind: 'text',
- valueType: 'number',
- required: true,
- primaryKey: true,
- sortable: true,
- textarea: false,
- minWidth: 90,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'hostId',
- columnName: 'host_id',
- label: '*鎺堟潈鍟嗘埛',
- tableProp: 'hostId',
- exportField: 'hostId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deptId',
- columnName: 'dept_id',
- label: '',
- tableProp: 'deptId',
- exportField: 'deptId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'roleId',
- columnName: 'role_id',
- label: '*瑙掋��銆�鑹�',
- tableProp: 'roleId',
- exportField: 'roleId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'username',
- columnName: 'username',
- label: '鐧诲綍璐︽埛',
- tableProp: 'username',
- exportField: 'username',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'nickname',
- columnName: 'nickname',
- label: '鐢ㄦ埛鍚�',
- tableProp: 'nickname',
- exportField: 'nickname',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'mobile',
- columnName: 'mobile',
- label: '鎵嬫満鍙�',
- tableProp: 'mobile',
- exportField: 'mobile',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'password',
- columnName: 'password',
- label: '瀵嗐��銆�鐮�',
- tableProp: 'password',
- exportField: 'password',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'avatar',
- columnName: 'avatar',
- label: '',
- tableProp: 'avatar',
- exportField: 'avatar',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'email',
- columnName: 'email',
- label: '閭',
- tableProp: 'email',
- exportField: 'email',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'sex',
- columnName: 'sex',
- label: '鎬у埆',
- tableProp: 'sex',
- exportField: 'sex',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'createTime',
- columnName: 'create_time',
- label: '娉ㄥ唽鏃堕棿',
- tableProp: 'createTime$',
- exportField: 'createTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'status',
- columnName: 'status',
- label: '鐘舵��',
- tableProp: 'status',
- exportField: 'status',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'id',
- columnName: 'id',
- label: 'I銆�銆�D',
- tableProp: 'id',
- exportField: 'id',
- kind: 'text',
- valueType: 'number',
- required: true,
- primaryKey: true,
- sortable: true,
- textarea: false,
- minWidth: 90,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'username',
- columnName: 'username',
- label: '璐︺��銆�鍙�',
- tableProp: 'username',
- exportField: 'username',
- kind: 'text',
- valueType: 'string',
- required: true,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'password',
- columnName: 'password',
- label: '瀵嗐��銆�鐮�',
- tableProp: 'password',
- exportField: 'password',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'nickname',
- columnName: 'nickname',
- label: '鏄点��銆�绉�',
- tableProp: 'nickname',
- exportField: 'nickname',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'avatar',
- columnName: 'avatar',
- label: '澶淬��銆�鍍�',
- tableProp: 'avatar',
- exportField: 'avatar',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'code',
- columnName: 'code',
- label: '宸ャ��銆�鍙�',
- tableProp: 'code',
- exportField: 'code',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'sex',
- columnName: 'sex',
- label: '鎬с��銆�鍒�',
- tableProp: 'sex$',
- exportField: 'sex$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '0', label: '鏈煡' }, { rawValue: '1', label: '鐢�' }, { rawValue: '2', label: '濂�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'phone',
- columnName: 'phone',
- label: '鎵� 鏈� 鍙�',
- tableProp: 'phone',
- exportField: 'phone',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 116,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'email',
- columnName: 'email',
- label: '閭��銆�绠�',
- tableProp: 'email',
- exportField: 'email',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'emailVerified',
- columnName: 'email_verified',
- label: '閭楠岃瘉',
- tableProp: 'emailVerified$',
- exportField: 'emailVerified$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '0', label: '鍚�' }, { rawValue: '1', label: '鏄�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deptId',
- columnName: 'dept_id',
- label: '鎵�灞為儴闂�',
- tableProp: 'deptId$',
- exportField: 'deptId$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'dept',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'realName',
- columnName: 'real_name',
- label: '鐪熷疄濮撳悕',
- tableProp: 'realName',
- exportField: 'realName',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'idCard',
- columnName: 'id_card',
- label: '韬唤璇佸彿',
- tableProp: 'idCard',
- exportField: 'idCard',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'birthday',
- columnName: 'birthday',
- label: '鍑虹敓鏃ユ湡',
- tableProp: 'birthday',
- exportField: 'birthday',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'introduction',
- columnName: 'introduction',
- label: '涓汉绠�浠�',
- tableProp: 'introduction',
- exportField: 'introduction',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'tenantId',
- columnName: 'tenant_id',
- label: '鎵�灞炴満鏋�',
- tableProp: 'tenantId$',
- exportField: 'tenantId$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'host',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'status',
- columnName: 'status',
- label: '鐘躲��銆�鎬�',
- tableProp: 'status$',
- exportField: 'status$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '1', label: '姝e父' }, { rawValue: '0', label: '绂佺敤' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deleted',
- columnName: 'deleted',
- label: '鏄惁鍒犻櫎',
- tableProp: 'deleted$',
- exportField: 'deleted$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '1', label: '鏄�' }, { rawValue: '0', label: '鍚�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'createTime',
- columnName: 'create_time',
- label: '娣诲姞鏃堕棿',
- tableProp: 'createTime$',
- exportField: 'createTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'createBy',
- columnName: 'create_by',
- label: '娣诲姞浜哄憳',
- tableProp: 'createBy$',
- exportField: 'createBy$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'user',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'updateTime',
- columnName: 'update_time',
- label: '淇敼鏃堕棿',
- tableProp: 'updateTime$',
- exportField: 'updateTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'updateBy',
- columnName: 'update_by',
- label: '淇敼浜哄憳',
- tableProp: 'updateBy$',
- exportField: 'updateBy$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'user',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'memo',
- columnName: 'memo',
- label: '澶囥��銆�娉�',
- tableProp: 'memo',
- exportField: 'memo',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: true,
- minWidth: 180,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'id',
- columnName: 'id',
- label: '*缂栥��銆�鍙�',
- tableProp: 'id',
- exportField: 'id',
- kind: 'text',
- valueType: 'number',
- required: true,
- primaryKey: true,
- sortable: true,
- textarea: false,
- minWidth: 90,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'hostId',
- columnName: 'host_id',
- label: '*鎺堟潈鍟嗘埛',
- tableProp: 'hostId',
- exportField: 'hostId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deptId',
- columnName: 'dept_id',
- label: '',
- tableProp: 'deptId',
- exportField: 'deptId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'roleId',
- columnName: 'role_id',
- label: '*瑙掋��銆�鑹�',
- tableProp: 'roleId',
- exportField: 'roleId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'username',
- columnName: 'username',
- label: '鐧诲綍璐︽埛',
- tableProp: 'username',
- exportField: 'username',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'nickname',
- columnName: 'nickname',
- label: '鐢ㄦ埛鍚�',
- tableProp: 'nickname',
- exportField: 'nickname',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'mobile',
- columnName: 'mobile',
- label: '鎵嬫満鍙�',
- tableProp: 'mobile',
- exportField: 'mobile',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'password',
- columnName: 'password',
- label: '瀵嗐��銆�鐮�',
- tableProp: 'password',
- exportField: 'password',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'avatar',
- columnName: 'avatar',
- label: '',
- tableProp: 'avatar',
- exportField: 'avatar',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'email',
- columnName: 'email',
- label: '閭',
- tableProp: 'email',
- exportField: 'email',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'sex',
- columnName: 'sex',
- label: '鎬у埆',
- tableProp: 'sex',
- exportField: 'sex',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'createTime',
- columnName: 'create_time',
- label: '娉ㄥ唽鏃堕棿',
- tableProp: 'createTime$',
- exportField: 'createTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'status',
- columnName: 'status',
- label: '鐘舵��',
- tableProp: 'status',
- exportField: 'status',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'id',
- columnName: 'id',
- label: '*缂栥��銆�鍙�',
- tableProp: 'id',
- exportField: 'id',
- kind: 'text',
- valueType: 'number',
- required: true,
- primaryKey: true,
- sortable: true,
- textarea: false,
- minWidth: 90,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'hostId',
- columnName: 'host_id',
- label: '*鎺堟潈鍟嗘埛',
- tableProp: 'hostId',
- exportField: 'hostId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deptId',
- columnName: 'dept_id',
- label: '',
- tableProp: 'deptId',
- exportField: 'deptId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'roleId',
- columnName: 'role_id',
- label: '*瑙掋��銆�鑹�',
- tableProp: 'roleId',
- exportField: 'roleId',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'username',
- columnName: 'username',
- label: '鐧诲綍璐︽埛',
- tableProp: 'username',
- exportField: 'username',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'nickname',
- columnName: 'nickname',
- label: '鐢ㄦ埛鍚�',
- tableProp: 'nickname',
- exportField: 'nickname',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'mobile',
- columnName: 'mobile',
- label: '鎵嬫満鍙�',
- tableProp: 'mobile',
- exportField: 'mobile',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'password',
- columnName: 'password',
- label: '瀵嗐��銆�鐮�',
- tableProp: 'password',
- exportField: 'password',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'avatar',
- columnName: 'avatar',
- label: '',
- tableProp: 'avatar',
- exportField: 'avatar',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'email',
- columnName: 'email',
- label: '閭',
- tableProp: 'email',
- exportField: 'email',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'sex',
- columnName: 'sex',
- label: '鎬у埆',
- tableProp: 'sex',
- exportField: 'sex',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'createTime',
- columnName: 'create_time',
- label: '娉ㄥ唽鏃堕棿',
- tableProp: 'createTime$',
- exportField: 'createTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'status',
- columnName: 'status',
- label: '鐘舵��',
- tableProp: 'status',
- exportField: 'status',
- kind: 'text',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'id',
- columnName: 'id',
- label: 'I銆�銆�D',
- tableProp: 'id',
- exportField: 'id',
- kind: 'text',
- valueType: 'number',
- required: true,
- primaryKey: true,
- sortable: true,
- textarea: false,
- minWidth: 90,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'username',
- columnName: 'username',
- label: '璐︺��銆�鍙�',
- tableProp: 'username',
- exportField: 'username',
- kind: 'text',
- valueType: 'string',
- required: true,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'password',
- columnName: 'password',
- label: '瀵嗐��銆�鐮�',
- tableProp: 'password',
- exportField: 'password',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'nickname',
- columnName: 'nickname',
- label: '鏄点��銆�绉�',
- tableProp: 'nickname',
- exportField: 'nickname',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'avatar',
- columnName: 'avatar',
- label: '澶淬��銆�鍍�',
- tableProp: 'avatar',
- exportField: 'avatar',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'code',
- columnName: 'code',
- label: '宸ャ��銆�鍙�',
- tableProp: 'code',
- exportField: 'code',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'sex',
- columnName: 'sex',
- label: '鎬с��銆�鍒�',
- tableProp: 'sex$',
- exportField: 'sex$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '0', label: '鏈煡' }, { rawValue: '1', label: '鐢�' }, { rawValue: '2', label: '濂�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'phone',
- columnName: 'phone',
- label: '鎵� 鏈� 鍙�',
- tableProp: 'phone',
- exportField: 'phone',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 116,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'email',
- columnName: 'email',
- label: '閭��銆�绠�',
- tableProp: 'email',
- exportField: 'email',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'emailVerified',
- columnName: 'email_verified',
- label: '閭楠岃瘉',
- tableProp: 'emailVerified$',
- exportField: 'emailVerified$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '0', label: '鍚�' }, { rawValue: '1', label: '鏄�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deptId',
- columnName: 'dept_id',
- label: '鎵�灞為儴闂�',
- tableProp: 'deptId$',
- exportField: 'deptId$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'dept',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'realName',
- columnName: 'real_name',
- label: '鐪熷疄濮撳悕',
- tableProp: 'realName',
- exportField: 'realName',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'idCard',
- columnName: 'id_card',
- label: '韬唤璇佸彿',
- tableProp: 'idCard',
- exportField: 'idCard',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'birthday',
- columnName: 'birthday',
- label: '鍑虹敓鏃ユ湡',
- tableProp: 'birthday',
- exportField: 'birthday',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'introduction',
- columnName: 'introduction',
- label: '涓汉绠�浠�',
- tableProp: 'introduction',
- exportField: 'introduction',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'hostId',
- columnName: 'host_id',
- label: '鎵�灞炴満鏋�',
- tableProp: 'hostId$',
- exportField: 'hostId$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'host',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'status',
- columnName: 'status',
- label: '鐘躲��銆�鎬�',
- tableProp: 'status$',
- exportField: 'status$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '1', label: '姝e父' }, { rawValue: '0', label: '绂佺敤' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deleted',
- columnName: 'deleted',
- label: '鏄惁鍒犻櫎',
- tableProp: 'deleted$',
- exportField: 'deleted$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '1', label: '鏄�' }, { rawValue: '0', label: '鍚�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'createTime',
- columnName: 'create_time',
- label: '娣诲姞鏃堕棿',
- tableProp: 'createTime$',
- exportField: 'createTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'createBy',
- columnName: 'create_by',
- label: '娣诲姞浜哄憳',
- tableProp: 'createBy$',
- exportField: 'createBy$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'user',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'updateTime',
- columnName: 'update_time',
- label: '淇敼鏃堕棿',
- tableProp: 'updateTime$',
- exportField: 'updateTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'updateBy',
- columnName: 'update_by',
- label: '淇敼浜哄憳',
- tableProp: 'updateBy$',
- exportField: 'updateBy$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'user',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'memo',
- columnName: 'memo',
- label: '澶囥��銆�娉�',
- tableProp: 'memo',
- exportField: 'memo',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: true,
- minWidth: 180,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'id',
- columnName: 'id',
- label: 'I銆�銆�D',
- tableProp: 'id',
- exportField: 'id',
- kind: 'text',
- valueType: 'number',
- required: true,
- primaryKey: true,
- sortable: true,
- textarea: false,
- minWidth: 90,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'username',
- columnName: 'username',
- label: '璐︺��銆�鍙�',
- tableProp: 'username',
- exportField: 'username',
- kind: 'text',
- valueType: 'string',
- required: true,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'password',
- columnName: 'password',
- label: '瀵嗐��銆�鐮�',
- tableProp: 'password',
- exportField: 'password',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'nickname',
- columnName: 'nickname',
- label: '鏄点��銆�绉�',
- tableProp: 'nickname',
- exportField: 'nickname',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'avatar',
- columnName: 'avatar',
- label: '澶淬��銆�鍍�',
- tableProp: 'avatar',
- exportField: 'avatar',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'code',
- columnName: 'code',
- label: '宸ャ��銆�鍙�',
- tableProp: 'code',
- exportField: 'code',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'sex',
- columnName: 'sex',
- label: '鎬с��銆�鍒�',
- tableProp: 'sex$',
- exportField: 'sex$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '0', label: '鏈煡' }, { rawValue: '1', label: '鐢�' }, { rawValue: '2', label: '濂�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'phone',
- columnName: 'phone',
- label: '鎵� 鏈� 鍙�',
- tableProp: 'phone',
- exportField: 'phone',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 116,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'email',
- columnName: 'email',
- label: '閭��銆�绠�',
- tableProp: 'email',
- exportField: 'email',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'emailVerified',
- columnName: 'email_verified',
- label: '閭楠岃瘉',
- tableProp: 'emailVerified$',
- exportField: 'emailVerified$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '0', label: '鍚�' }, { rawValue: '1', label: '鏄�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deptId',
- columnName: 'dept_id',
- label: '鎵�灞為儴闂�',
- tableProp: 'deptId$',
- exportField: 'deptId$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'dept',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'realName',
- columnName: 'real_name',
- label: '鐪熷疄濮撳悕',
- tableProp: 'realName',
- exportField: 'realName',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'idCard',
- columnName: 'id_card',
- label: '韬唤璇佸彿',
- tableProp: 'idCard',
- exportField: 'idCard',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'birthday',
- columnName: 'birthday',
- label: '鍑虹敓鏃ユ湡',
- tableProp: 'birthday',
- exportField: 'birthday',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'introduction',
- columnName: 'introduction',
- label: '涓汉绠�浠�',
- tableProp: 'introduction',
- exportField: 'introduction',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'hostId',
- columnName: 'host_id',
- label: '鎵�灞炴満鏋�',
- tableProp: 'hostId$',
- exportField: 'hostId$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'host',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'status',
- columnName: 'status',
- label: '鐘躲��銆�鎬�',
- tableProp: 'status$',
- exportField: 'status$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '1', label: '姝e父' }, { rawValue: '0', label: '绂佺敤' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'deleted',
- columnName: 'deleted',
- label: '鏄惁鍒犻櫎',
- tableProp: 'deleted$',
- exportField: 'deleted$',
- kind: 'enum',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 120,
- enumOptions: [{ rawValue: '1', label: '鏄�' }, { rawValue: '0', label: '鍚�' }],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'createTime',
- columnName: 'create_time',
- label: '娣诲姞鏃堕棿',
- tableProp: 'createTime$',
- exportField: 'createTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'createBy',
- columnName: 'create_by',
- label: '娣诲姞浜哄憳',
- tableProp: 'createBy$',
- exportField: 'createBy$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'user',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'updateTime',
- columnName: 'update_time',
- label: '淇敼鏃堕棿',
- tableProp: 'updateTime$',
- exportField: 'updateTime$',
- kind: 'date',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- },
- {
- field: 'updateBy',
- columnName: 'update_by',
- label: '淇敼浜哄憳',
- tableProp: 'updateBy$',
- exportField: 'updateBy$',
- kind: 'foreign',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: 'user',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0'
- },
- {
- field: 'memo',
- columnName: 'memo',
- label: '澶囥��銆�娉�',
- tableProp: 'memo',
- exportField: 'memo',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: true,
- minWidth: 180,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N'
- }
-
- ]);
- fieldMeta.push({
- field: 'mfaAllow',
- columnName: 'mfa_allow',
- label: 'MFA鎺堟潈',
- tableProp: 'mfaAllow',
- exportField: 'mfaAllow$',
- kind: 'checkbox',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0',
- searchable: false
- });
- fieldMeta.push({
- field: 'mfaEnabled',
- columnName: 'mfa_enabled',
- label: 'MFA鍚敤',
- tableProp: 'mfaEnabled',
- exportField: 'mfaEnabled$',
- kind: 'checkbox',
- valueType: 'number',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 110,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: '1',
- checkboxInactiveRaw: '0',
- searchable: false,
- editable: false
- });
- fieldMeta.push({
- field: 'mfaBoundTime',
- columnName: 'mfa_bound_time',
- label: 'MFA缁戝畾鏃堕棿',
- tableProp: 'mfaBoundTime$',
- exportField: 'mfaBoundTime$',
- kind: 'text',
- valueType: 'string',
- required: false,
- primaryKey: false,
- sortable: false,
- textarea: false,
- minWidth: 168,
- enumOptions: [],
- foreignQuery: '',
- checkboxActiveRaw: 'Y',
- checkboxInactiveRaw: 'N',
- searchable: false,
- editable: false
- });
-
- function formatFieldLabel(field) {
- var raw = field && field.label ? String(field.label).trim() : '';
- if (raw) {
- return raw;
- }
- raw = field && field.columnName ? field.columnName : (field && field.field ? field.field : '');
- if (!raw) {
- return '';
- }
- raw = String(raw)
- .replace(/\$/g, '')
- .replace(/([a-z0-9])([A-Z])/g, '$1_$2')
- .replace(/_/g, ' ')
- .replace(/\s+/g, ' ')
- .trim();
- return raw.replace(/\b[a-z]/g, function (letter) {
- return letter.toUpperCase();
- });
- }
-
- function dedupeFieldMeta(list) {
- var result = [];
- var seen = {};
- (list || []).forEach(function (field) {
- if (!field || !field.field || seen[field.field]) {
- return;
- }
- field.label = formatFieldLabel(field);
- seen[field.field] = true;
- result.push(field);
- });
- return result;
- }
-
- function isEmptyValue(value) {
- return value === null || value === undefined || value === '';
- }
-
- function stringValue(value) {
- return isEmptyValue(value) ? '' : String(value);
- }
-
- function valueOrDash(value) {
- return isEmptyValue(value) ? '--' : value;
- }
-
- function normalizeOptionValue(field, rawValue) {
- if (rawValue === null || rawValue === undefined) {
- return null;
- }
- if (rawValue === '') {
- return '';
- }
- if (field && field.valueType === 'number') {
- var numberVal = Number(rawValue);
- return isNaN(numberVal) ? rawValue : numberVal;
- }
- return String(rawValue);
- }
-
- function isSearchableField(field) {
- return !!field && field.kind !== 'image' && !field.textarea && field.searchable !== false;
- }
-
- function isSortableField(field) {
- if (!field) {
- return false;
- }
- if (field.primaryKey) {
- return true;
- }
- return field.kind !== 'image' && !field.textarea && field.kind !== 'foreign';
- }
-
- function defaultFieldValue(field) {
- if (field.primaryKey) {
- return null;
- }
- if (field.kind === 'checkbox') {
- return normalizeOptionValue(field, field.checkboxInactiveRaw);
- }
- return '';
- }
-
- function defaultSearchFieldValue(field) {
- if (field.kind === 'date') {
- return [];
- }
- if (field.kind === 'enum' || field.kind === 'checkbox') {
- return null;
- }
- return '';
- }
-
- function createSearchDefaults() {
- var result = {
- condition: ''
- };
- fieldMeta.forEach(function (field) {
- if (!isSearchableField(field)) {
- return;
- }
- result[field.field] = defaultSearchFieldValue(field);
- });
- return result;
- }
-
- function createSearchDisplayDefaults() {
- var result = {};
- fieldMeta.forEach(function (field) {
- if (field.kind === 'foreign' && isSearchableField(field)) {
- result[field.field] = '';
- }
- });
- return result;
- }
-
- function createDefaultVisibleColumnKeys() {
- return fieldMeta.filter(function (field) {
- return field.visible !== false;
- }).map(function (field) {
- return field.field;
- });
- }
-
- function createFormDefaults() {
- var result = {};
- fieldMeta.forEach(function (field) {
- result[field.field] = defaultFieldValue(field);
- });
- return result;
- }
-
- function createDisplayDefaults() {
- var result = {};
- fieldMeta.forEach(function (field) {
- if (field.kind === 'foreign') {
- result[field.field] = '';
- }
- });
- return result;
- }
-
- function createFormRules() {
- var rules = {};
- fieldMeta.forEach(function (field) {
- if (field.primaryKey || !field.required) {
- return;
- }
- rules[field.field] = [{
- required: true,
- message: (field.kind === 'date' || field.kind === 'enum' ? '璇烽�夋嫨' : '璇疯緭鍏�') + field.label,
- trigger: (field.kind === 'date' || field.kind === 'enum') ? 'change' : 'blur'
- }];
- });
- return rules;
- }
-
- function getTableValue(row, field) {
- var prop = field.tableProp || field.field;
- if (row && !isEmptyValue(row[prop])) {
- return row[prop];
- }
- return row ? row[field.field] : '';
- }
-
- function isCheckboxChecked(row, field) {
- var value = row ? row[field.field] : null;
- var activeValue = normalizeOptionValue(field, field.checkboxActiveRaw);
- return String(value) === String(activeValue);
- }
-
- function exportCell(value) {
- return stringValue(value).replace(/\t/g, ' ').replace(/\r?\n/g, ' ');
- }
-
- function escapeHtml(value) {
- return exportCell(value)
- .replace(/&/g, '&')
- .replace(/</g, '<')
- .replace(/>/g, '>')
- .replace(/"/g, '"')
- .replace(/'/g, ''');
- }
-
- function buildPayload(form) {
- var payload = {};
- fieldMeta.forEach(function (field) {
- var value = form[field.field];
- if (field.primaryKey) {
- if (!isEmptyValue(value)) {
- payload[field.field] = value;
- }
- return;
- }
- if (field.kind === 'foreign' && isEmptyValue(value)) {
- value = null;
- }
- if (field.kind === 'enum' && value === '') {
- value = null;
- }
- if (field.kind === 'checkbox' && isEmptyValue(value)) {
- value = normalizeOptionValue(field, field.checkboxInactiveRaw);
- }
- if (field.valueType === 'number' && !isEmptyValue(value)) {
- value = Number(value);
- }
- if (field.valueType === 'number' && value === '') {
- value = null;
- }
- payload[field.field] = value;
- });
- return payload;
- }
-
- function fillFormFromRow(row, form, display) {
- fieldMeta.forEach(function (field) {
- if (field.primaryKey) {
- form[field.field] = row[field.field];
- return;
- }
- if (field.kind === 'date') {
- form[field.field] = row[field.tableProp] || row[field.field] || '';
- return;
- }
- if (field.kind === 'foreign') {
- form[field.field] = isEmptyValue(row[field.field]) ? '' : normalizeOptionValue(field, row[field.field]);
- if (display) {
- display[field.field] = row[field.tableProp] || (isEmptyValue(row[field.field]) ? '' : String(row[field.field]));
- }
- return;
- }
- if (field.kind === 'enum') {
- form[field.field] = isEmptyValue(row[field.field]) ? '' : normalizeOptionValue(field, row[field.field]);
- return;
- }
- if (field.kind === 'checkbox') {
- form[field.field] = isEmptyValue(row[field.field])
- ? normalizeOptionValue(field, field.checkboxInactiveRaw)
- : normalizeOptionValue(field, row[field.field]);
- return;
- }
- form[field.field] = isEmptyValue(row[field.field])
- ? ''
- : (field.valueType === 'number' ? String(row[field.field]) : row[field.field]);
- });
- }
-
- function resolveSearchParam(field) {
- if (field.kind === 'date' && field.columnName) {
- return field.columnName;
- }
- return field.field;
- }
-
- function createDownloadFile(filename, titles, rows) {
- var html = [
- '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">',
- '<head><meta charset="UTF-8"></head><body><table border="1"><thead><tr>',
- titles.map(function (title) {
- return '<th>' + escapeHtml(title) + '</th>';
- }).join(''),
- '</tr></thead><tbody>',
- (rows || []).map(function (row) {
- return '<tr>' + (row || []).map(function (value) {
- return '<td style="mso-number-format:\\@;">' + escapeHtml(value) + '</td>';
- }).join('') + '</tr>';
- }).join(''),
- '</tbody></table></body></html>'
- ].join('');
- var blob = new Blob(['\ufeff' + html], {
- type: 'application/vnd.ms-excel;charset=utf-8;'
- });
- var anchor = document.createElement('a');
- anchor.href = URL.createObjectURL(blob);
- anchor.download = filename;
- document.body.appendChild(anchor);
- anchor.click();
- setTimeout(function () {
- URL.revokeObjectURL(anchor.href);
- document.body.removeChild(anchor);
- }, 0);
- }
-
- function buildTimestamp() {
- var now = new Date();
- var pad = function (num) {
- return num < 10 ? '0' + num : String(num);
- };
- return now.getFullYear()
- + pad(now.getMonth() + 1)
- + pad(now.getDate())
- + '_'
- + pad(now.getHours())
- + pad(now.getMinutes())
- + pad(now.getSeconds());
- }
-
- function authHeaders() {
- return {
- token: localStorage.getItem('token')
- };
- }
-
function handleForbidden(res) {
- if (res && res.code === 403) {
- top.location.href = baseUrl + '/';
+ if (res && Number(res.code) === 403) {
+ top.location.href = baseUrl + "/";
return true;
}
return false;
}
- var sharedMethods = {
- authHeaders: authHeaders,
- handleForbidden: handleForbidden,
- valueOrDash: valueOrDash,
- stringValue: stringValue,
- getTableValue: getTableValue,
- isCheckboxChecked: isCheckboxChecked,
- normalizeOptionValue: normalizeOptionValue,
- isSortableField: isSortableField,
- getSuggestionFetcher: function (field) {
- var self = this;
- return function (queryString, callback) {
- self.fetchForeignSuggestions(field, queryString, callback);
+ new Vue({
+ el: "#app",
+ data: function () {
+ return {
+ loading: false,
+ dialogSubmitting: false,
+ resetSubmitting: false,
+ searchForm: {
+ username: "",
+ mobile: ""
+ },
+ tableData: [],
+ selection: [],
+ roles: [],
+ page: {
+ curr: 1,
+ limit: 15,
+ total: 0
+ },
+ dialog: {
+ visible: false,
+ mode: "create"
+ },
+ dialogForm: {
+ id: null,
+ username: "",
+ mobile: "",
+ password: "",
+ roleId: null,
+ status: 1,
+ mfaAllow: 0
+ },
+ resetDialog: {
+ visible: false,
+ userId: null,
+ username: "",
+ password: ""
+ },
+ dialogRules: {
+ username: [
+ { required: true, message: "璇疯緭鍏ョ櫥褰曡处鎴�", trigger: "blur" }
+ ],
+ mobile: [
+ { required: true, message: "璇疯緭鍏ヨ处鍙�", trigger: "blur" }
+ ],
+ roleId: [
+ { required: true, message: "璇烽�夋嫨瑙掕壊", trigger: "change" }
+ ],
+ password: [
+ {
+ validator: function (rule, value, callback) {
+ if (this.dialog.mode !== "create") {
+ callback();
+ return;
+ }
+ if (!value) {
+ callback(new Error("璇疯緭鍏ュ垵濮嬪瘑鐮�"));
+ return;
+ }
+ if (String(value).length < 4) {
+ callback(new Error("鍒濆瀵嗙爜涓嶈兘灏戜簬4浣�"));
+ return;
+ }
+ callback();
+ }.bind(this),
+ trigger: "blur"
+ }
+ ]
+ },
+ resetRules: {
+ password: [
+ { required: true, message: "璇疯緭鍏ユ柊瀵嗙爜", trigger: "blur" },
+ {
+ validator: function (rule, value, callback) {
+ if (String(value || "").length < 4) {
+ callback(new Error("鏂板瘑鐮佷笉鑳藉皯浜�4浣�"));
+ return;
+ }
+ callback();
+ },
+ trigger: "blur"
+ }
+ ]
+ }
};
},
- fetchForeignSuggestions: function (field, queryString, callback) {
- if (!field.foreignQuery || !queryString) {
- callback([]);
- return;
- }
- var self = this;
- $.ajax({
- url: baseUrl + '/' + field.foreignQuery + 'Query/auth',
- method: 'GET',
- headers: self.authHeaders(),
- data: { condition: queryString },
- success: function (res) {
- if (self.handleForbidden(res)) {
- return;
- }
- if (!res || res.code !== 200 || !Array.isArray(res.data)) {
- callback([]);
- return;
- }
- callback(res.data.map(function (item) {
- return {
- id: item.id,
- value: item.value
- };
- }));
- },
- error: function () {
- callback([]);
- }
- });
+ created: function () {
+ this.loadRoles();
+ this.loadTable();
},
- handleForeignSelect: function (field, item) {
- this.$set(this.displayTarget, field.field, item && item.value ? item.value : '');
- this.$set(this.formTarget, field.field, item && item.id !== undefined ? normalizeOptionValue(field, item.id) : '');
- },
- handleForeignInput: function (field) {
- if (!this.displayTarget || !this.formTarget) {
- return;
- }
- if (this.displayTarget[field.field]) {
- return;
- }
- this.$set(this.formTarget, field.field, '');
- }
- };
-
- if (document.getElementById('app')) {
- new Vue({
- el: '#app',
- data: function () {
- return {
- fieldMeta: fieldMeta,
- primaryKeyField: primaryKeyField,
- loading: false,
- exporting: false,
- tableData: [],
- selection: [],
- advancedFiltersVisible: false,
- allColumns: fieldMeta.slice(),
- visibleColumnKeys: createDefaultVisibleColumnKeys(),
- searchForm: createSearchDefaults(),
- searchDisplay: createSearchDisplayDefaults(),
- page: {
- curr: 1,
- limit: 15,
- total: 0
- },
- sortState: {
- prop: '',
- order: ''
- },
- dialog: {
- visible: false,
- mode: 'create',
- submitting: false
- },
- layoutTimer: null,
- tableResizeHandler: null,
- dialogForm: createFormDefaults(),
- dialogDisplay: createDisplayDefaults(),
- dialogRules: createFormRules()
- };
+ methods: {
+ authHeaders: function () {
+ return { token: localStorage.getItem("token") };
},
- computed: {
- searchableFields: function () {
- return this.fieldMeta.filter(function (field) {
- return isSearchableField(field);
- });
- },
- quickSearchableFields: function () {
- var result = [];
- this.searchableFields.forEach(function (field) {
- if (result.length >= 3 || field.kind === 'date') {
+ loadRoles: function () {
+ var vm = this;
+ $.ajax({
+ url: baseUrl + "/role/list/auth",
+ method: "GET",
+ headers: vm.authHeaders(),
+ data: {
+ curr: 1,
+ limit: 500
+ },
+ success: function (res) {
+ if (handleForbidden(res)) {
return;
}
- result.push(field);
- });
- return result;
- },
- advancedSearchableFields: function () {
- var quickKeys = this.quickSearchableFields.map(function (field) {
- return field.field;
- });
- return this.searchableFields.filter(function (field) {
- return quickKeys.indexOf(field.field) === -1;
- });
- },
- hasAdvancedFilters: function () {
- return this.advancedSearchableFields.length > 0;
- },
- visibleColumns: function () {
- var keys = this.visibleColumnKeys;
- return this.allColumns.filter(function (field) {
- return keys.indexOf(field.field) !== -1;
- });
- },
- editableFields: function () {
- return this.fieldMeta.filter(function (field) {
- return !field.primaryKey && field.editable !== false;
- });
- },
- exportColumns: function () {
- return this.visibleColumns.map(function (field) {
- return {
- field: field.exportField || field.tableProp || field.field,
- label: field.label
- };
- });
- },
- tableHeight: function () {
- return this.advancedFiltersVisible && this.hasAdvancedFilters
- ? 'calc(100vh - 390px)'
- : 'calc(100vh - 300px)';
- },
- formTarget: function () {
- return this.dialogForm;
- },
- displayTarget: function () {
- return this.dialogDisplay;
- }
+ if (Number(res.code) !== 200) {
+ vm.$message.error(res.msg || "瑙掕壊鍔犺浇澶辫触");
+ return;
+ }
+ var payload = res.data || {};
+ vm.roles = Array.isArray(payload.records) ? payload.records : [];
+ },
+ error: function () {
+ vm.$message.error("瑙掕壊鍔犺浇澶辫触");
+ }
+ });
},
- created: function () {
+ loadTable: function () {
+ var vm = this;
+ vm.loading = true;
+ $.ajax({
+ url: baseUrl + "/user/list/auth",
+ method: "GET",
+ headers: vm.authHeaders(),
+ data: {
+ curr: vm.page.curr,
+ limit: vm.page.limit,
+ username: vm.searchForm.username,
+ mobile: vm.searchForm.mobile
+ },
+ success: function (res) {
+ if (handleForbidden(res)) {
+ return;
+ }
+ if (Number(res.code) !== 200) {
+ vm.$message.error(res.msg || "鍔犺浇澶辫触");
+ return;
+ }
+ var payload = res.data || {};
+ vm.tableData = Array.isArray(payload.records) ? payload.records : [];
+ vm.page.total = Number(payload.total || 0);
+ },
+ error: function () {
+ vm.$message.error("鍔犺浇澶辫触");
+ },
+ complete: function () {
+ vm.loading = false;
+ }
+ });
+ },
+ handleSearch: function () {
+ this.page.curr = 1;
this.loadTable();
},
- mounted: function () {
- var self = this;
- self.requestTableLayout(80);
- self.tableResizeHandler = function () {
- self.requestTableLayout(80);
+ handleResetSearch: function () {
+ this.searchForm = {
+ username: "",
+ mobile: ""
};
- window.addEventListener('resize', self.tableResizeHandler);
+ this.page.curr = 1;
+ this.loadTable();
},
- beforeDestroy: function () {
- if (this.layoutTimer) {
- clearTimeout(this.layoutTimer);
- this.layoutTimer = null;
- }
- if (this.tableResizeHandler) {
- window.removeEventListener('resize', this.tableResizeHandler);
- this.tableResizeHandler = null;
- }
+ handleSelectionChange: function (rows) {
+ this.selection = rows || [];
},
- methods: $.extend({}, sharedMethods, {
- requestTableLayout: function (delay) {
- var self = this;
- if (self.layoutTimer) {
- clearTimeout(self.layoutTimer);
+ handleCurrentChange: function (curr) {
+ this.page.curr = curr;
+ this.loadTable();
+ },
+ handleSizeChange: function (limit) {
+ this.page.limit = limit;
+ this.page.curr = 1;
+ this.loadTable();
+ },
+ openCreateDialog: function () {
+ this.dialog.mode = "create";
+ this.dialog.visible = true;
+ this.dialogForm = {
+ id: null,
+ username: "",
+ mobile: "",
+ password: "",
+ roleId: null,
+ status: 1,
+ mfaAllow: 0
+ };
+ this.clearDialogValidate();
+ },
+ openEditDialog: function (row) {
+ this.dialog.mode = "edit";
+ this.dialog.visible = true;
+ this.dialogForm = {
+ id: row.id,
+ username: row.username || "",
+ mobile: row.mobile || "",
+ password: "",
+ roleId: row.roleId == null ? null : Number(row.roleId),
+ status: row.status == null ? 1 : Number(row.status),
+ mfaAllow: row.mfaAllow == null ? 0 : Number(row.mfaAllow)
+ };
+ this.clearDialogValidate();
+ },
+ clearDialogValidate: function () {
+ var vm = this;
+ vm.$nextTick(function () {
+ if (vm.$refs.dialogForm) {
+ vm.$refs.dialogForm.clearValidate();
}
- self.$nextTick(function () {
- self.layoutTimer = setTimeout(function () {
- var table = self.$refs.dataTable;
- if (table && typeof table.doLayout === 'function') {
- table.doLayout();
+ });
+ },
+ closeDialog: function () {
+ this.dialog.visible = false;
+ },
+ submitDialog: function () {
+ var vm = this;
+ if (!vm.$refs.dialogForm) {
+ return;
+ }
+ vm.$refs.dialogForm.validate(function (valid) {
+ if (!valid) {
+ return false;
+ }
+ vm.dialogSubmitting = true;
+ $.ajax({
+ url: baseUrl + "/user/" + (vm.dialog.mode === "create" ? "add" : "update") + "/auth",
+ method: "POST",
+ headers: vm.authHeaders(),
+ data: vm.buildDialogPayload(),
+ success: function (res) {
+ if (handleForbidden(res)) {
+ return;
}
- }, delay || 40);
- });
- },
- isColumnVisible: function (fieldName) {
- return this.visibleColumnKeys.indexOf(fieldName) !== -1;
- },
- toggleColumn: function (fieldName, visible) {
- if (visible) {
- if (this.visibleColumnKeys.indexOf(fieldName) === -1) {
- this.visibleColumnKeys.push(fieldName);
+ if (Number(res.code) !== 200) {
+ vm.$message.error(res.msg || "淇濆瓨澶辫触");
+ return;
+ }
+ vm.$message.success(res.msg || "淇濆瓨鎴愬姛");
+ vm.dialog.visible = false;
+ vm.loadTable();
+ },
+ error: function () {
+ vm.$message.error("淇濆瓨澶辫触");
+ },
+ complete: function () {
+ vm.dialogSubmitting = false;
}
- this.requestTableLayout(80);
- return;
- }
- if (this.visibleColumnKeys.length === 1) {
- this.$message.warning('鑷冲皯淇濈暀涓�鍒�');
- return;
- }
- this.visibleColumnKeys = this.visibleColumnKeys.filter(function (item) {
- return item !== fieldName;
});
- this.requestTableLayout(80);
- },
- selectAllColumns: function () {
- this.visibleColumnKeys = createDefaultVisibleColumnKeys();
- this.requestTableLayout(80);
- },
- resetColumns: function () {
- this.visibleColumnKeys = createDefaultVisibleColumnKeys();
- this.requestTableLayout(80);
- },
- toggleAdvancedFilters: function () {
- this.advancedFiltersVisible = !this.advancedFiltersVisible;
- this.requestTableLayout(260);
- },
- handleSearchForeignSelect: function (field, item) {
- this.$set(this.searchDisplay, field.field, item && item.value ? item.value : '');
- this.$set(this.searchForm, field.field, item && item.id !== undefined ? normalizeOptionValue(field, item.id) : '');
- },
- handleSearchForeignInput: function (field) {
- if (this.searchDisplay[field.field]) {
- return;
+ return true;
+ });
+ },
+ buildDialogPayload: function () {
+ var payload = {
+ username: this.dialogForm.username,
+ mobile: this.dialogForm.mobile,
+ roleId: this.dialogForm.roleId,
+ status: this.dialogForm.status,
+ mfaAllow: this.dialogForm.mfaAllow
+ };
+ if (this.dialog.mode === "edit") {
+ payload.id = this.dialogForm.id;
+ } else {
+ payload.password = hex_md5(this.dialogForm.password);
+ }
+ return payload;
+ },
+ openResetPasswordDialog: function (row) {
+ this.resetDialog = {
+ visible: true,
+ userId: row.id,
+ username: row.username || "",
+ password: ""
+ };
+ var vm = this;
+ vm.$nextTick(function () {
+ if (vm.$refs.resetForm) {
+ vm.$refs.resetForm.clearValidate();
}
- this.$set(this.searchForm, field.field, '');
- },
- buildQueryParams: function () {
- var self = this;
- var params = {
- curr: self.page.curr,
- limit: self.page.limit
- };
- if (self.searchForm.condition) {
- params.condition = self.searchForm.condition;
+ });
+ },
+ closeResetDialog: function () {
+ this.resetDialog.visible = false;
+ },
+ submitResetPassword: function () {
+ var vm = this;
+ if (!vm.$refs.resetForm) {
+ return;
+ }
+ vm.$refs.resetForm.validate(function (valid) {
+ if (!valid) {
+ return false;
}
- self.searchableFields.forEach(function (field) {
- var value = self.searchForm[field.field];
- if (field.kind === 'date') {
- if (value && value.length === 2) {
- params[resolveSearchParam(field)] = value[0] + ' - ' + value[1];
+ vm.resetSubmitting = true;
+ $.ajax({
+ url: baseUrl + "/user/resetPassword/auth",
+ method: "POST",
+ headers: vm.authHeaders(),
+ data: {
+ id: vm.resetDialog.userId,
+ password: hex_md5(vm.resetDialog.password)
+ },
+ success: function (res) {
+ if (handleForbidden(res)) {
+ return;
}
+ if (Number(res.code) !== 200) {
+ vm.$message.error(res.msg || "閲嶇疆瀵嗙爜澶辫触");
+ return;
+ }
+ vm.$message.success("閲嶇疆瀵嗙爜鎴愬姛");
+ vm.resetDialog.visible = false;
+ },
+ error: function () {
+ vm.$message.error("閲嶇疆瀵嗙爜澶辫触");
+ },
+ complete: function () {
+ vm.resetSubmitting = false;
+ }
+ });
+ return true;
+ });
+ },
+ toggleStatus: function (row) {
+ var vm = this;
+ var currentStatus = Number(row.status) === 1 ? 1 : 0;
+ $.ajax({
+ url: baseUrl + "/user/edit/auth",
+ method: "POST",
+ headers: vm.authHeaders(),
+ data: {
+ id: row.id,
+ status: currentStatus
+ },
+ success: function (res) {
+ if (handleForbidden(res)) {
return;
}
- if (!isEmptyValue(value)) {
- params[resolveSearchParam(field)] = value;
+ if (Number(res.code) !== 200) {
+ row.status = currentStatus === 1 ? 0 : 1;
+ vm.$message.error(res.msg || "鐘舵�佹洿鏂板け璐�");
+ return;
}
- });
- if (self.sortState.prop && self.sortState.order) {
- params.orderByField = self.sortState.prop;
- params.orderByType = self.sortState.order === 'ascending' ? 'asc' : 'desc';
+ row.status$ = currentStatus === 1 ? "姝e父" : "绂佺敤";
+ vm.$message.success("鐘舵�佸凡鏇存柊");
+ },
+ error: function () {
+ row.status = currentStatus === 1 ? 0 : 1;
+ vm.$message.error("鐘舵�佹洿鏂板け璐�");
}
- return params;
- },
- loadTable: function () {
- var self = this;
- self.loading = true;
- $.ajax({
- url: baseUrl + '/' + simpleEntityName + '/list/auth',
- method: 'GET',
- headers: self.authHeaders(),
- data: self.buildQueryParams(),
- success: function (res) {
- self.loading = false;
- if (self.handleForbidden(res)) {
- return;
- }
- if (!res || res.code !== 200) {
- self.$message.error((res && res.msg) ? res.msg : '鍔犺浇澶辫触');
- return;
- }
- var payload = res.data || {};
- self.tableData = Array.isArray(payload.records) ? payload.records : [];
- self.page.total = payload.total || 0;
- self.requestTableLayout(80);
- },
- error: function () {
- self.loading = false;
- self.requestTableLayout(80);
- self.$message.error('鍔犺浇澶辫触');
- }
- });
- },
- handleSearch: function () {
- this.page.curr = 1;
- this.loadTable();
- },
- handleReset: function () {
- this.searchForm = createSearchDefaults();
- this.searchDisplay = createSearchDisplayDefaults();
- this.advancedFiltersVisible = false;
- this.page.curr = 1;
- this.sortState = {
- prop: '',
- order: ''
- };
- this.loadTable();
- },
- handleSelectionChange: function (rows) {
- this.selection = rows || [];
- },
- handleSortChange: function (payload) {
- this.sortState = {
- prop: payload && payload.prop ? payload.prop : '',
- order: payload && payload.order ? payload.order : ''
- };
- this.page.curr = 1;
- this.loadTable();
- },
- handleCurrentChange: function (curr) {
- this.page.curr = curr;
- this.loadTable();
- },
- handleSizeChange: function (limit) {
- this.page.limit = limit;
- this.page.curr = 1;
- this.loadTable();
- },
- resetDialogState: function () {
- this.dialogForm = createFormDefaults();
- this.dialogDisplay = createDisplayDefaults();
- if (this.$refs.dialogForm) {
- this.$refs.dialogForm.clearValidate();
- }
- },
- openCreateDialog: function () {
- this.dialog.mode = 'create';
- this.dialog.visible = true;
- this.$nextTick(this.resetDialogState);
- },
- openEditDialog: function (row) {
- var self = this;
- self.dialog.mode = 'edit';
- self.dialog.visible = true;
- self.$nextTick(function () {
- self.resetDialogState();
- fillFormFromRow(row, self.dialogForm, self.dialogDisplay);
- if (self.$refs.dialogForm) {
- self.$refs.dialogForm.clearValidate();
- }
- });
- },
- submitDialog: function () {
- var self = this;
- if (!self.$refs.dialogForm) {
- return;
- }
- self.$refs.dialogForm.validate(function (valid) {
- if (!valid) {
- return false;
- }
- self.dialog.submitting = true;
- $.ajax({
- url: baseUrl + '/' + simpleEntityName + '/' + (self.dialog.mode === 'create' ? 'add' : 'update') + '/auth',
- method: 'POST',
- headers: self.authHeaders(),
- data: buildPayload(self.dialogForm),
- success: function (res) {
- self.dialog.submitting = false;
- if (self.handleForbidden(res)) {
- return;
- }
- if (!res || res.code !== 200) {
- self.$message.error((res && res.msg) ? res.msg : '淇濆瓨澶辫触');
- return;
- }
- self.$message.success(res.msg || '淇濆瓨鎴愬姛');
- self.dialog.visible = false;
- self.loadTable();
- },
- error: function () {
- self.dialog.submitting = false;
- self.$message.error('淇濆瓨澶辫触');
- }
- });
- return true;
- });
- },
- removeSelection: function () {
- var self = this;
- var ids = self.selection.map(function (row) {
- return row[self.primaryKeyField];
- });
- self.removeRows(ids);
- },
- removeRows: function (ids) {
- var self = this;
- if (!ids || ids.length === 0) {
- self.$message.warning('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁');
- return;
- }
- self.$confirm('纭畾鍒犻櫎閫変腑鐨勮褰曞悧锛�', '鎻愮ず', { type: 'warning' }).then(function () {
- $.ajax({
- url: baseUrl + '/' + simpleEntityName + '/delete/auth',
- method: 'POST',
- headers: self.authHeaders(),
- traditional: true,
- data: { 'ids[]': ids },
- success: function (res) {
- if (self.handleForbidden(res)) {
- return;
- }
- if (!res || res.code !== 200) {
- self.$message.error((res && res.msg) ? res.msg : '鍒犻櫎澶辫触');
- return;
- }
- self.$message.success(res.msg || '鍒犻櫎鎴愬姛');
- self.selection = [];
- if (self.tableData.length === ids.length && self.page.curr > 1) {
- self.page.curr = self.page.curr - 1;
- }
- self.loadTable();
- },
- error: function () {
- self.$message.error('鍒犻櫎澶辫触');
- }
- });
- }).catch(function () {});
- },
- exportRows: function () {
- var self = this;
- self.exporting = true;
- var requestBody = {
- fields: self.exportColumns.map(function (item) {
- return item.field;
- })
- };
- requestBody[simpleEntityName] = self.buildQueryParams();
- $.ajax({
- url: baseUrl + '/' + simpleEntityName + '/export/auth',
- method: 'POST',
- headers: $.extend({ 'Content-Type': 'application/json;charset=UTF-8' }, self.authHeaders()),
- data: JSON.stringify(requestBody),
- success: function (res) {
- self.exporting = false;
- if (self.handleForbidden(res)) {
- return;
- }
- if (!res || res.code !== 200) {
- self.$message.error((res && res.msg) ? res.msg : '瀵煎嚭澶辫触');
- return;
- }
- createDownloadFile(
- simpleEntityName + '_' + buildTimestamp() + '.xls',
- self.exportColumns.map(function (item) {
- return item.label;
- }),
- Array.isArray(res.data) ? res.data : []
- );
- self.$message.success('瀵煎嚭鎴愬姛');
- },
- error: function () {
- self.exporting = false;
- self.$message.error('瀵煎嚭澶辫触');
- }
- });
+ });
+ },
+ removeSelection: function () {
+ var ids = this.selection.map(function (item) {
+ return item.id;
+ });
+ this.removeRows(ids);
+ },
+ removeRows: function (ids) {
+ var vm = this;
+ if (!ids || ids.length === 0) {
+ vm.$message.warning("璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁");
+ return;
}
- })
- });
- }
-
+ vm.$confirm("纭畾鍒犻櫎閫変腑鐨勮褰曞悧锛�", "鎻愮ず", {
+ type: "warning",
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷"
+ }).then(function () {
+ $.ajax({
+ url: baseUrl + "/user/delete/auth",
+ method: "POST",
+ headers: vm.authHeaders(),
+ traditional: true,
+ data: { "ids[]": ids },
+ success: function (res) {
+ if (handleForbidden(res)) {
+ return;
+ }
+ if (Number(res.code) !== 200) {
+ vm.$message.error(res.msg || "鍒犻櫎澶辫触");
+ return;
+ }
+ vm.$message.success("鍒犻櫎鎴愬姛");
+ vm.loadTable();
+ },
+ error: function () {
+ vm.$message.error("鍒犻櫎澶辫触");
+ }
+ });
+ }).catch(function () {
+ });
+ }
+ }
+ });
})();
--
Gitblit v1.9.1