1 |
- import{d as b,u as y,r as s,c as h,e as k,q as z,T as g,f as t,l as d,m,E as C,k as u,x as R,j as p,z as v}from"./index-b48b51d2-1720699367816.js";const S="_wrap_rryzt_1",x="_previewWindow_rryzt_12",q="_previewIframe_rryzt_16",M="_removeVisiable_rryzt_21",D="_studentRemove_rryzt_27",E="_btnGroupModal_rryzt_39",a={wrap:S,previewWindow:x,previewIframe:q,removeVisiable:M,studentRemove:D,btnGroupModal:E},U=b({name:"notation-a",setup(){y();const l=s(!1),n=s(!1),r=s({}),o=s(!1),w=h().getToken||"",i=s(),f=sessionStorage.getItem("notation-open-create")=="1"?"&addShow=1":"";sessionStorage.removeItem("notation-open-create");const F=k({src:"".concat(/(192|localhost)/.test(location.origin)?"https://test.lexiaoya.cn":location.origin,"/notation/?t=").concat(Date.now(),"#/create?v=").concat(Date.now(),"&Authorization=").concat(w).concat(f)}),_=()=>{const e=document.documentElement;e.requestFullscreen&&e.requestFullscreen()||e.mozRequestFullScreen&&e.mozRequestFullScreen()||e.webkitRequestFullscreen&&e.webkitRequestFullscreen()||e.msRequestFullscreen&&e.msRequestFullscreen()},c=e=>{console.log(e.data,"data"),e.data.api==="notation_open"?v.application?(l.value=!0,n.value=!0,r.value={url:e.data.url},_()):window.open(e.data.url):e.data.api==="notation_exit"&&(console.log("进来"),o.value=!0)};return z(()=>{window.addEventListener("message",c)}),g(()=>{window.removeEventListener("message",c)}),()=>t("div",{class:a.wrap},[t("iframe",{ref:i,src:F.src,key:Date.now()},null),t(d,{maskClosable:m,show:n.value,"onUpdate:show":e=>n.value=e,class:a.previewWindow,showIcon:!1,displayDirective:"show"},{default:()=>[t(C,{show:l.value,style:"--n-opacity-spinning: 1;"},{default:()=>[t("iframe",{class:a.previewIframe,onLoad:()=>{l.value=!1},frameborder:"0",src:r.value.url},null)]})]}),t(d,{maskClosable:m,show:o.value,"onUpdate:show":e=>o.value=e,preset:"card",class:["modalTitle",a.removeVisiable],title:"退出制谱"},{default:()=>[t("div",{class:a.studentRemove},[t("p",null,[u("是否退出制谱功能?")]),t(R,{class:a.btnGroupModal,justify:"center"},{default:()=>[t(p,{round:!0,type:"primary",onClick:()=>{n.value=!1,r.value.url="",o.value=!1,i.value.contentWindow.postMessage({api:"reload"},"*"),v.application&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen())}},{default:()=>[u("确定")]}),t(p,{round:!0,onClick:()=>o.value=!1},{default:()=>[u("取消")]})]})])]})])}});export{U as default};
|