|
@@ -6,7 +6,7 @@
|
|
|
<div v-if="!isLoaded" ref="loading" id="loading">正在进入系统中...</div>
|
|
|
<div v-if="reconnect" class="reconnect">网络连接中断,正在进行重连...</div>
|
|
|
<div v-if="loadProgressValue>0 && loadProgressValue<100" class="reconnect">
|
|
|
- <div class="loadText">模型加载中...</div>
|
|
|
+ <div class="loadText">{{modelName}}模型加载中...</div>
|
|
|
<div class="loadProgress" :style="{width:loadProgressValue+'%'}"></div>
|
|
|
</div>
|
|
|
<video ref="EngineContent" autoplay muted style="width: 1920px;height:1080px;">浏览器不支持</video>
|
|
@@ -21,7 +21,8 @@
|
|
|
</div>
|
|
|
<div id="iframeWin" v-if="isShowIframeWin" :class="iframeWinData.class">
|
|
|
<div class="title"><span class="text" v-html="iframeWinData.title"></span><img src="../../assets/image/Close.png" style="margin: 7px 17px;float: right;cursor: pointer;" @click="CloseIframeWin"></div>
|
|
|
- <div class="content"><iframe id="ifrm" :src="iframeWinData.src" class=""></iframe></div>
|
|
|
+ <div v-if="!isLoadedIframe" class="iframeLoading">正在进入页面中...</div>
|
|
|
+ <div class="content"><iframe id="ifrm" :src="iframeWinData.src" class="" @load="onIframeLoad"></iframe></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -51,13 +52,14 @@ export default {
|
|
|
const EngineContent=ref(null);
|
|
|
const reconnect=ref(false);
|
|
|
const isShowIframeWin = ref(false);
|
|
|
+ const isLoadedIframe = ref(false);
|
|
|
const iframeWinData = ref({});
|
|
|
const autoplayer_btn =ref(null);
|
|
|
let In02ClickEvent = ref(null);
|
|
|
let In04ClickEvent = ref(null);
|
|
|
let In03ClickEvent = ref(null);
|
|
|
let In05ClickEvent = ref(null);
|
|
|
- const In03Ele = ref(null);
|
|
|
+ const modelName = ref('');
|
|
|
let isLoaded = ref(false);
|
|
|
let isClearEle = ref(false);
|
|
|
window.player = null;
|
|
@@ -91,8 +93,13 @@ export default {
|
|
|
src:info.src,
|
|
|
title:info.title
|
|
|
};
|
|
|
+ isLoadedIframe.value = false;
|
|
|
isShowIframeWin.value=true;
|
|
|
}
|
|
|
+ function onIframeLoad(){
|
|
|
+ //
|
|
|
+ isLoadedIframe.value = true;
|
|
|
+ }
|
|
|
function ShowLoading(){
|
|
|
lottie.loadAnimation({
|
|
|
// 选取一个容器,用于渲染动画
|
|
@@ -213,6 +220,7 @@ export default {
|
|
|
for(let k in window.modelLoadState){
|
|
|
if(window.modelLoadState[k]==false) window.modelLoadState[k]=null;//重置模型加载状态
|
|
|
}
|
|
|
+ EngineContent.value.load();
|
|
|
EngineContent.value.play();
|
|
|
playerNative.value =Native;
|
|
|
//模型加载完成监听处理
|
|
@@ -247,7 +255,7 @@ export default {
|
|
|
});
|
|
|
//模型加载中监听处理
|
|
|
Native.Model.EventProgress.connect(function(v,hander,name){
|
|
|
- console.log(new Date().getTime()," ",name,":",v)
|
|
|
+ //console.log(new Date().getTime()," ",name,":",v)
|
|
|
//当进度大于0.99时,交由EventProgressEnd监听处理
|
|
|
if(window.CurrentTargetType!=name || v>0.99 ||v<1) return;
|
|
|
loadProgressValue.value = (v*100).toFixed(0);
|
|
@@ -350,10 +358,11 @@ export default {
|
|
|
async function loadFacModel(Native){
|
|
|
if(currentTargetType.value=="FAC") return;
|
|
|
currentTargetType.value="FAC";
|
|
|
+ modelName.value = '全厂';
|
|
|
await player.Native.Settings.set('ambientIndenty', 'float', 0.39);//初始化环境光补偿
|
|
|
await player.Native.Settings.set('diffuseIntensity', 'float', 1.2);//初始化光线强度
|
|
|
await player.Native.Settings.set('specularIntensity', 'float', 0.64);//初始化高光强度
|
|
|
- if(modelLoadState[currentTargetType.value]==null){
|
|
|
+ if(modelLoadState[currentTargetType.value]==null){
|
|
|
loadProgressValue.value = 1;
|
|
|
modelLoadState['FAC']=false;
|
|
|
var cf = "data://models/T_ALL.pr";
|
|
@@ -391,6 +400,7 @@ export default {
|
|
|
}
|
|
|
//印花
|
|
|
async function loadIn03Model(Native){
|
|
|
+ modelName.value = '染整';
|
|
|
player.Native.Settings.set('ambientIndenty', 'float', 1);//初始化环境光补偿
|
|
|
player.Native.Settings.set('diffuseIntensity', 'float', 2.5);//初始化光线强度
|
|
|
player.Native.Settings.set('specularIntensity', 'float', 0.6);//初始化高光强度
|
|
@@ -415,6 +425,7 @@ export default {
|
|
|
}
|
|
|
//经编
|
|
|
async function loadIn02Model(Native){
|
|
|
+ modelName.value = '经编';
|
|
|
player.Native.Settings.set('ambientIndenty', 'float', 0.39);//初始化环境光补偿
|
|
|
player.Native.Settings.set('diffuseIntensity', 'float', 0.8);//初始化光线强度
|
|
|
player.Native.Settings.set('specularIntensity', 'float', 0.64);//初始化高光强度
|
|
@@ -451,7 +462,9 @@ export default {
|
|
|
})
|
|
|
return {
|
|
|
player,
|
|
|
+ modelName,
|
|
|
isShowIframeWin,
|
|
|
+ isLoadedIframe,
|
|
|
iframeWinData,
|
|
|
facMarkerLClick,
|
|
|
CloseIframeWin,
|
|
@@ -478,6 +491,7 @@ export default {
|
|
|
getBottomBtnImg,
|
|
|
markerLClickObj,
|
|
|
loadNavModel,
|
|
|
+ onIframeLoad,
|
|
|
}
|
|
|
},
|
|
|
}
|