106 lines
3.2 KiB
HTML
106 lines
3.2 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>PLC Control</title>
|
|
<link rel="stylesheet" href="/ui/styles.css" />
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<div class="title">PLC Control</div>
|
|
<div class="status" id="statusText">Ready</div>
|
|
</header>
|
|
|
|
<main class="grid">
|
|
<section class="panel top-left">
|
|
<div class="panel-head">
|
|
<h2>数据源</h2>
|
|
<button id="openSourceForm">+ 新增</button>
|
|
</div>
|
|
<div class="list" id="sourceList"></div>
|
|
</section>
|
|
|
|
<section class="panel top-right">
|
|
<div class="panel-head">
|
|
<h2>点位</h2>
|
|
<div class="pager">
|
|
<button class="secondary" id="prevPoints" title="上一页">‹</button>
|
|
<span id="pointsPageInfo">1 / 1</span>
|
|
<button class="secondary" id="nextPoints" title="下一页">›</button>
|
|
</div>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:30%">名称</th>
|
|
<th style="width:25%">值</th>
|
|
<th style="width:10%">质量</th>
|
|
<th style="width:30%">更新时间</th>
|
|
<th style="width:5%"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="pointList"></tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel bottom">
|
|
<div class="panel-head">
|
|
<h2>实时日志</h2>
|
|
</div>
|
|
<div class="log" id="logView"></div>
|
|
</section>
|
|
</main>
|
|
|
|
<div class="modal hidden" id="pointModal">
|
|
<div class="modal-content">
|
|
<div class="modal-head">
|
|
<h3>选择节点创建 Points</h3>
|
|
<button class="secondary" id="closeModal">✕</button>
|
|
</div>
|
|
<div class="toolbar">
|
|
<button id="browseNodes">浏览并同步节点</button>
|
|
<button class="secondary" id="refreshTree">刷新树</button>
|
|
</div>
|
|
<div class="tree" id="nodeTree"></div>
|
|
<div class="modal-foot">
|
|
<div class="muted" id="selectedCount">已选 0 个节点</div>
|
|
<button id="createPoints">创建 Points</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal hidden" id="sourceModal">
|
|
<div class="modal-content modal-sm">
|
|
<div class="modal-head">
|
|
<h3>Source 配置</h3>
|
|
<button class="secondary" id="closeSourceModal">✕</button>
|
|
</div>
|
|
<form id="sourceForm" class="form">
|
|
<input type="hidden" id="sourceId" />
|
|
<label>
|
|
名称
|
|
<input id="sourceName" required />
|
|
</label>
|
|
<label>
|
|
Endpoint
|
|
<input id="sourceEndpoint" placeholder="opc.tcp://host:port" required />
|
|
</label>
|
|
<label class="check-row">
|
|
<input type="checkbox" id="sourceEnabled" checked />
|
|
<span>启用</span>
|
|
</label>
|
|
<div class="form-actions">
|
|
<button type="button" class="secondary" id="sourceReset">清空</button>
|
|
<button type="submit" id="sourceSubmit">保存</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/ui/app.js"></script>
|
|
</body>
|
|
</html>
|