From f95a1ef2f4650b930bed9c40ac1d65039005d4ef Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 09 九月 2023 09:45:10 +0800
Subject: [PATCH] #
---
src/main/webapp/views/console.html | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index 74bdbab..28f1c3d 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -22,12 +22,12 @@
<div v-for="(col,idx) in row" :key="idx">
<div v-if="col.value == 0">
<!-- 瀛愯建閬� 璺緞涓虹┛姊溅棰勮璺緞鍒欐樉绀虹┛姊溅棰滆壊鍜岀┛姊溅鍙� -->
- <div :style="{background: checkAdvancePath(index,idx) == null ? '':shuttleColorList[checkAdvancePath(index,idx)]}" class="item" v-if="col.data.length > 0">{{col.data}}</div>
- <div :style="{background: checkAdvancePath(index,idx) == null ? '':shuttleColorList[checkAdvancePath(index,idx)]}" class="item" v-else>{{checkAdvancePath(index,idx) == null ? idx:checkAdvancePath(index,idx)}}</div>
+ <div :style="{background: checkAdvancePath(index,idx).length == 0 ? '':shuttleColorList[checkAdvancePath(index,idx)[0]]}" class="item" v-if="col.data.length > 0">{{col.data}}</div>
+ <div :style="{background: checkAdvancePath(index,idx).length == 0 ? '':shuttleColorList[checkAdvancePath(index,idx)[0]]}" class="item" v-else>{{checkAdvancePath(index,idx).length == 0 ? idx:checkAdvancePath(index,idx)}}</div>
</div>
<div v-else-if="col.value == 3">
<!-- 姣嶈建閬� 璺緞涓虹┛姊溅棰勮璺緞鍒欐樉绀虹┛姊溅棰滆壊鍜岀┛姊溅鍙� -->
- <div :style="{background: checkAdvancePath(index,idx) == null ? '#5af':shuttleColorList[checkAdvancePath(index,idx)]}" class="item">{{checkAdvancePath(index,idx) == null ? '⇅⇄':checkAdvancePath(index,idx)}}</div>
+ <div :style="{background: checkAdvancePath(index,idx).length == 0 ? '#5af':shuttleColorList[checkAdvancePath(index,idx)[0]]}" class="item">{{checkAdvancePath(index,idx).length == 0 ? '⇅⇄':checkAdvancePath(index,idx)}}</div>
</div>
<div v-else-if="col.value == 4">
<!-- 绔欑偣 -->
@@ -73,7 +73,7 @@
<!--杈撳嚭妤煎眰-->
<div style="height: 100%;">
<div class="floorBtnBox" v-for="(lev,idx) in floorList">
- <el-button @click="changFloor(lev)">{{lev}}F</el-button>
+ <el-button :style="{background:currentLev === lev ? '#7DCDFF':''}" @click="changFloor(lev)">{{lev}}F</el-button>
</div>
<div>
<el-button @click="testMove()">娴嬭瘯绉诲姩杞�</el-button>
@@ -354,7 +354,6 @@
this.consoleInterval = setInterval(() => {
this.getShuttleStateInfo() //鑾峰彇鍥涘悜绌挎杞︿俊鎭�
this.getLiftStateInfo() //鑾峰彇鎻愬崌鏈轰俊鎭�
- console.log('interval')
}, 1000)
},
//鑾峰彇鍦板浘鏁版嵁
@@ -419,8 +418,10 @@
if (res.code == 200) {
let currentLevShuttle = []//褰撳墠妤煎眰灏忚溅闆嗗悎
res.data.forEach((item,idx) => {
- if (item.point.z == that.currentLev) {
- currentLevShuttle.push(item)
+ if (item != null && item.point != undefined && item.point != null) {
+ if (item.point.z == that.currentLev) {
+ currentLevShuttle.push(item);
+ }
}
})
that.currentLevShuttleList = currentLevShuttle
@@ -489,10 +490,12 @@
$('#system-toggle-checked').attr("checked", true);
$('#system-run-desc').html("绯荤粺杩愯涓�...");
that.systemStatus = true;
+ parent.systemRunning = true;
} else {
$('#system-toggle-checked').attr("checked", false);
$('#system-run-desc').html("绯荤粺宸插仠姝�!");
that.systemStatus = false;
+ parent.systemRunning = false;
}
} else if (res.code === 403) {
parent.location.href = baseUrl + "/login";
@@ -520,10 +523,12 @@
$('#system-toggle-checked').attr("checked", true);
$('#system-run-desc').html("绯荤粺杩愯涓�...");
that.systemStatus = true;
+ parent.systemRunning = true;
} else {
$('#system-toggle-checked').attr("checked", false);
$('#system-run-desc').html("绯荤粺宸插仠姝�!");
that.systemStatus = false;
+ parent.systemRunning = false;
}
} else if (res.code === 403) {
parent.location.href = baseUrl + "/login";
@@ -590,6 +595,7 @@
})
}
})
+ let data = []
let shuttleList = this.currentLevShuttleList;
for (var i = 0; i < shuttleList.length; i++) {
let shuttle = shuttleList[i]
@@ -598,12 +604,13 @@
for (var j = 0; j < moveAdvancePath.length; j++) {
let path = moveAdvancePath[j]
if (path.x-1 === x && path.y === y) {//璺緞绗﹀悎
- return shuttle.shuttleNo;//杩斿洖灏忚溅鍙�
+ data.push(shuttle.shuttleNo)
+ continue;
}
}
}
}
- return null;
+ return data;//杩斿洖灏忚溅鍙烽泦鍚�
}
}
})
--
Gitblit v1.9.1