设备数据相关
This commit is contained in:
parent
3e58485d2f
commit
8281287d74
4
.env
4
.env
@ -8,13 +8,13 @@ VITE_PORT=8080
|
|||||||
VITE_OPEN=true
|
VITE_OPEN=true
|
||||||
|
|
||||||
# 租户开关
|
# 租户开关
|
||||||
VITE_APP_TENANT_ENABLE=true
|
VITE_APP_TENANT_ENABLE=false
|
||||||
|
|
||||||
# 验证码的开关
|
# 验证码的开关
|
||||||
VITE_APP_CAPTCHA_ENABLE=true
|
VITE_APP_CAPTCHA_ENABLE=true
|
||||||
|
|
||||||
# 文档地址的开关
|
# 文档地址的开关
|
||||||
VITE_APP_DOCALERT_ENABLE=true
|
VITE_APP_DOCALERT_ENABLE=false
|
||||||
|
|
||||||
# 百度统计
|
# 百度统计
|
||||||
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
|
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
|
||||||
|
@ -1,46 +1,51 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// 设备人员关联 VO
|
// 设备人员关联 VO
|
||||||
export interface DeviceuserVO {
|
export interface DeviceuserVO {
|
||||||
id: number // 主键ID
|
id: number // 主键ID
|
||||||
deviceid: number // 设备ID
|
deviceid: number // 设备ID
|
||||||
userid: number // 用户ID
|
userid: number // 用户ID
|
||||||
createtime: Date // 创建时间
|
createtime: Date // 创建时间
|
||||||
updatetime: Date // 更新时间
|
updatetime: Date // 更新时间
|
||||||
createby: string // 创建人
|
createby: string // 创建人
|
||||||
updateby: string // 更新人
|
updateby: string // 更新人
|
||||||
username: string // 用户姓名
|
username: string // 用户姓名
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设备人员关联 API
|
// 设备人员关联 API
|
||||||
export const DeviceuserApi = {
|
export const DeviceuserApi = {
|
||||||
// 查询设备人员关联分页
|
// 查询设备人员关联分页
|
||||||
getDeviceuserPage: async (params: any) => {
|
getDeviceuserPage: async (params: any) => {
|
||||||
return await request.get({ url: `/system/deviceuser/page`, params })
|
return await request.get({ url: `/system/deviceuser/page`, params })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询设备人员关联详情
|
// 查询设备人员关联详情
|
||||||
getDeviceuser: async (id: number) => {
|
getDeviceuser: async (id: number) => {
|
||||||
return await request.get({ url: `/system/deviceuser/get?id=` + id })
|
return await request.get({ url: `/system/deviceuser/get?id=` + id })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增设备人员关联
|
// 新增设备人员关联
|
||||||
createDeviceuser: async (data: DeviceuserVO) => {
|
createDeviceuser: async (data: DeviceuserVO) => {
|
||||||
return await request.post({ url: `/system/deviceuser/create`, data })
|
return await request.post({ url: `/system/deviceuser/create`, data })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 修改设备人员关联
|
// 修改设备人员关联
|
||||||
updateDeviceuser: async (data: DeviceuserVO) => {
|
updateDeviceuser: async (data: DeviceuserVO) => {
|
||||||
return await request.put({ url: `/system/deviceuser/update`, data })
|
return await request.put({ url: `/system/deviceuser/update`, data })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除设备人员关联
|
// 删除设备人员关联
|
||||||
deleteDeviceuser: async (id: number) => {
|
deleteDeviceuser: async (id: number) => {
|
||||||
return await request.delete({ url: `/system/deviceuser/delete?id=` + id })
|
return await request.delete({ url: `/system/deviceuser/delete?id=` + id })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导出设备人员关联 Excel
|
// 导出设备人员关联 Excel
|
||||||
exportDeviceuser: async (params) => {
|
exportDeviceuser: async (params) => {
|
||||||
return await request.download({ url: `/system/deviceuser/export-excel`, params })
|
return await request.download({ url: `/system/deviceuser/export-excel`, params })
|
||||||
},
|
},
|
||||||
}
|
|
||||||
|
//根据设备ID查询设备人员关联
|
||||||
|
getDeviceuserByDeviceId: async (deviceid: number) => {
|
||||||
|
return await request.get({ url: `/system/deviceuser/getDeviceuserByDeviceId?deviceid=` + deviceid })
|
||||||
|
},
|
||||||
|
}
|
||||||
|
@ -1,65 +1,75 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// 心电数据采集 VO
|
// 心电数据采集 VO
|
||||||
export interface EcgdataVO {
|
export interface EcgdataVO {
|
||||||
id: number // 主键ID
|
id: number // 主键ID
|
||||||
deviceid: number // 设备ID
|
deviceid: number // 设备ID
|
||||||
devicename: string // 设备名称
|
devicename: string // 设备名称
|
||||||
userid: number // 人员ID
|
userid: number // 人员ID
|
||||||
collecttime: Date // 采集时间
|
collecttime: Date // 采集时间
|
||||||
devicetype: string // 设备类型
|
devicetype: string // 设备类型
|
||||||
heartrate: number // 心率(次/分)
|
heartrate: number // 心率(次/分)
|
||||||
rhythm: string // 心律类型(窦性心律,房颤等)
|
rhythm: string // 心律类型(窦性心律,房颤等)
|
||||||
printerval: number // PR间期(ms)
|
printerval: number // PR间期(ms)
|
||||||
qrsduration: number // QRS时限(ms)
|
qrsduration: number // QRS时限(ms)
|
||||||
qtinterval: number // QT间期(ms)
|
qtinterval: number // QT间期(ms)
|
||||||
qtcinterval: number // QTc间期(ms)
|
qtcinterval: number // QTc间期(ms)
|
||||||
paxis: number // P电轴(度)
|
paxis: number // P电轴(度)
|
||||||
qrsaxis: number // QRS电轴(度)
|
qrsaxis: number // QRS电轴(度)
|
||||||
taxis: number // T电轴(度)
|
taxis: number // T电轴(度)
|
||||||
rv5: number // RV5电压(mV)
|
rv5: number // RV5电压(mV)
|
||||||
sv1: number // SV1电压(mV)
|
sv1: number // SV1电压(mV)
|
||||||
rv5sv1: number // RV5+SV1电压(mV)
|
rv5sv1: number // RV5+SV1电压(mV)
|
||||||
stsegment: string // ST段改变
|
stsegment: string // ST段改变
|
||||||
twave: string // T波改变
|
twave: string // T波改变
|
||||||
diagnosis: string // 心电图诊断
|
diagnosis: string // 心电图诊断
|
||||||
ecgimageurl: string // 心电图图片地址
|
ecgimageurl: string // 心电图图片地址
|
||||||
ecgdataurl: string // 心电图数据文件地址
|
ecgdataurl: string // 心电图数据文件地址
|
||||||
orgid: number // 机构ID
|
orgid: number // 机构ID
|
||||||
orgname: string // 机构名称
|
orgname: string // 机构名称
|
||||||
datastatus: number // 数据状态(0:异常,1:正常)
|
datastatus: number // 数据状态(0:异常,1:正常)
|
||||||
remark: string // 备注
|
remark: string // 备注
|
||||||
}
|
}
|
||||||
|
|
||||||
// 心电数据采集 API
|
// 心电数据采集 API
|
||||||
export const EcgdataApi = {
|
export const EcgdataApi = {
|
||||||
// 查询心电数据采集分页
|
// 查询心电数据采集分页
|
||||||
getEcgdataPage: async (params: any) => {
|
getEcgdataPage: async (params: any) => {
|
||||||
return await request.get({ url: `/system/ecgdata/page`, params })
|
return await request.get({ url: `/system/ecgdata/page`, params })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询心电数据采集详情
|
// 查询心电数据采集详情
|
||||||
getEcgdata: async (id: number) => {
|
getEcgdata: async (id: number) => {
|
||||||
return await request.get({ url: `/system/ecgdata/get?id=` + id })
|
return await request.get({ url: `/system/ecgdata/get?id=` + id })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增心电数据采集
|
// 新增心电数据采集
|
||||||
createEcgdata: async (data: EcgdataVO) => {
|
createEcgdata: async (data: EcgdataVO) => {
|
||||||
return await request.post({ url: `/system/ecgdata/create`, data })
|
return await request.post({ url: `/system/ecgdata/create`, data })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 修改心电数据采集
|
// 修改心电数据采集
|
||||||
updateEcgdata: async (data: EcgdataVO) => {
|
updateEcgdata: async (data: EcgdataVO) => {
|
||||||
return await request.put({ url: `/system/ecgdata/update`, data })
|
return await request.put({ url: `/system/ecgdata/update`, data })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除心电数据采集
|
// 删除心电数据采集
|
||||||
deleteEcgdata: async (id: number) => {
|
deleteEcgdata: async (id: number) => {
|
||||||
return await request.delete({ url: `/system/ecgdata/delete?id=` + id })
|
return await request.delete({ url: `/system/ecgdata/delete?id=` + id })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导出心电数据采集 Excel
|
// 导出心电数据采集 Excel
|
||||||
exportEcgdata: async (params) => {
|
exportEcgdata: async (params) => {
|
||||||
return await request.download({ url: `/system/ecgdata/export-excel`, params })
|
return await request.download({ url: `/system/ecgdata/export-excel`, params })
|
||||||
},
|
},
|
||||||
}
|
|
||||||
|
// 根据用户ID查询心电采集时间列表
|
||||||
|
getEcgdataByUserId: async (userId: number) => {
|
||||||
|
return await request.get({ url: `/system/ecgdata/getByUserId?userId=` + userId })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 根据时间&ID查询心电数据
|
||||||
|
getEcgdataByTime: async (collecttime: Date, userId: number) => {
|
||||||
|
return await request.get({ url: `/system/ecgdata/getByTime?collecttime=` + collecttime + `&userId=` + userId })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -13,14 +13,9 @@
|
|||||||
<!-- 左侧人员列表 -->
|
<!-- 左侧人员列表 -->
|
||||||
<div class="person-list">
|
<div class="person-list">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<template #header>
|
|
||||||
<div class="card-header">
|
|
||||||
<span>人员列表</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
placeholder="搜索人员"
|
placeholder="请输入姓名&ID"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
@ -32,35 +27,101 @@
|
|||||||
<el-menu-item
|
<el-menu-item
|
||||||
v-for="person in filteredPersonList"
|
v-for="person in filteredPersonList"
|
||||||
:key="person.id"
|
:key="person.id"
|
||||||
:index="person.id"
|
:index="person.id.toString()"
|
||||||
>
|
>
|
||||||
<span>{{ person.name }}</span>
|
<span>{{ person.username }} (ID: {{ person.userid }})</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 中间时间列表 -->
|
||||||
|
<div class="time-list">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div class="time-list-header">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateFilter"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择采集日期"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
:clearable="true"
|
||||||
|
@change="handleDateFilter"
|
||||||
|
style="width: 100%; margin-bottom: 10px;"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<el-scrollbar height="400px">
|
||||||
|
<el-menu
|
||||||
|
:default-active="activeTime"
|
||||||
|
@select="handleTimeSelect"
|
||||||
|
>
|
||||||
|
<el-menu-item
|
||||||
|
v-for="(time, index) in filteredTimeList"
|
||||||
|
:key="index"
|
||||||
|
:index="index.toString()"
|
||||||
|
>
|
||||||
|
<span>{{ formatTime(time.collecttime) }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
<div v-if="filteredTimeList.length === 0" class="no-time-data">
|
||||||
|
暂无采集时间
|
||||||
|
</div>
|
||||||
|
</el-menu>
|
||||||
|
</el-scrollbar>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 右侧数据展示区域 -->
|
<!-- 右侧数据展示区域 -->
|
||||||
<div class="data-display">
|
<div class="data-display">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<template #header>
|
<div class="ecg-data-content">
|
||||||
<div class="card-header">
|
<div class="no-selection" v-if="!selectedPerson">
|
||||||
<span>心电数据</span>
|
请从左侧选择人员查看数据
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<div v-if="selectedPerson" class="ecg-data-content">
|
|
||||||
<!-- 这里将展示选中人员的心电数据 -->
|
|
||||||
<div class="no-data" v-if="!hasData">
|
|
||||||
暂无数据
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<!-- 心电数据展示区域 -->
|
<div class="no-data" v-if="!hasData">
|
||||||
|
暂无数据
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<el-tabs v-model="activeTab" class="ecg-tabs">
|
||||||
|
<el-tab-pane label="基础数据" name="basic">
|
||||||
|
<div class="ecg-fields-container">
|
||||||
|
<div class="ecg-grid">
|
||||||
|
<div
|
||||||
|
v-for="field in basicFields"
|
||||||
|
:key="field.key"
|
||||||
|
class="ecg-grid-item">
|
||||||
|
<div class="ecg-field-content">
|
||||||
|
<span class="ecg-label">{{ field.label }}</span>
|
||||||
|
<span class="ecg-value">{{ selectedPersonData && selectedPersonData[field.key] !== undefined ? selectedPersonData[field.key] : '-' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="心电图" name="ecg">
|
||||||
|
<div class="ecg-image-container">
|
||||||
|
<template v-if="selectedPersonData && selectedPersonData.ecgimageurl">
|
||||||
|
<el-image
|
||||||
|
:src="selectedPersonData.ecgimageurl"
|
||||||
|
:preview-src-list="[selectedPersonData.ecgimageurl]"
|
||||||
|
fit="contain"
|
||||||
|
class="ecg-image"
|
||||||
|
:preview-teleported="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-empty description="暂无心电图" />
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<div v-if="selectedPersonData && selectedPersonData.diagnosis" style="margin-top: 20px;">
|
||||||
|
心电图诊断:{{ selectedPersonData.diagnosis }}
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="no-selection">
|
|
||||||
请从左侧选择人员查看数据
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -68,6 +129,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { DeviceuserApi } from '@/api/deviceuser'
|
||||||
|
import { EcgdataApi } from '@/api/ecgdata'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ECGDatas',
|
name: 'ECGDatas',
|
||||||
data() {
|
data() {
|
||||||
@ -79,20 +143,73 @@ export default {
|
|||||||
hasData: false,
|
hasData: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
currentDeviceId: '',
|
currentDeviceId: '',
|
||||||
currentDeviceName: ''
|
currentDeviceName: '',
|
||||||
|
selectedPersonData: null, // 新增:存储选中人员的心电数据
|
||||||
|
activeTab: 'basic', // 新增:当前激活的标签页
|
||||||
|
basicFields: [
|
||||||
|
{ key: 'heartrate', label: '心率(次/分)' },
|
||||||
|
{ key: 'rhythm', label: '心律类型' },
|
||||||
|
{ key: 'printerval', label: 'PR间期(ms)' },
|
||||||
|
{ key: 'qrsduration', label: 'QRS时限(ms)' },
|
||||||
|
{ key: 'qtinterval', label: 'QT间期(ms)' },
|
||||||
|
{ key: 'qtcinterval', label: 'QTc间期(ms)' },
|
||||||
|
{ key: 'paxis', label: 'P电轴(度)' },
|
||||||
|
{ key: 'qrsaxis', label: 'QRS电轴(度)' },
|
||||||
|
{ key: 'taxis', label: 'T电轴(度)' },
|
||||||
|
{ key: 'rv5', label: 'RV5电压(mV)' },
|
||||||
|
{ key: 'sv1', label: 'SV1电压(mV)' },
|
||||||
|
{ key: 'rv5sv1', label: 'RV5+SV1电压(mV)' },
|
||||||
|
{ key: 'stsegment', label: 'ST段改变' },
|
||||||
|
{ key: 'twave', label: 'T波改变' }
|
||||||
|
],
|
||||||
|
ecgFields: [ // 修改:心电图字段映射
|
||||||
|
{ key: 'paxis', label: 'P电轴(度)' },
|
||||||
|
{ key: 'qrsaxis', label: 'QRS电轴(度)' },
|
||||||
|
{ key: 'taxis', label: 'T电轴(度)' },
|
||||||
|
{ key: 'rv5', label: 'RV5电压(mV)' },
|
||||||
|
{ key: 'sv1', label: 'SV1电压(mV)' },
|
||||||
|
{ key: 'rv5sv1', label: 'RV5+SV1电压(mV)' },
|
||||||
|
{ key: 'stsegment', label: 'ST段改变' },
|
||||||
|
{ key: 'twave', label: 'T波改变' },
|
||||||
|
{ key: 'diagnosis', label: '心电图诊断' }
|
||||||
|
],
|
||||||
|
timeList: [], // 新增:时间列表
|
||||||
|
activeTime: '', // 新增:当前激活的时间
|
||||||
|
dateFilter: null, // 新增:日期筛选值
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
filteredPersonList() {
|
filteredPersonList() {
|
||||||
if (!this.searchQuery) return this.personList
|
if (!this.searchQuery) return this.personList
|
||||||
return this.personList.filter(person =>
|
return this.personList.filter(person =>
|
||||||
person.name.toLowerCase().includes(this.searchQuery.toLowerCase())
|
person.username.toLowerCase().includes(this.searchQuery.toLowerCase())
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
// 新增:根据日期筛选时间列表
|
||||||
|
filteredTimeList() {
|
||||||
|
if (!this.dateFilter) return this.timeList
|
||||||
|
return this.timeList.filter(time => {
|
||||||
|
const timeDate = new Date(time.collecttime).toISOString().split('T')[0]
|
||||||
|
return timeDate === this.dateFilter
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 打开组件
|
// 打开组件
|
||||||
open(deviceId, deviceName) {
|
open(deviceId, deviceName) {
|
||||||
|
// 重置所有数据
|
||||||
|
this.searchQuery = ''
|
||||||
|
this.activePerson = ''
|
||||||
|
this.selectedPerson = null
|
||||||
|
this.personList = []
|
||||||
|
this.hasData = false
|
||||||
|
this.selectedPersonData = null
|
||||||
|
this.activeTab = 'basic'
|
||||||
|
this.activeTime = ''
|
||||||
|
this.timeList = []
|
||||||
|
this.dateFilter = null // 重置日期筛选
|
||||||
|
|
||||||
|
// 打开对话框并设置设备信息
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.currentDeviceId = deviceId
|
this.currentDeviceId = deviceId
|
||||||
this.currentDeviceName = deviceName
|
this.currentDeviceName = deviceName
|
||||||
@ -101,9 +218,8 @@ export default {
|
|||||||
// 加载人员列表
|
// 加载人员列表
|
||||||
async loadPersonList() {
|
async loadPersonList() {
|
||||||
try {
|
try {
|
||||||
// TODO: 实现从后端获取人员列表
|
const response = await DeviceuserApi.getDeviceuserByDeviceId(this.currentDeviceId)
|
||||||
// const response = await this.$api.getPersonList(this.currentDeviceId)
|
this.personList = response
|
||||||
// this.personList = response.data
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取人员列表失败:', error)
|
console.error('获取人员列表失败:', error)
|
||||||
this.$message.error('获取人员列表失败')
|
this.$message.error('获取人员列表失败')
|
||||||
@ -111,19 +227,46 @@ export default {
|
|||||||
},
|
},
|
||||||
handlePersonSelect(index) {
|
handlePersonSelect(index) {
|
||||||
this.activePerson = index
|
this.activePerson = index
|
||||||
this.selectedPerson = this.personList.find(person => person.id === index)
|
this.selectedPerson = this.personList.find(person => person.id.toString() === index)
|
||||||
|
// 重置时间列表
|
||||||
|
this.timeList = []
|
||||||
this.loadPersonData()
|
this.loadPersonData()
|
||||||
|
// 重置数据展示状态
|
||||||
|
this.selectedPersonData = null
|
||||||
|
this.hasData = false
|
||||||
|
this.activeTime = ''
|
||||||
},
|
},
|
||||||
async loadPersonData() {
|
async loadPersonData() {
|
||||||
try {
|
try {
|
||||||
// TODO: 实现从后端获取心电数据
|
const response = await EcgdataApi.getEcgdataByUserId(this.selectedPerson.userid)
|
||||||
// const response = await this.$api.getECGData(this.selectedPerson.id)
|
this.timeList = Array.isArray(response) ? response : [response]
|
||||||
// this.hasData = response.data.length > 0
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取心电数据失败:', error)
|
console.error('获取心电数据失败:', error)
|
||||||
this.$message.error('获取数据失败')
|
this.$message.error('获取数据失败')
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
async handleTimeSelect(index) {
|
||||||
|
this.activeTime = index
|
||||||
|
const selectedTime = this.timeList[parseInt(index)]
|
||||||
|
try {
|
||||||
|
const response = await EcgdataApi.getEcgdataByTime(selectedTime.collecttime, this.selectedPerson.userid)
|
||||||
|
this.selectedPersonData = response
|
||||||
|
this.hasData = !!this.selectedPersonData
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取指定时间的心电数据失败:', error)
|
||||||
|
this.$message.error('获取数据失败')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formatTime(timestamp) {
|
||||||
|
const date = new Date(timestamp)
|
||||||
|
return date.toLocaleString()
|
||||||
|
},
|
||||||
|
// 新增:处理日期筛选
|
||||||
|
handleDateFilter() {
|
||||||
|
this.activeTime = ''
|
||||||
|
this.selectedPersonData = null
|
||||||
|
this.hasData = false
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -150,6 +293,41 @@ export default {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.time-list {
|
||||||
|
width: 280px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-list :deep(.el-card__body) {
|
||||||
|
padding: 0;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-list-header {
|
||||||
|
padding: 15px;
|
||||||
|
border-bottom: 1px solid #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-title {
|
||||||
|
font-weight: 500;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-list :deep(.el-scrollbar__wrap) {
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-list :deep(.el-menu) {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-list :deep(.el-menu-item) {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
.data-display {
|
.data-display {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@ -182,4 +360,90 @@ export default {
|
|||||||
.el-scrollbar {
|
.el-scrollbar {
|
||||||
height: calc(100vh - 400px) !important;
|
height: calc(100vh - 400px) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ecg-fields-container {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
gap: 15px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-grid-item {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 12px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
min-width: 0; /* 防止内容溢出 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-grid-item:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-field-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-label {
|
||||||
|
color: #606266;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-value {
|
||||||
|
color: #303133;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-tabs {
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-tabs :deep(.el-tabs__header) {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-tabs :deep(.el-tabs__nav-wrap::after) {
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-image-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecg-image {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 400px;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0,0,0,0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-ecg-image {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-time-data {
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: #909399;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -165,8 +165,8 @@ const handleAction = (action) => {
|
|||||||
// 打开心电数据组件
|
// 打开心电数据组件
|
||||||
emit('action', {
|
emit('action', {
|
||||||
action: 'openECGData',
|
action: 'openECGData',
|
||||||
deviceId: props.deviceInfo.id,
|
deviceId: props.deviceInfo.devicecode,
|
||||||
deviceName: props.deviceInfo.name
|
deviceName: props.deviceInfo.devicename
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
emit('action', {
|
emit('action', {
|
||||||
|
@ -165,15 +165,12 @@ const openForm = (type: string) => {
|
|||||||
|
|
||||||
// 处理设备操作
|
// 处理设备操作
|
||||||
const handleDeviceAction = (action: any) => {
|
const handleDeviceAction = (action: any) => {
|
||||||
console.log('设备操作:', action)
|
|
||||||
if (action.action === 'details') {
|
if (action.action === 'details') {
|
||||||
// 打开表单并加载设备数据
|
// 打开表单并加载设备数据
|
||||||
detailsFormRef.value?.open(action.deviceId)
|
detailsFormRef.value?.open(action.deviceId)
|
||||||
} else if (action.action === 'openECGData') {
|
} else if (action.action === 'openECGData') {
|
||||||
// 打开心电数据组件
|
// 打开心电数据组件
|
||||||
ecgDataRef.value?.open(action.deviceId, action.deviceName)
|
ecgDataRef.value?.open(action.deviceId, action.deviceName)
|
||||||
} else {
|
|
||||||
console.log('设备操作:', action)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,12 +177,13 @@ import { dateFormatter } from '@/utils/formatTime'
|
|||||||
import PersonForm from './PersonFrom.vue'
|
import PersonForm from './PersonFrom.vue'
|
||||||
import PersonMember from './Personmember.vue'
|
import PersonMember from './Personmember.vue'
|
||||||
import { PersonApi, PersonVO } from '@/api/person'
|
import { PersonApi, PersonVO } from '@/api/person'
|
||||||
|
import { getUserProfile } from '@/api/system/user/profile'
|
||||||
|
|
||||||
defineOptions({ name: 'FamilyMember' })
|
defineOptions({ name: 'FamilyMember' })
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
const userProfile = ref()
|
||||||
const loading = ref(false) // 列表的加载中
|
const loading = ref(false) // 列表的加载中
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
const list = ref<PersonVO[]>([]) // 列表的数据
|
const list = ref<PersonVO[]>([]) // 列表的数据
|
||||||
@ -210,6 +211,9 @@ const queryFormRef = ref() // 搜索的表单
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
|
//首先获取用户信息
|
||||||
|
const userProfile = await getUserProfile()
|
||||||
|
queryParams.orgid = userProfile.dept.id
|
||||||
const data = await PersonApi.getPersonPage(queryParams)
|
const data = await PersonApi.getPersonPage(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
|
@ -100,13 +100,14 @@ import { dateFormatter } from '@/utils/formatTime'
|
|||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { PersonArchiveApi, PersonArchiveVO } from '@/api/personarchive'
|
import { PersonArchiveApi, PersonArchiveVO } from '@/api/personarchive'
|
||||||
import PersonArchiveForm from './PersonArchiveForm.vue'
|
import PersonArchiveForm from './PersonArchiveForm.vue'
|
||||||
|
import { getUserProfile } from '@/api/system/user/profile'
|
||||||
|
|
||||||
/** 人员档案 列表 */
|
/** 人员档案 列表 */
|
||||||
defineOptions({ name: 'PersonArchive' })
|
defineOptions({ name: 'PersonArchive' })
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
const userProfile = ref()
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const list = ref<PersonArchiveVO[]>([]) // 列表的数据
|
const list = ref<PersonArchiveVO[]>([]) // 列表的数据
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
@ -155,6 +156,9 @@ const exportLoading = ref(false) // 导出的加载中
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
|
//首先获取用户信息
|
||||||
|
const userProfile = await getUserProfile()
|
||||||
|
queryParams.orgid = userProfile.dept.id
|
||||||
const data = await PersonArchiveApi.getPersonArchivePage(queryParams)
|
const data = await PersonArchiveApi.getPersonArchivePage(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
|
Loading…
Reference in New Issue
Block a user