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。
This commit is contained in:
KodouWZF
2026-11-04 21:44:56 +08:00
parent 339f2c34ab
commit d39b3b035d
884 changed files with 316455 additions and 0 deletions

View File

@@ -0,0 +1 @@
import{t as e}from"./useQuery-Hj7E43Q9.js";import{t}from"./plus-CC0y9Hxa.js";import{$ as n,G as r,H as i,K as a,Q as o,Qt as s,R as c,U as l,V as u,Vn as d,W as f,Zt as p,et as m,ln as h,q as g,qn as _,tt as v,yn as y,z as b,zn as x}from"./index-CjPx3lfT.js";import{n as S,r as C,t as w}from"./data-table-B1a8BMaf.js";import{t as T}from"./pagination-DP8LewWY.js";import{a as E,n as D,o as O,r as k,s as A,t as j}from"./dialog-ITi__DUr.js";import{i as M,n as N,t as P}from"./org-djpHv-g6.js";var F=_(d(),1);const I=t=>{var n,r,i;let[a,o]=(0,F.useState)({pageIndex:0,pageSize:10}),s=e({queryKey:[`orgList`,a],queryFn:()=>N({pageSize:a.pageSize,pageNo:a.pageIndex+1}).then(e=>e.data)}),c=t();return{pagination:a,table:S({data:(s==null||(n=s.data)==null?void 0:n.entityList)||[],columns:c,getCoreRowModel:C(),manualPagination:!1,rowCount:(s==null||(r=s.data)==null?void 0:r.totalCount)||0,pageCount:(s==null||(i=s.data)==null?void 0:i.pageCount)||0,onPaginationChange:o,autoResetPageIndex:!1,state:{pagination:a}}),query:s}},L=e=>{let{mutateAsync:t,isPending:n}=y({mutationFn:e=>e.id?M(e):P({...e,parentId:1}),...e||{}});return{save:e=>{h.promise(t(e),{loading:`提交中...`,success:`操作成功`})},saveIsPending:n}};var R=_(x(),1),z=`Qaz123567!@#`,B=o({orgName:n().nonempty({message:`单位名称不能为空`}),type:n().nonempty({message:`单位类型不能为空`}),phone:n().nonempty({message:`管理员手机号不能为空`}),realName:n().nonempty({message:`管理员姓名不能为空`})});function V({open:e,setOpen:t,data:n,refetch:o}){let d=v({resolver:m(B),defaultValues:{orgName:``,type:`3`,phone:``,realName:``}}),{save:h,saveIsPending:_}=L({onSuccess(){t(!1),o==null||o()}});(0,F.useEffect)(()=>{e&&(d.reset(),n&&(d.setValue(`orgName`,n.orgName),d.setValue(`type`,n.type),d.setValue(`phone`,n.phone),d.setValue(`realName`,n.realName)))},[e]);let y=d.watch(`phone`),x=(0,F.useMemo)(()=>!(n!=null&&n.id),[n]),S=e=>{h({...e,id:n==null?void 0:n.id})};return(0,R.jsx)(j,{open:e,onOpenChange:t,children:(0,R.jsxs)(k,{className:`w-[400px]`,children:[(0,R.jsx)(O,{children:(0,R.jsx)(A,{children:x?`创建单位`:`修改单位`})}),(0,R.jsx)(i,{...d,children:(0,R.jsxs)(`form`,{onSubmit:d.handleSubmit(S),className:`space-y-4`,children:[(0,R.jsx)(f,{control:d.control,name:`orgName`,render:({field:e})=>(0,R.jsxs)(r,{children:[(0,R.jsx)(a,{children:`单位名称`}),(0,R.jsx)(l,{children:(0,R.jsx)(u,{...e})}),(0,R.jsx)(g,{})]})}),(0,R.jsx)(f,{control:d.control,name:`realName`,render:({field:e})=>(0,R.jsxs)(r,{children:[(0,R.jsx)(a,{children:`管理员姓名`}),(0,R.jsx)(l,{children:(0,R.jsx)(u,{...e})}),(0,R.jsx)(g,{})]})}),(0,R.jsx)(f,{control:d.control,name:`phone`,render:({field:e})=>(0,R.jsxs)(r,{children:[(0,R.jsx)(a,{children:`管理员手机号`}),(0,R.jsx)(l,{children:(0,R.jsx)(u,{...e})}),(0,R.jsx)(g,{})]})}),x&&(0,R.jsx)(c,{children:(0,R.jsxs)(b,{children:[(0,R.jsxs)(`div`,{children:[`管理员账号:`,y]}),(0,R.jsxs)(`div`,{children:[`初始密码:`,z]})]})}),(0,R.jsxs)(E,{children:[(0,R.jsx)(D,{asChild:!0,children:(0,R.jsx)(s,{variant:`outline`,children:`取消`})}),(0,R.jsxs)(s,{type:`submit`,disabled:_,children:[_&&(0,R.jsx)(p,{}),`确定`]})]})]})})]})})}function H({handleEditOrg:e}){return[{accessorKey:`orgName`,header:`单位名称`,cell:({row:e})=>(0,R.jsx)(`div`,{children:e.getValue(`orgName`)})},{accessorKey:`realName`,header:`管理员姓名`,cell:({row:e})=>(0,R.jsx)(`div`,{children:e.getValue(`realName`)})},{accessorKey:`phone`,header:`管理员手机号`,cell:({row:e})=>(0,R.jsx)(`div`,{children:e.getValue(`phone`)})},{accessorKey:`createTime`,header:`创建日期`,cell:({row:e})=>(0,R.jsx)(`div`,{children:e.getValue(`createTime`)})}]}function U(){let[e,n]=(0,F.useState)(null),[r,i]=(0,F.useState)(!1),a=e=>{n(e),i(!0)},{table:o,query:c}=I(()=>H({handleEditOrg:a}));return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(V,{open:r,setOpen:i,data:e,refetch:c==null?void 0:c.refetch}),(0,R.jsxs)(`div`,{className:`p-4 box-border min-h-full space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-lg`,children:`单位管理`}),(0,R.jsx)(`div`,{className:`text-xs text-black/50`,children:`管理单位信息`})]}),(0,R.jsxs)(`div`,{className:`p-4 rounded-lg border bg-white space-y-2`,children:[(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,R.jsxs)(s,{onClick:()=>a(),children:[(0,R.jsx)(t,{}),`新增`]})}),(0,R.jsxs)(`div`,{className:`relative overflow-hidden`,children:[(0,R.jsx)(w,{table:o,query:c}),(0,R.jsx)(T,{table:o,className:`justify-end p-2 sticky bottom-0 left-0 right-0 z-10 bg-white`})]})]})]})]})}export{U as component,H as useColumns};