| | |
| | | } |
| | | |
| | | ]); |
| | | 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() : ''; |
| | |
| | | } |
| | | |
| | | function isSearchableField(field) { |
| | | return !!field && field.kind !== 'image' && !field.textarea; |
| | | return !!field && field.kind !== 'image' && !field.textarea && field.searchable !== false; |
| | | } |
| | | |
| | | function isSortableField(field) { |
| | |
| | | } |
| | | |
| | | function createDefaultVisibleColumnKeys() { |
| | | return fieldMeta.map(function (field) { |
| | | return fieldMeta.filter(function (field) { |
| | | return field.visible !== false; |
| | | }).map(function (field) { |
| | | return field.field; |
| | | }); |
| | | } |
| | |
| | | }, |
| | | editableFields: function () { |
| | | return this.fieldMeta.filter(function (field) { |
| | | return !field.primaryKey; |
| | | return !field.primaryKey && field.editable !== false; |
| | | }); |
| | | }, |
| | | exportColumns: function () { |