工业互联网平台脚手架前端代码
houzhongjian
2024-09-18 23db5e5c6bfcbd7030a4003cd4ea18fbb920024f
1
import{d as Q,r as n,A as W,b as X,o as _,c as Y,k as e,B as t,a as l,F as A,i as Z,M as $,N as y,O as d,P as j,g as C,D as J,Q as K,R as ee,S as ae,T as le,U as te,V as re,W as oe,X as se,Y as ie,Z as ne,$ as ue}from"./index-CHTXMeh8.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as de}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as me}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as E}from"./formatTime-DG99nHw2.js";import{g as ce,u as F,a as fe}from"./index-BdGhazw1.js";import{_ as _e}from"./MyNotifyMessageDetail.vue_vue_type_script_setup_true_lang-DkpaP4FO.js";import"./index-DVe591HI.js";import"./color-DXkOL5Tu.js";import"./el-card-Bdk9qx7q.js";import"./Dialog.vue_vue_type_style_index_0_lang-DH0TiLYN.js";import"./el-descriptions-item-XOb4a1bP.js";const ge=Q({name:"SystemMyNotify",__name:"index",setup(ve){const S=K(),g=n(!0),b=n(0),h=n([]),r=W({pageNo:1,pageSize:10,readStatus:void 0,createTime:[]}),T=n(),m=n(),c=n([]),u=async()=>{g.value=!0;try{const o=await ce(r);h.value=o.list,b.value=o.total}finally{g.value=!1}},k=()=>{r.pageNo=1,u()},V=()=>{T.value.resetFields(),m.value.clearSelection(),k()},N=n(),M=async o=>{await F(o),await u()},O=async()=>{await fe(),S.success("\u5168\u90E8\u5DF2\u8BFB\u6210\u529F\uFF01"),m.value.clearSelection(),await u()},D=async()=>{c.value.length!==0&&(await F(c.value),S.success("\u6279\u91CF\u5DF2\u8BFB\u6210\u529F\uFF01"),m.value.clearSelection(),await u())},I=o=>!o.readStatus,U=o=>{c.value=[],o&&o.forEach(s=>c.value.push(s.id))};return X(()=>{u()}),(o,s)=>{const L=ue,P=ee,v=ae,z=le,f=te,p=re,B=oe,x=me,i=se,R=de,G=ie,H=pe,q=ne;return _(),Y(A,null,[e(x,null,{default:t(()=>[e(B,{class:"-mb-15px",model:l(r),ref_key:"queryFormRef",ref:T,inline:!0,"label-width":"68px"},{default:t(()=>[e(v,{label:"\u662F\u5426\u5DF2\u8BFB",prop:"readStatus"},{default:t(()=>[e(P,{modelValue:l(r).readStatus,"onUpdate:modelValue":s[0]||(s[0]=a=>l(r).readStatus=a),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(_(!0),Y(A,null,Z(l($)(l(y).INFRA_BOOLEAN_STRING),a=>(_(),C(L,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(v,{label:"\u53D1\u9001\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(z,{modelValue:l(r).createTime,"onUpdate:modelValue":s[1]||(s[1]=a=>l(r).createTime=a),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),e(v,null,{default:t(()=>[e(p,{onClick:k},{default:t(()=>[e(f,{icon:"ep:search",class:"mr-5px"}),d(" \u641C\u7D22")]),_:1}),e(p,{onClick:V},{default:t(()=>[e(f,{icon:"ep:refresh",class:"mr-5px"}),d(" \u91CD\u7F6E")]),_:1}),e(p,{onClick:D},{default:t(()=>[e(f,{icon:"ep:reading",class:"mr-5px"}),d(" \u6807\u8BB0\u5DF2\u8BFB ")]),_:1}),e(p,{onClick:O},{default:t(()=>[e(f,{icon:"ep:reading",class:"mr-5px"}),d(" \u5168\u90E8\u5DF2\u8BFB ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(x,null,{default:t(()=>[j((_(),C(G,{data:l(h),ref_key:"tableRef",ref:m,"row-key":"id",onSelectionChange:U},{default:t(()=>[e(i,{type:"selection",selectable:I,"reserve-selection":!0}),e(i,{label:"\u53D1\u9001\u4EBA",align:"center",prop:"templateNickname",width:"180"}),e(i,{label:"\u53D1\u9001\u65F6\u95F4",align:"center",prop:"createTime",width:"200",formatter:l(E)},null,8,["formatter"]),e(i,{label:"\u7C7B\u578B",align:"center",prop:"templateType",width:"180"},{default:t(a=>[e(R,{type:l(y).SYSTEM_NOTIFY_TEMPLATE_TYPE,value:a.row.templateType},null,8,["type","value"])]),_:1}),e(i,{label:"\u6D88\u606F\u5185\u5BB9",align:"center",prop:"templateContent","show-overflow-tooltip":""}),e(i,{label:"\u662F\u5426\u5DF2\u8BFB",align:"center",prop:"readStatus",width:"160"},{default:t(a=>[e(R,{type:l(y).INFRA_BOOLEAN_STRING,value:a.row.readStatus},null,8,["type","value"])]),_:1}),e(i,{label:"\u9605\u8BFB\u65F6\u95F4",align:"center",prop:"readTime",width:"200",formatter:l(E)},null,8,["formatter"]),e(i,{label:"\u64CD\u4F5C",align:"center",width:"160"},{default:t(a=>[e(p,{link:"",type:a.row.readStatus?"primary":"warning",onClick:we=>{return(w=a.row).readStatus||M(w.id),void N.value.open(w);var w}},{default:t(()=>[d(J(a.row.readStatus?"\u8BE6\u60C5":"\u5DF2\u8BFB"),1)]),_:2},1032,["type","onClick"])]),_:1})]),_:1},8,["data"])),[[q,l(g)]]),e(H,{total:l(b),page:l(r).pageNo,"onUpdate:page":s[2]||(s[2]=a=>l(r).pageNo=a),limit:l(r).pageSize,"onUpdate:limit":s[3]||(s[3]=a=>l(r).pageSize=a),onPagination:u},null,8,["total","page","limit"])]),_:1}),e(_e,{ref_key:"detailRef",ref:N},null,512)],64)}}});export{ge as default};