@liujitcn/kratos-admin-system 0.0.31 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/README.md +34 -20
  2. package/dist/package/declarations/src/api/base/{notification.d.ts → v1/notification.d.ts} +3 -1
  3. package/dist/package/declarations/src/api/system/admin/v1/base_api_log.d.ts +10 -0
  4. package/dist/package/declarations/src/api/system/{base_area.d.ts → admin/v1/base_area.d.ts} +1 -1
  5. package/dist/package/declarations/src/api/system/{base_config.d.ts → admin/v1/base_config.d.ts} +5 -1
  6. package/dist/package/declarations/src/api/system/admin/v1/base_data_access_log.d.ts +10 -0
  7. package/dist/package/declarations/src/api/system/admin/v1/base_dict.d.ts +20 -0
  8. package/dist/package/declarations/src/api/system/admin/v1/base_dict_item.d.ts +18 -0
  9. package/dist/package/declarations/src/api/system/{base_job.d.ts → admin/v1/base_job.d.ts} +4 -5
  10. package/dist/package/declarations/src/api/system/admin/v1/base_job_log.d.ts +9 -0
  11. package/dist/package/declarations/src/api/system/{base_language.d.ts → admin/v1/base_language.d.ts} +3 -3
  12. package/dist/package/declarations/src/api/system/admin/v1/base_log.d.ts +8 -0
  13. package/dist/package/declarations/src/api/system/admin/v1/base_login_log.d.ts +10 -0
  14. package/dist/package/declarations/src/api/system/admin/v1/base_login_policy.d.ts +19 -0
  15. package/dist/package/declarations/src/api/system/admin/v1/base_operation_log.d.ts +10 -0
  16. package/dist/package/declarations/src/api/system/admin/v1/base_permission_log.d.ts +10 -0
  17. package/dist/package/declarations/src/api/system/admin/v1/base_policy_evaluation_log.d.ts +10 -0
  18. package/dist/package/declarations/src/api/system/admin/v1/base_table_archive.d.ts +20 -0
  19. package/dist/package/declarations/src/api/system/admin/v1/base_table_archive_record.d.ts +11 -0
  20. package/dist/package/declarations/src/api/system/admin/v1/base_table_archive_restore.d.ts +14 -0
  21. package/dist/package/declarations/src/api/system/admin/v1/base_table_backup.d.ts +20 -0
  22. package/dist/package/declarations/src/api/system/admin/v1/base_table_backup_record.d.ts +11 -0
  23. package/dist/package/declarations/src/api/system/admin/v1/base_table_backup_restore.d.ts +14 -0
  24. package/dist/package/declarations/src/api/system/admin/v1/base_table_source.d.ts +11 -0
  25. package/dist/package/declarations/src/api/system/admin/v1/cache.d.ts +7 -0
  26. package/dist/package/declarations/src/api/system/base_redact_field.d.ts +20 -0
  27. package/dist/package/declarations/src/api/system/base_redact_policy.d.ts +19 -0
  28. package/dist/package/declarations/src/api/system/base_redact_rule.d.ts +22 -0
  29. package/dist/package/declarations/src/components/ChangePasswordForm.vue.d.ts +3 -0
  30. package/dist/package/declarations/src/components/DynamicI18nCell.vue.d.ts +5 -1
  31. package/dist/package/declarations/src/components/ForcedPasswordDialog.vue.d.ts +3 -0
  32. package/dist/package/declarations/src/components/{AuditLogTable.vue.d.ts → LogTable.vue.d.ts} +14 -7
  33. package/dist/package/declarations/src/components/dynamicI18n.d.ts +4 -7
  34. package/dist/package/declarations/src/components/log.d.ts +20 -0
  35. package/dist/package/declarations/src/config/base-log-fallback.d.ts +7 -0
  36. package/dist/package/declarations/src/config/database-backup.d.ts +12 -0
  37. package/dist/package/declarations/src/config/index.d.ts +7 -0
  38. package/dist/package/declarations/src/config/types.d.ts +56 -0
  39. package/dist/package/declarations/src/locales/generated.d.ts +1084 -500
  40. package/dist/package/declarations/src/rpc/base/v1/login.d.ts +5 -3
  41. package/dist/package/declarations/src/rpc/base/v1/notification.d.ts +25 -0
  42. package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +13 -0
  43. package/dist/package/declarations/src/rpc/system/admin/v1/base_api.d.ts +2 -0
  44. package/dist/package/declarations/src/rpc/system/admin/v1/base_api_log.d.ts +84 -0
  45. package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +38 -0
  46. package/dist/package/declarations/src/rpc/system/admin/v1/base_data_access_log.d.ts +112 -0
  47. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +0 -101
  48. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict_item.d.ts +107 -0
  49. package/dist/package/declarations/src/rpc/system/admin/v1/base_job.d.ts +5 -56
  50. package/dist/package/declarations/src/rpc/system/admin/v1/base_job_log.d.ts +60 -0
  51. package/dist/package/declarations/src/rpc/system/admin/v1/base_log.d.ts +77 -0
  52. package/dist/package/declarations/src/rpc/system/admin/v1/base_login_log.d.ts +92 -0
  53. package/dist/package/declarations/src/rpc/system/admin/v1/base_login_policy.d.ts +169 -41
  54. package/dist/package/declarations/src/rpc/system/admin/v1/base_operation_log.d.ts +106 -0
  55. package/dist/package/declarations/src/rpc/system/admin/v1/base_permission_log.d.ts +118 -0
  56. package/dist/package/declarations/src/rpc/system/admin/v1/base_policy_evaluation_log.d.ts +119 -0
  57. package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_common.d.ts +9 -0
  58. package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_field.d.ts +161 -0
  59. package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_policy.d.ts +150 -0
  60. package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_rule.d.ts +111 -0
  61. package/dist/package/declarations/src/rpc/system/admin/v1/base_table_archive.d.ts +90 -0
  62. package/dist/package/declarations/src/rpc/system/admin/v1/base_table_archive_record.d.ts +82 -0
  63. package/dist/package/declarations/src/rpc/system/admin/v1/base_table_archive_restore.d.ts +76 -0
  64. package/dist/package/declarations/src/rpc/system/admin/v1/base_table_backup.d.ts +74 -0
  65. package/dist/package/declarations/src/rpc/system/admin/v1/base_table_backup_record.d.ts +69 -0
  66. package/dist/package/declarations/src/rpc/system/admin/v1/base_table_backup_restore.d.ts +76 -0
  67. package/dist/package/declarations/src/rpc/system/admin/v1/base_table_source.d.ts +16 -0
  68. package/dist/package/declarations/src/rpc/system/admin/v1/base_user.d.ts +15 -0
  69. package/dist/package/declarations/src/rpc/system/admin/v1/cache.d.ts +47 -0
  70. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_column.d.ts +2 -0
  71. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +8 -0
  72. package/dist/package/declarations/src/rpc/system/common/v1/common.d.ts +26 -0
  73. package/dist/package/declarations/src/rpc/system/config/v1/system_config.d.ts +8 -0
  74. package/dist/package/declarations/src/{api/system → utils}/code_gen_i18n.d.ts +1 -2
  75. package/dist/package/declarations/src/{api/system → utils}/code_gen_sse.d.ts +1 -1
  76. package/dist/package/declarations/src/utils/notification-response.d.ts +5 -0
  77. package/dist/package/declarations/src/{api/system → utils}/ops_monitoring_sse.d.ts +1 -1
  78. package/dist/package/declarations/src/{api/system → utils}/runtime_log_sse.d.ts +1 -1
  79. package/dist/package/declarations/src/views/base/backup-management/archive-config/index.vue.d.ts +3 -0
  80. package/dist/package/declarations/src/views/base/backup-management/archive-record/index.vue.d.ts +3 -0
  81. package/dist/package/declarations/src/views/base/backup-management/archive-restore/index.vue.d.ts +3 -0
  82. package/dist/package/declarations/src/views/base/backup-management/backup-config/index.vue.d.ts +3 -0
  83. package/dist/package/declarations/src/views/base/backup-management/backup-record/index.vue.d.ts +3 -0
  84. package/dist/package/declarations/src/views/base/backup-management/backup-restore/index.vue.d.ts +3 -0
  85. package/dist/package/declarations/src/views/base/login-policy/format.d.ts +2 -0
  86. package/dist/package/declarations/src/views/base/redact-field/index.vue.d.ts +3 -0
  87. package/dist/package/declarations/src/views/base/redact-policy/index.vue.d.ts +3 -0
  88. package/dist/package/declarations/src/views/base/redact-rule/index.vue.d.ts +3 -0
  89. package/dist/package/declarations/src/views/base/runtime-config/index.vue.d.ts +3 -0
  90. package/dist/package/declarations/src/views/tool/cache/index.vue.d.ts +3 -0
  91. package/dist/package/src/api/base/v1/notification.ts +99 -0
  92. package/dist/package/src/api/system/admin/v1/base_api_log.ts +33 -0
  93. package/dist/package/src/api/system/{base_area.ts → admin/v1/base_area.ts} +1 -1
  94. package/dist/package/src/api/system/{base_config.ts → admin/v1/base_config.ts} +20 -0
  95. package/dist/package/src/api/system/admin/v1/base_data_access_log.ts +33 -0
  96. package/dist/package/src/api/system/{base_dict.ts → admin/v1/base_dict.ts} +0 -60
  97. package/dist/package/src/api/system/admin/v1/base_dict_item.ts +72 -0
  98. package/dist/package/src/api/system/{base_job.ts → admin/v1/base_job.ts} +11 -22
  99. package/dist/package/src/api/system/admin/v1/base_job_log.ts +32 -0
  100. package/dist/package/src/api/system/{base_language.ts → admin/v1/base_language.ts} +3 -3
  101. package/dist/package/src/api/system/admin/v1/base_log.ts +23 -0
  102. package/dist/package/src/api/system/admin/v1/base_login_log.ts +33 -0
  103. package/dist/package/src/api/system/admin/v1/base_login_policy.ts +67 -0
  104. package/dist/package/src/api/system/{base_message.ts → admin/v1/base_message.ts} +29 -9
  105. package/dist/package/src/api/system/{base_message_category.ts → admin/v1/base_message_category.ts} +30 -7
  106. package/dist/package/src/api/system/admin/v1/base_operation_log.ts +33 -0
  107. package/dist/package/src/api/system/admin/v1/base_permission_log.ts +33 -0
  108. package/dist/package/src/api/system/admin/v1/base_policy_evaluation_log.ts +33 -0
  109. package/dist/package/src/api/system/admin/v1/base_table_archive.ts +70 -0
  110. package/dist/package/src/api/system/admin/v1/base_table_archive_record.ts +33 -0
  111. package/dist/package/src/api/system/admin/v1/base_table_archive_restore.ts +44 -0
  112. package/dist/package/src/api/system/admin/v1/base_table_backup.ts +70 -0
  113. package/dist/package/src/api/system/admin/v1/base_table_backup_record.ts +33 -0
  114. package/dist/package/src/api/system/admin/v1/base_table_backup_restore.ts +44 -0
  115. package/dist/package/src/api/system/admin/v1/base_table_source.ts +33 -0
  116. package/dist/package/src/api/system/admin/v1/cache.ts +22 -0
  117. package/dist/package/src/api/system/{code_gen_column.ts → admin/v1/code_gen_column.ts} +19 -3
  118. package/dist/package/src/api/system/{code_gen_table.ts → admin/v1/code_gen_table.ts} +13 -4
  119. package/dist/package/src/api/system/base_redact_field.ts +25 -0
  120. package/dist/package/src/api/system/base_redact_policy.ts +24 -0
  121. package/dist/package/src/api/system/base_redact_rule.ts +27 -0
  122. package/dist/package/src/components/Ai.vue +1 -1
  123. package/dist/package/src/components/ChangePasswordForm.vue +143 -0
  124. package/dist/package/src/components/DynamicI18nCell.vue +28 -8
  125. package/dist/package/src/components/DynamicI18nEditor.vue +1 -1
  126. package/dist/package/src/components/ForcedPasswordDialog.vue +40 -0
  127. package/dist/package/src/components/LogTable.vue +190 -0
  128. package/dist/package/src/components/Notification.vue +112 -7
  129. package/dist/package/src/components/dynamicI18n.ts +5 -9
  130. package/dist/package/src/components/log.ts +87 -0
  131. package/dist/package/src/config/base-log-fallback.ts +26 -0
  132. package/dist/package/src/config/database-backup.ts +57 -0
  133. package/dist/package/src/config/index.ts +26 -0
  134. package/dist/package/src/config/types.ts +59 -0
  135. package/dist/package/src/locales/README.md +2 -1
  136. package/dist/package/src/locales/en-US.json +285 -127
  137. package/dist/package/src/locales/ja-JP.json +285 -127
  138. package/dist/package/src/locales/zh-CN.json +285 -127
  139. package/dist/package/src/locales/zh-TW.json +285 -127
  140. package/dist/package/src/module.ts +3 -1
  141. package/dist/package/src/rpc/base/v1/login.ts +4 -2
  142. package/dist/package/src/rpc/base/v1/notification.ts +28 -0
  143. package/dist/package/src/rpc/system/admin/v1/auth.ts +13 -0
  144. package/dist/package/src/rpc/system/admin/v1/base_api.ts +2 -0
  145. package/dist/package/src/rpc/system/admin/v1/base_api_log.ts +102 -0
  146. package/dist/package/src/rpc/system/admin/v1/base_config.ts +42 -0
  147. package/dist/package/src/rpc/system/admin/v1/base_data_access_log.ts +135 -0
  148. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +0 -112
  149. package/dist/package/src/rpc/system/admin/v1/base_dict_item.ts +126 -0
  150. package/dist/package/src/rpc/system/admin/v1/base_job.ts +5 -62
  151. package/dist/package/src/rpc/system/admin/v1/base_job_log.ts +75 -0
  152. package/dist/package/src/rpc/system/admin/v1/base_log.ts +90 -0
  153. package/dist/package/src/rpc/system/admin/v1/base_login_log.ts +113 -0
  154. package/dist/package/src/rpc/system/admin/v1/base_login_policy.ts +191 -42
  155. package/dist/package/src/rpc/system/admin/v1/base_operation_log.ts +127 -0
  156. package/dist/package/src/rpc/system/admin/v1/base_permission_log.ts +142 -0
  157. package/dist/package/src/rpc/system/admin/v1/base_policy_evaluation_log.ts +143 -0
  158. package/dist/package/src/rpc/system/admin/v1/base_redact_common.ts +17 -0
  159. package/dist/package/src/rpc/system/admin/v1/base_redact_field.ts +182 -0
  160. package/dist/package/src/rpc/system/admin/v1/base_redact_policy.ts +174 -0
  161. package/dist/package/src/rpc/system/admin/v1/base_redact_rule.ts +131 -0
  162. package/dist/package/src/rpc/system/admin/v1/base_table_archive.ts +109 -0
  163. package/dist/package/src/rpc/system/admin/v1/base_table_archive_record.ts +95 -0
  164. package/dist/package/src/rpc/system/admin/v1/base_table_archive_restore.ts +93 -0
  165. package/dist/package/src/rpc/system/admin/v1/base_table_backup.ts +91 -0
  166. package/dist/package/src/rpc/system/admin/v1/base_table_backup_record.ts +82 -0
  167. package/dist/package/src/rpc/system/admin/v1/base_table_backup_restore.ts +91 -0
  168. package/dist/package/src/rpc/system/admin/v1/base_table_source.ts +26 -0
  169. package/dist/package/src/rpc/system/admin/v1/base_user.ts +15 -0
  170. package/dist/package/src/rpc/system/admin/v1/cache.ts +59 -0
  171. package/dist/package/src/rpc/system/admin/v1/code_gen_column.ts +2 -0
  172. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +8 -0
  173. package/dist/package/src/rpc/system/common/v1/common.ts +35 -0
  174. package/dist/package/src/rpc/system/config/v1/system_config.ts +16 -0
  175. package/dist/package/src/{api/system → utils}/code_gen_i18n.ts +1 -1
  176. package/dist/package/src/{api/system → utils}/code_gen_sse.ts +1 -1
  177. package/dist/package/src/utils/notification-response.ts +22 -0
  178. package/dist/package/src/{api/system → utils}/ops_monitoring_sse.ts +1 -1
  179. package/dist/package/src/{api/system → utils}/runtime_log_sse.ts +1 -1
  180. package/dist/package/src/views/ai/chat/components/AiMarkdown.vue +1 -1
  181. package/dist/package/src/views/ai/chat/components/ChatPanel.vue +2 -4
  182. package/dist/package/src/views/ai/chat/components/XSender.vue +1 -1
  183. package/dist/package/src/views/ai/chat/index.vue +3 -3
  184. package/dist/package/src/views/ai/chat/message.ts +3 -8
  185. package/dist/package/src/views/base/api/index.vue +4 -4
  186. package/dist/package/src/views/base/api-log/index.vue +56 -45
  187. package/dist/package/src/views/base/area/index.vue +1 -1
  188. package/dist/package/src/views/base/backup-management/archive-config/index.vue +151 -0
  189. package/dist/package/src/views/base/backup-management/archive-record/index.vue +44 -0
  190. package/dist/package/src/views/base/backup-management/archive-restore/index.vue +59 -0
  191. package/dist/package/src/views/base/backup-management/backup-config/index.vue +119 -0
  192. package/dist/package/src/views/base/backup-management/backup-record/index.vue +41 -0
  193. package/dist/package/src/views/base/backup-management/backup-restore/index.vue +66 -0
  194. package/dist/package/src/views/base/config/index.vue +16 -25
  195. package/dist/package/src/views/base/dashboard/index.vue +68 -66
  196. package/dist/package/src/views/base/data-access-log/index.vue +64 -52
  197. package/dist/package/src/views/base/dept/index.vue +11 -11
  198. package/dist/package/src/views/base/dict/index.vue +5 -5
  199. package/dist/package/src/views/base/dict/item.vue +12 -12
  200. package/dist/package/src/views/base/file/index.vue +220 -16
  201. package/dist/package/src/views/base/job/index.vue +5 -5
  202. package/dist/package/src/views/base/job/log.vue +38 -11
  203. package/dist/package/src/views/base/language/index.vue +1 -1
  204. package/dist/package/src/views/base/login-log/index.vue +49 -45
  205. package/dist/package/src/views/base/login-policy/format.ts +4 -0
  206. package/dist/package/src/views/base/login-policy/index.vue +496 -185
  207. package/dist/package/src/views/base/menu/index.vue +17 -17
  208. package/dist/package/src/views/base/message/index.vue +149 -19
  209. package/dist/package/src/views/base/message-category/index.vue +41 -10
  210. package/dist/package/src/views/base/migration/index.vue +2 -2
  211. package/dist/package/src/views/base/oauth-client/index.vue +19 -9
  212. package/dist/package/src/views/base/operation-log/index.vue +54 -50
  213. package/dist/package/src/views/base/permission-log/index.vue +57 -52
  214. package/dist/package/src/views/base/policy-evaluation-log/index.vue +61 -50
  215. package/dist/package/src/views/base/post/index.vue +11 -11
  216. package/dist/package/src/views/base/redact-field/index.vue +59 -0
  217. package/dist/package/src/views/base/redact-policy/index.vue +92 -0
  218. package/dist/package/src/views/base/redact-rule/index.vue +51 -0
  219. package/dist/package/src/views/base/role/index.vue +9 -9
  220. package/dist/package/src/views/base/runtime-config/index.vue +479 -0
  221. package/dist/package/src/views/base/tenant/index.vue +9 -9
  222. package/dist/package/src/views/base/user/components/dept-tree.vue +1 -1
  223. package/dist/package/src/views/base/user/index.vue +86 -47
  224. package/dist/package/src/views/message/inbox/index.vue +38 -11
  225. package/dist/package/src/views/profile/components/base.vue +84 -8
  226. package/dist/package/src/views/profile/components/password.vue +2 -228
  227. package/dist/package/src/views/profile/components/security.vue +3 -3
  228. package/dist/package/src/views/profile/components/session.vue +10 -2
  229. package/dist/package/src/views/profile/index.vue +10 -9
  230. package/dist/package/src/views/tool/api-doc/index.vue +3 -3
  231. package/dist/package/src/views/tool/cache/index.vue +352 -0
  232. package/dist/package/src/views/tool/code-gen/code-preview/index.vue +4 -4
  233. package/dist/package/src/views/tool/code-gen/columns/index.vue +16 -16
  234. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +2 -2
  235. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +2 -2
  236. package/dist/package/src/views/tool/code-gen/config.ts +2 -0
  237. package/dist/package/src/views/tool/code-gen/preview/index.vue +9 -9
  238. package/dist/package/src/views/tool/code-gen/proto/index.vue +10 -12
  239. package/dist/package/src/views/tool/code-gen/table/index.vue +71 -15
  240. package/dist/package/src/views/tool/ops-monitoring/index.vue +31 -96
  241. package/dist/package/src/views/tool/project-doc/index.vue +2 -2
  242. package/dist/package/src/views/tool/runtime-log/index.vue +6 -6
  243. package/package.json +7 -2
  244. package/dist/package/declarations/src/api/system/base_audit_log.d.ts +0 -55
  245. package/dist/package/declarations/src/api/system/base_dict.d.ts +0 -32
  246. package/dist/package/declarations/src/api/system/base_login_policy.d.ts +0 -10
  247. package/dist/package/declarations/src/components/auditLog.d.ts +0 -9
  248. package/dist/package/declarations/src/rpc/system/admin/v1/base_audit_log.d.ts +0 -640
  249. package/dist/package/src/api/base/notification.ts +0 -69
  250. package/dist/package/src/api/system/base_audit_log.ts +0 -168
  251. package/dist/package/src/api/system/base_login_policy.ts +0 -32
  252. package/dist/package/src/components/AuditLogTable.vue +0 -105
  253. package/dist/package/src/components/auditLog.ts +0 -46
  254. package/dist/package/src/rpc/system/admin/v1/base_audit_log.ts +0 -737
  255. /package/dist/package/declarations/src/api/base/{ai_message.d.ts → v1/ai_message.d.ts} +0 -0
  256. /package/dist/package/declarations/src/api/base/{ai_session.d.ts → v1/ai_session.d.ts} +0 -0
  257. /package/dist/package/declarations/src/api/base/{ai_tool.d.ts → v1/ai_tool.d.ts} +0 -0
  258. /package/dist/package/declarations/src/api/base/{oauth.d.ts → v1/oauth.d.ts} +0 -0
  259. /package/dist/package/declarations/src/api/base/{sse.d.ts → v1/sse.d.ts} +0 -0
  260. /package/dist/package/declarations/src/api/system/{auth.d.ts → admin/v1/auth.d.ts} +0 -0
  261. /package/dist/package/declarations/src/api/system/{base_api.d.ts → admin/v1/base_api.d.ts} +0 -0
  262. /package/dist/package/declarations/src/api/system/{base_dashboard.d.ts → admin/v1/base_dashboard.d.ts} +0 -0
  263. /package/dist/package/declarations/src/api/system/{base_dept.d.ts → admin/v1/base_dept.d.ts} +0 -0
  264. /package/dist/package/declarations/src/api/system/{base_file.d.ts → admin/v1/base_file.d.ts} +0 -0
  265. /package/dist/package/declarations/src/api/system/{base_i18n.d.ts → admin/v1/base_i18n.d.ts} +0 -0
  266. /package/dist/package/declarations/src/api/system/{base_menu.d.ts → admin/v1/base_menu.d.ts} +0 -0
  267. /package/dist/package/declarations/src/api/system/{base_message.d.ts → admin/v1/base_message.d.ts} +0 -0
  268. /package/dist/package/declarations/src/api/system/{base_message_category.d.ts → admin/v1/base_message_category.d.ts} +0 -0
  269. /package/dist/package/declarations/src/api/system/{base_migration.d.ts → admin/v1/base_migration.d.ts} +0 -0
  270. /package/dist/package/declarations/src/api/system/{base_post.d.ts → admin/v1/base_post.d.ts} +0 -0
  271. /package/dist/package/declarations/src/api/system/{base_role.d.ts → admin/v1/base_role.d.ts} +0 -0
  272. /package/dist/package/declarations/src/api/system/{base_session.d.ts → admin/v1/base_session.d.ts} +0 -0
  273. /package/dist/package/declarations/src/api/system/{base_tenant.d.ts → admin/v1/base_tenant.d.ts} +0 -0
  274. /package/dist/package/declarations/src/api/system/{base_user.d.ts → admin/v1/base_user.d.ts} +0 -0
  275. /package/dist/package/declarations/src/api/system/{code_gen.d.ts → admin/v1/code_gen.d.ts} +0 -0
  276. /package/dist/package/declarations/src/api/system/{code_gen_column.d.ts → admin/v1/code_gen_column.d.ts} +0 -0
  277. /package/dist/package/declarations/src/api/system/{code_gen_proto.d.ts → admin/v1/code_gen_proto.d.ts} +0 -0
  278. /package/dist/package/declarations/src/api/system/{code_gen_table.d.ts → admin/v1/code_gen_table.d.ts} +0 -0
  279. /package/dist/package/declarations/src/api/system/{oauth_client.d.ts → admin/v1/oauth_client.d.ts} +0 -0
  280. /package/dist/package/declarations/src/api/system/{ops_monitoring.d.ts → admin/v1/ops_monitoring.d.ts} +0 -0
  281. /package/dist/package/declarations/src/api/system/{project_document.d.ts → admin/v1/project_document.d.ts} +0 -0
  282. /package/dist/package/declarations/src/api/system/{runtime_log.d.ts → admin/v1/runtime_log.d.ts} +0 -0
  283. /package/dist/package/src/api/base/{ai_message.ts → v1/ai_message.ts} +0 -0
  284. /package/dist/package/src/api/base/{ai_session.ts → v1/ai_session.ts} +0 -0
  285. /package/dist/package/src/api/base/{ai_tool.ts → v1/ai_tool.ts} +0 -0
  286. /package/dist/package/src/api/base/{oauth.ts → v1/oauth.ts} +0 -0
  287. /package/dist/package/src/api/base/{sse.ts → v1/sse.ts} +0 -0
  288. /package/dist/package/src/api/system/{auth.ts → admin/v1/auth.ts} +0 -0
  289. /package/dist/package/src/api/system/{base_api.ts → admin/v1/base_api.ts} +0 -0
  290. /package/dist/package/src/api/system/{base_dashboard.ts → admin/v1/base_dashboard.ts} +0 -0
  291. /package/dist/package/src/api/system/{base_dept.ts → admin/v1/base_dept.ts} +0 -0
  292. /package/dist/package/src/api/system/{base_file.ts → admin/v1/base_file.ts} +0 -0
  293. /package/dist/package/src/api/system/{base_i18n.ts → admin/v1/base_i18n.ts} +0 -0
  294. /package/dist/package/src/api/system/{base_menu.ts → admin/v1/base_menu.ts} +0 -0
  295. /package/dist/package/src/api/system/{base_migration.ts → admin/v1/base_migration.ts} +0 -0
  296. /package/dist/package/src/api/system/{base_post.ts → admin/v1/base_post.ts} +0 -0
  297. /package/dist/package/src/api/system/{base_role.ts → admin/v1/base_role.ts} +0 -0
  298. /package/dist/package/src/api/system/{base_session.ts → admin/v1/base_session.ts} +0 -0
  299. /package/dist/package/src/api/system/{base_tenant.ts → admin/v1/base_tenant.ts} +0 -0
  300. /package/dist/package/src/api/system/{base_user.ts → admin/v1/base_user.ts} +0 -0
  301. /package/dist/package/src/api/system/{code_gen.ts → admin/v1/code_gen.ts} +0 -0
  302. /package/dist/package/src/api/system/{code_gen_proto.ts → admin/v1/code_gen_proto.ts} +0 -0
  303. /package/dist/package/src/api/system/{oauth_client.ts → admin/v1/oauth_client.ts} +0 -0
  304. /package/dist/package/src/api/system/{ops_monitoring.ts → admin/v1/ops_monitoring.ts} +0 -0
  305. /package/dist/package/src/api/system/{project_document.ts → admin/v1/project_document.ts} +0 -0
  306. /package/dist/package/src/api/system/{runtime_log.ts → admin/v1/runtime_log.ts} +0 -0
