ToBeDone-1f99262e.js 15 KB

1
  1. import{az as ye,aA as T,aJ as $,aK as at,r as H,al as Te,K as ke,am as Fe,J as B,aL as nt,aM as lt,aN as dt,d as P,aO as ze,aB as me,aP as ot,aQ as rt,o as b,c as F,g as Y,a as d,q as G,w as ve,L as st,Y as J,aR as _e,aS as ct,O as Ae,ac as it,f as Ce,at as Re,aD as je,aT as ut,aU as Pe,aV as ht,aW as pt,t as V,aE as ft,m as yt,F as kt,p as mt,j as vt,__tla as _t}from"./index-2eab2d23.js";import{__tla as Ct}from"./el-virtual-list-197311ca.js";import gt,{__tla as xt}from"./OrderDeliveryForm-3dab7ade.js";import{F as bt,__tla as Nt}from"./fixed-size-list-a23c3278.js";import{_ as Kt}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Et}from"./Dialog-c2716df6.js";import{__tla as St}from"./index-e7451cd0.js";import{__tla as wt}from"./index-3562b2a3.js";import{__tla as It}from"./OrderBaseInfo-68af99b9.js";import{__tla as Lt}from"./SPuUploadImg-4b5016f1.js";import{__tla as Dt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-4db00aa5.js";import{__tla as Bt}from"./index-d3f876ab.js";import{__tla as Mt}from"./el-image-viewer-5d14bc77.js";import{__tla as Ht}from"./useMessage-171aa63e.js";import{__tla as Ot}from"./formatTime-41155543.js";import{__tla as Tt}from"./dict-1ad71b6f.js";import{__tla as Ft}from"./OrderProduct-c85eb4ea.js";import{__tla as zt}from"./el-descriptions-item-fd42286f.js";import{__tla as At}from"./DictTag.vue_vue_type_script_lang-cb1e47ff.js";import"./color-6e929987.js";let Ye,Rt=Promise.all([(()=>{try{return _t}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return At}catch{}})()]).then(async()=>{const le=Symbol(),Je={key:-1,level:-1,data:{}};var q=(t=>(t.KEY="id",t.LABEL="label",t.CHILDREN="children",t.DISABLED="disabled",t))(q||{}),de=(t=>(t.ADD="add",t.DELETE="delete",t))(de||{});const ge={type:Number,default:26},Ve=ye({data:{type:T(Array),default:()=>$([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:T(Object),default:()=>$({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:T(Array),default:()=>$([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:T(Array),default:()=>$([])},indent:{type:Number,default:16},itemSize:ge,icon:{type:at},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:T([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:T(Function)},perfMode:{type:Boolean,default:!0}}),qe=ye({node:{type:T(Object),default:()=>$(Je)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:ge}),Qe=ye({node:{type:T(Object),required:!0}}),xe="node-click",be="node-expand",Ne="node-collapse",Ke="current-change",Ee="check",Se="check-change",we="node-contextmenu",We={[xe]:(t,o,p)=>t&&o&&p,[be]:(t,o)=>t&&o,[Ne]:(t,o)=>t&&o,[Ke]:(t,o)=>t&&o,[Ee]:(t,o)=>t&&o,[Se]:(t,o)=>t&&typeof o=="boolean",[we]:(t,o,p)=>t&&o&&p};function $e(t,o){const p=H(new Set(t.defaultExpandedKeys)),c=H(),i=lt();ke(()=>t.currentNodeKey,e=>{c.value=e},{immediate:!0}),ke(()=>t.data,e=>{ne(e)},{immediate:!0});const{isIndeterminate:O,isChecked:M,toggleCheckbox:_,getCheckedKeys:z,getCheckedNodes:A,getHalfCheckedKeys:N,getHalfCheckedNodes:a,setChecked:I,setCheckedKeys:K}=function(e,n){const u=H(new Set),h=H(new Set),{emit:C}=Te();ke([()=>n.value,()=>e.defaultCheckedKeys],()=>Fe(()=>{R(e.defaultCheckedKeys)}),{immediate:!0});const k=()=>{if(!n.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:l,maxLevel:y}=n.value,s=u.value,r=new Set;for(let v=y-1;v>=1;--v){const g=l.get(v);g&&g.forEach(w=>{const W=w.children;if(W){let j=!0,fe=!1;for(const tt of W){const Oe=tt.key;if(s.has(Oe))fe=!0;else{if(r.has(Oe)){j=!1,fe=!0;break}j=!1}}j?s.add(w.key):fe?(r.add(w.key),s.delete(w.key)):(s.delete(w.key),r.delete(w.key))}})}h.value=r},m=l=>u.value.has(l.key),f=(l,y,s=!0)=>{const r=u.value,v=(g,w)=>{r[w?de.ADD:de.DELETE](g.key);const W=g.children;!e.checkStrictly&&W&&W.forEach(j=>{j.disabled||v(j,w)})};v(l,y),k(),s&&x(l,y)},x=(l,y)=>{const{checkedNodes:s,checkedKeys:r}=L(),{halfCheckedNodes:v,halfCheckedKeys:g}=D();C(Ee,l.data,{checkedKeys:r,checkedNodes:s,halfCheckedKeys:g,halfCheckedNodes:v}),C(Se,l.data,y)};function L(l=!1){const y=[],s=[];if(n!=null&&n.value&&e.showCheckbox){const{treeNodeMap:r}=n.value;u.value.forEach(v=>{const g=r.get(v);g&&(!l||l&&g.isLeaf)&&(s.push(v),y.push(g.data))})}return{checkedKeys:s,checkedNodes:y}}function D(){const l=[],y=[];if(n!=null&&n.value&&e.showCheckbox){const{treeNodeMap:s}=n.value;h.value.forEach(r=>{const v=s.get(r);v&&(y.push(r),l.push(v.data))})}return{halfCheckedNodes:l,halfCheckedKeys:y}}function R(l){if(n!=null&&n.value){const{treeNodeMap:y}=n.value;if(e.showCheckbox&&y&&l)for(const s of l){const r=y.get(s);r&&!m(r)&&f(r,!0,!1)}}}return{updateCheckedKeys:k,toggleCheckbox:f,isChecked:m,isIndeterminate:l=>h.value.has(l.key),getCheckedKeys:function(l=!1){return L(l).checkedKeys},getCheckedNodes:function(l=!1){return L(l).checkedNodes},getHalfCheckedKeys:function(){return D().halfCheckedKeys},getHalfCheckedNodes:function(){return D().halfCheckedNodes},setChecked:function(l,y){if(n!=null&&n.value&&e.showCheckbox){const s=n.value.treeNodeMap.get(l);s&&f(s,y,!1)}},setCheckedKeys:function(l){u.value.clear(),h.value.clear(),R(l)}}}(t,i),{doFilter:E,hiddenNodeKeySet:S,isForceHiddenExpandIcon:oe}=function(e,n){const u=H(new Set([])),h=H(new Set([])),C=B(()=>nt(e.filterMethod));return{hiddenExpandIconKeySet:h,hiddenNodeKeySet:u,doFilter:function(k){var m;if(!C.value)return;const f=new Set,x=h.value,L=u.value,D=[],R=((m=n.value)==null?void 0:m.treeNodes)||[],l=e.filterMethod;return L.clear(),function y(s){s.forEach(r=>{D.push(r),l!=null&&l(k,r.data)?D.forEach(g=>{f.add(g.key)}):r.isLeaf&&L.add(r.key);const v=r.children;if(v&&y(v),!r.isLeaf)if(f.has(r.key)){if(v){let g=!0;for(const w of v)if(!L.has(w.key)){g=!1;break}g?x.add(r.key):x.delete(r.key)}}else L.add(r.key);D.pop()})}(R),f},isForceHiddenExpandIcon:function(k){return h.value.has(k.key)}}}(t,i),re=B(()=>{var e;return((e=t.props)==null?void 0:e.value)||q.KEY}),se=B(()=>{var e;return((e=t.props)==null?void 0:e.children)||q.CHILDREN}),ce=B(()=>{var e;return((e=t.props)==null?void 0:e.disabled)||q.DISABLED}),ie=B(()=>{var e;return((e=t.props)==null?void 0:e.label)||q.LABEL}),U=B(()=>{const e=p.value,n=S.value,u=[],h=i.value&&i.value.treeNodes||[];return function(){const C=[];for(let k=h.length-1;k>=0;--k)C.push(h[k]);for(;C.length;){const k=C.pop();if(k&&(n.has(k.key)||u.push(k),e.has(k.key))){const m=k.children;if(m)for(let f=m.length-1;f>=0;--f)C.push(m[f])}}}(),u}),ue=B(()=>U.value.length>0);function X(e){return e[se.value]}function Q(e){return e?e[re.value]:""}function he(e){return e[ce.value]}function pe(e){return e[ie.value]}function Z(e){p.value.has(e.key)?te(e):ee(e)}function ee(e){const n=p.value;if(i.value&&t.accordion){const{treeNodeMap:u}=i.value;n.forEach(h=>{const C=u.get(h);e&&e.level===(C==null?void 0:C.level)&&n.delete(h)})}n.add(e.key),o(be,e.data,e)}function te(e){p.value.delete(e.key),o(Ne,e.data,e)}function ae(e){const n=c.value;return n!==void 0&&n===e.key}function ne(e){Fe(()=>i.value=function(n){const u=new Map,h=new Map;let C=1;const k=function m(f,x=1,L){var D;const R=[];for(const l of f){const y=Q(l),s={level:x,key:y,data:l};s.label=pe(l),s.parent=L;const r=X(l);s.disabled=he(l),s.isLeaf=!r||r.length===0,r&&r.length&&(s.children=m(r,x+1,s)),R.push(s),u.set(y,s),h.has(x)||h.set(x,[]),(D=h.get(x))==null||D.push(s)}return x>C&&(C=x),R}(n);return{treeNodeMap:u,levelTreeNodeMap:h,maxLevel:C,treeNodes:k}}(e))}return{tree:i,flattenTree:U,isNotEmpty:ue,getKey:Q,getChildren:X,toggleExpand:Z,toggleCheckbox:_,isExpanded:function(e){return p.value.has(e.key)},isChecked:M,isIndeterminate:O,isDisabled:function(e){return!!e.disabled},isCurrent:ae,isForceHiddenExpandIcon:oe,handleNodeClick:function(e,n){o(xe,e.data,e,n),function(u){ae(u)||(c.value=u.key,o(Ke,u.data,u))}(e),t.expandOnClickNode&&Z(e),t.showCheckbox&&t.checkOnClickNode&&!e.disabled&&_(e,!M(e),!0)},handleNodeCheck:function(e,n){_(e,n)},getCurrentNode:function(){var e,n;if(c.value)return(n=(e=i.value)==null?void 0:e.treeNodeMap.get(c.value))==null?void 0:n.data},getCurrentKey:function(){return c.value},setCurrentKey:function(e){c.value=e},getCheckedKeys:z,getCheckedNodes:A,getHalfCheckedKeys:N,getHalfCheckedNodes:a,setChecked:I,setCheckedKeys:K,filter:function(e){const n=E(e);n&&(p.value=n)},setData:ne,getNode:function(e){var n;const u=dt(e)?Q(e):e;return(n=i.value)==null?void 0:n.treeNodeMap.get(u)},expandNode:ee,collapseNode:te,setExpandedKeys:function(e){p.value=new Set(e)}}}var Ge=P({name:"ElTreeNodeContent",props:Qe,setup(t){const o=ze(le),p=me("tree");return()=>{const c=t.node,{data:i}=c;return o!=null&&o.ctx.slots.default?o.ctx.slots.default({node:c,data:i}):ot("span",{class:p.be("node","label")},[c==null?void 0:c.label])}}});const Ue=["aria-expanded","aria-disabled","aria-checked","data-key","onClick"],Xe=P({name:"ElTreeNode"});var Ze=je(P({...Xe,props:qe,emits:{click:(t,o)=>!(!t||!o),toggle:t=>!!t,check:(t,o)=>t&&typeof o=="boolean"},setup(t,{emit:o}){const p=t,c=ze(le),i=me("tree"),O=B(()=>{var a;return(a=c==null?void 0:c.props.indent)!=null?a:16}),M=B(()=>{var a;return(a=c==null?void 0:c.props.icon)!=null?a:rt}),_=a=>{o("click",p.node,a)},z=()=>{o("toggle",p.node)},A=a=>{o("check",p.node,a)},N=a=>{var I,K,E,S;(E=(K=(I=c==null?void 0:c.instance)==null?void 0:I.vnode)==null?void 0:K.props)!=null&&E.onNodeContextmenu&&(a.stopPropagation(),a.preventDefault()),c==null||c.ctx.emit(we,a,(S=p.node)==null?void 0:S.data,p.node)};return(a,I)=>{var K,E,S;return b(),F("div",{ref:"node$",class:J([d(i).b("node"),d(i).is("expanded",a.expanded),d(i).is("current",a.current),d(i).is("focusable",!a.disabled),d(i).is("checked",!a.disabled&&a.checked)]),role:"treeitem",tabindex:"-1","aria-expanded":a.expanded,"aria-disabled":a.disabled,"aria-checked":a.checked,"data-key":(K=a.node)==null?void 0:K.key,onClick:_e(_,["stop"]),onContextmenu:N},[Y("div",{class:J(d(i).be("node","content")),style:Re({paddingLeft:(a.node.level-1)*d(O)+"px",height:a.itemSize+"px"})},[d(M)?(b(),G(d(ct),{key:0,class:J([d(i).is("leaf",!!((E=a.node)!=null&&E.isLeaf)),d(i).is("hidden",a.hiddenExpandIcon),{expanded:!((S=a.node)!=null&&S.isLeaf)&&a.expanded},d(i).be("node","expand-icon")]),onClick:_e(z,["stop"])},{default:ve(()=>[(b(),G(st(d(M))))]),_:1},8,["class","onClick"])):Ae("v-if",!0),a.showCheckbox?(b(),G(d(it),{key:1,"model-value":a.checked,indeterminate:a.indeterminate,disabled:a.disabled,onChange:A,onClick:I[0]||(I[0]=_e(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):Ae("v-if",!0),Ce(d(Ge),{node:a.node},null,8,["node"])],6)],42,Ue)}}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]);const et=P({name:"ElTreeV2"});let Ie,Le,De,Be,Me,He;Ie=ft(je(P({...et,props:Ve,emits:We,setup(t,{expose:o,emit:p}){const c=t,i=ut(),O=B(()=>c.itemSize);Pe(le,{ctx:{emit:p,slots:i},props:c,instance:Te()}),Pe(ht,void 0);const{t:M}=pt(),_=me("tree"),{flattenTree:z,isNotEmpty:A,toggleExpand:N,isExpanded:a,isIndeterminate:I,isChecked:K,isDisabled:E,isCurrent:S,isForceHiddenExpandIcon:oe,handleNodeClick:re,handleNodeCheck:se,toggleCheckbox:ce,getCurrentNode:ie,getCurrentKey:U,setCurrentKey:ue,getCheckedKeys:X,getCheckedNodes:Q,getHalfCheckedKeys:he,getHalfCheckedNodes:pe,setChecked:Z,setCheckedKeys:ee,filter:te,setData:ae,getNode:ne,expandNode:e,collapseNode:n,setExpandedKeys:u}=$e(c,p);return o({toggleCheckbox:ce,getCurrentNode:ie,getCurrentKey:U,setCurrentKey:ue,getCheckedKeys:X,getCheckedNodes:Q,getHalfCheckedKeys:he,getHalfCheckedNodes:pe,setChecked:Z,setCheckedKeys:ee,filter:te,setData:ae,getNode:ne,expandNode:e,collapseNode:n,setExpandedKeys:u}),(h,C)=>{var k;return b(),F("div",{class:J([d(_).b(),{[d(_).m("highlight-current")]:h.highlightCurrent}]),role:"tree"},[d(A)?(b(),G(d(bt),{key:0,"class-name":d(_).b("virtual-list"),data:d(z),total:d(z).length,height:h.height,"item-size":d(O),"perf-mode":h.perfMode},{default:ve(({data:m,index:f,style:x})=>[(b(),G(Ze,{key:m[f].key,style:Re(x),node:m[f],expanded:d(a)(m[f]),"show-checkbox":h.showCheckbox,checked:d(K)(m[f]),indeterminate:d(I)(m[f]),"item-size":d(O),disabled:d(E)(m[f]),current:d(S)(m[f]),"hidden-expand-icon":d(oe)(m[f]),onClick:d(re),onToggle:d(N),onCheck:d(se)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(b(),F("div",{key:1,class:J(d(_).e("empty-block"))},[Y("span",{class:J(d(_).e("empty-text"))},V((k=h.emptyText)!=null?k:d(M)("el.tree.emptyText")),3)],2))],2)}}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]])),Le=["title"],De={key:0,class:"mr-10px folder folder-close"},Be={key:1,class:"mr-10px folder folder-open"},Me=["title","onClick"],He=(t=>(mt("data-v-ac2e0307"),t=t(),vt(),t))(()=>Y("span",null,null,-1)),Ye=Kt(P({__name:"ToBeDone",setup(t){const o=H(),p={children:"children",label:"name",nums:"childrenNums"},c=H(null),i=H([{id:1,name:"\u8349\u7A3F",isOpen:!1,children:[{name:"\u8349\u7A3F1111",time:"2024-2-24 20:40"},{name:"\u8349\u7A3F2222",time:"2024-2-24 20:40"}]},{id:2,name:"\u5F85\u53D1\u8D27",isOpen:!1,children:[{type:"2",orderId:10,name:"\u5F85\u53D1\u8D271111",time:"2024-2-24 20:40"},{type:"2",orderId:10,name:"\u5F85\u53D1\u8D271111",time:"2024-2-24 20:40"},{type:"2",orderId:10,name:"\u5F85\u53D1\u8D271111",time:"2024-2-24 20:40"},{type:"2",orderId:10,name:"\u5F85\u53D1\u8D271111",time:"2024-2-24 20:40"},{type:"2",orderId:10,name:"\u5F85\u53D1\u8D271111",time:"2024-2-24 20:40"},{type:"2",orderId:10,name:"\u5F85\u53D1\u8D271111",time:"2024-2-24 20:40"}]},{id:3,name:"\u5F85\u552E\u540E",isOpen:!1,children:[{name:"\u5F85\u552E\u540E1111",time:"2024-2-24 20:40"}]},{id:4,name:"\u5F85\u5F00\u7968",isOpen:!1,children:[{name:"\u5F85\u5F00\u79681111",time:"2024-2-24 20:40"}]}]),O=_=>{_.isOpen=!0},M=_=>{_.isOpen=!1};return(_,z)=>{const A=Ie;return b(),F(kt,null,[Ce(A,{data:d(i),props:p,ref_key:"treeRef",ref:c,height:250,onNodeExpand:O,onNodeCollapse:M},{default:ve(({node:N,data:a})=>[a.children!=null?(b(),F("p",{key:0,title:N.label,style:{display:"flex","align-items":"center",position:"relative"}},[a.isOpen?(b(),F("span",Be,V(N.children.length),1)):(b(),F("span",De,V(N.children.length),1)),yt(" "+V(N.label),1)],8,Le)):(b(),F("div",{key:1,title:N.label,class:"file",onClick:I=>{var S;return K=a.type,E=a.orderId,void(K==2&&((S=o.value)==null?void 0:S.open("\u5F85\u529E",E)));var K,E}},[He,Y("p",null,[Y("span",null,V(N.label),1),Y("span",null,V(a.time),1)])],8,Me))]),_:1},8,["data"]),Ce(gt,{ref_key:"deliveryFormRef",ref:o,onSuccess:_.getList},null,8,["onSuccess"])],64)}}}),[["__scopeId","data-v-ac2e0307"]])});export{Rt as __tla,Ye as default};