From 78d06a2841fc9a3d1880ca728202fcd8e52a65fa Mon Sep 17 00:00:00 2001 From: LL Date: Tue, 18 Nov 2025 14:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 334 +++++++++++++++++++++++++++++++ api.php | 149 ++++++++++++++ assets/app.js | 201 +++++++++++++++++++ assets/style.css | 153 ++++++++++++++ auth.php | 30 +++ config.php | 5 + data/.gitkeep | 1 + data/.htaccess | 7 + data/docs/doc_690b108682362.html | 1 + data/docs/doc_690b10977e0f8.html | 1 + data/docs/doc_690c049068cf7.html | 1 + data/docs/doc_690d692ae4057.html | 1 + data/index.json | 18 ++ data/shares.json | 1 + index.html | 39 ++++ index.php | 141 +++++++++++++ login.php | 52 +++++ logout.php | 13 ++ share.php | 158 +++++++++++++++ upload.php | 40 ++++ 20 files changed, 1346 insertions(+) create mode 100644 404.html create mode 100644 api.php create mode 100644 assets/app.js create mode 100644 assets/style.css create mode 100644 auth.php create mode 100644 config.php create mode 100644 data/.gitkeep create mode 100644 data/.htaccess create mode 100644 data/docs/doc_690b108682362.html create mode 100644 data/docs/doc_690b10977e0f8.html create mode 100644 data/docs/doc_690c049068cf7.html create mode 100644 data/docs/doc_690d692ae4057.html create mode 100644 data/index.json create mode 100644 data/shares.json create mode 100644 index.html create mode 100644 index.php create mode 100644 login.php create mode 100644 logout.php create mode 100644 share.php create mode 100644 upload.php diff --git a/404.html b/404.html new file mode 100644 index 0000000..99409b5 --- /dev/null +++ b/404.html @@ -0,0 +1,334 @@ + + + + + + 404 - 页面未找到 + + + + + + + +
+ + + + + +
+ + +
+
404
+

页面未找到

+

您访问的页面可能已经移动、删除或从未存在。请返回首页继续浏览我们的基金监控系统。

