@liujitcn/kratos-admin-system 0.0.49 → 0.0.51
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/README.md +44 -8
- package/dist/package/declarations/src/api/system/admin/v1/base_i18n_custom.d.ts +18 -0
- package/dist/package/declarations/src/api/system/admin/v1/base_redact_output_policy.d.ts +4 -1
- package/dist/package/declarations/src/api/system/admin/v1/base_redact_storage_policy.d.ts +3 -1
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant.d.ts +2 -2
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant_project.d.ts +23 -0
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant_project_grant.d.ts +16 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectManager.vue.d.ts +29 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectSelect.vue.d.ts +31 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectText.vue.d.ts +19 -0
- package/dist/package/declarations/src/components/tenant-project/tenant-project-manager-data.d.ts +14 -0
- package/dist/package/declarations/src/components/tenant-project/tenant-project-manager.d.ts +40 -0
- package/dist/package/declarations/src/components/tenant-project-grant/ProjectGrantDialog.vue.d.ts +8 -0
- package/dist/package/declarations/src/index.d.ts +2 -0
- package/dist/package/declarations/src/locales/generated.d.ts +196 -0
- package/dist/package/declarations/src/rpc/base/v1/config.d.ts +11 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n_custom.d.ts +105 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_output_policy.d.ts +8 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_storage_policy.d.ts +25 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant.d.ts +10 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant_project.d.ts +141 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant_project_grant.d.ts +105 -0
- package/dist/package/declarations/src/views/ai/chat/components/SessionPanel.vue.d.ts +2 -2
- package/dist/package/declarations/src/views/ai/chat/components/speech-recognition.d.ts +33 -0
- package/dist/package/declarations/src/views/base/i18n-custom/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/tenant-project/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/tenant-project-grant/index.vue.d.ts +3 -0
- package/dist/package/src/api/system/admin/v1/base_i18n_custom.ts +72 -0
- package/dist/package/src/api/system/admin/v1/base_redact_output_policy.ts +7 -0
- package/dist/package/src/api/system/admin/v1/base_redact_storage_policy.ts +7 -0
- package/dist/package/src/api/system/admin/v1/base_tenant.ts +3 -2
- package/dist/package/src/api/system/admin/v1/base_tenant_project.ts +94 -0
- package/dist/package/src/api/system/admin/v1/base_tenant_project_grant.ts +63 -0
- package/dist/package/src/components/tenant-project/TenantProjectManager.vue +431 -0
- package/dist/package/src/components/tenant-project/TenantProjectSelect.vue +83 -0
- package/dist/package/src/components/tenant-project/TenantProjectText.vue +37 -0
- package/dist/package/src/components/tenant-project/tenant-project-manager-data.ts +26 -0
- package/dist/package/src/components/tenant-project/tenant-project-manager.ts +48 -0
- package/dist/package/src/components/tenant-project-grant/ProjectGrantDialog.vue +108 -0
- package/dist/package/src/index.ts +12 -0
- package/dist/package/src/locales/README.md +1 -1
- package/dist/package/src/locales/en-US.json +51 -2
- package/dist/package/src/locales/ja-JP.json +51 -2
- package/dist/package/src/locales/zh-CN.json +51 -2
- package/dist/package/src/locales/zh-TW.json +51 -2
- package/dist/package/src/module.ts +3 -3
- package/dist/package/src/rpc/base/v1/config.ts +12 -0
- package/dist/package/src/rpc/system/admin/v1/base_i18n_custom.ts +126 -0
- package/dist/package/src/rpc/system/admin/v1/base_redact_output_policy.ts +9 -0
- package/dist/package/src/rpc/system/admin/v1/base_redact_storage_policy.ts +30 -0
- package/dist/package/src/rpc/system/admin/v1/base_tenant.ts +11 -1
- package/dist/package/src/rpc/system/admin/v1/base_tenant_project.ts +166 -0
- package/dist/package/src/rpc/system/admin/v1/base_tenant_project_grant.ts +128 -0
- package/dist/package/src/views/ai/chat/components/XSender.vue +21 -28
- package/dist/package/src/views/ai/chat/components/speech-recognition.ts +156 -0
- package/dist/package/src/views/base/api-log/index.vue +3 -3
- package/dist/package/src/views/base/config/index.vue +3 -3
- package/dist/package/src/views/base/data-access-log/index.vue +3 -3
- package/dist/package/src/views/base/dept/index.vue +10 -45
- package/dist/package/src/views/base/dict/index.vue +3 -3
- package/dist/package/src/views/base/dict/item.vue +3 -3
- package/dist/package/src/views/base/file/index.vue +12 -3
- package/dist/package/src/views/base/i18n-custom/index.vue +321 -0
- package/dist/package/src/views/base/job/index.vue +85 -161
- package/dist/package/src/views/base/login-log/index.vue +13 -4
- package/dist/package/src/views/base/login-policy/index.vue +109 -40
- package/dist/package/src/views/base/menu/index.vue +3 -3
- package/dist/package/src/views/base/message/index.vue +9 -32
- package/dist/package/src/views/base/message-category/index.vue +2 -4
- package/dist/package/src/views/base/oauth-client/index.vue +8 -42
- package/dist/package/src/views/base/online-session/index.vue +8 -27
- package/dist/package/src/views/base/operation-log/index.vue +3 -3
- package/dist/package/src/views/base/permission-log/index.vue +3 -3
- package/dist/package/src/views/base/policy-evaluation-log/index.vue +3 -3
- package/dist/package/src/views/base/post/index.vue +9 -42
- package/dist/package/src/views/base/redact-output-policy/index.vue +19 -7
- package/dist/package/src/views/base/redact-rule/index.vue +70 -53
- package/dist/package/src/views/base/redact-storage-policy/index.vue +18 -7
- package/dist/package/src/views/base/role/index.vue +14 -48
- package/dist/package/src/views/base/tenant/index.vue +163 -19
- package/dist/package/src/views/base/tenant-project/index.vue +12 -0
- package/dist/package/src/views/base/tenant-project-grant/index.vue +338 -0
- package/dist/package/src/views/base/user/index.vue +30 -51
- package/dist/package/src/views/profile/components/login-log.vue +15 -2
- package/dist/package/src/views/profile/components/password.vue +1 -1
- package/dist/package/src/views/profile/components/security.vue +2 -2
- package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +2 -2
- package/dist/package/src/views/tool/code-gen/config.ts +2 -1
- package/package.json +2 -2
- /package/dist/package/declarations/src/components/{ChangePasswordForm.vue.d.ts → account/ChangePasswordForm.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{ForcedPasswordDialog.vue.d.ts → account/ForcedPasswordDialog.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{Ai.vue.d.ts → ai/Ai.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{DynamicI18nCell.vue.d.ts → i18n/DynamicI18nCell.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{DynamicI18nEditor.vue.d.ts → i18n/DynamicI18nEditor.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{dynamicI18n.d.ts → i18n/dynamicI18n.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{LogTable.vue.d.ts → log/LogTable.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{log.d.ts → log/log.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{Notification.vue.d.ts → notification/Notification.vue.d.ts} +0 -0
- /package/dist/package/src/components/{ChangePasswordForm.vue → account/ChangePasswordForm.vue} +0 -0
- /package/dist/package/src/components/{ForcedPasswordDialog.vue → account/ForcedPasswordDialog.vue} +0 -0
- /package/dist/package/src/components/{Ai.vue → ai/Ai.vue} +0 -0
- /package/dist/package/src/components/{DynamicI18nCell.vue → i18n/DynamicI18nCell.vue} +0 -0
- /package/dist/package/src/components/{DynamicI18nEditor.vue → i18n/DynamicI18nEditor.vue} +0 -0
- /package/dist/package/src/components/{dynamicI18n.ts → i18n/dynamicI18n.ts} +0 -0
- /package/dist/package/src/components/{LogTable.vue → log/LogTable.vue} +0 -0
- /package/dist/package/src/components/{log.ts → log/log.ts} +0 -0
- /package/dist/package/src/components/{Notification.vue → notification/Notification.vue} +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: system/admin/v1/base_i18n_custom.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import type { BaseConfigSite } from "../../../base/v1/config";
|
|
9
|
+
import type { Status } from "../../../common/v1/enum";
|
|
10
|
+
import type { Empty } from "../../../google/protobuf/empty";
|
|
11
|
+
|
|
12
|
+
/** 国际化自定义翻译分页查询条件。 */
|
|
13
|
+
export interface PageBaseI18nCustomRequest {
|
|
14
|
+
/** 位置:枚举【BaseConfigSite】 */
|
|
15
|
+
site?:
|
|
16
|
+
| BaseConfigSite
|
|
17
|
+
| undefined;
|
|
18
|
+
/** 国际化语言键 */
|
|
19
|
+
key: string;
|
|
20
|
+
/** 语言区域 */
|
|
21
|
+
locale: string;
|
|
22
|
+
/** 状态:枚举【Status】 */
|
|
23
|
+
status?:
|
|
24
|
+
| Status
|
|
25
|
+
| undefined;
|
|
26
|
+
/** 当前页码 */
|
|
27
|
+
page_num: number;
|
|
28
|
+
/** 每页数量 */
|
|
29
|
+
page_size: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** 国际化自定义翻译分页响应。 */
|
|
33
|
+
export interface PageBaseI18nCustomResponse {
|
|
34
|
+
/** 国际化自定义翻译列表 */
|
|
35
|
+
items: BaseI18nCustom[];
|
|
36
|
+
/** 总数 */
|
|
37
|
+
total: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** 国际化自定义翻译详情查询条件。 */
|
|
41
|
+
export interface GetBaseI18nCustomRequest {
|
|
42
|
+
/** 国际化自定义翻译ID */
|
|
43
|
+
id: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** 国际化自定义翻译表单。 */
|
|
47
|
+
export interface BaseI18nCustomForm {
|
|
48
|
+
/** 国际化自定义翻译ID */
|
|
49
|
+
id: number;
|
|
50
|
+
/** 位置:枚举【BaseConfigSite】 */
|
|
51
|
+
site: BaseConfigSite;
|
|
52
|
+
/** 国际化语言键 */
|
|
53
|
+
key: string;
|
|
54
|
+
/** 语言区域 */
|
|
55
|
+
locale: string;
|
|
56
|
+
/** 自定义翻译内容 */
|
|
57
|
+
value: string;
|
|
58
|
+
/** 状态 */
|
|
59
|
+
status: Status;
|
|
60
|
+
/** 备注 */
|
|
61
|
+
remark: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** 创建国际化自定义翻译请求。 */
|
|
65
|
+
export interface CreateBaseI18nCustomRequest {
|
|
66
|
+
/** 国际化自定义翻译表单 */
|
|
67
|
+
i18n_custom: BaseI18nCustomForm | undefined;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** 更新国际化自定义翻译请求。 */
|
|
71
|
+
export interface UpdateBaseI18nCustomRequest {
|
|
72
|
+
/** 国际化自定义翻译表单 */
|
|
73
|
+
i18n_custom: BaseI18nCustomForm | undefined;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** 删除国际化自定义翻译请求。 */
|
|
77
|
+
export interface DeleteBaseI18nCustomRequest {
|
|
78
|
+
/** 国际化自定义翻译ID列表 */
|
|
79
|
+
id: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** 设置国际化自定义翻译状态请求。 */
|
|
83
|
+
export interface SetBaseI18nCustomStatusRequest {
|
|
84
|
+
/** 国际化自定义翻译ID */
|
|
85
|
+
id: number;
|
|
86
|
+
/** 状态 */
|
|
87
|
+
status: Status;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** 国际化自定义翻译信息。 */
|
|
91
|
+
export interface BaseI18nCustom {
|
|
92
|
+
/** 国际化自定义翻译ID */
|
|
93
|
+
id: number;
|
|
94
|
+
/** 位置:枚举【BaseConfigSite】 */
|
|
95
|
+
site: BaseConfigSite;
|
|
96
|
+
/** 国际化语言键 */
|
|
97
|
+
key: string;
|
|
98
|
+
/** 语言区域 */
|
|
99
|
+
locale: string;
|
|
100
|
+
/** 自定义翻译内容 */
|
|
101
|
+
value: string;
|
|
102
|
+
/** 状态 */
|
|
103
|
+
status: Status;
|
|
104
|
+
/** 备注 */
|
|
105
|
+
remark: string;
|
|
106
|
+
/** 创建时间 */
|
|
107
|
+
created_at: string;
|
|
108
|
+
/** 更新时间 */
|
|
109
|
+
updated_at: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Admin国际化自定义翻译信息服务。 */
|
|
113
|
+
export interface BaseI18nCustomService {
|
|
114
|
+
/** 查询国际化自定义翻译分页列表。 */
|
|
115
|
+
PageBaseI18nCustom(request: PageBaseI18nCustomRequest): Promise<PageBaseI18nCustomResponse>;
|
|
116
|
+
/** 查询国际化自定义翻译详情。 */
|
|
117
|
+
GetBaseI18nCustom(request: GetBaseI18nCustomRequest): Promise<BaseI18nCustomForm>;
|
|
118
|
+
/** 创建国际化自定义翻译。 */
|
|
119
|
+
CreateBaseI18nCustom(request: CreateBaseI18nCustomRequest): Promise<Empty>;
|
|
120
|
+
/** 更新国际化自定义翻译。 */
|
|
121
|
+
UpdateBaseI18nCustom(request: UpdateBaseI18nCustomRequest): Promise<Empty>;
|
|
122
|
+
/** 删除国际化自定义翻译。 */
|
|
123
|
+
DeleteBaseI18nCustom(request: DeleteBaseI18nCustomRequest): Promise<Empty>;
|
|
124
|
+
/** 设置国际化自定义翻译状态。 */
|
|
125
|
+
SetBaseI18nCustomStatus(request: SetBaseI18nCustomStatusRequest): Promise<Empty>;
|
|
126
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import type { Status } from "../../../common/v1/enum";
|
|
9
9
|
import type { Empty } from "../../../google/protobuf/empty";
|
|
10
|
+
import type { BaseApiDoc } from "./base_api";
|
|
10
11
|
|
|
11
12
|
/** 出库脱敏策略处理模式。 */
|
|
12
13
|
export enum BaseRedactOutputPolicyMode {
|
|
@@ -140,6 +141,12 @@ export interface BaseRedactOutputPolicy {
|
|
|
140
141
|
updated_at: string;
|
|
141
142
|
}
|
|
142
143
|
|
|
144
|
+
/** 查询可出库脱敏字段请求。 */
|
|
145
|
+
export interface GetBaseRedactOutputFieldDocRequest {
|
|
146
|
+
/** 接口ID */
|
|
147
|
+
api_id: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
143
150
|
/** Admin出库脱敏策略服务。 */
|
|
144
151
|
export interface BaseRedactOutputPolicyService {
|
|
145
152
|
/** 查询出库脱敏策略分页列表。 */
|
|
@@ -154,4 +161,6 @@ export interface BaseRedactOutputPolicyService {
|
|
|
154
161
|
DeleteBaseRedactOutputPolicy(request: DeleteBaseRedactOutputPolicyRequest): Promise<Empty>;
|
|
155
162
|
/** 设置出库脱敏策略状态。 */
|
|
156
163
|
SetBaseRedactOutputPolicyStatus(request: SetBaseRedactOutputPolicyStatusRequest): Promise<Empty>;
|
|
164
|
+
/** 查询可出库脱敏的响应字段文档。 */
|
|
165
|
+
GetBaseRedactOutputFieldDoc(request: GetBaseRedactOutputFieldDocRequest): Promise<BaseApiDoc>;
|
|
157
166
|
}
|
|
@@ -118,6 +118,32 @@ export interface BaseRedactStoragePolicy {
|
|
|
118
118
|
updated_at: string;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
/** 查询可入库脱敏字段请求。 */
|
|
122
|
+
export interface ListBaseRedactStorageColumnRequest {
|
|
123
|
+
/** 数据源名称 */
|
|
124
|
+
source_name: string;
|
|
125
|
+
/** 数据库表名 */
|
|
126
|
+
table_name: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** 可入库脱敏字段。 */
|
|
130
|
+
export interface BaseRedactStorageColumn {
|
|
131
|
+
/** 字段名 */
|
|
132
|
+
name: string;
|
|
133
|
+
/** 字段注释 */
|
|
134
|
+
comment: string;
|
|
135
|
+
/** 数据库类型 */
|
|
136
|
+
db_type: string;
|
|
137
|
+
/** 数据库完整类型 */
|
|
138
|
+
column_type: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** 可入库脱敏字段列表响应。 */
|
|
142
|
+
export interface ListBaseRedactStorageColumnResponse {
|
|
143
|
+
/** 可脱敏字段列表 */
|
|
144
|
+
columns: BaseRedactStorageColumn[];
|
|
145
|
+
}
|
|
146
|
+
|
|
121
147
|
/** Admin入库脱敏策略服务。 */
|
|
122
148
|
export interface BaseRedactStoragePolicyService {
|
|
123
149
|
/** 查询入库脱敏策略分页列表。 */
|
|
@@ -134,4 +160,8 @@ export interface BaseRedactStoragePolicyService {
|
|
|
134
160
|
DeleteBaseRedactStoragePolicy(request: DeleteBaseRedactStoragePolicyRequest): Promise<Empty>;
|
|
135
161
|
/** 设置入库脱敏策略状态。 */
|
|
136
162
|
SetBaseRedactStoragePolicyStatus(request: SetBaseRedactStoragePolicyStatusRequest): Promise<Empty>;
|
|
163
|
+
/** 查询可入库脱敏的字符串字段列表。 */
|
|
164
|
+
ListBaseRedactStorageColumn(
|
|
165
|
+
request: ListBaseRedactStorageColumnRequest,
|
|
166
|
+
): Promise<ListBaseRedactStorageColumnResponse>;
|
|
137
167
|
}
|
|
@@ -51,6 +51,16 @@ export interface CreateBaseTenantRequest {
|
|
|
51
51
|
base_tenant: BaseTenantForm | undefined;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/** 创建租户响应参数 */
|
|
55
|
+
export interface CreateBaseTenantResponse {
|
|
56
|
+
/** 租户编号 */
|
|
57
|
+
tenant_code: string;
|
|
58
|
+
/** 租户管理员账号 */
|
|
59
|
+
admin_user_name: string;
|
|
60
|
+
/** 租户管理员初始密码,仅在随机生成时返回 */
|
|
61
|
+
initial_password: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
54
64
|
/** 更新租户请求参数 */
|
|
55
65
|
export interface UpdateBaseTenantRequest {
|
|
56
66
|
/** 租户表单 */
|
|
@@ -124,7 +134,7 @@ export interface BaseTenantService {
|
|
|
124
134
|
/** 查询租户 */
|
|
125
135
|
GetBaseTenant(request: GetBaseTenantRequest): Promise<BaseTenantForm>;
|
|
126
136
|
/** 创建租户 */
|
|
127
|
-
CreateBaseTenant(request: CreateBaseTenantRequest): Promise<
|
|
137
|
+
CreateBaseTenant(request: CreateBaseTenantRequest): Promise<CreateBaseTenantResponse>;
|
|
128
138
|
/** 更新租户 */
|
|
129
139
|
UpdateBaseTenant(request: UpdateBaseTenantRequest): Promise<Empty>;
|
|
130
140
|
/** 删除租户 */
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: system/admin/v1/base_tenant_project.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import type { SelectOptionResponse } from "../../../common/v1/common";
|
|
9
|
+
import type { Status } from "../../../common/v1/enum";
|
|
10
|
+
import type { Empty } from "../../../google/protobuf/empty";
|
|
11
|
+
|
|
12
|
+
/** 项目选项查询条件 */
|
|
13
|
+
export interface OptionBaseTenantProjectRequest {
|
|
14
|
+
/** 租户ID */
|
|
15
|
+
tenant_id?: number | undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** 项目树查询条件 */
|
|
19
|
+
export interface TreeBaseTenantProjectRequest {
|
|
20
|
+
/** 项目编号或名称关键字 */
|
|
21
|
+
keyword: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** 项目树响应 */
|
|
25
|
+
export interface TreeBaseTenantProjectResponse {
|
|
26
|
+
/** 租户项目树 */
|
|
27
|
+
list: TreeBaseTenantProjectResponse_Option[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** 项目树节点 */
|
|
31
|
+
export interface TreeBaseTenantProjectResponse_Option {
|
|
32
|
+
/** 节点值 */
|
|
33
|
+
value: string;
|
|
34
|
+
/** 节点名称 */
|
|
35
|
+
label: string;
|
|
36
|
+
/** 节点类型 */
|
|
37
|
+
type: string;
|
|
38
|
+
/** 租户ID */
|
|
39
|
+
tenant_id: number;
|
|
40
|
+
/** 项目ID */
|
|
41
|
+
project_id: number;
|
|
42
|
+
/** 是否禁用 */
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
/** 子节点 */
|
|
45
|
+
children: TreeBaseTenantProjectResponse_Option[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** 项目分页查询条件 */
|
|
49
|
+
export interface PageBaseTenantProjectRequest {
|
|
50
|
+
/** 项目名称 */
|
|
51
|
+
name: string;
|
|
52
|
+
/** 项目编号 */
|
|
53
|
+
code: string;
|
|
54
|
+
/** 租户ID */
|
|
55
|
+
tenant_id?:
|
|
56
|
+
| number
|
|
57
|
+
| undefined;
|
|
58
|
+
/** 状态 */
|
|
59
|
+
status?:
|
|
60
|
+
| Status
|
|
61
|
+
| undefined;
|
|
62
|
+
/** 当前页码 */
|
|
63
|
+
page_num: number;
|
|
64
|
+
/** 每一页的行数 */
|
|
65
|
+
page_size: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** 项目分页响应 */
|
|
69
|
+
export interface PageBaseTenantProjectResponse {
|
|
70
|
+
/** 分页数据 */
|
|
71
|
+
base_tenant_projects: BaseTenantProject[];
|
|
72
|
+
/** 总数 */
|
|
73
|
+
total: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** 查询项目请求参数 */
|
|
77
|
+
export interface GetBaseTenantProjectRequest {
|
|
78
|
+
/** 项目ID */
|
|
79
|
+
id: number;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** 项目表单 */
|
|
83
|
+
export interface BaseTenantProjectForm {
|
|
84
|
+
/** 项目ID */
|
|
85
|
+
id: number;
|
|
86
|
+
/** 租户ID */
|
|
87
|
+
tenant_id: number;
|
|
88
|
+
/** 项目编号 */
|
|
89
|
+
code: string;
|
|
90
|
+
/** 项目名称 */
|
|
91
|
+
name: string;
|
|
92
|
+
/** 状态 */
|
|
93
|
+
status: Status;
|
|
94
|
+
/** 显示顺序 */
|
|
95
|
+
sort: number;
|
|
96
|
+
/** 备注 */
|
|
97
|
+
remark: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** 创建项目请求参数 */
|
|
101
|
+
export interface CreateBaseTenantProjectRequest {
|
|
102
|
+
/** 项目表单 */
|
|
103
|
+
base_tenant_project: BaseTenantProjectForm | undefined;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** 更新项目请求参数 */
|
|
107
|
+
export interface UpdateBaseTenantProjectRequest {
|
|
108
|
+
/** 项目表单 */
|
|
109
|
+
base_tenant_project: BaseTenantProjectForm | undefined;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** 删除项目请求参数 */
|
|
113
|
+
export interface DeleteBaseTenantProjectRequest {
|
|
114
|
+
/** 项目ID列表 */
|
|
115
|
+
id: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** 设置项目状态请求参数 */
|
|
119
|
+
export interface SetBaseTenantProjectStatusRequest {
|
|
120
|
+
/** 项目ID */
|
|
121
|
+
id: number;
|
|
122
|
+
/** 状态 */
|
|
123
|
+
status: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** 项目 */
|
|
127
|
+
export interface BaseTenantProject {
|
|
128
|
+
/** 项目ID */
|
|
129
|
+
id: number;
|
|
130
|
+
/** 租户ID */
|
|
131
|
+
tenant_id: number;
|
|
132
|
+
/** 项目编号 */
|
|
133
|
+
code: string;
|
|
134
|
+
/** 项目名称 */
|
|
135
|
+
name: string;
|
|
136
|
+
/** 状态 */
|
|
137
|
+
status: Status;
|
|
138
|
+
/** 显示顺序 */
|
|
139
|
+
sort: number;
|
|
140
|
+
/** 备注 */
|
|
141
|
+
remark: string;
|
|
142
|
+
/** 创建时间 */
|
|
143
|
+
created_at: string;
|
|
144
|
+
/** 更新时间 */
|
|
145
|
+
updated_at: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** Admin项目管理服务 */
|
|
149
|
+
export interface BaseTenantProjectService {
|
|
150
|
+
/** 查询项目下拉选择 */
|
|
151
|
+
OptionBaseTenantProject(request: OptionBaseTenantProjectRequest): Promise<SelectOptionResponse>;
|
|
152
|
+
/** 查询当前账号可用的租户项目树 */
|
|
153
|
+
TreeBaseTenantProject(request: TreeBaseTenantProjectRequest): Promise<TreeBaseTenantProjectResponse>;
|
|
154
|
+
/** 查询项目分页列表 */
|
|
155
|
+
PageBaseTenantProject(request: PageBaseTenantProjectRequest): Promise<PageBaseTenantProjectResponse>;
|
|
156
|
+
/** 查询项目 */
|
|
157
|
+
GetBaseTenantProject(request: GetBaseTenantProjectRequest): Promise<BaseTenantProjectForm>;
|
|
158
|
+
/** 创建项目 */
|
|
159
|
+
CreateBaseTenantProject(request: CreateBaseTenantProjectRequest): Promise<Empty>;
|
|
160
|
+
/** 更新项目 */
|
|
161
|
+
UpdateBaseTenantProject(request: UpdateBaseTenantProjectRequest): Promise<Empty>;
|
|
162
|
+
/** 删除项目 */
|
|
163
|
+
DeleteBaseTenantProject(request: DeleteBaseTenantProjectRequest): Promise<Empty>;
|
|
164
|
+
/** 设置项目状态 */
|
|
165
|
+
SetBaseTenantProjectStatus(request: SetBaseTenantProjectStatusRequest): Promise<Empty>;
|
|
166
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: system/admin/v1/base_tenant_project_grant.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import type { Empty } from "../../../google/protobuf/empty";
|
|
9
|
+
|
|
10
|
+
/** BaseTenantProjectGrantSubjectType 项目授权主体类型。 */
|
|
11
|
+
export enum BaseTenantProjectGrantSubjectType {
|
|
12
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_UNSPECIFIED - 未指定 */
|
|
13
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_UNSPECIFIED = 0,
|
|
14
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_POST - 岗位 */
|
|
15
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_POST = 1,
|
|
16
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_ROLE - 角色 */
|
|
17
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_ROLE = 2,
|
|
18
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_DEPT - 部门 */
|
|
19
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_DEPT = 3,
|
|
20
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_USER - 用户 */
|
|
21
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_USER = 4,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** 项目授权主体和目标租户查询条件。 */
|
|
25
|
+
export interface BaseTenantProjectGrantKey {
|
|
26
|
+
/** 授权目标租户ID */
|
|
27
|
+
tenant_id: number;
|
|
28
|
+
/** 授权主体类型 */
|
|
29
|
+
subject_type: BaseTenantProjectGrantSubjectType;
|
|
30
|
+
/** 授权主体ID */
|
|
31
|
+
subject_id: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** 项目授权记录,project_id 为 [0] 时表示目标租户全部项目,空数组表示无权限。 */
|
|
35
|
+
export interface BaseTenantProjectGrant {
|
|
36
|
+
/** 授权目标租户ID */
|
|
37
|
+
tenant_id: number;
|
|
38
|
+
/** 授权主体类型 */
|
|
39
|
+
subject_type: BaseTenantProjectGrantSubjectType;
|
|
40
|
+
/** 授权主体ID */
|
|
41
|
+
subject_id: number;
|
|
42
|
+
/** 项目主键ID数字数组,[0]全部,[]无权限 */
|
|
43
|
+
project_id: number[];
|
|
44
|
+
/** 租户名称 */
|
|
45
|
+
tenant_name: string;
|
|
46
|
+
/** 授权主体名称 */
|
|
47
|
+
subject_name: string;
|
|
48
|
+
/** 授权主体编码 */
|
|
49
|
+
subject_code: string;
|
|
50
|
+
/** 授权项目名称列表 */
|
|
51
|
+
project_names: string[];
|
|
52
|
+
/** 项目授权联合主键展示值 */
|
|
53
|
+
grant_key: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** 项目授权分页查询条件。 */
|
|
57
|
+
export interface PageBaseTenantProjectGrantRequest {
|
|
58
|
+
/** 授权目标租户ID */
|
|
59
|
+
tenant_id?:
|
|
60
|
+
| number
|
|
61
|
+
| undefined;
|
|
62
|
+
/** 授权主体类型 */
|
|
63
|
+
subject_type?:
|
|
64
|
+
| BaseTenantProjectGrantSubjectType
|
|
65
|
+
| undefined;
|
|
66
|
+
/** 授权主体ID */
|
|
67
|
+
subject_id?:
|
|
68
|
+
| number
|
|
69
|
+
| undefined;
|
|
70
|
+
/** 当前页码 */
|
|
71
|
+
page_num: number;
|
|
72
|
+
/** 每一页的行数 */
|
|
73
|
+
page_size: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** 项目授权分页响应。 */
|
|
77
|
+
export interface PageBaseTenantProjectGrantResponse {
|
|
78
|
+
/** 项目授权列表 */
|
|
79
|
+
grants: BaseTenantProjectGrant[];
|
|
80
|
+
/** 总数 */
|
|
81
|
+
total: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** 查询项目授权请求参数。 */
|
|
85
|
+
export interface GetBaseTenantProjectGrantRequest {
|
|
86
|
+
/** 授权目标租户ID */
|
|
87
|
+
tenant_id: number;
|
|
88
|
+
/** 授权主体类型 */
|
|
89
|
+
subject_type: BaseTenantProjectGrantSubjectType;
|
|
90
|
+
/** 授权主体ID */
|
|
91
|
+
subject_id: number;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** 创建项目授权请求参数。 */
|
|
95
|
+
export interface CreateBaseTenantProjectGrantRequest {
|
|
96
|
+
/** 项目授权表单 */
|
|
97
|
+
base_tenant_project_grant: BaseTenantProjectGrant | undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** 更新项目授权请求参数。 */
|
|
101
|
+
export interface UpdateBaseTenantProjectGrantRequest {
|
|
102
|
+
/** 项目授权表单 */
|
|
103
|
+
base_tenant_project_grant: BaseTenantProjectGrant | undefined;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** 删除项目授权请求参数。 */
|
|
107
|
+
export interface DeleteBaseTenantProjectGrantRequest {
|
|
108
|
+
/** 授权目标租户ID */
|
|
109
|
+
tenant_id: number;
|
|
110
|
+
/** 授权主体类型 */
|
|
111
|
+
subject_type: BaseTenantProjectGrantSubjectType;
|
|
112
|
+
/** 授权主体ID */
|
|
113
|
+
subject_id: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** BaseTenantProjectGrantService 管理岗位、角色、部门和用户在目标租户下的项目授权。 */
|
|
117
|
+
export interface BaseTenantProjectGrantService {
|
|
118
|
+
/** 查询项目授权分页列表。 */
|
|
119
|
+
PageBaseTenantProjectGrant(request: PageBaseTenantProjectGrantRequest): Promise<PageBaseTenantProjectGrantResponse>;
|
|
120
|
+
/** 查询项目授权详情。 */
|
|
121
|
+
GetBaseTenantProjectGrant(request: GetBaseTenantProjectGrantRequest): Promise<BaseTenantProjectGrant>;
|
|
122
|
+
/** 新增项目授权。 */
|
|
123
|
+
CreateBaseTenantProjectGrant(request: CreateBaseTenantProjectGrantRequest): Promise<Empty>;
|
|
124
|
+
/** 更新项目授权,只修改项目范围,授权主体联合键不可变更。 */
|
|
125
|
+
UpdateBaseTenantProjectGrant(request: UpdateBaseTenantProjectGrantRequest): Promise<Empty>;
|
|
126
|
+
/** 删除项目授权。 */
|
|
127
|
+
DeleteBaseTenantProjectGrant(request: DeleteBaseTenantProjectGrantRequest): Promise<Empty>;
|
|
128
|
+
}
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
</template>
|
|
102
102
|
|
|
103
103
|
<script setup lang="ts" name="XSender">
|
|
104
|
-
import { computed, ref
|
|
105
|
-
import { Attachments,
|
|
104
|
+
import { computed, ref } from "vue";
|
|
105
|
+
import { Attachments, XSender as BaseXSender } from "vue-element-plus-x";
|
|
106
106
|
import type { FilesCardProps } from "vue-element-plus-x/types/FilesCard";
|
|
107
107
|
import { Loading, Microphone, Paperclip, Promotion } from "@element-plus/icons-vue";
|
|
108
108
|
import { ElMessage } from "element-plus";
|
|
@@ -111,13 +111,8 @@ import { defFileService } from "@liujitcn/kratos-admin-core/api/base/v1/file";
|
|
|
111
111
|
import type { AiAttachment } from "@liujitcn/kratos-admin-system/rpc/base/v1/ai_session";
|
|
112
112
|
import type { SubmitPayload } from "../types";
|
|
113
113
|
import { buildAIAttachmentFileCard } from "../attachment";
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
type RecordError = {
|
|
117
|
-
code?: number;
|
|
118
|
-
error?: string;
|
|
119
|
-
message?: string;
|
|
120
|
-
};
|
|
114
|
+
import { useSpeechRecognition } from "./speech-recognition";
|
|
115
|
+
import type { SpeechRecognitionError } from "./speech-recognition";
|
|
121
116
|
|
|
122
117
|
const props = defineProps<{
|
|
123
118
|
/** 消息发送加载状态。 */
|
|
@@ -153,13 +148,17 @@ const acceptedAttachmentExtensions = [
|
|
|
153
148
|
];
|
|
154
149
|
const acceptedAttachmentTypes = acceptedAttachmentExtensions.join(",");
|
|
155
150
|
|
|
151
|
+
const voiceBaseText = ref("");
|
|
156
152
|
const {
|
|
157
153
|
loading: recording,
|
|
158
154
|
start: startRecord,
|
|
159
|
-
stop: stopRecord
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
stop: stopRecord
|
|
156
|
+
} = useSpeechRecognition({
|
|
157
|
+
onStart: () => {
|
|
158
|
+
voiceBaseText.value = inputText.value.trim();
|
|
159
|
+
},
|
|
162
160
|
onEnd: handleRecordEnd,
|
|
161
|
+
onResult: setRecordText,
|
|
163
162
|
onError: handleRecordError
|
|
164
163
|
});
|
|
165
164
|
|
|
@@ -217,10 +216,11 @@ function handleToggleRecord() {
|
|
|
217
216
|
/** 语音识别结束后保留当前识别文本。 */
|
|
218
217
|
function handleRecordEnd(result: string) {
|
|
219
218
|
setRecordText(result);
|
|
219
|
+
voiceBaseText.value = "";
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
/** 处理语音识别失败,提示浏览器不支持或麦克风授权异常。 */
|
|
223
|
-
function handleRecordError(error:
|
|
223
|
+
function handleRecordError(error: SpeechRecognitionError) {
|
|
224
224
|
const message = resolveRecordErrorMessage(error);
|
|
225
225
|
ElMessage.warning(message);
|
|
226
226
|
}
|
|
@@ -229,8 +229,9 @@ function handleRecordError(error: RecordError) {
|
|
|
229
229
|
function setRecordText(recordText: string) {
|
|
230
230
|
const normalizedRecordText = normalizeRecordText(recordText);
|
|
231
231
|
if (!normalizedRecordText) return;
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
const nextText = [voiceBaseText.value, normalizedRecordText].filter(Boolean).join(" ");
|
|
233
|
+
senderRef.value?.setText(nextText);
|
|
234
|
+
inputText.value = nextText;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
/** 标准化语音识别文本,压掉多余空白。 */
|
|
@@ -274,7 +275,7 @@ function matchCumulativeRecordCandidate(text: string, candidate: string) {
|
|
|
274
275
|
}
|
|
275
276
|
|
|
276
277
|
/** 根据浏览器语音识别错误类型生成用户可理解的提示。 */
|
|
277
|
-
function resolveRecordErrorMessage(error:
|
|
278
|
+
function resolveRecordErrorMessage(error: SpeechRecognitionError) {
|
|
278
279
|
if (error.code === -1) return t("system.ai.chat.message.voice_unsupported");
|
|
279
280
|
const errorName = error.error ?? "";
|
|
280
281
|
if (["not-allowed", "service-not-allowed", "permission-denied"].includes(errorName)) {
|
|
@@ -389,15 +390,6 @@ function handleDeleteCard(item: { uid?: string | number }) {
|
|
|
389
390
|
function resetFileInput() {
|
|
390
391
|
if (fileInputRef.value) fileInputRef.value.value = "";
|
|
391
392
|
}
|
|
392
|
-
|
|
393
|
-
/** 按 useRecord 文档监听识别文本,并同步到 XSender。 */
|
|
394
|
-
watch(
|
|
395
|
-
recordText,
|
|
396
|
-
value => {
|
|
397
|
-
setRecordText(value);
|
|
398
|
-
},
|
|
399
|
-
{ deep: true }
|
|
400
|
-
);
|
|
401
393
|
</script>
|
|
402
394
|
|
|
403
395
|
<style scoped lang="scss">
|
|
@@ -406,14 +398,15 @@ watch(
|
|
|
406
398
|
}
|
|
407
399
|
.agent-sender {
|
|
408
400
|
:deep(.elx-x-sender) {
|
|
401
|
+
background: var(--admin-page-card-bg);
|
|
409
402
|
border-radius: var(--admin-page-radius);
|
|
410
403
|
box-shadow: none;
|
|
411
404
|
}
|
|
412
405
|
:deep(.elx-x-sender__content) {
|
|
413
406
|
padding: 8px 10px 10px;
|
|
414
|
-
background:
|
|
415
|
-
border:
|
|
416
|
-
border-radius:
|
|
407
|
+
background: transparent;
|
|
408
|
+
border: 0;
|
|
409
|
+
border-radius: inherit;
|
|
417
410
|
}
|
|
418
411
|
:deep(.elx-x-sender__content--variant-updown) {
|
|
419
412
|
gap: 10px;
|