From 035331e18802456a070b61a01b1466f59d43a29d Mon Sep 17 00:00:00 2001
From: lsh <lsh123456>
Date: 星期二, 07 三月 2023 14:16:50 +0800
Subject: [PATCH] #
---
src/main/webapp/views/ste.html | 107 ++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 81 insertions(+), 26 deletions(-)
diff --git a/src/main/webapp/views/ste.html b/src/main/webapp/views/ste.html
index 8628a2f..14a025d 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>
@@ -95,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>
@@ -105,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>
@@ -260,6 +257,61 @@
})
})
+ var layerIdx0;
+ $(document).on('click ','.mode-btn', function () {
+ let steNo = Number($(this).parent().attr("data-steNo"));
+ layerIdx0 = layer.open({
+ type: 1,
+ title: false,
+ shadeClose: true,
+ offset: [$(this).offset().top + 30 + 'px', $(this).offset().left + 'px'],
+ anim: 5,
+ shade: [0],
+ area: ['310px', '370px'],
+ closeBtn: 0,
+ content: $("#ste-detl"),
+ success: function(layero, index){
+ http.get(baseUrl+ "/ste/sensor/detl/"+steNo, null, function (res) {
+ $('#steNo').val(steNo);
+
+ })
+ },
+ end: function () {
+ $('#steNo').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", {
steNo: $('#steNo').val(),
@@ -294,6 +346,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);
@@ -306,8 +359,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";
@@ -415,6 +469,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