選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

2 行
4.3KB

  1. import{g as M,d as P,n as S,a as U,t as q}from"./noticeManage.ae23a1e7.js";import{d as G,z as I,b as g,r as w,a0 as r,o as A,c as l,e as H,f as J,h as a,i as t,j as p,g as u,t as K,F as Q,x as W}from"./index.121be81f.js";import X from"./noticeDialog.2e08f20a.js";const Y=["onClick"],Z=["onClick"],ee=["onClick"],ae=["onClick"],te=G({name:"noticeManage"}),ie=Object.assign(te,{setup(le){const x=I(),{proxy:d}=W(),n=g({title:void 0,type:void 0}),h=w(),v=w(0),D=g([{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u516C\u544A\u6807\u9898",key:"title",prop:"title"},{label:"\u516C\u544A\u7C7B\u578B",key:"type",prop:"type",width:"100",render:e=>r("span",`${e.type===1?"\u901A\u77E5\u516C\u544A":e.type===2?"\u5E2E\u52A9\u6587\u6863":"\u653F\u7B56\u6587\u4EF6"}`)},{label:"\u662F\u5426\u7F6E\u9876",key:"topped",prop:"topped",width:"80",render:e=>r("span",`${e.topped?"\u662F":"\u5426"}`)},{label:"\u72B6\u6001",key:"enabled",prop:"enabled",width:"80",render:e=>[r("span",{class:["dot mr-4",`${e.enabled?"bg-success":"bg-danger"}`]}),r("span",{class:`${e.enabled?"text-success":"text-danger"}`},e.enabled?"\u542F\u7528":"\u7981\u7528")]},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"220",fixed:"right"}]),k=w([]),i=async(e=h.value.pageParams)=>{const o=await M({...e,...n});v.value=o.data.total,k.value=o.data.records},V=()=>{i()},z=()=>{n.title=void 0,n.type=void 0,i({pageNumber:1,pageSize:10})},c=g({visible:!1,rowData:void 0}),$=async e=>{if(e&&e.id){const o=await P(e.id);c.rowData=o.data}else c.rowData=void 0;c.visible=!0},B=e=>{c.visible=!1,e&&i()},N=async e=>{d.$messageBox.confirm(`\u662F\u5426${e.enabled?"\u7981\u7528":"\u542F\u7528"}\u8BE5\u516C\u544A?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await S({id:e.id,status:!e.enabled}),d.$message.success(`${e.enabled?"\u7981\u7528":"\u542F\u7528"}\u6210\u529F\uFF01`),await i()})},T=e=>{d.$messageBox.confirm("\u662F\u5426\u5220\u9664\u8BE5\u516C\u544A?","\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await U({id:e.id}),d.$message.success("\u5220\u9664\u6210\u529F\uFF01"),await i()})},E=async e=>{d.$messageBox.confirm("\u662F\u5426\u7F6E\u9876\u8BE5\u516C\u544A?","\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await q({id:e.id}),d.$message.success("\u7F6E\u9876\u6210\u529F\uFF01"),await i()})};return A(()=>{n.type=x.query.type*1||void 0,i()}),(e,o)=>{const F=l("el-input"),_=l("el-form-item"),m=l("el-col"),f=l("el-option"),L=l("el-select"),b=l("el-button"),O=l("el-row"),R=l("el-form"),C=l("el-card"),j=l("table-list");return H(),J(Q,null,[a(C,{shadow:"never",class:"search mb-16"},{default:t(()=>[a(R,{"label-suffix":":",model:n,size:"small"},{default:t(()=>[a(O,{gutter:16},{default:t(()=>[a(m,{span:8},{default:t(()=>[a(_,{label:"\u516C\u544A\u6807\u9898"},{default:t(()=>[a(F,{modelValue:n.title,"onUpdate:modelValue":o[0]||(o[0]=s=>n.title=s),placeholder:"\u8BF7\u8F93\u5165",maxlength:50},null,8,["modelValue"])]),_:1})]),_:1}),a(m,{span:8},{default:t(()=>[a(_,{label:"\u516C\u544A\u7C7B\u578B"},{default:t(()=>[a(L,{modelValue:n.type,"onUpdate:modelValue":o[1]||(o[1]=s=>n.type=s),class:"m-2",placeholder:"\u8BF7\u9009\u62E9"},{default:t(()=>[a(f,{label:"\u901A\u77E5\u516C\u544A",value:1}),a(f,{label:"\u5E2E\u52A9\u6587\u6863",value:2}),a(f,{label:"\u653F\u7B56\u6587\u4EF6",value:3})]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(m,{span:8},{default:t(()=>[a(_,{class:"btn"},{default:t(()=>[a(b,{type:"primary",size:"small",onClick:V},{default:t(()=>[p("\u67E5\u8BE2")]),_:1}),a(b,{size:"small",onClick:z},{default:t(()=>[p("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(C,{shadow:"never"},{header:t(()=>[p(" \u516C\u544A\u5217\u8868 "),a(b,{class:"float-right",type:"primary",icon:"Plus",size:"small",onClick:$},{default:t(()=>[p(" \u65B0\u589E\u516C\u544A ")]),_:1})]),default:t(()=>[a(j,{ref_key:"tableListRef",ref:h,column:D,data:k.value,total:v.value,onGetTableData:i},{action:t(({scope:s})=>[u("a",{onClick:y=>$(s.row)},"\u7F16\u8F91",8,Y),u("a",{onClick:y=>E(s.row)},"\u7F6E\u9876",8,Z),u("a",{onClick:y=>N(s.row)},K(s.row.enabled?"\u7981\u7528":"\u542F\u7528"),9,ee),u("a",{onClick:y=>T(s.row)},"\u5220\u9664",8,ae)]),_:1},8,["column","data","total"])]),_:1}),a(X,{visible:c.visible,data:c.rowData,onClose:B},null,8,["visible","data"])],64)}}});export{ie as default};