commit a61c35521d7307176e1a465d8b1fca680cdbf2ff
Author: root <root@hub.scroll.pub> Date: 2024-12-27 08:34:34 +0000 Subject: Deleted readme.scroll diff --git a/readme.scroll b/readme.scroll deleted file mode 100644 index 14223bf..0000000 --- a/readme.scroll +++ /dev/null @@ -1,2 +0,0 @@ -# worklog.scroll.pub -Website generated by DeepSeek from prompt: 写个网站来记录每日工作内容 填写后生成相应格式的json。json如下{ "汇报人": "邱子翔", "日期": "2024-12-26", "测试项": [ { "测试项目": "宁夏宁东视联网-车牌算法", "软件版本": "3.0.29", "硬件版本": "", "测试用例": "车牌算法性能测试", "测试内容": "测试车牌算法性能", "测试环境信息": "T4服务器", "测试目的": "测试车牌算法性能", "测试用例编号": "", "自动化执行": "否", "是否成功": "是", "测试结果": "车牌精度91.07% 车牌颜色98.23%", "后续预防措施": "", "bug编号": "", "备注": "" }, { "测试项目": "AI调优平台测试", "软件版本": "0.9", "硬件版本": "", "测试用例": "功能测试", "测试内容": "功能测试", "测试环境信息": "", "测试目的": "测试平台功能", "测试用例编号": "", "自动化执行": "否", "是否成功": "是", "测试结果": "登陆页功能整理4项bug", "后续预防措施": "", "bug编号": "3497-3500", "备注": "完成40%" }, { "测试项目": "智慧田长项目", "软件版本": "", "硬件版本": "", "测试用例": "无人机RTK模组测试 & 园区数据采集", "测试内容": "无人机RTK模组测试 & 园区数据采集 ", "测试环境信息": "", "测试目的": "测试无人机在有无RTK模组下定位精度差异& 园区数据采集 ", "测试用例编号": "", "自动化执行": "否", "是否成功": "是", "发现问题": "", "后续预防措施": "", "bug编号": "", "备注": "" }], "其他": [ ], "待办事项": [ "天津高速测试", "AI调优平台测试" ] } \ No newline at end of file
commit 0a61c117859cb4559316c132476204cd0eee282c
Author: root <root@hub.scroll.pub> Date: 2024-12-27 08:32:17 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..4e6bb9e --- /dev/null +++ b/body.html @@ -0,0 +1,100 @@ +<header> + <h1>Daily Work Log</h1> + <p>记录每日工作内容,生成标准JSON格式</p> +</header> + +<main> + <form id="worklog-form"> + <section> + <h2>基本信息</h2> + <div class="form-group"> + <label for="reporter">汇报人</label> + <input type="text" id="reporter" required> + </div> + <div class="form-group"> + <label for="date">日期</label> + <input type="date" id="date" required> + </div> + </section> + + <section> + <h2>测试项目</h2> + <div id="test-items"> + <div class="test-item"> + <div class="form-group"> + <label>测试项目</label> + <input type="text" class="test-project" required> + </div> + <div class="form-group"> + <label>软件版本</label> + <input type="text" class="software-version"> + </div> + <div class="form-group"> + <label>硬件版本</label> + <input type="text" class="hardware-version"> + </div> + <div class="form-group"> + <label>测试用例</label> + <input type="text" class="test-case" required> + </div> + <div class="form-group"> + <label>测试内容</label> + <textarea class="test-content" required></textarea> + </div> + <div class="form-group"> + <label>测试环境信息</label> + <input type="text" class="test-environment"> + </div> + <div class="form-group"> + <label>测试目的</label> + <input type="text" class="test-purpose" required> + </div> + <div class="form-group"> + <label>是否成功</label> + <select class="is-success" required> + <option value="是">是</option> + <option value="否">否</option> + </select> + </div> + <div class="form-group"> + <label>测试结果</label> + <textarea class="test-result" required></textarea> + </div> + <div class="form-group"> + <label>Bug编号</label> + <input type="text" class="bug-number"> + </div> + <div class="form-group"> + <label>备注</label> + <textarea class="remarks"></textarea> + </div> + <button type="button" class="remove-item">删除此项</button> + </div> + </div> + <button type="button" id="add-test-item">添加测试项目</button> + </section> + + <section> + <h2>待办事项</h2> + <div id="todo-items"> + <div class="todo-item"> + <input type="text" class="todo" required> + <button type="button" class="remove-todo">×</button> + </div> + </div> + <button type="button" id="add-todo">添加待办事项</button> + </section> + + <button type="submit">生成JSON</button> + </form> + + <section id="output-section" class="hidden"> + <h2>生成的JSON</h2> + <pre id="json-output"></pre> + <button id="copy-json">复制到剪贴板</button> + </section> +</main> + +<footer> + <p>简洁高效的工作日志记录工具</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..64b84db --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://worklog.scroll.pub +metaTags +editButton /edit.html +title Daily Work Log +style.css +body.html +script.js \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..14223bf --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# worklog.scroll.pub +Website generated by DeepSeek from prompt: 写个网站来记录每日工作内容 填写后生成相应格式的json。json如下{ "汇报人": "邱子翔", "日期": "2024-12-26", "测试项": [ { "测试项目": "宁夏宁东视联网-车牌算法", "软件版本": "3.0.29", "硬件版本": "", "测试用例": "车牌算法性能测试", "测试内容": "测试车牌算法性能", "测试环境信息": "T4服务器", "测试目的": "测试车牌算法性能", "测试用例编号": "", "自动化执行": "否", "是否成功": "是", "测试结果": "车牌精度91.07% 车牌颜色98.23%", "后续预防措施": "", "bug编号": "", "备注": "" }, { "测试项目": "AI调优平台测试", "软件版本": "0.9", "硬件版本": "", "测试用例": "功能测试", "测试内容": "功能测试", "测试环境信息": "", "测试目的": "测试平台功能", "测试用例编号": "", "自动化执行": "否", "是否成功": "是", "测试结果": "登陆页功能整理4项bug", "后续预防措施": "", "bug编号": "3497-3500", "备注": "完成40%" }, { "测试项目": "智慧田长项目", "软件版本": "", "硬件版本": "", "测试用例": "无人机RTK模组测试 & 园区数据采集", "测试内容": "无人机RTK模组测试 & 园区数据采集 ", "测试环境信息": "", "测试目的": "测试无人机在有无RTK模组下定位精度差异& 园区数据采集 ", "测试用例编号": "", "自动化执行": "否", "是否成功": "是", "发现问题": "", "后续预防措施": "", "bug编号": "", "备注": "" }], "其他": [ ], "待办事项": [ "天津高速测试", "AI调优平台测试" ] } \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..6e54881 --- /dev/null +++ b/script.js @@ -0,0 +1,79 @@ +document.addEventListener('DOMContentLoaded', function() { + const form = document.getElementById('worklog-form'); + const testItemsContainer = document.getElementById('test-items'); + const todoItemsContainer = document.getElementById('todo-items'); + const outputSection = document.getElementById('output-section'); + const jsonOutput = document.getElementById('json-output'); + const copyButton = document.getElementById('copy-json'); + + // Add test item + document.getElementById('add-test-item').addEventListener('click', function() { + const newItem = testItemsContainer.firstElementChild.cloneNode(true); + newItem.querySelectorAll('input, textarea').forEach(input => input.value = ''); + testItemsContainer.appendChild(newItem); + }); + + // Remove test item + testItemsContainer.addEventListener('click', function(e) { + if (e.target.classList.contains('remove-item')) { + if (testItemsContainer.children.length > 1) { + e.target.parentElement.remove(); + } + } + }); + + // Add todo item + document.getElementById('add-todo').addEventListener('click', function() { + const newTodo = document.createElement('div'); + newTodo.className = 'todo-item'; + newTodo.innerHTML = ` + <input type="text" class="todo" required> + <button type="button" class="remove-todo">×</button> + `; + todoItemsContainer.appendChild(newTodo); + }); + + // Remove todo item + todoItemsContainer.addEventListener('click', function(e) { + if (e.target.classList.contains('remove-todo')) { + if (todoItemsContainer.children.length > 1) { + e.target.parentElement.remove(); + } + } + }); + + // Form submission + form.addEventListener('submit', function(e) { + e.preventDefault(); + + const worklog = { + 汇报人: document.getElementById('reporter').value, + 日期: document.getElementById('date').value, + 测试项: Array.from(testItemsContainer.children).map(item => ({ + 测试项目: item.querySelector('.test-project').value, + 软件版本: item.querySelector('.software-version').value, + 硬件版本: item.querySelector('.hardware-version').value, + 测试用例: item.querySelector('.test-case').value, + 测试内容: item.querySelector('.test-content').value, + 测试环境信息: item.querySelector('.test-environment').value, + 测试目的: item.querySelector('.test-purpose').value, + 是否成功: item.querySelector('.is-success').value, + 测试结果: item.querySelector('.test-result').value, + bug编号: item.querySelector('.bug-number').value, + 备注: item.querySelector('.remarks').value + })), + 待办事项: Array.from(todoItemsContainer.children).map(todo => + todo.querySelector('.todo').value) + }; + + jsonOutput.textContent = JSON.stringify(worklog, null, 2); + outputSection.classList.remove('hidden'); + }); + + // Copy JSON to clipboard + copyButton.addEventListener('click', function() { + navigator.clipboard.writeText(jsonOutput.textContent) + .then(() => alert('JSON已复制到剪贴板')) + .catch(() => alert('复制失败,请手动复制')); + }); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..90f7405 --- /dev/null +++ b/style.css @@ -0,0 +1,123 @@ +:root { + --primary-color: #2563eb; + --secondary-color: #1e40af; + --background-color: #f8fafc; + --text-color: #1e293b; + --border-color: #e2e8f0; + --shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +body { + font-family: 'Segoe UI', system-ui, sans-serif; + line-height: 1.6; + color: var(--text-color); + background-color: var(--background-color); + margin: 0; + padding: 20px; + max-width: 800px; + margin: 0 auto; +} + +header { + text-align: center; + margin-bottom: 2rem; +} + +h1 { + color: var(--primary-color); + font-size: 2.5rem; + margin-bottom: 0.5rem; +} + +h2 { + color: var(--secondary-color); + margin-top: 2rem; + margin-bottom: 1rem; +} + +.form-group { + margin-bottom: 1rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 500; +} + +input[type="text"], +input[type="date"], +textarea, +select { + width: 100%; + padding: 0.5rem; + border: 1px solid var(--border-color); + border-radius: 4px; + font-size: 1rem; +} + +textarea { + min-height: 100px; + resize: vertical; +} + +button { + background-color: var(--primary-color); + color: white; + border: none; + padding: 0.5rem 1rem; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.2s; +} + +button:hover { + background-color: var(--secondary-color); +} + +.test-item, +.todo-item { + background: white; + padding: 1rem; + border-radius: 4px; + box-shadow: var(--shadow); + margin-bottom: 1rem; +} + +.remove-item, +.remove-todo { + background-color: #dc2626; + margin-top: 0.5rem; +} + +.remove-item:hover, +.remove-todo:hover { + background-color: #b91c1c; +} + +#output-section { + margin-top: 2rem; +} + +#json-output { + background: white; + padding: 1rem; + border-radius: 4px; + box-shadow: var(--shadow); + white-space: pre-wrap; + word-wrap: break-word; +} + +.hidden { + display: none; +} + +@media (max-width: 600px) { + h1 { + font-size: 2rem; + } + + body { + padding: 10px; + } +} \ No newline at end of file