2 lines
8.8 KiB
JavaScript
2 lines
8.8 KiB
JavaScript
|
import{a8 as V,d as ae,P as we,T as J,r as p,U as ee,b as Te,V as Ve,o as u,c as C,k as e,m as l,w as f,t as R,e as o,p as te,Y as D,Z as $,q as b,y as v,S as le,W as ke,R as Ee,x as Ce,K as oe,B as Ne,C as Se,X as Be,a6 as Ue,v as Fe}from"./index-ce293e15.js";import{_ as Ie}from"./index.vue_vue_type_style_index_0_lang-02094aba.js";/* empty css *//* empty css */import{_ as Re}from"./index-ecfe591e.js";import{E as De,a as $e}from"./el-table-column-cabb178a.js";import"./el-checkbox-4dcbb825.js";import{_ as qe}from"./index-89dbf370.js";import"./el-tag-3fc9a3c5.js";import{E as Pe}from"./el-row-12f29e15.js";import{_ as Ke}from"./index-513a4358.js";import{E as xe}from"./el-col-6a25bef6.js";import{E as Le}from"./el-card-d5e24325.js";import{E as ze,a as Ae}from"./el-form-item-16067f4c.js";import{E as Qe,a as Oe}from"./el-select-73eaf91b.js";import{E as je,a as Ge}from"./index-142ddad2.js";import"./el-upload-f5a4cf25.js";import"./el-progress-b748f709.js";import"./_baseClone-e976708f.js";import"./_Uint8Array-e8d4eb20.js";import"./_initCloneObject-d640be41.js";import"./isEqual-48984780.js";import"./el-tree-3fe9ff76.js";import"./strings-d88802bc.js";function Me(c){return V({url:"/system/notice/list",method:"get",params:c})}function We(c){return V({url:"/system/notice/"+c,method:"get"})}function Xe(c){return V({url:"/system/notice",method:"post",data:c})}function Ye(c){return V({url:"/system/notice",method:"put",data:c})}function Ze(c){return V({url:"/system/notice/"+c,method:"delete"})}const He={class:"p-2"},Je={class:"mb-[10px]"},et={class:"dialog-footer"},tt=ae({name:"Notice"}),Ct=ae({...tt,setup(c){const{proxy:i}=we(),{sys_notice_status:q,sys_notice_type:N}=J(i==null?void 0:i.useDict("sys_notice_status","sys_notice_type")),P=p([]),S=p(!0),k=p(!0),B=p([]),K=p(!0),x=p(!0),U=p(0),L=p(),F=p(),d=ee({visible:!1,title:""}),z={noticeId:void 0,noticeTitle:"",noticeType:"",noticeContent:"",status:"0",remark:"",createByName:""},ne=ee({form:{...z},queryParams:{pageNum:1,pageSize:10,noticeTitle:"",createByName:"",status:"",noticeType:""},rules:{noticeTitle:[{required:!0,message:"公告标题不能为空",trigger:"blur"}],noticeType:[{required:!0,message:"公告类型不能为空",trigger:"change"}]}}),{queryParams:r,form:s,rules:ie}=J(ne),h=async()=>{S.value=!0;const n=await Me(r.value);P.value=n.rows,U.value=n.total,S.value=!1},se=()=>{I(),d.visible=!1},I=()=>{var n;s.value={...z},(n=F.value)==null||n.resetFields()},E=()=>{r.value.pageNum=1,h()},re=()=>{var n;(n=L.value)==null||n.resetFields(),E()},ue=n=>{B.value=n.map(a=>a.noticeId),K.value=n.length!=1,x.value=!n.length},ce=()=>{I(),d.visible=!0,d.title="添加公告"},A=async n=>{I();const a=(n==null?void 0:n.noticeId)||B.value[0],{data:w}=await We(a);Object.assign(s.value,w),d.visible=!0,d.title="修改公告"},de=()=>{var n;(n=F.value)==null||n.validate(async a=>{a&&(s.value.noticeId?await Ye(s.value):await Xe(s.value),i==null||i.$modal.msgSuccess("修改成功"),d.visible=!1,await h())})},Q=async n=>{const a=(n==null?void 0:n.noticeId)||B.value;await(i==null?void 0:i.$modal.confirm('是否确认删除公告编号为"'+a+'"的数据项?')),await Ze(a),await h(),i==null||i.$modal.msgSuccess("删除成功")};return Te(()=>{h()}),(n,a)=>{var Z,H;const w=Ne,_=ze,O=Qe,j=Oe,m=Se,G=Ae,M=Le,y=xe,me=Ke,W=Pe,g=De,X=qe,Y=Be,pe=$e,_e=Re,fe=je,ve=Ge,ye=Ie,ge=Ue,T=Ve("hasPermi"),be=Fe;return u(),C("div",He,[e(ke,{"enter-active-class":(Z=o(i))==null?void 0:Z.animate.searchAnimate.enter,"leave-active-class":(H=o(i))==null?void 0:H.animate.searchAnimate.leave},{default:l(()=>[f(R("div",Je,[e(M,{shadow:"hover"},{default:l(()=>[e(G,{model:o(r),ref_key:"queryFormRef",ref:L,inline:!0,"label-width":"68px"},{default:l(()=>[e(_,{label:"公告标题",prop:"noticeTitle"},{default:l(()=>[e(w,{modelValue:o(r).noticeTitle,"onUpdate:modelValue":a[0]||(a[0]=t=>o(r).noticeTitle=t),placeholder:"请输入公告标题",clearable:"",style:{width:"200px"},onKeyup:te(E,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(_,{label:"操作人员",prop:"createByName"},{default:l(()=>[e
|