diff --git a/src/api/device/index.ts b/src/api/device/index.ts new file mode 100644 index 000000000..51153f25c --- /dev/null +++ b/src/api/device/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +// 设备 VO +export interface DeviceVO { + id: number // 主键ID + devicename: string // 设备名称 + devicecode: string // 设备ID/编号 + devicetype: string // 设备类型 + location: string // 设备位置 + devicestatus: number // 设备状态(0:待激活 1 在线 2 离线 ,3 禁用 ) + orgid: number // 机构ID + orgname: string // 机构名称 + description: string // 设备描述 + createtime: Date // 创建时间 + updatetime: Date // 更新时间 + createby: string // 创建人 + updateby: string // 更新人 +} + +// 设备 API +export const DeviceApi = { + // 查询设备分页 + getDevicePage: async (params: any) => { + return await request.get({ url: `/system/device/page`, params }) + }, + + // 查询设备详情 + getDevice: async (id: number) => { + return await request.get({ url: `/system/device/get?id=` + id }) + }, + + // 新增设备 + createDevice: async (data: DeviceVO) => { + return await request.post({ url: `/system/device/create`, data }) + }, + + // 修改设备 + updateDevice: async (data: DeviceVO) => { + return await request.put({ url: `/system/device/update`, data }) + }, + + // 删除设备 + deleteDevice: async (id: number) => { + return await request.delete({ url: `/system/device/delete?id=` + id }) + }, + + // 导出设备 Excel + exportDevice: async (params) => { + return await request.download({ url: `/system/device/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/api/deviceuser/index.ts b/src/api/deviceuser/index.ts new file mode 100644 index 000000000..a4dec16bc --- /dev/null +++ b/src/api/deviceuser/index.ts @@ -0,0 +1,46 @@ +import request from '@/config/axios' + +// 设备人员关联 VO +export interface DeviceuserVO { + id: number // 主键ID + deviceid: number // 设备ID + userid: number // 用户ID + createtime: Date // 创建时间 + updatetime: Date // 更新时间 + createby: string // 创建人 + updateby: string // 更新人 + username: string // 用户姓名 +} + +// 设备人员关联 API +export const DeviceuserApi = { + // 查询设备人员关联分页 + getDeviceuserPage: async (params: any) => { + return await request.get({ url: `/system/deviceuser/page`, params }) + }, + + // 查询设备人员关联详情 + getDeviceuser: async (id: number) => { + return await request.get({ url: `/system/deviceuser/get?id=` + id }) + }, + + // 新增设备人员关联 + createDeviceuser: async (data: DeviceuserVO) => { + return await request.post({ url: `/system/deviceuser/create`, data }) + }, + + // 修改设备人员关联 + updateDeviceuser: async (data: DeviceuserVO) => { + return await request.put({ url: `/system/deviceuser/update`, data }) + }, + + // 删除设备人员关联 + deleteDeviceuser: async (id: number) => { + return await request.delete({ url: `/system/deviceuser/delete?id=` + id }) + }, + + // 导出设备人员关联 Excel + exportDeviceuser: async (params) => { + return await request.download({ url: `/system/deviceuser/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/api/doctornotice/index.ts b/src/api/doctornotice/index.ts new file mode 100644 index 000000000..e08824a65 --- /dev/null +++ b/src/api/doctornotice/index.ts @@ -0,0 +1,54 @@ +import request from '@/config/axios' + +// 医生通知 VO +export interface DoctornoticeVO { + id: number // 主键ID + deviceid: number // 设备ID + userid: number // 接收通知的用户ID + doctorid: number // 发送通知的医生ID + datatime: Date // 发送时间 + noticetype: number // 通知类型(1:异常提醒,2:建议提醒,3:复查提醒) + noticetitle: string // 通知标题 + noticecontent: string // 通知内容 + noticelevel: number // 通知级别(1:普通,2:重要,3:紧急) + readstatus: number // 读取状态(0:未读,1:已读) + readtime: Date // 读取时间 + createtime: Date // 创建时间 + updatetime: Date // 更新时间 + createby: string // 创建人 + updateby: string // 更新人 + isdeleted: number // 是否删除(0:未删除,1:已删除) +} + +// 医生通知 API +export const DoctornoticeApi = { + // 查询医生通知分页 + getDoctornoticePage: async (params: any) => { + return await request.get({ url: `/system/doctornotice/page`, params }) + }, + + // 查询医生通知详情 + getDoctornotice: async (id: number) => { + return await request.get({ url: `/system/doctornotice/get?id=` + id }) + }, + + // 新增医生通知 + createDoctornotice: async (data: DoctornoticeVO) => { + return await request.post({ url: `/system/doctornotice/create`, data }) + }, + + // 修改医生通知 + updateDoctornotice: async (data: DoctornoticeVO) => { + return await request.put({ url: `/system/doctornotice/update`, data }) + }, + + // 删除医生通知 + deleteDoctornotice: async (id: number) => { + return await request.delete({ url: `/system/doctornotice/delete?id=` + id }) + }, + + // 导出医生通知 Excel + exportDoctornotice: async (params) => { + return await request.download({ url: `/system/doctornotice/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/api/ecgdata/index.ts b/src/api/ecgdata/index.ts new file mode 100644 index 000000000..695ba054d --- /dev/null +++ b/src/api/ecgdata/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' + +// 心电数据采集 VO +export interface EcgdataVO { + id: number // 主键ID + deviceid: number // 设备ID + devicename: string // 设备名称 + userid: number // 人员ID + collecttime: Date // 采集时间 + devicetype: string // 设备类型 + heartrate: number // 心率(次/分) + rhythm: string // 心律类型(窦性心律,房颤等) + printerval: number // PR间期(ms) + qrsduration: number // QRS时限(ms) + qtinterval: number // QT间期(ms) + qtcinterval: number // QTc间期(ms) + paxis: number // P电轴(度) + qrsaxis: number // QRS电轴(度) + taxis: number // T电轴(度) + rv5: number // RV5电压(mV) + sv1: number // SV1电压(mV) + rv5sv1: number // RV5+SV1电压(mV) + stsegment: string // ST段改变 + twave: string // T波改变 + diagnosis: string // 心电图诊断 + ecgimageurl: string // 心电图图片地址 + ecgdataurl: string // 心电图数据文件地址 + orgid: number // 机构ID + orgname: string // 机构名称 + datastatus: number // 数据状态(0:异常,1:正常) + remark: string // 备注 +} + +// 心电数据采集 API +export const EcgdataApi = { + // 查询心电数据采集分页 + getEcgdataPage: async (params: any) => { + return await request.get({ url: `/system/ecgdata/page`, params }) + }, + + // 查询心电数据采集详情 + getEcgdata: async (id: number) => { + return await request.get({ url: `/system/ecgdata/get?id=` + id }) + }, + + // 新增心电数据采集 + createEcgdata: async (data: EcgdataVO) => { + return await request.post({ url: `/system/ecgdata/create`, data }) + }, + + // 修改心电数据采集 + updateEcgdata: async (data: EcgdataVO) => { + return await request.put({ url: `/system/ecgdata/update`, data }) + }, + + // 删除心电数据采集 + deleteEcgdata: async (id: number) => { + return await request.delete({ url: `/system/ecgdata/delete?id=` + id }) + }, + + // 导出心电数据采集 Excel + exportEcgdata: async (params) => { + return await request.download({ url: `/system/ecgdata/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/views/devices/devices_cards.vue b/src/views/devices/devices_cards.vue index 3e8980918..bd29d6d5f 100644 --- a/src/views/devices/devices_cards.vue +++ b/src/views/devices/devices_cards.vue @@ -13,6 +13,15 @@ > 详情 + + 数据 +

{{ deviceInfo.statusText }} @@ -258,6 +267,21 @@ const handleAction = (action) => { border: none; } +.data-btn { + padding: 0; + font-size: 14px; + height: auto; + background: none; + border: none; + color: #67C23A; +} + +.data-btn:hover { + color: #71d440; + background: none; + border: none; +} + /* 在线状态卡片样式 */ .device-card[data-status="normal"] { background: linear-gradient(145deg, #e6f3ff, #fafafa);