|
@@ -15,6 +15,8 @@
|
|
<t-menu-item v-if="!selections.mode&&hasC()" value="updateC"> 一键更新我的组件 </t-menu-item>
|
|
<t-menu-item v-if="!selections.mode&&hasC()" value="updateC"> 一键更新我的组件 </t-menu-item>
|
|
<t-menu-item v-if="isAppend()" value="appendChild"> 追加状态 </t-menu-item>
|
|
<t-menu-item v-if="isAppend()" value="appendChild"> 追加状态 </t-menu-item>
|
|
<t-menu-item v-if="is3D()" value="goto3d"> 进入3D可视化编辑 </t-menu-item>
|
|
<t-menu-item v-if="is3D()" value="goto3d"> 进入3D可视化编辑 </t-menu-item>
|
|
|
|
+ <t-menu-item v-if="is2D()" value="goto2d"> 进入2D可视化编辑 </t-menu-item>
|
|
|
|
+ <t-menu-item v-if="isV()" value="gotov"> 进入大屏可视化编辑 </t-menu-item>
|
|
<t-menu-item v-if="isTableNoFocus()" value="focus">
|
|
<t-menu-item v-if="isTableNoFocus()" value="focus">
|
|
<div class="flex">进入编辑模式<span class="flex-grow"></span>Enter</div>
|
|
<div class="flex">进入编辑模式<span class="flex-grow"></span>Enter</div>
|
|
</t-menu-item>
|
|
</t-menu-item>
|
|
@@ -121,6 +123,7 @@ onMounted(() => {
|
|
});
|
|
});
|
|
|
|
|
|
const onMenu = (val: string) => {
|
|
const onMenu = (val: string) => {
|
|
|
|
+ let id,url;
|
|
switch (val) {
|
|
switch (val) {
|
|
case 'addAnchorHand':
|
|
case 'addAnchorHand':
|
|
meta2d.addAnchorHand();
|
|
meta2d.addAnchorHand();
|
|
@@ -192,17 +195,35 @@ const onMenu = (val: string) => {
|
|
meta2d.store.active[0].calculative.focus = false;
|
|
meta2d.store.active[0].calculative.focus = false;
|
|
break;
|
|
break;
|
|
case 'goto3d':
|
|
case 'goto3d':
|
|
- let id = meta2d?.store.active[0].iframe.split("id=")[1];
|
|
|
|
- let url = `https://3d${rootDomain}/?id=`;
|
|
|
|
- if(isDownload){
|
|
|
|
- //安装包
|
|
|
|
- url = location.origin+ `/3d/?id=`;
|
|
|
|
- }
|
|
|
|
- if (window.url3D) {
|
|
|
|
- url = window.url3D;
|
|
|
|
- }
|
|
|
|
- window.open(url + id, '_blank');
|
|
|
|
- break;
|
|
|
|
|
|
+ id = meta2d?.store.active[0].iframe.split("id=")[1];
|
|
|
|
+ url = `https://3d${rootDomain}/?id=`;
|
|
|
|
+ if(isDownload){
|
|
|
|
+ //安装包
|
|
|
|
+ url = location.origin+ `/3d/?id=`;
|
|
|
|
+ }
|
|
|
|
+ if (window.url3D) {
|
|
|
|
+ url = window.url3D;
|
|
|
|
+ }
|
|
|
|
+ window.open(url + id, '_blank');
|
|
|
|
+ break;
|
|
|
|
+ case 'goto2d':
|
|
|
|
+ id = meta2d?.store.active[0].iframe.split("id=")[1];
|
|
|
|
+ url = `https://2d${rootDomain}/?id=`;
|
|
|
|
+ if(isDownload){
|
|
|
|
+ //安装包
|
|
|
|
+ url = location.origin+ `/2d/?id=`;
|
|
|
|
+ }
|
|
|
|
+ window.open(url + id, '_blank');
|
|
|
|
+ break;
|
|
|
|
+ case 'gotov':
|
|
|
|
+ id = meta2d?.store.active[0].iframe.split("id=")[1];
|
|
|
|
+ url = `https://v${rootDomain}/?id=`;
|
|
|
|
+ if(isDownload){
|
|
|
|
+ //安装包
|
|
|
|
+ url = location.origin+ `/v/?id=`;
|
|
|
|
+ }
|
|
|
|
+ window.open(url + id, '_blank');
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
|
|
|
|
emit('changeVisible', false);
|
|
emit('changeVisible', false);
|
|
@@ -228,6 +249,14 @@ const is3D = ()=>{
|
|
return meta2d?.store.active.length === 1 && meta2d?.store.active[0].name === "iframe" && (meta2d?.store.active[0].iframe.indexOf("3d.") > -1||meta2d?.store.active[0].iframe.indexOf("/3d") > -1);
|
|
return meta2d?.store.active.length === 1 && meta2d?.store.active[0].name === "iframe" && (meta2d?.store.active[0].iframe.indexOf("3d.") > -1||meta2d?.store.active[0].iframe.indexOf("/3d") > -1);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const is2D = ()=>{
|
|
|
|
+ return meta2d?.store.active.length === 1 && meta2d?.store.active[0].name === "iframe" && (meta2d?.store.active[0].iframe.indexOf("2d.") > -1||meta2d?.store.active[0].iframe.indexOf("/2d") > -1);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const isV = ()=>{
|
|
|
|
+ return meta2d?.store.active.length === 1 && meta2d?.store.active[0].name === "iframe" && (meta2d?.store.active[0].iframe.indexOf("v.") > -1||meta2d?.store.active[0].iframe.indexOf("/v") > -1) &&(meta2d?.store.active[0].iframe.indexOf(`v${rootDomain}`) !== -1 || meta2d?.store.active[0].iframe.indexOf(`view${rootDomain}/v`) !== -1);
|
|
|
|
+}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="postcss" scoped>
|
|
<style lang="postcss" scoped>
|