fix(platform): 代码审查整改——反代按域拆分授权、根除探测副作用与死代码清理

- YARP: map-edit/ai-config 全方法、reflection 写方法挂 PlatformScope,
  reflection/selection 单独放行(运营端 3D 高亮),堵住运营账号直达地图编辑/反射调用
- goto-site 探测改用不存在的 car/-1(消除健康检查真实派车风险)并加 60s 缓存
- Config PUT 按 scope 收紧:RCSMonitor 仅可写 ops 节;wizard 写操作与
  simplelite/restart-for-update 限 PlatformScope;/api/health 去除虚假端口表
- 修复 wms 模块菜单裁剪失效(admin-config-location → admin-config-facility)
- vrHost 默认 location.hostname:8223(新增 utils/vrender.ts),远程访问 3D 视口可用
- /status 页改接真实 /api/health* 诊断;uploadAsset 移除矛盾 multipart 头;
  mapsApi.merge 对齐 save 的 409 冲突处理;JWT 验签参数改启动期 DI 一次性配置
- 清理死代码:ProjectionController、DataTablePro、useClipboard、CadToolbarView、
  AppShell 未用导入;lint 脚本替换为 typecheck;日志窗口 List 改 Queue
This commit is contained in:
zhaowei.huang
2026-06-12 23:00:47 +08:00
parent d857cda071
commit 20f98db6da
24 changed files with 266 additions and 320 deletions
@@ -1,56 +0,0 @@
import { ref } from 'vue'
import type { SelectionItem } from './useSelection'
/**
* 编辑器剪贴板:保存最近一次「复制」操作的对象快照(含字段值),
* 用于「粘贴 (Ctrl+V)」与「复制字段 (Copy Fields)」。
*
* 粘贴策略:调用方在拿到目标坐标后,用 mapEditApi.batch 创建副本(带偏移)。
* 复制字段:调用方调 mapEditApi.copyFieldsTo 把指定字段名写到目标对象(们)。
*
* 注意:剪贴板里保存的是对象的"逻辑快照",不是 DOM 文本剪贴板。
*/
export interface ClipboardSnapshot {
items: Array<{
kind: string
sourceId: number
typeName: string
/** 对象的几何 / 样式字段(含 x, y 用于偏移粘贴)。 */
fields: Record<string, string>
}>
fieldNames: string[]
}
export function useClipboard() {
const data = ref<ClipboardSnapshot | null>(null)
function copy(items: SelectionItem[], allFields: Record<number, Record<string, string>>) {
if (items.length === 0) {
data.value = null
return
}
const fieldNamesSet = new Set<string>()
const snapshot: ClipboardSnapshot = {
items: items.map((it) => {
const f = allFields[it.id] ?? {}
Object.keys(f).forEach((k) => fieldNamesSet.add(k))
return {
kind: it.kind,
sourceId: it.id,
typeName: it.typeName,
fields: f
}
}),
fieldNames: []
}
snapshot.fieldNames = [...fieldNamesSet]
data.value = snapshot
}
function clear() {
data.value = null
}
return { data, copy, clear }
}