From 9ee93c74e0de265b8a55454c621147b036fb0930 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 25 八月 2022 11:08:32 +0800
Subject: [PATCH] #
---
src/main/webapp/views/ste.html | 114 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 97 insertions(+), 17 deletions(-)
diff --git a/src/main/webapp/views/ste.html b/src/main/webapp/views/ste.html
index 9734584..0c3da80 100644
--- a/src/main/webapp/views/ste.html
+++ b/src/main/webapp/views/ste.html
@@ -96,9 +96,8 @@
<th>鎺�</th>
<th>鍒�</th>
<th>灞�</th>
- <th>璐у弶瀹氫綅</th>
- <th>杞借揣鍙板畾浣�</th>
- <th>璧拌鍦ㄥ畾浣�</th>
+ <th>绛夊緟WCS纭</th>
+ <th>瀹氫綅</th>
<th>鎶ヨ淇℃伅1</th>
<th>鎶ヨ淇℃伅2</th>
</tr>
@@ -114,20 +113,14 @@
<thead>
<tr>
<th>绌挎杞�</th>
- <th>浠诲姟鍙�</th>
- <th>浠诲姟绫诲瀷</th>
- <th>褰撳墠浣嶇疆</th>
+ <th>宸ヤ綔鍙�</th>
+ <th>鐘舵��</th>
+ <th>婧愮珯</th>
+ <th>鐩爣绔�</th>
+ <th>婧愬簱浣�</th>
+ <th>鐩爣搴撲綅</th>
+ <th>閫熷害</th>
<th>杩戠偣璺濈</th>
- <th>褰撳墠閫熷害</th>
- <th>楂樹綆浣�</th>
- <th>杩囪处鎸囦护浠诲姟鍙�</th>
- <th>杩囪处鎸囦护鐘舵��</th>
- <th>鐩樼偣鏁伴噺</th>
- <th>绌挎鏉垮氨缁�</th>
- <th>鍏呯數妗╁彿</th>
- <th>鍫嗗灈鏈鸿繍琛�</th>
- <th>鍫嗗灈鏈轰几鍙�</th>
- <th>鍫嗗灈鏈烘惉绉�</th>
</tr>
</thead>
<tbody>
@@ -218,7 +211,12 @@
setInterval(function () {
getSteStateInfo()
+ getSteMsgInfo();
},1000)
+ setInterval(function () {
+ getSteOutput();
+ operatorBlockShow();
+ },500);
// 鍒ゆ柇鎵嬪姩鎿嶄綔妯″潡鏄惁鍙敤
function operatorBlockShow() {
@@ -240,12 +238,94 @@
// 绌挎杞︿俊鎭〃鑾峰彇 ---- 琛ㄤ竴
function getSteStateInfo() {
- let tableEl = $('ste-state-table');
+ let tableEl = $('#ste-state-table');
+ $.ajax({
+ url: baseUrl+ "/ste/table/ste/state",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ let table = res.data;
+ if (table.length > steStateTableBlankRows && table.length !== steStateTableFullRows) {
+ initSteStateTable(table.length-steStateTableBlankRows);
+ steStateTableFullRows = table.length;
+ }
+ for (let i=1;i<=table.length;i++){
+ let tr = tableEl.find("tr").eq(i);
+ setVal(tr.children("td").eq(0), table[i-1].steNo);
+ setVal(tr.children("td").eq(1), table[i-1].statusType);
+ setVal(tr.children("td").eq(2), table[i-1].status);
+ setVal(tr.children("td").eq(3), table[i-1].loading);
+ setVal(tr.children("td").eq(4), table[i-1].track);
+ setVal(tr.children("td").eq(5), table[i-1].charge);
+ setVal(tr.children("td").eq(6), table[i-1].row);
+ setVal(tr.children("td").eq(7), table[i-1].bay);
+ setVal(tr.children("td").eq(8), table[i-1].lev);
+ setVal(tr.children("td").eq(9), table[i-1].waiting);
+ setVal(tr.children("td").eq(10), table[i-1].loca);
+ setVal(tr.children("td").eq(11), table[i-1].alarm1);
+ setVal(tr.children("td").eq(12), table[i-1].alarm2);
+ }
+ } else if (res.code === 403){
+ window.location.href = baseUrl+"/login";
+ } else {
+ console.log(res.msg);
+ }
+ }
+ });
}
// 绌挎杞︽暟鎹〃鑾峰彇 ---- 琛ㄤ簩
function getSteMsgInfo() {
let tableEl = $('#ste-msg-table');
+ $.ajax({
+ url: baseUrl+ "/ste/table/ste/msg",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ var table = res.data;
+ if (table.length > steMsgTableBlankRows && table.length !== steMsgTableFullRows) {
+ initSteMsgTable(table.length-steMsgTableBlankRows);
+ steMsgTableFullRows = table.length;
+ }
+ for (var i=1;i<=table.length;i++){
+ var tr = tableEl.find("tr").eq(i);
+ setVal(tr.children("td").eq(0), table[i-1].steNo);
+ setVal(tr.children("td").eq(1), table[i-1].workNo);
+ setVal(tr.children("td").eq(2), table[i-1].status);
+ setVal(tr.children("td").eq(3), table[i-1].sourceStaNo);
+ setVal(tr.children("td").eq(4), table[i-1].staNo);
+ setVal(tr.children("td").eq(5), table[i-1].sourceLocNo);
+ setVal(tr.children("td").eq(6), table[i-1].locNo);
+ setVal(tr.children("td").eq(7), table[i-1].speed);
+ setVal(tr.children("td").eq(8), table[i-1].closer);
+ }
+ } else if (res.code === 403){
+ window.location.href = baseUrl+"/login";
+ } else {
+ console.log(res.msg);
+ }
+ }
+ });
+ }
+
+ // 绌挎杞︽棩蹇楄緭鍑� -----------------------------------------------------------------------
+ function getSteOutput() {
+ $.ajax({
+ url: baseUrl + "/ste/output/ste",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ steOutput(res.data);
+ } else if (res.code === 403) {
+ window.location.href = baseUrl + "/login";
+ } else {
+ console.log(res.msg);
+ }
+ }
+ })
}
// ------------------------------------------------------------------------------------------------
--
Gitblit v1.9.1