ToBeDone-282b6f78.js 15 KB

1
  1. import{aw as ye,ax as O,bd as G,bK as at,r as H,am as Oe,L as ke,an as ze,K as B,ce as nt,b6 as lt,cR as dt,d as P,bL as Ae,ay as me,bS as ot,d$ as rt,o as K,c as z,g as $,a as d,v as J,w as ve,M as st,Z as q,b3 as _e,aM as ct,P as Fe,ad as it,f as Ce,au as Re,aA as je,bI as ut,bQ as Pe,e0 as ht,bf as pt,t as Q,aB as ft,n as yt,F as kt,p as mt,k as vt,_ as _t,__tla as Ct}from"./index-00b1998d.js";import{__tla as gt}from"./el-virtual-list-a12c967a.js";import bt,{__tla as xt}from"./OrderDeliveryForm-9f1dd455.js";import{F as Nt,__tla as Kt}from"./fixed-size-list-4f274623.js";import{__tla as Et}from"./Dialog-5ff7ce4c.js";import{__tla as wt}from"./index-c8059554.js";import{__tla as St}from"./index-673d8d3b.js";import{__tla as It}from"./OrderBaseInfo-4cd1b949.js";import{__tla as Lt}from"./SPuUploadImg-5b49f02c.js";import{__tla as Dt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-a7a19838.js";import{__tla as Bt}from"./index-e14527d5.js";import{__tla as Mt}from"./el-image-viewer-612a5a0e.js";import{__tla as Ht}from"./useMessage-437e6444.js";import{__tla as Tt}from"./formatTime-4e31c660.js";import{__tla as Ot}from"./dict-29c23f6f.js";import{__tla as zt}from"./OrderProduct-3caca8ce.js";import{__tla as At}from"./el-descriptions-item-cebe3cbb.js";import{__tla as Ft}from"./DictTag-5674b0a2.js";import"./color-6e929987.js";let $e,Rt=Promise.all([(()=>{try{return Ct}catch{}})(),(()=>{try{return gt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return St}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 Tt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Ft}catch{}})()]).then(async()=>{const le=Symbol(),qe={key:-1,level:-1,data:{}};var V=(t=>(t.KEY="id",t.LABEL="label",t.CHILDREN="children",t.DISABLED="disabled",t))(V||{}),de=(t=>(t.ADD="add",t.DELETE="delete",t))(de||{});const ge={type:Number,default:26},Qe=ye({data:{type:O(Array),default:()=>G([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:O(Object),default:()=>G({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:O(Array),default:()=>G([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:O(Array),default:()=>G([])},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}}),Ve=ye({node:{type:O(Object),default:()=>G(qe)},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}),Ye=ye({node:{type:O(Object),required:!0}}),be="node-click",xe="node-expand",Ne="node-collapse",Ke="current-change",Ee="check",we="check-change",Se="node-contextmenu",Ze={[be]:(t,o,p)=>t&&o&&p,[xe]:(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 Ge(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:T,isChecked:M,toggleCheckbox:_,getCheckedKeys:A,getCheckedNodes:F,getHalfCheckedKeys:E,getHalfCheckedNodes:a,setChecked:I,setCheckedKeys:x}=function(e,n){const u=H(new Set),h=H(new Set),{emit:C}=Oe();ke([()=>n.value,()=>e.defaultCheckedKeys],()=>ze(()=>{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(S=>{const Z=S.children;if(Z){let j=!0,fe=!1;for(const tt of Z){const Te=tt.key;if(s.has(Te))fe=!0;else{if(r.has(Te)){j=!1,fe=!0;break}j=!1}}j?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,y,s=!0)=>{const r=u.value,v=(g,S)=>{r[S?de.ADD:de.DELETE](g.key);const Z=g.children;!e.checkStrictly&&Z&&Z.forEach(j=>{j.disabled||v(j,S)})};v(l,y),k(),s&&b(l,y)},b=(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(we,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:N,hiddenNodeKeySet:w,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,b=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 S of v)if(!L.has(S.key)){g=!1;break}g?b.add(r.key):b.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)||V.KEY}),se=B(()=>{var e;return((e=t.props)==null?void 0:e.children)||V.CHILDREN}),ce=B(()=>{var e;return((e=t.props)==null?void 0:e.disabled)||V.DISABLED}),ie=B(()=>{var e;return((e=t.props)==null?void 0:e.label)||V.LABEL}),W=B(()=>{const e=p.value,n=w.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(()=>W.value.length>0);function U(e){return e[se.value]}function Y(e){return e?e[re.value]:""}function he(e){return e[ce.value]}function pe(e){return e[ie.value]}function X(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(xe,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 k=function m(f,b=1,L){var D;const R=[];for(const l of f){const y=Y(l),s={level:b,key:y,data:l};s.label=pe(l),s.parent=L;const r=U(l);s.disabled=he(l),s.isLeaf=!r||r.length===0,r&&r.length&&(s.children=m(r,b+1,s)),R.push(s),u.set(y,s),h.has(b)||h.set(b,[]),(D=h.get(b))==null||D.push(s)}return b>C&&(C=b),R}(n);return{treeNodeMap:u,levelTreeNodeMap:h,maxLevel:C,treeNodes:k}}(e))}return{tree:i,flattenTree:W,isNotEmpty:ue,getKey:Y,getChildren:U,toggleExpand:X,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(be,e.data,e,n),function(u){ae(u)||(c.value=u.key,o(Ke,u.data,u))}(e),t.expandOnClickNode&&X(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:A,getCheckedNodes:F,getHalfCheckedKeys:E,getHalfCheckedNodes:a,setChecked:I,setCheckedKeys:x,filter:function(e){const n=N(e);n&&(p.value=n)},setData:ne,getNode:function(e){var n;const u=dt(e)?Y(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 Je=P({name:"ElTreeNodeContent",props:Ye,setup(t){const o=Ae(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 We=["aria-expanded","aria-disabled","aria-checked","data-key","onClick"],Ue=P({name:"ElTreeNode"});var Xe=je(P({...Ue,props:Ve,emits:{click:(t,o)=>!(!t||!o),toggle:t=>!!t,check:(t,o)=>t&&typeof o=="boolean"},setup(t,{emit:o}){const p=t,c=Ae(le),i=me("tree"),T=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)},A=()=>{o("toggle",p.node)},F=a=>{o("check",p.node,a)},E=a=>{var I,x,N,w;(N=(x=(I=c==null?void 0:c.instance)==null?void 0:I.vnode)==null?void 0:x.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 x,N,w;return K(),z("div",{ref:"node$",class:q([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":(x=a.node)==null?void 0:x.key,onClick:_e(_,["stop"]),onContextmenu:E},[$("div",{class:q(d(i).be("node","content")),style:Re({paddingLeft:(a.node.level-1)*d(T)+"px",height:a.itemSize+"px"})},[d(M)?(K(),J(d(ct),{key:0,class:q([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(A,["stop"])},{default:ve(()=>[(K(),J(st(d(M))))]),_:1},8,["class","onClick"])):Fe("v-if",!0),a.showCheckbox?(K(),J(d(it),{key:1,"model-value":a.checked,indeterminate:a.indeterminate,disabled:a.disabled,onChange:F,onClick:I[0]||(I[0]=_e(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):Fe("v-if",!0),Ce(d(Je),{node:a.node},null,8,["node"])],6)],42,We)}}}),[["__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:Qe,emits:Ze,setup(t,{expose:o,emit:p}){const c=t,i=ut(),T=B(()=>c.itemSize);Pe(le,{ctx:{emit:p,slots:i},props:c,instance:Oe()}),Pe(ht,void 0);const{t:M}=pt(),_=me("tree"),{flattenTree:A,isNotEmpty:F,toggleExpand:E,isExpanded:a,isIndeterminate:I,isChecked:x,isDisabled:N,isCurrent:w,isForceHiddenExpandIcon:oe,handleNodeClick:re,handleNodeCheck:se,toggleCheckbox:ce,getCurrentNode:ie,getCurrentKey:W,setCurrentKey:ue,getCheckedKeys:U,getCheckedNodes:Y,getHalfCheckedKeys:he,getHalfCheckedNodes:pe,setChecked:X,setCheckedKeys:ee,filter:te,setData:ae,getNode:ne,expandNode:e,collapseNode:n,setExpandedKeys:u}=Ge(c,p);return o({toggleCheckbox:ce,getCurrentNode:ie,getCurrentKey:W,setCurrentKey:ue,getCheckedKeys:U,getCheckedNodes:Y,getHalfCheckedKeys:he,getHalfCheckedNodes:pe,setChecked:X,setCheckedKeys:ee,filter:te,setData:ae,getNode:ne,expandNode:e,collapseNode:n,setExpandedKeys:u}),(h,C)=>{var k;return K(),z("div",{class:q([d(_).b(),{[d(_).m("highlight-current")]:h.highlightCurrent}]),role:"tree"},[d(F)?(K(),J(d(Nt),{key:0,"class-name":d(_).b("virtual-list"),data:d(A),total:d(A).length,height:h.height,"item-size":d(T),"perf-mode":h.perfMode},{default:ve(({data:m,index:f,style:b})=>[(K(),J(Xe,{key:m[f].key,style:Re(b),node:m[f],expanded:d(a)(m[f]),"show-checkbox":h.showCheckbox,checked:d(x)(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:q(d(_).e("empty-block"))},[$("span",{class:q(d(_).e("empty-text"))},Q((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-a0688993"),t=t(),vt(),t))(()=>$("span",null,null,-1)),$e=_t(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"}]}]),T=_=>{_.isOpen=!0},M=_=>{_.isOpen=!1};return(_,A)=>{const F=Ie;return K(),z(kt,null,[Ce(F,{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",Be,Q(E.children.length),1)):(K(),z("span",De,Q(E.children.length),1)),yt(" "+Q(E.label),1)],8,Le)):(K(),z("div",{key:1,title:E.label,class:"file",onClick:I=>{var w;return x=a.type,N=a.orderId,console.log(x,N),void(x==2&&((w=o.value)==null?void 0:w.open("\u5F85\u529E",N)));var x,N}},[He,$("p",null,[$("span",null,Q(E.label),1),$("span",null,Q(a.time),1)])],8,Me))]),_:1},8,["data"]),Ce(bt,{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,$e as default};