From e74535f044c534111784dbe1fd63e6f984dff04e Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 27 Sep 2026 14:49:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0llm=5Fapi=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=A7=9F=E6=88=B7=E5=85=A5?= =?UTF-8?q?=E9=A9=BB=20=E5=8D=A1=E7=89=87=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Code Cache/js/05e37284b7a5dff4_0 | Bin 0 -> 229 bytes .../Code Cache/js/151cdd51b588baa3_0 | Bin 0 -> 223 bytes .../Code Cache/js/69158747ae5cb9de_0 | Bin 0 -> 229 bytes .../Code Cache/js/7f99b42e4c3d0f5d_0 | Bin 0 -> 225 bytes .../Code Cache/js/951e3f6aa3fb1550_0 | Bin 0 -> 208 bytes .../Code Cache/js/bf1bda990085be25_0 | Bin 0 -> 229 bytes .../Code Cache/js/c6c0b5b1d048dfad_0 | Bin 0 -> 229 bytes .../Code Cache/js/dc36a9efedf6719e_0 | Bin 0 -> 208 bytes .../Code Cache/js/e25633f51ee7f393_0 | Bin 0 -> 229 bytes .../Code Cache/js/index-dir/the-real-index | Bin 1080 -> 1296 bytes .../src/renderer/components/SettingsPanel.vue | 88 +++++++++++++++++- agent-console/src/renderer/mock.ts | 3 +- agent-console/src/renderer/types.ts | 2 +- 13 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 agent-console/.electron-userdata/Code Cache/js/05e37284b7a5dff4_0 create mode 100644 agent-console/.electron-userdata/Code Cache/js/151cdd51b588baa3_0 create mode 100644 agent-console/.electron-userdata/Code Cache/js/69158747ae5cb9de_0 create mode 100644 agent-console/.electron-userdata/Code Cache/js/7f99b42e4c3d0f5d_0 create mode 100644 agent-console/.electron-userdata/Code Cache/js/951e3f6aa3fb1550_0 create mode 100644 agent-console/.electron-userdata/Code Cache/js/bf1bda990085be25_0 create mode 100644 agent-console/.electron-userdata/Code Cache/js/c6c0b5b1d048dfad_0 create mode 100644 agent-console/.electron-userdata/Code Cache/js/dc36a9efedf6719e_0 create mode 100644 agent-console/.electron-userdata/Code Cache/js/e25633f51ee7f393_0 diff --git a/agent-console/.electron-userdata/Code Cache/js/05e37284b7a5dff4_0 b/agent-console/.electron-userdata/Code Cache/js/05e37284b7a5dff4_0 new file mode 100644 index 0000000000000000000000000000000000000000..0b3425fce707dd4652b2bd4f59a8bd06970ebe78 GIT binary patch literal 229 zcmXqrDOxU_`}+?o0|P@O5Z5}m)&wXo$i|d>kA{u zd?c{HrEVVkZhZy`pcpd{mtLQ>6efM$lpn18>pRz=e=AS@z1~|j?@U;beDIb;_T{@!6@B86_nJR{Hum`N@en8TrK}R;GsLCi=TQWaJl@SeY7{o9HL! z=N9DWrRJ3s>pN#8mINf`rRM0Bm8RO4*czH!8kkrbnj09K8ks0?q3hSb;mAAPHUHNa zMvx6iAU?lt9{X;61__`TGZ2?vpS2VwechBFto+`ekgviXUbiyaSASy+vSeDTe=5u1 be)i0SuJAww(`*))*&zKTUDLEwpauW{+WSLX literal 0 HcmV?d00001 diff --git a/agent-console/.electron-userdata/Code Cache/js/951e3f6aa3fb1550_0 b/agent-console/.electron-userdata/Code Cache/js/951e3f6aa3fb1550_0 new file mode 100644 index 0000000000000000000000000000000000000000..ca9f03060dc6572db6abf559fbdf3c85c5245bc2 GIT binary patch literal 208 zcmXqrDOxU_`}+?o0|SE#5LY^VWdu?T@!6@B86_nJR{Hum`N@en8TrK}R;GsLCi;#A z1$t$rsrDtdhUS(ACYFZghDK&a1`1s0%JpwJ@=kZn|MdlIAjnWCFoObeaCbYokmsU$j g!q)3@4R;T>oJf7juwdRjnAsrxRa(zuRGTQWaJl@SeY7{o9HL! z=N9DWrRJ3s>j$Tnlw{_m7Y8KfrRM0Bm8RO4*czH!8kkrbnj09K8ks0?p_`$9!;yEo zYyPh3J~mFwSdY?3=%*wW*{!TK5HpVI=hh{to(AH0^gbPGk>M^R)xh>Uixvn eN3uzy&OPwHLajY}Ycn^@Y>@s1`Nq{MPy+ykC`6(F literal 0 HcmV?d00001 diff --git a/agent-console/.electron-userdata/Code Cache/js/index-dir/the-real-index b/agent-console/.electron-userdata/Code Cache/js/index-dir/the-real-index index 58d6514d0855cf6eaa868a386f81e4fc8272813c..e2956a474e83bde085618c91c1165dcab5c2a44c 100644 GIT binary patch delta 273 zcmdnNF@dX|gO!27=H#S;{7QwQ)RMeZP6h@B6Cefy9iSu-FahzG`%AaC6g_5jXjfar zzFQw62o%4!GiIH8yJ%*^B_M;~>KE_o*cy0OMigB< ZmfzM#Z_CVjRPl{!Tr36f2lw+W427g(J)Go)-IVeFgwL C`wH;@ diff --git a/agent-console/src/renderer/components/SettingsPanel.vue b/agent-console/src/renderer/components/SettingsPanel.vue index 0b8272e..3bd9bcd 100644 --- a/agent-console/src/renderer/components/SettingsPanel.vue +++ b/agent-console/src/renderer/components/SettingsPanel.vue @@ -89,6 +89,51 @@ + + + @@ -104,7 +149,8 @@ defineEmits<{ (e: 'back'): void }>() const titleMap: Record = { features: '功能开关', api: '大模型 API 设置', - workflow: '日常工作流管理' + workflow: '日常工作流管理', + tenant: '租户入驻' } const title = computed(() => titleMap[props.view] ?? '设置') @@ -271,6 +317,46 @@ function addWorkflow() { workflows.value.push({ id: Date.now(), name, desc: '新建的工作流', enabled: false }) } } + +/* ====== 租户入驻 ====== */ +const industries = ['零售', '餐饮', '教育', '医疗', '制造', '金融', '物流', '互联网', '其他'] +const scales = ['1-20 人', '21-100 人', '101-500 人', '500 人以上'] + +const tenantForm = reactive({ + name: '', + contact: '', + phone: '', + email: '', + industry: '', + scale: '' +}) +const tenantSaving = ref(false) +const tenantResult = ref('') +const tenantOk = ref(false) + +async function saveTenant() { + tenantSaving.value = true + tenantResult.value = '' + tenantOk.value = false + + // 简单校验 + if (!tenantForm.name || !tenantForm.contact || !tenantForm.phone) { + tenantResult.value = '✗ 请填写租户名称、联系人、联系电话' + tenantSaving.value = false + return + } + + try { + // TODO: 后续接入 agent-core 的 tenants 表 + // const saved = await window.electronAPI.callAgent('tenant:create', { ...tenantForm }) + await new Promise((r) => setTimeout(r, 600)) // 模拟提交 + tenantOk.value = true + tenantResult.value = `✓ 租户「${tenantForm.name}」入驻申请已提交,等待审核` + } catch (e: any) { + tenantResult.value = `✗ 提交失败:${e?.message || String(e)}` + } + tenantSaving.value = false +}