Tz2/scene-step-editor-web/index.html

83 lines
3.0 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scene Step 编辑器</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="editor-window">
<div class="header">
<h1>步骤编辑器</h1>
</div>
<div class="file-section">
<h3>选择流程文件</h3>
<div class="file-controls">
<select id="fileSelect" class="file-dropdown">
<option value="">选择文件...</option>
</select>
<button id="newProcessBtn" class="btn btn-primary">新增流程</button>
</div>
</div>
<div class="separator-line orange"></div>
<div class="content-area">
<div class="scroll-container" id="scrollContainer">
<div class="steps-container" id="stepsContainer">
<!-- 步骤将在这里动态生成 -->
</div>
</div>
</div>
<div class="bottom-controls">
<button id="saveBtn" class="btn btn-save">保存到 新流程.json</button>
<button id="generateCodeBtn" class="btn btn-generate">生成 ProcessEvents 代码</button>
</div>
</div>
<!-- 新增流程对话框 -->
<div id="newProcessModal" class="modal">
<div class="modal-content">
<h3>创建新流程</h3>
<input type="text" id="newProcessName" placeholder="输入流程名称" value="新流程">
<div class="modal-buttons">
<button id="confirmNewProcess" class="btn btn-primary">确定</button>
<button id="cancelNewProcess" class="btn btn-secondary">取消</button>
</div>
</div>
</div>
<!-- 确认对话框 -->
<div id="confirmModal" class="modal">
<div class="modal-content">
<h3 id="confirmTitle">确认</h3>
<p id="confirmMessage">确认执行此操作?</p>
<div class="modal-buttons">
<button id="confirmOk" class="btn btn-primary">确定</button>
<button id="confirmCancel" class="btn btn-secondary">取消</button>
</div>
</div>
</div>
<!-- 代码生成结果对话框 -->
<div id="codeModal" class="modal">
<div class="modal-content code-modal">
<h3>生成的 ProcessEvents 代码</h3>
<textarea id="generatedCode" readonly></textarea>
<div class="modal-buttons">
<button id="copyCodeBtn" class="btn btn-primary">复制代码</button>
<button id="closeCodeModal" class="btn btn-secondary">关闭</button>
</div>
</div>
</div>
<script src="data-models.js"></script>
<script src="file-manager.js"></script>
<script src="code-generator.js"></script>
<script src="script.js"></script>
</body>
</html>