@liujitcn/kratos-admin-system 0.0.31 → 0.0.33

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 (341) 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_redact_output_policy.d.ts +19 -0
  19. package/dist/package/declarations/src/api/system/admin/v1/base_redact_rule.d.ts +22 -0
  20. package/dist/package/declarations/src/api/system/admin/v1/base_redact_storage_policy.d.ts +19 -0
  21. package/dist/package/declarations/src/api/system/admin/v1/base_table_archive.d.ts +20 -0
  22. package/dist/package/declarations/src/api/system/admin/v1/base_table_archive_record.d.ts +11 -0
  23. package/dist/package/declarations/src/api/system/admin/v1/base_table_archive_restore.d.ts +14 -0
  24. package/dist/package/declarations/src/api/system/admin/v1/base_table_backup.d.ts +20 -0
  25. package/dist/package/declarations/src/api/system/admin/v1/base_table_backup_record.d.ts +11 -0
  26. package/dist/package/declarations/src/api/system/admin/v1/base_table_backup_restore.d.ts +14 -0
  27. package/dist/package/declarations/src/api/system/admin/v1/base_table_source.d.ts +11 -0
  28. package/dist/package/declarations/src/api/system/admin/v1/cache.d.ts +7 -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 +1376 -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_output_policy.d.ts +135 -0
  59. package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_rule.d.ts +107 -0
  60. package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_storage_policy.d.ts +114 -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-output-policy/index.vue.d.ts +3 -0
  87. package/dist/package/declarations/src/views/base/redact-rule/index.vue.d.ts +3 -0
  88. package/dist/package/declarations/src/views/base/redact-storage-policy/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_redact_output_policy.ts +51 -0
  110. package/dist/package/src/api/system/admin/v1/base_redact_rule.ts +27 -0
  111. package/dist/package/src/api/system/admin/v1/base_redact_storage_policy.ts +51 -0
  112. package/dist/package/src/api/system/admin/v1/base_table_archive.ts +70 -0
  113. package/dist/package/src/api/system/admin/v1/base_table_archive_record.ts +33 -0
  114. package/dist/package/src/api/system/admin/v1/base_table_archive_restore.ts +44 -0
  115. package/dist/package/src/api/system/admin/v1/base_table_backup.ts +70 -0
  116. package/dist/package/src/api/system/admin/v1/base_table_backup_record.ts +33 -0
  117. package/dist/package/src/api/system/admin/v1/base_table_backup_restore.ts +44 -0
  118. package/dist/package/src/api/system/admin/v1/base_table_source.ts +33 -0
  119. package/dist/package/src/api/system/admin/v1/cache.ts +22 -0
  120. package/dist/package/src/api/system/{code_gen_column.ts → admin/v1/code_gen_column.ts} +19 -3
  121. package/dist/package/src/api/system/{code_gen_table.ts → admin/v1/code_gen_table.ts} +13 -4
  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 +358 -127
  137. package/dist/package/src/locales/ja-JP.json +358 -127
  138. package/dist/package/src/locales/zh-CN.json +358 -127
  139. package/dist/package/src/locales/zh-TW.json +358 -127
  140. package/dist/package/src/module.ts +3 -1
  141. package/dist/package/src/rpc/base/v1/ai_message.ts +1 -1
  142. package/dist/package/src/rpc/base/v1/ai_session.ts +1 -1
  143. package/dist/package/src/rpc/base/v1/ai_tool.ts +1 -1
  144. package/dist/package/src/rpc/base/v1/config.ts +1 -1
  145. package/dist/package/src/rpc/base/v1/login.ts +5 -3
  146. package/dist/package/src/rpc/base/v1/notification.ts +29 -1
  147. package/dist/package/src/rpc/base/v1/oauth.ts +1 -1
  148. package/dist/package/src/rpc/base/v1/oauth_client.ts +1 -1
  149. package/dist/package/src/rpc/base/v1/sse.ts +1 -1
  150. package/dist/package/src/rpc/common/v1/analytics.ts +1 -1
  151. package/dist/package/src/rpc/common/v1/common.ts +1 -1
  152. package/dist/package/src/rpc/common/v1/enum.ts +1 -1
  153. package/dist/package/src/rpc/common/v1/types.ts +1 -1
  154. package/dist/package/src/rpc/google/protobuf/empty.ts +1 -1
  155. package/dist/package/src/rpc/google/protobuf/timestamp.ts +1 -1
  156. package/dist/package/src/rpc/system/admin/v1/auth.ts +14 -1
  157. package/dist/package/src/rpc/system/admin/v1/base_api.ts +3 -1
  158. package/dist/package/src/rpc/system/admin/v1/base_api_log.ts +102 -0
  159. package/dist/package/src/rpc/system/admin/v1/base_area.ts +1 -1
  160. package/dist/package/src/rpc/system/admin/v1/base_config.ts +43 -1
  161. package/dist/package/src/rpc/system/admin/v1/base_dashboard.ts +1 -1
  162. package/dist/package/src/rpc/system/admin/v1/base_data_access_log.ts +135 -0
  163. package/dist/package/src/rpc/system/admin/v1/base_dept.ts +1 -1
  164. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +1 -113
  165. package/dist/package/src/rpc/system/admin/v1/base_dict_item.ts +126 -0
  166. package/dist/package/src/rpc/system/admin/v1/base_file.ts +1 -1
  167. package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +1 -1
  168. package/dist/package/src/rpc/system/admin/v1/base_job.ts +6 -63
  169. package/dist/package/src/rpc/system/admin/v1/base_job_log.ts +75 -0
  170. package/dist/package/src/rpc/system/admin/v1/base_language.ts +1 -1
  171. package/dist/package/src/rpc/system/admin/v1/base_log.ts +90 -0
  172. package/dist/package/src/rpc/system/admin/v1/base_login_log.ts +113 -0
  173. package/dist/package/src/rpc/system/admin/v1/base_login_policy.ts +192 -43
  174. package/dist/package/src/rpc/system/admin/v1/base_menu.ts +1 -1
  175. package/dist/package/src/rpc/system/admin/v1/base_message.ts +1 -1
  176. package/dist/package/src/rpc/system/admin/v1/base_message_category.ts +1 -1
  177. package/dist/package/src/rpc/system/admin/v1/base_migration.ts +1 -1
  178. package/dist/package/src/rpc/system/admin/v1/base_operation_log.ts +127 -0
  179. package/dist/package/src/rpc/system/admin/v1/base_permission_log.ts +142 -0
  180. package/dist/package/src/rpc/system/admin/v1/base_policy_evaluation_log.ts +143 -0
  181. package/dist/package/src/rpc/system/admin/v1/base_post.ts +1 -1
  182. package/dist/package/src/rpc/system/admin/v1/base_redact_common.ts +17 -0
  183. package/dist/package/src/rpc/system/admin/v1/base_redact_output_policy.ts +157 -0
  184. package/dist/package/src/rpc/system/admin/v1/base_redact_rule.ts +127 -0
  185. package/dist/package/src/rpc/system/admin/v1/base_redact_storage_policy.ts +137 -0
  186. package/dist/package/src/rpc/system/admin/v1/base_role.ts +1 -1
  187. package/dist/package/src/rpc/system/admin/v1/base_session.ts +1 -1
  188. package/dist/package/src/rpc/system/admin/v1/base_table_archive.ts +109 -0
  189. package/dist/package/src/rpc/system/admin/v1/base_table_archive_record.ts +95 -0
  190. package/dist/package/src/rpc/system/admin/v1/base_table_archive_restore.ts +93 -0
  191. package/dist/package/src/rpc/system/admin/v1/base_table_backup.ts +91 -0
  192. package/dist/package/src/rpc/system/admin/v1/base_table_backup_record.ts +82 -0
  193. package/dist/package/src/rpc/system/admin/v1/base_table_backup_restore.ts +91 -0
  194. package/dist/package/src/rpc/system/admin/v1/base_table_source.ts +26 -0
  195. package/dist/package/src/rpc/system/admin/v1/base_tenant.ts +1 -1
  196. package/dist/package/src/rpc/system/admin/v1/base_third_account.ts +1 -1
  197. package/dist/package/src/rpc/system/admin/v1/base_user.ts +16 -1
  198. package/dist/package/src/rpc/system/admin/v1/cache.ts +59 -0
  199. package/dist/package/src/rpc/system/admin/v1/code_gen.ts +1 -1
  200. package/dist/package/src/rpc/system/admin/v1/code_gen_column.ts +3 -1
  201. package/dist/package/src/rpc/system/admin/v1/code_gen_proto.ts +1 -1
  202. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +9 -1
  203. package/dist/package/src/rpc/system/admin/v1/common.ts +1 -1
  204. package/dist/package/src/rpc/system/admin/v1/oauth_client.ts +1 -1
  205. package/dist/package/src/rpc/system/admin/v1/ops_monitoring.ts +1 -1
  206. package/dist/package/src/rpc/system/admin/v1/project_document.ts +1 -1
  207. package/dist/package/src/rpc/system/admin/v1/runtime_log.ts +1 -1
  208. package/dist/package/src/rpc/system/common/v1/common.ts +35 -0
  209. package/dist/package/src/rpc/system/config/v1/system_config.ts +16 -0
  210. package/dist/package/src/{api/system → utils}/code_gen_i18n.ts +1 -1
  211. package/dist/package/src/{api/system → utils}/code_gen_sse.ts +1 -1
  212. package/dist/package/src/utils/notification-response.ts +22 -0
  213. package/dist/package/src/{api/system → utils}/ops_monitoring_sse.ts +1 -1
  214. package/dist/package/src/{api/system → utils}/runtime_log_sse.ts +1 -1
  215. package/dist/package/src/views/ai/chat/components/AiMarkdown.vue +1 -1
  216. package/dist/package/src/views/ai/chat/components/ChatPanel.vue +2 -4
  217. package/dist/package/src/views/ai/chat/components/XSender.vue +1 -1
  218. package/dist/package/src/views/ai/chat/index.vue +3 -3
  219. package/dist/package/src/views/ai/chat/message.ts +3 -8
  220. package/dist/package/src/views/base/api/index.vue +4 -4
  221. package/dist/package/src/views/base/api-log/index.vue +56 -45
  222. package/dist/package/src/views/base/area/index.vue +1 -1
  223. package/dist/package/src/views/base/backup-management/archive-config/index.vue +151 -0
  224. package/dist/package/src/views/base/backup-management/archive-record/index.vue +44 -0
  225. package/dist/package/src/views/base/backup-management/archive-restore/index.vue +59 -0
  226. package/dist/package/src/views/base/backup-management/backup-config/index.vue +119 -0
  227. package/dist/package/src/views/base/backup-management/backup-record/index.vue +41 -0
  228. package/dist/package/src/views/base/backup-management/backup-restore/index.vue +66 -0
  229. package/dist/package/src/views/base/config/index.vue +16 -25
  230. package/dist/package/src/views/base/dashboard/index.vue +68 -66
  231. package/dist/package/src/views/base/data-access-log/index.vue +64 -52
  232. package/dist/package/src/views/base/dept/index.vue +11 -11
  233. package/dist/package/src/views/base/dict/index.vue +5 -5
  234. package/dist/package/src/views/base/dict/item.vue +12 -12
  235. package/dist/package/src/views/base/file/index.vue +220 -16
  236. package/dist/package/src/views/base/job/index.vue +5 -5
  237. package/dist/package/src/views/base/job/log.vue +38 -11
  238. package/dist/package/src/views/base/language/index.vue +1 -1
  239. package/dist/package/src/views/base/login-log/index.vue +49 -45
  240. package/dist/package/src/views/base/login-policy/format.ts +4 -0
  241. package/dist/package/src/views/base/login-policy/index.vue +496 -185
  242. package/dist/package/src/views/base/menu/index.vue +17 -17
  243. package/dist/package/src/views/base/message/index.vue +149 -19
  244. package/dist/package/src/views/base/message-category/index.vue +41 -10
  245. package/dist/package/src/views/base/migration/index.vue +2 -2
  246. package/dist/package/src/views/base/oauth-client/index.vue +19 -9
  247. package/dist/package/src/views/base/operation-log/index.vue +54 -50
  248. package/dist/package/src/views/base/permission-log/index.vue +57 -52
  249. package/dist/package/src/views/base/policy-evaluation-log/index.vue +61 -50
  250. package/dist/package/src/views/base/post/index.vue +11 -11
  251. package/dist/package/src/views/base/redact-output-policy/index.vue +324 -0
  252. package/dist/package/src/views/base/redact-rule/index.vue +361 -0
  253. package/dist/package/src/views/base/redact-storage-policy/index.vue +276 -0
  254. package/dist/package/src/views/base/role/index.vue +9 -9
  255. package/dist/package/src/views/base/runtime-config/index.vue +479 -0
  256. package/dist/package/src/views/base/tenant/index.vue +9 -9
  257. package/dist/package/src/views/base/user/components/dept-tree.vue +1 -1
  258. package/dist/package/src/views/base/user/index.vue +86 -47
  259. package/dist/package/src/views/message/inbox/index.vue +38 -11
  260. package/dist/package/src/views/profile/components/base.vue +84 -8
  261. package/dist/package/src/views/profile/components/password.vue +2 -228
  262. package/dist/package/src/views/profile/components/security.vue +3 -3
  263. package/dist/package/src/views/profile/components/session.vue +10 -2
  264. package/dist/package/src/views/profile/index.vue +10 -9
  265. package/dist/package/src/views/tool/api-doc/index.vue +3 -3
  266. package/dist/package/src/views/tool/cache/index.vue +352 -0
  267. package/dist/package/src/views/tool/code-gen/code-preview/index.vue +4 -4
  268. package/dist/package/src/views/tool/code-gen/columns/index.vue +16 -16
  269. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +2 -2
  270. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +2 -2
  271. package/dist/package/src/views/tool/code-gen/config.ts +2 -0
  272. package/dist/package/src/views/tool/code-gen/preview/index.vue +9 -9
  273. package/dist/package/src/views/tool/code-gen/proto/index.vue +10 -12
  274. package/dist/package/src/views/tool/code-gen/table/index.vue +71 -15
  275. package/dist/package/src/views/tool/ops-monitoring/index.vue +31 -96
  276. package/dist/package/src/views/tool/project-doc/index.vue +2 -2
  277. package/dist/package/src/views/tool/runtime-log/index.vue +6 -6
  278. package/package.json +7 -2
  279. package/dist/package/declarations/src/api/system/base_audit_log.d.ts +0 -55
  280. package/dist/package/declarations/src/api/system/base_dict.d.ts +0 -32
  281. package/dist/package/declarations/src/api/system/base_login_policy.d.ts +0 -10
  282. package/dist/package/declarations/src/components/auditLog.d.ts +0 -9
  283. package/dist/package/declarations/src/rpc/system/admin/v1/base_audit_log.d.ts +0 -640
  284. package/dist/package/src/api/base/notification.ts +0 -69
  285. package/dist/package/src/api/system/base_audit_log.ts +0 -168
  286. package/dist/package/src/api/system/base_login_policy.ts +0 -32
  287. package/dist/package/src/components/AuditLogTable.vue +0 -105
  288. package/dist/package/src/components/auditLog.ts +0 -46
  289. package/dist/package/src/rpc/system/admin/v1/base_audit_log.ts +0 -737
  290. /package/dist/package/declarations/src/api/base/{ai_message.d.ts → v1/ai_message.d.ts} +0 -0
  291. /package/dist/package/declarations/src/api/base/{ai_session.d.ts → v1/ai_session.d.ts} +0 -0
  292. /package/dist/package/declarations/src/api/base/{ai_tool.d.ts → v1/ai_tool.d.ts} +0 -0
  293. /package/dist/package/declarations/src/api/base/{oauth.d.ts → v1/oauth.d.ts} +0 -0
  294. /package/dist/package/declarations/src/api/base/{sse.d.ts → v1/sse.d.ts} +0 -0
  295. /package/dist/package/declarations/src/api/system/{auth.d.ts → admin/v1/auth.d.ts} +0 -0
  296. /package/dist/package/declarations/src/api/system/{base_api.d.ts → admin/v1/base_api.d.ts} +0 -0
  297. /package/dist/package/declarations/src/api/system/{base_dashboard.d.ts → admin/v1/base_dashboard.d.ts} +0 -0
  298. /package/dist/package/declarations/src/api/system/{base_dept.d.ts → admin/v1/base_dept.d.ts} +0 -0
  299. /package/dist/package/declarations/src/api/system/{base_file.d.ts → admin/v1/base_file.d.ts} +0 -0
  300. /package/dist/package/declarations/src/api/system/{base_i18n.d.ts → admin/v1/base_i18n.d.ts} +0 -0
  301. /package/dist/package/declarations/src/api/system/{base_menu.d.ts → admin/v1/base_menu.d.ts} +0 -0
  302. /package/dist/package/declarations/src/api/system/{base_message.d.ts → admin/v1/base_message.d.ts} +0 -0
  303. /package/dist/package/declarations/src/api/system/{base_message_category.d.ts → admin/v1/base_message_category.d.ts} +0 -0
  304. /package/dist/package/declarations/src/api/system/{base_migration.d.ts → admin/v1/base_migration.d.ts} +0 -0
  305. /package/dist/package/declarations/src/api/system/{base_post.d.ts → admin/v1/base_post.d.ts} +0 -0
  306. /package/dist/package/declarations/src/api/system/{base_role.d.ts → admin/v1/base_role.d.ts} +0 -0
  307. /package/dist/package/declarations/src/api/system/{base_session.d.ts → admin/v1/base_session.d.ts} +0 -0
  308. /package/dist/package/declarations/src/api/system/{base_tenant.d.ts → admin/v1/base_tenant.d.ts} +0 -0
  309. /package/dist/package/declarations/src/api/system/{base_user.d.ts → admin/v1/base_user.d.ts} +0 -0
  310. /package/dist/package/declarations/src/api/system/{code_gen.d.ts → admin/v1/code_gen.d.ts} +0 -0
  311. /package/dist/package/declarations/src/api/system/{code_gen_column.d.ts → admin/v1/code_gen_column.d.ts} +0 -0
  312. /package/dist/package/declarations/src/api/system/{code_gen_proto.d.ts → admin/v1/code_gen_proto.d.ts} +0 -0
  313. /package/dist/package/declarations/src/api/system/{code_gen_table.d.ts → admin/v1/code_gen_table.d.ts} +0 -0
  314. /package/dist/package/declarations/src/api/system/{oauth_client.d.ts → admin/v1/oauth_client.d.ts} +0 -0
  315. /package/dist/package/declarations/src/api/system/{ops_monitoring.d.ts → admin/v1/ops_monitoring.d.ts} +0 -0
  316. /package/dist/package/declarations/src/api/system/{project_document.d.ts → admin/v1/project_document.d.ts} +0 -0
  317. /package/dist/package/declarations/src/api/system/{runtime_log.d.ts → admin/v1/runtime_log.d.ts} +0 -0
  318. /package/dist/package/src/api/base/{ai_message.ts → v1/ai_message.ts} +0 -0
  319. /package/dist/package/src/api/base/{ai_session.ts → v1/ai_session.ts} +0 -0
  320. /package/dist/package/src/api/base/{ai_tool.ts → v1/ai_tool.ts} +0 -0
  321. /package/dist/package/src/api/base/{oauth.ts → v1/oauth.ts} +0 -0
  322. /package/dist/package/src/api/base/{sse.ts → v1/sse.ts} +0 -0
  323. /package/dist/package/src/api/system/{auth.ts → admin/v1/auth.ts} +0 -0
  324. /package/dist/package/src/api/system/{base_api.ts → admin/v1/base_api.ts} +0 -0
  325. /package/dist/package/src/api/system/{base_dashboard.ts → admin/v1/base_dashboard.ts} +0 -0
  326. /package/dist/package/src/api/system/{base_dept.ts → admin/v1/base_dept.ts} +0 -0
  327. /package/dist/package/src/api/system/{base_file.ts → admin/v1/base_file.ts} +0 -0
  328. /package/dist/package/src/api/system/{base_i18n.ts → admin/v1/base_i18n.ts} +0 -0
  329. /package/dist/package/src/api/system/{base_menu.ts → admin/v1/base_menu.ts} +0 -0
  330. /package/dist/package/src/api/system/{base_migration.ts → admin/v1/base_migration.ts} +0 -0
  331. /package/dist/package/src/api/system/{base_post.ts → admin/v1/base_post.ts} +0 -0
  332. /package/dist/package/src/api/system/{base_role.ts → admin/v1/base_role.ts} +0 -0
  333. /package/dist/package/src/api/system/{base_session.ts → admin/v1/base_session.ts} +0 -0
  334. /package/dist/package/src/api/system/{base_tenant.ts → admin/v1/base_tenant.ts} +0 -0
  335. /package/dist/package/src/api/system/{base_user.ts → admin/v1/base_user.ts} +0 -0
  336. /package/dist/package/src/api/system/{code_gen.ts → admin/v1/code_gen.ts} +0 -0
  337. /package/dist/package/src/api/system/{code_gen_proto.ts → admin/v1/code_gen_proto.ts} +0 -0
  338. /package/dist/package/src/api/system/{oauth_client.ts → admin/v1/oauth_client.ts} +0 -0
  339. /package/dist/package/src/api/system/{ops_monitoring.ts → admin/v1/ops_monitoring.ts} +0 -0
  340. /package/dist/package/src/api/system/{project_document.ts → admin/v1/project_document.ts} +0 -0
  341. /package/dist/package/src/api/system/{runtime_log.ts → admin/v1/runtime_log.ts} +0 -0
