fix: 健康管理系统,功能优化及完善。

This commit is contained in:
tianyongbao
2024-12-16 15:14:23 +08:00
parent 8a8771519f
commit ba7e2c9b7f
5 changed files with 82 additions and 55 deletions

View File

@@ -65,7 +65,7 @@ export const constantRoutes = [
{ {
path: '', path: '',
component: Layout, component: Layout,
redirect: '/health/healthRecord' redirect: '/healthAnalysis'
// children: [ // children: [
// { // {
// path: '/index', // path: '/index',

View File

@@ -33,17 +33,23 @@
<el-table v-loading="loading" :data="activityList" @selection-change="handleSelectionChange" height="calc(100% - 0.65rem)"> <el-table v-loading="loading" :data="activityList" @selection-change="handleSelectionChange" height="calc(100% - 0.65rem)">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="活动名称" align="center" prop="name" /> <el-table-column label="活动名称" align="center" prop="name" />
<el-table-column label="类型" align="center" prop="type"> <el-table-column label="类型" width="100" align="center" prop="type">
<template #default="scope"> <template #default="scope">
<dict-tag :options="activity_type" :value="scope.row.type" /> <dict-tag :options="activity_type" :value="scope.row.type" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="活动地点" align="center" prop="place" /> <el-table-column label="活动地点" align="center" prop="place" />
<el-table-column label="开始时间" align="center" prop="startTime" width="180"> </el-table-column> <el-table-column label="开始时间" align="center" prop="startTime" width="160"> </el-table-column>
<el-table-column label="结束时间" align="center" prop="endTime" width="180"> </el-table-column> <el-table-column label="结束时间" align="center" prop="endTime" width="160"> </el-table-column>
<el-table-column label="活动量" width="100" align="center" prop="activityVolume">
<template #default="scope">
<dict-tag :options="activity_exercise" :value="scope.row.activityVolume" />
</template>
</el-table-column>
<el-table-column label="活动时长" align="center" prop="exerciseTimeStr" width="150"> </el-table-column>
<el-table-column label="成员" align="center" prop="partner" /> <el-table-column label="成员" align="center" prop="partner" />
<el-table-column label="总费用(元)" align="center" prop="totalCost" /> <el-table-column label="总费用(元)" width="100" align="center" prop="totalCost" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" width="140" align="center" class-name="small-padding fixed-width">
<template v-slot="scope"> <template v-slot="scope">
<div class="ctrl-btn d-flex"> <div class="ctrl-btn d-flex">
<el-tooltip v-for="item in operateList" :key="item.id" class="item" effect="dark" :content="item.title" placement="top"> <el-tooltip v-for="item in operateList" :key="item.id" class="item" effect="dark" :content="item.title" placement="top">
@@ -79,22 +85,24 @@
<el-form-item label="结束时间" prop="endTime"> <el-form-item label="结束时间" prop="endTime">
<el-date-picker clearable v-model="form.endTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间"> </el-date-picker> <el-date-picker clearable v-model="form.endTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间"> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="活动时长" prop="exerciseTime"> <!-- <el-form-item label="活动时长" prop="exerciseTime">
<el-input v-model="form.exerciseTime" placeholder="请输入活动时长" /> <el-input v-model="form.exerciseTime" placeholder="请输入活动时长" />
</el-form-item> </el-form-item> -->
<el-form-item label="活动量" prop="activityVolume"> <el-form-item label="活动量" prop="activityVolume">
<el-input v-model="form.activityVolume" placeholder="请输入活动量" /> <el-select v-model="form.activityVolume" placeholder="请选择活动量">
<el-option v-for="dict in activity_exercise" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="总费用" style="width: 792px" prop="totalCost"> <el-form-item label="总费用" prop="totalCost">
<el-input v-model="form.totalCost" type="number" placeholder="请输入总费用"> <el-input v-model="form.totalCost" type="number" placeholder="请输入总费用">
<template #suffix></template> <template #suffix></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="费用明细" style="width: 792px" prop="costDetail"> <el-form-item label="费用明细" style="width: 792px" prop="costDetail">
<el-input v-model="form.costDetail" placeholder="请输入费用明细" /> <el-input v-model="form.costDetail" type="textarea" placeholder="请输入费用明细" />
</el-form-item> </el-form-item>
<el-form-item label="饮食" style="width: 792px" prop="foods"> <el-form-item label="饮食" style="width: 792px" prop="foods">
<el-input v-model="form.foods" placeholder="请输入饮食" /> <el-input v-model="form.foods" type="textarea" placeholder="请输入饮食" />
</el-form-item> </el-form-item>
<el-form-item label="收获" style="width: 792px" prop="harvest"> <el-form-item label="收获" style="width: 792px" prop="harvest">
<el-input v-model="form.harvest" type="textarea" placeholder="请输入收获" /> <el-input v-model="form.harvest" type="textarea" placeholder="请输入收获" />
@@ -118,7 +126,7 @@ import { listActivity, getActivity, delActivity, addActivity, updateActivity } f
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import { require } from '@/utils/require' import { require } from '@/utils/require'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const { activity_type } = proxy.useDict('activity_type') const { activity_type, activity_exercise } = proxy.useDict('activity_type', 'activity_exercise')
const activityList = ref([]) const activityList = ref([])
const open = ref(false) const open = ref(false)

View File

@@ -56,7 +56,7 @@
<el-table-column label="陪同人" align="center" width="120" prop="partner" /> <el-table-column label="陪同人" align="center" width="120" prop="partner" />
<el-table-column label="就诊时间" align="center" prop="visitingTime" width="160"> </el-table-column> <el-table-column label="就诊时间" align="center" prop="visitingTime" width="160"> </el-table-column>
<el-table-column label="总费用(元)" align="center" width="120" prop="totalCost" /> <el-table-column label="总费用(元)" align="center" width="120" prop="totalCost" />
<el-table-column label="诊断及开药" align="center" prop="prescribe" /> <el-table-column label="诊断结果" align="center" prop="diagnosis" />
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
<template v-slot="scope"> <template v-slot="scope">
<div class="ctrl-btn d-flex"> <div class="ctrl-btn d-flex">
@@ -104,17 +104,21 @@
<el-form-item label="陪同人" prop="partner"> <el-form-item label="陪同人" prop="partner">
<el-input v-model="form.partner" placeholder="请输入陪同人" /> <el-input v-model="form.partner" placeholder="请输入陪同人" />
</el-form-item> </el-form-item>
<el-form-item label="总费用" prop="totalCost">
<el-form-item label="总费用" style="width: 792px" prop="totalCost">
<el-input v-model="form.totalCost" type="number" placeholder="请输入总费用"> <el-input v-model="form.totalCost" type="number" placeholder="请输入总费用">
<template #suffix></template> <template #suffix></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="诊断及开药" style="width: 792px" prop="prescribe"> <el-form-item label="诊断结果" style="width: 792px" prop="diagnosis">
<el-input v-model="form.prescribe" type="textarea" placeholder="请输入诊断及开药" /> <el-input v-model="form.diagnosis" placeholder="请输入诊断结果" />
</el-form-item> </el-form-item>
<!-- <el-form-item label="费用明细" style="width: 792px" prop="costDetail"> <el-form-item label="处理及医嘱" style="width: 792px" prop="prescribe">
<el-input v-model="form.prescribe" type="textarea" placeholder="请输入处理及医嘱" />
</el-form-item>
<el-form-item label="费用明细" style="width: 792px" prop="costDetail">
<el-input v-model="form.costDetail" type="textarea" placeholder="请输入费用明细" /> <el-input v-model="form.costDetail" type="textarea" placeholder="请输入费用明细" />
</el-form-item> --> </el-form-item>
<el-form-item label="备注" style="width: 792px" prop="remark"> <el-form-item label="备注" style="width: 792px" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
@@ -329,7 +333,8 @@ const data = reactive({
totalCost: [{ required: true, message: '总费用不能为空', trigger: 'blur' }], totalCost: [{ required: true, message: '总费用不能为空', trigger: 'blur' }],
healthRecordId: [{ required: true, message: '健康档案不能为空', trigger: 'blur' }], healthRecordId: [{ required: true, message: '健康档案不能为空', trigger: 'blur' }],
visitingTime: [{ required: true, message: '就诊时间不能为空', trigger: 'blur' }], visitingTime: [{ required: true, message: '就诊时间不能为空', trigger: 'blur' }],
prescribe: [{ required: true, message: '诊断及开药不能为空', trigger: 'blur' }] prescribe: [{ required: true, message: '处理及医嘱不能为空', trigger: 'blur' }],
diagnosis: [{ required: true, message: '诊断结果不能为空', trigger: 'blur' }]
}, },
rulesDetail: { rulesDetail: {
doctorRecordId: [{ required: true, message: '费用id不能为空', trigger: 'blur' }], doctorRecordId: [{ required: true, message: '费用id不能为空', trigger: 'blur' }],

View File

@@ -54,12 +54,14 @@
<dict-tag :options="record_type" :value="scope.row.type" /> <dict-tag :options="record_type" :value="scope.row.type" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="档案状态" align="center" width="120" prop="state"> <el-table-column label="档案状态" align="center" width="100" prop="state">
<template #default="scope"> <template #default="scope">
<dict-tag :options="health_record_state" :value="scope.row.state" /> <dict-tag :options="health_record_state" :value="scope.row.state" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发生时间" align="center" prop="occurTime" width="160"> </el-table-column> <el-table-column label="发生时间" align="center" prop="occurTime" width="160"> </el-table-column>
<el-table-column label="康复时间" align="center" prop="rehabilitationTime" width="160"> </el-table-column>
<el-table-column label="持续时间" align="center" prop="duration" width="160"> </el-table-column>
<el-table-column label="发生原因" align="center" width="120" prop="etiology"> <el-table-column label="发生原因" align="center" width="120" prop="etiology">
<template #default="scope"> <template #default="scope">
<dict-tag :options="etiology" :value="scope.row.etiology" /> <dict-tag :options="etiology" :value="scope.row.etiology" />
@@ -139,7 +141,7 @@
<el-radio-group v-model="activeName" style="margin-bottom: 20px"> <el-radio-group v-model="activeName" style="margin-bottom: 20px">
<el-radio-button label="first">基本信息</el-radio-button> <el-radio-button label="first">基本信息</el-radio-button>
<el-radio-button label="second">就医记录</el-radio-button> <el-radio-button label="second">就医记录</el-radio-button>
<el-radio-button label="third">用药明细</el-radio-button> <el-radio-button label="third">过程记录</el-radio-button>
<el-radio-button label="marStatic">用药统计</el-radio-button> <el-radio-button label="marStatic">用药统计</el-radio-button>
<el-radio-button label="fourth">体温记录</el-radio-button> <el-radio-button label="fourth">体温记录</el-radio-button>
</el-radio-group> </el-radio-group>
@@ -217,10 +219,11 @@
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="药品名称" align="center" prop="time" /> <el-table-column label="药品名称" align="center" prop="medicalName" />
<el-table-column label="用药次数" align="center" prop="value" /> <el-table-column label="用药天数" width="150" align="center" prop="useDays" />
<el-table-column label="用药总量" align="center" prop="dosage" /> <el-table-column label="用药次数" width="150" align="center" prop="count" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="用药总量" width="150" align="center" prop="dosage" />
<el-table-column label="单位" width="150" align="center" prop="unit" />
</el-table> </el-table>
</div> </div>
</div> </div>
@@ -228,18 +231,9 @@
<div v-if="activeName === 'third'" class="basic-information"> <div v-if="activeName === 'third'" class="basic-information">
<div class="main-con"> <div class="main-con">
<div class="content-con"> <div class="content-con">
<el-table v-loading="marRecordLoading" :data="mar.tableMarList"> <el-table v-loading="processRecordLoading" :data="processRecordList">
<el-table-column label="序号" width="50" type="index" align="center"> <el-table-column label="记录时间" align="center" prop="createTime" width="180"> </el-table-column>
<template #default="scope"> <el-table-column label="记录内容" align="center" prop="content" />
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="用药日期" width="400" align="center" prop="time" />
<el-table-column prop="detail" label="用药明细">
<template #default="scope">
<span v-html="formatMultiLineData(scope.row.detail)"></span>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
@@ -277,6 +271,7 @@ import { listHealthRecord, getHealthRecord, delHealthRecord, addHealthRecord, up
import { listPerson, getPerson } from '@/api/health/person' import { listPerson, getPerson } from '@/api/health/person'
import { listTemperatureRecord } from '@/api/health/temperatureRecord' import { listTemperatureRecord } from '@/api/health/temperatureRecord'
import { listMarRecord } from '@/api/health/marRecord' import { listMarRecord } from '@/api/health/marRecord'
import { listProcessRecord } from '@/api/health/processRecord'
import { getMarAnalysis, getTemperatureAnalysis } from '@/api/health/statisticAnalysis' import { getMarAnalysis, getTemperatureAnalysis } from '@/api/health/statisticAnalysis'
import { listDoctorRecord } from '@/api/health/doctorRecord' import { listDoctorRecord } from '@/api/health/doctorRecord'
import dayjs from 'dayjs' import dayjs from 'dayjs'
@@ -314,6 +309,9 @@ const temp = ref({})
const doctorRecordLoading = ref(false) const doctorRecordLoading = ref(false)
const doctorRecordList = ref([]) const doctorRecordList = ref([])
const processRecordLoading = ref(false)
const processRecordList = ref([])
const operateList = ref([ const operateList = ref([
{ id: 'view', icon: 'View', title: '查看', hasPermi: ['health:healthRecord:query'] }, { id: 'view', icon: 'View', title: '查看', hasPermi: ['health:healthRecord:query'] },
{ id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['health:healthRecord:edit'] }, { id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['health:healthRecord:edit'] },
@@ -333,17 +331,17 @@ const data = reactive({
}, },
queryMarRecordParams: { queryMarRecordParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 100,
healthRecordId: null healthRecordId: null
}, },
queryDoctorRecordParams: { queryDoctorRecordParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 100,
healthRecordId: null healthRecordId: null
}, },
queryTemperatureRecordParams: { queryTemperatureRecordParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 100,
healthRecordId: null healthRecordId: null
}, },
queryPersonParams: { queryPersonParams: {
@@ -533,6 +531,10 @@ const handleView = (row) => {
listDoctorRecord(queryDoctorRecordParams.value).then((res) => { listDoctorRecord(queryDoctorRecordParams.value).then((res) => {
doctorRecordList.value = res.rows doctorRecordList.value = res.rows
}) })
// 过程记录
listProcessRecord(queryDoctorRecordParams.value).then((res) => {
processRecordList.value = res.rows
})
} }
/** 新增按钮操作 */ /** 新增按钮操作 */

View File

@@ -56,6 +56,18 @@
</div> </div>
<div class="main-con" style="height: calc(100% - 1.45rem)"> <div class="main-con" style="height: calc(100% - 1.45rem)">
<div class="summary-con" style="height: 115px"> <div class="summary-con" style="height: 115px">
<div class="right-con" v-show="mar.marCategoryCount > 0">
<div class="img">
<img src="@/assets/images/average.png" alt="" />
</div>
<div class="item-wrap">
<div class="title">用药天数</div>
<div>
<span class="num">{{ mar.marDays }}</span
><span class="unit"></span>
</div>
</div>
</div>
<div class="right-con" v-show="mar.marCategoryCount > 0"> <div class="right-con" v-show="mar.marCategoryCount > 0">
<div class="img"> <div class="img">
<img src="@/assets/images/average.png" alt="" /> <img src="@/assets/images/average.png" alt="" />
@@ -105,18 +117,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="right-con" v-show="mar.wuhua > 0">
<div class="img">
<img src="@/assets/images/average.png" alt="" />
</div>
<div class="item-wrap">
<div class="title">雾化消炎</div>
<div>
<span class="num">{{ mar.wuhua }}</span
><span class="unit"></span>
</div>
</div>
</div>
<div class="right-con" v-show="mar.kangjun > 0"> <div class="right-con" v-show="mar.kangjun > 0">
<div class="img"> <div class="img">
<img src="@/assets/images/average.png" alt="" /> <img src="@/assets/images/average.png" alt="" />
@@ -130,6 +130,18 @@
</div> </div>
</div> </div>
<div class="summary-con" v-show="mar.kangguomin > 0 || mar.kangbingdu > 0 || mar.tuishao > 0 || mar.biyan > 0 || mar.changdao > 0" style="height: 115px"> <div class="summary-con" v-show="mar.kangguomin > 0 || mar.kangbingdu > 0 || mar.tuishao > 0 || mar.biyan > 0 || mar.changdao > 0" style="height: 115px">
<div class="right-con" v-show="mar.wuhua > 0">
<div class="img">
<img src="@/assets/images/average.png" alt="" />
</div>
<div class="item-wrap">
<div class="title">雾化消炎</div>
<div>
<span class="num">{{ mar.wuhua }}</span
><span class="unit"></span>
</div>
</div>
</div>
<div class="right-con" v-show="mar.kangguomin > 0"> <div class="right-con" v-show="mar.kangguomin > 0">
<div class="img"> <div class="img">
<img src="@/assets/images/average.png" alt="" /> <img src="@/assets/images/average.png" alt="" />
@@ -187,7 +199,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="right-con" v-show="mar.mianyili > 0"> <!-- <div class="right-con" v-show="mar.mianyili > 0">
<div class="img"> <div class="img">
<img src="@/assets/images/average.png" alt="" /> <img src="@/assets/images/average.png" alt="" />
</div> </div>
@@ -197,7 +209,7 @@
<span class="num">{{ mar.mianyili }}</span> <span class="unit"></span> <span class="num">{{ mar.mianyili }}</span> <span class="unit"></span>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="title-con" style="margin-top: 18px"> <div class="title-con" style="margin-top: 18px">
<div class="title">用药统计</div> <div class="title">用药统计</div>