import{x as h,ah as f,y as B,ad as k,m as o,by as g,am as m,aR as C,ae as E,_ as b,d as F,bd as R,r as w,o as x,c as D,l as r,D as P,h as M,bE as S,bF as A}from"./index.js";import{s as y,h as G,a as U,u as l,G as Y}from"./group-modal.ecf5a4.js";function H({pageName:e,callback:t,contentConfig:a}){const s=h([]),i=f(()=>a),p=f(()=>({list:s.value.some(u=>u==="001"),create:s.value.some(u=>u==="002"),detail:s.value.some(u=>u==="007")}));return B(()=>{s.value=k().getMenuActions(e),t&&t(o(s))}),{contentConfigRef:i,permissions:s,permission:p}}const N={formItems:[{field:"title",type:"input",placeholder:"\u7EC4\u540D\u79F0"},{field:"nickname",type:"input",placeholder:"\u7EC4\u6210\u5458"},{field:"status",type:"select",placeholder:"\u5F53\u524D\u72B6\u6001",options:g},{field:"type",type:"select",placeholder:"\u5171\u4EAB\u7C7B\u578B",options:y}]},T=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",width:70,hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u7EC4\u540D\u79F0",prop:l.name},{label:"\u7EC4\u6210\u5458",prop:"nickname"},{label:"\u72B6\u6001",prop:l.status,cellRenderer({row:e}){return m(C,{type:e.status==="0"?"warning":""},{default:()=>{var t;return((t=g.find(a=>a.value===e[l.status]))==null?void 0:t.label)||"--"}})}},{label:"\u5171\u4EAB\u7C7B\u578B",prop:l.type,cellRenderer({row:e}){return m(C,null,{default:()=>{var t;return((t=y.find(a=>a.value===e[l.type]))==null?void 0:t.label)||"--"}})}},{label:"\u5907\u6CE8",prop:l.remark},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addTime",formatter:({addtime:e})=>E(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:120,slot:"operation"}],_={title:"\u7528\u6237\u7EC4",powers:["001","002","003","004","005","006","007","008"],isRequestArray:!0,columns:T,apis:{httpList:G,httpStatus:U,httpUpdate:!0,httpAdd:!0}};const j={class:"main role"},I={"w-full":""},L={name:"userGroup"},V=F({...L,setup(e){const t=h(null),{pageContentRef:a,handleResetClick:s,handleSearchClick:i}=R(),{permission:p,contentConfigRef:u}=H({pageName:"userGroup",contentConfig:_,callback:c=>_.powers=c});return(c,n)=>{const v=w("PagePower");return x(),D("div",j,[r(v,{"is-show":o(p).list},{default:P(()=>[M("div",I,[r(o(S),{"form-config":o(N),onSearchBtnClick:o(i),onResetBtnClick:o(s)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),r(o(A),{ref_key:"pageContentRef",ref:a,"content-config":o(u),onCreateBtnClick:n[0]||(n[0]=()=>t.value.onDisplay()),onUpdateBtnClick:n[1]||(n[1]=({id:d})=>t.value.onDisplay(d)),onPreviewBtnClick:n[2]||(n[2]=({id:d})=>t.value.onDisplay(d,!0))},null,8,["content-config"])])]),_:1},8,["is-show"]),r(Y,{ref_key:"groupModalRef",ref:t,onReload:n[3]||(n[3]=()=>o(s)())},null,512)])}}});var J=b(V,[["__scopeId","data-v-47d078ac"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/interest/userGroup/index.vue"]]);export{J as default};
