import{e as F,b as p}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{a as h,b as D,c as E,d as I,g as A}from"./check-67999655-1782572373740v=1.0.0.js";import{g as n,E as a}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{c as y,r as B}from"./vendor-866bb149-1782572373740v=1.0.0.js";const S=()=>{const i=F(),o=p(),r=e=>{let t=!1;const s=i.userInfo;return e.auditType==="personal"&&(t=e.auditRolePersIds.split(",").map(Number).includes(s.loginId)),e.auditType==="role"&&(t=e.auditRolePersIds.split(",").filter(u=>new Set(s.loginRoleIdList).has(u)).length>0),e.auditType==="orgs"&&(t=e.auditAreaLevelId==s.levelId),t&&e.auditStatus=="auditing"},l=e=>{const t=i.userInfo;return{loginId:t.loginId,loginRoleIdList:t.loginRoleIdList,auditType:e.auditType,auditRolePersIds:e.auditRolePersIds}},d=e=>new Promise(t=>{n.prompt("\u5907\u6CE8","\u901A\u8FC7",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88"}).then(async({value:s})=>{e.auditFailureCause=s;let u=await h(e);u.code===0?(a.success("\u64CD\u4F5C\u6210\u529F"),t(!0)):(a.warning(u.msg),t(!1))}).catch(()=>{t(!1)})}),m=e=>new Promise(t=>{let s=` \u662F\u5426\u6279\u91CF\u901A\u8FC7\u5F53\u524D ${e.bizContentId.length}\u6761\u6570\u636E`;n.confirm(s,"\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88"}).then(async()=>{let u=await D(e);u.code===0?(a.success("\u64CD\u4F5C\u6210\u529F"),t(!0)):(a.warning(u.msg),t(!1))}).catch(()=>{t(!1)})}),f=e=>new Promise(t=>{n.prompt("\u5907\u6CE8","\u9A73\u56DE",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88"}).then(async({value:s})=>{e.auditFailureCause=s;let u=await E(e);u.code===0?(a.success("\u64CD\u4F5C\u6210\u529F"),t(!0)):(a.warning(u.msg),t(!1))}).catch(()=>{t(!1)})}),g=e=>new Promise(t=>{let s=` \u662F\u5426\u6279\u91CF\u9A73\u56DE\u5F53\u524D ${e.bizContentId.length}\u6761\u6570\u636E`;n.confirm(s,"\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88"}).then(async()=>{let u=I(e);u.code===0?(a.success("\u64CD\u4F5C\u6210\u529F"),t(!0)):(a.warning(u.msg),t(!1))}).catch(()=>{t(!1)})}),C=y(()=>o.getEnumObjByKey("auditStatus")),c=B([]);return{judgeUserIsCheck:r,confirmFn:d,rejectFn:f,auditStatusMap:C,getAuditEntityList:async(e,t)=>{let u=await A({bizConfType:e,bizContentId:t});u.code==0&&(c.value=u.data?u.data:[])},getJudgeUserCheckConfig:l,progressList:c,batchConfirmFn:m,batchRejectFn:g}};export{S as u};
