You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
2.8 KiB

var p=(w,t,r)=>new Promise((c,n)=>{var s=e=>{try{i(r.next(e))}catch(a){n(a)}},M=e=>{try{i(r.throw(e))}catch(a){n(a)}},i=e=>e.done?c(e.value):Promise.resolve(e.value).then(s,M);i((r=r.apply(w,t)).next())});import{d as F,bl as f,r as _,q as u,o as y,g as d,b as V,w as m,t as S,u as g,bo as W,$ as h,bx as o,Y as P}from"./index-f4658ae7.js";const T={class:"en-wrapper"},I={key:0,class:"ant-tag-red"},R={key:1,class:"en-body"},v=F({__name:"MyView",props:{params:{type:Object,default:()=>{}}},setup(w){const t=w,r=f();let c=(t.params.hasOwnProperty("PKVal")?r.query:t.params)||{};const n=_(!1),s=u({tips:"",hasError:!1});return(()=>p(this,null,function*(){try{n.value=!0;const i=new h("BP.WF.HttpHandler.WF_MyView");i.AddJson(c);const e=(yield i.DoMethodReturnString("MyView_Init"))||"";if(n.value=!1,typeof e=="object"){delete e.DoMethod,delete e.DoType,delete e.HttpHandlerName;const a=e.PageName||"";delete e.PageName;const l=window.location.hash;a==="MyFlow"&&(l.includes("S_MyFlow")&&window.location.replace("/#/WF/S_MyFlow?"+o(e)),l.includes("M_MyFlow")?window.location.replace("/#/WF/M_MyFlow?"+o(e)):window.location.replace("/#/WF/MyFlow?"+o(e))),a==="MyFlowGener"&&(l.includes("S_MyFlow")&&window.location.replace("/#/WF/S_MyFlowGener?"+o(e)),l.includes("M_MyFlow")?window.location.replace("/#/WF/M_MyFlowGener?"+o(e)):window.location.replace("/#/WF/MyFlowGener?"+o(e))),a==="MyViewGener"&&(l.includes("S_MyView")&&window.location.replace("/#/WF/S_MyViewGener?"+o(e)),l.includes("M_MyView")?window.location.replace("/#/WF/M_MyViewGener?"+o(e)):window.location.replace("/index.html#/WF/MyViewGener?"+o(e))),a==="MyViewTree"&&(l.includes("S_MyView")&&window.location.replace("/#/WF/S_MyFlowTree?"+o(e)+"&IsReadonly=1&PageType=MyView"),l.includes("M_MyView")?window.location.replace("/#/WF/M_MyFlowTree?"+o(e)+"&IsReadonly=1&PageType=MyView"):window.location.replace("/#/WF/MyFlowTree?"+o(e)+"&IsReadonly=1&PageType=MyView")),a==="MyViewSelfForm"&&(l.includes("S_MyView")&&window.location.replace("/#/WF/S_MyFlowSelfForm?"+o(e)+"&IsReadonly=1&PageType=MyView"),l.includes("M_MyView")?window.location.replace("/#/WF/M_MyFlowSelfForm?"+o(e)+"&IsReadonly=1&PageType=MyView"):window.location.replace("/#/WF/MyFlowSelfForm?"+o(e)+"&IsReadonly=1&PageType=MyView")),a==="MyFlowSelfForm"&&(l.includes("S_MyView")?window.location.replace("/#/WF/S_MyFlowSelfForm?"+o(e)+"&IsReadonly=0&PageType=MyFlow"):l.includes("S_MyView")?window.location.replace("/#/WF/M_MyFlowSelfForm?"+o(e)+"&IsReadonly=0&PageType=MyFlow"):window.location.replace("/#/WF/MyFlowSelfForm?"+o(e)+"&IsReadonly=0&PageType=MyFlow"));return}e.includes("err@")&&P.error(e.replace("err@",""))}catch(i){s.hasError=!0,s.tips=i;return}finally{n.value=!1}}))(),(i,e)=>(y(),d("div",T,[V(g(W),{spinning:n.value},{default:m(()=>[s.hasError?(y(),d("div",I,S(s.tips),1)):(y(),d("div",R))]),_:1},8,["spinning"])]))}});export{v as default};