@epxing/business 5.3.0-beta.2 → 5.3.0-beta.3

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 (98) hide show
  1. package/API.md +8 -4
  2. package/README.md +44 -44
  3. package/dist/src/base/AiSkillEditor.js +1 -1
  4. package/dist/src/base/AiSkillEditor.vue.js +2 -0
  5. package/dist/src/base/AppConfigFormItem.js +1 -3
  6. package/dist/src/base/AppConfigFormItem.vue.js +210 -85
  7. package/dist/src/base/CommonFieldList.js +1 -1
  8. package/dist/src/base/CommonFieldList.vue.js +2 -1
  9. package/dist/src/base/ConfigModuleIndex.js +38 -1
  10. package/dist/src/base/ManageAppNav.js +1 -1
  11. package/dist/src/base/ManageMenu.js +1 -1
  12. package/dist/src/base/RoleBindTrace.js +253 -0
  13. package/dist/src/base/RoleGroupManage.js +1037 -0
  14. package/dist/src/base/ServiceMenu.js +7 -6
  15. package/dist/src/components/AiList.js +1278 -3
  16. package/dist/src/components/EntityCheckboxFind.vue.js +14 -10
  17. package/dist/src/components/EntityRightFormItem.js +1 -5
  18. package/dist/src/components/EntityRightFormItem.vue.js +3 -1
  19. package/dist/src/components/EntitySystemEr.js +492 -0
  20. package/dist/src/components/HallNav.vue.js +7 -36
  21. package/dist/src/components/IconFontLibrary.js +22 -1
  22. package/dist/src/components/IconFontList.js +21 -1
  23. package/dist/src/components/PrintFormList.js +2 -1
  24. package/dist/src/components/PrintFormList.vue.js +3 -1
  25. package/dist/src/components/WikiWorkbench.js +153 -129
  26. package/dist/src/components/authorization/AuthorizationInterface.js +3 -1
  27. package/dist/src/components/custom-bpmn/PropertiesView.js +1991 -1942
  28. package/dist/src/components/icon-gallery/IconGallery.js +193 -0
  29. package/dist/src/components/icon-gallery/mixin.js +150 -0
  30. package/dist/src/components/wiki-workbench/WikiIntake.js +86 -93
  31. package/dist/src/components/wiki-workbench/WikiIntake.vue.js +153 -73
  32. package/dist/src/index.js +26 -20
  33. package/dist/src/public-components.js +16 -14
  34. package/dist/src/route-components.js +5 -5
  35. package/dist/src/system.component.index.js +1 -1
  36. package/dist/src/system.component.js +8 -3
  37. package/dist/src/system.component.lazy.js +1 -1
  38. package/dist/src/views/Add.js +1 -1
  39. package/dist/src/views/Add.vue.js +8 -3
  40. package/dist/src/views/AiToolManager.js +792 -317
  41. package/dist/src/views/App.js +3 -45
  42. package/dist/src/views/AppRoleSelect.js +3 -230
  43. package/dist/src/views/Error.js +3 -207
  44. package/dist/src/views/ExcelDesign.js +326 -316
  45. package/dist/src/views/JvmMemoryMonitor.js +463 -0
  46. package/dist/src/views/Module.js +3 -170
  47. package/dist/src/views/WikiBinding.js +88 -25
  48. package/dist/style.css +2867 -1487
  49. package/package.json +12 -6
  50. package/src/base/AiSkillEditor.vue +2 -0
  51. package/src/base/AppConfigFormItem.vue +211 -145
  52. package/src/base/CommonFieldList.vue +9 -6
  53. package/src/base/ConfigModuleIndex.vue +37 -1
  54. package/src/base/ManageAppNav.vue +1188 -1188
  55. package/src/base/ManageMenu.vue +933 -933
  56. package/src/base/RoleBindTrace.vue +364 -0
  57. package/src/base/RoleGroupManage.vue +1160 -0
  58. package/src/base/ServiceMenu.vue +6 -5
  59. package/src/components/AiList.vue +439 -113
  60. package/src/components/EntityCheckboxFind.vue +12 -8
  61. package/src/components/EntityRightFormItem.vue +9 -10
  62. package/src/components/EntitySystemEr.vue +517 -0
  63. package/src/components/HallNav.vue +6 -33
  64. package/src/components/IconFontLibrary.vue +27 -60
  65. package/src/components/IconFontList.vue +13 -64
  66. package/src/components/PrintFormList.vue +33 -27
  67. package/src/components/WikiWorkbench.vue +90 -60
  68. package/src/components/authorization/AuthorizationInterface.vue +2 -0
  69. package/src/components/custom-bpmn/CustomPalette.js +1 -1
  70. package/src/components/custom-bpmn/CustomRenderer.js +1 -1
  71. package/src/components/custom-bpmn/PropertiesView.vue +35 -4
  72. package/src/components/custom-bpmn/index.js +1 -1
  73. package/src/components/icon-gallery/IconGallery.vue +130 -0
  74. package/src/components/icon-gallery/mixin.jsx +109 -0
  75. package/src/components/wiki-workbench/WikiIntake.vue +178 -104
  76. package/src/index.js +24 -20
  77. package/src/public-components.js +1 -0
  78. package/src/route-components.js +4 -4
  79. package/src/system.component.index.js +1 -1
  80. package/src/views/Add.vue +8 -5
  81. package/src/views/AiToolManager.vue +326 -4
  82. package/src/views/App.vue +4 -53
  83. package/src/views/AppRoleSelect.vue +4 -334
  84. package/src/views/Error.vue +4 -63
  85. package/src/views/ExcelDesign.vue +24 -7
  86. package/src/views/JvmMemoryMonitor.vue +284 -0
  87. package/src/views/Module.vue +4 -210
  88. package/src/views/WikiBinding.vue +42 -0
  89. package/types/app.d.ts +1 -0
  90. package/types/dept-find.d.ts +1 -1
  91. package/types/index.d.ts +15 -14
  92. package/types/popup.d.ts +2 -2
  93. package/types/route-components.d.ts +1 -1
  94. package/types/user-find.d.ts +1 -1
  95. package/dist/assets/role_select-DTqRlFNz.webp +0 -0
  96. package/dist/src/components/AiList.vue.js +0 -93
  97. package/dist/src/components/IconFontLibrary.vue.js +0 -67
  98. package/dist/src/components/IconFontList.vue.js +0 -79
@@ -1,8 +1,1283 @@
1
1
  import '../../style.css';
