From 6f1b2cf3dc89059104ca0eedebf5f3ec4d1147f0 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 26 十一月 2025 11:08:17 +0800
Subject: [PATCH] 打印
---
src/api/ecg/devmanage/index.ts | 91 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 90 insertions(+), 1 deletions(-)
diff --git a/src/api/ecg/devmanage/index.ts b/src/api/ecg/devmanage/index.ts
index defc5e7..f71f887 100644
--- a/src/api/ecg/devmanage/index.ts
+++ b/src/api/ecg/devmanage/index.ts
@@ -7,6 +7,38 @@
model: string // 鍨嬪彿
}
+// 璁惧 VO
+export interface DeviceVO {
+ id?: number // id
+ devCodeIntrinsic?: string
+ devCodeHosp?: string
+ devCodeDept?: string
+ devId?: string // 璁惧缂栧彿
+ category?: string // 鍒嗙被鍚�
+ brand?: string // 鍝佺墝
+ model?: string // 鍨嬪彿
+ purchaseDate?: number // 閲囪喘鏃ユ湡
+ state?: number //鐘舵��
+ comment?: string // 澶囨敞
+}
+
+// 璁惧缁熻 VO
+export interface DeviceStatisticVO {
+ id: number // id
+ devId: string // 璁惧缂栧彿
+ category: string // 鍒嗙被鍚�
+ brand: string // 鍝佺墝
+ model: string // 鍨嬪彿
+ purchaseDate: number // 閲囪喘鏃ユ湡
+ state: number // 鐘舵��
+ devCount: number // 缁熻鏁伴噺
+}
+
+export interface OptionsVO {
+ label: string
+ value: string
+}
+
// 璁惧鍨嬪彿 API
export const DevModelApi = {
// 鏌ヨ璁惧鍨嬪彿鍒嗛〉
@@ -37,5 +69,62 @@
// 瀵煎嚭璁惧鍨嬪彿 Excel
exportDevModel: async (params) => {
return await request.download({ url: `/ecg/dev-model/export-excel`, params })
+ },
+
+ //
+ getBrandOption: async (category: string) => {
+ return await request.get({ url: `/ecg/dev-model/brand-option?category=` + category })
+ },
+
+ getModelOption: async (category: string, brand: string) => {
+ return await request.get({ url: `/ecg/dev-model/model-option?category=` + category + `&brand=` + brand })
}
-}
\ No newline at end of file
+}
+
+// 璁惧 API
+export const DeviceApi = {
+ // 鏌ヨ璁惧鍒嗛〉
+ getDevicePage: async (params: any) => {
+ return await request.get({ url: `/ecg/device/page`, params })
+ },
+
+ // 璁惧缁熻
+ deviceStatistic: async (params: any) => {
+ return await request.get({ url: `/ecg/device/dev-statistic`, params })
+ },
+
+ // 鏌ヨ璁惧璇︽儏
+ getDevice: async (id: number) => {
+ return await request.get({ url: `/ecg/device/get?id=` + id })
+ },
+
+ // 鏌ヨ璁惧璇︽儏
+ getDeviceByDevId: async (devId: string) => {
+ return await request.get({ url: `/ecg/device/get-by-dev-id?dev-id=` + devId })
+ },
+
+ // 鏂板璁惧
+ createDevice: async (data: DeviceVO) => {
+ return await request.post({ url: `/ecg/device/create`, data })
+ },
+
+ // 淇敼璁惧
+ updateDevice: async (data: DeviceVO) => {
+ return await request.put({ url: `/ecg/device/update`, data })
+ },
+
+ // 淇敼璁惧鐘舵��
+ updateDeviceState: async (data: DeviceVO) => {
+ return await request.post({ url: `/ecg/device/update-dev-state`, data })
+ },
+
+ // 鍒犻櫎璁惧
+ deleteDevice: async (id: number) => {
+ return await request.delete({ url: `/ecg/device/delete?id=` + id })
+ },
+
+ // 瀵煎嚭璁惧 Excel
+ exportDevice: async (params) => {
+ return await request.download({ url: `/ecg/device/export-excel`, params })
+ }
+}
--
Gitblit v1.9.3