1 |
- import{d as p,b as u,i as l}from"./index.bfa8babc.js";import{a as m}from"./objectUtil.ec24ceed.js";import{c as d}from"./constant.d4a76877.js";const v=p({name:"musicPreView",props:{item:{type:Object,default:()=>{}},isMove:{type:Number,default:0,required:!1}},setup(t,{emit:r}){const e=u().getToken,o={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://mec.colexiu.com"},a=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//mec.colexiu")?"online":"dev",c=o[a];let i=(/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com/":c)+`/instrument/?_t=${Date.now()}&id=${t.item.id}&modelType=practise&modeType=json&Authorization=${e}&isCbs=true`;return i=t.isMove==1?i+"&isMove=1":i,()=>l("div",null,[l("iframe",{width:"667px",height:"375px",frameborder:"0",src:i},null)])}}),N=(t,r)=>{if(r=="PLATFORM")return"--";let n="";if(t){const e=t.applicationName;if(r=="ORG"){const o=t.organizationRole?"-"+t.organizationRole:"";n+=e+o}else if(r=="PERSON"){t!=null&&t.userName&&(n=t.userName);let o=m(t.clientType,new Map(Object.entries(d)));o=o?"-"+o:"",n+=" ("+e+o+")"}}return n},R=(t,r)=>{const n=r.toString();let e=document.querySelector("#copy-input");e||(e=document.createElement("input"),e.id="copy-input",e.readOnly=!0,e.style.position="fixed",e.style.left="-1000px",e.style.zIndex="-1000",document.body.appendChild(e)),e.value=n,o(e,0,n.length),document.execCommand("copy")&&(document.execCommand("copy"),t.success("\u590D\u5236\u6210\u529F")),e.blur();function o(a,c,s){if(a.createTextRange){const i=a.createTextRange();i.collapse(!0),i.moveStart("character",c),i.moveEnd("character",s-c),i.select()}else a.setSelectionRange(c,s),a.focus()}};export{v as M,R as c,N as g};
|