Compare commits
4 Commits
c8800cb212
...
da8e74d35d
| Author | SHA1 | Date |
|---|---|---|
|
|
da8e74d35d | |
|
|
07359c4c26 | |
|
|
5939cf1dd3 | |
|
|
0f149c4729 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -7,19 +7,21 @@
|
||||||
<title>Unity WebGL Player | ElectricPowerStorage_Digital Twin</title>
|
<title>Unity WebGL Player | ElectricPowerStorage_Digital Twin</title>
|
||||||
<link rel="shortcut icon" href="TemplateData/favicon.ico">
|
<link rel="shortcut icon" href="TemplateData/favicon.ico">
|
||||||
<link rel="stylesheet" href="TemplateData/style.css">
|
<link rel="stylesheet" href="TemplateData/style.css">
|
||||||
<style>
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
|
<style>
|
||||||
|
body,
|
||||||
|
html {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="unity-container" style="width: 100%;height: 100%;" class="unity-desktop">
|
<div id="unity-container" style="width: 100%;height:100%" class="unity-desktop">
|
||||||
<canvas id="unity-canvas" style="width: 100%;height: 100%;"></canvas>
|
<canvas id="unity-canvas" style="width: 100%;height:100%"></canvas>
|
||||||
<div id="unity-loading-bar">
|
<div id="unity-loading-bar">
|
||||||
<div id="unity-logo"></div>
|
<div id="unity-logo"></div>
|
||||||
<div id="unity-progress-bar-empty">
|
<div id="unity-progress-bar-empty">
|
||||||
|
|
@ -66,11 +68,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var buildUrl = "Build";
|
var buildUrl = "Build";
|
||||||
var loaderUrl = buildUrl + "/EPS_Yzpq.loader.js";
|
var loaderUrl = buildUrl + "/WebglQidong.loader.js";
|
||||||
var config = {
|
var config = {
|
||||||
dataUrl: buildUrl + "/EPS_Yzpq.data.unityweb",
|
dataUrl: buildUrl + "/WebglQidong.data.unityweb",
|
||||||
frameworkUrl: buildUrl + "/EPS_Yzpq.framework.js.unityweb",
|
frameworkUrl: buildUrl + "/WebglQidong.framework.js.unityweb",
|
||||||
codeUrl: buildUrl + "/EPS_Yzpq.wasm.unityweb",
|
codeUrl: buildUrl + "/WebglQidong.wasm.unityweb",
|
||||||
streamingAssetsUrl: "StreamingAssets",
|
streamingAssetsUrl: "StreamingAssets",
|
||||||
companyName: "DefaultCompany",
|
companyName: "DefaultCompany",
|
||||||
productName: "ElectricPowerStorage_Digital Twin",
|
productName: "ElectricPowerStorage_Digital Twin",
|
||||||
|
|
@ -118,8 +120,8 @@
|
||||||
createUnityInstance(canvas, config, (progress) => {
|
createUnityInstance(canvas, config, (progress) => {
|
||||||
progressBarFull.style.width = 100 * progress + "%";
|
progressBarFull.style.width = 100 * progress + "%";
|
||||||
}).then((unityInstance) => {
|
}).then((unityInstance) => {
|
||||||
|
loadingBar.style.display = "none";
|
||||||
unityInstanceA = unityInstance
|
unityInstanceA = unityInstance
|
||||||
loadingBar.style.display = "none";
|
|
||||||
fullscreenButton.onclick = () => {
|
fullscreenButton.onclick = () => {
|
||||||
unityInstance.SetFullscreen(1);
|
unityInstance.SetFullscreen(1);
|
||||||
};
|
};
|
||||||
|
|
@ -128,44 +130,43 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
|
function shelvesList(val) {
|
||||||
// c仓位号查询
|
|
||||||
// function wareHouse(){
|
|
||||||
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// 定位货架位置
|
|
||||||
function shelvesList(val){
|
|
||||||
console.log(val,'unity');
|
console.log(val,'unity');
|
||||||
// unityInstanceA.Unity_ShelvesList(val)
|
// unityInstanceA.Unity_ShelvesList(val)
|
||||||
unityInstanceA.SendMessage("Manager","Unity_ShelvesList",val );
|
unityInstanceA.SendMessage("Manager", "Unity_ShelvesList", val);
|
||||||
}
|
}
|
||||||
// 视角切换
|
// 视角切换
|
||||||
function updateScene(val){
|
function updateScene(val) {
|
||||||
// console.log(val,'unity');
|
// console.log(val,'unity');
|
||||||
unityInstanceA.SendMessage("Manager","Unity_ViewportChange",val+'');
|
unityInstanceA.SendMessage("Manager", "Unity_ViewportChange", val + '');
|
||||||
}
|
}
|
||||||
// 库房的定位
|
// 库房的定位
|
||||||
function selectHome(val){
|
function selectHome(val) {
|
||||||
// console.log(val,'库房的定位');
|
console.log(val,'库房的定位');
|
||||||
unityInstanceA.SendMessage("Manager","Unity_WarehouseList",val);
|
unityInstanceA.SendMessage("Manager", "Unity_WarehouseList", val);
|
||||||
}
|
}
|
||||||
// 库外的按钮
|
// 库外的按钮
|
||||||
function outHome(){
|
function outHome() {
|
||||||
// console.log(5);
|
// console.log(5);
|
||||||
unityInstanceA.SendMessage("Manager","Unity_OutWarehouse",'');
|
unityInstanceA.SendMessage("Manager", "Unity_OutWarehouse", '');
|
||||||
}
|
}
|
||||||
// 转运
|
// 转运
|
||||||
function transport(val){
|
function transport(val) {
|
||||||
// console.log('转运',val);
|
// console.log('转运',val);
|
||||||
unityInstanceA.SendMessage("Manager","Unity_Transport",val+'');
|
unityInstanceA.SendMessage("Manager", "Unity_Transport", val + '');
|
||||||
}
|
}
|
||||||
// 显隐
|
// 显隐
|
||||||
function hide(val){
|
function hide(val) {
|
||||||
// console.log('显隐',val);
|
// console.log('显隐',val);
|
||||||
unityInstanceA.SendMessage("Manager","Unity_Transparence",val+'');
|
unityInstanceA.SendMessage("Manager", "Unity_Transparence", val + '');
|
||||||
}
|
}
|
||||||
|
// console.log(window.parent.loadding,'xxxxxx');
|
||||||
|
function loadding(){
|
||||||
|
// console.log(window.parent.loadFin);
|
||||||
|
// 加载完成显示三维场景
|
||||||
|
window.parent.loadFin()
|
||||||
|
}
|
||||||
|
// loadding()
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title>扬中数字孪生仓库</title>
|
<title>启东南苑路数字孪生仓库</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|
|
||||||
34
src/App.vue
34
src/App.vue
|
|
@ -2,7 +2,7 @@
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<!-- unity3D -->
|
<!-- unity3D -->
|
||||||
<iframe id="iframe" ref="dome" width="100%" height="100%" src="EPS_Yzpq/index.html" frameborder="0"></iframe>
|
<iframe id="iframe" ref="dome" width="100%" height="100%" src="EPS_Yzpq/index.html" frameborder="0"></iframe>
|
||||||
<div class="load">
|
<div class="load" v-show="loadShow==true">
|
||||||
<div class="loadding"></div>
|
<div class="loadding"></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
|
|
@ -25,15 +25,16 @@
|
||||||
<span class="downPull"><img :src="i==index ? s.selectImg : s.img" alt="" /></span>
|
<span class="downPull"><img :src="i==index ? s.selectImg : s.img" alt="" /></span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<ul class="menuContent">
|
<ul class="menuContent">
|
||||||
<li v-for="(num, index) in 15" :key="index" @click="shelfHanlder($event)">LD1_B01-{{ num < 10 ? "0" + num
|
<!-- <li v-for="(num, index) in 15" :key="index" @click="shelfHanlder($event)">LD1_B01-{{ num < 10 ? "0" + num
|
||||||
: num }}</li>
|
: num }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="menuContent">
|
<ul class="menuContent">
|
||||||
<li v-for="(num, index) in 9" :key="index + 1" @click="shelfHanlder($event)">LD1_C01-{{ num < 10 ? "0" +
|
<li v-for="(num, index) in 9" :key="index + 1" @click="shelfHanlder($event)">LD1_C01-{{ num < 10 ? "0" +
|
||||||
num : num }}</li>
|
num : num }}</li> -->
|
||||||
<!-- <li @click="shelfHanlder($event)">LD1_B01-01</li> -->
|
<!-- <li @click="shelfHanlder($event)">LD1_B01-01</li> -->
|
||||||
<li @click="shelfHanlder($event)">LD1_C02-01</li>
|
<!-- <li @click="shelfHanlder($event)">LD1_C02-01</li> -->
|
||||||
<li @click="shelfHanlder($event)">LD1_C03-01</li>
|
<li v-for="(num, index) in 6" :key="index" @click="shelfHanlder($event)">FF1_C01-{{ num < 10 ? "0" + num :
|
||||||
|
num }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
@ -43,10 +44,14 @@
|
||||||
<span class="downPull"><img :src="i==index ? s.selectImg : s.img" alt="" /></span>
|
<span class="downPull"><img :src="i==index ? s.selectImg : s.img" alt="" /></span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<ul class="menuContent">
|
<ul class="menuContent">
|
||||||
|
<!-- <li @click="selectHomeN($event)">B01</li>
|
||||||
|
<li @click="selectHomeN($event)">C01</li>
|
||||||
|
<li @click="selectHomeN($event)">C02</li> -->
|
||||||
|
<li @click="selectHomeN($event)">A01</li>
|
||||||
<li @click="selectHomeN($event)">B01</li>
|
<li @click="selectHomeN($event)">B01</li>
|
||||||
<li @click="selectHomeN($event)">C01</li>
|
<li @click="selectHomeN($event)">C01</li>
|
||||||
<li @click="selectHomeN($event)">C02</li>
|
<li @click="selectHomeN($event)">D01</li>
|
||||||
<li @click="selectHomeN($event)">C03</li>
|
<li @click="selectHomeN($event)">E01</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- <el-dropdown-item @click="selectHomeN($event)">B01</el-dropdown-item>
|
<!-- <el-dropdown-item @click="selectHomeN($event)">B01</el-dropdown-item>
|
||||||
<el-dropdown-item @click="selectHomeN($event)">C01</el-dropdown-item>
|
<el-dropdown-item @click="selectHomeN($event)">C01</el-dropdown-item>
|
||||||
|
|
@ -109,6 +114,8 @@ export default {
|
||||||
index: null,
|
index: null,
|
||||||
|
|
||||||
navLiState: false,
|
navLiState: false,
|
||||||
|
|
||||||
|
loadShow:true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -120,8 +127,15 @@ export default {
|
||||||
|
|
||||||
// window.parent.shelvesList = this.shelfHanlder
|
// window.parent.shelvesList = this.shelfHanlder
|
||||||
},
|
},
|
||||||
|
mounted(){
|
||||||
|
window.loadFin = this.load
|
||||||
|
// console.log(window.loadding,'执行方法');
|
||||||
|
// this.load()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
load(){
|
||||||
|
this.loadShow = false
|
||||||
|
},
|
||||||
shelfHanlder(e) {
|
shelfHanlder(e) {
|
||||||
// console.log();
|
// console.log();
|
||||||
// e.currentTarget.parentElement.parentElement.style.display = "none";
|
// e.currentTarget.parentElement.parentElement.style.display = "none";
|
||||||
|
|
@ -256,7 +270,7 @@ html {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// z-index: 0;
|
// z-index: 0;
|
||||||
display: none;
|
// display: none;
|
||||||
background-color: rgba(0, 0, 0, 1);
|
background-color: rgba(0, 0, 0, 1);
|
||||||
|
|
||||||
.loadding {
|
.loadding {
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.9 KiB |
Loading…
Reference in New Issue