ToBeDone-92fc1f04.js 15 KB

1
  1. import{aB as ke,aC as O,aL as X,aM as at,r as H,am as Oe,L as ye,an as ze,K as L,aN as nt,aO as lt,aP as dt,d as j,aQ as Fe,aD as me,aR as ot,aS as rt,o as K,c as z,g as V,a as d,v as Z,w as ve,M as st,Z as Y,aT as _e,aU as ct,P as Ae,ad as it,f as Ce,au as Re,aF as Pe,aV as ut,aW as je,aX as ht,aY as pt,t as G,aG as ft,n as kt,F as yt,p as mt,k as vt,_ as _t,__tla as Ct}from"./index-e3afde76.js";import{__tla as gt}from"./el-virtual-list-12e94cee.js";import xt,{__tla as bt}from"./OrderDeliveryForm-cf46bf4d.js";import{F as Nt,__tla as Kt}from"./fixed-size-list-d043de04.js";import{__tla as Et}from"./Dialog-c20523c4.js";import{__tla as wt}from"./index-53761b79.js";import{__tla as St}from"./index-e23f4f5a.js";import{__tla as It}from"./OrderBaseInfo-67e66f49.js";import{__tla as Dt}from"./SPuUploadImg-9d6f3265.js";import{__tla as Bt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-eb39998f.js";import{__tla as Lt}from"./index-15373756.js";import{__tla as Mt}from"./el-image-viewer-9d1c7d33.js";import{__tla as Ht}from"./useMessage-0b1b25bd.js";import{__tla as Tt}from"./formatTime-cee700cd.js";import{__tla as Ot}from"./dict-a141296d.js";import{__tla as zt}from"./OrderProduct-2deed209.js";import{__tla as Ft}from"./el-descriptions-item-10fdd34c.js";import{__tla as At}from"./DictTag-715a7ef1.js";import"./color-6e929987.js";let Ve,Rt=Promise.all([(()=>{try{return Ct}catch{}})(),(()=>{try{return gt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return At}catch{}})()]).then(async()=>{const le=Symbol(),Ye={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},Ge=ke({data:{type:O(Array),default:()=>X([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:O(Object),default:()=>X({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:O(Array),default:()=>X([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:O(Array),default:()=>X([])},indent:{type:Number,default:16},itemSize:ge,icon:{type:at},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:O([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:O(Function)},perfMode:{type:Boolean,default:!0}}),Qe=ke({node:{type:O(Object),default:()=>X(Ye)},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}),Ue=ke({node:{type:O(Object),required:!0}}),xe="node-click",be="node-expand",Ne="node-collapse",Ke="current-change",Ee="check",we="check-change",Se="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,[we]:(t,o)=>t&&typeof o=="boolean",[Se]:(t,o,p)=>t&&o&&p};function Xe(t,o){const p=H(new Set(t.defaultExpandedKeys)),c=H(),i=lt();ye(()=>t.currentNodeKey,e=>{c.value=e},{immediate:!0}),ye(()=>t.data,e=>{ne(e)},{immediate:!0});const{isIndeterminate:T,isChecked:M,toggleCheckbox:_,getCheckedKeys:F,getCheckedNodes:A,getHalfCheckedKeys:E,getHalfCheckedNodes:a,setChecked:I,setCheckedKeys:b}=function(e,n){const u=H(new Set),h=H(new Set),{emit:C}=Oe();ye([()=>n.value,()=>e.defaultCheckedKeys],()=>ze(()=>{R(e.defaultCheckedKeys)}),{immediate:!0});const y=()=>{if(!n.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:l,maxLevel:k}=n.value,s=u.value,r=new Set;for(let v=k-1;v>=1;--v){const g=l.get(v);g&&g.forEach(S=>{const W=S.children;if(W){let P=!0,fe=!1;for(const tt of W){const Te=tt.key;if(s.has(Te))fe=!0;else{if(r.has(Te)){P=!1,fe=!0;break}P=!1}}P?s.add(S.key):fe?(r.add(S.key),s.delete(S.key)):(s.delete(S.key),r.delete(S.key))}})}h.value=r},m=l=>u.value.has(l.key),f=(l,k,s=!0)=>{const r=u.value,v=(g,S)=>{r[S?de.ADD:de.DELETE](g.key);const W=g.children;!e.checkStrictly&&W&&W.forEach(P=>{P.disabled||v(P,S)})};v(l,k),y(),s&&x(l,k)},x=(l,k)=>{const{checkedNodes:s,checkedKeys:r}=D(),{halfCheckedNodes:v,halfCheckedKeys:g}=B();C(Ee,l.data,{checkedKeys:r,checkedNodes:s,halfCheckedKeys:g,halfCheckedNodes:v}),C(we,l.data,k)};function D(l=!1){const k=[],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),k.push(g.data))})}return{checkedKeys:s,checkedNodes:k}}function B(){const l=[],k=[];if(n!=null&&n.value&&e.showCheckbox){const{treeNodeMap:s}=n.value;h.value.forEach(r=>{const v=s.get(r);v&&(k.push(r),l.push(v.data))})}return{halfCheckedNodes:l,halfCheckedKeys:k}}function R(l){if(n!=null&&n.value){const{treeNodeMap:k}=n.value;if(e.showCheckbox&&k&&l)for(const s of l){const r=k.get(s);r&&!m(r)&&f(r,!0,!1)}}}return{updateCheckedKeys:y,toggleCheckbox:f,isChecked:m,isIndeterminate:l=>h.value.has(l.key),getCheckedKeys:function(l=!1){return D(l).checkedKeys},getCheckedNodes:function(l=!1){return D(l).checkedNodes},getHalfCheckedKeys:function(){return B().halfCheckedKeys},getHalfCheckedNodes:function(){return B().halfCheckedNodes},setChecked:function(l,k){if(n!=null&&n.value&&e.showCheckbox){const s=n.value.treeNodeMap.get(l);s&&f(s,k,!1)}},setCheckedKeys:function(l){u.value.clear(),h.value.clear(),R(l)}}}(t,i),{doFilter:N,hiddenNodeKeySet:w,isForceHiddenExpandIcon:oe}=function(e,n){const u=H(new Set([])),h=H(new Set([])),C=L(()=>nt(e.filterMethod));return{hiddenExpandIconKeySet:h,hiddenNodeKeySet:u,doFilter:function(y){var m;if(!C.value)return;const f=new Set,x=h.value,D=u.value,B=[],R=((m=n.value)==null?void 0:m.treeNodes)||[],l=e.filterMethod;return D.clear(),function k(s){s.forEach(r=>{B.push(r),l!=null&&l(y,r.data)?B.forEach(g=>{f.add(g.key)}):r.isLeaf&&D.add(r.key);const v=r.children;if(v&&k(v),!r.isLeaf)if(f.has(r.key)){if(v){let g=!0;for(const S of v)if(!D.has(S.key)){g=!1;break}g?x.add(r.key):x.delete(r.key)}}else D.add(r.key);B.pop()})}(R),f},isForceHiddenExpandIcon:function(y){return h.value.has(y.key)}}}(t,i),re=L(()=>{var e;return((e=t.props)==null?void 0:e.value)||Q.KEY}),se=L(()=>{var e;return((e=t.props)==null?void 0:e.children)||Q.CHILDREN}),ce=L(()=>{var e;return((e=t.props)==null?void 0:e.disabled)||Q.DISABLED}),ie=L(()=>{var e;return((e=t.props)==null?void 0:e.label)||Q.LABEL}),$=L(()=>{const e=p.value,n=w.value,u=[],h=i.value&&i.value.treeNodes||[];return function(){const C=[];for(let y=h.length-1;y>=0;--y)C.push(h[y]);for(;C.length;){const y=C.pop();if(y&&(n.has(y.key)||u.push(y),e.has(y.key))){const m=y.children;if(m)for(let f=m.length-1;f>=0;--f)C.push(m[f])}}}(),u}),ue=L(()=>$.value.length>0);function q(e){return e[se.value]}function U(e){return e?e[re.value]:""}function he(e){return e[ce.value]}function pe(e){return e[ie.value]}function J(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){ze(()=>i.value=function(n){const u=new Map,h=new Map;let C=1;const y=function m(f,x=1,D){var B;const R=[];for(const l of f){const k=U(l),s={level:x,key:k,data:l};s.label=pe(l),s.parent=D;const r=q(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(k,s),h.has(x)||h.set(x,[]),(B=h.get(x))==null||B.push(s)}return x>C&&(C=x),R}(n);return{treeNodeMap:u,levelTreeNodeMap:h,maxLevel:C,treeNodes:y}}(e))}return{tree:i,flattenTree:$,isNotEmpty:ue,getKey:U,getChildren:q,toggleExpand:J,toggleCheckbox:_,isExpanded:function(e){return p.value.has(e.key)},isChecked:M,isIndeterminate:T,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&&J(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:F,getCheckedNodes:A,getHalfCheckedKeys:E,getHalfCheckedNodes:a,setChecked:I,setCheckedKeys:b,filter:function(e){const n=N(e);n&&(p.value=n)},setData:ne,getNode:function(e){var n;const u=dt(e)?U(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 Ze=j({name:"ElTreeNodeContent",props:Ue,setup(t){const o=Fe(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 $e=["aria-expanded","aria-disabled","aria-checked","data-key","onClick"],qe=j({name:"ElTreeNode"});var Je=Pe(j({...qe,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=Fe(le),i=me("tree"),T=L(()=>{var a;return(a=c==null?void 0:c.props.indent)!=null?a:16}),M=L(()=>{var a;return(a=c==null?void 0:c.props.icon)!=null?a:rt}),_=a=>{o("click",p.node,a)},F=()=>{o("toggle",p.node)},A=a=>{o("check",p.node,a)},E=a=>{var I,b,N,w;(N=(b=(I=c==null?void 0:c.instance)==null?void 0:I.vnode)==null?void 0:b.props)!=null&&N.onNodeContextmenu&&(a.stopPropagation(),a.preventDefault()),c==null||c.ctx.emit(Se,a,(w=p.node)==null?void 0:w.data,p.node)};return(a,I)=>{var b,N,w;return K(),z("div",{ref:"node$",class:Y([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":(b=a.node)==null?void 0:b.key,onClick:_e(_,["stop"]),onContextmenu:E},[V("div",{class:Y(d(i).be("node","content")),style:Re({paddingLeft:(a.node.level-1)*d(T)+"px",height:a.itemSize+"px"})},[d(M)?(K(),Z(d(ct),{key:0,class:Y([d(i).is("leaf",!!((N=a.node)!=null&&N.isLeaf)),d(i).is("hidden",a.hiddenExpandIcon),{expanded:!((w=a.node)!=null&&w.isLeaf)&&a.expanded},d(i).be("node","expand-icon")]),onClick:_e(F,["stop"])},{default:ve(()=>[(K(),Z(st(d(M))))]),_:1},8,["class","onClick"])):Ae("v-if",!0),a.showCheckbox?(K(),Z(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(Ze),{node:a.node},null,8,["node"])],6)],42,$e)}}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]);const et=j({name:"ElTreeV2"});let Ie,De,Be,Le,Me,He;Ie=ft(Pe(j({...et,props:Ge,emits:We,setup(t,{expose:o,emit:p}){const c=t,i=ut(),T=L(()=>c.itemSize);je(le,{ctx:{emit:p,slots:i},props:c,instance:Oe()}),je(ht,void 0);const{t:M}=pt(),_=me("tree"),{flattenTree:F,isNotEmpty:A,toggleExpand:E,isExpanded:a,isIndeterminate:I,isChecked:b,isDisabled:N,isCurrent:w,isForceHiddenExpandIcon:oe,handleNodeClick:re,handleNodeCheck:se,toggleCheckbox:ce,getCurrentNode:ie,getCurrentKey:$,setCurrentKey:ue,getCheckedKeys:q,getCheckedNodes:U,getHalfCheckedKeys:he,getHalfCheckedNodes:pe,setChecked:J,setCheckedKeys:ee,filter:te,setData:ae,getNode:ne,expandNode:e,collapseNode:n,setExpandedKeys:u}=Xe(c,p);return o({toggleCheckbox:ce,getCurrentNode:ie,getCurrentKey:$,setCurrentKey:ue,getCheckedKeys:q,getCheckedNodes:U,getHalfCheckedKeys:he,getHalfCheckedNodes:pe,setChecked:J,setCheckedKeys:ee,filter:te,setData:ae,getNode:ne,expandNode:e,collapseNode:n,setExpandedKeys:u}),(h,C)=>{var y;return K(),z("div",{class:Y([d(_).b(),{[d(_).m("highlight-current")]:h.highlightCurrent}]),role:"tree"},[d(A)?(K(),Z(d(Nt),{key:0,"class-name":d(_).b("virtual-list"),data:d(F),total:d(F).length,height:h.height,"item-size":d(T),"perf-mode":h.perfMode},{default:ve(({data:m,index:f,style:x})=>[(K(),Z(Je,{key:m[f].key,style:Re(x),node:m[f],expanded:d(a)(m[f]),"show-checkbox":h.showCheckbox,checked:d(b)(m[f]),indeterminate:d(I)(m[f]),"item-size":d(T),disabled:d(N)(m[f]),current:d(w)(m[f]),"hidden-expand-icon":d(oe)(m[f]),onClick:d(re),onToggle:d(E),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"])):(K(),z("div",{key:1,class:Y(d(_).e("empty-block"))},[V("span",{class:Y(d(_).e("empty-text"))},G((y=h.emptyText)!=null?y:d(M)("el.tree.emptyText")),3)],2))],2)}}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]])),De=["title"],Be={key:0,class:"mr-10px folder folder-close"},Le={key:1,class:"mr-10px folder folder-open"},Me=["title","onClick"],He=(t=>(mt("data-v-a0688993"),t=t(),vt(),t))(()=>V("span",null,null,-1)),Ve=_t(j({__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"}]}]),T=_=>{_.isOpen=!0},M=_=>{_.isOpen=!1};return(_,F)=>{const A=Ie;return K(),z(yt,null,[Ce(A,{data:d(i),props:p,ref_key:"treeRef",ref:c,height:250,onNodeExpand:T,onNodeCollapse:M},{default:ve(({node:E,data:a})=>[a.children!=null?(K(),z("p",{key:0,title:E.label,style:{display:"flex","align-items":"center",position:"relative"}},[a.isOpen?(K(),z("span",Le,G(E.children.length),1)):(K(),z("span",Be,G(E.children.length),1)),kt(" "+G(E.label),1)],8,De)):(K(),z("div",{key:1,title:E.label,class:"file",onClick:I=>{var w;return b=a.type,N=a.orderId,console.log(b,N),void(b==2&&((w=o.value)==null?void 0:w.open("\u5F85\u529E",N)));var b,N}},[He,V("p",null,[V("span",null,G(E.label),1),V("span",null,G(a.time),1)])],8,Me))]),_:1},8,["data"]),Ce(xt,{ref_key:"deliveryFormRef",ref:o,onSuccess:_.getList},null,8,["onSuccess"])],64)}}}),[["__scopeId","data-v-a0688993"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/Home/components/ToBeDone.vue"]])});export{Rt as __tla,Ve as default};