var D=(C,p,n)=>new Promise((y,f)=>{var g=r=>{try{i(n.next(r))}catch(c){f(c)}},k=r=>{try{i(n.throw(r))}catch(c){f(c)}},i=r=>r.done?y(r.value):Promise.resolve(r.value).then(g,k);i((n=n.apply(C,p)).next())});import{a as G,b as e,o as I,k as K,e as t,w as a,u,E as m,a$ as T,G as b,K as w,d as A,F as J,a5 as Q,aa as W}from"./ant-design-vue-710243d9.js";import{f as E,g as P}from"./index-2a45336b.js";import{u as X}from"./usePagination-7442a465.js";import Y from"./EditDialog-f1459fb8.js";import"./lodash-es-7cb071db.js";import"./tinymce-3184e0f1.js";import"./echarts-ca5d9323.js";import"./cropper-47c8e461.js";import"./qrcode-bec2257a.js";import"./jschardet-bd496279.js";import"./useForm-269e95cd.js";const Z=w("div",null,"Owner",-1),tt=w("div",null,"开始时间",-1),pt=Object.assign({name:"listBasic"},{__name:"index",setup(C){const{listData:p,paginationState:n,loading:y,showLoading:f,hideLoading:g,resetPagination:k,searchFormData:i}=X(),r=G();n.onChange=(_,o)=>{n.current=_,n.pageSize=o,c()},i.value={status:0},c();function c(){return D(this,null,function*(){try{f();const{pageSize:_,current:o}=n,{code:d,data:s}=yield E.common.getPageList({pageSize:_,current:o}).catch(()=>{throw new Error});if(g(),P("http.code.success")===d){const{records:v,pagination:h}=s;p.value=v,n.total=h.total}}catch(_){g()}})}function O(){k(),c()}function z({id:_}){Q.confirm({title:"删除提示",content:"确认删除？",onOk:()=>new Promise((o,d)=>{D(this,null,function*(){try{const{code:s}=yield E.common.del(_).catch(()=>{throw new Error});P("http.code.success")===s&&(o(),W.success("删除成功"),yield c())}catch(s){d()}})})})}function B(){c()}return(_,o)=>{const d=e("a-statistic"),s=e("a-col"),v=e("a-row"),h=e("a-card"),x=e("a-radio-button"),L=e("a-radio-group"),M=e("a-input-search"),$=e("a-space"),S=e("x-action-button"),F=e("a-menu-item"),N=e("a-menu"),R=e("a-dropdown"),V=e("a-avatar"),j=e("a-list-item-meta"),H=e("a-progress"),U=e("a-list-item"),q=e("a-list");return I(),K(J,null,[t(h,{class:"mb-8-2"},{default:a(()=>[t(v,{class:"align-center"},{default:a(()=>[t(s,{xs:24,sm:8},{default:a(()=>[t(d,{title:"我的待办",value:"8个任务"})]),_:1}),t(s,{xs:24,sm:8},{default:a(()=>[t(d,{title:"本周任务平均处理时间",value:"32分钟"})]),_:1}),t(s,{xs:24,sm:8},{default:a(()=>[t(d,{title:"本周完成任务数",value:"24个任务"})]),_:1})]),_:1})]),_:1}),t(h,{title:"基本列表"},{extra:a(()=>[t($,null,{default:a(()=>[t(L,{value:u(i).status,"onUpdate:value":o[0]||(o[0]=l=>u(i).status=l),onChange:O},{default:a(()=>[t(x,{value:0},{default:a(()=>[m("全部")]),_:1}),t(x,{value:1},{default:a(()=>[m("进行中")]),_:1}),t(x,{value:2},{default:a(()=>[m("等待中")]),_:1})]),_:1},8,["value"]),t(M,{value:u(i).keyword,"onUpdate:value":o[1]||(o[1]=l=>u(i).keyword=l),placeholder:"请输入",onSearch:O},null,8,["value"])]),_:1})]),default:a(()=>[t(q,{"item-layout":"horizontal","data-source":u(p),pagination:u(n),loading:u(y)},{renderItem:a(({item:l})=>[t(U,null,{actions:a(()=>[t(S,{divider:!1,onClick:o[2]||(o[2]=at=>_.$refs.editDialogRef.handleEdit())},{default:a(()=>[m(" 编辑 ")]),_:1}),t(S,{divider:!1},{default:a(()=>[t(R,null,{overlay:a(()=>[t(N,null,{default:a(()=>[t(F,{onClick:z},{default:a(()=>[m("删除")]),_:1})]),_:1})]),default:a(()=>[t(u(T))]),_:1})]),_:1})]),default:a(()=>[t(j,{description:l.sentence},{title:a(()=>[m(b(l.title),1)]),avatar:a(()=>[t(V,{shape:"square",src:l.avatar,size:48},null,8,["src"])]),_:2},1032,["description"]),t(v,{class:"color-secondary align-right",align:"middle",gutter:40},{default:a(()=>[t(s,null,{default:a(()=>[Z,w("div",null,b(l.name),1)]),_:2},1024),t(s,null,{default:a(()=>[tt,w("div",null,b(u(A)(l.datetime).format("MM-DD HH:mm")),1)]),_:2},1024),t(s,null,{default:a(()=>[t(H,{style:{width:"180px"},percent:l.percent},null,8,["percent"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:1},8,["data-source","pagination","loading"])]),_:1}),t(Y,{ref_key:"editDialogRef",ref:r,onOk:B},null,512)],64)}}});export{pt as default};