+ + 返回首页 + +
+ + + + + \ No newline at end of file diff --git a/api.php b/api.php new file mode 100644 index 0000000..d88867a --- /dev/null +++ b/api.php @@ -0,0 +1,149 @@ + array_values($index)], JSON_UNESCAPED_UNICODE); + exit; +} + +if ($action === 'get') { + $id = $_GET['id'] ?? ''; + if (!$id || !safeId($id)) { http_response_code(400); echo json_encode(['error'=>'bad id']); exit; } + $index = readJson($indexFile); + $title = ''; + foreach ($index as $it) { if ($it['id'] === $id) { $title = $it['title'] ?? ''; break; } } + $file = $docsDir . DIRECTORY_SEPARATOR . $id . '.html'; + $content = file_exists($file) ? file_get_contents($file) : ''; + echo json_encode(['id'=>$id,'title'=>$title,'content'=>$content], JSON_UNESCAPED_UNICODE); + exit; +} + +if ($action === 'save') { + $body = json_decode(file_get_contents('php://input'), true); + $id = $body['id'] ?? ''; + $title = trim($body['title'] ?? ''); + $content = $body['content'] ?? ''; + + $index = readJson($indexFile); + if (!$id) { + $id = 'doc_' . uniqid(); + $index[] = ['id' => $id, 'title' => $title ?: '未命名']; + } else { + if (!safeId($id)) { http_response_code(400); echo json_encode(['error'=>'bad id']); exit; } + $found = false; + foreach ($index as &$it) { + if ($it['id'] === $id) { $it['title'] = $title ?: ($it['title'] ?? '未命名'); $found = true; break; } + } + if (!$found) { $index[] = ['id' => $id, 'title' => $title ?: '未命名']; } + } + writeJson($indexFile, $index); + + $file = $docsDir . DIRECTORY_SEPARATOR . $id . '.html'; + file_put_contents($file, $content); + echo json_encode(['ok'=>true,'id'=>$id], JSON_UNESCAPED_UNICODE); + exit; +} + +if ($action === 'delete') { + $body = json_decode(file_get_contents('php://input'), true); + $id = $body['id'] ?? ''; + if (!$id || !safeId($id)) { http_response_code(400); echo json_encode(['error'=>'bad id']); exit; } + $index = readJson($indexFile); + $index = array_values(array_filter($index, function($it) use ($id) { return $it['id'] !== $id; })); + writeJson($indexFile, $index); + $file = $docsDir . DIRECTORY_SEPARATOR . $id . '.html'; + if (file_exists($file)) unlink($file); + echo json_encode(['ok'=>true]); + exit; +} + +// 生成分享链接(支持永久、24h、一次性) +if ($action === 'share_create' || $action === 'share') { + $id = $_GET['id'] ?? ''; + $mode = $_GET['mode'] ?? 'permanent'; // permanent | 24h | one_time + if (!$id || !safeId($id)) { http_response_code(400); echo json_encode(['error'=>'bad id']); exit; } + $shares = readJson($sharesFile); + if (!is_array($shares)) $shares = []; + // 生成随机令牌 + try { + $token = bin2hex(random_bytes(16)); + } catch (Throwable $e) { + $token = uniqid('t_', true); + } + $now = time(); + $expiresAt = null; + $singleUse = false; + if ($mode === '24h') { $expiresAt = $now + 24*3600; } + if ($mode === 'one_time') { $singleUse = true; } + $record = [ + 'id' => $id, + 'token' => $token, + 'created_at' => $now, + 'expires_at' => $expiresAt, + 'single_use' => $singleUse, + 'used' => false, + 'revoked' => false, + ]; + $shares[] = $record; + writeJson($sharesFile, $shares); + $url = '/share.php?token=' . urlencode($token); + echo json_encode(['url' => $url, 'token' => $token, 'expires_at' => $expiresAt, 'single_use' => $singleUse], JSON_UNESCAPED_UNICODE); + exit; +} + +// 取消当前文档的所有分享 +if ($action === 'share_revoke_all') { + $id = $_GET['id'] ?? ''; + if (!$id || !safeId($id)) { http_response_code(400); echo json_encode(['error'=>'bad id']); exit; } + $shares = readJson($sharesFile); + if (!is_array($shares)) $shares = []; + $new = []; + foreach ($shares as $rec) { + if (($rec['id'] ?? '') !== $id) { $new[] = $rec; } + } + writeJson($sharesFile, $new); + echo json_encode(['ok' => true]); + exit; +} + +http_response_code(404); +echo json_encode(['error' => 'unknown action']); diff --git a/assets/app.js b/assets/app.js new file mode 100644 index 0000000..f510075 --- /dev/null +++ b/assets/app.js @@ -0,0 +1,201 @@ +const $ = (sel) => document.querySelector(sel); +const $$ = (sel) => Array.from(document.querySelectorAll(sel)); + +const state = { + currentId: null, + list: [], + dirty: false, +}; +let weEditor = null; + +function setStatus(text) { + const el = $('#status'); + el.textContent = text || ''; +} + +function renderList() { + const ul = $('#doc-list'); + ul.innerHTML = ''; + state.list.forEach((d) => { + const li = document.createElement('li'); + li.className = 'doc-item' + (d.id === state.currentId ? ' active' : ''); + li.textContent = d.title || '(未命名)'; + li.onclick = () => loadDoc(d.id); + ul.appendChild(li); + }); +} + +async function fetchJSON(url, opts = {}) { + const res = await fetch(url, opts); + if (!res.ok) throw new Error('请求失败: ' + res.status); + return res.json(); +} + +async function refreshList() { + const data = await fetchJSON('api.php?action=list'); + state.list = data.docs || []; + renderList(); +} + +async function loadDoc(id) { + const data = await fetchJSON('api.php?action=get&id=' + encodeURIComponent(id)); + state.currentId = data.id; + $('#title-input').value = data.title || ''; + if (weEditor) weEditor.setHtml(data.content || ''); + $('#btn-save').disabled = true; + $('#btn-delete').disabled = !state.currentId; + renderList(); + setStatus('已加载: ' + (data.title || data.id)); +} + +async function saveDoc() { + const payload = { + id: state.currentId, + title: $('#title-input').value.trim(), + content: weEditor ? weEditor.getHtml() : $('#we-editor').innerHTML, + }; + const data = await fetchJSON('api.php?action=save', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(payload), + }); + state.currentId = data.id; + $('#btn-save').disabled = true; + $('#btn-delete').disabled = !state.currentId; + await refreshList(); + renderList(); + setStatus('已保存: ' + (payload.title || data.id)); +} + +async function deleteDoc() { + if (!state.currentId) return; + if (!confirm('确定删除当前文档吗?')) return; + const data = await fetchJSON('api.php?action=delete', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ id: state.currentId }), + }); + state.currentId = null; + $('#title-input').value = ''; + $('#editor').innerHTML = ''; + $('#btn-save').disabled = true; + $('#btn-delete').disabled = true; + await refreshList(); + renderList(); + setStatus('文档已删除'); +} + +function newDoc() { + state.currentId = null; + $('#title-input').value = ''; + if (weEditor) weEditor.setHtml(''); + $('#btn-save').disabled = false; + $('#btn-delete').disabled = true; + renderList(); + setStatus('新建文档'); +} + +function markDirty() { + $('#btn-save').disabled = false; +} + +// 由 wangEditor 处理图片上传 + +function setupEvents() { + $('#btn-save').onclick = saveDoc; + $('#btn-delete').onclick = deleteDoc; + $('#btn-new').onclick = newDoc; + $('#title-input').oninput = markDirty; + const shareBtn = $('#btn-share'); + if (shareBtn) shareBtn.onclick = shareCurrent; + const revokeBtn = $('#btn-share-revoke'); + if (revokeBtn) revokeBtn.onclick = revokeShares; +} + +async function init() { + setupEvents(); + // 初始化 wangEditor + const { createEditor, createToolbar } = window.wangEditor || {}; + if (createEditor && createToolbar) { + const editorConfig = { placeholder: '在此编辑内容…' }; + editorConfig.onChange = () => markDirty(); + // 配置图片上传到后端 + editorConfig.MENU_CONF = editorConfig.MENU_CONF || {}; + editorConfig.MENU_CONF['uploadImage'] = { + server: 'upload.php', + fieldName: 'image', + maxFileSize: 10 * 1024 * 1024, + timeout: 20 * 1000, + customInsert(res, insertFn) { + if (res && res.url) insertFn(res.url); + }, + }; + + weEditor = createEditor({ selector: '#we-editor', config: editorConfig, mode: 'default' }); + createToolbar({ editor: weEditor, selector: '#we-toolbar', mode: 'default' }); + } + await refreshList(); + if (state.list.length) { + loadDoc(state.list[0].id).catch(console.error); + } else { + newDoc(); + } +} + +async function shareCurrent() { + if (!state.currentId) { + alert('请先保存文档,再进行分享'); + return; + } + openShareModal(); +} + +init().catch((e) => setStatus('初始化失败: ' + e.message)); + +function openShareModal() { + const overlay = $('#share-modal'); + const linkBox = overlay.querySelector('.link-box'); + const linkInput = $('#share-link'); + const copyBtn = $('#btn-copy-link'); + overlay.style.display = 'flex'; + overlay.setAttribute('aria-hidden', 'false'); + linkBox.style.display = 'none'; + const close = () => { overlay.style.display = 'none'; overlay.setAttribute('aria-hidden', 'true'); }; + $('#btn-close-share').onclick = close; + overlay.querySelectorAll('.options .btn').forEach((btn) => { + btn.onclick = async () => { + const mode = btn.getAttribute('data-mode'); + try { + const data = await fetchJSON('api.php?action=share_create&id=' + encodeURIComponent(state.currentId) + '&mode=' + encodeURIComponent(mode)); + const url = (data && data.url) ? (location.origin + data.url) : ''; + if (!url) throw new Error('未获取到分享链接'); + linkInput.value = url; + linkBox.style.display = 'flex'; + copyBtn.onclick = async () => { + try { await navigator.clipboard.writeText(url); showToast('已复制分享链接:', url); } catch (e) { prompt('复制分享链接', url); } + }; + } catch (e) { + alert('生成分享链接失败:' + e.message); + } + }; + }); +} + +function showToast(text, link) { + const el = $('#share-toast'); + el.innerHTML = link ? (text + '打开') : text; + el.style.display = 'block'; + setTimeout(() => { el.style.display = 'none'; }, 3000); +} + +async function revokeShares() { + if (!state.currentId) { alert('当前没有文档'); return; } + if (!confirm('取消该文档的所有分享链接?此操作不可恢复')) return; + try { + await fetchJSON('api.php?action=share_revoke_all&id=' + encodeURIComponent(state.currentId)); + setStatus('已取消所有分享'); + showToast('已取消所有分享'); + } catch (e) { + alert('取消分享失败:' + e.message); + } +} diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 0000000..d86e152 --- /dev/null +++ b/assets/style.css @@ -0,0 +1,153 @@ +* { box-sizing: border-box; } +html, body { height: 100%; } +:root { + --bg: #0b0e12; + --panel: #0f1318; + --text: #eaeaea; + --muted: #9fb2bf; + --accent: #ff4d4f; + --accent-2: #ff6b6f; + --shadow: 0 12px 30px rgba(0,0,0,.35); + --bg-tint: #12161d; + --scroll-thumb: #2a2f3a; + --scroll-track: #141821; + --toolbar-tint: rgba(255,77,79,.08); + --input-bg: #0f1318; + --input-border: var(--accent); +} + +/* 浅色主题变量覆盖 */ +:root[data-theme="light"] { + --bg: #f7f8fa; + --panel: #ffffff; + --text: #1b2430; + --muted: #6b7785; + --accent: #ff4d4f; + --accent-2: #ff6b6f; + --shadow: 0 10px 26px rgba(22,28,38,.12); + --bg-tint: #eef2f7; + --scroll-thumb: #cfd6e2; + --scroll-track: #e9edf3; + --toolbar-tint: rgba(255,77,79,.03); + --input-bg: #ffffff; + --input-border: #e3e8ef; +} + +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Microsoft Yahei', sans-serif; + background: radial-gradient(1200px 600px at 70% 10%, var(--bg-tint) 0%, var(--bg) 55%); + color: var(--text); + overflow: hidden; /* 防止整页滚动 */ +} + +.app { + display: grid; + grid-template-columns: 300px 1fr; + height: 100vh; + backdrop-filter: saturate(1.2); +} + +.sidebar { + border-right: 2px solid var(--accent); + padding: 16px; + background: linear-gradient(180deg, rgba(255,77,79,.06), transparent 40%); + overflow: auto; /* 侧栏独立滚动 */ +} +.sidebar-header { display:flex; align-items:center; justify-content:space-between; gap:12px; } +.sidebar h1 { margin:0; font-size:18px; letter-spacing:.5px; } +.actions { display:flex; gap:8px; } + +.btn { + background: #1a1f27; + border: 1px solid var(--accent); + color: #ffd6d6; + padding: 8px 12px; + border-radius: 8px; + cursor: pointer; + transition: all .18s ease; +} +.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,77,79,.25); } +.btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); } +.btn.primary:hover { background: var(--accent-2); } +.btn.danger { background:#2a0f12; color:#ff9aa0; border-color:var(--accent); } +.btn[disabled] { opacity:.6; cursor:not-allowed; box-shadow:none; transform:none; } + +/* 浅色主题按钮更柔和 */ +:root[data-theme="light"] .btn { background:#f6f8fb; color:#3b4450; border-color:#e3e8ef; } +:root[data-theme="light"] .btn:hover { box-shadow: 0 6px 16px rgba(22,28,38,.12); } +:root[data-theme="light"] .btn.danger { background:#ffe8ea; color:#d33; border-color:#ffc2c5; } + +.doc-list { list-style:none; padding:0; margin:12px 0 0; display:flex; flex-direction:column; gap:8px; } +.doc-item { + position: relative; + padding: 8px 10px 8px 32px; + border: 1.5px solid var(--accent); + border-radius: 8px; + cursor: pointer; + background: var(--panel); + transition: all .2s ease; + font-size: 14px; + min-height: 40px; + display: flex; align-items: center; +} +.doc-item::before { + content: '\1F4C2'; /* folder emoji */ + position: absolute; left: 10px; top: 8px; opacity:.8; +} +.doc-item:hover { filter: brightness(1.05); transform: translateY(-1px); } +.doc-item.active { outline: 2px solid rgba(255,77,79,.25); background: var(--panel); box-shadow: 0 0 0 3px rgba(255,77,79,.06) inset; } + +.editor { display:flex; flex-direction:column; height: 100vh; } +.toolbar { + position: sticky; top: 0; z-index: 5; + display:flex; gap:12px; align-items:center; padding:12px; + border-bottom:2px solid var(--accent); + background: linear-gradient(180deg, var(--toolbar-tint), transparent 90%), var(--panel); + box-shadow: var(--shadow); +} +.title-input { + flex:1; padding:10px 12px; background: var(--input-bg); color:var(--text); + border:1px solid var(--input-border); border-radius:8px; outline:none; transition: box-shadow .15s; +} +.title-input:focus { box-shadow: 0 0 0 3px rgba(255,77,79,.3); } + +.editor-area { + flex:1; padding:18px 24px; overflow:auto; background: var(--panel); + line-height: 1.7; font-size: 15px; +} +.editor-area:empty::before { content:'在此编辑内容…'; color: var(--muted); } +.editor-area img { max-width:100%; height:auto; border-radius: 8px; box-shadow: 0 4px 22px rgba(0,0,0,.35); } +.editor-area p { margin: .7em 0; } +.editor-area h1, .editor-area h2, .editor-area h3 { margin: 1em 0 .6em; color:#2b2f36; } +.editor-area a { color:#ff9aa0; } + +.status { border-top:2px solid var(--accent); padding:8px 12px; font-size:12px; color:var(--muted); background: var(--panel); } + +/* 精致滚动条 */ +* { scrollbar-width: thin; } +::-webkit-scrollbar { width: 10px; height: 10px; } +::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 6px; border:2px solid var(--scroll-track); } +::-webkit-scrollbar-thumb:hover { filter: brightness(1.1); } +::-webkit-scrollbar-track { background: var(--scroll-track); } + +/* 响应式 */ +@media (max-width: 960px) { + .app { grid-template-columns: 240px 1fr; } +} +@media (max-width: 720px) { + .app { grid-template-columns: 1fr; } + .sidebar { border-right: none; border-bottom: 2px solid var(--accent); } +} +/* 分享弹窗与通知条 */ +.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: none; align-items: center; justify-content: center; z-index: 999; } +.modal { background: var(--panel); color: var(--text); border: 1px solid var(--input-border); border-radius: 12px; box-shadow: var(--shadow); width: 520px; max-width: 92vw; padding: 16px; } +.modal h3 { margin: 0 0 10px; font-size: 18px; } +.modal .options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } +.modal .options .btn { padding: 8px 12px; } +.modal .link-box { display: flex; gap: 8px; align-items: center; margin-top: 10px; } +.modal .link-box input { flex: 1; padding: 8px 10px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 8px; color: var(--text); } +.modal .footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; } + +.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; background: var(--panel); color: var(--text); border: 1px solid var(--input-border); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 14px; z-index: 998; display: none; } +.toast a { color: var(--accent); text-decoration: none; } diff --git a/auth.php b/auth.php new file mode 100644 index 0000000..a5a8d39 --- /dev/null +++ b/auth.php @@ -0,0 +1,30 @@ +location.replace("' . $target . '")'; + echo ''; + } + exit; + } +} + +function require_api_auth(): void { + if (!is_logged_in()) { + header('Content-Type: application/json; charset=utf-8'); + http_response_code(401); + echo json_encode(['error' => 'unauthorized']); + exit; + } +} diff --git a/config.php b/config.php new file mode 100644 index 0000000..dfa7c19 --- /dev/null +++ b/config.php @@ -0,0 +1,5 @@ + + Require all denied + + + Deny from all + + diff --git a/data/docs/doc_690b108682362.html b/data/docs/doc_690b108682362.html new file mode 100644 index 0000000..ba9729b --- /dev/null +++ b/data/docs/doc_690b108682362.html @@ -0,0 +1 @@ +

