listCard-Bdc5NWD4.js 11 KB

1
  1. var bt=Object.defineProperty,Ct=Object.defineProperties;var St=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable;var Y=(p,u,i)=>u in p?bt(p,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[u]=i,M=(p,u)=>{for(var i in u||(u={}))Ft.call(u,i)&&Y(p,i,u[i]);if(H)for(var i of H(u))xt.call(u,i)&&Y(p,i,u[i]);return p},Z=(p,u)=>Ct(p,St(u));var _=(p,u,i)=>new Promise((R,B)=>{var V=g=>{try{w(i.next(g))}catch(C){B(C)}},E=g=>{try{w(i.throw(g))}catch(C){B(C)}},w=g=>g.done?R(g.value):Promise.resolve(g.value).then(V,E);w((i=i.apply(p,u)).next())});import{aj as Dt,a as $,aG as T,b8 as J,bp as z,an as It,u as Rt,_ as Bt}from"./entry/index-4XNSgt5c.js";import{F as Nt,s as Mt,c as Tt}from"./FormDrawerSift-VIzyPwje.js";import{u as W}from"./index-Dl4GtDev.js";/* empty css */import{S as zt}from"./Sift-Cv3vi4aF.js";import{b as Lt}from"./index-CCW50nzN.js";import{a as Vt}from"./download-D-M4qjhg.js";import{u as j}from"./index-D6lmkTGz.js";import{u as Et,_ as Pt}from"./useTable-Cke9Raoc.js";import{_ as $t}from"./TableImg.vue_vue_type_style_index_0_lang-DC73IL7M.js";import{o as jt,s as At,p as Ut,q as qt}from"./taskApi-BaS1cLJU.js";import Kt from"./selFormModal-BGDnBLeK.js";import Gt from"./formDrawer-BM3RM6NI.js";import Ot from"./actionFormModal-Cax4_BhZ.js";import Qt from"./detailFormDrawer-CZ-99hIk.js";import{I as Ht}from"./ImportModal-kyc9dM4c.js";import{i as Yt}from"./personalApi-Xwhyf8tf.js";import{Y as X,be as Zt,T as tt}from"./antd-BfqWtMX3.js";import{d as Jt,f as h,r as et,o as Wt,w as Xt,n as te,Z as n,_ as c,$ as y,F as L,a7 as ee,m as ot,a4 as A,a5 as d,k as r,u as a,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-BwbKrhyf.js";import"./FormItem.vue_vue_type_script_lang-BGJ--Lrb.js";import"./helper-BhqxyLmO.js";import"./index-Dtv0YQRN.js";import"./index-B_mnQPUN.js";import"./uuid-BUBnBT7J.js";import"./useSortable-Cydyjtko.js";import"./index-DxnXgBLu.js";import"./IconPicker.vue_vue_type_script_setup_true_lang-Bq0CH8Dl.js";import"./copyTextToClipboard-B8vsl9wq.js";import"./index-C2u98gRL.js";import"./base64Conver-DEMZeTZS.js";import"./index-Ci1ux3rO.js";import"./onMountedOrActivated-Ckq_czNf.js";import"./cateApi-nuiBgRcX.js";import"./resourceApi-DG2FY_VE.js";import"./common-DlO4dbu_.js";import"./imageEnum-BRgYKvjO.js";import"./sysOrgApi-Dfx4pCiQ.js";import"./BasicForm.vue_vue_type_style_index_0_lang-BVWU-rWE.js";import"./useForm-Dg3SyTYa.js";import"./manageApi-DuhlRsiR.js";import"./useWindowSizeFn-DxBDwLJC.js";import"./sortable.esm-DYEDn-UA.js";import"./componentMap-CMo-DyMk.js";import"./fieldApi-D6vHvhSc.js";import"./handlingInfo-DuIEaavF.js";import"./nothingInfo-5P8Xj2TR.js";import"./data-BXynkIsw.js";import"./processInfo.vue_vue_type_script_setup_true_lang-BnJx9Ok2.js";import"./evaluationInfo.vue_vue_type_script_setup_true_lang-Cg7JvcQN.js";import"./index-BXD5u6sx.js";import"./useDescription-CEAdcztZ.js";import"./taskInfo-BTHShfpX.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"},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(),i=h({}),{createMessage:R}=Rt(),[B,{openModal:V}]=W(),[E,{openModal:w}]=W(),[g,{openDrawer:C}]=j(),[at,{openDrawer:st}]=j(),[it,{openDrawer:lt}]=j(),[nt,{reload:b,getSelectRowKeys:U}]=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"]}]),q=h(0),f=h([]),x=h({}),N=h(!1),P=h(!1),K=h(0),G=et({type:0}),O=h(!1),D=et({}),Q=h([{key:"taskStatus",dictCode:"biz_task_status"}]);Wt(()=>_(this,null,function*(){const o=yield Lt(Q.value.map(t=>t.dictCode));for(const t in o){const l=Q.value.filter(s=>s.dictCode==t)[0];D[l.key]=o[t]}i.value=u.getUserInfo}));function ut(o){return _(this,null,function*(){return yield _t(M({type:1},x.value)),M(Z(M({},o),{orders:[],type:G.type}),x.value)})}function ct(){N.value=!0,P.value=!1}function pt(){N.value=!0,P.value=!0}function ft(o){q.value=o,G.type=o,b()}function mt(o){N.value=!1;const t=o.secondCateInfo;o.isImport?V(!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 l={field:t.field,value:t.value};if(t.field=="orgId"){const s={field:"orgName",value:t.showVal};o.push(s)}if(t.field=="secondCateld"){const s={field:"secondCateName",value:t.showVal};o.push(s)}o.push(l)}),st(!0,{record:o})}function yt(o){return _(this,null,function*(){f.value=[];for(const t of Object.keys(o))o[t]&&Mt.forEach(l=>{l.field==t&&l.ifShow&&f.value.push({field:l.field,label:l.label,value:o[t],showVal:l.field==="status"?z(D.taskStatus,o[t],"label"):l.field==="overdue"?o[t]==="1"?"逾期":"未逾期":l.field==="orgId"?o.orgName:l.field==="secondCateId"?o.secondCateName:o[t],type:l.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 l;return t.field!=((l=o.item)==null?void 0:l.field)})),f.value.forEach(t=>{x.value[t.field]=t.value}),yield b()})}function wt(){return _(this,null,function*(){yield b()})}Xt(()=>U(),o=>{o.length>0?O.value=!0:O.value=!1},{immediate:!0});function gt(){return _(this,null,function*(){const o=U(),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&&(K.value=t)})}return(o,t)=>{const l=te("auth");return n(),c("div",oe,[y("div",ae,[y("div",se,[(n(!0),c(L,null,ee(rt.value,s=>ot((n(),A(a(Zt),{bordered:!0,key:s.key,checked:q.value===s.key,onChange:e=>ft(s.key)},{default:d(()=>[s.key===1?(n(),c("div",ie,[r(a(X),{count:K.value,size:"small"},{default:d(()=>[y("div",le,v(s.label),1)]),_:2},1032,["count"])])):(n(),c("div",ne,v(s.label),1))]),_:2},1032,["checked","onChange"])),[[l,s.auth]])),128))]),y("div",re,[r(a(T),{type:"default",border:!1,size:"large",onClick:pt},{icon:d(()=>[r($,{icon:"icon-sys-import_default|iconfont",size:20,color:"#01092A"})]),_:1}),ot((n(),A(a(T),{type:"default",border:!1,size:"large",onClick:ct,class:"ml-2 mr-2 btn-icon"},{icon:d(()=>[r($,{icon:"icon-create|iconfont",size:20,color:"#01092A"})]),_:1})),[[l,["ssc:task:add"]]]),r(a(X),{count:f.value.length},{default:d(()=>[r(a(T),{size:"large",onClick:t[0]||(t[0]=()=>ht())},{icon:d(()=>[r($,{icon:"icon-filter|iconfont",size:18,color:"#3D4155"})]),_:1})]),_:1},8,["count"])])]),f.value.length?(n(),c("div",ue,[r(a(zt),{data:f.value,onClose:vt},null,8,["data"])])):k("",!0),y("div",ce,[r(a(Pt),{onRegister:a(nt),onRowClick:dt},{bodyCell:d(({column:s,record:e})=>[s.key==="color"?(n(),c("div",{key:0,style:F({backgroundColor:e.color,width:"20px",height:"20px"})},null,4)):k("",!0),s.key==="taskName"?(n(),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),s.key==="createTime"?(n(),c(L,{key:2},[I(v(a(J)(e.createTime)),1)],64)):k("",!0),s.key==="status"?(n(),c("div",de,[y("div",{style:F({backgroundColor:a(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:a(z)(D.taskStatus,e.status,"fontColor")})},v(a(z)(D.taskStatus,e.status,"label")),5),e.checkColor?(n(),c("div",{key:0,class:"round-check",style:F({borderColor:e.checkColor,color:e.checkColor})},[r(a(tt),{title:e.checkByNickname},{default:d(()=>t[3]||(t[3]=[I("稽")])),_:2},1032,["title"])],4)):k("",!0),e.reviewColor?(n(),c("div",{key:1,class:"round-check",style:F({borderColor:e.reviewColor,color:e.reviewColor})},"审",4)):k("",!0),e.reviewFlowStatus!="0"?(n(),c("div",ke,[r(a(tt),{title:e.reviewFlowCreateByNickname},{default:d(()=>[I(v(e.reviewFlowStatus=="1"?"抢":"转"),1)]),_:2},1032,["title"])])):k("",!0)])):k("",!0),s.key==="lateTime"?(n(),c(L,{key:4},[e.overdue===0?(n(),c("span",he,"未逾期")):(n(),c("span",ye,"逾期"+v(e.lateTime)+"天",1))],64)):k("",!0),s.key==="deadLine"?(n(),c(L,{key:5},[I(v(a(J)(e.deadLine)),1)],64)):k("",!0),s.key==="action"?(n(),A(a($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===i.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===i.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(a(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:P.value,onSuccess:mt},null,8,["open","isImport"]),r(a(Ht),{onRegister:a(B),onSuccess:wt},null,8,["onRegister"]),r(Gt,{onRegister:a(g),onSuccess:kt},null,8,["onRegister"]),r(Qt,{onRegister:a(it),onSuccess:t[1]||(t[1]=s=>a(b)())},null,8,["onRegister"]),r(Ot,{onRegister:a(E),onSuccess:t[2]||(t[2]=s=>a(b)())},null,8,["onRegister"]),r(Nt,{onRegister:a(at),onSuccess:yt},null,8,["onRegister"])])}}}),go=Bt(ve,[["__scopeId","data-v-8b7f00d5"]]);export{go as default};