@@ -0,0 +1,352 @@
1
+ <template>
2
+ <div class="table-box cache-page">
3
+ <ProTable ref="proTable" row-key="key" :columns="columns" :request-api="requestCacheTable" />
4
+
5
+ <ProDialog
6
+ v-model="detail.visible"
7
+ :title="t('system.cache.detail.title')"
8
+ width="min(960px, calc(100vw - 32px))"
9
+ destroy-on-close
10
+ :show-footer="false"
11
+ >
12
+ <template v-if="detail.entry">
13
+ <div class="cache-detail-meta">
14
+ <code class="cache-detail-key" :title="detail.entry.key">{{ detail.entry.key }}</code>
15
+ <el-tag size="small" effect="plain">{{ cacheTypeLabel(detail.entry.type) }}</el-tag>
16
+ <span class="cache-detail-ttl">{{ formatTtl(detail.entry.ttl_seconds) }}</span>
17
+ </div>
18
+
19
+ <div v-if="detail.entry.type === 'hash'" class="cache-fields">
20
+ <el-empty v-if="!detail.entry.fields?.length" :description="t('common.message.no_data')" />
21
+ <article v-for="field in detail.entry.fields" :key="field.key" class="cache-field">
22
+ <div class="cache-field-header">
23
+ <code class="cache-field-key">{{ field.key }}</code>
24
+ <el-tag size="small" effect="plain" type="info">{{ cacheValueKindLabel(field.value) }}</el-tag>
25
+ </div>
26
+ <CacheValueContent :value="field.value" />
27
+ </article>
28
+ </div>
29
+
30
+ <section v-else class="cache-string-value">
31
+ <div class="cache-value-header">
32
+ <span>{{ t("system.cache.field.value") }}</span>
33
+ <el-tag size="small" effect="plain" type="info">{{ cacheValueKindLabel(detail.entry.value) }}</el-tag>
34
+ </div>
35
+ <CacheValueContent :value="detail.entry.value" />
36
+ </section>
37
+ </template>
38
+ </ProDialog>
39
+ </div>
40
+ </template>
41
+
42
+ <script setup lang="ts">
43
+ import { computed, defineComponent, h, reactive, ref } from "vue";
44
+ import { View } from "@element-plus/icons-vue";
45
+ import ProTable from "@liujitcn/kratos-admin-core/components/ProTable";
46
+ import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
47
+ import type { ColumnProps, ProTableInstance } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
48
+ import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
49
+ import { t } from "@liujitcn/kratos-admin-core";
50
+ import RichTextPreview from "@liujitcn/kratos-admin-core/components/RichTextPreview/index.vue";
51
+ import { defCacheService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/cache";
52
+ import type { CacheEntry, PageCacheRequest } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/cache";
53
+
54
+ defineOptions({ name: "Cache", inheritAttrs: false });
55
+
56
+ const proTable = ref<ProTableInstance>();
57
+ const detail = reactive<{ visible: boolean; entry?: CacheEntry }>({ visible: false });
58
+
59
+ /** 缓存值展示格式。 */
60
+ type CacheValueKind = "text" | "json" | "rich-text";
61
+
62
+ /** 缓存值解析结果。 */
63
+ interface CacheValuePresentation {
64
+ /** 值的展示格式。 */
65
+ kind: CacheValueKind;
66
+ /** 值的展示文本。 */
67
+ value: string;
68
+ }
69
+
70
+ /** 缓存值内容组件,按值的格式选择安全富文本或代码块展示。 */
71
+ const CacheValueContent = defineComponent({
72
+ name: "CacheValueContent",
73
+ props: {
74
+ value: { type: String, default: "" }
75
+ },
76
+ setup(props) {
77
+ return () => {
78
+ const presentation = getCacheValuePresentation(props.value);
79
+ if (presentation.kind === "rich-text") {
80
+ return h(RichTextPreview, { class: "cache-rich-text", modelValue: props.value });
81
+ }
82
+
83
+ return h(
84
+ "pre",
85
+ { class: ["cache-value", { "cache-value--plain": presentation.kind === "text" }] },
86
+ presentation.value || "-"
87
+ );
88
+ };
89
+ }
90
+ });
91
+
92
+ const columns = computed<ColumnProps[]>(() => [
93
+ {
94
+ prop: "key",
95
+ label: t("system.cache.field.key"),
96
+ minWidth: 280,
97
+ search: { el: "input", props: { clearable: true } },
98
+ render: scope => h("code", { class: "cache-key-cell", title: scope.row.key }, scope.row.key)
99
+ },
100
+ {
101
+ prop: "type",
102
+ label: t("system.cache.field.type"),
103
+ width: 100,
104
+ render: scope => h(ElTag, { size: "small", effect: "plain" }, () => cacheTypeLabel(scope.row.type))
105
+ },
106
+ {
107
+ prop: "value",
108
+ label: t("system.cache.field.value"),
109
+ minWidth: 260,
110
+ showOverflowTooltip: false,
111
+ render: scope => renderCachePreview(scope.row as CacheEntry)
112
+ },
113
+ {
114
+ prop: "ttl_seconds",
115
+ label: t("system.cache.field.ttl"),
116
+ width: 130,
117
+ render: scope => formatTtl((scope.row as CacheEntry).ttl_seconds)
118
+ },
119
+ {
120
+ prop: "expires_at",
121
+ label: t("system.cache.field.expires_at"),
122
+ minWidth: 185,
123
+ render: scope => formatDate(scope.row.expires_at)
124
+ },
125
+ {
126
+ prop: "created_at",
127
+ label: t("system.cache.field.created_at"),
128
+ minWidth: 185,
129
+ render: scope => formatDate(scope.row.created_at)
130
+ },
131
+ {
132
+ prop: "updated_at",
133
+ label: t("system.cache.field.updated_at"),
134
+ minWidth: 185,
135
+ render: scope => formatDate(scope.row.updated_at)
136
+ },
137
+ {
138
+ prop: "operation",
139
+ label: t("common.field.operation"),
140
+ width: 90,
141
+ fixed: "right",
142
+ cellType: "actions",
143
+ actions: [
144
+ {
145
+ label: t("common.action.view"),
146
+ type: "primary",
147
+ link: true,
148
+ icon: View,
149
+ onClick: scope => openDetail(scope.row as CacheEntry)
150
+ }
151
+ ]
152
+ }
153
+ ]);
154
+
155
+ /** 请求缓存分页列表。 */
156
+ async function requestCacheTable(params: PageCacheRequest) {
157
+ const response = await defCacheService.PageCache(buildPageRequest(params));
158
+ return { data: { list: response.cache_entries ?? [], total: response.total } };
159
+ }
160
+
161
+ /** 打开缓存条目详情。 */
162
+ function openDetail(entry: CacheEntry) {
163
+ detail.entry = entry;
164
+ detail.visible = true;
165
+ }
166
+
167
+ /** 渲染列表中的缓存值摘要,避免长文本撑开表格或触发整段浮层。 */
168
+ function renderCachePreview(entry: CacheEntry) {
169
+ if (entry.type === "hash") {
170
+ return h(
171
+ "div",
172
+ { class: "cache-preview" },
173
+ h("span", { class: "cache-preview-text" }, t("system.cache.value.hash_fields", { count: entry.fields?.length ?? 0 }))
174
+ );
175
+ }
176
+
177
+ const presentation = getCacheValuePresentation(entry.value);
178
+ return h("div", { class: "cache-preview" }, [
179
+ h(ElTag, { size: "small", effect: "plain", type: "info" }, () => cacheValueKindLabel(entry.value)),
180
+ h("span", { class: "cache-preview-text" }, summarizeCacheValue(presentation.value, presentation.kind))
181
+ ]);
182
+ }
183
+
184
+ /** 获取缓存类型的本地化名称。 */
185
+ function cacheTypeLabel(type: string) {
186
+ return type === "hash" ? t("system.cache.type.hash") : t("system.cache.type.string");
187
+ }
188
+
189
+ /** 获取缓存值格式的本地化名称。 */
190
+ function cacheValueKindLabel(value: string) {
191
+ const { kind } = getCacheValuePresentation(value);
192
+ return t(`system.cache.value.kind.${kind}`);
193
+ }
194
+
195
+ /** 解析缓存值,优先识别对象/数组 JSON,再识别 HTML 富文本。 */
196
+ function getCacheValuePresentation(value: string): CacheValuePresentation {
197
+ const normalizedValue = value ?? "";
198
+ try {
199
+ const parsedValue: unknown = JSON.parse(normalizedValue);
200
+ if (parsedValue !== null && typeof parsedValue === "object") {
201
+ return { kind: "json", value: JSON.stringify(parsedValue, null, 2) };
202
+ }
203
+ } catch {
204
+ // 普通文本和富文本不是 JSON,继续按内容特征识别。
205
+ }
206
+
207
+ if (isRichTextValue(normalizedValue)) return { kind: "rich-text", value: normalizedValue };
208
+ return { kind: "text", value: normalizedValue };
209
+ }
210
+
211
+ /** 判断字符串是否包含可渲染的 HTML 元素。 */
212
+ function isRichTextValue(value: string) {
213
+ if (!/<[a-z][^>]*>/i.test(value)) return false;
214
+ if (typeof DOMParser === "undefined") return /<\/[a-z][^>]*>/i.test(value);
215
+ const document = new DOMParser().parseFromString(value, "text/html");
216
+ return document.body.children.length > 0;
217
+ }
218
+
219
+ /** 将值压缩为适合列表单元格的单行摘要。 */
220
+ function summarizeCacheValue(value: string, kind: CacheValueKind, maxLength = 120) {
221
+ let summarySource = value;
222
+ if (kind === "rich-text") {
223
+ const document = typeof DOMParser === "undefined" ? undefined : new DOMParser().parseFromString(value, "text/html");
224
+ summarySource = document?.body.textContent ?? value.replace(/<[^>]+>/g, " ");
225
+ }
226
+ const summary = summarySource.replace(/\s+/g, " ").trim();
227
+ if (!summary) return "-";
228
+ return summary.length > maxLength ? `${summary.slice(0, maxLength)}...` : summary;
229
+ }
230
+
231
+ /** 格式化缓存剩余有效期。 */
232
+ function formatTtl(ttl: number) {
233
+ if (ttl < 0) return t("system.cache.value.persistent");
234
+ if (ttl === 0) return t("system.cache.value.expiring");
235
+ if (ttl < 60) return `${ttl}s`;
236
+ if (ttl < 3600) return `${Math.floor(ttl / 60)}m ${ttl % 60}s`;
237
+ return `${Math.floor(ttl / 3600)}h ${Math.floor((ttl % 3600) / 60)}m`;
238
+ }
239
+
240
+ /** 格式化时间字段。 */
241
+ function formatDate(value: string) {
242
+ if (!value) return "-";
243
+ const date = new Date(value);
244
+ return Number.isNaN(date.getTime()) ? value : date.toLocaleString();
245
+ }
246
+ </script>
247
+
248
+ <style lang="scss" scoped>
249
+ .cache-page {
250
+ padding: 16px;
251
+ }
252
+ :deep(.cache-preview) {
253
+ display: flex;
254
+ gap: 8px;
255
+ align-items: center;
256
+ min-width: 0;
257
+ overflow: hidden;
258
+ white-space: nowrap;
259
+ }
260
+ :deep(.cache-preview-text) {
261
+ display: block;
262
+ flex: 1 1 auto;
263
+ min-width: 0;
264
+ overflow: hidden;
265
+ text-overflow: ellipsis;
266
+ color: var(--admin-page-text-secondary);
267
+ white-space: nowrap;
268
+ }
269
+ .cache-key-cell {
270
+ display: block;
271
+ overflow: hidden;
272
+ text-overflow: ellipsis;
273
+ white-space: nowrap;
274
+ }
275
+ .cache-detail-meta {
276
+ display: flex;
277
+ gap: 10px;
278
+ align-items: center;
279
+ margin-bottom: 16px;
280
+ }
281
+ .cache-detail-key {
282
+ flex: 1;
283
+ overflow: hidden;
284
+ text-overflow: ellipsis;
285
+ font-family: var(--el-font-family-monospace);
286
+ color: var(--admin-page-text-primary);
287
+ white-space: nowrap;
288
+ }
289
+ .cache-detail-ttl {
290
+ font-size: 13px;
291
+ color: var(--el-text-color-secondary);
292
+ }
293
+ .cache-fields {
294
+ max-height: 62vh;
295
+ padding-right: 4px;
296
+ overflow: auto;
297
+ }
298
+ .cache-field,
299
+ .cache-string-value {
300
+ padding: 14px;
301
+ background: var(--admin-page-card-bg-soft);
302
+ border: 1px solid var(--admin-page-card-border-soft);
303
+ border-radius: var(--admin-page-radius);
304
+ }
305
+ .cache-field + .cache-field {
306
+ margin-top: 12px;
307
+ }
308
+ .cache-field-header,
309
+ .cache-value-header {
310
+ display: flex;
311
+ gap: 12px;
312
+ align-items: center;
313
+ justify-content: space-between;
314
+ margin-bottom: 10px;
315
+ }
316
+ .cache-field-key {
317
+ min-width: 0;
318
+ overflow: hidden;
319
+ text-overflow: ellipsis;
320
+ font-family: var(--el-font-family-monospace);
321
+ color: var(--admin-page-text-primary);
322
+ white-space: nowrap;
323
+ }
324
+ .cache-value-header {
325
+ font-size: 13px;
326
+ color: var(--admin-page-text-secondary);
327
+ }
328
+ .cache-value {
329
+ max-height: 460px;
330
+ padding: 14px;
331
+ margin: 0;
332
+ overflow: auto;
333
+ font-family: var(--el-font-family-monospace);
334
+ font-size: 13px;
335
+ line-height: 1.55;
336
+ color: var(--el-text-color-primary);
337
+ overflow-wrap: anywhere;
338
+ white-space: pre-wrap;
339
+ background: var(--el-fill-color-lighter);
340
+ border: 1px solid var(--el-border-color-light);
341
+ border-radius: var(--admin-page-radius);
342
+ }
343
+ .cache-value--plain {
344
+ font-family: inherit;
345
+ font-size: 14px;
346
+ }
347
+ .cache-rich-text {
348
+ max-height: 460px;
349
+ padding: 2px 4px;
350
+ overflow: auto;
351
+ }
352
+ </style>
@@ -32,11 +32,11 @@
32
32
  import { computed, ref, watch } from "vue";
33
33
  import { Clock, Promotion } from "@element-plus/icons-vue";
34
34
  import { useRoute } from "vue-router";
35
- import { t } from "@liujitcn/kratos-admin-core";
35
+ import { setAdminDocumentTitle, t } from "@liujitcn/kratos-admin-core";
36
36
  import { useAuthButtons } from "@liujitcn/kratos-admin-core/auth";
37
37
  import { useTabsStore } from "@liujitcn/kratos-admin-core/stores/runtime";
38
- import { defCodeGenService } from "@liujitcn/kratos-admin-system/api/system/code_gen";
39
- import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/code_gen_table";
38
+ import { defCodeGenService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen";
39
+ import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_table";
40
40
  import type { CodeGenPreviewFile } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen";
41
41
  import type { CodeGenTableForm } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen_table";
42
42
  import { CodeGenTableStatus } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen_table";
@@ -124,7 +124,7 @@ async function loadCodePreview() {
124
124
  function syncWorkspaceTitle() {
125
125
  const title = t("system.code.gen.preview.title.workspace", { table: pageTitle.value });
126
126
  tabsStore.setTabsTitle(title);
127
- document.title = `${title} - ${import.meta.env.VITE_GLOB_APP_TITLE}`;
127
+ setAdminDocumentTitle(title);
128
128
  }
129
129
 
130
130
  /** 启动当前生成对象的代码生成任务。 */
@@ -108,7 +108,7 @@
108
108
  <el-button
109
109
  :icon="ChatLineSquare"
110
110
  circle
111
- :type="hasMissingColumnLocales(row) ? 'warning' : 'success'"
111
+ :type="hasMissingColumnLocales(row as CodeGenColumnView) ? 'warning' : 'success'"
112
112
  :aria-label="t('system.code.gen.i18n.action.edit_column')"
113
113
  />
114
114
  </template>
@@ -148,7 +148,7 @@
148
148
  v-model="row.query_config.component"
149
149
  :disabled="!canEdit || !row.query_config.enabled"
150
150
  :placeholder="t('system.code.gen.column.placeholder.query_component')"
151
- @change="handleComponentChange(row, 'query')"
151
+ @change="handleComponentChange(row as CodeGenColumnView, 'query')"
152
152
  >
153
153
  <el-option
154
154
  v-for="item in queryComponentOptions"
@@ -167,7 +167,7 @@
167
167
  :type="hasOptionConfig(row.query_config.option) ? 'primary' : 'default'"
168
168
  :icon="Setting"
169
169
  :disabled="!canEdit"
170
- @click="openOptionDialog(row, 'query')"
170
+ @click="openOptionDialog(row as CodeGenColumnView, 'query')"
171
171
  >
172
172
  {{ t("system.code.gen.column.action.options") }}
173
173
  </el-button>
@@ -190,7 +190,7 @@
190
190
  v-model="row.list_config.component"
191
191
  :disabled="!canEdit || !row.list_config.enabled"
192
192
  :placeholder="t('system.code.gen.column.placeholder.list_component')"
193
- @change="handleComponentChange(row, 'list')"
193
+ @change="handleComponentChange(row as CodeGenColumnView, 'list')"
194
194
  >
195
195
  <el-option
196
196
  v-for="item in listComponentOptions"
@@ -209,7 +209,7 @@
209
209
  :type="hasOptionConfig(row.list_config.option) ? 'primary' : 'default'"
210
210
  :icon="Setting"
211
211
  :disabled="!canEdit"
212
- @click="openOptionDialog(row, 'list')"
212
+ @click="openOptionDialog(row as CodeGenColumnView, 'list')"
213
213
  >
214
214
  {{ t("system.code.gen.column.action.options") }}
215
215
  </el-button>
@@ -227,13 +227,13 @@
227
227
  inline-prompt
228
228
  :active-text="t('system.code.gen.value.on')"
229
229
  :inactive-text="t('system.code.gen.value.off')"
230
- @change="handleFormEnabledChange(row)"
230
+ @change="handleFormEnabledChange(row as CodeGenColumnView)"
231
231
  />
232
232
  <el-select
233
233
  v-model="row.form_config.component"
234
234
  :disabled="!canEdit || !row.form_config.enabled"
235
235
  :placeholder="t('system.code.gen.column.placeholder.form_component')"
236
- @change="handleComponentChange(row, 'form')"
236
+ @change="handleComponentChange(row as CodeGenColumnView, 'form')"
237
237
  >
238
238
  <el-option
239
239
  v-for="item in formComponentOptions"
@@ -255,7 +255,7 @@
255
255
  :type="hasOptionConfig(row.form_config.option) ? 'primary' : 'default'"
256
256
  :icon="Setting"
257
257
  :disabled="!canEdit"
258
- @click="openOptionDialog(row, 'form')"
258
+ @click="openOptionDialog(row as CodeGenColumnView, 'form')"
259
259
  >
260
260
  {{ t("system.code.gen.column.action.options") }}
261
261
  </el-button>
@@ -538,14 +538,14 @@ import Sortable from "sortablejs";
538
538
  import { computed, nextTick, onBeforeUnmount, onMounted, reactive, ref, watch } from "vue";
539
539
  import { ChatLineSquare, Delete, Document, List, Plus, Setting } from "@element-plus/icons-vue";
540
540
  import { useRoute, useRouter } from "vue-router";
541
- import { t } from "@liujitcn/kratos-admin-core";
541
+ import { setAdminDocumentTitle, t } from "@liujitcn/kratos-admin-core";
542
542
  import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
543
543
  import { useAuthButtons } from "@liujitcn/kratos-admin-core/auth";
544
544
  import { useTabsStore } from "@liujitcn/kratos-admin-core/stores/runtime";
545
- import { defBaseDictService } from "@liujitcn/kratos-admin-system/api/system/base_dict";
546
- import { loadEnabledBaseLanguages } from "@liujitcn/kratos-admin-system/api/system/base_language";
547
- import { defCodeGenColumnService } from "@liujitcn/kratos-admin-system/api/system/code_gen_column";
548
- import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/code_gen_table";
545
+ import { defBaseDictService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_dict";
546
+ import { loadEnabledBaseLanguages } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_language";
547
+ import { defCodeGenColumnService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_column";
548
+ import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_table";
549
549
  import type { OptionBaseDictResponse_BaseDict } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_dict";
550
550
  import type {
551
551
  CodeGenColumn as CodeGenColumnDTO,
@@ -742,7 +742,7 @@ function syncWorkspaceTitle() {
742
742
  ? t("system.code.gen.column.title.workspace_with_table", { table: tableTitle })
743
743
  : t("system.code.gen.column.title.workspace");
744
744
  tabsStore.setTabsTitle(title);
745
- document.title = `${title} - ${import.meta.env.VITE_GLOB_APP_TITLE}`;
745
+ setAdminDocumentTitle(title);
746
746
  }
747
747
 
748
748
  /** 保存字段配置。 */
@@ -986,7 +986,7 @@ async function loadDatabaseTables() {
986
986
  if (databaseTablesLoaded || loadingDatabaseTables.value) return;
987
987
  loadingDatabaseTables.value = true;
988
988
  try {
989
- const data = await defCodeGenTableService.ListCodeGenDatabaseTable({});
989
+ const data = await defCodeGenTableService.ListCodeGenDatabaseTable({ source_name: formData.source_name });
990
990
  databaseTables.value = data.tables ?? [];
991
991
  databaseTablesLoaded = true;
992
992
  } finally {
@@ -999,7 +999,7 @@ async function loadDatabaseColumns(tableName: string) {
999
999
  if (!tableName || databaseColumns[tableName] || loadingDatabaseColumns.has(tableName)) return;
1000
1000
  loadingDatabaseColumns.add(tableName);
1001
1001
  try {
1002
- const data = await defCodeGenColumnService.ListCodeGenDatabaseColumn({ table_name: tableName });
1002
+ const data = await defCodeGenColumnService.ListCodeGenDatabaseColumn({ source_name: formData.source_name, table_name: tableName });
1003
1003
  databaseColumns[tableName] = data.columns ?? [];
1004
1004
  } finally {
1005
1005
  loadingDatabaseColumns.delete(tableName);
@@ -67,8 +67,8 @@
67
67
  import { computed, ref } from "vue";
68
68
  import { Promotion } from "@element-plus/icons-vue";
69
69
  import { t } from "@liujitcn/kratos-admin-core";
70
- import { defBaseI18nService } from "@liujitcn/kratos-admin-system/api/system/base_i18n";
71
- import { loadEnabledBaseLanguages, useEnabledBaseLanguages } from "@liujitcn/kratos-admin-system/api/system/base_language";
70
+ import { defBaseI18nService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_i18n";
71
+ import { loadEnabledBaseLanguages, useEnabledBaseLanguages } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_language";
72
72
  import type { CodeGenLocaleConfig } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
73
73
 
74
74
  /** 代码生成多语言编辑器属性。 */
@@ -109,8 +109,8 @@ import { onBeforeUnmount, ref, watch } from "vue";
109
109
  import { Check, CircleClose, Clock, CopyDocument, Document, Loading, Minus } from "@element-plus/icons-vue";
110
110
  import { getCurrentLocale, t } from "@liujitcn/kratos-admin-core";
111
111
  import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
112
- import { defCodeGenService } from "@liujitcn/kratos-admin-system/api/system/code_gen";
113
- import { subscribeCodeGenProgress, type SseStop } from "@liujitcn/kratos-admin-system/api/system/code_gen_sse";
112
+ import { defCodeGenService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen";
113
+ import { subscribeCodeGenProgress, type SseStop } from "../../../../utils/code_gen_sse";
114
114
  import type { CodeGenTask } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen";
115
115
  import { CodeGenTaskStatus, CodeGenTaskStepStatus } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen";
116
116
 
@@ -106,6 +106,7 @@ export function codeGenFormComponentOptions(): ProFormOption[] {
106
106
  /** 代码生成表配置校验规则。 */
107
107
  export function codeGenTableRules(): FormRules {
108
108
  return {
109
+ source_name: [{ required: true, message: t("system.code.gen.validation.source_required"), trigger: "change" }],
109
110
  name: [{ required: true, max: 128, message: t("system.code.gen.validation.table_required"), trigger: "change" }],
110
111
  business_module: [
111
112
  {
@@ -161,6 +162,7 @@ export function createDefaultCodeGenLeftTreeConfig(): CodeGenLeftTreeConfig {
161
162
  export function createDefaultCodeGenTableForm(): CodeGenTableForm {
162
163
  return {
163
164
  id: 0,
165
+ source_name: "",
164
166
  name: "",
165
167
  comment: "",
166
168
  business_module: "",
@@ -82,7 +82,7 @@ import { computed, nextTick, onMounted, reactive, ref, watch } from "vue";
82
82
  import { ElMessage, ElMessageBox } from "element-plus";
83
83
  import { CirclePlus, Delete, EditPen } from "@element-plus/icons-vue";
84
84
  import { useRoute } from "vue-router";
85
- import { t } from "@liujitcn/kratos-admin-core";
85
+ import { setAdminDocumentTitle, t } from "@liujitcn/kratos-admin-core";
86
86
  import ProTable from "@liujitcn/kratos-admin-core/components/ProTable";
87
87
  import type {
88
88
  ColumnProps,
@@ -95,10 +95,10 @@ import PasswordStrength from "@liujitcn/kratos-admin-core/components/PasswordStr
95
95
  import type { ProFormComponentType, ProFormField, ProFormOption } from "@liujitcn/kratos-admin-core/components/ProForm/interface";
96
96
  import TreeFilter from "@liujitcn/kratos-admin-core/components/TreeFilter/index.vue";
97
97
  import { useTabsStore } from "@liujitcn/kratos-admin-core/stores/runtime";
98
- import { defBaseDictService } from "@liujitcn/kratos-admin-system/api/system/base_dict";
99
- import { defCodeGenColumnService } from "@liujitcn/kratos-admin-system/api/system/code_gen_column";
100
- import { defCodeGenProtoService } from "@liujitcn/kratos-admin-system/api/system/code_gen_proto";
101
- import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/code_gen_table";
98
+ import { defBaseDictService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_dict";
99
+ import { defCodeGenColumnService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_column";
100
+ import { defCodeGenProtoService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_proto";
101
+ import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_table";
102
102
  import type { OptionBaseDictResponse_BaseDict } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_dict";
103
103
  import type { CodeGenColumn, CodeGenColumnOptionConfig } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen_column";
104
104
  import type { CodeGenProtoCheck } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen_proto";
@@ -430,12 +430,12 @@ async function loadPreview() {
430
430
  dictionaries.value = [];
431
431
  databaseTables.value = [];
432
432
  if (!tableId.value) return;
433
- const [table, columnResponse, protoResponse, dictionaryResponse, databaseTableResponse] = await Promise.all([
434
- defCodeGenTableService.GetCodeGenTable({ id: tableId.value }),
433
+ const table = await defCodeGenTableService.GetCodeGenTable({ id: tableId.value });
434
+ const [columnResponse, protoResponse, dictionaryResponse, databaseTableResponse] = await Promise.all([
435
435
  defCodeGenColumnService.ListCodeGenColumn({ table_id: tableId.value }),
436
436
  defCodeGenProtoService.ListCodeGenProto({ table_id: tableId.value }),
437
437
  defBaseDictService.OptionBaseDict({}),
438
- defCodeGenTableService.ListCodeGenDatabaseTable({})
438
+ defCodeGenTableService.ListCodeGenDatabaseTable({ source_name: table.source_name })
439
439
  ]);
440
440
  snapshot.value = { table, columns: columnResponse.code_gen_columns ?? [] };
441
441
  protoChecks.value = protoResponse.code_gen_protos ?? [];
@@ -548,7 +548,7 @@ function createMockRows() {
548
548
  function syncWorkspaceTitle() {
549
549
  const title = snapshot.value?.table.comment || snapshot.value?.table.name || t("system.code.gen.preview.title.data_list");
550
550
  tabsStore.setTabsTitle(title);
551
- document.title = `${title} - ${import.meta.env.VITE_GLOB_APP_TITLE}`;
551
+ setAdminDocumentTitle(title);
552
552
  }
553
553
 
554
554
  /** 将数据库表名转换为生成器使用的实体名。 */
@@ -126,7 +126,7 @@
126
126
  import { computed, onMounted, reactive, ref, watch } from "vue";
127
127
  import { Document, Setting } from "@element-plus/icons-vue";
128
128
  import { useRoute, useRouter } from "vue-router";
129
- import { t } from "@liujitcn/kratos-admin-core";
129
+ import { setAdminDocumentTitle, t } from "@liujitcn/kratos-admin-core";
130
130
  import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
131
131
  import ProForm from "@liujitcn/kratos-admin-core/components/ProForm/index.vue";
132
132
  import type { ProFormField, ProFormOption } from "@liujitcn/kratos-admin-core/components/ProForm/interface";
@@ -134,9 +134,9 @@ import type { ColumnProps } from "@liujitcn/kratos-admin-core/components/ProTabl
134
134
  import ProTable from "@liujitcn/kratos-admin-core/components/ProTable";
135
135
  import { useAuthButtons } from "@liujitcn/kratos-admin-core/auth";
136
136
  import { useTabsStore } from "@liujitcn/kratos-admin-core/stores/runtime";
137
- import { defCodeGenColumnService } from "@liujitcn/kratos-admin-system/api/system/code_gen_column";
138
- import { defCodeGenProtoService } from "@liujitcn/kratos-admin-system/api/system/code_gen_proto";
139
- import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/code_gen_table";
137
+ import { defCodeGenColumnService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_column";
138
+ import { defCodeGenProtoService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_proto";
139
+ import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen_table";
140
140
  import type {
141
141
  CodeGenProto,
142
142
  CodeGenProtoCheck,
@@ -328,13 +328,11 @@ async function handleQuery() {
328
328
  databaseTables.value = [];
329
329
  Object.keys(targetColumnOptions).forEach(key => delete targetColumnOptions[key]);
330
330
  if (!tableId.value) return;
331
- const [table, tableResponse] = await Promise.all([
332
- defCodeGenTableService.GetCodeGenTable({ id: tableId.value }),
333
- defCodeGenTableService.ListCodeGenDatabaseTable({})
334
- ]);
331
+ const table = await defCodeGenTableService.GetCodeGenTable({ id: tableId.value });
332
+ const tableResponse = await defCodeGenTableService.ListCodeGenDatabaseTable({ source_name: table.source_name });
335
333
  Object.assign(formData, table);
336
334
  databaseTables.value = tableResponse.tables ?? [];
337
- const columnResponse = await defCodeGenColumnService.ListCodeGenDatabaseColumn({ table_name: formData.name });
335
+ const columnResponse = await defCodeGenColumnService.ListCodeGenDatabaseColumn({ source_name: formData.source_name, table_name: formData.name });
338
336
  targetColumnOptions[formData.name] = createColumnOptions(columnResponse.columns ?? []);
339
337
  await loadProtoChecks();
340
338
  syncWorkspaceTitle();
@@ -352,7 +350,7 @@ function syncWorkspaceTitle() {
352
350
  ? t("system.code.gen.proto.title.workspace_with_table", { table: tableTitle })
353
351
  : t("system.code.gen.proto.title.workspace");
354
352
  tabsStore.setTabsTitle(title);
355
- document.title = `${title} - ${import.meta.env.VITE_GLOB_APP_TITLE}`;
353
+ setAdminDocumentTitle(title);
356
354
  }
357
355
 
358
356
  /**
@@ -533,7 +531,7 @@ async function loadTargetColumnOptions(tableName: string) {
533
531
  if (!tableName || targetColumnOptions[tableName] || loadingTargetColumns.has(tableName)) return;
534
532
  loadingTargetColumns.add(tableName);
535
533
  try {
536
- const data = await defCodeGenColumnService.ListCodeGenDatabaseColumn({ table_name: tableName });
534
+ const data = await defCodeGenColumnService.ListCodeGenDatabaseColumn({ source_name: formData.source_name, table_name: tableName });
537
535
  targetColumnOptions[tableName] = createColumnOptions(data.columns ?? []);
538
536
  } finally {
539
537
  loadingTargetColumns.delete(tableName);
@@ -717,7 +715,7 @@ onMounted(() => {
717
715
  white-space: pre;
718
716
  background: var(--admin-page-card-bg-soft);
719
717
  border: 1px solid var(--admin-page-card-border-soft);
720
- border-radius: 4px;
718
+ border-radius: var(--admin-page-radius);
721
719
  }
722
720
  .code-gen-proto-capability-popover__item {
723
721
  display: grid;