第一步:重复性测试:

    1. 使用一个OK的打胶泡水验证的标准品进行连续多次(比如10次)测试。

进行分析:

    1. 如果标准品的测试结果也波动很大:那么可以确认是设备或仪器的问题。需要重点检查夹具、密封圈、气路和仪器。
    2. 如果标准品的测试结果非常稳定:那么问题很可能出在产品本身或产品与夹具的配合上。

第二步:检查夹具和密封:

    1. 彻底清洁夹具的密封面和产品的被夹持面。
    2. 检查密封圈是否有任何损伤、永久变形或磨损。必要时更换新的密封圈。
    3. 确保每次放置产品的位置和姿态完全一致,并确保夹紧力稳定。

第三步:优化测试参数:

    1. 适当延长“稳定时间”和“测试时间”,观察结果是否变得更稳定。
    2. 确保测试环境相对封闭、稳定,远离热源和风源

产品放置位置/姿态不一致:

    1. 即使是同一个产品,每次放入夹具时,其与密封圈的接触位置有轻微偏差,也会导致密封效果不同。人工操作时尤其容易出现此问题夹紧力不稳定:
    2. 对于气缸夹具:气源压力波动会导致夹紧力变化。力小了,密封不严,泄漏值偏大。

密封圈损坏:

密封圈可能有轻微的划伤、磨损或永久性变形,导致其在不同次数的压合中,恢复形状的能力不一致

