import{_ as N}from"./index-1DQ9lz7_.js";import{u as T}from"./context-Dawj80bg.js";import{_ as V}from"./index-C-JhWVfG.js";import{s as W,c as z,a2 as c,a3 as I,a4 as l,S as k,af as M,u as d,ag as j,F as S,f as g,r as A,a9 as w,aa as a,G as u,k as n,ae as v}from"./vue-Dl1fzmsf.js";import D from"./repository-form-B-X8I6s6.js";import O from"./task-form-Bya_CC5z.js";import{ab as E,b6 as G,ae as H,H as L,S as q}from"./antd-vtmm7CAy.js";const J={class:"footer-tool-bar__left"},K={class:"footer-tool-bar__center"},P={class:"footer-tool-bar__right"},Q=Object.assign({name:"FooterToolBar"},{__name:"index",setup(x){const i=W("ant-pro-footer-toolbar"),{siderWidth:m,collapsed:_,collapsedWidth:o,isMobile:f,layout:p}=T(),t=z(()=>{if(!(f.value||p.value==="top"))return`calc(100% - ${_.value?o.value:m.value}px)`});return(e,r)=>(c(),I(S,null,[l("div",{class:M(d(i)),style:j({width:d(t),transition:"0.3s all"})},[l("div",J,[k(e.$slots,"left",{},void 0,!0)]),l("div",K,[k(e.$slots,"default",{},void 0,!0)]),l("div",P,[k(e.$slots,"right",{},void 0,!0)])],6),r[0]||(r[0]=l("div",{class:"h-56px"},null,-1))],64))}}),U=V(Q,[["__scopeId","data-v-51a4df24"]]),re=Object.assign({name:"AdvancedForm"},{__name:"index",setup(x){const i=g(),m=g();async function _(){var t,e;try{await((t=m.value)==null?void 0:t.handleSubmit()),await((e=i.value)==null?void 0:e.handleSubmit())}catch(r){console.log("Failed:",r)}}const o=A({columns:[{title:"成员姓名",dataIndex:"name",key:"name",width:"20%",scopedSlots:{customRender:"name"}},{title:"工号",dataIndex:"workId",key:"workId",width:"20%",scopedSlots:{customRender:"workId"}},{title:"所属部门",dataIndex:"department",key:"department",width:"40%",scopedSlots:{customRender:"department"}},{title:"操作",key:"action",scopedSlots:{customRender:"operation"}}],data:[{key:"1",name:"员工1",workId:"001",editable:!1,department:"行政部"},{key:"2",name:"员工2",workId:"002",editable:!1,department:"IT部"},{key:"3",name:"员工3",workId:"003",editable:!1,department:"财务部"}]});function f(){const t=o.data.length===0?"1":(Number.parseInt(o.data[o.data.length-1].key)+1).toString(),e={key:t,name:`员工${t}`,workId:Number.parseInt(t)<10?`00${t}`:Number.parseInt(t)<100?`0${t}`:t,editable:!0,department:["行政部","IT部","财务部"][Math.floor(Math.random()*3)]};o.data.push(e)}function p(t){o.data=o.data.filter(e=>e.key!==t)}return(t,e)=>{const r=E,$=G,C=H,y=L,F=q,R=U,B=N;return c(),w(B,null,{content:a(()=>e[0]||(e[0]=[u(" 高级表单常见于一次性输入和提交大批量数据的场景。 ")])),default:a(()=>[n(F,{size:"large",direction:"vertical",style:{width:"100%"}},{default:a(()=>[n(r,{class:"card",title:"仓库管理",bordered:!1},{default:a(()=>[n(D,{ref_key:"repositoryFormRef",ref:i,"show-submit":!1},null,512)]),_:1}),n(r,{class:"card",title:"任务管理",bordered:!1},{default:a(()=>[n(O,{ref_key:"taskFormRef",ref:m,"show-submit":!1},null,512)]),_:1}),n(r,null,{default:a(()=>[n(C,{columns:d(o).columns,"data-source":d(o).data,pagination:!1},{bodyCell:a(s=>{var b;return[((b=s==null?void 0:s.column)==null?void 0:b.key)==="action"?(c(),I(S,{key:0},[d(o).data.length?(c(),w($,{key:0,title:"Sure to delete?",onConfirm:X=>{var h;return p((h=s==null?void 0:s.record)==null?void 0:h.key)}},{default:a(()=>e[1]||(e[1]=[l("a",null,"Delete",-1)])),_:2},1032,["onConfirm"])):v("",!0)],64)):v("",!0)]}),_:1},8,["columns","data-source"]),n(y,{style:{width:"100%","margin-top":"16px","margin-bottom":"8px"},type:"dashed",onClick:f},{default:a(()=>e[2]||(e[2]=[u(" 新增成员 ")])),_:1})]),_:1})]),_:1}),n(R,null,{left:a(()=>e[3]||(e[3]=[u(" 测试 ")])),right:a(()=>[n(y,{type:"primary",onClick:_},{default:a(()=>e[4]||(e[4]=[u(" 提交 ")])),_:1})]),_:1})]),_:1})}}});export{re as default};
