import{G as q,H as G,L as H,M as K,N as Q,O as Z,B as z,C as J,w as W,D as X}from"./element-plus.2acb577d.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as ee,b as te}from"./index.81df6f20.js";import{u as oe}from"./usePaging.23706826.js";import{u as ae}from"./useDictOptions.4fbfb4d7.js";import{b as le,e as ue,a as se}from"./oa_flow.d67349c4.js";import{_ as ne}from"./edit.vue_vue_type_script_setup_true_name_flowEdit_lang.a74f1bf7.js";import{d as re}from"./department.23a87470.js";import{d as h,s as ie,r as y,Z as pe,am as me,o as s,c as V,U as t,L as a,u as o,T as de,a9 as ce,K as p,R as d,M as _,a as x,i as _e,Q as fe,n as L}from"./@vue.821a47ec.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.6bfd3540.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";import"./dialogTableConfig.dc7bff5e.js";import"./oa_flow_type.b60fa00e.js";import"./oa_examine_temp_item.f1738798.js";import"./oaSelfExamine.ed02ba3a.js";import"./index.f292cd50.js";import"./index.vue_vue_type_style_index_0_lang.9e5f7fb0.js";const we={class:"mt-4"},ve={class:"flex mt-4 justify-end"},be=h({name:"oaFlowLists"}),pt=h({...be,setup(Be){const f=ie(),w=y(!1),n=pe({name:"",check_type:"",type:""}),k=y([]),$=u=>{k.value=u.map(({id:e})=>e)},{dictData:C}=ae("oa_approve_cate"),{pager:c,getLists:v,resetParams:N,resetPage:O}=oe({fetchFun:se,params:n}),P=async()=>{var u;w.value=!0,await L(),(u=f.value)==null||u.open("add")},R=async u=>{var b,i;let e=await le({id:u});w.value=!0,await L(),(b=f.value)==null||b.open("edit"),(i=f.value)==null||i.setFormData(e)},D=async u=>{await ee.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ue({id:u}),v()},F=y([]);return(async()=>{const u=await re();F.value=u})(),v(),(u,e)=>{const b=z,i=J,B=q,g=G,m=W,S=X,A=H,T=te,r=K,U=Q,I=Y,E=me("perms"),M=Z;return s(),V("div",null,[t(A,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(S,{class:"mb-[-16px]",model:o(n),inline:""},{default:a(()=>[t(i,{label:"\u5BA1\u6279\u6D41\u540D\u79F0",prop:"name"},{default:a(()=>[t(b,{class:"w-[280px]",modelValue:o(n).name,"onUpdate:modelValue":e[0]||(e[0]=l=>o(n).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u6D41\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(i,{label:"\u6D41\u7A0B\u7C7B\u578B",prop:"check_type"},{default:a(()=>[t(g,{class:"w-[280px]",modelValue:o(n).check_type,"onUpdate:modelValue":e[1]||(e[1]=l=>o(n).check_type=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6D41\u7A0B\u7C7B\u578B"},{default:a(()=>[t(B,{label:"\u56FA\u5B9A\u5BA1\u6279",value:1}),t(B,{label:"\u81EA\u7531\u5BA1\u6279\u4EBA",value:2}),t(B,{label:"\u53EF\u56DE\u9000\u5BA1\u6279",value:3})]),_:1},8,["modelValue"])]),_:1}),t(i,{label:" \u5E94\u7528\u6A21\u5757",prop:"type"},{default:a(()=>[t(g,{modelValue:o(n).type,"onUpdate:modelValue":e[2]||(e[2]=l=>o(n).type=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5E94\u7528\u6A21\u5757",class:"flex-1 w-[280px]"},{default:a(()=>[(s(!0),V(de,null,ce(o(C).oa_approve_cate,l=>(s(),p(B,{key:l.value,label:l.name,value:parseInt(l.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(i,null,{default:a(()=>[t(m,{type:"primary",onClick:o(O)},{default:a(()=>e[6]||(e[6]=[d("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(m,{onClick:o(N)},{default:a(()=>e[7]||(e[7]=[d("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((s(),p(A,{class:"!border-none",shadow:"never"},{default:a(()=>[_((s(),p(m,{type:"primary",onClick:P},{icon:a(()=>[t(T,{name:"el-icon-Plus"})]),default:a(()=>[e[8]||(e[8]=d(" \u65B0\u589E "))]),_:1})),[[E,["works.bgsp.oa_flow/add"]]]),_((s(),p(m,{disabled:!o(k).length,onClick:e[3]||(e[3]=l=>D(o(k)))},{default:a(()=>e[9]||(e[9]=[d(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[E,["works.bgsp.oa_flow/delete"]]]),x("div",we,[t(U,{data:o(c).lists,onSelectionChange:$},{default:a(()=>[t(r,{type:"selection",width:"55"}),t(r,{label:"\u5BA1\u6279\u6D41\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),t(r,{label:"\u6D41\u7A0B\u7C7B\u578B",prop:"check_type_text","show-overflow-tooltip":""}),t(r,{label:"\u5E94\u7528\u6A21\u5757",prop:"type_text","show-overflow-tooltip":""}),t(r,{label:"\u5E94\u7528\u5BA1\u6279\u7C7B\u578B",prop:"flow_cate_name","show-overflow-tooltip":""}),t(r,{label:"\u5E94\u7528\u90E8\u95E8",prop:"department_names","show-overflow-tooltip":""}),t(r,{label:"\u6284\u9001\u4EBA",prop:"copy_user_names","show-overflow-tooltip":""}),t(r,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((s(),p(m,{type:"primary",link:"",onClick:j=>R(l.id)},{default:a(()=>e[10]||(e[10]=[d(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[E,["works.bgsp.oa_flow/edit"]]]),_((s(),p(m,{type:"danger",link:"",onClick:j=>D(l.id)},{default:a(()=>e[11]||(e[11]=[d(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[E,["works.bgsp.oa_flow/delete"]]])]),_:1})]),_:1},8,["data"])]),x("div",ve,[t(I,{modelValue:o(c),"onUpdate:modelValue":e[4]||(e[4]=l=>_e(c)?c.value=l:null),onChange:o(v)},null,8,["modelValue","onChange"])])]),_:1})),[[M,o(c).loading]]),o(w)?(s(),p(ne,{key:0,ref_key:"editRef",ref:f,deptList:o(F),"dict-data":o(C),onSuccess:o(v),onClose:e[5]||(e[5]=l=>w.value=!1)},null,8,["deptList","dict-data","onSuccess"])):fe("",!0)])}}});export{pt as default};