进入功能参数取消 "通道同步"勾选

单个穴位进行重复性测试,只拿标准品验证

建立以上条件后在拿产品验证

调试参数时间

第一步:确定最小平衡时间

    1. 将标准品放入膜具,并设置一个很长的测试时间(如10秒)和很短的稳定时间(如1秒)。
    2. 进行测试,并观察/导出压力-时间曲线。
    3. 这个时候看到,在充气结束后,压力曲线会先有一个明显的下降或波动(主要是温度恢复和湍流平息),然后逐渐趋于一条平滑的直线。
    4. 稳定时间 就应该设置为从充气结束到曲线完全变成平滑直线所需的时间,再额外加上0.5-1秒的安全余量。

第二步:确定最小测试时间

    1. 使用确定好的稳定时间,设置一个较长的测试时间。
    2. 用“标准品”进行至少20次重复性测试。
    3. 分析这20次测试结果的标准偏差。这个标准偏差代表了测试的“误差”。
    4. 逐步缩短测试时间,并重复步骤2和3。这个时候会出现,随着测试时间变短,标准偏差(误差)会逐渐增大。
    5. 选择一个误差可以接受的测试重复性(如 Cp/Cpk > 1.67),能满足这个要求的最短测试时间,就是当前最佳测试时间。

总结:

