import{d as J,Q as K,J as Q,r as m,A as W,b as X,a1 as Z,o as i,c as F,k as e,B as l,a as t,a2 as $,F as P,i as j,a3 as D,N as C,g as p,O as u,P as f,a7 as G,S as H,$ as L,R as ee,U as ae,V as le,W as te,X as se,Y as oe,Z as ie}from"./index-BP6bNRoi.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as ne}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as pe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as ue}from"./formatTime-DwR9f7DP.js";import{_ as ce,g as de,d as me,p as fe}from"./NoticeForm.vue_vue_type_script_setup_true_lang-C5kCUHIa.js";import"./index-BZESAUPP.js";import"./color-DXkOL5Tu.js";import"./el-card-bU92WWV4.js";import"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";import"./constants-CuOBQ73z.js";const ye=J({name:"SystemNotice",__name:"index",setup(_e){const y=K(),{t:S}=Q(),g=m(!0),h=m(0),x=m([]),o=W({pageNo:1,pageSize:10,title:"",type:void 0,status:void 0}),N=m(),c=async()=>{g.value=!0;try{const d=await de(o);x.value=d.list,h.value=d.total}finally{g.value=!1}},b=()=>{o.pageNo=1,c()},R=()=>{N.value.resetFields(),b()},T=m(),U=(d,s)=>{T.value.open(d,s)};return X(()=>{c()}),(d,s)=>{const z=G,k=H,A=L,E=ee,v=ae,r=le,Y=te,V=pe,n=se,O=ne,q=oe,B=re,_=Z("hasPermi"),I=ie;return i(),F(P,null,[e(V,null,{default:l(()=>[e(Y,{class:"-mb-15px",model:t(o),ref_key:"queryFormRef",ref:N,inline:!0,"label-width":"68px"},{default:l(()=>[e(k,{label:"\u516C\u544A\u6807\u9898",prop:"title"},{default:l(()=>[e(z,{modelValue:t(o).title,"onUpdate:modelValue":s[0]||(s[0]=a=>t(o).title=a),placeholder:"\u8BF7\u8F93\u5165\u516C\u544A\u6807\u9898",clearable:"",onKeyup:$(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(k,{label:"\u516C\u544A\u72B6\u6001",prop:"status"},{default:l(()=>[e(E,{modelValue:t(o).status,"onUpdate:modelValue":s[1]||(s[1]=a=>t(o).status=a),placeholder:"\u8BF7\u9009\u62E9\u516C\u544A\u72B6\u6001",clearable:"",class:"!w-240px"},{default:l(()=>[(i(!0),F(P,null,j(t(D)(t(C).COMMON_STATUS),a=>(i(),p(A,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(k,null,{default:l(()=>[e(r,{onClick:b},{default:l(()=>[e(v,{icon:"ep:search",class:"mr-5px"}),u(" \u641C\u7D22")]),_:1}),e(r,{onClick:R},{default:l(()=>[e(v,{icon:"ep:refresh",class:"mr-5px"}),u(" \u91CD\u7F6E")]),_:1}),f((i(),p(r,{type:"primary",plain:"",onClick:s[2]||(s[2]=a=>U("create"))},{default:l(()=>[e(v,{icon:"ep:plus",class:"mr-5px"}),u(" \u65B0\u589E ")]),_:1})),[[_,["system:notice:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(V,null,{default:l(()=>[f((i(),p(q,{data:t(x)},{default:l(()=>[e(n,{label:"\u516C\u544A\u7F16\u53F7",align:"center",prop:"id"}),e(n,{label:"\u516C\u544A\u6807\u9898",align:"center",prop:"title"}),e(n,{label:"\u516C\u544A\u7C7B\u578B",align:"center",prop:"type"},{default:l(a=>[e(O,{type:t(C).SYSTEM_NOTICE_TYPE,value:a.row.type},null,8,["type","value"])]),_:1}),e(n,{label:"\u72B6\u6001",align:"center",prop:"status"},{default:l(a=>[e(O,{type:t(C).COMMON_STATUS,value:a.row.status},null,8,["type","value"])]),_:1}),e(n,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(ue)},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:l(a=>[f((i(),p(r,{link:"",type:"primary",onClick:M=>U("update",a.row.id)},{default:l(()=>[u(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[_,["system:notice:update"]]]),f((i(),p(r,{link:"",type:"danger",onClick:M=>(async w=>{try{await y.delConfirm(),await me(w),y.success(S("common.delSuccess")),await c()}catch{}})(a.row.id)},{default:l(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[_,["system:notice:delete"]]]),f((i(),p(r,{link:"",onClick:M=>(async w=>{try{await y.confirm("\u662F\u5426\u63A8\u9001\u6240\u9009\u4E2D\u901A\u77E5\uFF1F"),await fe(w),y.success(S("\u63A8\u9001\u6210\u529F"))}catch{}})(a.row.id)},{default:l(()=>[u(" \u63A8\u9001 ")]),_:2},1032,["onClick"])),[[_,["system:notice:update"]]])]),_:1})]),_:1},8,["data"])),[[I,t(g)]]),e(B,{total:t(h),page:t(o).pageNo,"onUpdate:page":s[3]||(s[3]=a=>t(o).pageNo=a),limit:t(o).pageSize,"onUpdate:limit":s[4]||(s[4]=a=>t(o).pageSize=a),onPagination:c},null,8,["total","page","limit"])]),_:1}),e(ce,{ref_key:"formRef",ref:T,onSuccess:c},null,512)],64)}}});export{ye as default};