沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
1
import{d as X,Q as Z,J as j,r as d,A as G,b as ee,a1 as le,o as p,c as S,k as l,B as t,a,F as T,i as N,a3 as R,N as _,g as n,a2 as F,dQ as ae,O as c,P as y,C as te,D as oe,$ as se,R as pe,S as re,a7 as ne,T as de,U as ie,V as ue,W as me,X as ce,Y as fe,Z as _e}from"./index-CHTXMeh8.js";import{_ as ye}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as we}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as ve}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as be}from"./formatTime-DG99nHw2.js";import{a as he,d as ge,e as Se}from"./index-DaumVEau.js";import{b as Te}from"./index-DxIeD0TF.js";import{d as ke}from"./download-e0EdwhTv.js";import{_ as xe}from"./SmsTemplateForm.vue_vue_type_script_setup_true_lang-Cv7SgsXG.js";import{_ as Ce}from"./SmsTemplateSendForm.vue_vue_type_script_setup_true_lang-BN7gszaL.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";const Ve=X({name:"SystemSmsTemplate",__name:"index",setup(Me){const k=Z(),{t:z}=j(),x=d(!1),U=d(0),Y=d([]),A=d(),o=G({pageNo:1,pageSize:10,type:void 0,status:void 0,code:"",content:"",apiTemplateId:"",channelId:void 0,createTime:[]}),C=d(!1),V=d([]),w=async()=>{x.value=!0;try{const i=await he(o);Y.value=i.list,U.value=i.total}finally{x.value=!1}},h=()=>{o.pageNo=1,w()},$=()=>{A.value.resetFields(),h()},P=d(),O=(i,s)=>{P.value.open(i,s)},D=d(),K=async()=>{try{await k.exportConfirm(),C.value=!0;const i=await Se(o);ke.excel(i,"\u77ED\u4FE1\u6A21\u677F.xls")}catch{}finally{C.value=!1}};return ee(async()=>{await w(),V.value=await Te()}),(i,s)=>{const M=se,E=pe,u=re,H=ne,Q=de,g=ie,m=ue,q=me,L=ve,r=ce,I=we,B=fe,J=ye,v=le("hasPermi"),W=_e;return p(),S(T,null,[l(L,null,{default:t(()=>[l(q,{class:"-mb-15px",model:a(o),ref_key:"queryFormRef",ref:A,inline:!0,"label-width":"150px"},{default:t(()=>[l(u,{label:"\u77ED\u4FE1\u7C7B\u578B",prop:"type"},{default:t(()=>[l(E,{modelValue:a(o).type,"onUpdate:modelValue":s[0]||(s[0]=e=>a(o).type=e),placeholder:"\u8BF7\u9009\u62E9\u77ED\u4FE1\u7C7B\u578B",clearable:"",class:"!w-240px"},{default:t(()=>[(p(!0),S(T,null,N(a(R)(a(_).SYSTEM_SMS_TEMPLATE_TYPE),e=>(p(),n(M,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(u,{label:"\u5F00\u542F\u72B6\u6001",prop:"status"},{default:t(()=>[l(E,{modelValue:a(o).status,"onUpdate:modelValue":s[1]||(s[1]=e=>a(o).status=e),placeholder:"\u8BF7\u9009\u62E9\u5F00\u542F\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(p(!0),S(T,null,N(a(R)(a(_).COMMON_STATUS),e=>(p(),n(M,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(u,{label:"\u6A21\u677F\u7F16\u7801",prop:"code"},{default:t(()=>[l(H,{modelValue:a(o).code,"onUpdate:modelValue":s[2]||(s[2]=e=>a(o).code=e),placeholder:"\u8BF7\u8F93\u5165\u6A21\u677F\u7F16\u7801",clearable:"",onKeyup:F(h,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),l(u,{label:"\u77ED\u4FE1 API \u7684\u6A21\u677F\u7F16\u53F7",prop:"apiTemplateId"},{default:t(()=>[l(H,{modelValue:a(o).apiTemplateId,"onUpdate:modelValue":s[3]||(s[3]=e=>a(o).apiTemplateId=e),placeholder:"\u8BF7\u8F93\u5165\u77ED\u4FE1 API \u7684\u6A21\u677F\u7F16\u53F7",clearable:"",onKeyup:F(h,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),l(u,{label:"\u77ED\u4FE1\u6E20\u9053",prop:"channelId"},{default:t(()=>[l(E,{modelValue:a(o).channelId,"onUpdate:modelValue":s[4]||(s[4]=e=>a(o).channelId=e),placeholder:"\u8BF7\u9009\u62E9\u77ED\u4FE1\u6E20\u9053",clearable:"",class:"!w-240px"},{default:t(()=>[(p(!0),S(T,null,N(a(V),e=>(p(),n(M,{key:e.id,value:e.id,label:e.signature+`\u3010 ${a(ae)(a(_).SYSTEM_SMS_CHANNEL_CODE,e.code)}\u3011`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(u,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[l(Q,{modelValue:a(o).createTime,"onUpdate:modelValue":s[5]||(s[5]=e=>a(o).createTime=e),style:{width:"240px"},type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F",class:"!w-240px"},null,8,["modelValue"])]),_:1}),l(u,null,{default:t(()=>[l(m,{onClick:h},{default:t(()=>[l(g,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),l(m,{onClick:$},{default:t(()=>[l(g,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),y((p(),n(m,{type:"primary",plain:"",onClick:s[6]||(s[6]=e=>O("create"))},{default:t(()=>[l(g,{icon:"ep:plus",class:"mr-5px"}),c("\u65B0\u589E ")]),_:1})),[[v,["system:sms-template:create"]]]),y((p(),n(m,{type:"success",plain:"",onClick:K,loading:a(C)},{default:t(()=>[l(g,{icon:"ep:download",class:"mr-5px"}),c(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[v,["system:sms-template:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),l(L,null,{default:t(()=>[y((p(),n(B,{data:a(Y)},{default:t(()=>[l(r,{label:"\u6A21\u677F\u7F16\u7801",align:"center",prop:"code",width:"120","show-overflow-tooltip":!0}),l(r,{label:"\u6A21\u677F\u540D\u79F0",align:"center",prop:"name",width:"120","show-overflow-tooltip":!0}),l(r,{label:"\u6A21\u677F\u5185\u5BB9",align:"center",prop:"content",width:"200","show-overflow-tooltip":!0}),l(r,{label:"\u77ED\u4FE1\u7C7B\u578B",align:"center",prop:"type"},{default:t(e=>[l(I,{type:a(_).SYSTEM_SMS_TEMPLATE_TYPE,value:e.row.type},null,8,["type","value"])]),_:1}),l(r,{label:"\u72B6\u6001",align:"center",prop:"status",width:"80"},{default:t(e=>[l(I,{type:a(_).COMMON_STATUS,value:e.row.status},null,8,["type","value"])]),_:1}),l(r,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),l(r,{label:"\u77ED\u4FE1 API \u7684\u6A21\u677F\u7F16\u53F7",align:"center",prop:"apiTemplateId",width:"200","show-overflow-tooltip":!0}),l(r,{label:"\u77ED\u4FE1\u6E20\u9053",align:"center",width:"120"},{default:t(e=>{var b;return[te("div",null,oe((b=a(V).find(f=>f.id===e.row.channelId))==null?void 0:b.signature),1),l(I,{type:a(_).SYSTEM_SMS_CHANNEL_CODE,value:e.row.channelCode},null,8,["type","value"])]}),_:1}),l(r,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:a(be)},null,8,["formatter"]),l(r,{label:"\u64CD\u4F5C",align:"center",width:"210",fixed:"right"},{default:t(e=>[y((p(),n(m,{link:"",type:"primary",onClick:b=>O("update",e.row.id)},{default:t(()=>[c(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[v,["system:sms-template:update"]]]),y((p(),n(m,{link:"",type:"primary",onClick:b=>{return f=e.row.id,void D.value.open(f);var f}},{default:t(()=>[c(" \u6D4B\u8BD5 ")]),_:2},1032,["onClick"])),[[v,["system:sms-template:send-sms"]]]),y((p(),n(m,{link:"",type:"danger",onClick:b=>(async f=>{try{await k.delConfirm(),await ge(f),k.success(z("common.delSuccess")),await w()}catch{}})(e.row.id)},{default:t(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["system:sms-template:delete"]]])]),_:1})]),_:1},8,["data"])),[[W,a(x)]]),l(J,{total:a(U),page:a(o).pageNo,"onUpdate:page":s[7]||(s[7]=e=>a(o).pageNo=e),limit:a(o).pageSize,"onUpdate:limit":s[8]||(s[8]=e=>a(o).pageSize=e),onPagination:w},null,8,["total","page","limit"])]),_:1}),l(xe,{ref_key:"formRef",ref:P,onSuccess:w},null,512),l(Ce,{ref_key:"sendFormRef",ref:D},null,512)],64)}}});export{Ve as default};