从 稳定时间3-5秒,测试时间5-8秒 开始尝试。然后通过观察压力曲线和分析重复性数据,来精确优化这两个参数。对于您遇到的重复性问题,适当延长稳定时间通常是首选的解决方案

\ No newline at end of file diff --git a/data/docs/doc_690b10977e0f8.html b/data/docs/doc_690b10977e0f8.html new file mode 100644 index 0000000..d347ec7 --- /dev/null +++ b/data/docs/doc_690b10977e0f8.html @@ -0,0 +1 @@ +

如果使用标准品测试结果稳定,但产品测试仍波动

当标准品测试稳定而产品测试波动时,问题几乎肯定出在产品本身或产品与测试系统的交互方式上。这表明您的测试设备是好的,但您的产品引入了一个或多个不稳定的变量

  1. 产品自身的物理特性(最常见原因)
    1. 柔性材料或结构(“呼吸效应”):这是头号嫌疑犯。如果产品含有橡胶、塑料薄膜、气囊、波纹管等柔性部件,在加压时它们会像气球一样轻微膨胀。这种形变会占据额外的体积,导致压力下降,被设备误判为“泄漏”。每次测试时,形变的程度可能略有不同,从而导致泄漏量读数波动 与标准品的区别:标准品通常是打胶或者金机,几乎不会形变
    2. 热容与温度效应:如果您的产品材料(如塑料)比金属标准品的比热容更大或导热性更差,它在测试过程中需要更长时间来达到热平衡。充气时气体压缩产生的热量,在产品内部消散的速度不同,导致每次测试的温度恢复曲线有微小差异,从而引起压力读数的波动 与标准品的区别:金属标准品导热快,温度稳定迅速
    3. 内部容积更大或结构更复杂:更大的容积或复杂的内部腔室、管路会延长压力和温度的稳定时间。如果您的稳定时间参数是针对标准品优化的,可能不足以让您的产品达到完全稳定状态
  2. 产品的一致性问题和污染
    1. 密封面质量不一致:每个产品的密封面可能存在微观的划痕、不平整、或毛刺。这些缺陷的随机性导致每次与夹具密封圈配合时,产生的泄漏量不同 与标准品的区别:标准品的密封面是精心加工和维护的,完美无瑕
    2. 产品内部污染物:产品内部可能存在松动的碎屑、油脂或水分。在测试时,加压气流可能使这些污染物移动,临时堵塞或打开某个泄漏路径,导致每次测试的泄漏量随机变化 与标准品的区别:标准品内部是绝对清洁干燥的
    3. 内部可动部件:如果产品内部有阀门、活塞、膜片等可动部件,这些部件在压力下的位置或状态可能每次都有细微差别,从而改变了内部的泄漏通道
  3. 产品与夹具的匹配性问题
    1. 产品尺寸公差:尽管是同一个产品,但不同批次或同一批次的不同个体之间,与夹具接触的关键尺寸可能存在公差。这会导致每次更换产品时,夹具的密封效果发生微小变化
    2. 放置方式的敏感性:您的产品可能对放置的角度、位置特别敏感。即使同一个人操作,微小的偏差也可能导致密封圈压在产品的不同位置上,影响密封效果

