2 lines
3.0 KiB
Java
2 lines
3.0 KiB
Java
var x=Object.defineProperty;var S=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var y=(i,r,e)=>r in i?x(i,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[r]=e,d=(i,r)=>{for(var e in r||(r={}))I.call(r,e)&&y(i,e,r[e]);if(S)for(var e of S(r))U.call(r,e)&&y(i,e,r[e]);return i};var v=(i,r,e)=>new Promise((b,g)=>{var a=u=>{try{l(e.next(u))}catch(m){g(m)}},c=u=>{try{l(e.throw(u))}catch(m){g(m)}},l=u=>u.done?b(u.value):Promise.resolve(u.value).then(a,c);l((e=e.apply(i,r)).next())});import{a1 as j,u as D,ai as O,aj as T,ak as _,s as A}from"./index-X7Y8jykP.js";import{connectWebSocket as B,onWebSocket as E}from"./useWebSocket-CMyoaPFz.js";import"./index-BDvqZ5j4.js";import{p as N,r as M,n as q}from"./vue-vendor-DNhG1Cve.js";import{u as G}from"./useModal-DaJ3Bflg.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./BasicModal-xH56XuRZ.js";import"./ModalHeader-Sr8KwhJJ.js";import"./useTimeout-D5AmIBZw.js";import"./index-BzChaRPg.js";import"./useWindowSizeFn-C-0M9_Ul.js";import"./index-ByCwbQDV.js";import"./index-Upeu4GGa.js";import"./index-C4wWpZeQ.js";import"./index-M9QP6cvf.js";import"./Skeleton-CimgOdM7.js";import"./useScrollTo-0FPEw5-K.js";import"./useIntersectionObserver-BGOgyKyu.js";import"./useAppInject-DPZGPcR3.js";import"./index-CuWaQdlK.js";import"./index-DO7ZhK45.js";const{createMessage:ce}=A();function me(){const i=j(),{push:r,currentRoute:e}=N();D();function b(){var s;const t=O(),o=T(t),n=((s=i.domainUrl)==null?void 0:s.replace("https://","wss://").replace("http://","ws://"))+"/dragChannelSocket/"+o;B(n),E(g)}function g(t){return v(this,null,function*(){if((t==null?void 0:t.CMD)==="drag"){const o=t.result.action,n=t.result.type;let s=t.result.url;const p=t.result.records||{};if(o=="url"){s=="fileUrl"&&(s=p[s]);const f=_(s);s.startsWith("http")?window.open(s,"_blank"):r({path:f.url,query:d(d({},f.params),p)})}else switch(n){case"email":m("email",{record:p});break}}})}const a=M(null),c=M({}),l=M({}),u=M({});function m(t,o){return v(this,null,function*(){switch(a.value=null,c.value=d({},o),t){case"email":a.value="EoaMailBoxInModal";break;default:a.value=null;break}R(),yield q(()=>{var n;(n=l.value[a.value])!=null&&n.isRegister&&l.value[a.value].modalMethods.openModal(!0,c.value)})})}function R(){if(a.value&&!l.value[a.value]){const[t,o]=G();l.value[a.value]={isRegister:!1,register:W(t,o),modalMethods:o}}}function W(t,o){return(...n)=>v(null,null,function*(){yield t(...n),o.openModal(!0,c.value),l.value[a.value].isRegister=!0})}function C(){var n,s,p,f;const t=document.getElementsByClassName("jeecg-iframe-page__main"),o=Array.from(t);if((s=(n=e.value)==null?void 0:n.meta)!=null&&s.frameSrc&&((f=(p=e.value)==null?void 0:p.meta)==null?void 0:f.frameSrc.indexOf("/drag/view?pageId="))>=0){const k=o.find(P=>{var h,w;return P.src==((w=(h=e.value)==null?void 0:h.meta)==null?void 0:w.frameSrc)});k&&k.contentWindow.postMessage({reload:!0},"*")}}return{initDragWebSocket:b,handleOpenType:m,currentModal:a,modalParams:c,modalRegCache:l,bindParams:u,reloadPage:C}}export{me as useDragNotice};
|