listCard-D0CZny7_.js 11 KB

1
  1. var Ct=Object.defineProperty,St=Object.defineProperties;var Ft=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var xt=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable;var Z=(f,r,l)=>r in f?Ct(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l,B=(f,r)=>{for(var l in r||(r={}))xt.call(r,l)&&Z(f,l,r[l]);if(Y)for(var l of Y(r))Dt.call(r,l)&&Z(f,l,r[l]);return f},J=(f,r)=>St(f,Ft(r));var g=(f,r,l)=>new Promise((L,S)=>{var V=p=>{try{F(l.next(p))}catch(x){S(x)}},R=p=>{try{F(l.throw(p))}catch(x){S(x)}},F=p=>p.done?L(p.value):Promise.resolve(p.value).then(V,R);F((l=l.apply(f,r)).next())});import{aj as It,a1 as Rt,a as P,aG as N,b7 as W,bo as z,an as X,u as Mt,_ as Bt}from"./entry/index-Bg7A3OWN.js";import{F as Nt,s as zt,c as Tt}from"./FormDrawerSift-BVKxnfzd.js";import{u as tt}from"./index-VGSPuHjf.js";/* empty css */import{S as Lt}from"./Sift-CLjST5L4.js";import{b as Vt}from"./index-CeXykoPm.js";import{a as Et}from"./download-fBo_Nl5v.js";import{u as U}from"./index-DUhJzw3Q.js";import{u as Pt,_ as Ut}from"./useTable-DpuG39Mz.js";import{_ as $t}from"./TableImg.vue_vue_type_style_index_0_lang-Ckcw5x_a.js";import{s as jt,o as At,p as Gt}from"./taskApi-Bz8hrTyA.js";import Kt from"./selFormModal-BlIkg9p7.js";import qt from"./formDrawer-IVQOaeAU.js";import Ot from"./actionFormModal-BwNnN_BV.js";import Qt from"./detailFormDrawer-DpEffFap.js";import{I as Ht}from"./ImportModal-CYSBVIOl.js";import{i as Yt}from"./personalApi-DP_U5ubf.js";import{Y as et,be as Zt}from"./antd-BfqWtMX3.js";import{d as Jt,f as k,r as ot,o as Wt,w as Xt,n as te,Z as n,_ as u,$ as y,F as T,a7 as ee,m as at,a4 as $,a5 as w,k as c,u as s,a0 as v,a8 as h,ad as C,G as j}from"./vue-DM5HGU8Z.js";import"./BasicForm.vue_vue_type_script_setup_true_lang-Dx2ZGcH2.js";import"./FormItem.vue_vue_type_script_lang-bSs469wz.js";import"./helper-B4uVtpst.js";import"./index-CykiRC9w.js";import"./index-ByEte5kQ.js";import"./uuid-BUBnBT7J.js";import"./useSortable-ntBZ4sS-.js";import"./index-BLRzDfh2.js";import"./IconPicker.vue_vue_type_script_setup_true_lang-D9PUE4pe.js";import"./copyTextToClipboard-B8vsl9wq.js";import"./index-Bcysb9oh.js";import"./base64Conver-DEMZeTZS.js";import"./index-C6Fd0N8U.js";import"./onMountedOrActivated-Ckq_czNf.js";import"./cateApi-BIaEynfm.js";import"./resourceApi-YzcpHKyw.js";import"./common-DBmIEFvB.js";import"./imageEnum-BRgYKvjO.js";import"./sysOrgApi-DsVnb8Z-.js";import"./BasicForm.vue_vue_type_style_index_0_lang-YgcjDfq5.js";import"./useForm-D-5YEdQ5.js";import"./manageApi-BprYRv_V.js";import"./useWindowSizeFn-on6zHi4F.js";import"./sortable.esm-DYEDn-UA.js";import"./componentMap-heLWvQeq.js";import"./fieldApi-DrJvye1M.js";import"./handlingInfo-CiHKRdcx.js";import"./nothingInfo-C5PJcCxH.js";import"./data-KBYXV-46.js";import"./processInfo.vue_vue_type_script_setup_true_lang-bgRZ-OtU.js";import"./evaluationInfo.vue_vue_type_script_setup_true_lang-DaYcsgnJ.js";import"./index-CFdcgz9Z.js";import"./useDescription-ViLiwiD0.js";import"./taskInfo-a7lfLQFf.js";const oe={class:"h-main"},ae={class:"flex justify-between"},se={class:"text-2xl"},ie={key:0},le={class:"m-2"},ne={key:1},re={class:"flex items-center"},ue={key:0,class:"flex mb-2"},ce={class:"mt-4"},pe={key:1,class:"flex"},fe=["color"],me={class:"h-7 lh-7 min-w-12"},de={key:3,class:"flex"},he={key:2,class:"round-check",style:{borderColor:"#3366FF",color:"#3366FF"}},ke={key:0,style:{color:"#01092a"}},ye={key:1,style:{color:"#ff552f"}},ve=Jt({__name:"listCard",setup(f){const r=It(),l=k({}),L=Rt(),{createMessage:S}=Mt(),[V,{openModal:R}]=tt(),[F,{openModal:p}]=tt(),[x,{openDrawer:A}]=U(),[st,{openDrawer:it}]=U(),[lt,{openDrawer:nt}]=U(),[rt,{reload:_,getSelectRowKeys:G}]=Pt({api:At,rowKey:"id",columns:Tt,showIndexColumn:!1,pagination:!0,bordered:!0,clickToRowSelect:!1,rowSelection:{type:"checkbox"},actionColumn:{width:200,title:"操作",align:"left",dataIndex:"action"},beforeFetch:ct,showFooter:!0}),ut=k([{key:0,label:"全部",auth:["ssc:task:allList"]},{key:1,label:"待办",auth:["ssc:task:todoList"]},{key:2,label:"已办",auth:["ssc:task:doneList"]},{key:3,label:"抢单池",auth:["ssc:task:grabList"]},{key:4,label:"督办",auth:["ssc:task:supervisingList"]}]),K=k(0),m=k([]),D=k({}),M=k(!1),E=k(!1),q=k(0),O=ot({type:0}),Q=k(!1),I=ot({}),H=k([{key:"taskStatus",dictCode:"biz_task_status"}]);Wt(()=>g(this,null,function*(){const o=yield Vt(H.value.map(t=>t.dictCode));for(const t in o){const i=H.value.filter(a=>a.dictCode==t)[0];I[i.key]=o[t]}l.value=r.getUserInfo}));function ct(o){return g(this,null,function*(){return yield bt(B({type:1},D.value)),B(J(B({},o),{orders:[],type:O.type}),D.value)})}function pt(){M.value=!0,E.value=!1}function ft(){M.value=!0,E.value=!0}function mt(o){K.value=o,O.type=o,_()}function dt(o){M.value=!1;const t=o.secondCateInfo;o.isImport?R(!0,{title:t.name+"导入",importUrl:(i,a)=>X.uploadFile({url:L.apiUrl+"/"+t.importUrl,onUploadProgress:a},i),exportUrl:()=>X.get({url:t.exportUrl})}):A(!0,{secondCateId:t.id,title:t.name+"新增"})}function ht(o){nt(!0,{record:o})}function b(o,t){return g(this,null,function*(){switch(t){case"distributed":p(!0,{type:"distributed",record:o});break;case"transfer":p(!0,{type:"transfer",record:o});break;case"grab":p(!0,{type:"grab",record:o});break;case"evaluation":p(!0,{type:"evaluation",record:o});break;case"startCheck":yield jt(o.id),S.success("开启稽核成功"),_();break;case"reviewFlow":p(!0,{type:"reviewFlow",record:o});break}})}function kt(){A(!1),_()}function yt(){const o=[];m.value.forEach(t=>{const i={field:t.field,value:t.value};if(t.field=="orgId"){const a={field:"orgName",value:t.showVal};o.push(a)}if(t.field=="secondCateld"){const a={field:"secondCateName",value:t.showVal};o.push(a)}o.push(i)}),it(!0,{record:o})}function vt(o){return g(this,null,function*(){m.value=[];for(const t of Object.keys(o))o[t]&&zt.forEach(i=>{i.field==t&&i.ifShow&&m.value.push({field:i.field,label:i.label,value:o[t],showVal:i.field==="status"?z(I.taskStatus,o[t],"label"):i.field==="overdue"?o[t]==="1"?"逾期":"未逾期":i.field==="orgId"?o.orgName:i.field==="secondCateId"?o.secondCateName:o[t],type:i.type})});m.value.forEach(t=>{D.value[t.field]=t.value}),yield _()})}function wt(o){return g(this,null,function*(){D.value={},o.type=="clear"&&(m.value=[]),o.type=="close"&&(m.value=m.value.filter(t=>{var i;return t.field!=((i=o.item)==null?void 0:i.field)})),m.value.forEach(t=>{D.value[t.field]=t.value}),yield _()})}function gt(){R(!1)}Xt(()=>G(),o=>{o.length>0?Q.value=!0:Q.value=!1},{immediate:!0});function _t(){return g(this,null,function*(){const o=G(),t=yield Yt(o);Et(t.base64,t.fileName,String(t.type).toLowerCase()),S.success("导出成功")})}function bt(o){return g(this,null,function*(){const t=yield Gt(o);t.data&&(q.value=t.data)})}return(o,t)=>{const i=te("auth");return n(),u("div",oe,[y("div",ae,[y("div",se,[(n(!0),u(T,null,ee(ut.value,a=>at((n(),$(s(Zt),{bordered:!0,key:a.key,checked:K.value===a.key,onChange:e=>mt(a.key)},{default:w(()=>[a.key===1?(n(),u("div",ie,[c(s(et),{count:q.value,size:"small"},{default:w(()=>[y("div",le,v(a.label),1)]),_:2},1032,["count"])])):(n(),u("div",ne,v(a.label),1))]),_:2},1032,["checked","onChange"])),[[i,a.auth]])),128))]),y("div",re,[c(s(N),{type:"default",border:!1,size:"large",onClick:ft},{icon:w(()=>[c(P,{icon:"icon-sys-import_default|iconfont",size:20,color:"#01092A"})]),_:1}),at((n(),$(s(N),{type:"default",border:!1,size:"large",onClick:pt,class:"ml-2 mr-2 btn-icon"},{icon:w(()=>[c(P,{icon:"icon-create|iconfont",size:20,color:"#01092A"})]),_:1})),[[i,["ssc:task:add"]]]),c(s(et),{count:m.value.length},{default:w(()=>[c(s(N),{size:"large",onClick:t[0]||(t[0]=()=>yt())},{icon:w(()=>[c(P,{icon:"icon-filter|iconfont",size:18,color:"#3D4155"})]),_:1})]),_:1},8,["count"])])]),m.value.length?(n(),u("div",ue,[c(s(Lt),{data:m.value,onClose:wt},null,8,["data"])])):h("",!0),y("div",ce,[c(s(Ut),{onRegister:s(rt),onRowClick:ht},{bodyCell:w(({column:a,record:e})=>[a.key==="color"?(n(),u("div",{key:0,style:C({backgroundColor:e.color,width:"20px",height:"20px"})},null,4)):h("",!0),a.key==="taskName"?(n(),u("div",pe,[y("div",{color:e.firstCateFontColor,style:C({color:e.firstCateFontColor,background:e.firstCateBgColor}),class:"min-w-12 mr-6 text-center rounded-md h-7 lh-7 pl-2 pr-2"},v(e.firstCateName),13,fe),y("div",me,v(e.peopleName)+"-"+v(e.secondCateName),1)])):h("",!0),a.key==="createTime"?(n(),u(T,{key:2},[j(v(s(W)(e.createTime)),1)],64)):h("",!0),a.key==="status"?(n(),u("div",de,[y("div",{style:C({backgroundColor:s(z)(I.taskStatus,e.status,"prefixColor"),color:"red",margin:"9px 8px 0 0",width:"6px",height:"6px",borderRadius:"3px"})},null,4),y("div",{style:C({color:s(z)(I.taskStatus,e.status,"fontColor")})},v(s(z)(I.taskStatus,e.status,"label")),5),e.checkColor?(n(),u("div",{key:0,class:"round-check",style:C({borderColor:e.checkColor,color:e.checkColor})},"稽",4)):h("",!0),e.reviewColor?(n(),u("div",{key:1,class:"round-check",style:C({borderColor:e.reviewColor,color:e.reviewColor})},"审",4)):h("",!0),e.reviewFlowStatus!="0"?(n(),u("div",he,v(e.reviewFlowStatus=="1"?"抢":"转"),1)):h("",!0)])):h("",!0),a.key==="lateTime"?(n(),u(T,{key:4},[e.overdue===0?(n(),u("span",ke,"未逾期")):(n(),u("span",ye,"逾期"+v(e.lateTime)+"天",1))],64)):h("",!0),a.key==="deadLine"?(n(),u(T,{key:5},[j(v(s(W)(e.deadLine)),1)],64)):h("",!0),a.key==="action"?(n(),$(s($t),{key:6,actions:[{auth:"ssc:task:distributed",icon:"icon-paidan|iconfont",ifShow:(e.reviewFlowStatus==null||e.reviewFlowStatus=="0")&&(e.status==="task_status_0"||e.status==="task_status_2"),tooltip:"派单",label:"派单",type:"primary",ghost:!0,onClick:d=>{d.stopPropagation(),b(e,"distributed")}},{auth:"ssc:task:distributed",icon:"icon-paiji|iconfont",ifShow:(e.status==="task_status_3"||e.status==="task_status_4")&&!e.check,tooltip:"派稽",label:"派稽",type:"primary",ghost:!0,onClick:d=>{d.stopPropagation()},popConfirm:{title:"是否开启稽核",placement:"left",confirm:b.bind(null,e,"startCheck")}},{ifShow:e.status==="task_status_1"&&e.processBy===l.value.userId,tooltip:"转单",label:"转单",icon:"icon-zhuandan|iconfont",type:"primary",ghost:!0,onClick:d=>{d.stopPropagation(),b(e,"transfer")}},{auth:"ssc:task:grab",ifShow:(e.reviewFlowStatus==null||e.reviewFlowStatus=="0")&&e.status==="task_status_2",tooltip:"抢单",label:"抢单",icon:"icon-qiangdan|iconfont",type:"primary",ghost:!0,onClick:d=>{d.stopPropagation(),b(e,"grab")}},{ifShow:e.reviewFlowStatus!=null&&e.reviewFlowStatus!="0"&&e.reviewFlowBy===l.value.userId,tooltip:"审核",label:"审核",icon:"icon-qiangdan|iconfont",type:"primary",ghost:!0,onClick:d=>{d.stopPropagation(),b(e,"reviewFlow")}},{ifShow:e.status==="task_status_3",tooltip:"评价",label:"评价",type:"primary",icon:"icon-pingjia|iconfont",ghost:!0,onClick:d=>{d.stopPropagation(),b(e,"evaluation")}}]},null,8,["actions"])):h("",!0)]),tableFooter:w(()=>[y("div",null,[c(s(N),{type:"primary",ghost:"",class:"btn btn-primary btn-sm",onClick:_t},{default:w(()=>t[3]||(t[3]=[j(" 导出 ")])),_:1})])]),_:1},8,["onRegister"])]),c(Kt,{open:M.value,isImport:E.value,onSuccess:dt},null,8,["open","isImport"]),c(s(Ht),{onRegister:s(V),onSuccess:gt},null,8,["onRegister"]),c(qt,{onRegister:s(x),onSuccess:kt},null,8,["onRegister"]),c(Qt,{onRegister:s(lt),onSuccess:t[1]||(t[1]=a=>s(_)())},null,8,["onRegister"]),c(Ot,{onRegister:s(F),onSuccess:t[2]||(t[2]=a=>s(_)())},null,8,["onRegister"]),c(Nt,{onRegister:s(st),onSuccess:vt},null,8,["onRegister"])])}}}),go=Bt(ve,[["__scopeId","data-v-939e7eaa"]]);export{go as default};