|
|
@@ -5,6 +5,7 @@
|
|
|
<el-button type="primary" @click="clearScene" style="margin-left: 3px;">清空</el-button>
|
|
|
<el-button type="primary" @click="resetCamera" style="margin-left: 3px;">重置</el-button>
|
|
|
<el-button type="primary" @click="toView" style="margin-left: 3px;">预览</el-button>
|
|
|
+ <el-button type="primary" @click="toFull" style="margin-left: 3px;">全屏</el-button>
|
|
|
<el-button @click="showDrawer" type="primary" style="margin-left: 3px;">
|
|
|
模型
|
|
|
</el-button>
|
|
|
@@ -65,25 +66,43 @@
|
|
|
var scene:any;
|
|
|
var settings = {selMesh: selMesh, color: '#ff0000' , x: 0, y: 0, z:0, rx:0, ry:0, rz:0, sx:1, sy:1, sz:1}
|
|
|
let data = getWallData(maxWidth, maxLength);
|
|
|
+ let pathname:any;
|
|
|
var drawer = ref(false);
|
|
|
var isOperater = ref(true);
|
|
|
var activeNames = ref(['1', '2'])
|
|
|
var baseScaleX = 1;
|
|
|
var baseScaleY = 1;
|
|
|
var baseScaleZ = 1;
|
|
|
+
|
|
|
+ const isShowView=(val:boolean)=>{
|
|
|
+ pathname = window.location.pathname;
|
|
|
+ if("/showView" == pathname){
|
|
|
+ isOperater.value = false;
|
|
|
+ }else{
|
|
|
+ isOperater.value = val;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const showView =() =>{
|
|
|
+ pathname = window.location.pathname;
|
|
|
+ isShowView(true);
|
|
|
+ }
|
|
|
+ showView();
|
|
|
|
|
|
const isFullScreen=()=>{
|
|
|
- isOperater.value = false;
|
|
|
+ isShowView(false);
|
|
|
fullscreenToggel();
|
|
|
}
|
|
|
+ function toFull(){
|
|
|
+ isFullScreen();
|
|
|
+ }
|
|
|
|
|
|
const showDrawer =() =>{
|
|
|
drawer.value = true;
|
|
|
}
|
|
|
|
|
|
function toView(){
|
|
|
- // window.open("/showView", '_blank');
|
|
|
- isFullScreen();
|
|
|
+ window.open("/showView", '_blank');
|
|
|
}
|
|
|
|
|
|
function handleChange(val:string){
|
|
|
@@ -207,7 +226,7 @@
|
|
|
let currentWidth = window.innerWidth;
|
|
|
let currentHeight = window.innerHeight;
|
|
|
if (currentWidth < prevWidth || currentHeight < prevHeight) {
|
|
|
- isOperater.value = true;;
|
|
|
+ isShowView(true);
|
|
|
}
|
|
|
prevWidth = currentWidth;
|
|
|
prevHeight = currentHeight;
|
|
|
@@ -445,7 +464,8 @@
|
|
|
localStorage.removeItem("scene");
|
|
|
location.reload();
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
window.addEventListener('keydown', function(event) {
|
|
|
if (event.key === 'Delete' || event.keyCode === 46) {
|
|
|
if(settings.selMesh){
|
|
|
@@ -480,7 +500,7 @@
|
|
|
// }
|
|
|
}
|
|
|
if (event.key === 'Escape'|| event.keyCode === 27) {
|
|
|
- isOperater.value = true;
|
|
|
+ isShowView(true);
|
|
|
}
|
|
|
// if(event.key == "up"||event.key == "right" || event.keyCode === 39 || event.keyCode === 38){
|
|
|
// var element:any = getFocusElement();
|