沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
1
import{d as Q,r as n,A as W,b as X,o as _,c as C,k as e,B as t,a as l,F as E,i as Z,M as $,N as y,O as d,P as j,g as F,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-BP6bNRoi.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as de}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as me}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as R}from"./formatTime-DwR9f7DP.js";import{g as ce,u as V,a as fe}from"./index-DTTJX9Ya.js";import{_ as _e}from"./MyNotifyMessageDetail.vue_vue_type_script_setup_true_lang-By55ICXE.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"./el-descriptions-item-BuMEVwqR.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()},A=()=>{T.value.resetFields(),m.value.clearSelection(),k()},N=n(),M=async o=>{await V(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 V(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 B=ue,P=ee,v=ae,z=le,f=te,p=re,L=oe,x=me,i=se,Y=de,G=ie,H=pe,q=ne;return _(),C(E,null,[e(x,null,{default:t(()=>[e(L,{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),C(E,null,Z(l($)(l(y).INFRA_BOOLEAN_STRING),a=>(_(),F(B,{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:A},{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((_(),F(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(R)},null,8,["formatter"]),e(i,{label:"\u7C7B\u578B",align:"center",prop:"templateType",width:"180"},{default:t(a=>[e(Y,{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(Y,{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(R)},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};