18 lines
1.9 KiB
HTML
18 lines
1.9 KiB
HTML
|
|
<!doctype html>
|
|||
|
|
<html lang="zh-CN"><meta charset="UTF-8"><title>E2E 旋转底座组件检查</title>
|
|||
|
|
<style>body{margin:0;background:#f5f7fa;font:14px Arial;color:#303133}main{width:min(520px,calc(100vw - 48px));margin:24px auto;padding:24px;background:white;border:1px solid #dcdfe6;border-radius:8px}h1{font-size:18px}#result{white-space:pre-wrap;overflow-wrap:anywhere}</style>
|
|||
|
|
<main><h1>旋转底座组件检查</h1><p>仅保存内存配置 · 不执行工作流或运动</p><p><a href="?action=MOTOR_HOMING">自动机械回零</a> · <a href="?action=MOTOR_GET_STATE">GetState</a> · <a href="?action=MOTOR_QUICK_STOP">quickStop</a></p><div id="app"></div><pre id="result" role="status"></pre></main>
|
|||
|
|
<script type="module">
|
|||
|
|
import {createApp,h} from 'vue'
|
|||
|
|
import './componentApiFixture.mjs'
|
|||
|
|
import ElementPlus from 'element-plus'
|
|||
|
|
import 'element-plus/dist/index.css'
|
|||
|
|
import Panel from '/src/cmvr/common/views/flow/components/params/RotaryBaseParams.vue'
|
|||
|
|
import {createWorkcellNodeGroups} from '/src/cmvr/common/utils/scanMotorNodes.mjs'
|
|||
|
|
const action=new URLSearchParams(location.search).get('action')||'MOTOR_HOMING'
|
|||
|
|
const node={id:'E2E-rotary-config',type:'serviceNode',properties:{...structuredClone(createWorkcellNodeGroups()[1].nodeList.find(n=>n.action===action)),executionTarget:{roleKey:'rotary',deviceSlotKey:'motor'}}}
|
|||
|
|
const graph={nodes:[{id:'E2E-start',type:'start',properties:{name:'开始',resourceRoles:[{roleKey:'rotary',displayName:'旋转底座工位',deviceSlots:[{slotKey:'motor',deviceKind:10,displayName:'旋转底座'}]}]}},node],edges:[{sourceNodeId:'E2E-start',targetNodeId:node.id}]}
|
|||
|
|
window.lf={getGraphData:()=>graph,setProperties:(id,value)=>{document.querySelector('#result').textContent=JSON.stringify({id,nodeParams:value.nodeParams},null,2)}}
|
|||
|
|
createApp({render:()=>h(Panel,{data:node,onSaveSuccess:()=>{document.querySelector('#result').textContent+='\n配置校验保存通过,未运行设备'}})}).use(ElementPlus).mount('#app')
|
|||
|
|
</script></html>
|