import{d as Q,Q as W,J as X,r as p,A as Z,b as $,a1 as j,o,c as b,k as e,B as t,a as l,a2 as E,F as C,i as O,a3 as L,N as Y,g as d,O as c,P as y,D as ee,a7 as ae,S as le,$ as te,R as se,T as re,U as oe,V as ne,W as pe,X as ue,Y as ie,Z as me}from"./index-CHTXMeh8.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as ce}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as fe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as _e}from"./formatTime-DG99nHw2.js";import{b as ge,d as be}from"./index-eJzt9aew.js";import{g as ye}from"./index-DYclHsjD.js";import{_ as we}from"./UserGroupForm.vue_vue_type_script_setup_true_lang-DvHITIAi.js";import"./index-DVe591HI.js";import"./color-DXkOL5Tu.js";import"./el-card-Bdk9qx7q.js";import"./Dialog.vue_vue_type_style_index_0_lang-DH0TiLYN.js";import"./constants-CuOBQ73z.js";const ke=Q({name:"BpmUserGroup",__name:"index",setup(ve){const S=W(),{t:A}=X(),w=p(!0),T=p(0),V=p([]),r=Z({pageNo:1,pageSize:10,name:null,status:null,createTime:[]}),h=p(),U=p([]),u=async()=>{w.value=!0;try{const i=await ge(r);V.value=i.list,T.value=i.total}finally{w.value=!1}},k=()=>{r.pageNo=1,u()},P=()=>{h.value.resetFields(),k()},N=p(),M=(i,s)=>{N.value.open(i,s)};return $(async()=>{await u(),U.value=await ye()}),(i,s)=>{const z=ae,f=le,B=te,F=se,R=re,v=oe,m=ne,H=pe,D=fe,n=ue,q=ce,G=ie,I=de,x=j("hasPermi"),J=me;return o(),b(C,null,[e(D,null,{default:t(()=>[e(H,{class:"-mb-15px",model:l(r),ref_key:"queryFormRef",ref:h,inline:!0,"label-width":"68px"},{default:t(()=>[e(f,{label:"\u7EC4\u540D",prop:"name"},{default:t(()=>[e(z,{modelValue:l(r).name,"onUpdate:modelValue":s[0]||(s[0]=a=>l(r).name=a),placeholder:"\u8BF7\u8F93\u5165\u7EC4\u540D",clearable:"",onKeyup:E(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[e(F,{modelValue:l(r).status,"onUpdate:modelValue":s[1]||(s[1]=a=>l(r).status=a),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(o(!0),b(C,null,O(l(L)(l(Y).COMMON_STATUS),a=>(o(),d(B,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(f,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(R,{modelValue:l(r).createTime,"onUpdate:modelValue":s[2]||(s[2]=a=>l(r).createTime=a),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),e(f,null,{default:t(()=>[e(m,{onClick:k},{default:t(()=>[e(v,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),e(m,{onClick:P},{default:t(()=>[e(v,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),y((o(),d(m,{type:"primary",plain:"",onClick:s[3]||(s[3]=a=>M("create"))},{default:t(()=>[e(v,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E ")]),_:1})),[[x,["bpm:user-group:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(D,null,{default:t(()=>[y((o(),d(G,{data:l(V)},{default:t(()=>[e(n,{label:"\u7F16\u53F7",align:"center",prop:"id"}),e(n,{label:"\u7EC4\u540D",align:"center",prop:"name"}),e(n,{label:"\u63CF\u8FF0",align:"center",prop:"description"}),e(n,{label:"\u6210\u5458",align:"center"},{default:t(a=>[(o(!0),b(C,null,O(a.row.userIds,_=>{var g;return o(),b("span",{key:_,class:"pr-5px"},ee((g=l(U).find(K=>K.id===_))==null?void 0:g.nickname),1)}),128))]),_:1}),e(n,{label:"\u72B6\u6001",align:"center",prop:"status"},{default:t(a=>[e(q,{type:l(Y).COMMON_STATUS,value:a.row.status},null,8,["type","value"])]),_:1}),e(n,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:l(_e)},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:t(a=>[y((o(),d(m,{link:"",type:"primary",onClick:_=>M("update",a.row.id)},{default:t(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[x,["bpm:user-group:update"]]]),y((o(),d(m,{link:"",type:"danger",onClick:_=>(async g=>{try{await S.delConfirm(),await be(g),S.success(A("common.delSuccess")),await u()}catch{}})(a.row.id)},{default:t(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[x,["bpm:user-group:delete"]]])]),_:1})]),_:1},8,["data"])),[[J,l(w)]]),e(I,{total:l(T),page:l(r).pageNo,"onUpdate:page":s[4]||(s[4]=a=>l(r).pageNo=a),limit:l(r).pageSize,"onUpdate:limit":s[5]||(s[5]=a=>l(r).pageSize=a),onPagination:u},null,8,["total","page","limit"])]),_:1}),e(we,{ref_key:"formRef",ref:N,onSuccess:u},null,512)],64)}}});export{ke as default};