@@ -69,21 +69,22 @@ import PasswordStrength from "@liujitcn/kratos-admin-core/components/PasswordStr
69
69
  import type { ProFormField, ProFormOption } from "@liujitcn/kratos-admin-core/components/ProForm/interface";
70
70
  import TreeFilter from "@liujitcn/kratos-admin-core/components/TreeFilter/index.vue";
71
71
  import { useAuthButtons } from "@liujitcn/kratos-admin-core/auth";
72
- import { defBaseUserService } from "@liujitcn/kratos-admin-system/api/system/base_user";
72
+ import { defBaseUserService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_user";
73
73
  import type {
74
74
  BaseUser,
75
75
  BaseUserForm,
76
76
  PageBaseUserRequest,
77
77
  ResetBaseUserPasswordRequest
78
78
  } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_user";
79
- import { defBaseDeptService } from "@liujitcn/kratos-admin-system/api/system/base_dept";
80
- import { defBaseRoleService } from "@liujitcn/kratos-admin-system/api/system/base_role";
81
- import { defBasePostService } from "@liujitcn/kratos-admin-system/api/system/base_post";
82
- import { defBaseTenantService } from "@liujitcn/kratos-admin-system/api/system/base_tenant";
79
+ import { BaseUserIDType } from "@liujitcn/kratos-admin-system/rpc/system/common/v1/common";
80
+ import { defBaseDeptService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_dept";
81
+ import { defBaseRoleService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_role";
82
+ import { defBasePostService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_post";
83
+ import { defBaseTenantService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_tenant";
83
84
  import type { SelectOptionResponse_Option, TreeOptionResponse_Option } from "@liujitcn/kratos-admin-system/rpc/common/v1/common";
84
85
  import { Status } from "@liujitcn/kratos-admin-system/rpc/common/v1/enum";
85
86
  import { buildPageRequest, normalizeSelectedIds } from "@liujitcn/kratos-admin-core/table";
86
- import { PASSWORD_CRYPTO_SCENE, encryptPassword, validatePasswordStrengthValue } from "@liujitcn/kratos-admin-core/security";
87
+ import { PASSWORD_CRYPTO_SCENE, encryptPassword } from "@liujitcn/kratos-admin-core/security";
87
88
  import { DEFAULT_TENANT_CODE, requestTenantOptions } from "@liujitcn/kratos-admin-core/tenant";
88
89
  import { useUserStore } from "@liujitcn/kratos-admin-core/stores/runtime";
89
90
  import { t } from "@liujitcn/kratos-admin-core";
@@ -159,6 +160,12 @@ const formData = reactive<BaseUserFormState>({
159
160
  post_id: undefined,
160
161
  /** 手机号 */
161
162
  phone: "",
163
+ /** 邮箱 */
164
+ email: "",
165
+ /** 证件类型 */
166
+ id_type: BaseUserIDType.BASE_USER_ID_TYPE_UNSPECIFIED,
167
+ /** 证件号 */
168
+ id_code: "",
162
169
  /** 密码 */
163
170
  pwd: "",
164
171
  /** 性别 */
@@ -180,7 +187,7 @@ const rules = computed(() => ({
180
187
  tenant_id: [
181
188
  {
182
189
  required: true,
183
- message: t("common.validation.required_select", { field: t("system.base.user.field.tenant") }),
190
+ message: t("common.validation.required_select", { field: t("common.field.tenant") }),
184
191
  trigger: "change"
185
192
  }
186
193
  ],
@@ -223,28 +230,41 @@ const rules = computed(() => ({
223
230
  dept_id: [
224
231
  {
225
232
  required: true,
226
- message: t("common.validation.required_select", { field: t("system.base.user.field.department") }),
233
+ message: t("common.validation.required_select", { field: t("common.field.department") }),
227
234
  trigger: "change"
228
235
  }
229
236
  ],
230
237
  role_id: [
231
238
  {
232
239
  required: true,
233
- message: t("common.validation.required_select", { field: t("system.base.user.field.role") }),
240
+ message: t("common.validation.required_select", { field: t("common.field.role") }),
234
241
  trigger: "change"
235
242
  }
236
243
  ],
237
244
  phone: [
238
245
  { max: 20, message: t("common.validation.max_length", { field: t("common.field.phone"), max: 20 }), trigger: "blur" },
239
246
  {
240
- pattern: /^1[3-9]\d{9}$/,
247
+ pattern: /^(?:1[3-9][0-9*]{9})?$/,
241
248
  message: t("common.validation.phone_invalid"),
242
249
  trigger: "blur"
243
250
  }
244
251
  ],
252
+ email: [
253
+ {
254
+ type: "email",
255
+ message: t("system.base.user.validation.email_invalid"),
256
+ trigger: "blur"
257
+ }
258
+ ],
259
+ id_code: [
260
+ {
261
+ pattern: /^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/,
262
+ message: t("system.base.user.validation.id_code_invalid"),
263
+ trigger: "blur"
264
+ }
265
+ ],
245
266
  pwd: [
246
- { required: true, message: t("core.password.required"), trigger: "blur" },
247
- { validator: validatePasswordField, trigger: "blur" }
267
+ { required: false, trigger: "blur" }
248
268
  ],
249
269
  status: [
250
270
  {
@@ -263,8 +283,7 @@ const rules = computed(() => ({
263
283
  }));
264
284
  const resetPwdRules = computed(() => ({
265
285
  pwd: [
266
- { required: true, message: t("system.base.user.placeholder.new_password"), trigger: "blur" },
267
- { validator: validatePasswordField, trigger: "blur" }
286
+ { required: true, message: t("system.base.user.placeholder.new_password"), trigger: "blur" }
268
287
  ]
269
288
  }));
270
289
 
@@ -276,6 +295,18 @@ const statusOptions = computed<ProFormOption[]>(() => [
276
295
  { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
277
296
  { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
278
297
  ]);
298
+ const idTypeOptions = computed<ProFormOption[]>(() => [
299
+ { label: t("system.base.user.id_type.unspecified"), value: BaseUserIDType.BASE_USER_ID_TYPE_UNSPECIFIED },
300
+ { label: t("system.base.user.id_type.id_card"), value: BaseUserIDType.BASE_USER_ID_TYPE_ID_CARD },
301
+ { label: t("system.base.user.id_type.passport"), value: BaseUserIDType.BASE_USER_ID_TYPE_PASSPORT },
302
+ { label: t("system.base.user.id_type.hk_macao_permit"), value: BaseUserIDType.BASE_USER_ID_TYPE_HK_MACAO_PERMIT },
303
+ { label: t("system.base.user.id_type.taiwan_permit"), value: BaseUserIDType.BASE_USER_ID_TYPE_TAIWAN_PERMIT },
304
+ {
305
+ label: t("system.base.user.id_type.foreign_permanent_residence"),
306
+ value: BaseUserIDType.BASE_USER_ID_TYPE_FOREIGN_PERMANENT_RESIDENCE
307
+ },
308
+ { label: t("system.base.user.id_type.other"), value: BaseUserIDType.BASE_USER_ID_TYPE_OTHER }
309
+ ]);
279
310
  const resetPwdFields = computed<ProFormField[]>(() => [
280
311
  {
281
312
  prop: "pwd",
@@ -307,10 +338,10 @@ const isSuperEditUser = computed(() => Boolean(formData.id && formData.user_name
307
338
  const formFields = computed<ProFormField[]>(() => [
308
339
  {
309
340
  prop: "tenant_id",
310
- label: t("system.base.user.field.tenant"),
341
+ label: t("common.field.tenant"),
311
342
  component: "select",
312
343
  props: {
313
- placeholder: t("system.base.user.placeholder.tenant"),
344
+ placeholder: t("common.placeholder.select"),
314
345
  filterable: true,
315
346
  disabled: Boolean(formData.id),
316
347
  onChange: handleFormTenantChange
@@ -338,18 +369,18 @@ const formFields = computed<ProFormField[]>(() => [
338
369
  },
339
370
  {
340
371
  prop: "role_id",
341
- label: t("system.base.user.field.role"),
372
+ label: t("common.field.role"),
342
373
  component: "select",
343
374
  options: baseRoleOptions.value.map(item => ({ label: item.label, value: item.value, disabled: item.disabled })),
344
375
  props: { placeholder: t("common.placeholder.select"), disabled: isProtectedUserRole.value }
345
376
  },
346
377
  {
347
378
  prop: "dept_id",
348
- label: t("system.base.user.field.department"),
379
+ label: t("common.field.department"),
349
380
  component: "tree-select",
350
381
  options: basedDeptOptions.value as unknown as ProFormOption[],
351
382
  props: {
352
- placeholder: t("system.base.user.placeholder.department"),
383
+ placeholder: t("common.placeholder.select"),
353
384
  filterable: true,
354
385
  checkStrictly: true,
355
386
  renderAfterExpand: false,
@@ -358,10 +389,10 @@ const formFields = computed<ProFormField[]>(() => [
358
389
  },
359
390
  {
360
391
  prop: "post_id",
361
- label: t("system.base.user.field.post"),
392
+ label: t("common.field.post"),
362
393
  component: "select",
363
394
  options: basePostOptions.value.map(item => ({ label: item.label, value: item.value, disabled: item.disabled })),
364
- props: { placeholder: t("system.base.user.placeholder.post"), clearable: true, filterable: true }
395
+ props: { placeholder: t("common.placeholder.select"), clearable: true, filterable: true }
365
396
  },
366
397
  {
367
398
  prop: "phone",
@@ -369,11 +400,30 @@ const formFields = computed<ProFormField[]>(() => [
369
400
  component: "input",
370
401
  props: { placeholder: t("common.validation.phone_required") }
371
402
  },
403
+ {
404
+ prop: "email",
405
+ label: t("system.base.user.field.email"),
406
+ component: "input",
407
+ props: { placeholder: t("system.base.user.placeholder.email") }
408
+ },
409
+ {
410
+ prop: "id_type",
411
+ label: t("system.base.user.field.id_type"),
412
+ component: "select",
413
+ options: idTypeOptions.value,
414
+ props: { placeholder: t("common.placeholder.select") }
415
+ },
416
+ {
417
+ prop: "id_code",
418
+ label: t("system.base.user.field.id_code"),
419
+ component: "input",
420
+ props: { placeholder: t("system.base.user.placeholder.id_code") }
421
+ },
372
422
  {
373
423
  prop: "pwd",
374
424
  label: t("system.base.user.field.password"),
375
425
  component: "password",
376
- props: { placeholder: t("system.base.user.placeholder.password"), showPassword: true },
426
+ props: { placeholder: t("system.base.user.placeholder.password_optional"), showPassword: true },
377
427
  visible: model => !model.id
378
428
  },
379
429
  {
@@ -406,7 +456,7 @@ const columns = computed<ColumnProps[]>(() => [
406
456
  ? ([
407
457
  {
408
458
  prop: "tenant_id",
409
- label: t("system.base.user.field.tenant_short"),
459
+ label: t("common.field.tenant"),
410
460
  minWidth: 140,
411
461
  showOverflowTooltip: true,
412
462
  search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
@@ -417,16 +467,19 @@ const columns = computed<ColumnProps[]>(() => [
417
467
  { prop: "user_name", label: t("system.base.user.field.user_name"), minWidth: 140, search: { el: "input" } },
418
468
  { prop: "user_code", label: t("system.base.user.field.user_code"), minWidth: 140, search: { el: "input" } },
419
469
  { prop: "nick_name", label: t("system.base.user.field.nick_name_short"), minWidth: 100, search: { el: "input" } },
420
- { prop: "role_id", label: t("system.base.user.field.role"), minWidth: 140, enum: requestRoleOptions },
470
+ { prop: "role_id", label: t("common.field.role"), minWidth: 140, enum: requestRoleOptions },
421
471
  {
422
472
  prop: "dept_id",
423
- label: t("system.base.user.field.department_short"),
473
+ label: t("common.field.department"),
424
474
  minWidth: 180,
425
475
  showOverflowTooltip: true,
426
476
  enum: requestDeptOptions
427
477
  },
428
- { prop: "post_id", label: t("system.base.user.field.post_short"), minWidth: 120, enum: requestPostOptions },
478
+ { prop: "post_id", label: t("common.field.post"), minWidth: 120, enum: requestPostOptions },
429
479
  { prop: "phone", label: t("common.field.phone"), minWidth: 130, search: { el: "input" } },
480
+ { prop: "email", label: t("system.base.user.field.email"), minWidth: 180, search: { el: "input" } },
481
+ { prop: "id_type", label: t("system.base.user.field.id_type"), minWidth: 150, enum: idTypeOptions },
482
+ { prop: "id_code", label: t("system.base.user.field.id_code"), minWidth: 180, showOverflowTooltip: true },
430
483
  {
431
484
  prop: "gender",
432
485
  label: t("system.base.user.field.gender"),
@@ -687,6 +740,9 @@ function resetForm() {
687
740
  formData.dept_id = undefined;
688
741
  formData.post_id = undefined;
689
742
  formData.phone = "";
743
+ formData.email = "";
744
+ formData.id_type = BaseUserIDType.BASE_USER_ID_TYPE_UNSPECIFIED;
745
+ formData.id_code = "";
690
746
  formData.pwd = "";
691
747
  formData.gender = 3;
692
748
  formData.avatar = "";
@@ -746,7 +802,10 @@ const handleSubmit = useDebounceFn(() => {
746
802
  const submitData = JSON.parse(JSON.stringify(formData)) as BaseUserFormState;
747
803
  const baseUser = {
748
804
  ...submitData,
749
- pwd: submitData.id ? undefined : await encryptPassword(submitData.pwd, PASSWORD_CRYPTO_SCENE.PASSWORD_CRYPTO_SCENE_CREATE_BASE_USER)
805
+ pwd:
806
+ submitData.id || !submitData.pwd
807
+ ? undefined
808
+ : await encryptPassword(submitData.pwd, PASSWORD_CRYPTO_SCENE.PASSWORD_CRYPTO_SCENE_CREATE_BASE_USER)
750
809
  } as BaseUserForm;
751
810
  const request = submitData.id
752
811
  ? defBaseUserService.UpdateBaseUser({ base_user: baseUser })
@@ -832,26 +891,6 @@ function handleDelete(selected?: number | string | Array<number | string> | Base
832
891
  );
833
892
  }
834
893
 
835
- /**
836
- * 校验密码强度,新增用户和重置密码统一要求达到最高强度。
837
- *
838
- * @param _rule 表单规则对象
839
- * @param value 当前密码值
840
- * @param callback 校验回调
841
- */
842
- function validatePasswordField(_rule: unknown, value: string, callback: (error?: Error) => void) {
843
- if (!value) {
844
- callback();
845
- return;
846
- }
847
- const result = validatePasswordStrengthValue(value);
848
- if (!result.valid) {
849
- callback(new Error(t("core.password.error")));
850
- return;
851
- }
852
- callback();
853
- }
854
-
855
894
  /**
856
895
  * 根据后端管理保护标记判断用户是否禁止通过用户管理操作。
857
896
  */
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <div class="table-box">
3
3
  <ProTable ref="proTable" row-key="id" :columns="columns" :header-actions="headerActions" :request-api="requestTable" />
4
- <el-dialog v-model="detailVisible" :title="detail?.title" width="720px" destroy-on-close>
4
+ <ProDialog v-model="detailVisible" :title="detail?.title" width="720px" destroy-on-close :show-footer="false">
5
5
  <div v-if="detail" class="message-detail">
6
6
  <div class="message-meta">
7
7
  <span class="message-category" :style="{ color: detail.category_color || undefined }">
8
8
  <component :is="resolveNotificationIcon(detail.category_icon)" />
9
- {{ detail.category_name }}
9
+ <span class="message-category__name">{{ detail.category_name }}</span>
10
10
  </span>
11
11
  <span>{{ detail.sender_name }}</span>
12
12
  <span>{{ detail.received_at }}</span>
@@ -26,21 +26,26 @@
26
26
  {{ t("common.action.view") }}
27
27
  </el-button>
28
28
  </div>
29
- </el-dialog>
29
+ </ProDialog>
30
30
  </div>
31
31
  </template>
32
32
 
33
33
  <script setup lang="ts">
34
- import { computed, h, ref } from "vue";
34
+ import { computed, h, onMounted, ref } from "vue";
35
35
  import { useRouter } from "vue-router";
36
36
  import ProTable from "@liujitcn/kratos-admin-core/components/ProTable";
37
+ import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
37
38
  import type { ColumnProps, HeaderActionProps, ProTableInstance } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
38
39
  import type { ProFormOption } from "@liujitcn/kratos-admin-core/components/ProForm/interface";
39
40
  import RichTextPreview from "@liujitcn/kratos-admin-core/components/RichTextPreview/index.vue";
40
41
  import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
41
42
  import { t } from "@liujitcn/kratos-admin-core";
42
- import { defNotificationService } from "@liujitcn/kratos-admin-system/api/base/notification";
43
- import type { Notification, PageNotificationRequest } from "@liujitcn/kratos-admin-system/rpc/base/v1/notification";
43
+ import { defNotificationService } from "@liujitcn/kratos-admin-system/api/base/v1/notification";
44
+ import type {
45
+ Notification,
46
+ NotificationCategory,
47
+ PageNotificationRequest
48
+ } from "@liujitcn/kratos-admin-system/rpc/base/v1/notification";
44
49
  import {
45
50
  MessageActionType,
46
51
  MessageContentFormat,
@@ -53,6 +58,7 @@ const proTable = ref<ProTableInstance>();
53
58
  const router = useRouter();
54
59
  const detailVisible = ref(false);
55
60
  const detail = ref<Notification>();
61
+ const categoryOptions = ref<NotificationCategory[]>([]);
56
62
  const actionRouteName = computed(() => {
57
63
  const viewKey = detail.value?.action_target;
58
64
  if (!viewKey) return "";
@@ -81,12 +87,19 @@ const viewOptions = computed<ProFormOption[]>(() => [
81
87
  { label: t("system.notification.view.archived"), value: NotificationView.NOTIFICATION_VIEW_ARCHIVED }
82
88
  ]);
83
89
 
90
+ const categoryFilterOptions = computed<ProFormOption[]>(() =>
91
+ categoryOptions.value.map(item => ({ label: item.name, value: item.id }))
92
+ );
93
+
94
+ onMounted(() => void loadCategoryOptions());
95
+
84
96
  const columns = computed<ColumnProps[]>(() => [
85
97
  { prop: "title", label: t("system.base.message.field.title"), minWidth: 240 },
86
98
  {
87
99
  prop: "category_name",
88
100
  label: t("system.base.message.field.category"),
89
101
  minWidth: 150,
102
+ search: { el: "select", key: "category_id", enum: categoryFilterOptions },
90
103
  render: scope => {
91
104
  const row = scope.row as Notification;
92
105
  return h("span", { class: "message-category", style: { color: row.category_color || undefined } }, [
@@ -158,6 +171,12 @@ async function requestTable(params: Record<string, unknown>) {
158
171
  return { data: { list: data.notifications ?? [], total: data.total } };
159
172
  }
160
173
 
174
+ /** 加载消息分类筛选项。 */
175
+ async function loadCategoryOptions() {
176
+ const result = await defNotificationService.ListNotificationCategories({});
177
+ categoryOptions.value = result.categories ?? [];
178
+ }
179
+
161
180
  /** 打开消息详情并标记已读。 */
162
181
  async function openDetail(row: Notification) {
163
182
  detail.value = await defNotificationService.GetNotification({ id: row.id });
@@ -203,12 +222,12 @@ async function restore(row: Notification) {
203
222
 
204
223
  /** 从个人收件箱删除消息。 */
205
224
  async function remove(row: Notification) {
206
- await ElMessageBox.confirm(t("common.confirm.delete"), t("common.tips"), { type: "warning" });
225
+ await ElMessageBox.confirm(t("common.confirm.delete"), t("common.title.warning"), { type: "warning" });
207
226
  await defNotificationService.DeleteNotification({ id: row.id });
208
227
  proTable.value?.getTableList();
209
228
  }
210
229
 
211
- /** 解析收件箱分类图标,兼容历史数据中的未知图标名。 */
230
+ /** 解析收件箱分类图标,未知图标使用默认图标。 */
212
231
  function resolveNotificationIcon(icon: string) {
213
232
  return notificationIcons[icon as keyof typeof notificationIcons] ?? CollectionTag;
214
233
  }
@@ -223,13 +242,21 @@ function resolveNotificationIcon(icon: string) {
223
242
  color: var(--el-text-color-secondary);
224
243
  }
225
244
 
226
- .message-category {
245
+ :deep(.message-category) {
227
246
  display: inline-flex;
228
- align-items: center;
229
247
  gap: 6px;
248
+ align-items: center;
249
+ line-height: 18px;
250
+ }
251
+
252
+ :deep(.message-category > svg) {
253
+ flex: 0 0 18px;
254
+ width: 18px;
255
+ height: 18px;
230
256
  }
231
257
 
232
- .message-category__name {
258
+ :deep(.message-category__name) {
259
+ white-space: nowrap;
233
260
  color: var(--el-text-color-primary);
234
261
  }
235
262
 
@@ -43,11 +43,23 @@
43
43
  <span class="detail-value">{{ profile.phone || t("system.profile.value.unbound") }}</span>
44
44
  </div>
45
45
  <div class="detail-item">
46
- <span class="detail-label">{{ t("system.profile.account.field.role") }}</span>
46
+ <span class="detail-label">{{ t("system.profile.account.field.email") }}</span>
47
+ <span class="detail-value">{{ profile.email || t("system.profile.value.unbound") }}</span>
48
+ </div>
49
+ <div class="detail-item">
50
+ <span class="detail-label">{{ t("system.profile.account.field.id_type") }}</span>
51
+ <span class="detail-value">{{ idTypeText }}</span>
52
+ </div>
53
+ <div class="detail-item">
54
+ <span class="detail-label">{{ t("system.profile.account.field.id_code") }}</span>
55
+ <span class="detail-value">{{ profile.id_code || t("system.profile.value.unbound") }}</span>
56
+ </div>
57
+ <div class="detail-item">
58
+ <span class="detail-label">{{ t("common.field.role") }}</span>
47
59
  <span class="detail-value">{{ profile.role_name || "--" }}</span>
48
60
  </div>
49
61
  <div class="detail-item">
50
- <span class="detail-label">{{ t("system.profile.account.field.dept") }}</span>
62
+ <span class="detail-label">{{ t("common.field.department") }}</span>
51
63
  <span class="detail-value">{{ profile.dept_name || "--" }}</span>
52
64
  </div>
53
65
  <div class="detail-item detail-item--wide">
@@ -63,7 +75,7 @@
63
75
  :width="520"
64
76
  @closed="handleDialogClosed"
65
77
  >
66
- <ProForm ref="accountFormRef" :model="accountForm" :fields="accountFormFields" />
78
+ <ProForm ref="accountFormRef" :model="accountForm" :fields="accountFormFields" :rules="accountFormRules" />
67
79
  <template #footer>
68
80
  <div class="dialog-footer">
69
81
  <el-button @click="accountDialogVisible = false">{{ t("common.action.cancel") }}</el-button>
@@ -79,9 +91,10 @@
79
91
  <script setup lang="ts">
80
92
  import { computed, reactive, ref, watch } from "vue";
81
93
  import { t } from "@liujitcn/kratos-admin-core";
82
- import { defProfileAuthService } from "@liujitcn/kratos-admin-system/api/system/auth";
94
+ import { defProfileAuthService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/auth";
83
95
  import type { UserProfileForm } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/auth";
84
- import { defFileService } from "@liujitcn/kratos-admin-core/api/base/file";
96
+ import { BaseUserIDType } from "@liujitcn/kratos-admin-system/rpc/system/common/v1/common";
97
+ import { defFileService } from "@liujitcn/kratos-admin-core/api/base/v1/file";
85
98
  import defaultAvatar from "@liujitcn/kratos-admin-core/assets/images/avatar.png";
86
99
  import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
87
100
  import ProForm from "@liujitcn/kratos-admin-core/components/ProForm/index.vue";
@@ -104,9 +117,12 @@ const accountFormRef = ref<ProFormInstance>();
104
117
  const accountDialogVisible = ref(false);
105
118
  const submitLoading = ref(false);
106
119
  const avatarSrc = ref(defaultAvatar);
107
- const accountForm = reactive<Pick<UserProfileForm, "nick_name" | "gender">>({
120
+ const accountForm = reactive<Pick<UserProfileForm, "nick_name" | "gender" | "email" | "id_type" | "id_code">>({
108
121
  nick_name: "",
109
- gender: 3
122
+ gender: 3,
123
+ email: "",
124
+ id_type: BaseUserIDType.BASE_USER_ID_TYPE_UNSPECIFIED,
125
+ id_code: ""
110
126
  });
111
127
 
112
128
  const accountFormFields = computed<ProFormField[]>(() => [
@@ -121,9 +137,52 @@ const accountFormFields = computed<ProFormField[]>(() => [
121
137
  label: t("system.profile.account.field.gender"),
122
138
  component: "dict",
123
139
  props: { code: "base_user_gender" }
140
+ },
141
+ {
142
+ prop: "email",
143
+ label: t("system.profile.account.field.email"),
144
+ component: "input",
145
+ props: { placeholder: t("system.base.user.placeholder.email") }
146
+ },
147
+ {
148
+ prop: "id_type",
149
+ label: t("system.profile.account.field.id_type"),
150
+ component: "select",
151
+ options: idTypeOptions.value,
152
+ props: { placeholder: t("common.placeholder.select") }
153
+ },
154
+ {
155
+ prop: "id_code",
156
+ label: t("system.profile.account.field.id_code"),
157
+ component: "input",
158
+ props: { placeholder: t("system.base.user.placeholder.id_code") }
124
159
  }
125
160
  ]);
126
161
 
162
+ const idTypeOptions = computed(() => [
163
+ { label: t("system.base.user.id_type.unspecified"), value: BaseUserIDType.BASE_USER_ID_TYPE_UNSPECIFIED },
164
+ { label: t("system.base.user.id_type.id_card"), value: BaseUserIDType.BASE_USER_ID_TYPE_ID_CARD },
165
+ { label: t("system.base.user.id_type.passport"), value: BaseUserIDType.BASE_USER_ID_TYPE_PASSPORT },
166
+ { label: t("system.base.user.id_type.hk_macao_permit"), value: BaseUserIDType.BASE_USER_ID_TYPE_HK_MACAO_PERMIT },
167
+ { label: t("system.base.user.id_type.taiwan_permit"), value: BaseUserIDType.BASE_USER_ID_TYPE_TAIWAN_PERMIT },
168
+ {
169
+ label: t("system.base.user.id_type.foreign_permanent_residence"),
170
+ value: BaseUserIDType.BASE_USER_ID_TYPE_FOREIGN_PERMANENT_RESIDENCE
171
+ },
172
+ { label: t("system.base.user.id_type.other"), value: BaseUserIDType.BASE_USER_ID_TYPE_OTHER }
173
+ ]);
174
+
175
+ const accountFormRules = computed(() => ({
176
+ email: [{ type: "email", message: t("system.base.user.validation.email_invalid"), trigger: "blur" }],
177
+ id_code: [
178
+ {
179
+ pattern: /^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/,
180
+ message: t("system.base.user.validation.id_code_invalid"),
181
+ trigger: "blur"
182
+ }
183
+ ]
184
+ }));
185
+
127
186
  /** 根据资料中的性别值输出展示文案。 */
128
187
  const genderText = computed(() => {
129
188
  if (props.profile.gender === 1) return t("common.value.male");
@@ -131,6 +190,11 @@ const genderText = computed(() => {
131
190
  return t("system.profile.value.private");
132
191
  });
133
192
 
193
+ /** 根据证件类型输出展示文案。 */
194
+ const idTypeText = computed(() => {
195
+ return idTypeOptions.value.find(item => item.value === props.profile.id_type)?.label ?? t("system.profile.value.unbound");
196
+ });
197
+
134
198
  /**
135
199
  * 同步个人中心头像展示,优先使用用户头像,为空时回退默认头像。
136
200
  *
@@ -146,6 +210,9 @@ watch(
146
210
  profile => {
147
211
  accountForm.nick_name = profile.nick_name;
148
212
  accountForm.gender = profile.gender;
213
+ accountForm.email = profile.email;
214
+ accountForm.id_type = profile.id_type;
215
+ accountForm.id_code = profile.id_code;
149
216
  syncAvatarSrc(profile.avatar);
150
217
  },
151
218
  { immediate: true, deep: true }
@@ -166,6 +233,9 @@ function triggerFileUpload() {
166
233
  function openAccountDialog() {
167
234
  accountForm.nick_name = props.profile.nick_name;
168
235
  accountForm.gender = props.profile.gender;
236
+ accountForm.email = props.profile.email;
237
+ accountForm.id_type = props.profile.id_type;
238
+ accountForm.id_code = props.profile.id_code;
169
239
  accountDialogVisible.value = true;
170
240
  }
171
241
 
@@ -202,7 +272,10 @@ async function handleSubmitAccount() {
202
272
  user_profile: {
203
273
  ...props.profile,
204
274
  nick_name: accountForm.nick_name,
205
- gender: accountForm.gender
275
+ gender: accountForm.gender,
276
+ email: accountForm.email,
277
+ id_type: accountForm.id_type,
278
+ id_code: accountForm.id_code
206
279
  }
207
280
  });
208
281
  ElMessage.success(t("system.profile.account.message.updated"));
@@ -218,6 +291,9 @@ function handleDialogClosed() {
218
291
  accountFormRef.value?.clearValidate();
219
292
  accountForm.nick_name = props.profile.nick_name;
220
293
  accountForm.gender = props.profile.gender;
294
+ accountForm.email = props.profile.email;
295
+ accountForm.id_type = props.profile.id_type;
296
+ accountForm.id_code = props.profile.id_code;
221
297
  }
222
298
  </script>
223
299