import{Q,R as q,D as K,C as Z,w as z,F as G,I as H,L as J,M as W,N as X}from"./element-plus.3f92981f.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.d38d0264.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.00a5f88e.js";import{f as te,b as oe}from"./index.818eeb97.js";import{u as ae}from"./usePaging.63ca32b2.js";import{a as le}from"./useDictOptions.35d9180f.js";import{_ as ne,a as ie,b as se}from"./edit.vue_vue_type_script_setup_true_name_appNoticeEdit_lang.85105070.js";import"./lodash.e8662b6c.js";import{d as B,s as pe,r as I,Z as ue,am as re,o as s,c as D,U as e,L as o,u as t,T as de,a9 as me,K as p,R as d,M as _,a as y,j as ce,Q as _e,n as V}from"./@vue.90bde458.js";import"./lodash-es.151604d4.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.c9321399.js";import"./@element-plus.637a59d4.js";import"./dayjs.75ab1bbe.js";import"./axios.71c4c5b2.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.1051b4fa.js";import"./pinia.8db5076b.js";import"./css-color-function.7400b82e.js";import"./color.be84bc95.js";import"./clone.ec2f9c3f.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.8f68f559.js";import"./vue-clipboard3.053a92aa.js";import"./clipboard.9dddce66.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.f76f30bc.js";import"./index.387e6335.js";const fe={class:"mt-4"},ve={class:"flex mt-4 justify-end"},be=B({name:"appNoticeLists"}),ot=B({...be,setup(we){const f=pe(),v=I(!1),u=ue({AppId:"",Title:""}),h=I([]),A=n=>{h.value=n.map(({Id:a})=>a)},{dictData:C}=le("game_appid"),{pager:m,getLists:b,resetParams:T,resetPage:x}=ae({fetchFun:se,params:u}),N=async()=>{var n;v.value=!0,await V(),(n=f.value)==null||n.open("add")},$=async n=>{var a,c;v.value=!0,await V(),(a=f.value)==null||a.open("edit"),(c=f.value)==null||c.setFormData(n)},g=async n=>{await te.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ie({Id:n}),b()};return b(),(n,a)=>{const c=Q,L=q,E=K,R=Z,r=z,P=G,k=H,S=oe,i=J,U=ee,j=W,M=Y,w=re("perms"),O=X;return s(),D("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(P,{class:"mb-[-16px]",model:t(u),inline:""},{default:o(()=>[e(E,{label:"\u6E38\u620FID",prop:"AppId"},{default:o(()=>[e(L,{class:"w-[280px]",modelValue:t(u).AppId,"onUpdate:modelValue":a[0]||(a[0]=l=>t(u).AppId=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6E38\u620FID"},{default:o(()=>[e(c,{label:"\u5168\u90E8",value:""}),(s(!0),D(de,null,me(t(C).game_appid,(l,F)=>(s(),p(c,{key:F,label:l.name,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(E,{label:"\u6807\u9898",prop:"Title"},{default:o(()=>[e(R,{class:"w-[280px]",modelValue:t(u).Title,"onUpdate:modelValue":a[1]||(a[1]=l=>t(u).Title=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6807\u9898"},null,8,["modelValue"])]),_:1}),e(E,null,{default:o(()=>[e(r,{type:"primary",onClick:t(x)},{default:o(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(r,{onClick:t(T)},{default:o(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((s(),p(k,{class:"!border-none",shadow:"never"},{default:o(()=>[_((s(),p(r,{type:"primary",onClick:N},{icon:o(()=>[e(S,{name:"el-icon-Plus"})]),default:o(()=>[d(" \u65B0\u589E ")]),_:1})),[[w,["business.app_notice/add"]]]),_((s(),p(r,{disabled:!t(h).length,onClick:a[2]||(a[2]=l=>g(t(h)))},{default:o(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["business.app_notice/delete"]]]),y("div",fe,[e(j,{data:t(m).lists,onSelectionChange:A},{default:o(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"\u4E3B\u952EID",width:"100",prop:"Id","show-overflow-tooltip":""}),e(i,{label:"\u6E38\u620FID",width:"120",prop:"AppId"},{default:o(({row:l})=>[e(U,{options:t(C).game_appid,value:l.AppId},null,8,["options","value"])]),_:1}),e(i,{label:"\u6392\u5E8F",width:"100",prop:"OrderId","show-overflow-tooltip":""}),e(i,{label:"\u6807\u9898",prop:"Title","show-overflow-tooltip":""}),e(i,{label:"\u5185\u5BB9","min-width":"250",prop:"Content","show-overflow-tooltip":""}),e(i,{label:"\u6A21\u7248ID",width:"100",prop:"TemplateId","show-overflow-tooltip":""}),e(i,{label:"\u7248\u672C\u53F7",width:"100",prop:"Version","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:l})=>[_((s(),p(r,{type:"primary",link:"",onClick:F=>$(l)},{default:o(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["business.app_notice/edit"]]]),_((s(),p(r,{type:"danger",link:"",onClick:F=>g(l.Id)},{default:o(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["business.app_notice/delete"]]])]),_:1})]),_:1},8,["data"])]),y("div",ve,[e(M,{modelValue:t(m),"onUpdate:modelValue":a[3]||(a[3]=l=>ce(m)?m.value=l:null),onChange:t(b)},null,8,["modelValue","onChange"])])]),_:1})),[[O,t(m).loading]]),t(v)?(s(),p(ne,{key:0,ref_key:"editRef",ref:f,"dict-data":t(C),onSuccess:t(b),onClose:a[4]||(a[4]=l=>v.value=!1)},null,8,["dict-data","onSuccess"])):_e("",!0)])}}});export{ot as default};