排查步骤建议

第一步:进行“产品固定”重复性测试

    1. 取一个泄漏值波动较大的产品将其放入夹具后,不做任何移动,连续进行10-20次测试
    2. 如果结果变得稳定:问题根源是 “产品放置的一致性” 或 “产品间的尺寸差异”。说明产品本身没有不稳定泄漏,只是每次放进去的时候密封效果不一样
    3. 如果结果依然波动:问题根源是 “产品自身的物理不稳定性”(如呼吸效应、内部污染物、可动部件)。因为产品根本没动,波动只能来自其内部

第二步:观察和分析压力曲线

    1. 看测试段的曲线:标准品在测试的时候曲线应该是一条完美的水平直线。产品的曲线是否有一条稳定的、向下倾斜的直线? -> 这表明存在真实的、稳定的泄漏如果是一条不规则的、抖动的、或曲率变化的线? -> 这强烈指向 “呼吸效应” 或 “温度不稳定”

第三步:优化测试参数以适应产品

    1. 显著延长稳定时间:如果怀疑是热效应或柔性形变,将稳定时间从3秒延长到10秒甚至15秒,观察结果是否变得稳定。如果稳定了,说明之前的时间不足
    2. 尝试不同的测试压力:有时稍微降低测试压力可以减少柔性部件的形变,从而获得更稳定的结果
