index.773e24ec.js 3.0 KB

1
  1. import{w as g,ag as f,x as B,ad as k,u as s,al as m,aS as C,ae as w,_ as E,d as b,r as F,o as R,c as x,l,C as D,b as P,bt as S,bu as M}from"./index.42bf163d.js";import{u as A}from"./use-page-search.d97bdd00.js";import{a as h}from"./status.d6b2a53d.js";import{s as v,h as G,a as U,u as r,G as Y}from"./group-modal.058cca45.js";function H({pageName:e,callback:t,contentConfig:a}){const o=g([]),i=f(()=>a),p=f(()=>({list:o.value.some(u=>u==="001"),create:o.value.some(u=>u==="002"),detail:o.value.some(u=>u==="007")}));return B(()=>{o.value=k().getMenuActions(e),t&&t(s(o))}),{contentConfigRef:i,permissions:o,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:h},{field:"type",type:"select",placeholder:"\u5171\u4EAB\u7C7B\u578B",options:v}]},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:r.name},{label:"\u7EC4\u6210\u5458",prop:"nickname"},{label:"\u72B6\u6001",prop:r.status,cellRenderer({row:e}){return m(C,{type:e.status==="0"?"warning":""},{default:()=>{var t;return((t=h.find(a=>a.value===e[r.status]))==null?void 0:t.label)||"--"}})}},{label:"\u5171\u4EAB\u7C7B\u578B",prop:r.type,cellRenderer({row:e}){return m(C,null,{default:()=>{var t;return((t=v.find(a=>a.value===e[r.type]))==null?void 0:t.label)||"--"}})}},{label:"\u5907\u6CE8",prop:r.remark},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addTime",formatter:({addtime:e})=>w(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"],isRequesetArray:!0,columns:T,apis:{httpList:G,httpStatus:U,httpUpdate:!0,httpAdd:!0}};const j={class:"main role"},I={"w-full":""},L={name:"userGroup"},V=b({...L,setup(e){const t=g(null),{pageContentRef:a,handleResetClick:o,handleSearchClick:i}=A(),{permission:p,contentConfigRef:u}=H({pageName:"userGroup",contentConfig:_,callback:d=>_.powers=d});return(d,n)=>{const y=F("PagePower");return R(),x("div",j,[l(y,{"is-show":s(p).list},{default:D(()=>[P("div",I,[l(s(S),{"form-config":s(N),onSearchBtnClick:s(i),onResetBtnClick:s(o)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),l(s(M),{ref_key:"pageContentRef",ref:a,"content-config":s(u),onCreateBtnClick:n[0]||(n[0]=()=>t.value.onDisplay()),onUpdateBtnClick:n[1]||(n[1]=({id:c})=>t.value.onDisplay(c)),onPreviewBtnClick:n[2]||(n[2]=({id:c})=>t.value.onDisplay(c,!0))},null,8,["content-config"])])]),_:1},8,["is-show"]),l(Y,{ref_key:"groupModalRef",ref:t,onReload:n[3]||(n[3]=()=>s(o)())},null,512)])}}});var O=E(V,[["__scopeId","data-v-47d078ac"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/interest/userGroup/index.vue"]]);export{O as default};