代码提交
This commit is contained in:
parent
16d49f37bb
commit
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.
|
@ -1,25 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<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>
|
||||
|
||||
<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" class="unity-desktop">
|
||||
<canvas id="unity-canvas" width=960 height=600></canvas>
|
||||
<div id="unity-loading-bar">
|
||||
<div id="unity-logo"></div>
|
||||
<div id="unity-progress-bar-empty">
|
||||
|
@ -66,11 +56,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",
|
||||
|
@ -105,20 +95,18 @@
|
|||
} else {
|
||||
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
||||
|
||||
// canvas.style.width = "960px";
|
||||
// canvas.style.height = "600px";
|
||||
canvas.style.width = "960px";
|
||||
canvas.style.height = "600px";
|
||||
}
|
||||
|
||||
loadingBar.style.display = "block";
|
||||
|
||||
var script = document.createElement("script");
|
||||
var unityInstanceA
|
||||
script.src = loaderUrl;
|
||||
script.onload = () => {
|
||||
createUnityInstance(canvas, config, (progress) => {
|
||||
progressBarFull.style.width = 100 * progress + "%";
|
||||
}).then((unityInstance) => {
|
||||
unityInstanceA = unityInstance
|
||||
loadingBar.style.display = "none";
|
||||
fullscreenButton.onclick = () => {
|
||||
unityInstance.SetFullscreen(1);
|
||||
|
@ -128,45 +116,6 @@
|
|||
});
|
||||
};
|
||||
document.body.appendChild(script);
|
||||
|
||||
// c仓位号查询
|
||||
// function wareHouse(){
|
||||
|
||||
// }
|
||||
//
|
||||
// 定位货架位置
|
||||
function shelvesList(val){
|
||||
console.log(val,'unity');
|
||||
// unityInstanceA.Unity_ShelvesList(val)
|
||||
unityInstanceA.SendMessage("Manager","Unity_ShelvesList",val );
|
||||
}
|
||||
// 视角切换
|
||||
function updateScene(val){
|
||||
// console.log(val,'unity');
|
||||
unityInstanceA.SendMessage("Manager","Unity_ViewportChange",val+'');
|
||||
}
|
||||
// 库房的定位
|
||||
function selectHome(val){
|
||||
// console.log(val,'库房的定位');
|
||||
unityInstanceA.SendMessage("Manager","Unity_WarehouseList",val);
|
||||
}
|
||||
// 库外的按钮
|
||||
function outHome(){
|
||||
// console.log(5);
|
||||
unityInstanceA.SendMessage("Manager","Unity_OutWarehouse",'');
|
||||
}
|
||||
// 转运
|
||||
function transport(val){
|
||||
// console.log('转运',val);
|
||||
unityInstanceA.SendMessage("Manager","Unity_Transport",val+'');
|
||||
}
|
||||
// 显隐
|
||||
function hide(val){
|
||||
// console.log('显隐',val);
|
||||
unityInstanceA.SendMessage("Manager","Unity_Transparence",val+'');
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -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>
|
||||
|
|
59
src/App.vue
59
src/App.vue
|
@ -2,6 +2,9 @@
|
|||
<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="loadding"></div>
|
||||
</div>
|
||||
<!-- 头部 -->
|
||||
<header class="nav">
|
||||
<div class="wether">
|
||||
|
@ -18,16 +21,17 @@
|
|||
|
||||
<ul>
|
||||
<li v-for="(s, i) in liImgs" class="nav-li" :key="i" @click="handleBtn(i)">
|
||||
<el-dropdown trigger="click" placement="bottom" v-if="i == 0" :hide-on-click="true">
|
||||
<el-dropdown trigger="click" placement="bottom" v-if="i == 0" :hide-on-click="false">
|
||||
<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 : num }} </li>
|
||||
<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 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>
|
||||
</ul>
|
||||
|
@ -69,6 +73,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
heatList: [20, 40, 200, 100],
|
||||
fullscreenLoading: true,
|
||||
liImgs: [
|
||||
{ img: require("@/assets/images/1.png"), selectImg: require('@/assets/images/select_1.png') },
|
||||
{ img: require("@/assets/images/2.png"), selectImg: require('@/assets/images/select_2.png') },
|
||||
|
@ -107,9 +112,9 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.$nextTick(() => {
|
||||
getVisualStorageList({ wareHouseCode: "HA1" }).then((res) => {
|
||||
console.log(res, "shuju");
|
||||
});
|
||||
// getVisualStorageList({ wareHouseCode: "HA1" }).then((res) => {
|
||||
// console.log(res, "shuju");
|
||||
// });
|
||||
});
|
||||
|
||||
// window.parent.shelvesList = this.shelfHanlder
|
||||
|
@ -239,6 +244,44 @@ html {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.load {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// z-index: 0;
|
||||
display: none;
|
||||
background-color: rgba(0, 0, 0, 1);
|
||||
|
||||
.loadding {
|
||||
background-image: url('@/assets/images/loadding.png');
|
||||
background-size: 100% 100%;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
left: calc((100% - 100px) / 2);
|
||||
position: absolute;
|
||||
top: calc((100% - 100px) / 2);
|
||||
animation: move 2s linear infinite forwards;
|
||||
|
||||
}
|
||||
|
||||
@keyframes move {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#app {
|
||||
|
|
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