import { defineComponent, ref, reactive, computed, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderStyle, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrInterpolate, ssrRenderClass, ssrRenderDynamicModel } from 'vue/server-renderer'; import { u as useApi } from './useApi-B7CB0Cnn.mjs'; import { u as useToast } from './useToast-BwtTR9dH.mjs'; import { _ as _export_sfc } from './server.mjs'; import './auth-QFkCoU1C.mjs'; import 'pinia'; import '../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/utils'; import 'perfect-debounce'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "serviceconfig", __ssrInlineRender: true, setup(__props) { const REGIONS = [ { value: 1, label: "中国" }, { value: 2, label: "美国" }, { value: 3, label: "东亚" }, { value: 4, label: "东南亚" }, { value: 5, label: "南亚" }, { value: 6, label: "中东" }, { value: 7, label: "欧洲" }, { value: 8, label: "俄罗斯" }, { value: 9, label: "非洲" }, { value: 10, label: "南美" }, { value: 11, label: "北美" }, { value: 12, label: "大洋洲" }, { value: 13, label: "巴西" }, { value: 14, label: "印度" } ]; const SCAT = [ { v: 1, label: "STT 语音识别", short: "STT", color: "#0369a1", bg: "#dbeafe" }, { v: 2, label: "TTS 语音合成", short: "TTS", color: "#7c3aed", bg: "#ede9fe" }, { v: 3, label: "MT 机器翻译", short: "MT", color: "#059669", bg: "#dcfce7" }, { v: 4, label: "AST 端到端", short: "AST", color: "#c2410c", bg: "#fff7ed" }, { v: 5, label: "LLM 大语言", short: "LLM", color: "#b45309", bg: "#fef9c3" }, { v: 6, label: "存储 OSS/COS", short: "存储", color: "#475569", bg: "#f1f5f9" } ]; useApi(); useToast(); function scatInfo(v) { return SCAT.find((s) => s.v === v) || { short: "?", color: "#999", bg: "#eee", v: 0, label: "" }; } function parseCats(s) { return (s || "").split(",").map((x) => parseInt(x) || 0).filter((x) => x > 0); } function encCount(s) { return (s.fields || []).filter((f) => f.encrypted).length; } const backendReady = ref(true); const allSvcs = ref([]); const curSvc = ref(null); const curRegion = ref(0); const detailMode = ref("empty"); const editForm = reactive({ id: "", name: "", description: "", enable: false }); const editCats = ref([]); const editFields = ref([]); const overrideFields = ref([]); const regionLoading = ref(false); const curRegionLabel = computed(() => { const r = REGIONS.find((x) => x.value === curRegion.value); return r ? r.label : "区域" + curRegion.value; }); const syncVisible = ref(false); ref(false); const syncDesc = ref(""); const syncScopeNote = ref(""); const syncTargets = ref([]); const syncRegionList = computed(() => REGIONS.filter((r) => r.value !== curRegion.value)); return (_ctx, _push, _parent, _attrs) => { _push(`
配置火山引擎、阿里云等第三方服务;字段支持加密存储。默认配置全区域共用,可按区域覆盖字段值。
暂无服务
`); } else { _push(``); } _push(`从左侧选择一个服务开始配置
${ssrInterpolate(curSvc.value.id)}
服务类别 (可多选)
尚无自定义字段,点击下方添加
`); } else { _push(`| 字段名 | 字段描述 | 加密 | 默认值 | |
|---|---|---|---|---|
| `); if (f.encrypted) { _push(`🔒 加密`); } else { _push(``); } _push(` |
服务类别
尚无自定义字段,点击下方添加
`); } else { _push(`| 字段名 | 字段描述 | 加密 | 默认值 | |
|---|---|---|---|---|
| `); if (f.encrypted) { _push(`🔒 加密`); } else { _push(``); } _push(` |
| 字段名 | 字段描述 | 状态 | 有效值 |
|---|---|---|---|
| ${ssrInterpolate(f.key)} | ${ssrInterpolate(f.description)} | `); if (f.is_overridden) { _push(`覆盖`); } else { _push(`继承`); } _push(` | `); if (f.encrypted) { _push(`🔒`); } else { _push(``); } _push(` |