From 750418e3b7439172d0163b863d9b0ae6ab0a6c66 Mon Sep 17 00:00:00 2001 From: Yoga <1836051468@qq.com> Date: Fri, 7 Aug 2026 11:35:08 +0800 Subject: [PATCH] 11 --- .gitignore | 7 + README.md | 62 ++ index.html | 16 + package-lock.json | 1589 +++++++++++++++++++++++++++++++++ package.json | 27 + src/App.vue | 92 ++ src/components/ScanButton.vue | 81 ++ src/components/TabBar.vue | 36 + src/composables/useToast.ts | 48 + src/data/mockData.ts | 355 ++++++++ src/env.d.ts | 9 + src/main.ts | 14 + src/router/index.ts | 67 ++ src/stores/hospital.ts | 210 +++++ src/styles/main.css | 721 +++++++++++++++ src/views/borrow/index.vue | 116 +++ src/views/borrow/scan.vue | 234 +++++ src/views/history/index.vue | 88 ++ src/views/home/index.vue | 130 +++ src/views/inventory/index.vue | 85 ++ src/views/inventory/scan.vue | 211 +++++ src/views/material/detail.vue | 162 ++++ src/views/material/index.vue | 127 +++ src/views/profile/index.vue | 125 +++ tsconfig.json | 24 + tsconfig.node.json | 12 + tsconfig.node.tsbuildinfo | 1 + tsconfig.tsbuildinfo | 1 + vite.config.d.ts | 2 + vite.config.js | 11 + vite.config.ts | 12 + 31 files changed, 4675 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 index.html create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/App.vue create mode 100644 src/components/ScanButton.vue create mode 100644 src/components/TabBar.vue create mode 100644 src/composables/useToast.ts create mode 100644 src/data/mockData.ts create mode 100644 src/env.d.ts create mode 100644 src/main.ts create mode 100644 src/router/index.ts create mode 100644 src/stores/hospital.ts create mode 100644 src/styles/main.css create mode 100644 src/views/borrow/index.vue create mode 100644 src/views/borrow/scan.vue create mode 100644 src/views/history/index.vue create mode 100644 src/views/home/index.vue create mode 100644 src/views/inventory/index.vue create mode 100644 src/views/inventory/scan.vue create mode 100644 src/views/material/detail.vue create mode 100644 src/views/material/index.vue create mode 100644 src/views/profile/index.vue create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json create mode 100644 tsconfig.node.tsbuildinfo create mode 100644 tsconfig.tsbuildinfo create mode 100644 vite.config.d.ts create mode 100644 vite.config.js create mode 100644 vite.config.ts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..42f6f2d --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +node_modules +dist +dist.zip +*.local +.DS_Store +.vscode/* +!.vscode/extensions.json \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d0d18d2 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# 智慧医院移动手持端 (smart_hospital_mobile) + +模拟医院 PDA 手持机的 Web App,配合 RFID 标签完成物资的**出入库盘点**与**借用归还**管理。 + +> 移动端 Web 应用,无需调起摄像头,扫码仅模拟 RFID 手持机一键读取。 + +## 技术栈 + +- Vue 3 + TypeScript + Vite +- Vue Router(Hash 模式,可 file:// 离线打开) +- Pinia(带 localStorage 持久化) +- Element Plus(移动端样式适配) + +## 功能 + +| 模块 | 说明 | +|------|------| +| 首页 | 物资总览、快捷入口、待归还、最近操作 | +| 物资管理 | 列表 + 搜索 + 多维筛选 + 详情 | +| 出入库盘点 | 一键扫码入库 / 出库,自动更新库存 | +| 借用管理 | 扫码识别自动判断借用或归还流程 | +| 操作记录 | 全部历史记录,按类型筛选 | +| 个人中心 | 设备信息、数据重置 | + +## 启动 + +```bash +cd smart_hospital_mobile +npm install +npm run dev # 开发服:http://localhost:5174 +npm run build # 生产构建(输出 dist/) +npm run preview # 预览 dist +``` + +构建产物 `dist/` 可直接用 `file://` 协议或静态服务器打开。 + +## 演示数据 + +首次打开自动生成 12 个物资 + 6 条历史操作,全部带 RFID 标签号: + +- 医疗器械:心电监护仪、除颤仪、便携式呼吸机... +- 设备:输液泵、轮椅、担架... +- 仪器:B 超机、心电图机、血压计... +- 耗材:口罩、注射器... + +所有操作(入库/出库/借用/归还)会即时写入 localStorage,刷新页面不丢失。 +在"我的 → 重置演示数据"可恢复初始状态。 + +## 路由 + +``` +/ → /home +/home 首页 +/material 物资列表 +/material/detail/:id 物资详情 +/inventory 出入库入口 +/inventory/scan?mode=... 扫码出入库(mode: inbound | outbound) +/borrow 借用列表 +/borrow/scan 扫码借用/归还 +/history 操作记录 +/profile 个人中心 +``` \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..6679a0d --- /dev/null +++ b/index.html @@ -0,0 +1,16 @@ + + +
+ + + + + + +