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>
|
||||
<link rel="shortcut icon" href="TemplateData/favicon.ico">
|
||||
<link rel="stylesheet" href="TemplateData/style.css">
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<style>
|
||||
body,
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div id="unity-container" style="width: 100%;height: 100%;" class="unity-desktop">
|
||||
<canvas id="unity-canvas" style="width: 100%;height: 100%;"></canvas>
|
||||
<div id="unity-container" style="width: 100%;height:100%" class="unity-desktop">
|
||||
<canvas id="unity-canvas" style="width: 100%;height:100%"></canvas>
|
||||
<div id="unity-loading-bar">
|
||||
<div id="unity-logo"></div>
|
||||
<div id="unity-progress-bar-empty">
|
||||
|
|
@ -66,11 +68,11 @@
|
|||
}
|
||||
|
||||
var buildUrl = "Build";
|
||||
var loaderUrl = buildUrl + "/EPS_Yzpq.loader.js";
|
||||
var loaderUrl = buildUrl + "/WebglQidong.loader.js";
|
||||
var config = {
|
||||
dataUrl: buildUrl + "/EPS_Yzpq.data.unityweb",
|
||||
frameworkUrl: buildUrl + "/EPS_Yzpq.framework.js.unityweb",
|
||||
codeUrl: buildUrl + "/EPS_Yzpq.wasm.unityweb",
|
||||
dataUrl: buildUrl + "/WebglQidong.data.unityweb",
|
||||
frameworkUrl: buildUrl + "/WebglQidong.framework.js.unityweb",
|
||||
codeUrl: buildUrl + "/WebglQidong.wasm.unityweb",
|
||||
streamingAssetsUrl: "StreamingAssets",
|
||||
companyName: "DefaultCompany",
|
||||
productName: "ElectricPowerStorage_Digital Twin",
|
||||
|
|
@ -118,8 +120,8 @@
|
|||
createUnityInstance(canvas, config, (progress) => {
|
||||
progressBarFull.style.width = 100 * progress + "%";
|
||||
}).then((unityInstance) => {
|
||||
loadingBar.style.display = "none";
|
||||
unityInstanceA = unityInstance
|
||||
loadingBar.style.display = "none";
|
||||
fullscreenButton.onclick = () => {
|
||||
unityInstance.SetFullscreen(1);
|
||||
};
|
||||
|
|
@ -128,44 +130,43 @@
|
|||
});
|
||||
};
|
||||
document.body.appendChild(script);
|
||||
|
||||
// c仓位号查询
|
||||
// function wareHouse(){
|
||||
|
||||
// }
|
||||
//
|
||||
// 定位货架位置
|
||||
function shelvesList(val){
|
||||
function shelvesList(val) {
|
||||
console.log(val,'unity');
|
||||
// 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');
|
||||
unityInstanceA.SendMessage("Manager","Unity_ViewportChange",val+'');
|
||||
unityInstanceA.SendMessage("Manager", "Unity_ViewportChange", val + '');
|
||||
}
|
||||
// 库房的定位
|
||||
function selectHome(val){
|
||||
// console.log(val,'库房的定位');
|
||||
unityInstanceA.SendMessage("Manager","Unity_WarehouseList",val);
|
||||
function selectHome(val) {
|
||||
console.log(val,'库房的定位');
|
||||
unityInstanceA.SendMessage("Manager", "Unity_WarehouseList", val);
|
||||
}
|
||||
// 库外的按钮
|
||||
function outHome(){
|
||||
function outHome() {
|
||||
// console.log(5);
|
||||
unityInstanceA.SendMessage("Manager","Unity_OutWarehouse",'');
|
||||
unityInstanceA.SendMessage("Manager", "Unity_OutWarehouse", '');
|
||||
}
|
||||
// 转运
|
||||
function transport(val){
|
||||
function transport(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);
|
||||
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>
|
||||
</body>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title>扬中数字孪生仓库</title>
|
||||
<title>启东南苑路数字孪生仓库</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
|
|
|||
34
src/App.vue
34
src/App.vue
|
|
@ -2,7 +2,7 @@
|
|||
<div id="app">
|
||||
<!-- unity3D -->
|
||||
<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>
|
||||
<!-- 头部 -->
|
||||
|
|
@ -25,15 +25,16 @@
|
|||
<span class="downPull"><img :src="i==index ? s.selectImg : s.img" alt="" /></span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<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>
|
||||
</ul>
|
||||
<ul class="menuContent">
|
||||
<li v-for="(num, index) in 9" :key="index + 1" @click="shelfHanlder($event)">LD1_C01-{{ num < 10 ? "0" +
|
||||
num : num }}</li>
|
||||
<!-- <li @click="shelfHanlder($event)">LD1_B01-01</li> -->
|
||||
<li @click="shelfHanlder($event)">LD1_C02-01</li>
|
||||
<li @click="shelfHanlder($event)">LD1_C03-01</li>
|
||||
num : num }}</li> -->
|
||||
<!-- <li @click="shelfHanlder($event)">LD1_B01-01</li> -->
|
||||
<!-- <li @click="shelfHanlder($event)">LD1_C02-01</li> -->
|
||||
<li v-for="(num, index) in 6" :key="index" @click="shelfHanlder($event)">FF1_C01-{{ num < 10 ? "0" + num :
|
||||
num }}</li>
|
||||
</ul>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
|
@ -43,10 +44,14 @@
|
|||
<span class="downPull"><img :src="i==index ? s.selectImg : s.img" alt="" /></span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<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)">C01</li>
|
||||
<li @click="selectHomeN($event)">C02</li>
|
||||
<li @click="selectHomeN($event)">C03</li>
|
||||
<li @click="selectHomeN($event)">D01</li>
|
||||
<li @click="selectHomeN($event)">E01</li>
|
||||
</ul>
|
||||
<!-- <el-dropdown-item @click="selectHomeN($event)">B01</el-dropdown-item>
|
||||
<el-dropdown-item @click="selectHomeN($event)">C01</el-dropdown-item>
|
||||
|
|
@ -109,6 +114,8 @@ export default {
|
|||
index: null,
|
||||
|
||||
navLiState: false,
|
||||
|
||||
loadShow:true,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -120,8 +127,15 @@ export default {
|
|||
|
||||
// window.parent.shelvesList = this.shelfHanlder
|
||||
},
|
||||
mounted(){
|
||||
window.loadFin = this.load
|
||||
// console.log(window.loadding,'执行方法');
|
||||
// this.load()
|
||||
},
|
||||
methods: {
|
||||
|
||||
load(){
|
||||
this.loadShow = false
|
||||
},
|
||||
shelfHanlder(e) {
|
||||
// console.log();
|
||||
// e.currentTarget.parentElement.parentElement.style.display = "none";
|
||||
|
|
@ -256,7 +270,7 @@ html {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
// z-index: 0;
|
||||
display: none;
|
||||
// display: none;
|
||||
background-color: rgba(0, 0, 0, 1);
|
||||
|
||||
.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