\ No newline at end of file diff --git a/data/docs/doc_690c049068cf7.html b/data/docs/doc_690c049068cf7.html new file mode 100644 index 0000000..12da7e0 --- /dev/null +++ b/data/docs/doc_690c049068cf7.html @@ -0,0 +1 @@ +
  1. 加密货币
    1. 使用CCXT
  2. 服务器面板
    1. 链接:http://38.12.26.18:12768/9d2b364b
    2. 用户名:433curvp
    3. 密码:ae31437e
  3. 宝塔开心版安装指令:if [ -f /usr/bin/curl ];then curl -sSO https://bt11.bthappy.com/install/install_panel.sh;else wget -O install_panel.sh https://bt11.bthappy.com/install/install_panel.sh;fi;bash install_panel.sh bt11.bthappy.com




\ No newline at end of file diff --git a/data/docs/doc_690d692ae4057.html b/data/docs/doc_690d692ae4057.html new file mode 100644 index 0000000..f342b13 --- /dev/null +++ b/data/docs/doc_690d692ae4057.html @@ -0,0 +1 @@ +

关于 [设备/系统名称] 自身泄露故障分析报告

报告编号: [HY-YF20251110-A]
报告日期: [2025/11/10]
撰写部门: [研发部]

1. 执行摘要

本报告旨在系统性地分析与说明 [设备/系统名称] 因电磁阀进水导致的密封失效故障。通过对故障现象的观察、部件的拆解检查与根本原因分析,确认外部液体侵入是导致电磁阀内部腐蚀、密封件老化及功能失常的直接原因。报告结论为更换故障部件并实施长期预防措施提供了明确依据和建议,以防止问题重复发生,保障设备稳定运行

2. 问题背景与故障现象

3. 调查分析与诊断过程

3.1 初步检查:

3.2 部件拆解检查:

3.3 诊断结论:
综合以上检查,确认该电磁阀故障的直接原因为
内部少量持续进水,导致密封部件腐蚀和密封件劣化,最终引发密封不严。

4. 根本原因分析

导致电磁阀进水的主要途径包括:

  1. 环境因素(最主要原因):设备工作环境 湿度高或者空压机未加入干燥机,长期存在冷凝水。电磁阀长期或间歇性被 水气喷溅。电磁阀安装位置低于管路,管路中的冷凝水积聚后流入阀内。
  2. 操作与维护不当:在设备清洁保养过程中,未对管路系统未彻底吹干,残留水分。

5. 结论

