Files
senmesh-zc/deployment/ow/web/assets/login-Bqm6bkYc.js
KodouWZF d39b3b035d feat(部署): 新增 deployment/ 内外网两套按侧部署包
按 demo/ 的写法把交付包改成「角色由目录决定」:iw/ 拷内网机、ow/ 拷外网机,
各自含镜像 tar、SQL、配置与 install.sh,install.sh 不再收 iw/ow 参数。

前端不再打进镜像,改为静态包放在 <侧>/web/ 只读挂进 nginx:1.27-alpine,
现场临时改页面直接替换文件 + restart web 即可。数据仍全部挂宿主机,
子目录命名与 deploy/offline 一致(pgdata/redis/mq/upload/logs/gate),
默认根改为包内 ./volumes,放数据盘只改 .env 的 SFILE_DATA_ROOT。

后端镜像 sfile-app:1.0.1 含传输优化那一批(实测组包 11.4×、解包 9.9×)。
出包脚本 deployment/scripts/build-package.sh 负责 jar→镜像→前端双包→sql→tar→VERSION。
2026-11-04 21:44:56 +08:00

1 line
3.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{n as e,t}from"./radio-group-rg4nj-El.js";import{$ as n,G as r,H as i,J as a,K as o,L as s,N as c,Q as l,Qt as u,U as d,Ut as f,V as p,Vn as m,W as h,Wt as g,Zt as _,_n as v,et as y,ln as b,ot as x,q as S,qn as C,tt as w,yn as T,zn as E}from"./index-CjPx3lfT.js";var D=C(m()),O=C(E()),k=l({username:n().min(2,{message:`账号只能是4~16个字符`}),password:n().min(2,{message:`密码只能是4~32个字符`})}),A=`森睿智传`;function j(){let n=v(),[l,m]=(0,D.useState)(null),[C,E]=(0,D.useState)(``),j=w({resolver:y(k),defaultValues:{username:``,password:``}}),M=e=>{x.setState({token:e.data.token}),n.navigate({to:decodeURIComponent(decodeURIComponent(n.state.location.search.redirect||`/`)),replace:!0})},{mutateAsync:N,isPending:P}=T({mutationFn:async e=>{try{return await f(e)}catch(e){var t;if((e==null?void 0:e.code)===`600`&&!(e==null||(t=e.errorData)==null||(t=t.orgs)==null)&&t.length)return{needSelectOrg:!0,...e.errorData};throw e}},onSuccess(e){if(e!=null&&e.needSelectOrg){E(String(e.orgs[0].orgId)),m({tempToken:e.tempToken,orgs:e.orgs});return}M(e)}}),{mutateAsync:F,isPending:I}=T({mutationFn:e=>g(e.tempToken,e.orgId),onSuccess(e){M(e)}}),L=e=>{let t=N({...e,userType:1});b.promise(t,{loading:`登录中...`,success:e=>e!=null&&e.needSelectOrg?`请选择机构`:`登录成功`})};return(0,O.jsx)(`div`,{className:`flex items-center justify-center min-h-screen box-border`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`flex justify-center items-center mb-4 gap-2`,children:[(0,O.jsx)(`img`,{src:s,alt:``,className:`size-12 object-contain rounded-full bg-white overflow-hidden`}),(0,O.jsx)(`div`,{className:`text-3xl`,children:A})]}),(0,O.jsx)(`div`,{className:`w-[480px] p-10 bg-white rounded-xl`,children:l?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`text-center text-2xl`,children:`选择机构`}),(0,O.jsx)(`div`,{className:`text-center text-sm text-black/50 mt-2`,children:`当前账号属于多个机构,请选择要登录的机构`}),(0,O.jsx)(t,{value:C,onValueChange:E,className:`space-y-1 mt-8`,children:l.orgs.map(t=>(0,O.jsxs)(`div`,{onClick:()=>E(String(t.orgId)),className:`flex items-center gap-3 rounded-lg border p-3 cursor-pointer transition-colors ${C===String(t.orgId)?`border-primary bg-primary/10`:`hover:bg-black/5`}`,children:[(0,O.jsx)(e,{value:String(t.orgId),id:`org-${t.orgId}`}),(0,O.jsxs)(a,{htmlFor:`org-${t.orgId}`,className:`flex items-center gap-2 flex-1 cursor-pointer`,children:[(0,O.jsx)(`span`,{children:t.orgName}),t.administrator&&(0,O.jsx)(c,{variant:`outline`,className:`text-primary border-primary`,children:`管理员`})]})]},t.orgId))}),(0,O.jsxs)(`div`,{className:`space-y-3 mt-8`,children:[(0,O.jsxs)(u,{className:`w-full`,disabled:I||!C,onClick:()=>{if(!C||!l)return;let e=F({tempToken:l.tempToken,orgId:C});b.promise(e,{loading:`登录中...`,success:`登录成功`})},children:[I&&(0,O.jsx)(_,{}),`进入系统`]}),(0,O.jsx)(u,{variant:`outline`,className:`w-full`,disabled:I,onClick:()=>m(null),children:`返回登录`})]})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`text-center text-2xl`,children:`用户登录`}),(0,O.jsx)(i,{...j,children:(0,O.jsxs)(`form`,{onSubmit:j.handleSubmit(L),className:`space-y-8 mt-12`,children:[(0,O.jsx)(h,{control:j.control,name:`username`,render:({field:e})=>(0,O.jsxs)(r,{children:[(0,O.jsx)(o,{children:`用户名`}),(0,O.jsx)(d,{children:(0,O.jsx)(p,{placeholder:`用户名`,...e})}),(0,O.jsx)(S,{})]})}),(0,O.jsx)(h,{control:j.control,name:`password`,render:({field:e})=>(0,O.jsxs)(r,{children:[(0,O.jsx)(o,{children:`密码`}),(0,O.jsx)(d,{children:(0,O.jsx)(p,{type:`password`,placeholder:`密码`,...e})}),(0,O.jsx)(S,{})]})}),(0,O.jsxs)(u,{type:`submit`,className:`w-full`,disabled:P,children:[P&&(0,O.jsx)(_,{}),`提交`]})]})})]})})]})})}export{j as component};