2
- import _sfc_main from "./AiList.vue.js";
3
- /* empty css */
2
+ import EntityList from "@epxing/components/src/entity-list";
3
+ import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, createVNode, withCtx, createTextVNode, createBlock, createCommentVNode, toDisplayString, Fragment, renderList, normalizeClass, vShow } from "vue";
4
+ /* empty css */
4
5
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
5
- const AiList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b9276670"]]);
6
+ const modelFields = ["ID", "NAME", "CODE", "GROUP_ID", "MODE_TYPE", "MAX_TOKEN", "ENABLE", "IS_DEFAULT", "THINK", "SEARCH", "MULTIMODAL"];
7
+ const _sfc_main = {
8
+ name: "epx-ai-list",
9
+ // 保留平台列表的页面上下文、权限入口和刷新事件,重写注册页布局与取数。
10
+ extends: EntityList,
11
+ data() {
12
+ return {
13
+ data: [],
14
+ loading: false,
15
+ registryHeight: 0,
16
+ connectionExpanded: false,
17
+ currentPage: 1,
18
+ total: 0,
19
+ groups: [],
20
+ activeGroupId: null,
21
+ groupKeyword: "",
22
+ modelKeyword: "",
23
+ modelCategory: "",
24
+ modelStatus: "",
25
+ registryReady: false,
26
+ registryLoading: false,
27
+ registryError: "",
28
+ modelError: "",
29
+ providerOptions: [],
30
+ categoryOptions: [],
31
+ groupDialog: false,
32
+ modelDialog: false,
33
+ groupForm: {},
34
+ modelForm: {},
35
+ originalModelGroup: "",
36
+ saving: false,
37
+ logoUploading: false,
38
+ mutationLoading: false,
39
+ // 序号隔离快速切组、搜索产生的旧响应。
40
+ requestSerial: 0,
41
+ searchTimer: null,
42
+ groupRules: {
43
+ NAME: [{ required: true, message: "请输入组名称", trigger: "blur" }],
44
+ TYPE: [{ required: true, message: "请选择模型提供商", trigger: "change" }],
45
+ BASE_URL: [{ required: true, message: "请输入接口基础地址", trigger: "blur" }]
46
+ },
47
+ modelRules: {
48
+ NAME: [{ required: true, message: "请输入模型名称", trigger: "blur" }],
49
+ CODE: [{ required: true, message: "请输入模型编号", trigger: "blur" }],
50
+ MODE_TYPE: [{ required: true, message: "请选择模型分类", trigger: "change" }],
51
+ MAX_TOKEN: [{ required: true, type: "number", min: 1, message: "请输入正整数", trigger: "change" }]
52
+ }
53
+ };
54
+ },
55
+ computed: {
56
+ realGroups() {
57
+ return this.groups.filter((group) => group.ID);
58
+ },
59
+ visibleGroups() {
60
+ const keyword = this.groupKeyword.trim().toLowerCase();
61
+ return this.groups.filter((group) => group.NAME.toLowerCase().includes(keyword));
62
+ },
63
+ activeGroup() {
64
+ return this.groups.find((group) => group.ID === this.activeGroupId) || {};
65
+ }
66
+ },
67
+ mounted() {
68
+ this.registryPage = this.$el.closest(".epx-base-page");
69
+ if (this.registryPage) {
70
+ this.registryResizeObserver = new ResizeObserver(this.updateRegistryHeight);
71
+ this.registryResizeObserver.observe(this.registryPage);
72
+ this.updateRegistryHeight();
73
+ }
74
+ },
75
+ beforeUnmount() {
76
+ if (this.registryResizeObserver) this.registryResizeObserver.disconnect();
77
+ clearTimeout(this.searchTimer);
78
+ this.requestSerial++;
79
+ },
80
+ methods: {
81
+ updateRegistryHeight() {
82
+ const page = this.registryPage;
83
+ if (!page || !page.clientHeight) return;
84
+ const offset = this.$el.getBoundingClientRect().top - page.getBoundingClientRect().top + page.scrollTop;
85
+ const margin = parseFloat(getComputedStyle(this.$el).marginBottom) || 0;
86
+ this.registryHeight = Math.max(0, Math.floor(page.clientHeight - offset - margin));
87
+ },
88
+ initComponent() {
89
+ this.reloadData();
90
+ },
91
+ async reloadData() {
92
+ if (this.registryLoading) return;
93
+ this.registryLoading = true;
94
+ this.registryError = "";
95
+ try {
96
+ const [groups, providers, categories] = await Promise.all([
97
+ this.$http.$post({ entityId: this.$metaId, action: "registryGroups" }),
98
+ this.$http.getCodes({ key: "AI_TYPE" }),
99
+ this.$http.getCodes({ key: "MODE_FUN" })
100
+ ]);
101
+ this.groups = groups;
102
+ this.providerOptions = providers;
103
+ this.categoryOptions = categories;
104
+ if (!groups.some((group) => group.ID === this.activeGroupId)) this.activeGroupId = groups.length ? groups[0].ID : "";
105
+ this.registryReady = true;
106
+ await this.getData(this.currentPage);
107
+ } catch (err) {
108
+ this.registryError = err && (err.msg || err.message) || "加载模型接入组失败";
109
+ this.$message.error(this.registryError);
110
+ } finally {
111
+ this.registryLoading = false;
112
+ }
113
+ },
114
+ async getData(page = 1, callback) {
115
+ if (!this.registryReady) return;
116
+ const serial = ++this.requestSerial;
117
+ this.loading = true;
118
+ this.modelError = "";
119
+ this.currentPage = Number(page) || 1;
120
+ try {
121
+ const params = {
122
+ entityId: this.$metaId,
123
+ page: this.currentPage,
124
+ limit: 20,
125
+ columnFields: modelFields.map((attriName) => ({ attriName })),
126
+ order_field: "NAME",
127
+ order_mode: "asc",
128
+ "scope.MODE_TYPE": this.modelCategory,
129
+ "scope.ENABLE": this.modelStatus,
130
+ ...this.activeGroupId ? { "scope.GROUP_ID": this.activeGroupId } : { "scope.GROUP_ID#is_null": "1" }
131
+ };
132
+ const filters = (this.scopeParams || []).map((item) => ({ ...item }));
133
+ if (this.modelKeyword.trim()) {
134
+ if (filters.length) filters[filters.length - 1].link = "and";
135
+ filters.push(
136
+ { lb: "(", field: "NAME", mode: "like", values: this.modelKeyword.trim(), link: "or" },
137
+ { field: "CODE", mode: "like", values: this.modelKeyword.trim(), rb: ")" }
138
+ );
139
+ }
140
+ if (filters.length) params.scopeParams = JSON.stringify(filters);
141
+ const result = await this.$http.list(params);
142
+ if (serial !== this.requestSerial) return;
143
+ this.data = result.entitys || [];
144
+ this.total = result.total || 0;
145
+ if (callback) callback(this.data);
146
+ } catch (err) {
147
+ if (serial !== this.requestSerial) return;
148
+ this.data = [];
149
+ this.total = 0;
150
+ this.modelError = err && (err.msg || err.message) || "加载模型失败";
151
+ this.$message.error(this.modelError);
152
+ } finally {
153
+ if (serial === this.requestSerial) this.loading = false;
154
+ }
155
+ },
156
+ selectGroup(id) {
157
+ this.activeGroupId = id;
158
+ this.modelKeyword = "";
159
+ this.modelCategory = "";
160
+ this.modelStatus = "";
161
+ clearTimeout(this.searchTimer);
162
+ this.getData(1);
163
+ },
164
+ scheduleSearch() {
165
+ clearTimeout(this.searchTimer);
166
+ this.searchTimer = setTimeout(() => this.getData(1), 250);
167
+ },
168
+ codeName(options, code) {
169
+ const item = options.find((item2) => item2.code === code);
170
+ return item ? item.name : code;
171
+ },
172
+ formatLimit(value) {
173
+ return Number(value || 0).toLocaleString();
174
+ },
175
+ hasCapabilities(model) {
176
+ return ["THINK", "SEARCH", "MULTIMODAL"].some((key) => model[key] === "1");
177
+ },
178
+ openGroup(group) {
179
+ this.groupForm = { NAME: "", TYPE: "", BASE_URL: "", APP_ID: "", NOTE: "", LOGO: "", ...group, API_SECRET: "" };
180
+ this.groupDialog = true;
181
+ this.$nextTick(() => this.$refs.groupForm.clearValidate());
182
+ },
183
+ async uploadGroupLogo({ file }) {
184
+ this.logoUploading = true;
185
+ try {
186
+ const meta = await this.$http.getMeta({ metaId: "FM_AI_MODEL_GROUP" });
187
+ const attribute = meta.attributes.LOGO;
188
+ if (!attribute) throw new Error("接入组图标字段尚未配置");
189
+ const result = await this.$http.$post({ action: "uploadOfEntity", metaId: "FM_AI_MODEL_GROUP", attributeId: attribute.id, file }, { requestType: "formData" });
190
+ const id = result.bean || result.id;
191
+ if (!id) throw new Error(result.fileCheck && result.fileCheck.checkResult || "上传图标失败");
192
+ this.groupForm.LOGO = id;
193
+ } catch (err) {
194
+ this.$message.error(err && (err.msg || err.message) || "上传图标失败");
195
+ } finally {
196
+ this.logoUploading = false;
197
+ }
198
+ },
199
+ async saveGroup() {
200
+ if (this.saving || this.logoUploading) return;
201
+ const valid = await this.$refs.groupForm.validate().catch(() => false);
202
+ if (!valid) return;
203
+ this.saving = true;
204
+ const create = !this.groupForm.ID;
205
+ try {
206
+ const id = await this.$http.$post({ entityId: this.$metaId, action: "saveModelGroup", bean: { ...this.groupForm } });
207
+ this.groupForm.API_SECRET = "";
208
+ this.groupDialog = false;
209
+ this.activeGroupId = id;
210
+ this.currentPage = 1;
211
+ await this.reloadData();
212
+ this.$message.success("接入组已保存");
213
+ if (create && !this.registryError) this.openModel();
214
+ } catch (err) {
215
+ this.$message.error(err && (err.msg || err.message) || "保存接入组失败");
216
+ } finally {
217
+ this.saving = false;
218
+ }
219
+ },
220
+ async openModel(model) {
221
+ if (!model && !this.activeGroupId) {
222
+ if (!this.realGroups.length) return this.openGroup();
223
+ this.selectGroup(this.realGroups[0].ID);
224
+ }
225
+ try {
226
+ const detail = model ? await this.$http.get({ entityId: this.$metaId, id: model.ID }) : null;
227
+ const value = detail ? detail.data : {};
228
+ this.modelForm = {
229
+ NAME: "",
230
+ CODE: "",
231
+ GROUP_ID: this.activeGroupId,
232
+ MODE_TYPE: "text",
233
+ MAX_TOKEN: 32768,
234
+ ENABLE: "1",
235
+ IS_DEFAULT: "0",
236
+ THINK: "0",
237
+ SEARCH: "0",
238
+ MULTIMODAL: "0",
239
+ ...value,
240
+ API_SECRET: ""
241
+ };
242
+ this.modelForm.GROUP_ID = this.modelForm.GROUP_ID || "";
243
+ this.modelForm.MAX_TOKEN = Number(this.modelForm.MAX_TOKEN);
244
+ this.originalModelGroup = this.modelForm.GROUP_ID;
245
+ this.modelDialog = true;
246
+ this.$nextTick(() => this.$refs.modelForm.clearValidate());
247
+ } catch (err) {
248
+ this.$message.error(err && (err.msg || err.message) || "读取模型配置失败");
249
+ }
250
+ },
251
+ async saveModel() {
252
+ if (this.saving) return;
253
+ const valid = await this.$refs.modelForm.validate().catch(() => false);
254
+ if (!valid) return;
255
+ this.saving = true;
256
+ try {
257
+ await this.$http.$post({ entityId: this.$metaId, action: "saveRegistryModel", bean: { ...this.modelForm } });
258
+ this.modelForm.API_SECRET = "";
259
+ this.modelDialog = false;
260
+ this.activeGroupId = this.modelForm.GROUP_ID || "";
261
+ await this.reloadData();
262
+ this.$message.success("模型已保存");
263
+ } catch (err) {
264
+ this.$message.error(err && (err.msg || err.message) || "保存模型失败");
265
+ } finally {
266
+ this.saving = false;
267
+ }
268
+ },
269
+ async toggleModel(model, enabled) {
270
+ this.mutationLoading = true;
271
+ try {
272
+ await this.$http.$post({ entityId: this.$metaId, action: "setModelEnabled", id: model.ID, enabled: enabled ? "1" : "0" });
273
+ await this.reloadData();
274
+ } catch (err) {
275
+ this.$message.error(err && (err.msg || err.message) || "修改模型状态失败");
276
+ } finally {
277
+ this.mutationLoading = false;
278
+ }
279
+ },
280
+ async setDefault(model) {
281
+ this.mutationLoading = true;
282
+ try {
283
+ await this.$http.$post({ entityId: this.$metaId, action: "setDefault", id: model.ID });
284
+ await this.reloadData();
285
+ this.$message.success("已设置分类默认模型");
286
+ } catch (err) {
287
+ this.$message.error(err && (err.msg || err.message) || "设置默认模型失败");
288
+ } finally {
289
+ this.mutationLoading = false;
290
+ }
291
+ },
292
+ async deleteModel(model) {
293
+ try {
294
+ await this.$confirm("确认删除模型“" + model.NAME + "”?删除后无法恢复。", "删除模型", { type: "warning", confirmButtonText: "删除", cancelButtonText: "取消" });
295
+ this.mutationLoading = true;
296
+ await this.$http.removeMulti({ entityId: this.$metaId, ids: model.ID });
297
+ await this.reloadData();
298
+ this.$message.success("模型已删除");
299
+ } catch (err) {
300
+ if (err !== "cancel" && err !== "close") this.$message.error(err && (err.msg || err.message) || "删除模型失败");
301
+ } finally {
302
+ this.mutationLoading = false;
303
+ }
304
+ },
305
+ closeGroup(done) {
306
+ if (!this.saving && !this.logoUploading) {
307
+ this.groupForm.API_SECRET = "";
308
+ done();
309
+ }
310
+ },
311
+ closeModel(done) {
312
+ if (!this.saving) {
313
+ this.modelForm.API_SECRET = "";
314
+ done();
315
+ }
316
+ }
317
+ }
318
+ };
319
+ const _hoisted_1 = { class: "ai-registry__heading" };
320
+ const _hoisted_2 = {
321
+ key: 1,
322
+ class: "ai-registry__layout"
323
+ };
324
+ const _hoisted_3 = { class: "ai-registry__groups" };
325
+ const _hoisted_4 = { class: "ai-registry__between" };
326
+ const _hoisted_5 = { class: "ai-registry__muted" };
327
+ const _hoisted_6 = { class: "ai-registry__group-list" };
328
+ const _hoisted_7 = ["onClick"];
329
+ const _hoisted_8 = {
330
+ key: 0,
331
+ class: "ai-registry__muted"
332
+ };
333
+ const _hoisted_9 = { class: "ai-registry__detail" };
334
+ const _hoisted_10 = {
335
+ key: 0,
336
+ class: "ai-registry__panel"
337
+ };
338
+ const _hoisted_11 = { class: "ai-registry__between" };
339
+ const _hoisted_12 = { class: "ai-registry__identity" };
340
+ const _hoisted_13 = { class: "ai-registry__icon" };
341
+ const _hoisted_14 = {
342
+ key: 1,
343
+ class: "el-icon-connection"
344
+ };
345
+ const _hoisted_15 = { class: "ai-registry__connection" };
346
+ const _hoisted_16 = { class: "ai-registry__notice" };
347
+ const _hoisted_17 = { class: "ai-registry__panel ai-registry__models" };
348
+ const _hoisted_18 = { class: "ai-registry__between" };
349
+ const _hoisted_19 = { class: "ai-registry__filters" };
350
+ const _hoisted_20 = { class: "ai-registry__table" };
351
+ const _hoisted_21 = { class: "ai-registry__name" };
352
+ const _hoisted_22 = { class: "ai-registry__model-code" };
353
+ const _hoisted_23 = {
354
+ key: 3,
355
+ class: "ai-registry__muted"
356
+ };
357
+ const _hoisted_24 = { class: "ai-registry__muted" };
358
+ const _hoisted_25 = { class: "ai-registry__footer" };
359
+ const _hoisted_26 = { class: "ai-registry__dialog" };
360
+ const _hoisted_27 = { class: "ai-registry__logo-editor" };
361
+ const _hoisted_28 = { class: "ai-registry__form-row" };
362
+ const _hoisted_29 = { class: "ai-registry__dialog" };
363
+ const _hoisted_30 = { class: "ai-registry__form-row" };
364
+ const _hoisted_31 = { class: "ai-registry__form-row" };
365
+ const _hoisted_32 = {
366
+ key: 0,
367
+ class: "ai-registry__legacy"
368
+ };
369
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
370
+ const _component_el_button = resolveComponent("el-button");
371
+ const _component_el_alert = resolveComponent("el-alert");
372
+ const _component_el_input = resolveComponent("el-input");
373
+ const _component_el_image = resolveComponent("el-image");
374
+ const _component_el_tag = resolveComponent("el-tag");
375
+ const _component_el_option = resolveComponent("el-option");
376
+ const _component_el_select = resolveComponent("el-select");
377
+ const _component_el_table_column = resolveComponent("el-table-column");
378
+ const _component_el_switch = resolveComponent("el-switch");
379
+ const _component_el_table = resolveComponent("el-table");
380
+ const _component_el_pagination = resolveComponent("el-pagination");
381
+ const _component_el_upload = resolveComponent("el-upload");
382
+ const _component_el_form_item = resolveComponent("el-form-item");
383
+ const _component_el_form = resolveComponent("el-form");
384
+ const _component_el_dialog = resolveComponent("el-dialog");
385
+ const _component_el_input_number = resolveComponent("el-input-number");
386
+ const _component_el_checkbox = resolveComponent("el-checkbox");
387
+ const _directive_loading = resolveDirective("loading");
388
+ return withDirectives((openBlock(), createElementBlock("div", {
389
+ class: "ai-registry",
390
+ style: normalizeStyle({ height: $data.registryHeight ? $data.registryHeight + "px" : null })
391
+ }, [
392
+ createElementVNode("div", _hoisted_1, [
393
+ _cache[36] || (_cache[36] = createElementVNode("div", null, [
394
+ createElementVNode("h2", null, "模型注册"),
395
+ createElementVNode("p", null, "按接入组管理模型,一次配置连接,按需添加多个模型。")
396
+ ], -1)),
397
+ createVNode(_component_el_button, {
398
+ size: "small",
399
+ icon: "el-icon-plus",
400
+ onClick: _cache[0] || (_cache[0] = ($event) => $options.openGroup())
401
+ }, {
402
+ default: withCtx(() => [..._cache[35] || (_cache[35] = [
403
+ createTextVNode("新建接入组", -1)
404
+ ])]),
405
+ _: 1
406
+ })
407
+ ]),
408
+ $data.registryError ? (openBlock(), createBlock(_component_el_alert, {
409
+ key: 0,
410
+ title: $data.registryError,
411
+ type: "error",
412
+ closable: false,
413
+ "show-icon": ""
414
+ }, {
415
+ default: withCtx(() => [
416
+ createVNode(_component_el_button, {
417
+ type: "text",
418
+ onClick: $options.reloadData
419
+ }, {
420
+ default: withCtx(() => [..._cache[37] || (_cache[37] = [
421
+ createTextVNode("重新加载", -1)
422
+ ])]),
423
+ _: 1
424
+ }, 8, ["onClick"])
425
+ ]),
426
+ _: 1
427
+ }, 8, ["title"])) : createCommentVNode("", true),
428
+ $data.registryReady ? (openBlock(), createElementBlock("div", _hoisted_2, [
429
+ createElementVNode("aside", _hoisted_3, [
430
+ createElementVNode("div", _hoisted_4, [
431
+ _cache[38] || (_cache[38] = createElementVNode("strong", null, "接入组", -1)),
432
+ createElementVNode("span", _hoisted_5, toDisplayString($options.realGroups.length) + " 个组", 1)
433
+ ]),
434
+ createVNode(_component_el_input, {
435
+ modelValue: $data.groupKeyword,
436
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.groupKeyword = $event),
437
+ size: "small",
438
+ placeholder: "搜索接入组",
439
+ "prefix-icon": "el-icon-search",
440
+ clearable: ""
441
+ }, null, 8, ["modelValue"]),
442
+ createElementVNode("div", _hoisted_6, [
443
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.visibleGroups, (group) => {
444
+ return openBlock(), createElementBlock("button", {
445
+ key: group.ID || "ungrouped",
446
+ type: "button",
447
+ class: normalizeClass(["ai-registry__group", { "is-active": $data.activeGroupId === group.ID }]),
448
+ onClick: ($event) => $options.selectGroup(group.ID)
449
+ }, [
450
+ group.LOGO ? (openBlock(), createBlock(_component_el_image, {
451
+ key: 0,
452
+ class: "ai-registry__group-logo",
453
+ src: _ctx.$util.getFileUrl(group.LOGO),
454
+ fit: "contain"
455
+ }, {
456
+ error: withCtx(() => [..._cache[39] || (_cache[39] = [
457
+ createElementVNode("i", { class: "el-icon-folder-opened" }, null, -1)
458
+ ])]),
459
+ _: 1
460
+ }, 8, ["src"])) : (openBlock(), createElementBlock("i", {
461
+ key: 1,
462
+ class: normalizeClass(group.ID ? "el-icon-folder-opened" : "el-icon-folder")
463
+ }, null, 2)),
464
+ createElementVNode("span", null, [
465
+ createElementVNode("strong", null, toDisplayString(group.NAME), 1),
466
+ createElementVNode("small", null, toDisplayString(group.ID ? $options.codeName($data.providerOptions, group.TYPE) : "保留原有独立连接"), 1)
467
+ ]),
468
+ createElementVNode("em", null, toDisplayString(group.MODEL_COUNT), 1)
469
+ ], 10, _hoisted_7);
470
+ }), 128)),
471
+ !$options.visibleGroups.length ? (openBlock(), createElementBlock("p", _hoisted_8, "没有匹配的接入组")) : createCommentVNode("", true)
472
+ ]),
473
+ _cache[40] || (_cache[40] = createElementVNode("p", { class: "ai-registry__group-tip" }, [
474
+ createElementVNode("i", { class: "el-icon-info" }),
475
+ createTextVNode(" 一个组对应一套接入配置,同一提供商可创建多个接入组。")
476
+ ], -1))
477
+ ]),
478
+ createElementVNode("div", _hoisted_9, [
479
+ $options.activeGroup.ID ? (openBlock(), createElementBlock("section", _hoisted_10, [
480
+ createElementVNode("div", _hoisted_11, [
481
+ createElementVNode("div", _hoisted_12, [
482
+ createElementVNode("span", _hoisted_13, [
483
+ $options.activeGroup.LOGO ? (openBlock(), createBlock(_component_el_image, {
484
+ key: 0,
485
+ src: _ctx.$util.getFileUrl($options.activeGroup.LOGO),
486
+ fit: "contain"
487
+ }, {
488
+ error: withCtx(() => [..._cache[41] || (_cache[41] = [
489
+ createElementVNode("i", { class: "el-icon-connection" }, null, -1)
490
+ ])]),
491
+ _: 1
492
+ }, 8, ["src"])) : (openBlock(), createElementBlock("i", _hoisted_14))
493
+ ]),
494
+ createElementVNode("div", null, [
495
+ createElementVNode("h3", null, toDisplayString($options.activeGroup.NAME), 1),
496
+ withDirectives(createElementVNode("p", null, toDisplayString($options.activeGroup.NOTE || "管理组内模型与共享连接"), 513), [
497
+ [vShow, $data.connectionExpanded]
498
+ ])
499
+ ])
500
+ ]),
501
+ createElementVNode("div", null, [
502
+ createVNode(_component_el_button, {
503
+ size: "small",
504
+ type: "text",
505
+ icon: $data.connectionExpanded ? "el-icon-arrow-up" : "el-icon-arrow-down",
506
+ onClick: _cache[2] || (_cache[2] = ($event) => $data.connectionExpanded = !$data.connectionExpanded)
507
+ }, {
508
+ default: withCtx(() => [
509
+ createTextVNode(toDisplayString($data.connectionExpanded ? "收起" : "展开"), 1)
510
+ ]),
511
+ _: 1
512
+ }, 8, ["icon"]),
513
+ createVNode(_component_el_button, {
514
+ size: "small",
515
+ icon: "el-icon-setting",
516
+ onClick: _cache[3] || (_cache[3] = ($event) => $options.openGroup($options.activeGroup))
517
+ }, {
518
+ default: withCtx(() => [..._cache[42] || (_cache[42] = [
519
+ createTextVNode("编辑组配置", -1)
520
+ ])]),
521
+ _: 1
522
+ })
523
+ ])
524
+ ]),
525
+ withDirectives(createElementVNode("div", _hoisted_15, [
526
+ createElementVNode("div", null, [
527
+ _cache[43] || (_cache[43] = createElementVNode("small", null, "模型提供商", -1)),
528
+ createElementVNode("span", null, toDisplayString($options.codeName($data.providerOptions, $options.activeGroup.TYPE)), 1)
529
+ ]),
530
+ createElementVNode("div", null, [
531
+ _cache[44] || (_cache[44] = createElementVNode("small", null, "接口基础地址", -1)),
532
+ createElementVNode("code", null, toDisplayString($options.activeGroup.BASE_URL), 1)
533
+ ]),
534
+ createElementVNode("div", null, [
535
+ _cache[45] || (_cache[45] = createElementVNode("small", null, "接口密钥", -1)),
536
+ createElementVNode("span", null, toDisplayString($options.activeGroup.HAS_SECRET ? "•••••••••••• 已配置" : "未配置"), 1)
537
+ ])
538
+ ], 512), [
539
+ [vShow, $data.connectionExpanded]
540
+ ]),
541
+ withDirectives(createElementVNode("div", _hoisted_16, [..._cache[46] || (_cache[46] = [
542
+ createElementVNode("i", { class: "el-icon-link" }, null, -1),
543
+ createTextVNode(" 组内模型共用以上连接配置,修改后对本组全部模型生效。", -1)
544
+ ])], 512), [
545
+ [vShow, $data.connectionExpanded]
546
+ ])
547
+ ])) : (openBlock(), createBlock(_component_el_alert, {
548
+ key: 1,
549
+ title: "未分组模型继续使用各自的原有连接配置。编辑模型并选择接入组后,将改为使用组内共享连接。",
550
+ type: "info",
551
+ closable: false,
552
+ "show-icon": ""
553
+ })),
554
+ createElementVNode("section", _hoisted_17, [
555
+ createElementVNode("div", _hoisted_18, [
556
+ createElementVNode("h3", null, [
557
+ createTextVNode(toDisplayString($options.activeGroup.ID ? "组内模型" : "未分组模型") + " ", 1),
558
+ createVNode(_component_el_tag, {
559
+ size: "small",
560
+ type: "info"
561
+ }, {
562
+ default: withCtx(() => [
563
+ createTextVNode(toDisplayString($options.activeGroup.MODEL_COUNT || 0) + " 个", 1)
564
+ ]),
565
+ _: 1
566
+ })
567
+ ]),
568
+ createVNode(_component_el_button, {
569
+ type: "primary",
570
+ size: "small",
571
+ icon: "el-icon-plus",
572
+ onClick: _cache[4] || (_cache[4] = ($event) => $options.openModel())
573
+ }, {
574
+ default: withCtx(() => [..._cache[47] || (_cache[47] = [
575
+ createTextVNode("添加模型", -1)
576
+ ])]),
577
+ _: 1
578
+ })
579
+ ]),
580
+ createElementVNode("div", _hoisted_19, [
581
+ createVNode(_component_el_input, {
582
+ modelValue: $data.modelKeyword,
583
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.modelKeyword = $event),
584
+ size: "small",
585
+ placeholder: "搜索模型名称或编号",
586
+ "prefix-icon": "el-icon-search",
587
+ clearable: "",
588
+ onInput: $options.scheduleSearch
589
+ }, null, 8, ["modelValue", "onInput"]),
590
+ createVNode(_component_el_select, {
591
+ modelValue: $data.modelCategory,
592
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.modelCategory = $event),
593
+ size: "small",
594
+ placeholder: "全部分类",
595
+ clearable: "",
596
+ onChange: _cache[7] || (_cache[7] = ($event) => $options.getData(1))
597
+ }, {
598
+ default: withCtx(() => [
599
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.categoryOptions, (item) => {
600
+ return openBlock(), createBlock(_component_el_option, {
601
+ key: item.code,
602
+ label: item.name,
603
+ value: item.code
604
+ }, null, 8, ["label", "value"]);
605
+ }), 128))
606
+ ]),
607
+ _: 1
608
+ }, 8, ["modelValue"]),
609
+ createVNode(_component_el_select, {
610
+ modelValue: $data.modelStatus,
611
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.modelStatus = $event),
612
+ size: "small",
613
+ placeholder: "全部状态",
614
+ clearable: "",
615
+ onChange: _cache[9] || (_cache[9] = ($event) => $options.getData(1))
616
+ }, {
617
+ default: withCtx(() => [
618
+ createVNode(_component_el_option, {
619
+ label: "已启用",
620
+ value: "1"
621
+ }),
622
+ createVNode(_component_el_option, {
623
+ label: "已停用",
624
+ value: "0"
625
+ })
626
+ ]),
627
+ _: 1
628
+ }, 8, ["modelValue"])
629
+ ]),
630
+ $data.modelError ? (openBlock(), createBlock(_component_el_alert, {
631
+ key: 0,
632
+ title: $data.modelError,
633
+ type: "error",
634
+ closable: false,
635
+ "show-icon": ""
636
+ }, null, 8, ["title"])) : createCommentVNode("", true),
637
+ createElementVNode("div", _hoisted_20, [
638
+ withDirectives((openBlock(), createBlock(_component_el_table, {
639
+ data: $data.data,
640
+ height: "100%",
641
+ "empty-text": "暂无模型,请添加模型或调整筛选条件"
642
+ }, {
643
+ default: withCtx(() => [
644
+ createVNode(_component_el_table_column, {
645
+ label: "模型名称 / 编号",
646
+ "min-width": "220"
647
+ }, {
648
+ default: withCtx((scope) => [
649
+ createElementVNode("div", _hoisted_21, [
650
+ createTextVNode(toDisplayString(scope.row.NAME) + " ", 1),
651
+ scope.row.IS_DEFAULT === "1" ? (openBlock(), createBlock(_component_el_tag, {
652
+ key: 0,
653
+ size: "small"
654
+ }, {
655
+ default: withCtx(() => [..._cache[48] || (_cache[48] = [
656
+ createTextVNode("分类默认", -1)
657
+ ])]),
658
+ _: 1
659
+ })) : createCommentVNode("", true)
660
+ ]),
661
+ createElementVNode("code", _hoisted_22, toDisplayString(scope.row.CODE), 1)
662
+ ]),
663
+ _: 1
664
+ }),
665
+ createVNode(_component_el_table_column, {
666
+ label: "分类",
667
+ "min-width": "100"
668
+ }, {
669
+ default: withCtx((scope) => [
670
+ createVNode(_component_el_tag, {
671
+ size: "small",
672
+ type: "info",
673
+ class: normalizeClass(["ai-registry__category", "ai-registry__category--" + scope.row.MODE_TYPE])
674
+ }, {
675
+ default: withCtx(() => [
676
+ createTextVNode(toDisplayString($options.codeName($data.categoryOptions, scope.row.MODE_TYPE)), 1)
677
+ ]),
678
+ _: 2
679
+ }, 1032, ["class"])
680
+ ]),
681
+ _: 1
682
+ }),
683
+ createVNode(_component_el_table_column, {
684
+ label: "能力",
685
+ "min-width": "160"
686
+ }, {
687
+ default: withCtx((scope) => [
688
+ scope.row.THINK === "1" ? (openBlock(), createBlock(_component_el_tag, {
689
+ key: 0,
690
+ size: "small",
691
+ type: "info"
692
+ }, {
693
+ default: withCtx(() => [..._cache[49] || (_cache[49] = [
694
+ createTextVNode("慢思考", -1)
695
+ ])]),
696
+ _: 1
697
+ })) : createCommentVNode("", true),
698
+ _cache[52] || (_cache[52] = createTextVNode()),
699
+ scope.row.SEARCH === "1" ? (openBlock(), createBlock(_component_el_tag, {
700
+ key: 1,
701
+ size: "small",
702
+ type: "info"
703
+ }, {
704
+ default: withCtx(() => [..._cache[50] || (_cache[50] = [
705
+ createTextVNode("联网搜索", -1)
706
+ ])]),
707
+ _: 1
708
+ })) : createCommentVNode("", true),
709
+ _cache[53] || (_cache[53] = createTextVNode()),
710
+ scope.row.MULTIMODAL === "1" ? (openBlock(), createBlock(_component_el_tag, {
711
+ key: 2,
712
+ size: "small",
713
+ type: "info"
714
+ }, {
715
+ default: withCtx(() => [..._cache[51] || (_cache[51] = [
716
+ createTextVNode("多模态", -1)
717
+ ])]),
718
+ _: 1
719
+ })) : createCommentVNode("", true),
720
+ !$options.hasCapabilities(scope.row) ? (openBlock(), createElementBlock("span", _hoisted_23, "—")) : createCommentVNode("", true)
721
+ ]),
722
+ _: 1
723
+ }),
724
+ createVNode(_component_el_table_column, {
725
+ label: "输入上限 / 向量维度",
726
+ "min-width": "170"
727
+ }, {
728
+ default: withCtx((scope) => [
729
+ createTextVNode(toDisplayString($options.formatLimit(scope.row.MAX_TOKEN)) + " ", 1),
730
+ createElementVNode("span", _hoisted_24, toDisplayString(scope.row.MODE_TYPE === "embedding" ? "维" : "tokens"), 1)
731
+ ]),
732
+ _: 1
733
+ }),
734
+ createVNode(_component_el_table_column, {
735
+ label: "状态",
736
+ width: "100"
737
+ }, {
738
+ default: withCtx((scope) => [
739
+ createVNode(_component_el_switch, {
740
+ "model-value": scope.row.ENABLE === "1",
741
+ disabled: $data.mutationLoading,
742
+ onChange: ($event) => $options.toggleModel(scope.row, $event)
743
+ }, null, 8, ["model-value", "disabled", "onChange"])
744
+ ]),
745
+ _: 1
746
+ }),
747
+ createVNode(_component_el_table_column, {
748
+ label: "操作",
749
+ width: "220"
750
+ }, {
751
+ default: withCtx((scope) => [
752
+ createVNode(_component_el_button, {
753
+ size: "small",
754
+ type: "text",
755
+ onClick: ($event) => $options.openModel(scope.row)
756
+ }, {
757
+ default: withCtx(() => [..._cache[54] || (_cache[54] = [
758
+ createTextVNode("编辑", -1)
759
+ ])]),
760
+ _: 1
761
+ }, 8, ["onClick"]),
762
+ createVNode(_component_el_button, {
763
+ size: "small",
764
+ type: "text",
765
+ disabled: scope.row.IS_DEFAULT === "1" || scope.row.ENABLE !== "1" || $data.mutationLoading,
766
+ onClick: ($event) => $options.setDefault(scope.row)
767
+ }, {
768
+ default: withCtx(() => [..._cache[55] || (_cache[55] = [
769
+ createTextVNode("设为默认", -1)
770
+ ])]),
771
+ _: 1
772
+ }, 8, ["disabled", "onClick"]),
773
+ createVNode(_component_el_button, {
774
+ size: "small",
775
+ type: "text",
776
+ class: "ai-registry__delete",
777
+ disabled: $data.mutationLoading,
778
+ onClick: ($event) => $options.deleteModel(scope.row)
779
+ }, {
780
+ default: withCtx(() => [..._cache[56] || (_cache[56] = [
781
+ createTextVNode("删除", -1)
782
+ ])]),
783
+ _: 1
784
+ }, 8, ["disabled", "onClick"])
785
+ ]),
786
+ _: 1
787
+ })
788
+ ]),
789
+ _: 1
790
+ }, 8, ["data"])), [
791
+ [_directive_loading, $data.loading]
792
+ ])
793
+ ]),
794
+ createElementVNode("div", _hoisted_25, [
795
+ _cache[57] || (_cache[57] = createElementVNode("span", { class: "ai-registry__muted" }, "默认模型按分类设置,跨接入组保持唯一。", -1)),
796
+ createVNode(_component_el_pagination, {
797
+ layout: "total, prev, pager, next",
798
+ total: $data.total,
799
+ "current-page": $data.currentPage,
800
+ "page-size": 20,
801
+ onCurrentChange: $options.getData
802
+ }, null, 8, ["total", "current-page", "onCurrentChange"])
803
+ ])
804
+ ])
805
+ ])
806
+ ])) : createCommentVNode("", true),
807
+ createVNode(_component_el_dialog, {
808
+ title: $data.groupForm.ID ? "编辑组配置" : "新建接入组",
809
+ modelValue: $data.groupDialog,
810
+ "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $data.groupDialog = $event),
811
+ width: "640px",
812
+ "append-to-body": "",
813
+ "close-on-click-modal": false,
814
+ "before-close": $options.closeGroup
815
+ }, {
816
+ footer: withCtx(() => [
817
+ createElementVNode("span", null, [
818
+ createVNode(_component_el_button, {
819
+ size: "small",
820
+ disabled: $data.saving || $data.logoUploading,
821
+ onClick: _cache[17] || (_cache[17] = ($event) => $data.groupDialog = false)
822
+ }, {
823
+ default: withCtx(() => [..._cache[60] || (_cache[60] = [
824
+ createTextVNode("取消", -1)
825
+ ])]),
826
+ _: 1
827
+ }, 8, ["disabled"]),
828
+ createVNode(_component_el_button, {
829
+ size: "small",
830
+ type: "primary",
831
+ loading: $data.saving,
832
+ disabled: $data.logoUploading,
833
+ onClick: $options.saveGroup
834
+ }, {
835
+ default: withCtx(() => [
836
+ createTextVNode(toDisplayString($data.groupForm.ID ? "保存组配置" : "创建并添加模型"), 1)
837
+ ]),
838
+ _: 1
839
+ }, 8, ["loading", "disabled", "onClick"])
840
+ ])
841
+ ]),
842
+ default: withCtx(() => [
843
+ createElementVNode("div", _hoisted_26, [
844
+ createVNode(_component_el_alert, {
845
+ title: $data.groupForm.ID ? "修改连接配置将影响本组全部模型;密钥留空时保留原配置。" : "先配置接入渠道,再向组内添加模型。以下连接信息由组内模型共用。",
846
+ type: "info",
847
+ closable: false,
848
+ "show-icon": ""
849
+ }, null, 8, ["title"]),
850
+ createVNode(_component_el_form, {
851
+ ref: "groupForm",
852
+ model: $data.groupForm,
853
+ "label-position": "top",
854
+ rules: $data.groupRules,
855
+ size: "small"
856
+ }, {
857
+ default: withCtx(() => [
858
+ createVNode(_component_el_form_item, { label: "组图标(可选)" }, {
859
+ default: withCtx(() => [
860
+ createElementVNode("div", _hoisted_27, [
861
+ $data.groupForm.LOGO ? (openBlock(), createBlock(_component_el_image, {
862
+ key: 0,
863
+ class: "ai-registry__logo-preview",
864
+ src: _ctx.$util.getFileUrl($data.groupForm.LOGO),
865
+ fit: "contain"
866
+ }, null, 8, ["src"])) : createCommentVNode("", true),
867
+ createVNode(_component_el_upload, {
868
+ action: "#",
869
+ accept: ".png,.jpg,.jpeg,.gif",
870
+ "show-file-list": false,
871
+ "http-request": $options.uploadGroupLogo,
872
+ disabled: $data.saving || $data.logoUploading
873
+ }, {
874
+ default: withCtx(() => [
875
+ createVNode(_component_el_button, {
876
+ size: "small",
877
+ loading: $data.logoUploading,
878
+ disabled: $data.saving
879
+ }, {
880
+ default: withCtx(() => [..._cache[58] || (_cache[58] = [
881
+ createTextVNode("上传图标", -1)
882
+ ])]),
883
+ _: 1
884
+ }, 8, ["loading", "disabled"])
885
+ ]),
886
+ _: 1
887
+ }, 8, ["http-request", "disabled"]),
888
+ $data.groupForm.LOGO ? (openBlock(), createBlock(_component_el_button, {
889
+ key: 1,
890
+ type: "text",
891
+ disabled: $data.saving || $data.logoUploading,
892
+ onClick: _cache[10] || (_cache[10] = ($event) => $data.groupForm.LOGO = "")
893
+ }, {
894
+ default: withCtx(() => [..._cache[59] || (_cache[59] = [
895
+ createTextVNode("移除", -1)
896
+ ])]),
897
+ _: 1
898
+ }, 8, ["disabled"])) : createCommentVNode("", true)
899
+ ])
900
+ ]),
901
+ _: 1
902
+ }),
903
+ createElementVNode("div", _hoisted_28, [
904
+ createVNode(_component_el_form_item, {
905
+ label: "组名称",
906
+ prop: "NAME"
907
+ }, {
908
+ default: withCtx(() => [
909
+ createVNode(_component_el_input, {
910
+ modelValue: $data.groupForm.NAME,
911
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.groupForm.NAME = $event),
912
+ modelModifiers: { trim: true },
913
+ maxlength: "100"
914
+ }, null, 8, ["modelValue"])
915
+ ]),
916
+ _: 1
917
+ }),
918
+ createVNode(_component_el_form_item, {
919
+ label: "模型提供商",
920
+ prop: "TYPE"
921
+ }, {
922
+ default: withCtx(() => [
923
+ createVNode(_component_el_select, {
924
+ modelValue: $data.groupForm.TYPE,
925
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.groupForm.TYPE = $event)
926
+ }, {
927
+ default: withCtx(() => [
928
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.providerOptions, (item) => {
929
+ return openBlock(), createBlock(_component_el_option, {
930
+ key: item.code,
931
+ label: item.name,
932
+ value: item.code
933
+ }, null, 8, ["label", "value"]);
934
+ }), 128))
935
+ ]),
936
+ _: 1
937
+ }, 8, ["modelValue"])
938
+ ]),
939
+ _: 1
940
+ })
941
+ ]),
942
+ createVNode(_component_el_form_item, {
943
+ label: "接口基础地址",
944
+ prop: "BASE_URL"
945
+ }, {
946
+ default: withCtx(() => [
947
+ createVNode(_component_el_input, {
948
+ modelValue: $data.groupForm.BASE_URL,
949
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.groupForm.BASE_URL = $event),
950
+ modelModifiers: { trim: true },
951
+ placeholder: "https://…/v1",
952
+ maxlength: "1024"
953
+ }, null, 8, ["modelValue"])
954
+ ]),
955
+ _: 1
956
+ }),
957
+ createVNode(_component_el_form_item, {
958
+ label: $data.groupForm.ID ? "接口密钥(留空保留原值)" : "接口密钥",
959
+ prop: "API_SECRET",
960
+ rules: $data.groupForm.ID ? [] : [{ required: true, message: "请输入接口密钥", trigger: "blur" }]
961
+ }, {
962
+ default: withCtx(() => [
963
+ createVNode(_component_el_input, {
964
+ modelValue: $data.groupForm.API_SECRET,
965
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.groupForm.API_SECRET = $event),
966
+ type: "password",
967
+ autocomplete: "new-password",
968
+ maxlength: "1024"
969
+ }, null, 8, ["modelValue"])
970
+ ]),
971
+ _: 1
972
+ }, 8, ["label", "rules"]),
973
+ createVNode(_component_el_form_item, { label: "应用 ID(可选)" }, {
974
+ default: withCtx(() => [
975
+ createVNode(_component_el_input, {
976
+ modelValue: $data.groupForm.APP_ID,
977
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $data.groupForm.APP_ID = $event),
978
+ modelModifiers: { trim: true }
979
+ }, null, 8, ["modelValue"])
980
+ ]),
981
+ _: 1
982
+ }),
983
+ createVNode(_component_el_form_item, { label: "分组说明(可选)" }, {
984
+ default: withCtx(() => [
985
+ createVNode(_component_el_input, {
986
+ modelValue: $data.groupForm.NOTE,
987
+ "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $data.groupForm.NOTE = $event),
988
+ modelModifiers: { trim: true },
989
+ maxlength: "500"
990
+ }, null, 8, ["modelValue"])
991
+ ]),
992
+ _: 1
993
+ })
994
+ ]),
995
+ _: 1
996
+ }, 8, ["model", "rules"])
997
+ ])
998
+ ]),
999
+ _: 1
1000
+ }, 8, ["title", "modelValue", "before-close"]),
1001
+ createVNode(_component_el_dialog, {
1002
+ title: $data.modelForm.ID ? "编辑模型" : "添加模型",
1003
+ modelValue: $data.modelDialog,
1004
+ "onUpdate:modelValue": _cache[34] || (_cache[34] = ($event) => $data.modelDialog = $event),
1005
+ width: "680px",
1006
+ "append-to-body": "",
1007
+ "close-on-click-modal": false,
1008
+ "before-close": $options.closeModel
1009
+ }, {
1010
+ footer: withCtx(() => [
1011
+ createElementVNode("span", null, [
1012
+ createVNode(_component_el_button, {
1013
+ size: "small",
1014
+ disabled: $data.saving,
1015
+ onClick: _cache[33] || (_cache[33] = ($event) => $data.modelDialog = false)
1016
+ }, {
1017
+ default: withCtx(() => [..._cache[68] || (_cache[68] = [
1018
+ createTextVNode("取消", -1)
1019
+ ])]),
1020
+ _: 1
1021
+ }, 8, ["disabled"]),
1022
+ createVNode(_component_el_button, {
1023
+ size: "small",
1024
+ type: "primary",
1025
+ loading: $data.saving,
1026
+ onClick: $options.saveModel
1027
+ }, {
1028
+ default: withCtx(() => [
1029
+ createTextVNode(toDisplayString($data.modelForm.ID ? "保存模型" : "添加到本组"), 1)
1030
+ ]),
1031
+ _: 1
1032
+ }, 8, ["loading", "onClick"])
1033
+ ])
1034
+ ]),
1035
+ default: withCtx(() => [
1036
+ createElementVNode("div", _hoisted_29, [
1037
+ createVNode(_component_el_alert, {
1038
+ title: $data.modelForm.GROUP_ID ? "自动使用所选接入组的提供商、接口地址和密钥。" : "此模型尚未分组,继续保留原有连接;选择接入组后将使用组配置。",
1039
+ type: "info",
1040
+ closable: false,
1041
+ "show-icon": ""
1042
+ }, null, 8, ["title"]),
1043
+ createVNode(_component_el_form, {
1044
+ ref: "modelForm",
1045
+ model: $data.modelForm,
1046
+ rules: $data.modelRules,
1047
+ "label-position": "top",
1048
+ size: "small"
1049
+ }, {
1050
+ default: withCtx(() => [
1051
+ createVNode(_component_el_form_item, {
1052
+ label: "所属接入组",
1053
+ prop: "GROUP_ID"
1054
+ }, {
1055
+ default: withCtx(() => [
1056
+ createVNode(_component_el_select, {
1057
+ modelValue: $data.modelForm.GROUP_ID,
1058
+ "onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => $data.modelForm.GROUP_ID = $event)
1059
+ }, {
1060
+ default: withCtx(() => [
1061
+ $data.modelForm.ID && !$data.originalModelGroup ? (openBlock(), createBlock(_component_el_option, {
1062
+ key: 0,
1063
+ label: "未分组(保留原配置)",
1064
+ value: ""
1065
+ })) : createCommentVNode("", true),
1066
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.realGroups, (group) => {
1067
+ return openBlock(), createBlock(_component_el_option, {
1068
+ key: group.ID,
1069
+ label: group.NAME,
1070
+ value: group.ID
1071
+ }, null, 8, ["label", "value"]);
1072
+ }), 128))
1073
+ ]),
1074
+ _: 1
1075
+ }, 8, ["modelValue"])
1076
+ ]),
1077
+ _: 1
1078
+ }),
1079
+ createElementVNode("div", _hoisted_30, [
1080
+ createVNode(_component_el_form_item, {
1081
+ label: "模型名称",
1082
+ prop: "NAME"
1083
+ }, {
1084
+ default: withCtx(() => [
1085
+ createVNode(_component_el_input, {
1086
+ modelValue: $data.modelForm.NAME,
1087
+ "onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => $data.modelForm.NAME = $event),
1088
+ modelModifiers: { trim: true },
1089
+ maxlength: "100"
1090
+ }, null, 8, ["modelValue"])
1091
+ ]),
1092
+ _: 1
1093
+ }),
1094
+ createVNode(_component_el_form_item, {
1095
+ label: "模型编号",
1096
+ prop: "CODE"
1097
+ }, {
1098
+ default: withCtx(() => [
1099
+ createVNode(_component_el_input, {
1100
+ modelValue: $data.modelForm.CODE,
1101
+ "onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => $data.modelForm.CODE = $event),
1102
+ modelModifiers: { trim: true },
1103
+ maxlength: "100"
1104
+ }, null, 8, ["modelValue"])
1105
+ ]),
1106
+ _: 1
1107
+ })
1108
+ ]),
1109
+ createElementVNode("div", _hoisted_31, [
1110
+ createVNode(_component_el_form_item, {
1111
+ label: "模型分类",
1112
+ prop: "MODE_TYPE"
1113
+ }, {
1114
+ default: withCtx(() => [
1115
+ createVNode(_component_el_select, {
1116
+ modelValue: $data.modelForm.MODE_TYPE,
1117
+ "onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => $data.modelForm.MODE_TYPE = $event)
1118
+ }, {
1119
+ default: withCtx(() => [
1120
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.categoryOptions, (item) => {
1121
+ return openBlock(), createBlock(_component_el_option, {
1122
+ key: item.code,
1123
+ label: item.name,
1124
+ value: item.code
1125
+ }, null, 8, ["label", "value"]);
1126
+ }), 128))
1127
+ ]),
1128
+ _: 1
1129
+ }, 8, ["modelValue"])
1130
+ ]),
1131
+ _: 1
1132
+ }),
1133
+ createVNode(_component_el_form_item, {
1134
+ label: $data.modelForm.MODE_TYPE === "embedding" ? "向量维度" : "输入上限(tokens)",
1135
+ prop: "MAX_TOKEN"
1136
+ }, {
1137
+ default: withCtx(() => [
1138
+ createVNode(_component_el_input_number, {
1139
+ modelValue: $data.modelForm.MAX_TOKEN,
1140
+ "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => $data.modelForm.MAX_TOKEN = $event),
1141
+ min: 1,
1142
+ max: 2147483647,
1143
+ precision: 0
1144
+ }, null, 8, ["modelValue"])
1145
+ ]),
1146
+ _: 1
1147
+ }, 8, ["label"])
1148
+ ]),
1149
+ createVNode(_component_el_form_item, { label: "模型能力" }, {
1150
+ default: withCtx(() => [
1151
+ createVNode(_component_el_checkbox, {
1152
+ modelValue: $data.modelForm.THINK,
1153
+ "onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => $data.modelForm.THINK = $event),
1154
+ "true-label": "1",
1155
+ "false-label": "0"
1156
+ }, {
1157
+ default: withCtx(() => [..._cache[61] || (_cache[61] = [
1158
+ createTextVNode("慢思考", -1)
1159
+ ])]),
1160
+ _: 1
1161
+ }, 8, ["modelValue"]),
1162
+ createVNode(_component_el_checkbox, {
1163
+ modelValue: $data.modelForm.SEARCH,
1164
+ "onUpdate:modelValue": _cache[25] || (_cache[25] = ($event) => $data.modelForm.SEARCH = $event),
1165
+ "true-label": "1",
1166
+ "false-label": "0"
1167
+ }, {
1168
+ default: withCtx(() => [..._cache[62] || (_cache[62] = [
1169
+ createTextVNode("联网搜索", -1)
1170
+ ])]),
1171
+ _: 1
1172
+ }, 8, ["modelValue"]),
1173
+ createVNode(_component_el_checkbox, {
1174
+ modelValue: $data.modelForm.MULTIMODAL,
1175
+ "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => $data.modelForm.MULTIMODAL = $event),
1176
+ "true-label": "1",
1177
+ "false-label": "0"
1178
+ }, {
1179
+ default: withCtx(() => [..._cache[63] || (_cache[63] = [
1180
+ createTextVNode("多模态", -1)
1181
+ ])]),
1182
+ _: 1
1183
+ }, 8, ["modelValue"])
1184
+ ]),
1185
+ _: 1
1186
+ }),
1187
+ createVNode(_component_el_form_item, null, {
1188
+ default: withCtx(() => [
1189
+ createVNode(_component_el_checkbox, {
1190
+ modelValue: $data.modelForm.ENABLE,
1191
+ "onUpdate:modelValue": _cache[27] || (_cache[27] = ($event) => $data.modelForm.ENABLE = $event),
1192
+ "true-label": "1",
1193
+ "false-label": "0"
1194
+ }, {
1195
+ default: withCtx(() => [..._cache[64] || (_cache[64] = [
1196
+ createTextVNode("启用模型", -1)
1197
+ ])]),
1198
+ _: 1
1199
+ }, 8, ["modelValue"]),
1200
+ createVNode(_component_el_checkbox, {
1201
+ modelValue: $data.modelForm.IS_DEFAULT,
1202
+ "onUpdate:modelValue": _cache[28] || (_cache[28] = ($event) => $data.modelForm.IS_DEFAULT = $event),
1203
+ "true-label": "1",
1204
+ "false-label": "0"
1205
+ }, {
1206
+ default: withCtx(() => [..._cache[65] || (_cache[65] = [
1207
+ createTextVNode("设为该分类默认模型", -1)
1208
+ ])]),
1209
+ _: 1
1210
+ }, 8, ["modelValue"])
1211
+ ]),
1212
+ _: 1
1213
+ }),
1214
+ $data.modelForm.ID && !$data.modelForm.GROUP_ID ? (openBlock(), createElementBlock("div", _hoisted_32, [
1215
+ _cache[66] || (_cache[66] = createElementVNode("p", { class: "ai-registry__muted" }, "原有独立连接配置", -1)),
1216
+ createVNode(_component_el_form_item, { label: "模型提供商" }, {
1217
+ default: withCtx(() => [
1218
+ createVNode(_component_el_select, {
1219
+ modelValue: $data.modelForm.TYPE,
1220
+ "onUpdate:modelValue": _cache[29] || (_cache[29] = ($event) => $data.modelForm.TYPE = $event)
1221
+ }, {
1222
+ default: withCtx(() => [
1223
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.providerOptions, (item) => {
1224
+ return openBlock(), createBlock(_component_el_option, {
1225
+ key: item.code,
1226
+ label: item.name,
1227
+ value: item.code
1228
+ }, null, 8, ["label", "value"]);
1229
+ }), 128))
1230
+ ]),
1231
+ _: 1
1232
+ }, 8, ["modelValue"])
1233
+ ]),
1234
+ _: 1
1235
+ }),
1236
+ createVNode(_component_el_form_item, { label: "接口基础地址" }, {
1237
+ default: withCtx(() => [
1238
+ createVNode(_component_el_input, {
1239
+ modelValue: $data.modelForm.BASE_URL,
1240
+ "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => $data.modelForm.BASE_URL = $event),
1241
+ modelModifiers: { trim: true }
1242
+ }, null, 8, ["modelValue"])
1243
+ ]),
1244
+ _: 1
1245
+ }),
1246
+ createVNode(_component_el_form_item, { label: "接口密钥(留空保留原值)" }, {
1247
+ default: withCtx(() => [
1248
+ createVNode(_component_el_input, {
1249
+ modelValue: $data.modelForm.API_SECRET,
1250
+ "onUpdate:modelValue": _cache[31] || (_cache[31] = ($event) => $data.modelForm.API_SECRET = $event),
1251
+ type: "password",
1252
+ autocomplete: "new-password"
1253
+ }, null, 8, ["modelValue"])
1254
+ ]),
1255
+ _: 1
1256
+ }),
1257
+ createVNode(_component_el_form_item, { label: "应用 ID" }, {
1258
+ default: withCtx(() => [
1259
+ createVNode(_component_el_input, {
1260
+ modelValue: $data.modelForm.APP_ID,
1261
+ "onUpdate:modelValue": _cache[32] || (_cache[32] = ($event) => $data.modelForm.APP_ID = $event),
1262
+ modelModifiers: { trim: true }
1263
+ }, null, 8, ["modelValue"])
1264
+ ]),
1265
+ _: 1
1266
+ })
1267
+ ])) : createCommentVNode("", true),
1268
+ _cache[67] || (_cache[67] = createElementVNode("p", { class: "ai-registry__muted" }, "模型编号需与接入渠道提供的调用标识一致。", -1))
1269
+ ]),
1270
+ _: 1
1271
+ }, 8, ["model", "rules"])
1272
+ ])
1273
+ ]),
1274
+ _: 1
1275
+ }, 8, ["title", "modelValue", "before-close"])
1276
+ ], 4)), [
1277
+ [_directive_loading, $data.registryLoading]
1278
+ ]);
1279
+ }
1280
+ const AiList = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4c29bf71"]]);
6
1281
  export {
7
1282
  AiList as default
8
1283
  };