沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
提交 | 用户 | 时间
314507 1 import{d as I,Q as L,r as i,A as Q,b as W,a1 as X,o as p,c as P,k as e,B as t,a as l,a2 as D,F,i as Z,a3 as $,N as h,g as d,O as u,P as y,a7 as j,S as G,$ as J,R as ee,T as ae,U as le,V as te,W as oe,X as re,Y as se,Z as pe}from"./index-CHTXMeh8.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as ie}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as de}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as ue}from"./formatTime-DG99nHw2.js";import{a as me,d as ce}from"./index-DiNJxCnD.js";import{_ as fe}from"./NotifyTemplateForm.vue_vue_type_script_setup_true_lang-BNqDUibj.js";import{_ as ye}from"./NotifyTemplateSendForm.vue_vue_type_script_setup_true_lang-DNAYxgKT.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"./constants-CuOBQ73z.js";import"./index-DYclHsjD.js";const _e=I({name:"NotifySmsTemplate",__name:"index",setup(we){const k=L(),v=i(!1),T=i(0),V=i([]),r=Q({pageNo:1,pageSize:10,name:void 0,status:void 0,code:void 0,createTime:[]}),x=i(),m=async()=>{v.value=!0;try{const c=await me(r);V.value=c.list,T.value=c.total}finally{v.value=!1}},_=()=>{r.pageNo=1,m()},A=()=>{x.value.resetFields(),_()},C=i(),S=(c,o)=>{C.value.open(c,o)},N=i();return W(()=>{m()}),(c,o)=>{const U=j,f=G,E=J,R=ee,z=ae,b=le,n=te,H=oe,M=de,s=re,Y=ie,K=se,q=ne,w=X("hasPermi"),B=pe;return p(),P(F,null,[e(M,null,{default:t(()=>[e(H,{class:"-mb-15px",model:l(r),ref_key:"queryFormRef",ref:x,inline:!0,"label-width":"68px"},{default:t(()=>[e(f,{label:"\u6A21\u677F\u540D\u79F0",prop:"name"},{default:t(()=>[e(U,{modelValue:l(r).name,"onUpdate:modelValue":o[0]||(o[0]=a=>l(r).name=a),placeholder:"\u8BF7\u8F93\u5165\u6A21\u677F\u540D\u79F0",clearable:"",onKeyup:D(_,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u6A21\u677F\u7F16\u53F7",prop:"code"},{default:t(()=>[e(U,{modelValue:l(r).code,"onUpdate:modelValue":o[1]||(o[1]=a=>l(r).code=a),placeholder:"\u8BF7\u8F93\u5165\u6A21\u7248\u7F16\u7801",clearable:"",onKeyup:D(_,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[e(R,{modelValue:l(r).status,"onUpdate:modelValue":o[2]||(o[2]=a=>l(r).status=a),placeholder:"\u8BF7\u9009\u62E9\u5F00\u542F\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(p(!0),P(F,null,Z(l($)(l(h).COMMON_STATUS),a=>(p(),d(E,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(f,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(z,{modelValue:l(r).createTime,"onUpdate:modelValue":o[3]||(o[3]=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(f,null,{default:t(()=>[e(n,{onClick:_},{default:t(()=>[e(b,{icon:"ep:search",class:"mr-5px"}),u(" \u641C\u7D22")]),_:1}),e(n,{onClick:A},{default:t(()=>[e(b,{icon:"ep:refresh",class:"mr-5px"}),u(" \u91CD\u7F6E")]),_:1}),y((p(),d(n,{type:"primary",plain:"",onClick:o[4]||(o[4]=a=>S("create"))},{default:t(()=>[e(b,{icon:"ep:plus",class:"mr-5px"}),u("\u65B0\u589E ")]),_:1})),[[w,["system:notify-template:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(M,null,{default:t(()=>[y((p(),d(K,{data:l(V)},{default:t(()=>[e(s,{label:"\u6A21\u677F\u7F16\u7801",align:"center",prop:"code",width:"120","show-overflow-tooltip":!0}),e(s,{label:"\u6A21\u677F\u540D\u79F0",align:"center",prop:"name",width:"120","show-overflow-tooltip":!0}),e(s,{label:"\u7C7B\u578B",align:"center",prop:"type"},{default:t(a=>[e(Y,{type:l(h).SYSTEM_NOTIFY_TEMPLATE_TYPE,value:a.row.type},null,8,["type","value"])]),_:1}),e(s,{label:"\u53D1\u9001\u4EBA\u540D\u79F0",align:"center",prop:"nickname"}),e(s,{label:"\u6A21\u677F\u5185\u5BB9",align:"center",prop:"content",width:"200","show-overflow-tooltip":!0}),e(s,{label:"\u5F00\u542F\u72B6\u6001",align:"center",prop:"status",width:"80"},{default:t(a=>[e(Y,{type:l(h).COMMON_STATUS,value:a.row.status},null,8,["type","value"])]),_:1}),e(s,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),e(s,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:l(ue)},null,8,["formatter"]),e(s,{label:"\u64CD\u4F5C",align:"center",width:"210",fixed:"right"},{default:t(a=>[y((p(),d(n,{link:"",type:"primary",onClick:O=>S("update",a.row.id)},{default:t(()=>[u(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[w,["system:notify-template:update"]]]),y((p(),d(n,{link:"",type:"primary",onClick:O=>{return g=a.row,void N.value.open(g.id);var g}},{default:t(()=>[u(" \u6D4B\u8BD5 ")]),_:2},1032,["onClick"])),[[w,["system:notify-template:send-notify"]]]),y((p(),d(n,{link:"",type:"danger",onClick:O=>(async g=>{try{await k.delConfirm(),await ce(g),k.success("\u5220\u9664\u6210\u529F"),await m()}catch{}})(a.row.id)},{default:t(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["system:notify-template:delete"]]])]),_:1})]),_:1},8,["data"])),[[B,l(v)]]),e(q,{total:l(T),page:l(r).pageNo,"onUpdate:page":o[5]||(o[5]=a=>l(r).pageNo=a),limit:l(r).pageSize,"onUpdate:limit":o[6]||(o[6]=a=>l(r).pageSize=a),onPagination:m},null,8,["total","page","limit"])]),_:1}),e(fe,{ref_key:"formRef",ref:C,onSuccess:m},null,512),e(ye,{ref_key:"sendFormRef",ref:N},null,512)],64)}}});export{_e as default};