显示机械臂摄像头图片
This commit is contained in:
@@ -433,11 +433,16 @@
|
||||
<h2>📷 二维码配置</h2>
|
||||
<p style="color:#9aa0a6;font-size:13px;margin-bottom:16px">配置机械臂姿态(6个关节角度),通过机械臂摄像头识别二维码并匹配机型。</p>
|
||||
<!-- 机械臂摄像头画面 -->
|
||||
<div style="margin-bottom:16px">
|
||||
<div style="margin-bottom:8px">
|
||||
<div class="camera-preview" style="max-width:640px">
|
||||
<img :src="armCameraUrl" @error="onArmPreviewError" style="width:100%;border-radius:8px">
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:flex;justify-content:flex-end;margin-bottom:16px">
|
||||
<button class="btn btn-secondary btn-small" @click="captureArmSnapshot" :disabled="armSnapshotLoading">
|
||||
📸 获取图片
|
||||
</button>
|
||||
</div>
|
||||
<div style="display:flex;justify-content:flex-end;margin-bottom:16px">
|
||||
<input type="text" v-model="newQrName" placeholder="输入名称..." style="background:#0f1923;border:1px solid #2a3441;color:#fff;padding:8px 12px;border-radius:6px;margin-right:8px;width:180px">
|
||||
<button class="btn btn-primary" @click="addQrConfig()">➕ 添加</button>
|
||||
@@ -476,6 +481,7 @@
|
||||
<button class="btn btn-secondary btn-small" @click="readQrAngles(q.id)" :disabled="!armConnected" title="读取当前机械臂关节角度">📋 加载姿态</button>
|
||||
<button class="btn btn-primary btn-small" @click="applyQrAngles(q.id)" :disabled="!armConnected" style="margin-left:3px" title="将姿态应用到机械臂">🤖 应用姿态</button>
|
||||
<button class="btn btn-success btn-small" @click="scanQrEntry(q.id)" :disabled="qrScanningId === q.id" style="margin-left:3px" title="扫描二维码">📷</button>
|
||||
<button class="btn btn-secondary btn-small" @click="qrInputId = q.id; qrInputValue = q.qr_value || ''; showQrInputDialog = true" style="margin-left:3px" title="手动输入二维码值">✏️</button>
|
||||
<button class="btn btn-danger btn-small" @click="deleteQrConfig(q.id)" style="margin-left:3px" title="删除">🗑️</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -582,9 +588,39 @@
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- 手动输入二维码弹窗 -->
|
||||
<div class="modal-overlay" v-if="showQrInputDialog">
|
||||
<div class="modal" style="max-width:420px">
|
||||
<h3>⌨️ 手动输入二维码</h3>
|
||||
<p style="color:#9aa0a6;font-size:13px;margin:8px 0 16px">自动扫码未识别到二维码,请手动输入二维码内容:</p>
|
||||
<input type="text" v-model="qrInputValue" placeholder="输入二维码内容..."
|
||||
style="width:100%;background:#0f1923;border:1px solid #2a3441;color:#fff;padding:10px 12px;border-radius:6px;font-size:14px;box-sizing:border-box"
|
||||
autofocus @keyup.enter="submitManualQr">
|
||||
<div class="modal-actions" style="margin-top:16px">
|
||||
<button class="btn btn-primary" @click="submitManualQr">确认</button>
|
||||
<button class="btn" @click="showQrInputDialog = false; qrInputId = null; qrInputValue = ''">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 机械臂截图弹窗 -->
|
||||
<div class="modal-overlay" v-if="showArmSnapshot" @click.self="showArmSnapshot = false">
|
||||
<div class="modal" style="max-width:800px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px">
|
||||
<h3>📸 机械臂摄像头截图</h3>
|
||||
<button class="btn btn-small" @click="showArmSnapshot = false" style="font-size:18px;background:none;border:none;color:#9aa0a6;cursor:pointer">✕</button>
|
||||
</div>
|
||||
<div style="background:#000;border-radius:8px;overflow:hidden">
|
||||
<img :src="armSnapshotUrl" style="width:100%;display:block">
|
||||
</div>
|
||||
<div style="margin-top:8px;text-align:center;color:#9aa0a6;font-size:12px">
|
||||
点击弹窗外关闭
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/vue3.global.prod.js?v=20260526a"></script>
|
||||
<script src="/static/js/setting.js?v=20260529b"></script>
|
||||
<script src="/static/js/setting.js?v=20260605a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user