Signal 数据中心改为运行时加载 schema,解除 StandardScene 工程编译耦合。

加固 Config/Signal 路径解析,前端 DataCenter 表单类型与 API 对齐。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
黄兆尉
2026-08-26 17:47:15 +08:00
co-authored by Cursor
parent 3686abdc78
commit 4180140ae4
5 changed files with 103 additions and 62 deletions
@@ -34,7 +34,7 @@ export async function listSignalTables(): Promise<SignalDataListDto> {
if (MOCK) {
return {
signalEnabled: true,
workingDirectory: 'D:\\工作\\stand\\SimpleLite',
workingDirectory: 'D:\\工作\\stand\\Simple3',
tables: [
{ id: 'stations', title: 'PLC机构', category: 'PLC数据管理', fileName: 'stations.json' },
{ id: 'docks', title: '机构工位', category: 'PLC数据管理', fileName: 'station-docks.json' },
@@ -6,7 +6,7 @@
<div>
<h2>{{ table?.title ?? title }}</h2>
<p>
读写 SimpleLite 工作目录 <code>Config/Signal</code>改完后到信号交互进程点重新加载配置
读写 Simple3 工作目录 <code>Config/Signal</code>改完后到信号交互进程点重新加载配置
点位为 BOOL 时按字节 + 直接读写
<span v-if="table">
{{ table.fileName }}{{ table.exists ? '' : ' · 文件尚未创建保存后写入' }}
@@ -117,7 +117,7 @@ const formGroups = computed(() => {
const dialogVisible = ref(false)
const editingIndex = ref(-1)
const form = reactive<Record<string, unknown>>({})
const form = reactive<Record<string, any>>({})
function truthy(v: unknown): boolean {
return v === true || v === 'true' || v === 1 || v === '1'