var r=(y,t,o)=>new Promise((e,s)=>{var u=i=>{try{a(o.next(i))}catch(w){s(w)}},m=i=>{try{a(o.throw(i))}catch(w){s(w)}},a=i=>i.done?e(i.value):Promise.resolve(i.value).then(u,m);a((o=o.apply(y,t)).next())});import{bs as F,$ as M}from"./index-f4658ae7.js";import{PageBaseGenerList as h,GenerListPageShowModel as f}from"./PageBaseGenerList-b0d946a7.js";import{WebConfig as T}from"./WebConfig-c30998ac.js";import{GPNReturnObj as n,GPNReturnType as l}from"./PageBaseGroupNew-ee20c033.js";import d from"./BSEntity-840a884b.js";import{G as p}from"./DataType-33901a1c.js";import"./Group-ab70f402.js";import"./Page-34b19d96.js";import"./EnumLab-d43291c1.js";import"./ParamsUtils-3cbc5822.js";import"./ParamUtils-cdc24dd6.js";import"./SystemConfig-b93c25b3.js";import"./bignumber-cf158d26.js";class G extends h{constructor(){super("GL_Msg"),this.PageTitle="\u6D88\u606F\u5217\u8868"}Init(){return r(this,null,function*(){this.Icon="",this.DTFieldOfSearch="",this.DTFieldOfLabel="",this.LinkField="EmailTitle",this.PageSize=15,this.HisGLShowModel=f.Table,this.LabFields="MsgType",this.Columns=[{Key:"EmailTitle",Name:"\u6807\u9898",IsShow:!0,width:"65%"},{Key:"MyPK",Name:"\u4E3B\u952E",IsShow:!1},{Key:"RDT",Name:"\u65E5\u671F",IsShow:!0,width:"20%"},{Key:"Sender",Name:"\u53D1\u9001\u4EBA",IsShow:!0,width:"25%"},{Key:"IsRead",Name:"\u662F\u5426\u8BFB\u53D6",IsShow:!1},{Key:"MsgType",Name:"\u6807\u8BB0",IsShow:!0},{Key:"Btns",Name:"\u64CD\u4F5C",IsShow:!1}];const e=(yield new M("BP.WF.HttpHandler.WF_Portal").DoMethodReturnJson("Message_Init")).Messages;e.forEach(s=>{s.MsgType=="SendSuccess"&&(s.MsgType="@\u65B0\u5DE5\u4F5C=green"),(s.MsgType.startsWith("HuiQian")||s.MsgType=="HuiQianType")&&(s.MsgType="@\u4F1A\u7B7E\u9080\u8BF7=blue"),s.MsgType=="ReturnAfter"&&(s.MsgType="@\u9000\u56DE=red"),s.MsgType=="HangUp"&&(s.MsgType="@\u6302\u8D77=yellow"),s.MsgType=="CC"&&(s.MsgType="@\u6284\u9001=blue"),s.RDT=s.RDT?s.RDT=="\u65E0"?"\u65E0":F(s.RDT).format("YYYY-MM-DD HH:mm"):"",s.Btns="\u5220\u9664"}),this.Data=e})}LinkFieldClick(t){return r(this,null,function*(){const o=new d("BP.WF.SMS",t.MyPK);yield o.RetrieveFromDBSources(),yield o.DoMethodReturnString("DoRead");const e=p.AtParaStringToJson(t.AtPara),s="/#/WF/MyView?FK_Flow="+((e==null?void 0:e.FlowNo)||(e==null?void 0:e.FK_Flow))+"&FlowNo="+((e==null?void 0:e.FlowNo)||(e==null?void 0:e.FK_Flow))+"&WorkID="+(e==null?void 0:e.WorkID)+"&FK_Node="+(e==null?void 0:e.FK_Node)+"&NodeID="+(e==null?void 0:e.NodeID),u=T.FlowOpenModel||0;if(u===0)return new n(l.OpenUrlByDrawer90,s);if(u===1)return new n(l.OpenUrlByModal,s);if(u===2)return new n(l.OpenUrlByTab,s);if(u===3)return new n(l.OpenUrlByNewWindow,s)})}BtnClick(t,o){return r(this,null,function*(){if(t=="\u5220\u9664"){if(confirm("\u786E\u8BA4\u8981\u5220\u9664\u5417?")){const e=new d("BP.WF.SMS");yield e.setPK(o.MyPK),yield e.Delete()}return new n(l.Update,null)}else alert("\u6CA1\u6709\u89E3\u6790:"+t)})}}export{G as GL_Msg};