@liujitcn/kratos-admin-system 0.0.21 → 0.0.24
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.
- package/dist/package/declarations/src/api/system/base_language.d.ts +5 -4
- package/dist/package/declarations/src/api/system/base_translation.d.ts +7 -4
- package/dist/package/declarations/src/api/system/ops_monitoring.d.ts +19 -0
- package/dist/package/declarations/src/api/system/ops_monitoring_sse.d.ts +12 -0
- package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +9 -32
- package/dist/package/declarations/src/components/DynamicTranslationEditor.vue.d.ts +3 -6
- package/dist/package/declarations/src/components/dynamicTranslation.d.ts +11 -17
- package/dist/package/declarations/src/locales/generated.d.ts +6536 -0
- package/dist/package/declarations/src/rpc/base/v1/ai_session.d.ts +12 -2
- package/dist/package/declarations/src/rpc/base/v1/ai_tool.d.ts +9 -1
- package/dist/package/declarations/src/rpc/base/v1/config.d.ts +35 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +1 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +23 -7
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +7 -77
- package/dist/package/declarations/src/rpc/system/admin/v1/base_job.d.ts +9 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_language.d.ts +7 -2
- package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +5 -40
- package/dist/package/declarations/src/rpc/system/admin/v1/base_migration.d.ts +6 -6
- package/dist/package/declarations/src/rpc/system/admin/v1/base_role.d.ts +13 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_translation.d.ts +54 -81
- package/dist/package/declarations/src/rpc/system/admin/v1/base_user.d.ts +11 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen.d.ts +11 -11
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +11 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/common.d.ts +13 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/ops_monitoring.d.ts +222 -0
- package/dist/package/declarations/src/views/tool/ops-monitoring/index.vue.d.ts +3 -0
- package/dist/package/src/api/base/ai_message.ts +2 -2
- package/dist/package/src/api/system/base_language.ts +13 -15
- package/dist/package/src/api/system/base_translation.ts +17 -6
- package/dist/package/src/api/system/ops_monitoring.ts +88 -0
- package/dist/package/src/api/system/ops_monitoring_sse.ts +49 -0
- package/dist/package/src/components/DynamicTranslationCell.vue +199 -126
- package/dist/package/src/components/DynamicTranslationEditor.vue +109 -78
- package/dist/package/src/components/dynamicTranslation.ts +11 -31
- package/dist/package/src/locales/README.md +7 -5
- package/dist/package/src/locales/en-US.json +876 -872
- package/dist/package/src/locales/es-ES.json +900 -895
- package/dist/package/src/locales/fr-FR.json +896 -891
- package/dist/package/src/locales/generated.ts +22 -0
- package/dist/package/src/locales/ja-JP.json +876 -872
- package/dist/package/src/locales/ko-KR.json +881 -876
- package/dist/package/src/locales/zh-CN.json +876 -872
- package/dist/package/src/locales/zh-TW.json +876 -871
- package/dist/package/src/module.ts +3 -17
- package/dist/package/src/rpc/base/v1/ai_session.ts +13 -2
- package/dist/package/src/rpc/base/v1/ai_tool.ts +10 -1
- package/dist/package/src/rpc/base/v1/config.ts +47 -0
- package/dist/package/src/rpc/system/admin/v1/auth.ts +1 -1
- package/dist/package/src/rpc/system/admin/v1/base_config.ts +24 -7
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +7 -79
- package/dist/package/src/rpc/system/admin/v1/base_job.ts +10 -1
- package/dist/package/src/rpc/system/admin/v1/base_language.ts +8 -2
- package/dist/package/src/rpc/system/admin/v1/base_menu.ts +5 -41
- package/dist/package/src/rpc/system/admin/v1/base_migration.ts +8 -8
- package/dist/package/src/rpc/system/admin/v1/base_role.ts +14 -1
- package/dist/package/src/rpc/system/admin/v1/base_translation.ts +54 -81
- package/dist/package/src/rpc/system/admin/v1/base_user.ts +12 -1
- package/dist/package/src/rpc/system/admin/v1/code_gen.ts +11 -11
- package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +12 -1
- package/dist/package/src/rpc/system/admin/v1/common.ts +21 -0
- package/dist/package/src/rpc/system/admin/v1/ops_monitoring.ts +255 -0
- package/dist/package/src/views/ai/chat/components/ChatPanel.vue +36 -36
- package/dist/package/src/views/ai/chat/components/SessionPanel.vue +6 -6
- package/dist/package/src/views/ai/chat/components/XSender.vue +20 -20
- package/dist/package/src/views/ai/chat/index.vue +33 -32
- package/dist/package/src/views/ai/chat/message.ts +16 -15
- package/dist/package/src/views/base/api/index.vue +55 -56
- package/dist/package/src/views/base/area/index.vue +18 -19
- package/dist/package/src/views/base/config/index.vue +143 -133
- package/dist/package/src/views/base/dept/index.vue +42 -43
- package/dist/package/src/views/base/dict/index.vue +49 -45
- package/dist/package/src/views/base/dict/item.vue +54 -49
- package/dist/package/src/views/base/job/index.vue +51 -52
- package/dist/package/src/views/base/job/log.vue +18 -18
- package/dist/package/src/views/{tool → base}/language/index.vue +51 -47
- package/dist/package/src/views/base/log/index.vue +40 -40
- package/dist/package/src/views/base/menu/index.vue +220 -177
- package/dist/package/src/views/base/migration/index.vue +24 -24
- package/dist/package/src/views/base/post/index.vue +42 -43
- package/dist/package/src/views/base/role/index.vue +54 -55
- package/dist/package/src/views/base/tenant/index.vue +42 -43
- package/dist/package/src/views/base/user/components/dept-tree.vue +1 -1
- package/dist/package/src/views/base/user/index.vue +69 -71
- package/dist/package/src/views/profile/components/base.vue +9 -9
- package/dist/package/src/views/profile/components/password.vue +19 -20
- package/dist/package/src/views/profile/components/security.vue +20 -20
- package/dist/package/src/views/profile/index.vue +3 -3
- package/dist/package/src/views/tool/api-doc/index.vue +1 -1
- package/dist/package/src/views/tool/code-gen/code-preview/index.vue +13 -13
- package/dist/package/src/views/tool/code-gen/columns/index.vue +89 -89
- package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +5 -5
- package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +21 -21
- package/dist/package/src/views/tool/code-gen/components/CodePreviewPane.vue +5 -5
- package/dist/package/src/views/tool/code-gen/config.ts +60 -60
- package/dist/package/src/views/tool/code-gen/preview/data.ts +2 -2
- package/dist/package/src/views/tool/code-gen/preview/index.vue +30 -31
- package/dist/package/src/views/tool/code-gen/proto/index.vue +43 -43
- package/dist/package/src/views/tool/code-gen/table/index.vue +95 -95
- package/dist/package/src/views/tool/ops-monitoring/index.vue +1175 -0
- package/dist/package/src/views/tool/project-doc/index.vue +7 -7
- package/package.json +2 -2
- package/dist/package/declarations/src/rpc/base/v1/enum.d.ts +0 -43
- package/dist/package/declarations/src/rpc/system/common/v1/enum.d.ts +0 -67
- package/dist/package/src/rpc/base/v1/enum.ts +0 -54
- package/dist/package/src/rpc/system/common/v1/enum.ts +0 -80
- /package/dist/package/declarations/src/views/{tool → base}/language/index.vue.d.ts +0 -0
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
<!-- 展示当前 Proto 配置对应的业务表。 -->
|
|
8
8
|
<div class="code-gen-proto-toolbar__meta">
|
|
9
9
|
<span class="code-gen-proto-toolbar__table-name" :title="formData.name">
|
|
10
|
-
{{ t("system.
|
|
10
|
+
{{ t("system.code.gen.column.value.table_name", { name: formData.name }) }}
|
|
11
11
|
</span>
|
|
12
12
|
<span class="code-gen-proto-toolbar__table-comment" :title="formData.comment || '--'">
|
|
13
|
-
{{ t("system.
|
|
13
|
+
{{ t("system.code.gen.column.value.table_comment", { comment: formData.comment || "--" }) }}
|
|
14
14
|
</span>
|
|
15
15
|
</div>
|
|
16
16
|
<el-button type="primary" :icon="Document" :disabled="!canEdit" @click="handleSaveProtoMethods()">
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<template #exists="{ row }">
|
|
23
23
|
<div class="code-gen-proto-status">
|
|
24
24
|
<el-tag :type="row.exists ? 'success' : 'warning'">
|
|
25
|
-
{{ t(row.exists ? "system.
|
|
25
|
+
{{ t(row.exists ? "system.code.gen.proto.status.exists" : "system.code.gen.proto.status.missing") }}
|
|
26
26
|
</el-tag>
|
|
27
27
|
<span class="code-gen-proto-cell__secondary" :title="row.message">{{ row.message }}</span>
|
|
28
28
|
</div>
|
|
@@ -38,23 +38,23 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
<div class="code-gen-proto-capability-popover">
|
|
40
40
|
<div class="code-gen-proto-capability-popover__item">
|
|
41
|
-
<span>{{ t("system.
|
|
41
|
+
<span>{{ t("system.code.gen.proto.field.method_comment") }}</span>
|
|
42
42
|
<span class="code-gen-proto-capability-popover__value">{{ row.method_comment || "--" }}</span>
|
|
43
43
|
</div>
|
|
44
44
|
<div class="code-gen-proto-capability-popover__item">
|
|
45
|
-
<span>{{ t("system.
|
|
45
|
+
<span>{{ t("system.code.gen.proto.field.method_name") }}</span>
|
|
46
46
|
<code>{{ row.method_name || "--" }}</code>
|
|
47
47
|
</div>
|
|
48
48
|
<div class="code-gen-proto-capability-popover__item">
|
|
49
|
-
<span>{{ t("system.
|
|
49
|
+
<span>{{ t("system.code.gen.proto.field.proto_path") }}</span>
|
|
50
50
|
<code class="code-gen-proto-capability-popover__path">{{ row.proto_file_path || "--" }}</code>
|
|
51
51
|
</div>
|
|
52
52
|
<div class="code-gen-proto-capability-popover__item">
|
|
53
|
-
<span>{{ t("system.
|
|
53
|
+
<span>{{ t("system.code.gen.proto.field.service_comment") }}</span>
|
|
54
54
|
<span class="code-gen-proto-capability-popover__value">{{ row.service_comment || "--" }}</span>
|
|
55
55
|
</div>
|
|
56
56
|
<div class="code-gen-proto-capability-popover__item">
|
|
57
|
-
<span>{{ t("system.
|
|
57
|
+
<span>{{ t("system.code.gen.proto.field.service_name") }}</span>
|
|
58
58
|
<code>{{ row.service_name || "--" }}</code>
|
|
59
59
|
</div>
|
|
60
60
|
<pre class="code-gen-proto-capability-popover__preview"><code>{{ resolveProtoDefinition(row) }}</code></pre>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<template #generate_when_missing="{ row }">
|
|
65
65
|
<div class="code-gen-proto-generate">
|
|
66
66
|
<el-checkbox v-model="row.generate_when_missing" :disabled="row.exists || !canEdit">
|
|
67
|
-
{{ t("system.
|
|
67
|
+
{{ t("system.code.gen.proto.action.generate_api") }}
|
|
68
68
|
</el-checkbox>
|
|
69
69
|
<el-button
|
|
70
70
|
v-if="showProtoConfigButton(row)"
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
:disabled="!canEdit"
|
|
76
76
|
@click="openProtoConfigDialog(row)"
|
|
77
77
|
>
|
|
78
|
-
{{ t("system.
|
|
78
|
+
{{ t("system.code.gen.proto.action.configure") }}
|
|
79
79
|
</el-button>
|
|
80
80
|
</div>
|
|
81
81
|
</template>
|
|
82
82
|
</ProTable>
|
|
83
83
|
</template>
|
|
84
|
-
<el-empty v-else :description="t('system.
|
|
84
|
+
<el-empty v-else :description="t('system.code.gen.column.message.select_record')" />
|
|
85
85
|
</el-card>
|
|
86
86
|
|
|
87
87
|
<ProDialog
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
type="primary"
|
|
105
105
|
:icon="Document"
|
|
106
106
|
:disabled="!canEdit"
|
|
107
|
-
:aria-label="t('system.
|
|
107
|
+
:aria-label="t('system.code.gen.column.action.save_and_close')"
|
|
108
108
|
@click="handleSaveProtoConfigDialog"
|
|
109
109
|
>
|
|
110
110
|
{{ t("common.action.save") }}
|
|
@@ -163,20 +163,20 @@ const loadingTargetColumns = reactive(new Set<string>());
|
|
|
163
163
|
const formData = reactive<CodeGenTableForm>(createDefaultCodeGenTableForm());
|
|
164
164
|
|
|
165
165
|
const triggerTypeLabelKeys: Record<string, string> = {
|
|
166
|
-
crud: "system.
|
|
167
|
-
page_tree: "system.
|
|
168
|
-
left_tree: "system.
|
|
169
|
-
entity_option: "system.
|
|
170
|
-
field_option: "system.
|
|
171
|
-
field_status: "system.
|
|
166
|
+
crud: "system.code.gen.proto.trigger.crud",
|
|
167
|
+
page_tree: "system.code.gen.proto.trigger.page_tree",
|
|
168
|
+
left_tree: "system.code.gen.proto.trigger.left_tree",
|
|
169
|
+
entity_option: "system.code.gen.proto.trigger.entity_option",
|
|
170
|
+
field_option: "system.code.gen.proto.trigger.field_option",
|
|
171
|
+
field_status: "system.code.gen.proto.trigger.field_status"
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
const apiKindLabelKeys: Record<string, string> = {
|
|
175
|
-
crud: "system.
|
|
176
|
-
list: "system.
|
|
177
|
-
option: "system.
|
|
178
|
-
tree: "system.
|
|
179
|
-
status: "system.
|
|
175
|
+
crud: "system.code.gen.proto.api_kind.crud",
|
|
176
|
+
list: "system.code.gen.proto.api_kind.list",
|
|
177
|
+
option: "system.code.gen.proto.api_kind.option",
|
|
178
|
+
tree: "system.code.gen.proto.api_kind.tree",
|
|
179
|
+
status: "system.code.gen.proto.api_kind.status"
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
/** Proto 类型配置弹窗上下文。 */
|
|
@@ -203,25 +203,25 @@ const configDialog = reactive<CodeGenProtoConfigDialog>({
|
|
|
203
203
|
const protoColumns = computed<ColumnProps[]>(() => [
|
|
204
204
|
{
|
|
205
205
|
prop: "trigger_type",
|
|
206
|
-
label: t("system.
|
|
206
|
+
label: t("system.code.gen.proto.field.trigger_type"),
|
|
207
207
|
minWidth: 150,
|
|
208
208
|
render: scope => resolveTriggerTypeLabel(String(scope.row.trigger_type))
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
prop: "api_kind",
|
|
212
|
-
label: t("system.
|
|
212
|
+
label: t("system.code.gen.proto.field.api_kind"),
|
|
213
213
|
minWidth: 150,
|
|
214
214
|
render: scope => resolveAPIKindLabel(String(scope.row.api_kind))
|
|
215
215
|
},
|
|
216
|
-
{ prop: "proto_info", label: t("system.
|
|
217
|
-
{ prop: "exists", label: t("system.
|
|
218
|
-
{ prop: "generate_when_missing", label: t("system.
|
|
216
|
+
{ prop: "proto_info", label: t("system.code.gen.proto.field.capability"), minWidth: 290 },
|
|
217
|
+
{ prop: "exists", label: t("system.code.gen.table.field.status"), minWidth: 210 },
|
|
218
|
+
{ prop: "generate_when_missing", label: t("system.code.gen.proto.field.generate_setting"), minWidth: 230 }
|
|
219
219
|
]);
|
|
220
220
|
|
|
221
221
|
/** 将 Proto 配置对象适配为 ProForm 所需的通用表单模型。 */
|
|
222
222
|
const protoConfigFormModel = computed<Record<string, any>>(() => configDialog.config as Record<string, any>);
|
|
223
223
|
const configDialogTitle = computed(() =>
|
|
224
|
-
t("system.
|
|
224
|
+
t("system.code.gen.proto.title.config", {
|
|
225
225
|
method: configDialog.methodName,
|
|
226
226
|
kind: resolveAPIKindLabel(configDialog.apiKind)
|
|
227
227
|
})
|
|
@@ -231,61 +231,61 @@ const configDialogTitle = computed(() =>
|
|
|
231
231
|
const protoConfigFields = computed<ProFormField[]>(() => [
|
|
232
232
|
{
|
|
233
233
|
prop: "parent_column",
|
|
234
|
-
label: t("system.
|
|
234
|
+
label: t("system.code.gen.proto.field.parent_column"),
|
|
235
235
|
component: "select",
|
|
236
236
|
options: () => configColumnOptions.value,
|
|
237
237
|
props: () => ({
|
|
238
238
|
loading: configDialogLoading.value,
|
|
239
239
|
filterable: true,
|
|
240
240
|
clearable: true,
|
|
241
|
-
placeholder: t("system.
|
|
241
|
+
placeholder: t("system.code.gen.proto.placeholder.parent_column")
|
|
242
242
|
}),
|
|
243
243
|
visible: () => configDialog.apiKind === "tree"
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
prop: "label_column",
|
|
247
|
-
label: t("system.
|
|
247
|
+
label: t("system.code.gen.proto.field.label_column"),
|
|
248
248
|
component: "select",
|
|
249
249
|
options: () => configColumnOptions.value,
|
|
250
250
|
props: () => ({
|
|
251
251
|
loading: configDialogLoading.value,
|
|
252
252
|
filterable: true,
|
|
253
253
|
clearable: true,
|
|
254
|
-
placeholder: t("system.
|
|
254
|
+
placeholder: t("system.code.gen.proto.placeholder.label_column")
|
|
255
255
|
}),
|
|
256
256
|
visible: () => ["option", "tree"].includes(configDialog.apiKind)
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
prop: "value_column",
|
|
260
|
-
label: t("system.
|
|
260
|
+
label: t("system.code.gen.proto.field.value_column"),
|
|
261
261
|
component: "select",
|
|
262
262
|
options: () => configColumnOptions.value,
|
|
263
263
|
props: () => ({
|
|
264
264
|
loading: configDialogLoading.value,
|
|
265
265
|
filterable: true,
|
|
266
266
|
clearable: true,
|
|
267
|
-
placeholder: t("system.
|
|
267
|
+
placeholder: t("system.code.gen.proto.placeholder.value_column")
|
|
268
268
|
}),
|
|
269
269
|
visible: () => ["option", "tree"].includes(configDialog.apiKind)
|
|
270
270
|
},
|
|
271
271
|
{
|
|
272
272
|
prop: "lazy",
|
|
273
|
-
label: t("system.
|
|
273
|
+
label: t("system.code.gen.proto.field.load_mode"),
|
|
274
274
|
component: "checkbox",
|
|
275
|
-
checkboxLabel: t("system.
|
|
275
|
+
checkboxLabel: t("system.code.gen.column.value.lazy_children"),
|
|
276
276
|
props: () => ({ disabled: configDialog.apiKind !== "tree" }),
|
|
277
277
|
visible: () => configDialog.apiKind === "tree"
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
prop: "status_column",
|
|
281
|
-
label: t("system.
|
|
281
|
+
label: t("system.code.gen.proto.field.status_column"),
|
|
282
282
|
component: "select",
|
|
283
283
|
options: () => configColumnOptions.value,
|
|
284
284
|
props: () => ({
|
|
285
285
|
loading: configDialogLoading.value,
|
|
286
286
|
filterable: true,
|
|
287
287
|
clearable: true,
|
|
288
|
-
placeholder: t("system.
|
|
288
|
+
placeholder: t("system.code.gen.proto.placeholder.status_column")
|
|
289
289
|
}),
|
|
290
290
|
visible: () => configDialog.apiKind === "status"
|
|
291
291
|
}
|
|
@@ -349,8 +349,8 @@ async function handleQuery() {
|
|
|
349
349
|
function syncWorkspaceTitle() {
|
|
350
350
|
const tableTitle = formData.comment || formData.name;
|
|
351
351
|
const title = tableTitle
|
|
352
|
-
? t("system.
|
|
353
|
-
: t("system.
|
|
352
|
+
? t("system.code.gen.proto.title.workspace_with_table", { table: tableTitle })
|
|
353
|
+
: t("system.code.gen.proto.title.workspace");
|
|
354
354
|
tabsStore.setTabsTitle(title);
|
|
355
355
|
document.title = `${title} - ${import.meta.env.VITE_GLOB_APP_TITLE}`;
|
|
356
356
|
}
|
|
@@ -523,7 +523,7 @@ function validateProtoConfigs() {
|
|
|
523
523
|
item => !item.exists && item.generate_when_missing && needsProtoConfig(item.api_kind) && !hasCompleteProtoConfig(item)
|
|
524
524
|
);
|
|
525
525
|
if (!row) return true;
|
|
526
|
-
ElMessage.warning(t("system.
|
|
526
|
+
ElMessage.warning(t("system.code.gen.proto.message.configure_first", { method: row.method_name }));
|
|
527
527
|
openProtoConfigDialog(row);
|
|
528
528
|
return false;
|
|
529
529
|
}
|
|
@@ -569,7 +569,7 @@ async function handleSaveProtoMethods(showMessage = true) {
|
|
|
569
569
|
table_id: formData.id,
|
|
570
570
|
code_gen_protos: codeGenProtos
|
|
571
571
|
});
|
|
572
|
-
if (showMessage) ElMessage.success(t("system.
|
|
572
|
+
if (showMessage) ElMessage.success(t("system.code.gen.proto.message.save_success"));
|
|
573
573
|
// 路由切换前保留当前页签地址,避免误删目标页签。
|
|
574
574
|
const currentPath = route.fullPath;
|
|
575
575
|
await router.push("/code/gen/table");
|