listCard-BbFb5rn0.js 12 KB

1
  1. var bt=Object.defineProperty,Ct=Object.defineProperties;var St=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable;var Z=(p,u,n)=>u in p?bt(p,u,{enumerable:!0,configurable:!0,writable:!0,value:n}):p[u]=n,M=(p,u)=>{for(var n in u||(u={}))Ft.call(u,n)&&Z(p,n,u[n]);if(Y)for(var n of Y(u))xt.call(u,n)&&Z(p,n,u[n]);return p},J=(p,u)=>Ct(p,St(u));var _=(p,u,n)=>new Promise((R,B)=>{var E=g=>{try{w(n.next(g))}catch(C){B(C)}},P=g=>{try{w(n.throw(g))}catch(C){B(C)}},w=g=>g.done?R(g.value):Promise.resolve(g.value).then(E,P);w((n=n.apply(p,u)).next())});import{aj as Dt,a as j,aG as T,b8 as W,bp as z,an as It,u as Rt,_ as Bt}from"./entry/index-Dvfp0xmj.js";import{F as Nt,s as Mt,c as Tt}from"./FormDrawerSift-AwDHdowD.js";import{u as X}from"./index-DoY8o_tg.js";/* empty css */import{S as zt}from"./Sift-DGwVKTDm.js";import{b as Lt}from"./index-C62qE7av.js";import{a as Vt}from"./download-CRNZI4vf.js";import{u as A}from"./index-uwqi4PVY.js";import{u as Et,_ as Pt}from"./useTable-C2EyEhdK.js";import{_ as $t}from"./TableImg.vue_vue_type_style_index_0_lang-i6rrVPR0.js";import{o as jt,s as At,p as Ut,q as qt}from"./taskApi-D73ny29y.js";import Kt from"./selFormModal-DaD42gIh.js";import Gt from"./formDrawer-CfTyFr1_.js";import Ot from"./actionFormModal-BAUecMac.js";import Qt from"./detailFormDrawer-BfU1Yv04.js";import{I as Ht}from"./ImportModal-Be1AAVI9.js";import{i as Yt}from"./personalApi-DwK7nh07.js";import{Y as tt,be as Zt,T as et}from"./antd-BfqWtMX3.js";import{d as Jt,f as h,r as ot,o as Wt,w as Xt,n as te,Z as l,_ as c,$ as y,F as L,a7 as ee,m as U,a4 as V,a5 as d,k as r,u as s,a0 as v,a8 as k,ad as F,G as I}from"./vue-DM5HGU8Z.js";import"./BasicForm.vue_vue_type_script_setup_true_lang-DFM1MnGc.js";import"./FormItem.vue_vue_type_script_lang-Bup_u6t4.js";import"./helper-D9Ga7J5s.js";import"./index-Bi_E-ztt.js";import"./index-Dctz5MNS.js";import"./uuid-BUBnBT7J.js";import"./useSortable-Bnq3rNI4.js";import"./index-Dq-XUNJv.js";import"./IconPicker.vue_vue_type_script_setup_true_lang-BRwtlKz0.js";import"./copyTextToClipboard-B8vsl9wq.js";import"./index-BfsCuAkv.js";import"./base64Conver-DEMZeTZS.js";import"./index-BxcUCVnO.js";import"./onMountedOrActivated-Ckq_czNf.js";import"./cateApi-DFEt9aOF.js";import"./resourceApi-B8xLfLDg.js";import"./common-3Xrvf8hr.js";import"./imageEnum-BRgYKvjO.js";import"./sysOrgApi-CFC8W-xm.js";import"./BasicForm.vue_vue_type_style_index_0_lang-D1iGWYPy.js";import"./useForm-Co1sk-FH.js";import"./manageApi-CAkFcCVZ.js";import"./useWindowSizeFn-BgLRcrDN.js";import"./sortable.esm-DYEDn-UA.js";import"./componentMap-D2CAfZ8q.js";import"./fieldApi-OpzmEX1I.js";import"./handlingInfo-Bpj9BqbP.js";import"./nothingInfo-Dnr0Ztqx.js";import"./data-DngPkxRD.js";import"./processInfo.vue_vue_type_script_setup_true_lang-Ccg_JVye.js";import"./evaluationInfo.vue_vue_type_script_setup_true_lang-COY5BRhs.js";import"./index-xW8GmuVz.js";import"./useDescription-C9qiQKBU.js";import"./taskInfo--Ni2cUWu.js";const oe={class:"h-main"},se={class:"flex justify-between"},ae={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"},ke={key:2,class:"round-check",style:{borderColor:"#3366FF",color:"#3366FF"}},he={key:0,style:{color:"#01092a"}},ye={key:1,style:{color:"#ff552f"}},ve=Jt({__name:"listCard",setup(p){const u=Dt(),n=h({}),{createMessage:R}=Rt(),[B,{openModal:E}]=X(),[P,{openModal:w}]=X(),[g,{openDrawer:C}]=A(),[st,{openDrawer:at}]=A(),[it,{openDrawer:lt}]=A(),[nt,{reload:b,getSelectRowKeys:q}]=Et({api:Ut,rowKey:"id",columns:Tt,showIndexColumn:!1,pagination:!0,bordered:!0,clickToRowSelect:!1,rowSelection:{type:"checkbox"},actionColumn:{width:200,title:"操作",align:"left",dataIndex:"action"},beforeFetch:ut,showFooter:!0}),rt=h([{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=h(0),f=h([]),x=h({}),N=h(!1),$=h(!1),G=h(0),O=ot({type:0}),Q=h(!1),D=ot({}),H=h([{key:"taskStatus",dictCode:"biz_task_status"}]);Wt(()=>_(this,null,function*(){const o=yield Lt(H.value.map(t=>t.dictCode));for(const t in o){const i=H.value.filter(a=>a.dictCode==t)[0];D[i.key]=o[t]}n.value=u.getUserInfo}));function ut(o){return _(this,null,function*(){return yield _t(M({type:1},x.value)),M(J(M({},o),{orders:[],type:O.type}),x.value)})}function ct(){N.value=!0,$.value=!1}function pt(){N.value=!0,$.value=!0}function ft(o){K.value=o,O.type=o,b()}function mt(o){N.value=!1;const t=o.secondCateInfo;o.isImport?E(!0,{title:t.name+"导入",importUrl:jt,paramId:t.importUrl,exportUrl:()=>It.get({url:t.exportUrl})}):C(!0,{secondCateId:t.id,title:t.name})}function dt(o){lt(!0,{record:o})}function S(o,t){return _(this,null,function*(){switch(t){case"distributed":w(!0,{type:"distributed",record:o});break;case"transfer":w(!0,{type:"transfer",record:o});break;case"grab":w(!0,{type:"grab",record:o});break;case"evaluation":w(!0,{type:"evaluation",record:o});break;case"startCheck":yield At(o.id),R.success("开启稽核成功"),b();break;case"reviewFlow":w(!0,{type:"reviewFlow",record:o});break}})}function kt(){C(!1),b()}function ht(){const o=[];f.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)}),at(!0,{record:o})}function yt(o){return _(this,null,function*(){f.value=[];for(const t of Object.keys(o))o[t]&&Mt.forEach(i=>{i.field==t&&i.ifShow&&f.value.push({field:i.field,label:i.label,value:o[t],showVal:i.field==="status"?z(D.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})});f.value.forEach(t=>{x.value[t.field]=t.value}),yield b()})}function vt(o){return _(this,null,function*(){x.value={},o.type=="clear"&&(f.value=[]),o.type=="close"&&(f.value=f.value.filter(t=>{var i;return t.field!=((i=o.item)==null?void 0:i.field)})),f.value.forEach(t=>{x.value[t.field]=t.value}),yield b()})}function wt(){return _(this,null,function*(){yield b()})}Xt(()=>q(),o=>{o.length>0?Q.value=!0:Q.value=!1},{immediate:!0});function gt(){return _(this,null,function*(){const o=q(),t=yield Yt(o);Vt(t.base64,t.fileName,String(t.type).toLowerCase()),R.success("导出成功")})}function _t(o){return _(this,null,function*(){const t=yield qt(o);t&&(G.value=t)})}return(o,t)=>{const i=te("auth");return l(),c("div",oe,[y("div",se,[y("div",ae,[(l(!0),c(L,null,ee(rt.value,a=>U((l(),V(s(Zt),{bordered:!0,key:a.key,checked:K.value===a.key,onChange:e=>ft(a.key)},{default:d(()=>[a.key===1?(l(),c("div",ie,[r(s(tt),{count:G.value,size:"small"},{default:d(()=>[y("div",le,v(a.label),1)]),_:2},1032,["count"])])):(l(),c("div",ne,v(a.label),1))]),_:2},1032,["checked","onChange"])),[[i,a.auth]])),128))]),y("div",re,[U((l(),V(s(T),{type:"default",border:!1,size:"large",onClick:pt},{icon:d(()=>[r(j,{icon:"icon-sys-import_default|iconfont",size:20,color:"#01092A"})]),_:1})),[[i,["ssc:task:import"]]]),U((l(),V(s(T),{type:"default",border:!1,size:"large",onClick:ct,class:"ml-2 mr-2 btn-icon"},{icon:d(()=>[r(j,{icon:"icon-create|iconfont",size:20,color:"#01092A"})]),_:1})),[[i,["ssc:task:add"]]]),r(s(tt),{count:f.value.length},{default:d(()=>[r(s(T),{size:"large",onClick:t[0]||(t[0]=()=>ht())},{icon:d(()=>[r(j,{icon:"icon-filter|iconfont",size:18,color:"#3D4155"})]),_:1})]),_:1},8,["count"])])]),f.value.length?(l(),c("div",ue,[r(s(zt),{data:f.value,onClose:vt},null,8,["data"])])):k("",!0),y("div",ce,[r(s(Pt),{onRegister:s(nt),onRowClick:dt},{bodyCell:d(({column:a,record:e})=>[a.key==="color"?(l(),c("div",{key:0,style:F({backgroundColor:e.color,width:"20px",height:"20px"})},null,4)):k("",!0),a.key==="taskName"?(l(),c("div",pe,[y("div",{color:e.firstCateFontColor,style:F({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)])):k("",!0),a.key==="createTime"?(l(),c(L,{key:2},[I(v(s(W)(e.createTime)),1)],64)):k("",!0),a.key==="status"?(l(),c("div",de,[y("div",{style:F({backgroundColor:s(z)(D.taskStatus,e.status,"prefixColor"),color:"red",margin:"9px 8px 0 0",width:"6px",height:"6px",borderRadius:"3px"})},null,4),y("div",{style:F({color:s(z)(D.taskStatus,e.status,"fontColor")})},v(s(z)(D.taskStatus,e.status,"label")),5),e.checkColor?(l(),c("div",{key:0,class:"round-check",style:F({borderColor:e.checkColor,color:e.checkColor})},[r(s(et),{title:e.checkByNickname},{default:d(()=>t[3]||(t[3]=[I("稽")])),_:2},1032,["title"])],4)):k("",!0),e.reviewColor?(l(),c("div",{key:1,class:"round-check",style:F({borderColor:e.reviewColor,color:e.reviewColor})},"审",4)):k("",!0),e.reviewFlowStatus!="0"?(l(),c("div",ke,[r(s(et),{title:e.reviewFlowCreateByNickname},{default:d(()=>[I(v(e.reviewFlowStatus=="1"?"抢":"转"),1)]),_:2},1032,["title"])])):k("",!0)])):k("",!0),a.key==="lateTime"?(l(),c(L,{key:4},[e.overdue===0?(l(),c("span",he,"未逾期")):(l(),c("span",ye,"逾期"+v(e.lateTime)+"天",1))],64)):k("",!0),a.key==="deadLine"?(l(),c(L,{key:5},[I(v(s(W)(e.deadLine)),1)],64)):k("",!0),a.key==="action"?(l(),V(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:m=>{m.stopPropagation(),S(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:m=>{m.stopPropagation()},popConfirm:{title:"是否开启稽核",placement:"left",confirm:S.bind(null,e,"startCheck")}},{ifShow:e.status==="task_status_1"&&e.processBy===n.value.userId,tooltip:"转单",label:"转单",icon:"icon-zhuandan|iconfont",type:"primary",ghost:!0,onClick:m=>{m.stopPropagation(),S(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:m=>{m.stopPropagation(),S(e,"grab")}},{ifShow:e.reviewFlowStatus!=null&&e.reviewFlowStatus!="0"&&e.reviewFlowBy===n.value.userId,tooltip:"审核",label:"审核",icon:"icon-qiangdan|iconfont",type:"primary",ghost:!0,onClick:m=>{m.stopPropagation(),S(e,"reviewFlow")}},{ifShow:e.status==="task_status_3",tooltip:"评价",label:"评价",type:"primary",icon:"icon-pingjia|iconfont",ghost:!0,onClick:m=>{m.stopPropagation(),S(e,"evaluation")}}]},null,8,["actions"])):k("",!0)]),tableFooter:d(()=>[y("div",null,[r(s(T),{type:"primary",ghost:"",class:"btn btn-primary btn-sm",onClick:gt},{default:d(()=>t[4]||(t[4]=[I(" 导出 ")])),_:1})])]),_:1},8,["onRegister"])]),r(Kt,{open:N.value,isImport:$.value,onSuccess:mt},null,8,["open","isImport"]),r(s(Ht),{onRegister:s(B),onSuccess:wt},null,8,["onRegister"]),r(Gt,{onRegister:s(g),onSuccess:kt},null,8,["onRegister"]),r(Qt,{onRegister:s(it),onSuccess:t[1]||(t[1]=a=>s(b)())},null,8,["onRegister"]),r(Ot,{onRegister:s(P),onSuccess:t[2]||(t[2]=a=>s(b)())},null,8,["onRegister"]),r(Nt,{onRegister:s(st),onSuccess:yt},null,8,["onRegister"])])}}}),go=Bt(ve,[["__scopeId","data-v-74581f65"]]);export{go as default};