[设备/系统名称] 的电磁阀故障,根本原因在于其工作环境存在水源侵入风险,而该电磁阀的选型防护等级与现场防护措施均不足以应对此风险。 水分进入阀体内部,引发密封件、化学性劣变,最终导致阀门密封失效。

6. 处理与建议措施

6.1 立即纠正措施:

  1. 更换部件: 立即更换同型号规格的全新电磁阀 [HY-012]。
  2. 系统清洁: 在安装新阀前,使用高压气体对连接管路进行 彻底吹扫,确保管路内干燥、无杂质。
  3. 规范安装: 在新阀安装时,确保接口螺纹密封(使用生料带或螺纹密封胶)可靠无误。

6.2 长期预防措施:

  1. 加入干燥机保持管道内无水汽保持干燥


\ No newline at end of file diff --git a/data/index.json b/data/index.json new file mode 100644 index 0000000..2f34da0 --- /dev/null +++ b/data/index.json @@ -0,0 +1,18 @@ +[ + { + "id": "doc_690b108682362", + "title": "调试全密封" + }, + { + "id": "doc_690b10977e0f8", + "title": "标准品与产品重复性波动高" + }, + { + "id": "doc_690c049068cf7", + "title": "API接口" + }, + { + "id": "doc_690d692ae4057", + "title": "报告" + } +] \ No newline at end of file diff --git a/data/shares.json b/data/shares.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/data/shares.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..86aeca2 --- /dev/null +++ b/index.html @@ -0,0 +1,39 @@ + + + + + 恭喜,站点创建成功! + + + +
+

恭喜, 站点创建成功!

+

这是默认index.html,本页面由系统自动生成

+ +
+ + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..1795f35 --- /dev/null +++ b/index.php @@ -0,0 +1,141 @@ + + + + + + + 文档编辑器 + + + + + +
+ +
+
+ +
+
+ + + + +
+
+
+
+
+
+ + +
+ + + + + + diff --git a/login.php b/login.php new file mode 100644 index 0000000..361f6e0 --- /dev/null +++ b/login.php @@ -0,0 +1,52 @@ + + + + + + + 登录 - 文档编辑器 + + + + +
+ +
+ + + diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..35e7173 --- /dev/null +++ b/logout.php @@ -0,0 +1,13 @@ + $found['expires_at']) { http_response_code(403); echo 'Link expired'; exit; } +// 一次性链接已使用则拒绝访问 +if (!empty($found['single_use']) && !empty($found['used'])) { http_response_code(403); echo 'Link already used'; exit; } +$id = $found['id'] ?? ''; +if (!$id || !safeId($id)) { http_response_code(400); echo 'Bad id'; exit; } + +$file = $docsDir . DIRECTORY_SEPARATOR . $id . '.html'; +if (!file_exists($file)) { http_response_code(404); echo 'Not found'; exit; } +$content = file_get_contents($file); + +$index = readJson($indexFile); +$title = $id; +foreach ($index as $it) { if (($it['id'] ?? '') === $id) { $title = $it['title'] ?? $id; break; } } +?> + + + + + + <?= htmlspecialchars($title) ?> - 分享预览 + + + + +
+ +
+ +
+
+ + + + diff --git a/upload.php b/upload.php new file mode 100644 index 0000000..241b673 --- /dev/null +++ b/upload.php @@ -0,0 +1,40 @@ + 'no file']); + exit; +} + +$file = $_FILES['image']; +if ($file['error'] !== UPLOAD_ERR_OK) { + http_response_code(400); + echo json_encode(['error' => 'upload error']); + exit; +} + +$finfo = finfo_open(FILEINFO_MIME_TYPE); +$mime = finfo_file($finfo, $file['tmp_name']); +finfo_close($finfo); +if (!preg_match('/^image\//', $mime)) { + http_response_code(400); + echo json_encode(['error' => 'not image']); + exit; +} + +$ext = pathinfo($file['name'], PATHINFO_EXTENSION); +$name = 'img_' . uniqid() . ($ext ? ('.' . preg_replace('/[^a-zA-Z0-9]/', '', $ext)) : ''); +$dest = $uploadsDir . DIRECTORY_SEPARATOR . $name; +move_uploaded_file($file['tmp_name'], $dest); + +// 构造相对URL(基于XAMPP的htdocs路径) +$url = '/PHP/wd/data/uploads/' . $name; +echo json_encode(['url' => $url], JSON_UNESCAPED_UNICODE);