From a7223a5dfc7c83c7fe3894e65d1fed84cae61a8e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 15 二月 2023 08:45:38 +0800
Subject: [PATCH] #
---
src/main/webapp/views/ste.html | 115 ++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 81 insertions(+), 34 deletions(-)
diff --git a/src/main/webapp/views/ste.html b/src/main/webapp/views/ste.html
index 4555227..47ae428 100644
--- a/src/main/webapp/views/ste.html
+++ b/src/main/webapp/views/ste.html
@@ -21,17 +21,10 @@
<!-- 鏃ュ織鐩戞帶鏉� -->
<div class="log-board">
<div class="command-log">
- <div data-steNo="1" class="ste-command-item" style="margin-top: 30px">
+ <div data-steNo="1" class="ste-command-item">
<label>1#</label>
<button class="demoBtn pos-btn">鏁版嵁缁存姢</button>
- </div>
- <div data-steNo="2" class="ste-command-item" style="margin-top: 30px">
- <label>2#</label>
- <button class="demoBtn pos-btn">鏁版嵁缁存姢</button>
- </div>
- <div data-steNo="3" class="ste-command-item" style="margin-top: 30px">
- <label>3#</label>
- <button class="demoBtn pos-btn">鏁版嵁缁存姢</button>
+ <button id="mode-1" class="demoBtn mode-btn" > - </button>
</div>
</div>
<!-- 鍫嗗灈鏈虹姸鎬佷綅淇℃伅 -->
@@ -50,6 +43,7 @@
<th>灞�</th>
<th>绛夊緟WCS纭</th>
<th>瀹氫綅</th>
+ <th>鍏呯數鐘舵��</th>
<th>鎶ヨ淇℃伅1</th>
<th>鎶ヨ淇℃伅2</th>
</tr>
@@ -73,6 +67,7 @@
<th>鐩爣搴撲綅</th>
<th>閫熷害</th>
<th>杩戠偣璺濈</th>
+ <th>浣滀笟鏍囪</th>
</tr>
</thead>
<tbody>
@@ -94,8 +89,6 @@
<span class="select-title">绌挎杞﹀彿</span>
<div class="select-container">
<label><input type="radio" name="steSelect" value="1" checked> 1鍙风┛姊溅</label>
- <label><input type="radio" name="steSelect" value="2"> 2鍙风┛姊溅</label>
- <label><input type="radio" name="steSelect" value="3"> 3鍙风┛姊溅</label>
</div>
</div>
</div>
@@ -104,22 +97,27 @@
<fieldset>
<legend>鎵嬪姩鎿嶄綔</legend>
<div class="button-group">
- <button class="item" onclick="steOperator(1)">宸﹀嚭搴�</button>
- <button class="item" onclick="steOperator(2)">鍙冲嚭搴�</button>
- <button class="item" onclick="steOperator(3)">宸﹀叆搴�</button>
- <button class="item" onclick="steOperator(4)">鍙冲叆搴�</button>
+ <button class="item" onclick="steOperator(99)">鑱旀満</button>
+ <button class="item" onclick="steOperator(100)">鑴辨満</button>
+ <button class="item" onclick="steOperator(1)">鍚戝彸鍑哄簱</button>
+ <button class="item" onclick="steOperator(2)">鍚戝乏鍑哄簱</button>
+ <button class="item" onclick="steOperator(3)">浠庡彸鍏ュ簱</button>
+ <button class="item" onclick="steOperator(4)">浠庡乏鍏ュ簱</button>
<button class="item" onclick="steOperator(5)">宸︾Щ搴�</button>
<button class="item" onclick="steOperator(6)">鍙崇Щ搴�</button>
- <button class="item" onclick="steOperator(7)">鍘熺偣</button>
- <button class="item" onclick="steOperator(8)">杩滅偣</button>
- <button class="item" onclick="steOperator(9)">A 鐐�</button>
- <button class="item" onclick="steOperator(10)">B 鐐�</button>
- <button class="item" onclick="steOperator(11)">宸︽惉绉�</button>
- <button class="item" onclick="steOperator(12)">鍙虫惉绉�</button>
- <button class="item" onclick="steOperator(13)">鍏呯數</button>
- <button class="item" onclick="steOperator(14)">宸︾洏鐐�</button>
- <button class="item" onclick="steOperator(15)">鍙崇洏鐐�</button>
+ <button class="item" onclick="steOperator(7)">鍘诲彸绔�</button>
+ <button class="item" onclick="steOperator(8)">鍘诲乏绔�</button>
+ <button class="item" onclick="steOperator(9)">鍙冲緟鏈�</button>
+ <button class="item" onclick="steOperator(10)">宸﹀緟鏈�</button>
+<!-- <button class="item" onclick="steOperator(11)">宸︽惉绉�</button>-->
+<!-- <button class="item" onclick="steOperator(12)">鍙虫惉绉�</button>-->
+<!-- <button class="item" onclick="steOperator(13)">宸﹀厖鐢�</button>-->
+<!-- <button class="item" onclick="steOperator(14)">鍙冲厖鐢�</button>-->
+<!-- <button class="item" onclick="steOperator(17)">鏂紑鍏呯數</button>-->
+<!-- <button class="item" onclick="steOperator(14)">宸︾洏鐐�</button>-->
+<!-- <button class="item" onclick="steOperator(15)">鍙崇洏鐐�</button>-->
<button class="item" onclick="steOperator(16)">浠诲姟瀹屾垚</button>
+
</div>
</fieldset>
</div>
@@ -133,7 +131,7 @@
</div>
<div id="ste-detl" style="display: none">
- <form>
+ <div>
<div class="form-item">
<label class="form-label">绌挎杞﹀彿:</label>
<div class="form-input">
@@ -155,26 +153,32 @@
<div class="form-item">
<label class="form-label">鍒�:</label>
<div class="form-input">
- <input id="bay" name="bay" type="text" class="layui-input" autocomplete="off">
+ <input id="bay" name="bay" type="number" class="layui-input" autocomplete="off">
</div>
</div>
<div class="form-item">
<label class="form-label">灞�:</label>
<div class="form-input">
- <input id="lev" name="lev" type="text" class="layui-input" autocomplete="off">
+ <input id="lev" name="lev" type="number" class="layui-input" autocomplete="off">
</div>
</div>
<div class="form-item">
<label class="form-label">鍫嗗灈鏈�:</label>
<div class="form-input">
- <input id="crnNo" name="crnNo" type="text" class="layui-input" autocomplete="off">
+ <input id="crnNo" name="crnNo" type="number" class="layui-input" autocomplete="off">
+ </div>
+ </div>
+ <div class="form-item">
+ <label class="form-label">浣滀笟鏍囪:</label>
+ <div class="form-input">
+ <input id="pakMk" name="pakMk" type="text" class="layui-input" autocomplete="off">
</div>
</div>
<div class="form-item form-button-container">
<button class="form-button" id="save">淇濆瓨</button>
<button class="form-button" id="cancel" style="background-color: #D0D0D0">鍙栨秷</button>
</div>
- </form>
+ </di>
</div>
</body>
</html>
@@ -217,16 +221,17 @@
}
}
+ var layerIdx;
$(document).on('click ','.pos-btn', function () {
let steNo = Number($(this).parent().attr("data-steNo"));
- layerDetl = layer.open({
+ layerIdx = layer.open({
type: 1,
title: false,
shadeClose: true,
offset: [$(this).offset().top + 30 + 'px', $(this).offset().left + 'px'],
anim: 5,
shade: [0],
- area: ['310px', '340px'],
+ area: ['310px', '370px'],
closeBtn: 0,
content: $("#ste-detl"),
success: function(layero, index){
@@ -237,6 +242,7 @@
$('#bay').val(res.data.bay);
$('#lev').val(res.data.lev);
$('#crnNo').val(res.data.crnNo);
+ $('#pakMk').val(res.data.pakMk);
})
},
end: function () {
@@ -246,9 +252,40 @@
$('#bay').val("");
$('#lev').val("");
$('#crnNo').val("");
+ $('#pakMk').val("");
}
})
})
+
+ $(document).on('click ','.mode-btn', function () {
+ let steNo = Number($(this).parent().attr("data-steNo"));
+ layer.confirm("鏀瑰彉" + steNo + ' 鍙风┛姊溅鍦ㄧ嚎鐘舵�佸悧锛�', function(){
+ var index = layer.load(1, {
+ shade: [0.1,'#fff']
+ });
+ $.ajax({
+ url: baseUrl+ "/ste/mode/switch",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ steNo: Number(steNo),
+ password: 'root'
+ },
+ method: 'POST',
+ success: function (res) {
+ layer.close(index);
+ if (res.code === 200){
+ layer.msg(res.msg, {icon: 1});
+ } else if (res.code === 403){
+ window.location.href = baseUrl+"/login";
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ });
+ });
+ })
+
+
$(document).on('click ','#save', function () {
http.post(baseUrl+ "/ste/detl/update", {
@@ -258,9 +295,15 @@
bay: $('#bay').val(),
lev: $('#lev').val(),
crnNo: $('#crnNo').val(),
+ pakMk: $('#pakMk').val(),
}, function (res) {
- layer.msg("淇敼鎴愬姛",{icon: 1,});
+ layer.msg("淇敼鎴愬姛", {icon: 1,});
+ layer.close(layerIdx);
})
+ })
+
+ $(document).on('click ','#cancel', function () {
+ layer.close(layerIdx);
})
// 绌挎杞︿俊鎭〃鑾峰彇 ---- 琛ㄤ竴
@@ -278,6 +321,7 @@
steStateTableFullRows = table.length;
}
for (let i=1;i<=table.length;i++){
+ $("#mode-"+table[i-1].steNo).html(table[i-1].statusVal===0?'鑱旀満':'鑴辨満');
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);
@@ -290,8 +334,9 @@
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);
+ setVal(tr.children("td").eq(11), table[i-1].chargeStatus);
+ setVal(tr.children("td").eq(12), table[i-1].alarm1);
+ setVal(tr.children("td").eq(13), table[i-1].alarm2);
}
} else if (res.code === 403){
window.location.href = baseUrl+"/login";
@@ -327,6 +372,7 @@
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);
+ setVal(tr.children("td").eq(9), table[i-1].pakMk);
}
} else if (res.code === 403){
window.location.href = baseUrl+"/login";
@@ -398,6 +444,7 @@
" <td></td>\n" +
" <td></td>\n" +
" <td></td>\n" +
+ " <td></td>\n" +
" </tr>\n";
}
$('#ste-state-table tbody').after(html);
--
Gitblit v1.9.1