SNAPSHOT W7 已部署稳定态 — 凯迪ERP+OA一体化平台 (MET 73.3%)
恢复点(restore point)。别人改崩后可 git reset --hard 回到此提交。 == 此快照内容 == - 后端 oa-backend: 734 控制器 / 711 实体 (Spring Boot 3.2.5 + SQLite, 端口8091) - 前端 modern-ui/app: Vue3+Vite, 约700页 (构建产物已在 oa-backend/src/main/resources/static) - 数据库 oa-backend/data/oa.db: 含全部演示数据 (强制入库, 6.6MB) - 交接文档 go.md + go-code-reference/endpoints/entities/database.md - 多代理建设脚本 .claude/wf-*.js == 状态 == - 对 凯迪科技ERP_20260507.xlsx 合规 MET ~73.3% (PARTIAL 75: 34可建+6种子/bug+35外部硬天花板) - 安全: 5轮红队+5轮复检, default-deny分级鉴权, 连续零可利用 - W3~W7 累计补完436缺口; W8末轮(40缺口)为半成品(源码树可编译但未集成) - 运行: cd oa-backend; java -jar build/libs/oa-backend-0.1.0.jar --server.port=8091; admin/123456 == 排除(gitignore, 可再生) == node_modules / oa-backend/build / .jdks / *.log / Backup-ERP-* / 弃用的OFBiz核心(只保留modern-ui) 完整文件夹备份见同目录 Backup-ERP-20260615-191517/ (含上述全部, 仅缺 node_modules) 时间戳: 20260615-191517 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
#!/usr/bin/env node
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const scriptPath = fileURLToPath(import.meta.url)
|
||||
const appRoot = path.resolve(path.dirname(scriptPath), '..')
|
||||
|
||||
const appVue = await readFile(path.join(appRoot, 'src/App.vue'), 'utf8')
|
||||
const shellVue = await readFile(path.join(appRoot, 'src/components/erp/ErpAppShell.vue'), 'utf8')
|
||||
const dashboardVue = await readFile(path.join(appRoot, 'src/views/DashboardView.vue'), 'utf8')
|
||||
const loginVue = await readFile(path.join(appRoot, 'src/views/LoginView.vue'), 'utf8')
|
||||
const moduleCatalog = await readFile(path.join(appRoot, 'src/data/moduleCatalog.ts'), 'utf8')
|
||||
const pageVue = await readFile(path.join(appRoot, 'src/views/BusinessPageView.vue'), 'utf8')
|
||||
const rendererVue = await readFile(path.join(appRoot, 'src/components/erp/ErpPageRenderer.vue'), 'utf8')
|
||||
const dataTableVue = await readFile(path.join(appRoot, 'src/components/erp/ErpDataTable.vue'), 'utf8')
|
||||
const design = await readFile(path.join(appRoot, '../../..', 'DESIGN.md'), 'utf8')
|
||||
|
||||
for (const text of ['工作台', '订单', '商品', '客户', '财务', '库存', '运营', '系统']) {
|
||||
assert.match(appVue + shellVue + moduleCatalog, new RegExp(text), `primary admin navigation should include ${text}`)
|
||||
}
|
||||
|
||||
for (const text of ['LoginView', 'showLoginGate', 'isAuthenticated']) {
|
||||
assert.match(appVue, new RegExp(text), `app should route through login/session gate: ${text}`)
|
||||
}
|
||||
assert.doesNotMatch(appVue + shellVue, /adminPreview|preserveAdminPreview|isAdminPreviewMode/, 'product shell must not expose a preview parameter that bypasses login')
|
||||
|
||||
for (const text of ['登录后进入完整 ERP 后台', 'apiLogin', 'targetHash']) {
|
||||
assert.match(loginVue, new RegExp(text), `login door should delegate to OFBiz login: ${text}`)
|
||||
}
|
||||
assert.match(appVue, /:target-hash="loginTargetHash"/, 'login gate should return users to the originally requested administrator route after OFBiz login')
|
||||
|
||||
for (const text of ['ERP 管理员工作台', '今日运营', '待办队列', '最近记录', '常用动作']) {
|
||||
assert.match(dashboardVue, new RegExp(text), `administrator dashboard should render ${text}`)
|
||||
}
|
||||
|
||||
assert.doesNotMatch(
|
||||
dashboardVue,
|
||||
/OFBiz 全量 UI 重写基座|Migration Foundation|交付预览|组件体系/,
|
||||
'default dashboard must not read like a migration preview site'
|
||||
)
|
||||
|
||||
for (const text of ['搜索订单', '运营工作台', '核心业务', '渠道与扩展', '统一运营管理平台', '系统治理', '系统管理']) {
|
||||
assert.match(shellVue, new RegExp(text), `admin shell should expose ${text}`)
|
||||
}
|
||||
assert.match(design, /Business operation before implementation evidence/, 'DESIGN.md should document the administrator-site direction')
|
||||
|
||||
for (const text of ['处理台', '资料明细', '处理动作', '操作记录']) {
|
||||
assert.match(pageVue, new RegExp(text), `generated business page tabs should include ${text}`)
|
||||
}
|
||||
|
||||
assert.doesNotMatch(
|
||||
pageVue,
|
||||
/eyebrow="Page Definition"|Generated Element Plus preview|<el-tab-pane label="展示" name="preview"/,
|
||||
'business page should not present itself as a technical preview surface'
|
||||
)
|
||||
|
||||
assert.match(rendererVue, /处理回执|处理编号|下一步处理/, 'generated page renderer should expose business action receipts instead of preview gate language')
|
||||
assert.doesNotMatch(dataTableVue, /Preview rows|结构预览行|结构预览/, 'data table user copy should not read as preview data')
|
||||
assert.doesNotMatch(
|
||||
rendererVue,
|
||||
/Generated from OFBiz|block\.description \|\| block\.source|Widget 转换器/,
|
||||
'business renderer should not pass generated source descriptions through to the business view'
|
||||
)
|
||||
assert.doesNotMatch(
|
||||
await readFile(path.join(appRoot, 'src/components/erp/ErpAdapterBlock.vue'), 'utf8'),
|
||||
/component:\/\/|\.ftl:已进入|legacy parity|等待领域动作验收|模板适配器|<div class="erp-adapter-block__eyebrow">\{\{ kind \}\}<\/div>/,
|
||||
'adapter blocks should use business-facing copy instead of technical source paths'
|
||||
)
|
||||
assert.doesNotMatch(
|
||||
pageVue,
|
||||
/service、event|page\.value\.pageId\]\)|label="工作面"|label="数据区"|label="执行区"|label="审批流"|后端服务协同|Service Dispatcher|统一 Lookup|动作编码/,
|
||||
'business page chrome should not expose implementation identifiers in the primary view'
|
||||
)
|
||||
assert.doesNotMatch(
|
||||
appVue + shellVue + dashboardVue,
|
||||
/label: 'Workbench'|label: 'Orders'|Live routes|service \/ event \/ readonly \/ local|>high<|routes<\/el-tag>/,
|
||||
'admin shell and workbench should use business-facing Chinese labels'
|
||||
)
|
||||
|
||||
console.log(JSON.stringify({
|
||||
status: 'passed',
|
||||
checked: ['App.vue', 'ErpAppShell.vue', 'DashboardView.vue', 'BusinessPageView.vue', 'ErpPageRenderer.vue', 'ErpDataTable.vue', 'DESIGN.md']
|
||||
}, null, 2))
|
||||
Reference in New Issue
Block a user