/* empty css             *//* empty css                   */import{_ as e}from"./index-9f9af49f.js";import{_ as a}from"./search.vue_vue_type_script_setup_true_lang-72910575.js";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang-66f33117.js";/* empty css                        *//* empty css                    *//* empty css               */import"./el-tooltip-4ed993c7.js";/* empty css                  *//* empty css                     *//* empty css                  *//* empty css                     *//* empty css                 */import t from"./create-d7c490e4.js";import i from"./detail-2a198327.js";import{u as s}from"./useGetList-07470d8e.js";import{c as r}from"./index-f8aa1066.js";/* empty css                 *//* empty css                   */import"./http-ffb58baa.js";/* empty css                   */import{d as o,m as n,at as u,p,x as m,ao as c,o as d,c as f,e as j,a as v,w as b,f as _,X as g,l as h,b as y,a7 as x,a5 as w,aD as V,a3 as k,a4 as U,U as C,a8 as z,a9 as G,a0 as P,av as T,aw as B,_ as q}from"./index-0ffeeea6.js";/* empty css                  */import"./index-44ccf907.js";/* empty css                      *//* empty css                  *//* empty css                    *//* empty css                *//* empty css                       *//* empty css                 */import"./configPublicPlus-fc7b9971.js";/* empty css                          */import"./index-5ea39eae.js";import"./index-7475c2a5.js";const I=e=>(T("data-v-5803a388"),e=e(),B(),e),O={class:"flex flex-col justify-between w-full sm:flex-row"},A={class:"w-full"},D={class:"table-default"},E={class:"pt-5 pl-2"},F=I((()=>j("br",null,null,-1))),H=I((()=>j("br",null,null,-1))),L=q(o({__name:"index",setup(o){const T=n(!1),B=n(!1),q=n({}),I=n("新增"),{data:L,query:M,search:N,reset:S,loading:X}=s("audienceManage/userGroup/list");u("rolesIdentify");const $=p((()=>{var e;return null==(e=L.value)?void 0:e.data})),J=n([]),K=e=>{J.value=e},Q=(e,a)=>{var l;switch(q.value=a,e){case"createVisible":T.value=!0,(null==(l=q.value)?void 0:l.id)?I.value="编辑":I.value="新增";break;case"configPublicVisible":B.value=!0}},R=()=>{M.value=Object.assign({page:M.value.page,limit:M.value.limit,miniprogram_id:M.value.miniprogram_id}),N()},W=()=>{if(J.value.length<=0)return w.warning("至少选择一条数据");{const e="确定批量删除吗？";V.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{const e=J.value.map((e=>e.id));r({ids:e}).then((e=>{w.success(e.message),N()}))})).catch((()=>{}))}};return m((()=>{N()})),(s,o)=>{const n=k,u=U,p=C,m=z,L=G,S=l,J=a,Y=e,Z=c("action"),ee=P;return d(),f("div",O,[j("div",A,[v(J,{search:_(N),reset:R},{body:b((()=>[v(u,{label:"人群包名称"},{default:b((()=>[v(n,{placeholder:"请输入人群包名称",modelValue:_(M).name,"onUpdate:modelValue":o[0]||(o[0]=e=>_(M).name=e),clearable:""},null,8,["modelValue"])])),_:1})])),content:b((()=>[j("div",D,[j("div",E,[g((d(),h(p,{type:"primary",size:"default",onClick:o[1]||(o[1]=e=>Q("createVisible",null))},{default:b((()=>[y("新增")])),_:1})),[[Z,"audience.UserGroup.add"]]),g((d(),h(p,{size:"default",onClick:W},{default:b((()=>[y("批量删除")])),_:1})),[[Z,"audience.UserGroup.delete"]])]),g((d(),h(L,{data:_($),class:"mt-3",onSelectionChange:K},{default:b((()=>[v(m,{type:"selection",width:"80"}),v(m,{prop:"name",label:"人群包名称","min-width":"200"}),v(m,{prop:"created_at",label:"创建时间","min-width":"200"}),v(m,{prop:"remark",label:"备注","min-width":"200"}),v(m,{label:"操作",width:"200",fixed:"right"},{default:b((e=>[g((d(),h(p,{link:"",type:"primary",size:"small",onClick:a=>Q("configPublicVisible",e.row)},{default:b((()=>[y("查看")])),_:2},1032,["onClick"])),[[Z,"audience.UserGroup.detail"]]),F,g((d(),h(p,{link:"",type:"primary",size:"small",onClick:a=>{return l=e.row,void V.confirm("确定要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{r({ids:[l.id]}).then((e=>{w.success(e.message),N()}))})).catch((()=>{}));var l}},{default:b((()=>[y("删除")])),_:2},1032,["onClick"])),[[Z,"audience.UserGroup.delete"]]),H])),_:1})])),_:1},8,["data"])),[[ee,_(X)]]),v(S)])])),_:1},8,["search"]),v(Y,{modelValue:_(T),"onUpdate:modelValue":o[3]||(o[3]=e=>x(T)?T.value=e:null),title:_(I),width:"1000px","destroy-on-close":""},{default:b((()=>[v(t,{onClose:o[2]||(o[2]=e=>(e=>{switch(e){case"createVisible":T.value=!1;break;case"configPublicVisible":B.value=!1}N()})("createVisible")),primary:_(q)},null,8,["primary"])])),_:1},8,["modelValue","title"]),v(Y,{modelValue:_(B),"onUpdate:modelValue":o[4]||(o[4]=e=>x(B)?B.value=e:null),width:"900px",title:"人群包详情","destroy-on-close":""},{default:b((()=>[v(i,{primary:_(q)},null,8,["primary"])])),_:1},8,["modelValue"])])])}}}),[["__scopeId","data-v-5803a388"]]);export{L as default};
