12 Commits

Author SHA1 Message Date
yangsy 67dccc5011 refactor(vimp): 移除冗余的选中设备GB编码相关代码
删除alarm-tree、camera-tree组件中的选中状态定义、节点绑定及双击设置逻辑,同时移除vimp主页面中对应的状态声明、组件传参和状态展示代码
2026-05-27 22:28:57 +08:00
yangsy a0048411a4 重构(alarm-tree): 使用 alarmOnline 函数替代直接状态检查
将多处行内的告警状态检查替换为统一的 alarmOnline 辅助函数,后续若需调整在线状态校验逻辑仅需修改一处,提升代码可读性与可维护性。
2026-05-27 22:25:50 +08:00
yangsy d177956edd fix(device-center-query): 移除设备及告警数据赋值的非空判断
解决空数组无法更新对应站点映射的问题,避免残留旧数据
2026-05-27 21:48:03 +08:00
yangsy d1b973be15 refactor(vimp/types): 重命名树类型模块为设备树并补充类型定义
创建device-tree.ts作为新的设备树类型模块,迁移原tree.ts中的类型定义,新增摄像机、警报器设备树的节点类型、类型守卫函数及标签页属性类型,同时更新类型入口文件的导出路径。
2026-05-27 21:31:16 +08:00
yangsy 65603d469d refactor(vimp): 抽离并重构vimp的摄像机、告警store与树形类型
- 新增camera-store.ts与alarm-store.ts,封装摄像机、告警业务逻辑为独立Pinia store
- 重构tree.ts中的树形节点类型命名与关联判断函数
- 更新stores/index.ts的导出文件路径
- 移除alarm-tree.vue中的冗余类型导入
2026-05-27 21:29:59 +08:00
yangsy a92e47bc18 refactor(vimp): 重构vimp模块的API目录与导入路径
重新梳理vimp模块的API代码结构,拆分为client、model、query、request子模块并添加统一导出入口;修正所有相关文件的导入路径,新增通用响应类型与工具函数,优化树组件的类型判断逻辑,同时新增设备查询相关API与查询hook。
2026-05-27 15:43:53 +08:00
yangsy 7467b54834 feat(vimp): 设备树原型 2026-05-27 02:33:06 +08:00
yangsy e08cea9c6a build(vite config): 优化开发服务器代理与端口配置
- 将开发服务器端口提取为常量 SERVER_PORT 以简化维护
- 为 API 代理添加环境注释并注释备用后端地址
- 新增本地测试用的 vimp/api 代理配置
- 新增 CDN 代理指向本地开发服务器端口
2026-05-27 02:23:13 +08:00
yangsy 24e126e946 feat(codes): 新增地铁基础静态配置JSON数据
本次新增public/vimp/codes/目录下的5个静态配置文件,覆盖地铁线路信息、区域分区编码、停车区域、站点内部区域细分以及全量站点列表,为地铁相关业务提供基础数据支撑。
2026-05-27 02:22:12 +08:00
yangsy 1e2ad96e56 docs(AGENTS.md): 新增AGENTS.md项目说明文档 2026-05-25 10:14:54 +08:00
yangsy 6c57af9e55 feat(vite配置): 添加杨浦21号线测试环境代理配置
新增杨浦21号线测试环境专用代理配置列表,添加注释的默认测试环境代理条目,并将新代理列表加入主代理配置中
2026-05-25 10:09:43 +08:00
yangsy ca7d6baa2e refactor: 重构NVR集群处理逻辑,优化设备树展示
抽离NVR集群相关的公共工具函数,重构isNvrCluster的实现逻辑。修复原有设备树中NVR分组的逻辑错误,原本会将所有单机NVR添加到每个集群的子节点中,现在会正确将单机NVR分配到对应集群,未归属的单机NVR作为独立节点。简化设备树组件的代码,统一使用封装后的工具方法处理集群分组。修复设备定位时的集群匹配逻辑,使用更准确的IP包含判断。初始化设备树数据的默认空值,修正类型定义错误。
2026-05-20 21:18:54 +08:00
32 changed files with 3166 additions and 69 deletions
+271
View File
@@ -0,0 +1,271 @@
# 网络设备管理平台
## 项目概述
这是网络设备管理平台的前端项目,用于在地铁线路运管中心检测和查看各车站网络设备的详细数据、运行情况、异常告警,并提供分析、统计、日志和权限管理能力。
主要设备类型:
- 摄像机
- 网络录像机
- 交换机
- 解码器
- 智能安防箱
- 媒体服务器
- 视频服务器
- 网络键盘
- 报警主机
## 技术栈
- 包管理:pnpm
- 构建工具:Vite
- 前端框架:Vue 3
- 语言:TypeScript
- 路由:Vue Router
- 组件库:Naive UI
- 状态管理:Pinia + pinia-plugin-persistedstate
- 服务端状态/轮询:TanStack Vue Query
- 本地持久化:localStorage、sessionStorage、IndexedDB/localforage
- 网络请求:axios
- 实时消息:STOMP/WebSocket`@stomp/stompjs`
- 图表:ECharts
- 图标:lucide-vue-next
- 样式:Sass
## 环境与脚本
### 运行环境
- Node.js`^20.19.0 || >=22.12.0`
- pnpm:以 `package.json``packageManager` 为准
### 常用命令
```bash
pnpm install # 安装依赖
pnpm dev # 启动开发服务,默认端口 9763
pnpm build # 类型检查 + Vite 构建 + 构建产物压缩
pnpm preview # 预览构建产物
pnpm build-only # 仅执行 Vite 构建
pnpm type-check # 执行 vue-tsc 类型检查
pnpm lint # 执行 ESLint,并带 --fix
pnpm format # 使用 Prettier 格式化 src/
```
当前项目未配置测试脚本,也未发现测试文件;不要声称已运行单元测试。需要验证改动时,优先运行 `pnpm type-check``pnpm lint``pnpm build` 中与改动相关的命令。
### 构建流程
`pnpm build` 的实际流程为:
1. `tsx build/pre-build.ts`:根据 `package.json` 的版本和构建时间写入 `public/manifest.json`
2. `vue-tsc --build`:类型检查。
3. `vite build`:生成 `dist/`
4. `tsx build/post-build.ts`:基于 `dist/` 生成 `.zip``.tar``.tar.gz` 压缩包。
压缩包命名格式为:`ndm-web-platform_v<version>_<YYMMDD-HHmmss>`
## 目录结构
项目源码集中在 `src/`
```text
src/
apis/ # 接口客户端、接口模型、业务请求封装
components/ # 业务组件与全局组件
device/
global/
permission/
station/
composables/ # 组合式函数
alarm/
common/
device/
permission/
query/ # TanStack Query 轮询与请求编排
station/
stomp/ # STOMP/WebSocket 客户端
constants/ # 常量
enums/ # 枚举
helpers/ # 辅助逻辑
layouts/
app-layout.vue # 登录后主布局
pages/ # 页面
plugins/ # Pinia 持久化等插件
router/
index.ts # 路由配置与守卫
stores/ # Pinia stores
styles/ # 全局样式
types/ # 全局/工具类型
utils/ # 通用工具函数
```
路径别名:`@/*` 指向 `src/*`
## 页面与路由
路由配置在 `src/router/index.ts`。登录页独立于主布局;除 `/login` 外,其余页面都作为 `src/layouts/app-layout.vue` 的子路由。
```text
src/
router/
index.ts
layouts/
app-layout.vue
pages/
login/
login-page.vue # 登录页,对应 /login
station/
station-page.vue # 车站状态页/首页,对应 /station
device/
device-page.vue # 设备诊断页,对应 /device
alarm/
alarm-log-page.vue # 设备告警记录,对应 /alarm/alarm-log
alarm-ignore-page.vue # 告警忽略管理,对应 /alarm/alarm-ignore
log/
vimp-log-page.vue # 视频平台日志,对应 /log/vimp-log
call-log-page.vue # 上级调用日志,对应 /log/call-log
permission/
permission-page.vue # 权限管理,对应 /permission
system/
changelog/
changelog-page.vue # 更新记录,对应 /changelog
error/
not-found-page.vue # 404 页面,对应 catch-all
```
路由守卫规则:
- 未登录访问非 `/login` 页面会跳转到 `/login`
- 已登录访问 `/login` 会跳转到 `/`
- `/` 默认重定向到 `/station`
- `/permission` 需要 `useUserStore().isLamp` 为真,否则跳转到 404。
## 数据轮询与状态管理
由于后端服务按车站分布,前端需要向各车站服务依次请求数据。项目采用“单点驱动 + 变更监听 + 级联触发”的轮询模式。
核心文件位于 `src/composables/query/`
- `use-line-stations-query.ts`:查询所有车站,是业务轮询入口。
- `use-user-permission-query.ts`:查询并计算当前用户在各车站的权限,负责调度后续设备/告警查询。
- `use-line-devices-query.ts`:查询设备数据。
- `use-line-alarms-query.ts`:查询告警数据。
- `use-verify-user-query.ts`:用户登录/校验相关请求。
- `use-version-check-query.ts`:版本检查,依赖构建阶段生成的 `/manifest.json`
关键 Pinia stores 位于 `src/stores/`
- `user.ts`:用户登录态、Token、用户类型等。
- `station.ts`:车站数据。
- `device.ts`:设备数据。
- `alarm.ts`:告警数据。
- `permission.ts`:权限数据。
- `setting.ts`:系统设置、调试开关、网络开关等。
- `polling.ts`:轮询状态控制。
- `unread.ts`:未读状态。
持久化注意事项:
- 大体量业务数据会使用 IndexedDB/localforage。
- 普通设置类状态会使用 localStorage/sessionStorage。
- `src/main.ts` 会比较 `VITE_STORAGE_VERSION` 与本地 `ndm-storage-version`,不一致时清空 localStorage 并清空 localforage。
## 接口与代理
接口相关代码位于 `src/apis/`
- `client/`HTTP 客户端基础封装。
- `domain/`:领域相关类型/逻辑。
- `model/`:接口模型。
- `request/`:按业务拆分的请求函数。
开发代理配置在 `vite.config.ts`
- 开发服务端口:`9763`
- 已配置多个线路/站点前缀代理,包括 01、02、04、10、21 相关站点。
- 当前配置包含 `/api``/minio``/ws` 等代理项。
- `ProxyItem.rewrite` 用于将本地请求前缀改写为后端真实路径,例如将 `/1001/api` 改写为 `/api`
修改代理时,应同步检查 `key``target``rewrite``ws` 是否匹配实际环境。
## 环境变量
项目使用 Vite 环境变量,当前变量集中在 `.env`。文档或回答中只列变量名和用途,不要复述真实密钥、密码或授权值。
常见变量:
- `VITE_APP_TITLE`:页面标题。
- `VITE_REQUEST_INTERVAL`:轮询间隔,单位秒。
- `VITE_NDM_APP_KEY`:网管 appKey。
- `VITE_LAMP_CLIENT_ID`LAMP clientId。
- `VITE_LAMP_CLIENT_SECRET`LAMP clientSecret。
- `VITE_LAMP_USERNAME`LAMP 登录用户名。
- `VITE_LAMP_PASSWORD`LAMP 登录密码。
- `VITE_LAMP_AUTHORIZATION`:已有 Authorization 时直接使用,否则由 clientId/clientSecret 生成。
- `VITE_STORAGE_VERSION`:本地缓存版本,用于触发缓存清理。
- `VITE_DEBUG_CODE`:调试模式授权码。
## 调试模式与离线开发
调试模式默认隐藏,用于开发、联调和故障排查。
开启方式:
1. 使用快捷键 `Ctrl + Alt + D` 唤起验证弹窗。
2. 输入 `VITE_DEBUG_CODE` 对应授权码。
3. 验证通过后,“系统设置”中会显示调试分组。
调试相关能力:
- 显示设备原始数据。
- 控制是否轮询车站。
- 控制是否主动请求。
- 控制是否订阅 STOMP/WebSocket 消息。
- 启用模拟用户。
- 允许在特定场景下直接操作本地 IndexedDB。
离线开发:
- 如果浏览器已有现场缓存,可在调试模式中关闭轮询、主动请求和消息订阅,直接查看本地缓存。
- 全新环境可在登录页控制台设置 `window.$mockUser.value = true` 进入模拟登录,再通过调试面板导入 `docs/data/` 下的数据:
- `ndm-station-store.json`
- `ndm-device-store.json`
- `ndm-alarm-store.json`
## 代码风格与约定
- 遵循现有 Vue SFC、TypeScript、组合式函数和 Pinia 写法。
- 新增业务请求时优先放入 `src/apis/request/` 对应业务分类。
- 新增页面时同步更新 `src/router/index.ts`,并保持 `src/pages/` 目录与路由语义一致。
- 新增共享逻辑优先放入 `src/composables/``src/helpers/``src/utils/`,不要在页面中堆积重复逻辑。
- 新增全局/业务组件时优先放入 `src/components/` 对应分类。
- 使用 `@/` 引用 `src/` 下模块。
- 不要在代码、文档或回复中泄露真实密码、Token、Authorization 或现场地址以外的敏感信息。
格式化配置来自 `.prettierrc.json`
- LF 换行
- 2 空格缩进
- 单引号
- 使用分号
- `trailingComma: all`
- `printWidth: 200`
ESLint 重点规则:
- `@typescript-eslint/no-unused-vars` 为 warn。
- `@typescript-eslint/no-explicit-any` 当前关闭,但新增代码仍应尽量保持类型清晰。
- `vue/multi-word-component-names` 当前关闭。
## 协作规则
1. 默认不要直接修改项目代码;当用户明确授权修改时,只修改授权范围内的文件。
2. 修改前先阅读相关文件和既有实现,避免凭空猜测目录、接口或状态结构。
3. 修改后说明改了哪些文件、为什么改、如何验证。
4. 文档类修改至少重新读取目标文件确认内容正确。
5. 代码类修改应按影响范围运行 `pnpm type-check``pnpm lint``pnpm build` 或更小范围的可用验证命令。
6. 不要提交 Git commit,除非用户明确要求。
7. 不要删除失败测试或通过压制类型错误来规避问题。
8. 不要在最终说明中声称执行了未实际执行的命令。
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ndm-web-platform",
"version": "0.42.0",
"version": "0.0.0",
"private": true,
"type": "module",
"engines": {
+43
View File
@@ -0,0 +1,43 @@
{
"001": { "name": "1号线", "color": "#E81B38" },
"002": { "name": "2号线", "color": "#8AC63F" },
"003": { "name": "3号线", "color": "#FBD005" },
"004": { "name": "4号线", "color": "#4F2D8B" },
"005": { "name": "5号线", "color": "#9056A3" },
"006": { "name": "6号线", "color": "#D61670" },
"007": { "name": "7号线", "color": "#F37120" },
"008": { "name": "8号线", "color": "#009DD8" },
"009": { "name": "9号线", "color": "#7AC7EA" },
"010": { "name": "10号线", "color": "#BCA8D1" },
"011": { "name": "11号线", "color": "#7D2030" },
"012": { "name": "12号线", "color": "#007C65" },
"013": { "name": "13号线", "color": "#E795C0" },
"014": { "name": "14号线", "color": "#5E5C29" },
"015": { "name": "15号线", "color": "#759092" },
"016": { "name": "16号线", "color": "#8ED1C0" },
"017": { "name": "17号线", "color": "#B87975" },
"018": { "name": "18号线", "color": "#BB8C51" },
"019": { "name": "19号线", "color": "#BABABA" },
"020": { "name": "20号线", "color": "#BABABA" },
"021": { "name": "21号线", "color": "#BABABA" },
"022": { "name": "22号线", "color": "#BABABA" },
"023": { "name": "23号线", "color": "#BABABA" },
"024": { "name": "24号线", "color": "#BABABA" },
"025": { "name": "25号线", "color": "#BABABA" },
"051": { "name": "浦江线", "color": "#BABABA" },
"501": { "name": "COCC", "color": "#BABABA" },
"502": { "name": "BCOCC", "color": "#BABABA" },
"601": { "name": "上海火车站分控", "color": "#BABABA" },
"602": { "name": "徐家汇分控", "color": "#BABABA" },
"603": { "name": "宜山路分控", "color": "#BABABA" },
"604": { "name": "陆家嘴分控", "color": "#BABABA" },
"605": { "name": "人民广场分控", "color": "#BABABA" },
"606": { "name": "东宝兴路分控", "color": "#BABABA" },
"607": { "name": "虹桥枢纽分控", "color": "#BABABA" },
"608": { "name": "松江大学城分控", "color": "#BABABA" },
"609": { "name": "民生路分控", "color": "#BABABA" },
"610": { "name": "西藏南路分控", "color": "#BABABA" },
"611": { "name": "延吉中路分控", "color": "#BABABA" },
"612": { "name": "迪士尼分控", "color": "#BABABA" },
"900": { "name": "轨交总队", "color": "#BABABA" }
}
+102
View File
@@ -0,0 +1,102 @@
[
{
"code": "01",
"name": "地下区",
"subs": [
{ "code": "01001", "name": "地下01层" },
{ "code": "01002", "name": "地下02层" },
{ "code": "01003", "name": "地下03层" },
{ "code": "01004", "name": "地下04层" },
{ "code": "01005", "name": "地下05层" },
{ "code": "01006", "name": "地下06层" },
{ "code": "01007", "name": "地下07层" },
{ "code": "01008", "name": "地下08层" },
{ "code": "01009", "name": "地下09层" }
]
},
{
"code": "02",
"name": "调度大厅",
"subs": [{ "code": "02001", "name": "调度大厅" }]
},
{
"code": "03",
"name": "一区",
"subs": [
{ "code": "03001", "name": "01层" },
{ "code": "03002", "name": "02层" },
{ "code": "03003", "name": "03层" },
{ "code": "03004", "name": "04层" },
{ "code": "03005", "name": "05层" },
{ "code": "03006", "name": "06层" },
{ "code": "03007", "name": "07层" },
{ "code": "03008", "name": "08层" },
{ "code": "03009", "name": "09层" },
{ "code": "03010", "name": "10层" }
]
},
{
"code": "04",
"name": "二区",
"subs": [
{ "code": "04001", "name": "11层" },
{ "code": "04002", "name": "12层" },
{ "code": "04003", "name": "13层" },
{ "code": "04004", "name": "14层" },
{ "code": "04005", "name": "15层" },
{ "code": "04006", "name": "16层" },
{ "code": "04007", "name": "17层" },
{ "code": "04008", "name": "18层" },
{ "code": "04009", "name": "19层" },
{ "code": "04010", "name": "20层" }
]
},
{
"code": "05",
"name": "三区",
"subs": [
{ "code": "05001", "name": "21层" },
{ "code": "05002", "name": "22层" },
{ "code": "05003", "name": "23层" },
{ "code": "05004", "name": "24层" },
{ "code": "05005", "name": "25层" },
{ "code": "05006", "name": "26层" },
{ "code": "05007", "name": "27层" },
{ "code": "05008", "name": "28层" },
{ "code": "05009", "name": "29层" },
{ "code": "05010", "name": "30层" }
]
},
{
"code": "06",
"name": "四区",
"subs": [
{ "code": "06001", "name": "31层" },
{ "code": "06002", "name": "32层" },
{ "code": "06003", "name": "33层" },
{ "code": "06004", "name": "34层" },
{ "code": "06005", "name": "35层" },
{ "code": "06006", "name": "36层" },
{ "code": "06007", "name": "37层" },
{ "code": "06008", "name": "38层" },
{ "code": "06009", "name": "39层" },
{ "code": "06010", "name": "40层" }
]
},
{
"code": "07",
"name": "五区",
"subs": [
{ "code": "07001", "name": "41层" },
{ "code": "07002", "name": "42层" },
{ "code": "07003", "name": "43层" },
{ "code": "07004", "name": "44层" },
{ "code": "07005", "name": "45层" },
{ "code": "07006", "name": "46层" },
{ "code": "07007", "name": "47层" },
{ "code": "07008", "name": "48层" },
{ "code": "07009", "name": "49层" },
{ "code": "07010", "name": "50层" }
]
}
]
+378
View File
@@ -0,0 +1,378 @@
[
{
"code": "01",
"name": "停车库",
"subs": [
{ "code": "01001", "name": "库门01" },
{ "code": "01002", "name": "库门02" },
{ "code": "01003", "name": "库门03" },
{ "code": "01004", "name": "库门04" },
{ "code": "01005", "name": "库门05" },
{ "code": "01006", "name": "库门06" },
{ "code": "01007", "name": "库门07" },
{ "code": "01008", "name": "库门08" },
{ "code": "01009", "name": "库门09" },
{ "code": "01010", "name": "库门10" },
{ "code": "01011", "name": "库门11" },
{ "code": "01012", "name": "库门12" },
{ "code": "01013", "name": "库门13" },
{ "code": "01014", "name": "库门14" },
{ "code": "01015", "name": "库门15" },
{ "code": "01016", "name": "库门16" },
{ "code": "01017", "name": "库门17" },
{ "code": "01018", "name": "库门18" },
{ "code": "01019", "name": "库门19" },
{ "code": "01020", "name": "库门20" },
{ "code": "01031", "name": "库门31" },
{ "code": "01032", "name": "库门32" },
{ "code": "01033", "name": "库门33" },
{ "code": "01034", "name": "库门34" },
{ "code": "01035", "name": "库门35" },
{ "code": "01036", "name": "库门36" },
{ "code": "01037", "name": "库门37" },
{ "code": "01038", "name": "库门38" },
{ "code": "01039", "name": "库门39" },
{ "code": "01040", "name": "库门40" },
{ "code": "01041", "name": "库门41" },
{ "code": "01042", "name": "库门42" },
{ "code": "01043", "name": "库门43" },
{ "code": "01044", "name": "库门44" },
{ "code": "01045", "name": "库门45" },
{ "code": "01046", "name": "库门46" },
{ "code": "01047", "name": "库门47" },
{ "code": "01048", "name": "库门48" },
{ "code": "01049", "name": "库门49" },
{ "code": "01050", "name": "库门50" }
]
},
{
"code": "02",
"name": "其它车库",
"subs": [
{ "code": "02001", "name": "检修库01" },
{ "code": "02002", "name": "检修库02" },
{ "code": "02003", "name": "检修库03" },
{ "code": "02004", "name": "检修库04" },
{ "code": "02005", "name": "检修库05" },
{ "code": "02006", "name": "洗车库01" },
{ "code": "02007", "name": "洗车库02" },
{ "code": "02008", "name": "洗车库03" },
{ "code": "02009", "name": "洗车库04" },
{ "code": "02010", "name": "洗车库05" },
{ "code": "02011", "name": "镟轮库01" },
{ "code": "02012", "name": "镟轮库02" },
{ "code": "02013", "name": "镟轮库03" },
{ "code": "02014", "name": "镟轮库04" },
{ "code": "02015", "name": "镟轮库05" },
{ "code": "02016", "name": "地下机动车库01" },
{ "code": "02017", "name": "地下机动车库02" },
{ "code": "02018", "name": "地下机动车库03" },
{ "code": "02019", "name": "地下机动车库04" },
{ "code": "02020", "name": "地下机动车库05" },
{ "code": "02021", "name": "特种车库01" },
{ "code": "02022", "name": "特种车库02" },
{ "code": "02023", "name": "特种车库03" },
{ "code": "02024", "name": "特种车库04" },
{ "code": "02025", "name": "特种车库05" },
{ "code": "02026", "name": "联合车库01" },
{ "code": "02027", "name": "联合车库02" },
{ "code": "02028", "name": "联合车库03" },
{ "code": "02029", "name": "联合车库04" },
{ "code": "02030", "name": "联合车库05" },
{ "code": "02031", "name": "静调库01" },
{ "code": "02032", "name": "静调库02" },
{ "code": "02033", "name": "静调库03" },
{ "code": "02034", "name": "静调库04" },
{ "code": "02035", "name": "静调库05" }
]
},
{
"code": "03",
"name": "办公楼",
"subs": [
{ "code": "03001", "name": "信号楼01" },
{ "code": "03002", "name": "信号楼02" },
{ "code": "03003", "name": "信号楼03" },
{ "code": "03004", "name": "信号楼04" },
{ "code": "03005", "name": "信号楼05" },
{ "code": "03006", "name": "信号楼06" },
{ "code": "03007", "name": "信号楼07" },
{ "code": "03008", "name": "信号楼08" },
{ "code": "03009", "name": "信号楼09" },
{ "code": "03010", "name": "信号楼10" },
{ "code": "03011", "name": "办公楼01" },
{ "code": "03012", "name": "办公楼02" },
{ "code": "03013", "name": "办公楼03" },
{ "code": "03014", "name": "办公楼04" },
{ "code": "03015", "name": "办公楼05" },
{ "code": "03016", "name": "办公楼06" },
{ "code": "03017", "name": "办公楼07" },
{ "code": "03018", "name": "办公楼08" },
{ "code": "03019", "name": "办公楼09" },
{ "code": "03020", "name": "办公楼10" }
]
},
{
"code": "04",
"name": "出入口",
"subs": [
{ "code": "04001", "name": "出入口01" },
{ "code": "04002", "name": "出入口02" },
{ "code": "04003", "name": "出入口03" },
{ "code": "04004", "name": "出入口04" },
{ "code": "04005", "name": "出入口05" },
{ "code": "04006", "name": "喉部01" },
{ "code": "04007", "name": "喉部02" },
{ "code": "04008", "name": "喉部03" },
{ "code": "04009", "name": "喉部04" },
{ "code": "04010", "name": "喉部05" },
{ "code": "04011", "name": "峒口01" },
{ "code": "04012", "name": "峒口02" },
{ "code": "04013", "name": "峒口03" },
{ "code": "04014", "name": "峒口04" },
{ "code": "04015", "name": "峒口05" }
]
},
{
"code": "05",
"name": "周界",
"subs": [
{ "code": "05001", "name": "周界01" },
{ "code": "05002", "name": "周界02" },
{ "code": "05003", "name": "周界03" },
{ "code": "05004", "name": "周界04" },
{ "code": "05005", "name": "周界05" },
{ "code": "05006", "name": "周界06" },
{ "code": "05007", "name": "周界07" },
{ "code": "05008", "name": "周界08" },
{ "code": "05009", "name": "周界09" },
{ "code": "05010", "name": "周界10" }
]
},
{
"code": "06",
"name": "仓库",
"subs": [
{ "code": "06001", "name": "危险物品仓库01" },
{ "code": "06002", "name": "危险物品仓库02" },
{ "code": "06003", "name": "危险物品仓库03" },
{ "code": "06004", "name": "危险物品仓库04" },
{ "code": "06005", "name": "危险物品仓库05" },
{ "code": "06006", "name": "物流仓库01" },
{ "code": "06007", "name": "物流仓库02" },
{ "code": "06008", "name": "物流仓库03" },
{ "code": "06009", "name": "物流仓库04" },
{ "code": "06010", "name": "物流仓库05" }
]
},
{
"code": "07",
"name": "道路",
"subs": [
{ "code": "07001", "name": "道路01" },
{ "code": "07002", "name": "道路02" },
{ "code": "07003", "name": "道路03" },
{ "code": "07004", "name": "道路04" },
{ "code": "07005", "name": "道路05" }
]
},
{
"code": "08",
"name": "其它",
"subs": [
{ "code": "08001", "name": "变电站01" },
{ "code": "08002", "name": "变电站02" },
{ "code": "08003", "name": "变电站03" },
{ "code": "08004", "name": "变电站04" },
{ "code": "08005", "name": "变电站05" }
]
},
{
"code": "11",
"name": "停车库(录)",
"subs": [
{ "code": "11001", "name": "库门01" },
{ "code": "11002", "name": "库门02" },
{ "code": "11003", "name": "库门03" },
{ "code": "11004", "name": "库门04" },
{ "code": "11005", "name": "库门05" },
{ "code": "11006", "name": "库门06" },
{ "code": "11007", "name": "库门07" },
{ "code": "11008", "name": "库门08" },
{ "code": "11009", "name": "库门09" },
{ "code": "11010", "name": "库门10" },
{ "code": "11011", "name": "库门11" },
{ "code": "11012", "name": "库门12" },
{ "code": "11013", "name": "库门13" },
{ "code": "11014", "name": "库门14" },
{ "code": "11015", "name": "库门15" },
{ "code": "11016", "name": "库门16" },
{ "code": "11017", "name": "库门17" },
{ "code": "11018", "name": "库门18" },
{ "code": "11019", "name": "库门19" },
{ "code": "11020", "name": "库门20" },
{ "code": "11031", "name": "库门31" },
{ "code": "11032", "name": "库门32" },
{ "code": "11033", "name": "库门33" },
{ "code": "11034", "name": "库门34" },
{ "code": "11035", "name": "库门35" },
{ "code": "11036", "name": "库门36" },
{ "code": "11037", "name": "库门37" },
{ "code": "11038", "name": "库门38" },
{ "code": "11039", "name": "库门39" },
{ "code": "11040", "name": "库门40" },
{ "code": "11041", "name": "库门41" },
{ "code": "11042", "name": "库门42" },
{ "code": "11043", "name": "库门43" },
{ "code": "11044", "name": "库门44" },
{ "code": "11045", "name": "库门45" },
{ "code": "11046", "name": "库门46" },
{ "code": "11047", "name": "库门47" },
{ "code": "11048", "name": "库门48" },
{ "code": "11049", "name": "库门49" },
{ "code": "11050", "name": "库门50" }
]
},
{
"code": "12",
"name": "其它车库(录)",
"subs": [
{ "code": "12001", "name": "检修库01" },
{ "code": "12002", "name": "检修库02" },
{ "code": "12003", "name": "检修库03" },
{ "code": "12004", "name": "检修库04" },
{ "code": "12005", "name": "检修库05" },
{ "code": "12006", "name": "洗车库01" },
{ "code": "12007", "name": "洗车库02" },
{ "code": "12008", "name": "洗车库03" },
{ "code": "12009", "name": "洗车库04" },
{ "code": "12010", "name": "洗车库05" },
{ "code": "12011", "name": "镟轮库01" },
{ "code": "12012", "name": "镟轮库02" },
{ "code": "12013", "name": "镟轮库03" },
{ "code": "12014", "name": "镟轮库04" },
{ "code": "12015", "name": "镟轮库05" },
{ "code": "12016", "name": "地下机动车库01" },
{ "code": "12017", "name": "地下机动车库02" },
{ "code": "12018", "name": "地下机动车库03" },
{ "code": "12019", "name": "地下机动车库04" },
{ "code": "12020", "name": "地下机动车库05" },
{ "code": "12021", "name": "特种车库01" },
{ "code": "12022", "name": "特种车库02" },
{ "code": "12023", "name": "特种车库03" },
{ "code": "12024", "name": "特种车库04" },
{ "code": "12025", "name": "特种车库05" },
{ "code": "12026", "name": "联合车库01" },
{ "code": "12027", "name": "联合车库02" },
{ "code": "12028", "name": "联合车库03" },
{ "code": "12029", "name": "联合车库04" },
{ "code": "12030", "name": "联合车库05" },
{ "code": "12031", "name": "静调库01" },
{ "code": "12032", "name": "静调库02" },
{ "code": "12033", "name": "静调库03" },
{ "code": "12034", "name": "静调库04" },
{ "code": "12035", "name": "静调库05" }
]
},
{
"code": "13",
"name": "办公楼(录)",
"subs": [
{ "code": "13001", "name": "信号楼01" },
{ "code": "13002", "name": "信号楼02" },
{ "code": "13003", "name": "信号楼03" },
{ "code": "13004", "name": "信号楼04" },
{ "code": "13005", "name": "信号楼05" },
{ "code": "13006", "name": "信号楼06" },
{ "code": "13007", "name": "信号楼07" },
{ "code": "13008", "name": "信号楼08" },
{ "code": "13009", "name": "信号楼09" },
{ "code": "13010", "name": "信号楼10" },
{ "code": "13011", "name": "办公楼01" },
{ "code": "13012", "name": "办公楼02" },
{ "code": "13013", "name": "办公楼03" },
{ "code": "13014", "name": "办公楼04" },
{ "code": "13015", "name": "办公楼05" },
{ "code": "13016", "name": "办公楼06" },
{ "code": "13017", "name": "办公楼07" },
{ "code": "13018", "name": "办公楼08" },
{ "code": "13019", "name": "办公楼09" },
{ "code": "13020", "name": "办公楼10" }
]
},
{
"code": "14",
"name": "出入口(录)",
"subs": [
{ "code": "14001", "name": "出入口01" },
{ "code": "14002", "name": "出入口02" },
{ "code": "14003", "name": "出入口03" },
{ "code": "14004", "name": "出入口04" },
{ "code": "14005", "name": "出入口05" },
{ "code": "14006", "name": "喉部01" },
{ "code": "14007", "name": "喉部02" },
{ "code": "14008", "name": "喉部03" },
{ "code": "14009", "name": "喉部04" },
{ "code": "14010", "name": "喉部05" },
{ "code": "14011", "name": "峒口01" },
{ "code": "14012", "name": "峒口02" },
{ "code": "14013", "name": "峒口03" },
{ "code": "14014", "name": "峒口04" },
{ "code": "14015", "name": "峒口05" }
]
},
{
"code": "15",
"name": "周界(录)",
"subs": [
{ "code": "15001", "name": "周界01" },
{ "code": "15002", "name": "周界02" },
{ "code": "15003", "name": "周界03" },
{ "code": "15004", "name": "周界04" },
{ "code": "15005", "name": "周界05" },
{ "code": "15006", "name": "周界06" },
{ "code": "15007", "name": "周界07" },
{ "code": "15008", "name": "周界08" },
{ "code": "15009", "name": "周界09" },
{ "code": "15010", "name": "周界10" }
]
},
{
"code": "16",
"name": "仓库(录)",
"subs": [
{ "code": "16001", "name": "危险物品仓库01" },
{ "code": "16002", "name": "危险物品仓库02" },
{ "code": "16003", "name": "危险物品仓库03" },
{ "code": "16004", "name": "危险物品仓库04" },
{ "code": "16005", "name": "危险物品仓库05" },
{ "code": "16006", "name": "物流仓库01" },
{ "code": "16007", "name": "物流仓库02" },
{ "code": "16008", "name": "物流仓库03" },
{ "code": "16009", "name": "物流仓库04" },
{ "code": "16010", "name": "物流仓库05" }
]
},
{
"code": "17",
"name": "道路(录)",
"subs": [
{ "code": "17001", "name": "道路01" },
{ "code": "17002", "name": "道路02" },
{ "code": "17003", "name": "道路03" },
{ "code": "17004", "name": "道路04" },
{ "code": "17005", "name": "道路05" }
]
},
{
"code": "18",
"name": "其它(录)",
"subs": [
{ "code": "18001", "name": "变电站01" },
{ "code": "18002", "name": "变电站02" },
{ "code": "18003", "name": "变电站03" },
{ "code": "18004", "name": "变电站04" },
{ "code": "18005", "name": "变电站05" }
]
}
]
+470
View File
@@ -0,0 +1,470 @@
[
{
"code": "01",
"name": "站厅层",
"subs": [
{ "code": "01001", "name": "客服中心01" },
{ "code": "01002", "name": "客服中心02" },
{ "code": "01003", "name": "客服中心03" },
{ "code": "01004", "name": "客服中心04" },
{ "code": "01005", "name": "闸机组01" },
{ "code": "01006", "name": "闸机组02" },
{ "code": "01007", "name": "闸机组03" },
{ "code": "01008", "name": "闸机组04" },
{ "code": "01009", "name": "闸机组05" },
{ "code": "01010", "name": "闸机组06" },
{ "code": "01011", "name": "闸机组07" },
{ "code": "01012", "name": "闸机组08" },
{ "code": "01013", "name": "闸机组09" },
{ "code": "01014", "name": "闸机组10" },
{ "code": "01015", "name": "闸机组11" },
{ "code": "01016", "name": "闸机组12" },
{ "code": "01017", "name": "闸机组13" },
{ "code": "01018", "name": "闸机组14" },
{ "code": "01019", "name": "闸机组15" },
{ "code": "01020", "name": "闸机组16" },
{ "code": "01021", "name": "闸机组17" },
{ "code": "01022", "name": "闸机组18" },
{ "code": "01023", "name": "闸机组19" },
{ "code": "01024", "name": "闸机组20" },
{ "code": "01025", "name": "人工售票01" },
{ "code": "01026", "name": "人工售票02" },
{ "code": "01027", "name": "人工售票03" },
{ "code": "01028", "name": "人工售票04" },
{ "code": "01029", "name": "人工售票05" },
{ "code": "01030", "name": "自动售票01" },
{ "code": "01031", "name": "自动售票02" },
{ "code": "01032", "name": "自动售票03" },
{ "code": "01033", "name": "自动售票04" },
{ "code": "01034", "name": "自动售票05" },
{ "code": "01035", "name": "站厅球机" },
{ "code": "01036", "name": "直升梯01" },
{ "code": "01037", "name": "直升梯02" },
{ "code": "01038", "name": "直升梯03" },
{ "code": "01039", "name": "直升梯04" },
{ "code": "01040", "name": "公共区01" },
{ "code": "01041", "name": "公共区02" },
{ "code": "01042", "name": "公共区03" },
{ "code": "01043", "name": "公共区04" },
{ "code": "01044", "name": "公共区05" },
{ "code": "01045", "name": "站厅楼梯01" },
{ "code": "01046", "name": "站厅楼梯02" },
{ "code": "01047", "name": "站厅楼梯03" },
{ "code": "01048", "name": "站厅楼梯04" },
{ "code": "01049", "name": "站厅楼梯05" },
{ "code": "01050", "name": "站厅扶梯01" },
{ "code": "01051", "name": "站厅扶梯02" },
{ "code": "01052", "name": "站厅扶梯03" },
{ "code": "01053", "name": "站厅扶梯04" },
{ "code": "01054", "name": "站厅扶梯05" },
{ "code": "01055", "name": "01号口" },
{ "code": "01056", "name": "02号口" },
{ "code": "01057", "name": "03号口" },
{ "code": "01058", "name": "04号口" },
{ "code": "01059", "name": "05号口" },
{ "code": "01060", "name": "06号口" },
{ "code": "01061", "name": "07号口" },
{ "code": "01062", "name": "08号口" },
{ "code": "01063", "name": "09号口" },
{ "code": "01064", "name": "10号口" },
{ "code": "01065", "name": "11号口" },
{ "code": "01066", "name": "12号口" },
{ "code": "01067", "name": "13号口" },
{ "code": "01068", "name": "14号口" },
{ "code": "01069", "name": "15号口" },
{ "code": "01070", "name": "16号口" },
{ "code": "01071", "name": "17号口" },
{ "code": "01072", "name": "18号口" },
{ "code": "01073", "name": "19号口" },
{ "code": "01074", "name": "20号口" },
{ "code": "01075", "name": "21号口" },
{ "code": "01076", "name": "22号口" },
{ "code": "01077", "name": "23号口" },
{ "code": "01078", "name": "24号口" },
{ "code": "01079", "name": "25号口" },
{ "code": "01080", "name": "26号口" },
{ "code": "01081", "name": "换乘厅01" },
{ "code": "01082", "name": "换乘厅02" },
{ "code": "01083", "name": "长通道01" },
{ "code": "01084", "name": "长通道02" },
{ "code": "01085", "name": "安检区" },
{ "code": "01086", "name": "预留1" },
{ "code": "01087", "name": "预留2" },
{ "code": "01088", "name": "预留3" }
]
},
{
"code": "02",
"name": "站台层",
"subs": [
{ "code": "02001", "name": "站台球机" },
{ "code": "02002", "name": "公共区01" },
{ "code": "02003", "name": "公共区02" },
{ "code": "02004", "name": "公共区03" },
{ "code": "02005", "name": "公共区04" },
{ "code": "02006", "name": "公共区05" },
{ "code": "02007", "name": "上行01" },
{ "code": "02008", "name": "上行02" },
{ "code": "02009", "name": "上行03" },
{ "code": "02010", "name": "上行04" },
{ "code": "02011", "name": "上行05" },
{ "code": "02012", "name": "下行01" },
{ "code": "02013", "name": "下行02" },
{ "code": "02014", "name": "下行03" },
{ "code": "02015", "name": "下行04" },
{ "code": "02016", "name": "下行05" },
{ "code": "02017", "name": "站台楼梯01" },
{ "code": "02018", "name": "站台楼梯02" },
{ "code": "02019", "name": "站台楼梯03" },
{ "code": "02020", "name": "站台楼梯04" },
{ "code": "02021", "name": "站台楼梯05" },
{ "code": "02022", "name": "预留1" },
{ "code": "02023", "name": "预留2" },
{ "code": "02024", "name": "预留3" }
]
},
{
"code": "03",
"name": "设备区",
"subs": [
{ "code": "03001", "name": "站厅走道01" },
{ "code": "03002", "name": "站厅走道02" },
{ "code": "03003", "name": "站厅走道03" },
{ "code": "03004", "name": "站厅走道04" },
{ "code": "03005", "name": "站厅走道05" },
{ "code": "03006", "name": "站厅走道06" },
{ "code": "03007", "name": "站厅走道07" },
{ "code": "03008", "name": "站厅走道08" },
{ "code": "03009", "name": "站厅走道09" },
{ "code": "03010", "name": "站厅走道10" },
{ "code": "03011", "name": "站厅楼梯01" },
{ "code": "03012", "name": "站厅楼梯02" },
{ "code": "03013", "name": "站厅楼梯03" },
{ "code": "03014", "name": "站厅楼梯04" },
{ "code": "03015", "name": "站厅楼梯05" },
{ "code": "03016", "name": "站厅楼梯06" },
{ "code": "03017", "name": "站厅楼梯07" },
{ "code": "03018", "name": "站厅楼梯08" },
{ "code": "03019", "name": "站厅楼梯09" },
{ "code": "03020", "name": "站厅楼梯10" },
{ "code": "03021", "name": "站台走道01" },
{ "code": "03022", "name": "站台走道02" },
{ "code": "03023", "name": "站台走道03" },
{ "code": "03024", "name": "站台走道04" },
{ "code": "03025", "name": "站台走道05" },
{ "code": "03026", "name": "站台走道06" },
{ "code": "03027", "name": "站台走道07" },
{ "code": "03028", "name": "站台走道08" },
{ "code": "03029", "name": "站台走道09" },
{ "code": "03030", "name": "站台走道10" },
{ "code": "03031", "name": "站台楼梯01" },
{ "code": "03032", "name": "站台楼梯02" },
{ "code": "03033", "name": "站台楼梯03" },
{ "code": "03034", "name": "站台楼梯04" },
{ "code": "03035", "name": "站台楼梯05" },
{ "code": "03036", "name": "站台楼梯06" },
{ "code": "03037", "name": "站台楼梯07" },
{ "code": "03038", "name": "站台楼梯08" },
{ "code": "03039", "name": "站台楼梯09" },
{ "code": "03040", "name": "站台楼梯10" },
{ "code": "03041", "name": "编码室" },
{ "code": "03042", "name": "车控室01" },
{ "code": "03043", "name": "车控室02" },
{ "code": "03044", "name": "主变电站01" },
{ "code": "03045", "name": "主变电站02" },
{ "code": "03046", "name": "降压变电所01" },
{ "code": "03047", "name": "降压变电所02" },
{ "code": "03048", "name": "通信设备室" },
{ "code": "03049", "name": "信号设备室" },
{ "code": "03050", "name": "弱电电源室" },
{ "code": "03051", "name": "民用通信机房" },
{ "code": "03052", "name": "区间通风机房" },
{ "code": "03053", "name": "环控机房" },
{ "code": "03054", "name": "冷水机房" },
{ "code": "03055", "name": "环控电控室" },
{ "code": "03056", "name": "线间楼梯01" },
{ "code": "03057", "name": "线间楼梯02" },
{ "code": "03058", "name": "线间楼梯03" },
{ "code": "03059", "name": "线间楼梯04" },
{ "code": "03060", "name": "线间楼梯05" },
{ "code": "03061", "name": "线间通道01" },
{ "code": "03062", "name": "线间通道02" },
{ "code": "03063", "name": "线间通道03" },
{ "code": "03064", "name": "线间通道04" },
{ "code": "03065", "name": "线间通道05" },
{ "code": "03066", "name": "站长室外" },
{ "code": "03067", "name": "气瓶间" },
{ "code": "03068", "name": "消防泵房" },
{ "code": "03069", "name": "钢瓶室" },
{ "code": "03070", "name": "民用通信机房" },
{ "code": "03071", "name": "民用机房" },
{ "code": "03074", "name": "公网引入室" },
{ "code": "03075", "name": "环控电控室" },
{ "code": "03076", "name": "UPS间" }
]
},
{
"code": "04",
"name": "区间内",
"subs": [
{ "code": "04001", "name": "区间变电01" },
{ "code": "04002", "name": "区间变电02" },
{ "code": "04003", "name": "区间变电03" },
{ "code": "04004", "name": "区间变电04" },
{ "code": "04005", "name": "区间变电05" },
{ "code": "04006", "name": "上行峒口" },
{ "code": "04007", "name": "下行峒口" },
{ "code": "04008", "name": "上行轨道" },
{ "code": "04009", "name": "下行轨道" },
{ "code": "04010", "name": "上行风井" },
{ "code": "04011", "name": "下行风井" },
{ "code": "04012", "name": "旁通道" },
{ "code": "04013", "name": "道岔" },
{ "code": "04014", "name": "预留1" },
{ "code": "04015", "name": "预留2" },
{ "code": "04016", "name": "预留3" }
]
},
{
"code": "05",
"name": "派出所",
"subs": [
{ "code": "05001", "name": "监控室" },
{ "code": "05002", "name": "综合执法站" },
{ "code": "05003", "name": "预留1" },
{ "code": "05004", "name": "预留2" },
{ "code": "05005", "name": "预留3" }
]
},
{
"code": "06",
"name": "站厅层(录)",
"subs": [
{ "code": "06001", "name": "客服中心01" },
{ "code": "06002", "name": "客服中心02" },
{ "code": "06003", "name": "客服中心03" },
{ "code": "06004", "name": "客服中心04" },
{ "code": "06005", "name": "闸机组01" },
{ "code": "06006", "name": "闸机组02" },
{ "code": "06007", "name": "闸机组03" },
{ "code": "06008", "name": "闸机组04" },
{ "code": "06009", "name": "闸机组05" },
{ "code": "06010", "name": "闸机组06" },
{ "code": "06011", "name": "闸机组07" },
{ "code": "06012", "name": "闸机组08" },
{ "code": "06013", "name": "闸机组09" },
{ "code": "06014", "name": "闸机组10" },
{ "code": "06015", "name": "闸机组11" },
{ "code": "06016", "name": "闸机组12" },
{ "code": "06017", "name": "闸机组13" },
{ "code": "06018", "name": "闸机组14" },
{ "code": "06019", "name": "闸机组15" },
{ "code": "06020", "name": "闸机组16" },
{ "code": "06021", "name": "闸机组17" },
{ "code": "06022", "name": "闸机组18" },
{ "code": "06023", "name": "闸机组19" },
{ "code": "06024", "name": "闸机组20" },
{ "code": "06025", "name": "人工售票01" },
{ "code": "06026", "name": "人工售票02" },
{ "code": "06027", "name": "人工售票03" },
{ "code": "06028", "name": "人工售票04" },
{ "code": "06029", "name": "人工售票05" },
{ "code": "06030", "name": "自动售票01" },
{ "code": "06031", "name": "自动售票02" },
{ "code": "06032", "name": "自动售票03" },
{ "code": "06033", "name": "自动售票04" },
{ "code": "06034", "name": "自动售票05" },
{ "code": "06035", "name": "站厅球机" },
{ "code": "06036", "name": "直升梯01" },
{ "code": "06037", "name": "直升梯02" },
{ "code": "06038", "name": "直升梯03" },
{ "code": "06039", "name": "直升梯04" },
{ "code": "06040", "name": "公共区01" },
{ "code": "06041", "name": "公共区02" },
{ "code": "06042", "name": "公共区03" },
{ "code": "06043", "name": "公共区04" },
{ "code": "06044", "name": "公共区05" },
{ "code": "06045", "name": "站厅楼梯01" },
{ "code": "06046", "name": "站厅楼梯02" },
{ "code": "06047", "name": "站厅楼梯03" },
{ "code": "06048", "name": "站厅楼梯04" },
{ "code": "06049", "name": "站厅楼梯05" },
{ "code": "06050", "name": "站厅扶梯01" },
{ "code": "06051", "name": "站厅扶梯02" },
{ "code": "06052", "name": "站厅扶梯03" },
{ "code": "06053", "name": "站厅扶梯04" },
{ "code": "06054", "name": "站厅扶梯05" },
{ "code": "06055", "name": "01号口" },
{ "code": "06056", "name": "02号口" },
{ "code": "06057", "name": "03号口" },
{ "code": "06058", "name": "04号口" },
{ "code": "06059", "name": "05号口" },
{ "code": "06060", "name": "06号口" },
{ "code": "06061", "name": "07号口" },
{ "code": "06062", "name": "08号口" },
{ "code": "06063", "name": "09号口" },
{ "code": "06064", "name": "10号口" },
{ "code": "06065", "name": "11号口" },
{ "code": "06066", "name": "12号口" },
{ "code": "06067", "name": "13号口" },
{ "code": "06068", "name": "14号口" },
{ "code": "06069", "name": "15号口" },
{ "code": "06070", "name": "16号口" },
{ "code": "06071", "name": "17号口" },
{ "code": "06072", "name": "18号口" },
{ "code": "06073", "name": "19号口" },
{ "code": "06074", "name": "20号口" },
{ "code": "06075", "name": "21号口" },
{ "code": "06076", "name": "22号口" },
{ "code": "06077", "name": "23号口" },
{ "code": "06078", "name": "24号口" },
{ "code": "06079", "name": "25号口" },
{ "code": "06080", "name": "26号口" },
{ "code": "06081", "name": "换乘厅01" },
{ "code": "06082", "name": "换乘厅02" },
{ "code": "06083", "name": "长通道01" },
{ "code": "06084", "name": "长通道02" },
{ "code": "06085", "name": "安检区" },
{ "code": "06086", "name": "预留1" },
{ "code": "06087", "name": "预留2" },
{ "code": "06088", "name": "预留3" }
]
},
{
"code": "07",
"name": "站台层(录)",
"subs": [
{ "code": "07001", "name": "站台球机" },
{ "code": "07002", "name": "公共区01" },
{ "code": "07003", "name": "公共区02" },
{ "code": "07004", "name": "公共区03" },
{ "code": "07005", "name": "公共区04" },
{ "code": "07006", "name": "公共区05" },
{ "code": "07007", "name": "上行01" },
{ "code": "07008", "name": "上行02" },
{ "code": "07009", "name": "上行03" },
{ "code": "07010", "name": "上行04" },
{ "code": "07011", "name": "上行05" },
{ "code": "07012", "name": "下行01" },
{ "code": "07013", "name": "下行02" },
{ "code": "07014", "name": "下行03" },
{ "code": "07015", "name": "下行04" },
{ "code": "07016", "name": "下行05" },
{ "code": "07017", "name": "站台楼梯01" },
{ "code": "07018", "name": "站台楼梯02" },
{ "code": "07019", "name": "站台楼梯03" },
{ "code": "07020", "name": "站台楼梯04" },
{ "code": "07021", "name": "站台楼梯05" },
{ "code": "07022", "name": "预留1" },
{ "code": "07023", "name": "预留2" },
{ "code": "07024", "name": "预留3" }
]
},
{
"code": "08",
"name": "设备区(录)",
"subs": [
{ "code": "08001", "name": "站厅走道01" },
{ "code": "08002", "name": "站厅走道02" },
{ "code": "08003", "name": "站厅走道03" },
{ "code": "08004", "name": "站厅走道04" },
{ "code": "08005", "name": "站厅走道05" },
{ "code": "08006", "name": "站厅走道06" },
{ "code": "08007", "name": "站厅走道07" },
{ "code": "08008", "name": "站厅走道08" },
{ "code": "08009", "name": "站厅走道09" },
{ "code": "08010", "name": "站厅走道10" },
{ "code": "08011", "name": "站厅楼梯01" },
{ "code": "08012", "name": "站厅楼梯02" },
{ "code": "08013", "name": "站厅楼梯03" },
{ "code": "08014", "name": "站厅楼梯04" },
{ "code": "08015", "name": "站厅楼梯05" },
{ "code": "08016", "name": "站厅楼梯06" },
{ "code": "08017", "name": "站厅楼梯07" },
{ "code": "08018", "name": "站厅楼梯08" },
{ "code": "08019", "name": "站厅楼梯09" },
{ "code": "08020", "name": "站厅楼梯10" },
{ "code": "08021", "name": "站台走道01" },
{ "code": "08022", "name": "站台走道02" },
{ "code": "08023", "name": "站台走道03" },
{ "code": "08024", "name": "站台走道04" },
{ "code": "08025", "name": "站台走道05" },
{ "code": "08026", "name": "站台走道06" },
{ "code": "08027", "name": "站台走道07" },
{ "code": "08028", "name": "站台走道08" },
{ "code": "08029", "name": "站台走道09" },
{ "code": "08030", "name": "站台走道10" },
{ "code": "08031", "name": "站台楼梯01" },
{ "code": "08032", "name": "站台楼梯02" },
{ "code": "08033", "name": "站台楼梯03" },
{ "code": "08034", "name": "站台楼梯04" },
{ "code": "08035", "name": "站台楼梯05" },
{ "code": "08036", "name": "站台楼梯06" },
{ "code": "08037", "name": "站台楼梯07" },
{ "code": "08038", "name": "站台楼梯08" },
{ "code": "08039", "name": "站台楼梯09" },
{ "code": "08040", "name": "站台楼梯10" },
{ "code": "08041", "name": "编码室" },
{ "code": "08042", "name": "车控室01" },
{ "code": "08043", "name": "车控室02" },
{ "code": "08044", "name": "主变电站01" },
{ "code": "08045", "name": "主变电站02" },
{ "code": "08046", "name": "降压变电所01" },
{ "code": "08047", "name": "降压变电所02" },
{ "code": "08048", "name": "通信设备室" },
{ "code": "08049", "name": "信号设备室" },
{ "code": "08050", "name": "弱电电源室" },
{ "code": "08051", "name": "民用通信机房" },
{ "code": "08052", "name": "区间通风机房" },
{ "code": "08053", "name": "环控机房" },
{ "code": "08054", "name": "冷水机房" },
{ "code": "08055", "name": "环控电控室" },
{ "code": "08056", "name": "线间楼梯01" },
{ "code": "08057", "name": "线间楼梯02" },
{ "code": "08058", "name": "线间楼梯03" },
{ "code": "08059", "name": "线间楼梯04" },
{ "code": "08060", "name": "线间楼梯05" },
{ "code": "08061", "name": "线间通道01" },
{ "code": "08062", "name": "线间通道02" },
{ "code": "08063", "name": "线间通道03" },
{ "code": "08064", "name": "线间通道04" },
{ "code": "08065", "name": "线间通道05" },
{ "code": "08066", "name": "预留1" },
{ "code": "08067", "name": "预留2" },
{ "code": "08068", "name": "预留3" }
]
},
{
"code": "09",
"name": "区间内(录)",
"subs": [
{ "code": "09001", "name": "区间变电01" },
{ "code": "09002", "name": "区间变电02" },
{ "code": "09003", "name": "区间变电03" },
{ "code": "09004", "name": "区间变电04" },
{ "code": "09005", "name": "区间变电05" },
{ "code": "09006", "name": "上行峒口" },
{ "code": "09007", "name": "下行峒口" },
{ "code": "09008", "name": "上行轨道" },
{ "code": "09009", "name": "下行轨道" },
{ "code": "09010", "name": "上行风井" },
{ "code": "09011", "name": "下行风井" },
{ "code": "09012", "name": "旁通道" },
{ "code": "09013", "name": "道岔" },
{ "code": "09014", "name": "预留1" },
{ "code": "09015", "name": "预留2" },
{ "code": "09016", "name": "预留3" }
]
},
{
"code": "10",
"name": "派出所(录)",
"subs": [
{ "code": "10001", "name": "监控室" },
{ "code": "10002", "name": "综合执法站" },
{ "code": "10003", "name": "预留1" },
{ "code": "10004", "name": "预留2" },
{ "code": "10005", "name": "预留3" }
]
}
]
+747
View File
@@ -0,0 +1,747 @@
{
"901101": { "name": "虹桥枢纽", "type": "station" },
"901102": { "name": "中春路", "type": "station" },
"901103": { "name": "景洪路", "type": "station" },
"901104": { "name": "三林南", "type": "station" },
"901105": { "name": "康桥东", "type": "station" },
"901106": { "name": "度假区", "type": "station" },
"901107": { "name": "浦东机场", "type": "station" },
"901108": { "name": "T3航站楼", "type": "station" },
"901109": { "name": "上海东站", "type": "station" },
"901180": { "name": "临时检修基地", "type": "parking" },
"901181": { "name": "申昆路停车场", "type": "parking" },
"901182": { "name": "下盐路停车场", "type": "parking" },
"001601": { "name": "莘庄站", "type": "station" },
"001602": { "name": "外环路站", "type": "station" },
"001603": { "name": "莲花路站", "type": "station" },
"001604": { "name": "锦江乐园站", "type": "station" },
"001605": { "name": "上海南站站", "type": "station" },
"001606": { "name": "漕宝路站", "type": "station" },
"001607": { "name": "上海体育馆站", "type": "station" },
"001608": { "name": "徐家汇站", "type": "station" },
"001609": { "name": "衡山路站", "type": "station" },
"001610": { "name": "常熟路站", "type": "station" },
"001611": { "name": "陕西南路站", "type": "station" },
"001612": { "name": "黄陂南路站", "type": "station" },
"001613": { "name": "人民广场站", "type": "station" },
"001614": { "name": "新闸路站", "type": "station" },
"001615": { "name": "汉中路站", "type": "station" },
"001616": { "name": "上海火车站站", "type": "station" },
"001617": { "name": "中山北路站", "type": "station" },
"001618": { "name": "延长路站", "type": "station" },
"001619": { "name": "上海马戏城站", "type": "station" },
"001620": { "name": "汶水路站", "type": "station" },
"001621": { "name": "彭浦新村站", "type": "station" },
"001622": { "name": "共康路站", "type": "station" },
"001623": { "name": "通河新村站", "type": "station" },
"001624": { "name": "呼兰路站", "type": "station" },
"001625": { "name": "共富新村站", "type": "station" },
"001626": { "name": "宝安公路站", "type": "station" },
"001627": { "name": "友谊西路站", "type": "station" },
"001628": { "name": "富锦路站", "type": "station" },
"001676": { "name": "新闸路OCC", "type": "occ" },
"001680": { "name": "富锦路基地", "type": "parking" },
"001681": { "name": "梅陇基地", "type": "parking" },
"002502": { "name": "淞虹路站", "type": "station" },
"002503": { "name": "北新泾站", "type": "station" },
"002504": { "name": "威宁路站", "type": "station" },
"002505": { "name": "娄山关路站", "type": "station" },
"002506": { "name": "中山公园站", "type": "station" },
"002507": { "name": "江苏路站", "type": "station" },
"002508": { "name": "静安寺站", "type": "station" },
"002509": { "name": "南京西路站", "type": "station" },
"002510": { "name": "人民广场站", "type": "station" },
"002511": { "name": "南京东路站", "type": "station" },
"002512": { "name": "陆家嘴站", "type": "station" },
"002513": { "name": "东昌路站", "type": "station" },
"002514": { "name": "世纪大道站", "type": "station" },
"002515": { "name": "上海科技馆站", "type": "station" },
"002516": { "name": "世纪公园站", "type": "station" },
"002517": { "name": "龙阳路站", "type": "station" },
"002524": { "name": "张江高科站", "type": "station" },
"002525": { "name": "金科路站", "type": "station" },
"002526": { "name": "广兰路站", "type": "station" },
"002527": { "name": "唐镇站", "type": "station" },
"002528": { "name": "创新中路站", "type": "station" },
"002529": { "name": "华夏东路站", "type": "station" },
"002530": { "name": "川沙站", "type": "station" },
"002531": { "name": "凌空路站", "type": "station" },
"002532": { "name": "远东大道站", "type": "station" },
"002533": { "name": "海天三路站", "type": "station" },
"002534": { "name": "浦东机场站", "type": "station" },
"002535": { "name": "虹桥2号航站楼站", "type": "station" },
"002536": { "name": "虹桥火车站站", "type": "station" },
"002537": { "name": "徐泾东站", "type": "station" },
"002575": { "name": "OCC", "type": "occ" },
"002576": { "name": "备OCC", "type": "occ" },
"002580": { "name": "车辆基地0", "type": "parking" },
"002581": { "name": "车辆基地1", "type": "parking" },
"002582": { "name": "车辆基地2", "type": "parking" },
"002599": { "name": "列车", "type": "train" },
"002602": { "name": "淞虹路站", "type": "station" },
"002603": { "name": "北新泾站", "type": "station" },
"002604": { "name": "威宁路站", "type": "station" },
"002605": { "name": "娄山关路站", "type": "station" },
"002606": { "name": "中山公园站", "type": "station" },
"002607": { "name": "江苏路站", "type": "station" },
"002608": { "name": "静安寺站", "type": "station" },
"002609": { "name": "南京西路站", "type": "station" },
"002610": { "name": "人民广场站", "type": "station" },
"002611": { "name": "南京东路站", "type": "station" },
"002612": { "name": "陆家嘴站", "type": "station" },
"002613": { "name": "东昌路站", "type": "station" },
"002614": { "name": "世纪大道站", "type": "station" },
"002615": { "name": "上海科技馆站", "type": "station" },
"002616": { "name": "世纪公园站", "type": "station" },
"002617": { "name": "龙阳路站", "type": "station" },
"002624": { "name": "张江高科站", "type": "station" },
"002625": { "name": "金科路站", "type": "station" },
"002626": { "name": "广兰路站", "type": "station" },
"002627": { "name": "唐镇站", "type": "station" },
"002628": { "name": "创新中路站", "type": "station" },
"002629": { "name": "华夏东路站", "type": "station" },
"002630": { "name": "川沙站", "type": "station" },
"002631": { "name": "凌空路站", "type": "station" },
"002632": { "name": "远东大道站", "type": "station" },
"002633": { "name": "海天三路站", "type": "station" },
"002634": { "name": "浦东机场站", "type": "station" },
"002635": { "name": "虹桥2号航站楼站", "type": "station" },
"002636": { "name": "虹桥火车站站", "type": "station" },
"002637": { "name": "徐泾东站", "type": "station" },
"002675": { "name": "OCC", "type": "occ" },
"002676": { "name": "备OCC", "type": "occ" },
"002680": { "name": "车辆基地0", "type": "parking" },
"002681": { "name": "车辆基地1", "type": "parking" },
"002682": { "name": "车辆基地2", "type": "parking" },
"002699": { "name": "列车", "type": "train" },
"003601": { "name": "上海南站站", "type": "station" },
"003602": { "name": "石龙路站", "type": "station" },
"003603": { "name": "龙漕路站", "type": "station" },
"003604": { "name": "漕溪路站", "type": "station" },
"003605": { "name": "宜山路站", "type": "station" },
"003606": { "name": "虹桥路站", "type": "station" },
"003607": { "name": "延安西路站", "type": "station" },
"003608": { "name": "中山公园站", "type": "station" },
"003609": { "name": "金沙江路站", "type": "station" },
"003610": { "name": "曹杨路站", "type": "station" },
"003611": { "name": "镇坪路站", "type": "station" },
"003612": { "name": "中潭路站", "type": "station" },
"003613": { "name": "上海火车站站", "type": "station" },
"003614": { "name": "宝山路站", "type": "station" },
"003615": { "name": "东宝兴路站", "type": "station" },
"003616": { "name": "虹口足球场站", "type": "station" },
"003617": { "name": "赤峰路站", "type": "station" },
"003618": { "name": "大柏树站", "type": "station" },
"003619": { "name": "江湾镇站", "type": "station" },
"003620": { "name": "殷高西路站", "type": "station" },
"003621": { "name": "长江南路站", "type": "station" },
"003622": { "name": "淞发路站", "type": "station" },
"003623": { "name": "张华浜站", "type": "station" },
"003624": { "name": "淞滨路站", "type": "station" },
"003625": { "name": "水产路站", "type": "station" },
"003626": { "name": "宝杨路站", "type": "station" },
"003627": { "name": "友谊路站", "type": "station" },
"003628": { "name": "铁力路站", "type": "station" },
"003629": { "name": "江杨北路站", "type": "station" },
"003675": { "name": "OCC", "type": "occ" },
"003676": { "name": "备OCC", "type": "occ" },
"003680": { "name": "车辆基地0", "type": "parking" },
"003681": { "name": "车辆基地1", "type": "parking" },
"003682": { "name": "车辆基地2", "type": "parking" },
"003699": { "name": "列车", "type": "train" },
"004501": { "name": "海伦路站", "type": "station" },
"004502": { "name": "临平路站", "type": "station" },
"004503": { "name": "大连路站", "type": "station" },
"004504": { "name": "杨树浦路站", "type": "station" },
"004505": { "name": "浦东大道站", "type": "station" },
"004506": { "name": "世纪大道站", "type": "station" },
"004507": { "name": "浦电路站", "type": "station" },
"004508": { "name": "蓝村路站", "type": "station" },
"004509": { "name": "塘桥站", "type": "station" },
"004510": { "name": "南浦大桥站", "type": "station" },
"004511": { "name": "西藏南路站", "type": "station" },
"004512": { "name": "鲁班路站", "type": "station" },
"004513": { "name": "大木桥路站", "type": "station" },
"004514": { "name": "东安路站", "type": "station" },
"004515": { "name": "上海体育场站", "type": "station" },
"004516": { "name": "上海体育馆站", "type": "station" },
"004517": { "name": "宜山路站", "type": "station" },
"004575": { "name": "OCC", "type": "occ" },
"004576": { "name": "备OCC", "type": "occ" },
"004580": { "name": "车辆基地0", "type": "parking" },
"004581": { "name": "车辆基地1", "type": "parking" },
"004582": { "name": "车辆基地2", "type": "parking" },
"004599": { "name": "列车", "type": "train" },
"004601": { "name": "海伦路站", "type": "station" },
"004602": { "name": "临平路站", "type": "station" },
"004603": { "name": "大连路站", "type": "station" },
"004604": { "name": "杨树浦路站", "type": "station" },
"004605": { "name": "浦东大道站", "type": "station" },
"004606": { "name": "世纪大道站", "type": "station" },
"004607": { "name": "浦电路站", "type": "station" },
"004608": { "name": "蓝村路站", "type": "station" },
"004609": { "name": "塘桥站", "type": "station" },
"004610": { "name": "南浦大桥站", "type": "station" },
"004611": { "name": "西藏南路站", "type": "station" },
"004612": { "name": "鲁班路站", "type": "station" },
"004613": { "name": "大木桥路站", "type": "station" },
"004614": { "name": "东安路站", "type": "station" },
"004615": { "name": "上海体育场站", "type": "station" },
"004616": { "name": "上海体育馆站", "type": "station" },
"004617": { "name": "宜山路站", "type": "station" },
"004675": { "name": "OCC", "type": "occ" },
"004676": { "name": "备OCC", "type": "occ" },
"004680": { "name": "车辆基地0", "type": "parking" },
"004681": { "name": "车辆基地1", "type": "parking" },
"004682": { "name": "车辆基地2", "type": "parking" },
"004699": { "name": "列车", "type": "train" },
"005501": { "name": "莘庄站", "type": "station" },
"005502": { "name": "春申站", "type": "station" },
"005503": { "name": "银都站", "type": "station" },
"005504": { "name": "颛桥站", "type": "station" },
"005505": { "name": "北桥站", "type": "station" },
"005506": { "name": "剑川站", "type": "station" },
"005507": { "name": "东川站", "type": "station" },
"005508": { "name": "金平站", "type": "station" },
"005509": { "name": "华宁站", "type": "station" },
"005510": { "name": "文井站", "type": "station" },
"005511": { "name": "闵行开发区站", "type": "station" },
"005521": { "name": "江川路站", "type": "station" },
"005522": { "name": "西渡站", "type": "station" },
"005523": { "name": "萧塘站", "type": "station" },
"005524": { "name": "奉浦站", "type": "station" },
"005525": { "name": "环东路站", "type": "station" },
"005526": { "name": "望园路站", "type": "station" },
"005527": { "name": "金海湖站", "type": "station" },
"005528": { "name": "奉贤新城站", "type": "station" },
"005529": { "name": "平庄停车场", "type": "station" },
"005530": { "name": "莘庄停车场", "type": "station" },
"005531": { "name": "东川路站", "type": "station" },
"005575": { "name": "OCC", "type": "occ" },
"005576": { "name": "备OCC", "type": "occ" },
"005580": { "name": "车辆基地0", "type": "parking" },
"005581": { "name": "车辆基地1", "type": "parking" },
"005582": { "name": "车辆基地2", "type": "parking" },
"005599": { "name": "列车", "type": "train" },
"005601": { "name": "莘庄站", "type": "station" },
"005602": { "name": "春申站", "type": "station" },
"005603": { "name": "银都站", "type": "station" },
"005604": { "name": "颛桥站", "type": "station" },
"005605": { "name": "北桥站", "type": "station" },
"005606": { "name": "剑川站", "type": "station" },
"005607": { "name": "东川站", "type": "station" },
"005608": { "name": "金平站", "type": "station" },
"005609": { "name": "华宁站", "type": "station" },
"005610": { "name": "文井站", "type": "station" },
"005611": { "name": "闵行开发区站", "type": "station" },
"005612": { "name": "颛桥中心", "type": "station" },
"005621": { "name": "江川路站", "type": "station" },
"005622": { "name": "西渡站", "type": "station" },
"005623": { "name": "萧塘站", "type": "station" },
"005624": { "name": "奉浦站", "type": "station" },
"005625": { "name": "环东路站", "type": "station" },
"005626": { "name": "望园路站", "type": "station" },
"005627": { "name": "金海湖站", "type": "station" },
"005628": { "name": "奉贤新城站", "type": "station" },
"005629": { "name": "平庄停车场", "type": "station" },
"005630": { "name": "莘庄停车场", "type": "station" },
"005631": { "name": "东川路站", "type": "station" },
"005675": { "name": "OCC", "type": "occ" },
"005676": { "name": "备OCC", "type": "occ" },
"005680": { "name": "车辆基地0", "type": "parking" },
"005681": { "name": "车辆基地1", "type": "parking" },
"005682": { "name": "车辆基地2", "type": "parking" },
"005699": { "name": "列车", "type": "train" },
"006501": { "name": "港城路站", "type": "station" },
"006502": { "name": "外高桥保税区北站", "type": "station" },
"006503": { "name": "航津路站", "type": "station" },
"006504": { "name": "外高桥保税区南站", "type": "station" },
"006505": { "name": "洲海路站", "type": "station" },
"006506": { "name": "五洲大道站", "type": "station" },
"006507": { "name": "东靖路站", "type": "station" },
"006508": { "name": "巨峰路站", "type": "station" },
"006509": { "name": "五莲路站", "type": "station" },
"006510": { "name": "博兴路站", "type": "station" },
"006511": { "name": "金桥路站", "type": "station" },
"006512": { "name": "云山路站", "type": "station" },
"006513": { "name": "德平路站", "type": "station" },
"006514": { "name": "北洋泾路站", "type": "station" },
"006515": { "name": "民生路站", "type": "station" },
"006516": { "name": "源深体育中心站", "type": "station" },
"006517": { "name": "世纪大道站", "type": "station" },
"006518": { "name": "浦电路站", "type": "station" },
"006519": { "name": "蓝村路站", "type": "station" },
"006520": { "name": "儿童医学中心站", "type": "station" },
"006521": { "name": "临沂新村站", "type": "station" },
"006522": { "name": "高科西路站", "type": "station" },
"006523": { "name": "东明路站", "type": "station" },
"006524": { "name": "高青路站", "type": "station" },
"006525": { "name": "华夏西路站", "type": "station" },
"006526": { "name": "上南路站", "type": "station" },
"006527": { "name": "灵岩南路站", "type": "station" },
"006528": { "name": "济阳路站", "type": "station" },
"006575": { "name": "OCC", "type": "occ" },
"006576": { "name": "备OCC", "type": "occ" },
"006580": { "name": "车辆基地0", "type": "parking" },
"006581": { "name": "车辆基地1", "type": "parking" },
"006582": { "name": "车辆基地2", "type": "parking" },
"006599": { "name": "列车", "type": "train" },
"007601": { "name": "美兰湖站", "type": "station" },
"007602": { "name": "罗南新村站", "type": "station" },
"007603": { "name": "潘广站", "type": "station" },
"007604": { "name": "刘行站", "type": "station" },
"007605": { "name": "顾村公园站", "type": "station" },
"007606": { "name": "祁华站", "type": "station" },
"007607": { "name": "上海大学站", "type": "station" },
"007608": { "name": "南陈路站", "type": "station" },
"007609": { "name": "上大路站", "type": "station" },
"007610": { "name": "场中路站", "type": "station" },
"007611": { "name": "大场镇站", "type": "station" },
"007612": { "name": "行知路站", "type": "station" },
"007613": { "name": "大华三路站", "type": "station" },
"007614": { "name": "新村路站", "type": "station" },
"007615": { "name": "岚皋路站", "type": "station" },
"007616": { "name": "镇坪路站", "type": "station" },
"007617": { "name": "长寿路站", "type": "station" },
"007618": { "name": "昌平路站", "type": "station" },
"007619": { "name": "静安寺站", "type": "station" },
"007620": { "name": "常熟路站", "type": "station" },
"007621": { "name": "肇家浜路站", "type": "station" },
"007622": { "name": "东安路站", "type": "station" },
"007623": { "name": "船厂路站", "type": "station" },
"007624": { "name": "后滩路站", "type": "station" },
"007625": { "name": "长清路", "type": "station" },
"007626": { "name": "耀华路站", "type": "station" },
"007627": { "name": "云台路站", "type": "station" },
"007628": { "name": "高科西路站", "type": "station" },
"007629": { "name": "杨高南路站", "type": "station" },
"007630": { "name": "锦绣路站", "type": "station" },
"007631": { "name": "芳华路", "type": "station" },
"007632": { "name": "龙阳路站", "type": "station" },
"007633": { "name": "花木路站", "type": "station" },
"007675": { "name": "OCC", "type": "occ" },
"007676": { "name": "备OCC", "type": "occ" },
"007680": { "name": "车辆基地0", "type": "parking" },
"007681": { "name": "车辆基地1", "type": "parking" },
"007682": { "name": "车辆基地2", "type": "parking" },
"007699": { "name": "列车", "type": "train" },
"008501": { "name": "市光路站", "type": "station" },
"008502": { "name": "嫩江路站", "type": "station" },
"008503": { "name": "翔殷路站", "type": "station" },
"008504": { "name": "黄兴公园站", "type": "station" },
"008505": { "name": "延吉中路站", "type": "station" },
"008506": { "name": "黄兴路站", "type": "station" },
"008507": { "name": "江浦路站", "type": "station" },
"008508": { "name": "鞍山新村站", "type": "station" },
"008509": { "name": "四平路站", "type": "station" },
"008510": { "name": "曲阳路站", "type": "station" },
"008511": { "name": "虹口足球场站", "type": "station" },
"008512": { "name": "西藏北路站", "type": "station" },
"008513": { "name": "中兴路站", "type": "station" },
"008514": { "name": "曲阜路站", "type": "station" },
"008515": { "name": "人民广场站", "type": "station" },
"008516": { "name": "大世界站", "type": "station" },
"008517": { "name": "老西门站", "type": "station" },
"008518": { "name": "陆家浜路站", "type": "station" },
"008519": { "name": "西藏南路站", "type": "station" },
"008520": { "name": "中华艺术馆站", "type": "station" },
"008521": { "name": "耀华路站", "type": "station" },
"008522": { "name": "成山路站", "type": "station" },
"008523": { "name": "杨思站", "type": "station" },
"008524": { "name": "济阳路站", "type": "station" },
"008525": { "name": "凌兆路站", "type": "station" },
"008526": { "name": "芦恒路站", "type": "station" },
"008527": { "name": "浦江镇站", "type": "station" },
"008528": { "name": "江月路站", "type": "station" },
"008529": { "name": "联航路站", "type": "station" },
"008530": { "name": "航天博物馆站", "type": "station" },
"008575": { "name": "OCC", "type": "occ" },
"008576": { "name": "备OCC", "type": "occ" },
"008580": { "name": "车辆基地0", "type": "parking" },
"008581": { "name": "车辆基地1", "type": "parking" },
"008582": { "name": "车辆基地2", "type": "parking" },
"008599": { "name": "列车", "type": "train" },
"009326": { "name": "芳甸路站", "type": "station" },
"009327": { "name": "蓝天路站", "type": "station" },
"009328": { "name": "台儿庄路站", "type": "station" },
"009329": { "name": "金桥路站", "type": "station" },
"009330": { "name": "金吉路站", "type": "station" },
"009331": { "name": "金海路站", "type": "station" },
"009332": { "name": "顾唐路站", "type": "station" },
"009333": { "name": "民雷路站", "type": "station" },
"009334": { "name": "曹路路站", "type": "station" },
"009335": { "name": "停车场站", "type": "station" },
"009503": { "name": "松江新城站", "type": "station" },
"009504": { "name": "松江新大学城站", "type": "station" },
"009505": { "name": "洞泾站", "type": "station" },
"009506": { "name": "佘山站", "type": "station" },
"009507": { "name": "泗泾站", "type": "station" },
"009508": { "name": "九亭站", "type": "station" },
"009509": { "name": "中春路站", "type": "station" },
"009510": { "name": "七宝站", "type": "station" },
"009511": { "name": "星中路站", "type": "station" },
"009512": { "name": "合川路站", "type": "station" },
"009513": { "name": "漕河泾开发区站", "type": "station" },
"009514": { "name": "桂林路站", "type": "station" },
"009515": { "name": "宜山路站", "type": "station" },
"009516": { "name": "徐家汇站", "type": "station" },
"009517": { "name": "肇家浜路", "type": "station" },
"009518": { "name": "嘉善路站", "type": "station" },
"009519": { "name": "打浦桥站", "type": "station" },
"009520": { "name": "马当路", "type": "station" },
"009521": { "name": "陆家浜路站", "type": "station" },
"009522": { "name": "小南门站", "type": "station" },
"009523": { "name": "商城路站", "type": "station" },
"009524": { "name": "世纪大道站", "type": "station" },
"009525": { "name": "杨高中路站", "type": "station" },
"009526": { "name": "芳甸路", "type": "station" },
"009527": { "name": "蓝天路", "type": "station" },
"009528": { "name": "台儿庄", "type": "station" },
"009529": { "name": "金桥站", "type": "station" },
"009530": { "name": "金吉路", "type": "station" },
"009531": { "name": "金海路", "type": "station" },
"009532": { "name": "顾唐路", "type": "station" },
"009533": { "name": "民雷路", "type": "station" },
"009534": { "name": "曹路", "type": "station" },
"009535": { "name": "金桥停车场", "type": "station" },
"009540": { "name": "松江南站站", "type": "station" },
"009541": { "name": "醉白池站", "type": "station" },
"009542": { "name": "松江体育中心站", "type": "station" },
"009575": { "name": "OCC", "type": "occ" },
"009576": { "name": "备OCC", "type": "occ" },
"009580": { "name": "车辆基地0", "type": "parking" },
"009581": { "name": "车辆基地1", "type": "parking" },
"009582": { "name": "车辆基地2", "type": "parking" },
"009599": { "name": "列车", "type": "train" },
"010501": { "name": "虹桥火车站站", "type": "station" },
"010502": { "name": "虹桥机场2号航站", "type": "station" },
"010503": { "name": "虹桥机场1号航站", "type": "station" },
"010504": { "name": "上海动物园站", "type": "station" },
"010505": { "name": "龙溪路站", "type": "station" },
"010506": { "name": "水城路站", "type": "station" },
"010507": { "name": "伊犁路站", "type": "station" },
"010508": { "name": "宋园路站", "type": "station" },
"010509": { "name": "虹桥路站", "type": "station" },
"010510": { "name": "交通大学站", "type": "station" },
"010511": { "name": "上海图书馆站", "type": "station" },
"010512": { "name": "陕西南路站", "type": "station" },
"010513": { "name": "新天地站", "type": "station" },
"010514": { "name": "老西门站", "type": "station" },
"010515": { "name": "豫园站", "type": "station" },
"010516": { "name": "南京东路站", "type": "station" },
"010517": { "name": "天潼路站", "type": "station" },
"010518": { "name": "四川北路站", "type": "station" },
"010519": { "name": "海伦路站", "type": "station" },
"010520": { "name": "邮电新村站", "type": "station" },
"010521": { "name": "四平路站", "type": "station" },
"010522": { "name": "同济大学站", "type": "station" },
"010523": { "name": "国权路站", "type": "station" },
"010524": { "name": "五角场站", "type": "station" },
"010525": { "name": "江湾体育场站", "type": "station" },
"010526": { "name": "三门路", "type": "station" },
"010527": { "name": "殷高东路站", "type": "station" },
"010528": { "name": "新江湾城站", "type": "station" },
"010529": { "name": "航中路站", "type": "station" },
"010530": { "name": "紫藤路站", "type": "station" },
"010531": { "name": "龙柏新村站", "type": "station" },
"010232": { "name": "国帆路站", "type": "station" },
"010233": { "name": "双江路站", "type": "station" },
"010234": { "name": "高桥西路站", "type": "station" },
"010235": { "name": "高桥路站", "type": "station" },
"010236": { "name": "港城路站", "type": "station" },
"010237": { "name": "基隆路站", "type": "station" },
"010275": { "name": "OCC", "type": "occ" },
"010576": { "name": "备OCC", "type": "occ" },
"010580": { "name": "港城基地", "type": "parking" },
"010581": { "name": "车辆基地1", "type": "parking" },
"010582": { "name": "车辆基地2", "type": "parking" },
"010199": { "name": "一期列车", "type": "train" },
"010599": { "name": "二期列车", "type": "train" },
"010601": { "name": "虹桥火车站站", "type": "station" },
"010602": { "name": "虹桥机场2号航站", "type": "station" },
"010603": { "name": "虹桥机场1号航站", "type": "station" },
"010604": { "name": "上海动物园站", "type": "station" },
"010605": { "name": "龙溪路站", "type": "station" },
"010606": { "name": "水城路站", "type": "station" },
"010607": { "name": "伊犁路站", "type": "station" },
"010608": { "name": "宋园路站", "type": "station" },
"010609": { "name": "虹桥路站", "type": "station" },
"010610": { "name": "交通大学站", "type": "station" },
"010611": { "name": "上海图书馆站", "type": "station" },
"010612": { "name": "陕西南路站", "type": "station" },
"010613": { "name": "新天地站", "type": "station" },
"010614": { "name": "老西门站", "type": "station" },
"010615": { "name": "豫园站", "type": "station" },
"010616": { "name": "南京东路站", "type": "station" },
"010617": { "name": "天潼路站", "type": "station" },
"010618": { "name": "四川北路站", "type": "station" },
"010619": { "name": "海伦路站", "type": "station" },
"010620": { "name": "邮电新村站", "type": "station" },
"010621": { "name": "四平路站", "type": "station" },
"010622": { "name": "同济大学站", "type": "station" },
"010623": { "name": "国权路站", "type": "station" },
"010624": { "name": "五角场站", "type": "station" },
"010625": { "name": "江湾体育场站", "type": "station" },
"010626": { "name": "三门路", "type": "station" },
"010627": { "name": "殷高东路站", "type": "station" },
"010628": { "name": "新江湾城站", "type": "station" },
"010629": { "name": "航中路站", "type": "station" },
"010630": { "name": "紫藤路站", "type": "station" },
"010631": { "name": "龙柏新村站", "type": "station" },
"010632": { "name": "国帆路站", "type": "station" },
"010633": { "name": "双江路站", "type": "station" },
"010634": { "name": "高桥西路站", "type": "station" },
"010635": { "name": "高桥路站", "type": "station" },
"010636": { "name": "港城路站", "type": "station" },
"010637": { "name": "基隆路站", "type": "station" },
"010680": { "name": "吴中路基地", "type": "parking" },
"011501": { "name": "嘉定北站", "type": "station" },
"011502": { "name": "嘉定西站", "type": "station" },
"011503": { "name": "白银路站", "type": "station" },
"011504": { "name": "嘉定新城站", "type": "station" },
"011505": { "name": "马陆站", "type": "station" },
"011506": { "name": "南翔站", "type": "station" },
"011507": { "name": "桃浦新村站", "type": "station" },
"011508": { "name": "威武路站", "type": "station" },
"011509": { "name": "祁连山路站", "type": "station" },
"011510": { "name": "李子园站", "type": "station" },
"011511": { "name": "上海西站站", "type": "station" },
"011512": { "name": "真如站", "type": "station" },
"011513": { "name": "枫桥路站", "type": "station" },
"011514": { "name": "曹杨路站", "type": "station" },
"011515": { "name": "隆德路站", "type": "station" },
"011516": { "name": "江苏路站", "type": "station" },
"011517": { "name": "上海赛车场站", "type": "station" },
"011518": { "name": "昌吉东路站", "type": "station" },
"011519": { "name": "上海汽车城站", "type": "station" },
"011520": { "name": "安亭站", "type": "station" },
"011531": { "name": "交通大学站", "type": "station" },
"011532": { "name": "徐家汇站", "type": "station" },
"011533": { "name": "游泳馆站", "type": "station" },
"011534": { "name": "龙华站", "type": "station" },
"011535": { "name": "云锦路站", "type": "station" },
"011536": { "name": "龙耀路站", "type": "station" },
"011537": { "name": "东体站", "type": "station" },
"011538": { "name": "三林站", "type": "station" },
"011539": { "name": "三林东站", "type": "station" },
"011540": { "name": "浦三路站", "type": "station" },
"011541": { "name": "御桥路站", "type": "station" },
"011542": { "name": "罗山路站", "type": "station" },
"011543": { "name": "兆丰路站", "type": "station" },
"011544": { "name": "光明路站", "type": "station" },
"011545": { "name": "花桥路站", "type": "station" },
"011546": { "name": "秀沿路站", "type": "station" },
"011547": { "name": "康新公路站", "type": "station" },
"011548": { "name": "迪斯尼站", "type": "station" },
"011551": { "name": "陈翔路车站", "type": "station" },
"011575": { "name": "OCC", "type": "occ" },
"011576": { "name": "备OCC", "type": "occ" },
"011580": { "name": "车辆基地0", "type": "parking" },
"011581": { "name": "车辆基地1", "type": "parking" },
"011582": { "name": "车辆基地2", "type": "parking" },
"011599": { "name": "列车", "type": "train" },
"011628": { "name": "新站", "type": "station" },
"012501": { "name": "七莘路站", "type": "station" },
"012502": { "name": "虹莘路站", "type": "station" },
"012503": { "name": "顾戴路站", "type": "station" },
"012504": { "name": "东兰路站", "type": "station" },
"012505": { "name": "虹梅路站", "type": "station" },
"012506": { "name": "虹漕路站", "type": "station" },
"012507": { "name": "桂林公园站", "type": "station" },
"012508": { "name": "漕宝路站", "type": "station" },
"012509": { "name": "龙漕路站", "type": "station" },
"012510": { "name": "龙华站", "type": "station" },
"012511": { "name": "龙华中路站", "type": "station" },
"012512": { "name": "大木桥路站", "type": "station" },
"012513": { "name": "嘉善路站", "type": "station" },
"012514": { "name": "陕西南路站", "type": "station" },
"012515": { "name": "南京西路站", "type": "station" },
"012516": { "name": "汉中路站", "type": "station" },
"012517": { "name": "曲阜路站", "type": "station" },
"012518": { "name": "天潼路站", "type": "station" },
"012519": { "name": "国际客运中心站", "type": "station" },
"012520": { "name": "提篮桥站", "type": "station" },
"012521": { "name": "大连路站", "type": "station" },
"012522": { "name": "浦江公园站", "type": "station" },
"012523": { "name": "宁国路站", "type": "station" },
"012524": { "name": "隆昌路站", "type": "station" },
"012525": { "name": "爱国路站", "type": "station" },
"012526": { "name": "复兴岛站", "type": "station" },
"012527": { "name": "东陆路站", "type": "station" },
"012528": { "name": "巨峰路站", "type": "station" },
"012529": { "name": "杨高北路站", "type": "station" },
"012530": { "name": "金京路站", "type": "station" },
"012531": { "name": "申江路站", "type": "station" },
"012532": { "name": "金海路站", "type": "station" },
"012575": { "name": "OCC", "type": "occ" },
"012576": { "name": "备OCC", "type": "occ" },
"012580": { "name": "车辆基地0", "type": "parking" },
"012581": { "name": "车辆基地1", "type": "parking" },
"012582": { "name": "车辆基地2", "type": "parking" },
"012599": { "name": "列车", "type": "train" },
"013501": { "name": "金运路站", "type": "station" },
"013502": { "name": "金沙江西路", "type": "station" },
"013503": { "name": "丰庄站", "type": "station" },
"013504": { "name": "祁连山南路站", "type": "station" },
"013505": { "name": "真北路站", "type": "station" },
"013506": { "name": "大渡河路站", "type": "station" },
"013507": { "name": "金沙江路站", "type": "station" },
"013508": { "name": "隆德路站", "type": "station" },
"013509": { "name": "武宁路站", "type": "station" },
"013510": { "name": "长寿路站", "type": "station" },
"013511": { "name": "江宁路站", "type": "station" },
"013512": { "name": "汉中路站", "type": "station" },
"013513": { "name": "自然博物馆站", "type": "station" },
"013514": { "name": "南京西路站", "type": "station" },
"013515": { "name": "淮海中路站", "type": "station" },
"013516": { "name": "新天地站", "type": "station" },
"013517": { "name": "马当路站", "type": "station" },
"013518": { "name": "世博会博物馆站", "type": "station" },
"013519": { "name": "世博大道站", "type": "station" },
"013520": { "name": "北翟路停车场", "type": "station" },
"013521": { "name": "长清站", "type": "station" },
"013522": { "name": "成山站", "type": "station" },
"013523": { "name": "东明站", "type": "station" },
"013524": { "name": "华鹏站", "type": "station" },
"013525": { "name": "下南站", "type": "station" },
"013526": { "name": "北蔡站", "type": "station" },
"013527": { "name": "陈春站", "type": "station" },
"013528": { "name": "莲溪站", "type": "station" },
"013529": { "name": "华夏中路站", "type": "station" },
"013530": { "name": "中科站", "type": "station" },
"013531": { "name": "学林站", "type": "station" },
"013532": { "name": "张江站", "type": "station" },
"013575": { "name": "OCC", "type": "occ" },
"013576": { "name": "备OCC", "type": "occ" },
"0136580": { "name": "车辆基地0", "type": "parking" },
"0136581": { "name": "车辆基地1", "type": "parking" },
"0136582": { "name": "车辆基地2", "type": "parking" },
"013599": { "name": "列车", "type": "train" },
"015501": { "name": "紫竹高新区站", "type": "station" },
"015502": { "name": "永德路站", "type": "station" },
"015503": { "name": "元江路站", "type": "station" },
"015504": { "name": "双柏路站", "type": "station" },
"015505": { "name": "曙建路站", "type": "station" },
"015506": { "name": "景西路站", "type": "station" },
"015507": { "name": "虹梅南路站", "type": "station" },
"015508": { "name": "华泾西路站", "type": "station" },
"015509": { "name": "朱梅路站", "type": "station" },
"015510": { "name": "罗秀路站", "type": "station" },
"015511": { "name": "华东理工站", "type": "station" },
"015512": { "name": "上海南站站", "type": "station" },
"015513": { "name": "桂林公园站", "type": "station" },
"015514": { "name": "桂林路站", "type": "station" },
"015515": { "name": "吴中路站", "type": "station" },
"015516": { "name": "姚虹路站", "type": "station" },
"015517": { "name": "红宝石路站", "type": "station" },
"015518": { "name": "娄山关路站", "type": "station" },
"015519": { "name": "长风公园站", "type": "station" },
"015520": { "name": "大渡河站", "type": "station" },
"015521": { "name": "梅岭北路站", "type": "station" },
"015522": { "name": "铜川路站", "type": "station" },
"015523": { "name": "上海西站站", "type": "station" },
"015524": { "name": "武威东路站", "type": "station" },
"015525": { "name": "古浪路站", "type": "station" },
"015526": { "name": "祁安路站", "type": "station" },
"015527": { "name": "南大路站", "type": "station" },
"015528": { "name": "丰翔路站", "type": "station" },
"015529": { "name": "锦秋路站", "type": "station" },
"015530": { "name": "顾村公园站", "type": "station" },
"015575": { "name": "控制中心", "type": "occ" },
"015580": { "name": "陈太路停车场", "type": "parking" },
"015581": { "name": "元江路车辆段", "type": "parking" },
"015599": { "name": "列车", "type": "train" },
"016501": { "name": "龙阳路站", "type": "station" },
"016502": { "name": "华夏中路站", "type": "station" },
"016503": { "name": "罗山路站", "type": "station" },
"016504": { "name": "周浦东站", "type": "station" },
"016505": { "name": "鹤沙航城站", "type": "station" },
"016506": { "name": "航头东站", "type": "station" },
"016507": { "name": "新场站", "type": "station" },
"016508": { "name": "野生动物园站", "type": "station" },
"016509": { "name": "惠南站", "type": "station" },
"016510": { "name": "惠南东站", "type": "station" },
"016511": { "name": "书院站", "type": "station" },
"016512": { "name": "临港大道站", "type": "station" },
"016513": { "name": "滴水湖", "type": "station" },
"016575": { "name": "OCC", "type": "occ" },
"016576": { "name": "备OCC", "type": "occ" },
"016580": { "name": "车辆基地0", "type": "parking" },
"016581": { "name": "车辆基地1", "type": "parking" },
"016582": { "name": "车辆基地2", "type": "parking" },
"016599": { "name": "列车", "type": "train" },
"017501": { "name": "东方绿舟", "type": "station" },
"017502": { "name": "朱家角", "type": "station" },
"017503": { "name": "淀山湖", "type": "station" },
"017504": { "name": "漕盈路", "type": "station" },
"017505": { "name": "青浦", "type": "station" },
"017506": { "name": "汇金路站", "type": "station" },
"017507": { "name": "赵巷", "type": "station" },
"017508": { "name": "嘉松中路", "type": "station" },
"017509": { "name": "徐泾北城", "type": "station" },
"017510": { "name": "徐盈路", "type": "station" },
"017511": { "name": "蟠龙路", "type": "station" },
"017512": { "name": "诸光路", "type": "station" },
"017513": { "name": "虹桥火车站", "type": "station" },
"017576": { "name": "朱家角备控", "type": "occ" },
"017580": { "name": "朱家角停车场", "type": "parking" },
"017581": { "name": "徐泾停车场", "type": "parking" },
"018501": { "name": "航头站", "type": "station" },
"018502": { "name": "下沙站", "type": "station" },
"018503": { "name": "鹤涛路站", "type": "station" },
"018504": { "name": "沈梅路站", "type": "station" },
"018505": { "name": "繁荣路站", "type": "station" },
"018506": { "name": "周浦站", "type": "station" },
"018507": { "name": "康桥站", "type": "station" },
"018508": { "name": "御桥站", "type": "station" },
"051501": { "name": "沈杜公路", "type": "station" },
"051502": { "name": "三鲁公路", "type": "station" },
"051503": { "name": "闵瑞路", "type": "station" },
"051504": { "name": "浦航路", "type": "station" },
"051505": { "name": "东城一路", "type": "station" },
"051506": { "name": "汇臻路", "type": "station" },
"051575": { "name": "OCC", "type": "occ" },
"051576": { "name": "备OCC", "type": "occ" },
"051580": { "name": "车辆基地0", "type": "parking" },
"051581": { "name": "车辆基地1", "type": "parking" },
"051582": { "name": "车辆基地2", "type": "parking" },
"051599": { "name": "列车", "type": "train" },
"501500": { "name": "COCC", "type": "manage" },
"502500": { "name": "BCOCC", "type": "manage" },
"601500": { "name": "上海火车站分控", "type": "manage" },
"602500": { "name": "徐家汇分控", "type": "manage" },
"603500": { "name": "宜山路分控", "type": "manage" },
"604500": { "name": "陆家嘴分控", "type": "manage" },
"605500": { "name": "人民广场分控", "type": "manage" },
"606500": { "name": "东宝兴路分控", "type": "manage" },
"607500": { "name": "虹桥枢纽分控", "type": "manage" },
"608500": { "name": "松江大学城分控", "type": "manage" },
"609500": { "name": "民生路分控", "type": "manage" },
"610500": { "name": "西藏南路分控", "type": "manage" },
"611500": { "name": "延吉中路分控", "type": "manage" },
"612500": { "name": "迪士尼分控", "type": "manage" },
"900500": { "name": "轨交总队", "type": "manage" }
}
@@ -8,7 +8,7 @@ const createDeviceNodeKey = (stationCode?: Station['code'], device?: NdmDeviceRe
import { initStationDevices, type NdmDeviceResultVO, type NdmNvrResultVO, type Station } from '@/apis';
import { useDeviceTree, usePermission, type UseDeviceTreeReturn } from '@/composables';
import { DEVICE_TYPE_NAMES, DEVICE_TYPE_LITERALS, tryGetDeviceType, type DeviceType, PERMISSION_TYPE_LITERALS } from '@/enums';
import { isNvrCluster } from '@/helpers';
import { createNvrClusterRelationship, isNvrCluster, nvrInCluster } from '@/helpers';
import { useDeviceStore, usePermissionStore } from '@/stores';
import { watchDebounced, watchImmediate } from '@vueuse/core';
import destr from 'destr';
@@ -297,8 +297,18 @@ const renderDeviceNodePrefix = (device: NdmDeviceResultVO, stationCode: Station[
return h(NFlex, { size: 'small' }, { default: () => [renderViewDeviceButton(device, stationCode), renderDeviceStatusTag(device)] });
};
// 全线设备树
const lineDeviceTreeData = computed<Record<Station['code'], TreeOption[]>>(() => {
const treeData: Record<string, TreeOption[]> = {};
const lineDeviceTreeData = computed<Record<DeviceType, TreeOption[]>>(() => {
const treeData: Record<DeviceType, TreeOption[]> = {
[DEVICE_TYPE_LITERALS.ndmCamera]: [],
[DEVICE_TYPE_LITERALS.ndmNvr]: [],
[DEVICE_TYPE_LITERALS.ndmSwitch]: [],
[DEVICE_TYPE_LITERALS.ndmDecoder]: [],
[DEVICE_TYPE_LITERALS.ndmSecurityBox]: [],
[DEVICE_TYPE_LITERALS.ndmMediaServer]: [],
[DEVICE_TYPE_LITERALS.ndmVideoServer]: [],
[DEVICE_TYPE_LITERALS.ndmKeyboard]: [],
[DEVICE_TYPE_LITERALS.ndmAlarmHost]: [],
};
deviceTabPanes.forEach(({ name: paneName /* , tab: paneTab */ }) => {
treeData[paneName] = stations.value.map<TreeOption>((station) => {
const { name: stationName, code: stationCode } = station;
@@ -307,47 +317,55 @@ const lineDeviceTreeData = computed<Record<Station['code'], TreeOption[]>>(() =>
const offlineDevices = devices?.filter((device) => device.deviceStatus === '20');
// 对于录像机,需要根据clusterList字段以分号分隔设备IP,进一步形成子树结构
if (paneName === DEVICE_TYPE_LITERALS.ndmNvr) {
const nvrs = devices as NdmNvrResultVO[];
const nvrClusters: NdmNvrResultVO[] = [];
const nvrSingletons: NdmNvrResultVO[] = [];
for (const device of nvrs) {
if (isNvrCluster(device)) {
nvrClusters.push(device);
} else {
nvrSingletons.push(device);
}
}
const nvrDevices = devices as NdmNvrResultVO[];
const { nvrClusters, nvrTreeMap, nvrStandalones } = createNvrClusterRelationship(nvrDevices);
return {
label: stationName,
key: stationCode,
prefix: () => renderStationNodePrefix(station),
suffix: () => renderIcmpStatistics(onlineDevices?.length ?? 0, offlineDevices?.length ?? 0, devices?.length ?? 0),
children: nvrClusters.map<TreeOption>((cluster) => {
return {
label: `${cluster.name}`,
key: createDeviceNodeKey(stationCode, cluster),
prefix: () => renderDeviceNodePrefix(cluster, stationCode),
suffix: () => `${cluster.ipAddress}`,
children: nvrSingletons.map<TreeOption>((device) => {
return {
label: `${device.name}`,
key: createDeviceNodeKey(stationCode, device),
prefix: () => renderDeviceNodePrefix(device, stationCode),
suffix: () => `${device.ipAddress}`,
// 当选择设备时,能获取到设备的所有信息,以及设备所属的车站
stationCode,
device: device,
};
}),
// 当选择设备时,能获取到设备的所有信息,以及设备所属的车站
stationCode,
device: cluster,
};
}),
children: [
...nvrClusters.map((cluster) => {
return {
label: `${cluster.name}`,
key: createDeviceNodeKey(stationCode, cluster),
prefix: () => renderDeviceNodePrefix(cluster, stationCode),
suffix: () => `${cluster.ipAddress}`,
children: (nvrTreeMap.get(cluster.ipAddress ?? '') ?? []).map((clusterNode) => {
return {
label: `${clusterNode.name}`,
key: createDeviceNodeKey(stationCode, clusterNode),
prefix: () => renderDeviceNodePrefix(clusterNode, stationCode),
suffix: () => `${clusterNode.ipAddress}`,
// 当选择设备时,能获取到设备的所有信息,以及设备所属的车站
stationCode,
device: clusterNode,
};
}),
// 当选择设备时,能获取到设备的所有信息,以及设备所属的车站
stationCode,
device: cluster,
};
}),
...nvrStandalones.map((device) => {
return {
label: `${device.name}`,
key: createDeviceNodeKey(stationCode, device),
prefix: () => renderDeviceNodePrefix(device, stationCode),
suffix: () => `${device.ipAddress}`,
// 当选择设备时,能获取到设备的所有信息,以及设备所属的车站
stationCode,
device: device,
};
}),
],
stationCode,
deviceType: activeTab.value,
};
}
// 非录像机设备
return {
label: stationName,
key: stationCode,
@@ -382,37 +400,51 @@ const stationDeviceTreeData = computed<TreeOption[]>(() => {
const onlineCount = stationDevices[deviceType].filter((device) => device.deviceStatus === '10').length;
const offlineCount = stationDevices[deviceType].filter((device) => device.deviceStatus === '20').length;
if (deviceType === DEVICE_TYPE_LITERALS.ndmNvr) {
const nvrs = stationDevices[deviceType] as NdmNvrResultVO[];
const clusters = nvrs.filter((nvr) => isNvrCluster(nvr));
const singletons = nvrs.filter((nvr) => !isNvrCluster(nvr));
const nvrDevices = stationDevices[deviceType] as NdmNvrResultVO[];
const { nvrClusters, nvrTreeMap, nvrStandalones } = createNvrClusterRelationship(nvrDevices);
return {
label: `${DEVICE_TYPE_NAMES[deviceType]}`,
key: deviceType,
suffix: () => renderIcmpStatistics(onlineCount, offlineCount, nvrs.length),
children: clusters.map<TreeOption>((cluster) => {
return {
label: `${cluster.name}`,
key: createDeviceNodeKey(stationCode, cluster),
prefix: () => renderDeviceNodePrefix(cluster, stationCode),
suffix: () => `${cluster.ipAddress}`,
children: singletons.map<TreeOption>((device) => {
return {
label: `${device.name}`,
key: createDeviceNodeKey(stationCode, device),
prefix: () => renderDeviceNodePrefix(device, stationCode),
suffix: () => `${device.ipAddress}`,
stationCode,
device,
};
}),
stationCode,
device: cluster,
};
}),
suffix: () => renderIcmpStatistics(onlineCount, offlineCount, nvrDevices.length),
children: [
...nvrClusters.map((cluster) => {
return {
label: `${cluster.name}`,
key: createDeviceNodeKey(stationCode, cluster),
prefix: () => renderDeviceNodePrefix(cluster, stationCode),
suffix: () => `${cluster.ipAddress}`,
children: (nvrTreeMap.get(cluster.ipAddress ?? '') ?? []).map((clusterNode) => {
return {
label: `${clusterNode.name}`,
key: createDeviceNodeKey(stationCode, clusterNode),
prefix: () => renderDeviceNodePrefix(clusterNode, stationCode),
suffix: () => `${clusterNode.ipAddress}`,
stationCode,
device: clusterNode,
};
}),
stationCode,
device: cluster,
};
}),
...nvrStandalones.map((device) => {
return {
label: `${device.name}`,
key: createDeviceNodeKey(stationCode, device),
prefix: () => renderDeviceNodePrefix(device, stationCode),
suffix: () => `${device.ipAddress}`,
stationCode,
device,
};
}),
],
stationCode,
deviceType,
};
}
// 非录像机设备
return {
label: `${DEVICE_TYPE_NAMES[deviceType]}`,
key: deviceType,
@@ -488,9 +520,13 @@ const onLocateDeviceTree = async () => {
if (stationDevices) {
const selectedNvr = selectedDevice.value as NdmNvrResultVO;
if (!isNvrCluster(selectedNvr)) {
const nvrs = stationDevices[DEVICE_TYPE_LITERALS.ndmNvr];
const clusters = nvrs.filter((nvr) => isNvrCluster(nvr) && nvr.clusterList?.includes(selectedNvr.clusterList ?? ''));
expandedKeys.value.push(...clusters.map((nvr) => createDeviceNodeKey(stationCode, nvr)));
const nvrDevices = stationDevices[DEVICE_TYPE_LITERALS.ndmNvr];
const clusters = nvrDevices.filter((device) => {
if (!isNvrCluster(device)) return false;
const cluster = device;
return nvrInCluster(selectedNvr, cluster);
});
expandedKeys.value.push(...clusters.map((cluster) => createDeviceNodeKey(stationCode, cluster)));
}
}
}
+51 -3
View File
@@ -1,8 +1,56 @@
import type { NdmNvrResultVO } from '@/apis';
// 解析 clusterList 字段
export const parseIpListFromClusterList = (nvr: NdmNvrResultVO) => {
const ipList = (nvr.clusterList ?? '').split(';');
return ipList.map((ip) => ip.trim()).filter((ip) => !!ip);
};
export const isNvrCluster = (maybeNvrCluster: NdmNvrResultVO) => {
const { ipAddress, clusterList } = maybeNvrCluster;
if (!clusterList?.trim()) return false;
if (clusterList === ipAddress) return false;
const { ipAddress } = maybeNvrCluster;
const ipList = parseIpListFromClusterList(maybeNvrCluster);
if (ipList.length === 0) return false;
if (ipList.length === 1 && ipList.at(0) === ipAddress) return false;
return true;
};
export const nvrInCluster = (nvr: NdmNvrResultVO, cluster: NdmNvrResultVO) => {
const { ipAddress } = nvr;
if (!ipAddress) return false;
const ipList = parseIpListFromClusterList(cluster);
return ipList.includes(ipAddress);
};
export const createNvrClusterRelationship = (nvrDevices: NdmNvrResultVO[]) => {
const nvrClusters = nvrDevices.filter((nvr) => isNvrCluster(nvr));
const nvrNotClusters = nvrDevices.filter((nvr) => !isNvrCluster(nvr));
const nodedNvrIpAddressSet = new Set<string | null>();
const nvrStandalones: NdmNvrResultVO[] = [];
const nvrTreeMap = new Map<string, NdmNvrResultVO[]>();
// 遍历所有非集群录像机,将它们分配到对应的录像机集群中
for (const nvr of nvrNotClusters) {
for (const cluster of nvrClusters) {
if (nvrInCluster(nvr, cluster)) {
if (!!cluster.ipAddress) {
// 写入录像机与集群的关系
nvrTreeMap.set(cluster.ipAddress, [...(nvrTreeMap.get(cluster.ipAddress) ?? []), nvr]);
// 记录已分配的录像机IP地址
nodedNvrIpAddressSet.add(nvr.ipAddress);
}
}
}
}
// 分配完成后,过滤出未分配的录像机,形成录像机单机列表
nvrNotClusters.forEach((device) => {
if (!nodedNvrIpAddressSet.has(device.ipAddress)) {
nvrStandalones.push(device);
}
});
return {
nvrClusters,
// nvrNotClusters,
nvrTreeMap,
nvrStandalones,
};
};
+6 -1
View File
@@ -4,7 +4,7 @@ import { useLineStationsQuery, useStompClient, useUserPermissionQuery, useVerify
import { LINE_ALARMS_QUERY_KEY, LINE_DEVICES_QUERY_KEY, LINE_STATIONS_MUTATION_KEY, LINE_STATIONS_QUERY_KEY, STATION_ALARMS_MUTATION_KEY, STATION_DEVICES_MUTATION_KEY } from '@/constants';
import { useSettingStore, useUnreadStore, useUserStore } from '@/stores';
import { useIsFetching, useIsMutating } from '@tanstack/vue-query';
import { ChevronDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ComputerIcon, KeyRoundIcon, LogOutIcon, LogsIcon, MapPinIcon, SettingsIcon, SirenIcon } from 'lucide-vue-next';
import { ChevronDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ComputerIcon, KeyRoundIcon, LogOutIcon, LogsIcon, MapPinIcon, MonitorPlayIcon, SettingsIcon, SirenIcon } from 'lucide-vue-next';
import {
NBadge,
NButton,
@@ -111,6 +111,11 @@ const menuOptions = computed<MenuOption[]>(() => [
show: isLamp.value,
icon: renderIcon(KeyRoundIcon),
},
{
label: () => h(RouterLink, { to: '/vimp' }, { default: () => '视频综合管理平台' }),
key: '/vimp',
icon: renderIcon(MonitorPlayIcon),
},
]);
const dropdownOptions: DropdownOption[] = [
+1
View File
@@ -0,0 +1 @@
export * from './vimp-client';
+45
View File
@@ -0,0 +1,45 @@
import type { AxiosError, AxiosRequestConfig, CreateAxiosDefaults } from 'axios';
import axios from 'axios';
import type { VimpResponse, VimpResult } from '../../types';
export const createVimpClient = (config?: CreateAxiosDefaults) => {
const instance = axios.create(config);
const vimpPost = <T>(url: string, data?: AxiosRequestConfig['data'], options?: Partial<Omit<AxiosRequestConfig, 'data'>> & { retRaw?: boolean; upload?: boolean }): Promise<VimpResponse<T>> => {
const { retRaw, upload, ...reqConfig } = options ?? {};
return new Promise((resolve) => {
instance
.post(url, data, { headers: { 'content-type': upload ? 'multipart/form-data' : 'application/json' }, ...reqConfig })
.then((res) => {
const resData = res.data;
if (retRaw) {
resolve([null, resData as T, null]);
} else {
resolve([null, resData.data as T, resData as VimpResult<T>]);
}
})
.catch((err) => {
resolve([err as AxiosError, null, null]);
});
});
};
return {
instance,
post: vimpPost,
};
};
export const unwrapVimpResponse = <T>(resp: VimpResponse<T>) => {
const [err, data, result] = resp;
if (err) throw err;
if (result) {
const { code, msg } = result;
if (code !== 0 && code !== 200) throw new Error(`${msg || '请求失败'}`);
}
return data;
};
export const vimpClient = createVimpClient({
baseURL: `/vimp/api/client`,
});
+4
View File
@@ -0,0 +1,4 @@
export * from './client';
export * from './model';
export * from './query';
export * from './request';
+2
View File
@@ -0,0 +1,2 @@
export * from './vimp-channel';
export * from './vimp-station';
+15
View File
@@ -0,0 +1,15 @@
export interface VimpChannel {
address: string;
block: string;
civilCode: string;
code: string;
latitude: number;
longitude: number;
manufacture: string;
model: string;
name: string;
owner: string;
parentId: string;
parental: number;
status: number;
}
@@ -0,0 +1,5 @@
export interface VimpStation {
code: string;
name: string;
online: boolean;
}
@@ -0,0 +1,101 @@
import { useQuery } from '@tanstack/vue-query';
import { computed } from 'vue';
import { catalogChannelApi, catalogAllDeviceApi } from '../request';
import type { AxiosRequestConfig } from 'axios';
import axios from 'axios';
import type { CodeArea, CodeLines, CodeSites } from '../../types';
import { useCameraStore, useAlarmStore } from '../../stores';
import type { VimpChannel } from '../model';
export const useDeviceCenterQuery = () => {
const cameraStore = useCameraStore();
const alarmStore = useAlarmStore();
return useQuery({
queryKey: computed(() => ['vimp-device']),
refetchInterval: 10 * 1000,
refetchOnWindowFocus: false,
queryFn: async ({ signal }) => {
const config: AxiosRequestConfig = {
headers: {
'Cache-Control': 'no-store',
},
};
const buildTrainAreas = () => {
const codeTrainAreas: CodeArea[] = [];
for (let i = 0; i < 999; i++) {
const codeTrain = i.toString().padStart(3, '0');
// 市域线name为车组,改造线name为车次
const area: CodeArea = { code: codeTrain, name: '车次' + codeTrain, subs: [] };
for (let j = 0; j <= 99; j++) {
const codeCarriage = j.toString().padStart(2, '0');
const subArea: CodeArea['subs'][number] = { code: codeTrain + codeCarriage, name: '车厢' + codeCarriage };
area.subs.push(subArea);
}
// const areaPreserve: CodeArea['subs'][number] = { code: codeTrain + '51', name: '预留' };
// area.subs.push(areaPreserve);
codeTrainAreas.push(area);
}
return codeTrainAreas;
};
const codeLines = (await axios.get<CodeLines>('/cdn/vimp/codes/codeLines.json', config)).data;
const codeSites = (await axios.get<CodeSites>('/cdn/vimp/codes/codeStations.json', config)).data;
const codeStationAreas = (await axios.get<CodeArea[]>('/cdn/vimp/codes/codeStationAreas.json', config)).data;
const codeParkingAreas = (await axios.get<CodeArea[]>('/cdn/vimp/codes/codeParkingAreas.json', config)).data;
const codeOccAreas = (await axios.get<CodeArea[]>('/cdn/vimp/codes/codeOccAreas.json', config)).data;
const codeTrainAreas = buildTrainAreas();
const siteCamerasMap: Record<string, VimpChannel[]> = {};
const siteAlarmsMap: Record<string, VimpChannel[]> = {};
const sites = await catalogAllDeviceApi({ signal });
if (!!sites) {
for (const site of sites) {
const channels = await catalogChannelApi(site.code, { signal });
if (!channels || channels.length === 0) continue;
const cameras: VimpChannel[] = [];
const alarms: VimpChannel[] = [];
channels.forEach((channel) => {
const typeCode = Number(channel.code.substring(11, 14));
if (typeCode >= 4 && typeCode <= 6) {
cameras.push(channel);
} else if ((typeCode >= 101 && typeCode <= 108) || (typeCode >= 810 && typeCode <= 815)) {
alarms.push(channel);
}
});
siteCamerasMap[site.code] = cameras;
siteAlarmsMap[site.code] = alarms;
}
}
cameraStore.buildLineTabPanes({
sites,
siteCamerasMap,
codeLines,
codeSites,
codeStationAreas,
codeParkingAreas,
codeOccAreas,
codeTrainAreas,
});
alarmStore.buildLineTabPanes({
sites,
siteAlarmsMap,
codeLines,
codeSites,
codeStationAreas,
codeParkingAreas,
codeOccAreas,
codeTrainAreas,
});
return null;
},
});
};
+1
View File
@@ -0,0 +1 @@
export * from './device-center-query';
@@ -0,0 +1,11 @@
import { unwrapVimpResponse, vimpClient } from '../client';
import type { VimpStation } from '../model';
export const catalogAllDeviceApi = async (options?: { signal?: AbortSignal }) => {
const { signal } = options ?? {};
const client = vimpClient;
const endpoint = `/catalog/allDevice`;
const resp = await client.post<VimpStation[]>(endpoint, {}, { signal });
const data = unwrapVimpResponse(resp);
return data;
};
@@ -0,0 +1,11 @@
import { unwrapVimpResponse, vimpClient } from '../client';
import type { VimpChannel } from '../model';
export const catalogChannelApi = async (code: string, options?: { signal?: AbortSignal }) => {
const { signal } = options ?? {};
const client = vimpClient;
const endpoint = `/catalog/channel`;
const resp = await client.post<VimpChannel[]>(endpoint, { code, time: '' }, { signal });
const data = unwrapVimpResponse(resp);
return data;
};
+2
View File
@@ -0,0 +1,2 @@
export * from './catalog.channel';
export * from './catalog.all-device';
+115
View File
@@ -0,0 +1,115 @@
<script setup lang="ts">
import { NTabPane, NTabs, NTree, type TreeOverrideNodeClickBehavior, type TreeProps } from 'naive-ui';
import { h, type CSSProperties } from 'vue';
import { useAlarmStore } from '../stores';
import { storeToRefs } from 'pinia';
import { useDeviceCenterQuery } from '../apis';
import { isAlarmNode, isAlarmSiteNode, isAlarmAreaNode } from '../types';
const { isLoading } = useDeviceCenterQuery();
const alarmStore = useAlarmStore();
const { lineTabPanes } = storeToRefs(alarmStore);
const overrideNodeClickBehavior: TreeOverrideNodeClickBehavior = ({ option }) => {
const hasChildren = (option.children?.length ?? 0) > 0;
if (hasChildren) {
return 'toggleExpand';
} else {
return 'none';
}
};
const renderNodeLabel: TreeProps['renderLabel'] = ({ option }) => {
// 是车站节点
if (isAlarmSiteNode(option)) {
const siteOnline = option.online;
const siteNodeStyle: CSSProperties = {
opacity: siteOnline ? 1 : 0.5,
};
return h('div', { style: siteNodeStyle }, option.label);
}
// 是中间节点(一级/二级区域)
if (isAlarmAreaNode(option)) {
const site = option.site;
const nodeStyle: CSSProperties = {
opacity: site.online ? 1 : 0.5,
};
return h('div', { style: nodeStyle }, option.label);
}
// 是警报器节点
if (isAlarmNode(option)) {
const alarm = option.alarm;
const site = option.site;
const alarmOnline = () => {
return alarm.status === 1 && site.online;
};
const alarmNodeStyle: CSSProperties = {
opacity: alarmOnline() ? 1 : 0.5,
cursor: alarmOnline() ? 'pointer' : 'not-allowed',
};
return h(
'div',
{
style: alarmNodeStyle,
draggable: alarmOnline(),
onDblclick() {
if (!alarmOnline()) return;
window.$message.info(`查看警报器:${JSON.stringify({ code: alarm.code, name: alarm.name })}`);
},
onDragstart(event) {
if (!alarmOnline()) return;
console.log(event);
event.dataTransfer?.setData('type', 'alarm');
event.dataTransfer?.setData('code', alarm.code);
event.dataTransfer?.setData('name', alarm.name);
},
},
alarm.name,
);
}
// 其他节点(兜底,理论上不会走到这里)
return option.label;
};
</script>
<template>
<template v-if="isLoading">
<div>loading...</div>
</template>
<template v-else-if="lineTabPanes.length === 1">
<NTree
block-line
block-node
show-line
virtual-scroll
style="height: 100%"
:data="lineTabPanes.at(0)?.alarmTree"
:override-default-node-click-behavior="overrideNodeClickBehavior"
:render-label="renderNodeLabel"
/>
</template>
<template v-if="lineTabPanes.length > 1">
<NTabs :type="'card'" :placement="'left'" style="height: 100%">
<NTabPane v-for="{ lineCode, lineName, alarmTree } in lineTabPanes" :key="lineCode" :name="lineName" :tab="lineName">
<NTree
block-line
block-node
show-line
virtual-scroll
style="height: 100%"
:data="alarmTree"
:override-default-node-click-behavior="overrideNodeClickBehavior"
:render-label="renderNodeLabel"
/>
</NTabPane>
</NTabs>
</template>
</template>
<style scoped></style>
+115
View File
@@ -0,0 +1,115 @@
<script setup lang="ts">
import { NTabPane, NTabs, NTree, type TreeOverrideNodeClickBehavior, type TreeProps } from 'naive-ui';
import { h, type CSSProperties } from 'vue';
import { useCameraStore } from '../stores';
import { storeToRefs } from 'pinia';
import { useDeviceCenterQuery } from '../apis';
import { isCameraNode, isCameraSiteNode, isCameraAreaNode } from '../types';
const { isLoading } = useDeviceCenterQuery();
const cameraStore = useCameraStore();
const { lineTabPanes } = storeToRefs(cameraStore);
const overrideNodeClickBehavior: TreeOverrideNodeClickBehavior = ({ option }) => {
const hasChildren = (option.children?.length ?? 0) > 0;
if (hasChildren) {
return 'toggleExpand';
} else {
return 'none';
}
};
const renderNodeLabel: TreeProps['renderLabel'] = ({ option }) => {
// 是车站节点
if (isCameraSiteNode(option)) {
const siteOnline = option.online;
const siteNodeStyle: CSSProperties = {
opacity: siteOnline ? 1 : 0.5,
};
return h('div', { style: siteNodeStyle }, option.label);
}
// 是中间节点(一级/二级区域)
if (isCameraAreaNode(option)) {
const site = option.site;
const nodeStyle: CSSProperties = {
opacity: site.online ? 1 : 0.5,
};
return h('div', { style: nodeStyle }, option.label);
}
// 是摄像机节点
if (isCameraNode(option)) {
const camera = option.camera;
const site = option.site;
const cameraOnline = () => {
return camera.status === 1 && site.online;
};
const cameraNodeStyle: CSSProperties = {
opacity: cameraOnline() ? 1 : 0.5,
cursor: cameraOnline() ? 'pointer' : 'not-allowed',
};
return h(
'div',
{
style: cameraNodeStyle,
draggable: cameraOnline(),
onDblclick() {
if (!cameraOnline()) return;
window.$message.info(`播放:${JSON.stringify({ code: camera.code, name: camera.name })}`);
},
onDragstart(event) {
if (!cameraOnline()) return;
console.log(event);
event.dataTransfer?.setData('type', 'camera');
event.dataTransfer?.setData('code', camera.code);
event.dataTransfer?.setData('name', camera.name);
},
},
camera.name,
);
}
// 其他节点(兜底,理论上不会走到这里)
return option.label;
};
</script>
<template>
<template v-if="isLoading">
<div>loading...</div>
</template>
<template v-else-if="lineTabPanes.length === 1">
<NTree
block-line
block-node
show-line
virtual-scroll
style="height: 100%"
:data="lineTabPanes.at(0)?.cameraTree"
:override-default-node-click-behavior="overrideNodeClickBehavior"
:render-label="renderNodeLabel"
/>
</template>
<template v-if="lineTabPanes.length > 1">
<NTabs :type="'card'" :placement="'left'" style="height: 100%">
<NTabPane v-for="{ lineCode, lineName, cameraTree } in lineTabPanes" :key="lineCode" :name="lineName" :tab="lineName">
<NTree
block-line
block-node
show-line
virtual-scroll
style="height: 100%"
:data="cameraTree"
:override-default-node-click-behavior="overrideNodeClickBehavior"
:render-label="renderNodeLabel"
/>
</NTabPane>
</NTabs>
</template>
</template>
<style scoped></style>
+181
View File
@@ -0,0 +1,181 @@
import { defineStore } from 'pinia';
import type { VimpChannel, VimpStation } from '../apis';
import { h, ref } from 'vue';
import type { AlarmMainAreaNodeOption, AlarmNodeOption, CodeArea, CodeLines, CodeSites, AlarmLineTabPane, AlarmSiteNodeOption, AlarmSubAreaNodeOption } from '../types';
interface BuildLineTabPanesParams {
sites: VimpStation[] | null;
siteAlarmsMap: Record<string, VimpChannel[]>;
codeLines: CodeLines;
codeSites: CodeSites;
codeStationAreas: CodeArea[];
codeParkingAreas: CodeArea[];
codeOccAreas: CodeArea[];
codeTrainAreas: CodeArea[];
}
export const useAlarmStore = defineStore('vimp-alarm', () => {
const lineTabPanes = ref<AlarmLineTabPane[]>([]);
const buildLineTabPanes = (params: BuildLineTabPanesParams) => {
const { sites, siteAlarmsMap, codeLines, codeSites, codeStationAreas, codeParkingAreas, codeOccAreas, codeTrainAreas } = params;
if (!sites) {
lineTabPanes.value = [];
return;
}
// 构造线路TabPane
const _lineTabPanes: AlarmLineTabPane[] = [];
const lineCode = sites.at(0)?.code.substring(0, 3) ?? '';
const lineName = codeLines[lineCode]?.name ?? '';
if (!_lineTabPanes.some((lineNode) => lineNode.lineCode === lineCode)) {
_lineTabPanes.push({
lineCode,
lineName,
alarmTree: [],
});
}
// 遍历所有站点
for (const site of sites) {
const siteCode = site.code.substring(0, 6);
const siteName = codeSites[siteCode]?.name;
if (!siteName) continue;
// 构造站点节点
const siteNode: AlarmSiteNodeOption = {
key: siteCode,
label: siteName,
children: [],
stats: { online: 0, offline: 0, total: 0 },
online: site.online,
};
_lineTabPanes.find((lineTabPane) => lineTabPane.lineCode === lineCode)?.alarmTree.push(siteNode);
// 获取所有警报器
const alarms = siteAlarmsMap[site.code];
if (!alarms || alarms.length === 0) continue;
// 遍历警报器
for (const alarm of alarms) {
// 计算相关编码
const { code: alarmGbCode, name: alarmName } = alarm;
const alarmSiteCode = alarmGbCode.substring(0, 6);
const alarmSiteType = codeSites[alarmSiteCode]?.type;
const alarmAreaCode = alarmGbCode.substring(6, 11);
const alarmMainAreaCode = alarmAreaCode.slice(0, 2);
// 构造车站/基地/OCC/车次区域
let siteArea: CodeArea | undefined = undefined;
if (alarmSiteType === 'station') {
siteArea = codeStationAreas.find((area) => area.code === alarmMainAreaCode);
} else if (alarmSiteType === 'parking') {
siteArea = codeParkingAreas.find((area) => area.code === alarmMainAreaCode);
} else if (alarmSiteType === 'occ') {
siteArea = codeOccAreas.find((area) => area.code === alarmMainAreaCode);
} else if (alarmSiteType === 'train') {
siteArea = codeTrainAreas.find((area) => area.code === alarmMainAreaCode);
} else {
continue;
}
if (!siteArea) continue; // 如果还是未找到区域,则跳过该警报器
// 构造1级区域节点
if (!siteNode.children?.find((areaNode) => areaNode.key === `${alarmSiteCode}${alarmMainAreaCode}`)) {
const mainAreaNode: AlarmMainAreaNodeOption = {
key: `${alarmSiteCode}${alarmMainAreaCode}`,
label: siteArea.name,
children: [],
stats: { online: 0, offline: 0, total: 0 },
site: site,
};
siteNode.children?.push(mainAreaNode);
}
const targetMainAreaNode = siteNode.children?.find((areaNode) => areaNode.key === `${alarmSiteCode}${alarmMainAreaCode}`);
if (!targetMainAreaNode) continue; // 如果1级区域节点不存在,则跳过该警报器
// 构造2级区域节点
if (!targetMainAreaNode.children?.find((subAreaNode) => subAreaNode.key === `${alarmSiteCode}${alarmAreaCode}`)) {
let subArea: CodeArea['subs'][number] | undefined = undefined;
if (alarmSiteType === 'station') {
subArea = codeStationAreas.find((area) => area.code === alarmMainAreaCode)?.subs.find((subArea) => subArea.code === alarmAreaCode);
} else if (alarmSiteType === 'parking') {
subArea = codeParkingAreas.find((area) => area.code === alarmMainAreaCode)?.subs.find((subArea) => subArea.code === alarmAreaCode);
} else if (alarmSiteType === 'occ') {
subArea = codeOccAreas.find((area) => area.code === alarmMainAreaCode)?.subs.find((subArea) => subArea.code === alarmAreaCode);
} else if (alarmSiteType === 'train') {
subArea = codeTrainAreas.find((area) => area.code === alarmMainAreaCode)?.subs.find((subArea) => subArea.code === alarmAreaCode);
} else {
continue;
}
if (!subArea) continue; // 如果还是未找到子区域,则跳过该警报器
const subAreaNode: AlarmSubAreaNodeOption = {
key: `${alarmSiteCode}${alarmAreaCode}`,
label: subArea.name,
children: [],
stats: { online: 0, offline: 0, total: 0 },
site: site,
};
targetMainAreaNode.children?.push(subAreaNode);
}
const subAreaNode = targetMainAreaNode.children?.find((subAreaNode) => subAreaNode.key === `${alarmSiteCode}${alarmAreaCode}`);
if (!subAreaNode) continue; // 如果子区域节点不存在,则跳过该警报器
// 构造警报器节点
const alarmType = alarm.code.substring(11, 14);
const alarmNode: AlarmNodeOption = {
key: alarmGbCode,
label: alarmName,
type: alarmType,
alarm: alarm,
site: site,
prefix: () => {
return `[警报器]`;
},
};
// 添加警报器节点到子区域节点
if (!subAreaNode.children?.find((alarmNode) => alarmNode.key === alarmGbCode)) {
subAreaNode.children?.push(alarmNode);
}
// 统计站点、区域、子区域的在线/离线/总警报器数量
siteNode.stats.total++;
targetMainAreaNode.stats.total++;
subAreaNode.stats.total++;
if (alarm.status === 1) {
siteNode.stats.online++;
targetMainAreaNode.stats.online++;
subAreaNode.stats.online++;
}
if (alarm.status === 0) {
siteNode.stats.offline++;
targetMainAreaNode.stats.offline++;
subAreaNode.stats.offline++;
}
}
siteNode.suffix = () => {
const { online, offline, total } = siteNode.stats;
return `(${online}/${offline}/${total})`;
};
siteNode.children?.forEach((areaNode) => {
areaNode.suffix = () => {
const { online, offline, total } = areaNode.stats;
return h('div', { style: { marginRight: '8px', opacity: 0.6 } }, `(${online}/${offline}/${total})`);
};
areaNode.children?.forEach((subAreaNode) => {
subAreaNode.suffix = () => {
const { online, offline, total } = subAreaNode.stats;
return h('div', { style: { marginRight: '16px', opacity: 0.4 } }, `(${online}/${offline}/${total})`);
};
});
});
}
lineTabPanes.value = _lineTabPanes;
};
return {
lineTabPanes,
buildLineTabPanes,
};
});
+183
View File
@@ -0,0 +1,183 @@
import { defineStore } from 'pinia';
import type { VimpChannel, VimpStation } from '../apis';
import { h, ref } from 'vue';
import type { CameraMainAreaNodeOption, CameraNodeOption, CodeArea, CodeLines, CodeSites, CameraLineTabPane, CameraSiteNodeOption, CameraSubAreaNodeOption } from '../types';
interface BuildLineTabPanesParams {
sites: VimpStation[] | null;
siteCamerasMap: Record<string, VimpChannel[]>;
codeLines: CodeLines;
codeSites: CodeSites;
codeStationAreas: CodeArea[];
codeParkingAreas: CodeArea[];
codeOccAreas: CodeArea[];
codeTrainAreas: CodeArea[];
}
export const useCameraStore = defineStore('vimp-camera', () => {
const lineTabPanes = ref<CameraLineTabPane[]>([]);
const buildLineTabPanes = (params: BuildLineTabPanesParams) => {
const { sites, siteCamerasMap, codeLines, codeSites, codeStationAreas, codeParkingAreas, codeOccAreas, codeTrainAreas } = params;
if (!sites) {
lineTabPanes.value = [];
return;
}
// 构造线路TabPane
const _lineTabPanes: CameraLineTabPane[] = [];
const lineCode = sites.at(0)?.code.substring(0, 3) ?? '';
const lineName = codeLines[lineCode]?.name ?? '';
if (!_lineTabPanes.some((lineNode) => lineNode.lineCode === lineCode)) {
_lineTabPanes.push({
lineCode,
lineName,
cameraTree: [],
});
}
// 遍历所有站点
for (const site of sites) {
const siteCode = site.code.substring(0, 6);
const siteName = codeSites[siteCode]?.name;
if (!siteName) continue;
// 构造站点节点
const siteNode: CameraSiteNodeOption = {
key: siteCode,
label: siteName,
children: [],
stats: { online: 0, offline: 0, total: 0 },
online: site.online,
};
_lineTabPanes.find((lineTabPane) => lineTabPane.lineCode === lineCode)?.cameraTree.push(siteNode);
// 获取所有摄像机
const cameras = siteCamerasMap[site.code];
if (!cameras || cameras.length === 0) continue;
// 遍历摄像机
for (const camera of cameras) {
// 计算相关编码
const { code: cameraGbCode, name: cameraName } = camera;
const cameraSiteCode = cameraGbCode.substring(0, 6);
const cameraSiteType = codeSites[cameraSiteCode]?.type;
const cameraAreaCode = cameraGbCode.substring(6, 11);
const cameraMainAreaCode = cameraAreaCode.slice(0, 2);
// 构造车站/基地/OCC/车次区域
let siteArea: CodeArea | undefined = undefined;
if (cameraSiteType === 'station') {
siteArea = codeStationAreas.find((area) => area.code === cameraMainAreaCode);
} else if (cameraSiteType === 'parking') {
siteArea = codeParkingAreas.find((area) => area.code === cameraMainAreaCode);
} else if (cameraSiteType === 'occ') {
siteArea = codeOccAreas.find((area) => area.code === cameraMainAreaCode);
} else if (cameraSiteType === 'train') {
siteArea = codeTrainAreas.find((area) => area.code === cameraMainAreaCode);
} else {
continue;
}
if (!siteArea) continue; // 如果还是未找到区域,则跳过该摄像机
// 构造1级区域节点
if (!siteNode.children?.find((areaNode) => areaNode.key === `${cameraSiteCode}${cameraMainAreaCode}`)) {
const mainAreaNode: CameraMainAreaNodeOption = {
key: `${cameraSiteCode}${cameraMainAreaCode}`,
label: siteArea.name,
children: [],
stats: { online: 0, offline: 0, total: 0 },
site: site,
};
siteNode.children?.push(mainAreaNode);
}
const targetMainAreaNode = siteNode.children?.find((areaNode) => areaNode.key === `${cameraSiteCode}${cameraMainAreaCode}`);
if (!targetMainAreaNode) continue; // 如果1级区域节点不存在,则跳过该摄像机
// 构造2级区域节点
if (!targetMainAreaNode.children?.find((subAreaNode) => subAreaNode.key === `${cameraSiteCode}${cameraAreaCode}`)) {
let subArea: CodeArea['subs'][number] | undefined = undefined;
if (cameraSiteType === 'station') {
subArea = codeStationAreas.find((area) => area.code === cameraMainAreaCode)?.subs.find((subArea) => subArea.code === cameraAreaCode);
} else if (cameraSiteType === 'parking') {
subArea = codeParkingAreas.find((area) => area.code === cameraMainAreaCode)?.subs.find((subArea) => subArea.code === cameraAreaCode);
} else if (cameraSiteType === 'occ') {
subArea = codeOccAreas.find((area) => area.code === cameraMainAreaCode)?.subs.find((subArea) => subArea.code === cameraAreaCode);
} else if (cameraSiteType === 'train') {
subArea = codeTrainAreas.find((area) => area.code === cameraMainAreaCode)?.subs.find((subArea) => subArea.code === cameraAreaCode);
} else {
continue;
}
if (!subArea) continue; // 如果还是未找到2级区域,则跳过该摄像机
const subAreaNode: CameraSubAreaNodeOption = {
key: `${cameraSiteCode}${cameraAreaCode}`,
label: subArea.name,
children: [],
stats: { online: 0, offline: 0, total: 0 },
site: site,
};
targetMainAreaNode.children?.push(subAreaNode);
}
const subAreaNode = targetMainAreaNode.children?.find((subAreaNode) => subAreaNode.key === `${cameraSiteCode}${cameraAreaCode}`);
if (!subAreaNode) continue; // 如果子区域节点不存在,则跳过该摄像机
// 构造摄像机节点
const cameraType = camera.code.substring(11, 14);
const cameraNode: CameraNodeOption = {
key: cameraGbCode,
label: cameraName,
type: cameraType,
camera: camera,
site: site,
prefix: () => {
if (cameraType === '004') return `[枪机]`;
if (cameraType === '005') return `[半球]`;
if (cameraType === '006') return `[球机]`;
},
};
// 添加摄像机节点到子区域节点
if (!subAreaNode.children?.find((cameraNode) => cameraNode.key === cameraGbCode)) {
subAreaNode.children?.push(cameraNode);
}
// 统计站点、区域、子区域的在线/离线/总摄像机数量
siteNode.stats.total++;
targetMainAreaNode.stats.total++;
subAreaNode.stats.total++;
if (camera.status === 1) {
siteNode.stats.online++;
targetMainAreaNode.stats.online++;
subAreaNode.stats.online++;
}
if (camera.status === 0) {
siteNode.stats.offline++;
targetMainAreaNode.stats.offline++;
subAreaNode.stats.offline++;
}
}
siteNode.suffix = () => {
const { online, offline, total } = siteNode.stats;
return `(${online}/${offline}/${total})`;
};
siteNode.children?.forEach((areaNode) => {
areaNode.suffix = () => {
const { online, offline, total } = areaNode.stats;
return h('div', { style: { marginRight: '8px', opacity: 0.6 } }, `(${online}/${offline}/${total})`);
};
areaNode.children?.forEach((subAreaNode) => {
subAreaNode.suffix = () => {
const { online, offline, total } = subAreaNode.stats;
return h('div', { style: { marginRight: '16px', opacity: 0.4 } }, `(${online}/${offline}/${total})`);
};
});
});
}
lineTabPanes.value = _lineTabPanes;
};
return {
lineTabPanes,
buildLineTabPanes,
};
});
+2
View File
@@ -0,0 +1,2 @@
export * from './camera-store';
export * from './alarm-store';
+9
View File
@@ -0,0 +1,9 @@
import type { AxiosError } from 'axios';
export interface VimpResult<T = unknown> {
code: number;
data: T;
msg: string;
}
export type VimpResponse<T> = [err: AxiosError | null, data: T | null, resp: VimpResult<T> | null];
+103
View File
@@ -0,0 +1,103 @@
import type { TabPaneProps, TreeOption } from 'naive-ui';
import type { VimpChannel, VimpStation } from '../apis/model';
export type SiteType = 'station' | 'parking' | 'occ' | 'train';
export type CodeLines = Record<string, { name: string; color: string }>;
export type CodeSites = Record<string, { name: string; type: SiteType }>;
export type CodeArea = { code: string; name: string; subs: { code: string; name: string }[] };
export interface CountStats {
online: number;
offline: number;
total: number;
}
// ==========================================
// 摄像机树相关类型
// ==========================================
export interface CameraNodeOption extends TreeOption {
camera: VimpChannel;
type: string;
site: VimpStation;
}
export interface CameraSubAreaNodeOption extends TreeOption {
children?: CameraNodeOption[];
stats: CountStats;
site: VimpStation;
}
export interface CameraMainAreaNodeOption extends TreeOption {
children?: CameraSubAreaNodeOption[];
stats: CountStats;
site: VimpStation;
}
export interface CameraSiteNodeOption extends TreeOption {
children?: CameraMainAreaNodeOption[];
stats: CountStats;
online: boolean;
}
export function isCameraSiteNode(option: TreeOption): option is CameraSiteNodeOption {
return 'online' in option && !('camera' in option);
}
export function isCameraAreaNode(option: TreeOption): option is CameraMainAreaNodeOption | CameraSubAreaNodeOption {
return 'site' in option && !('camera' in option) && !('online' in option);
}
export function isCameraNode(option: TreeOption): option is CameraNodeOption {
return 'camera' in option && 'site' in option;
}
export interface CameraLineTabPane extends TabPaneProps {
lineCode: string;
lineName: string;
cameraTree: CameraSiteNodeOption[];
}
// ==========================================
// 警报器树相关类型
// ==========================================
export interface AlarmNodeOption extends TreeOption {
alarm: VimpChannel;
type: string;
site: VimpStation;
}
export interface AlarmSubAreaNodeOption extends TreeOption {
children?: AlarmNodeOption[];
stats: CountStats;
site: VimpStation;
}
export interface AlarmMainAreaNodeOption extends TreeOption {
children?: AlarmSubAreaNodeOption[];
stats: CountStats;
site: VimpStation;
}
export interface AlarmSiteNodeOption extends TreeOption {
children?: AlarmMainAreaNodeOption[];
stats: CountStats;
online: boolean;
}
export function isAlarmSiteNode(option: TreeOption): option is AlarmSiteNodeOption {
return 'online' in option && !('alarm' in option);
}
export function isAlarmAreaNode(option: TreeOption): option is AlarmMainAreaNodeOption | AlarmSubAreaNodeOption {
return 'site' in option && !('alarm' in option) && !('online' in option);
}
export function isAlarmNode(option: TreeOption): option is AlarmNodeOption {
return 'alarm' in option && 'site' in option;
}
export interface AlarmLineTabPane extends TabPaneProps {
lineCode: string;
lineName: string;
alarmTree: AlarmSiteNodeOption[];
}
+2
View File
@@ -0,0 +1,2 @@
export * from './axios';
export * from './device-tree';
+63
View File
@@ -0,0 +1,63 @@
<script setup lang="ts">
import { NTabPane, NTabs, type TabPaneProps } from 'naive-ui';
import { ref, type Component } from 'vue';
import CameraTree from './components/camera-tree.vue';
import AlarmTree from './components/alarm-tree.vue';
interface ResourceTabPane extends TabPaneProps {
name: string;
tab: string;
component?: Component;
}
const resourceTabPanes: ResourceTabPane[] = [
{ name: 'camera', tab: '摄像头', component: CameraTree },
{ name: 'alarm', tab: '警报器', component: AlarmTree },
];
const onDragover = (event: DragEvent) => {
event.preventDefault();
if (event.dataTransfer) {
event.dataTransfer.dropEffect = 'copy';
}
};
const onDrop = (event: DragEvent) => {
event.preventDefault();
const type = event.dataTransfer?.getData('type');
if (!type) return;
if (type === 'camera') {
const code = event.dataTransfer?.getData('code');
if (!code) return;
const name = event.dataTransfer?.getData('name');
window.$message.info(`播放:${JSON.stringify({ code, name })}`);
} else if (type === 'alarm') {
const code = event.dataTransfer?.getData('code');
if (!code) return;
const name = event.dataTransfer?.getData('name');
window.$message.info(`查看警报器:${JSON.stringify({ code, name })}`);
} else {
}
};
</script>
<template>
<div style="height: 100%; overflow: hidden; display: flex">
<div style="width: 540px; height: 100%; overflow: hidden">
<NTabs :type="'line'" :placement="'left'" style="height: 100%">
<NTabPane v-for="{ name: resourceName, tab: resourceTab, component } in resourceTabPanes" :key="resourceName" :tab="resourceTab" :name="resourceName">
<template v-if="!!component">
<component :is="component" />
</template>
</NTabPane>
</NTabs>
</div>
<div style="flex: 1">
<div style="height: 480px; background-color: #666; display: grid; place-items: center" @dragover="onDragover" @drop="onDrop">
<div>这里是播放器</div>
</div>
</div>
</div>
</template>
<style scoped></style>
+4
View File
@@ -60,6 +60,10 @@ const router = createRouter({
path: 'changelog',
component: () => import('@/pages/system/changelog/changelog-page.vue'),
},
{
path: 'vimp',
component: () => import('@/pages/vimp/vimp-page.vue'),
},
{
path: '/:pathMatch(.*)*',
component: () => import('@/pages/system/error/not-found-page.vue'),
+24 -2
View File
@@ -4,6 +4,8 @@ import { fileURLToPath, URL } from 'node:url';
import { defineConfig, ProxyOptions } from 'vite';
import vueDevTools from 'vite-plugin-vue-devtools';
const SERVER_PORT = 9763;
type ProxyItem = {
key: string;
target: string;
@@ -175,6 +177,12 @@ const line10ApiProxyList: ProxyItem[] = [
{ key: '/1032/api', target: 'http://10.18.244.10:18760', rewrite: ['/1032/api', '/api'] },
];
const line21YangpuTestProxyList: ProxyItem[] = [
{ key: '/2175/api', target: 'http://10.24.0.10:18760', rewrite: ['/2175/api', '/api'] },
{ key: '/2109/api', target: 'http://10.24.17.10:18760', rewrite: ['/2109/api', '/api'] },
{ key: '/2180/api', target: 'http://10.24.116.10:18760', rewrite: ['/2180/api', '/api'] },
];
const apiProxyList: ProxyItem[] = [
// { key: '/minio', target: 'http://10.14.0.10:9000', rewrite: ['/minio', ''] },
// { key: '/api', target: 'http://10.14.0.10:18760' },
@@ -192,9 +200,23 @@ const apiProxyList: ProxyItem[] = [
...line04ApiProxyList,
{ key: '/minio', target: 'http://10.18.128.10:9000', rewrite: ['/minio', ''] },
{ key: '/api', target: 'http://10.18.128.10:18760' },
{ key: '/api', target: 'http://10.18.128.10:18760' }, // 吴中路控制中心
// { key: '/api', target: 'http://10.18.187.10:18760' }, // 紫藤路
{ key: '/ws', target: 'ws://10.18.128.10:18103', ws: true },
...line10ApiProxyList,
// 杨浦厂验环境
// { key: '/minio', target: 'http://10.24.0.10:9000', rewrite: ['/minio', ''] },
// { key: '/api', target: 'http://10.24.0.10:18760' },
// { key: '/ws', target: 'ws://10.24.0.10:18103', ws: true },
...line21YangpuTestProxyList,
// 设备树测试用代理配置
// { key: '/vimp/api', target: 'http://10.14.0.10:18080', rewrite: ['/vimp/api', '/api'] },
// { key: '/vimp/api', target: 'http://10.18.128.6:18080', rewrite: ['/vimp/api', '/api'] },
{ key: '/vimp/api', target: 'http://localhost:4000', rewrite: ['/vimp/api', '/api'] },
// { key: '/vimp/api', target: 'http://10.18.128.6:18080', rewrite: ['/vimp/api', '/api'] },
{ key: '/cdn', target: `http://localhost:${SERVER_PORT}`, rewrite: ['/cdn', ''] },
];
// https://vite.dev/config/
@@ -220,7 +242,7 @@ export default defineConfig((/* { command, mode } */) => {
},
},
server: {
port: 9763,
port: SERVER_PORT,
proxy: viteProxy,
},
};