loginLog.data.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. // CrudSchema
  3. const crudSchemas = reactive<VxeCrudSchema>({
  4. primaryKey: 'id',
  5. primaryType: 'id',
  6. primaryTitle: '日志编号',
  7. action: true,
  8. actionWidth: '100px',
  9. columns: [
  10. {
  11. title: '日志类型',
  12. field: 'logType',
  13. dictType: DICT_TYPE.SYSTEM_LOGIN_TYPE,
  14. dictClass: 'number'
  15. },
  16. {
  17. title: '用户名称',
  18. field: 'username',
  19. isSearch: true
  20. },
  21. {
  22. title: '登录地址',
  23. field: 'userIp',
  24. isSearch: true
  25. },
  26. {
  27. title: '浏览器',
  28. field: 'userAgent'
  29. },
  30. {
  31. title: '登陆结果',
  32. field: 'result',
  33. dictType: DICT_TYPE.SYSTEM_LOGIN_RESULT,
  34. dictClass: 'number'
  35. },
  36. {
  37. title: '登录日期',
  38. field: 'createTime',
  39. formatter: 'formatDate',
  40. table: {
  41. width: 150
  42. },
  43. search: {
  44. show: true,
  45. itemRender: {
  46. name: 'XDataTimePicker'
  47. }
  48. }
  49. }
  50. ]
  51. })
  52. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)