From f030d8a9607cef32ee41e01d96817c7e47681602 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期五, 30 五月 2025 15:18:47 +0800 Subject: [PATCH] 11 --- src/api/ecg/devmanage/index.ts | 42 +++++++++++++++++++++++++++++++++++++----- 1 files changed, 37 insertions(+), 5 deletions(-) diff --git a/src/api/ecg/devmanage/index.ts b/src/api/ecg/devmanage/index.ts index 912ca47..f71f887 100644 --- a/src/api/ecg/devmanage/index.ts +++ b/src/api/ecg/devmanage/index.ts @@ -9,12 +9,29 @@ // 璁惧 VO export interface DeviceVO { - id: number // id - devId: string // 璁惧缂栧彿 - category: string // 鍒嗙被鍚� - brand: string // 鍝佺墝 - model: string // 鍨嬪彿 + 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 { @@ -71,9 +88,19 @@ 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 }) }, // 鏂板璁惧 @@ -86,6 +113,11 @@ 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 }) -- Gitblit v1.9.3