fix: 健康档案,修改内容。
This commit is contained in:
@@ -82,7 +82,7 @@ function logout() {
|
||||
})
|
||||
.then(() => {
|
||||
userStore.logOut().then(() => {
|
||||
location.href = '/intc/index'
|
||||
location.href = '/health/index'
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
|
||||
@@ -179,7 +179,7 @@ export const dynamicRoutes = [
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory('/intc/'),
|
||||
history: createWebHistory('/health/'),
|
||||
routes: constantRoutes,
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
if (savedPosition) {
|
||||
|
||||
@@ -92,7 +92,7 @@ service.interceptors.response.use(
|
||||
useUserStore()
|
||||
.logOut()
|
||||
.then(() => {
|
||||
location.href = '/intc/index'
|
||||
location.href = '/health/index'
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<el-form-item label="大夫" prop="doctor">
|
||||
<el-input v-model="queryParams.doctor" placeholder="请输入大夫" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊时间" prop="visitingTime">
|
||||
<el-date-picker clearable v-model="queryParams.visitingTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择就诊时间"> </el-date-picker>
|
||||
<el-form-item label="就诊时间" prop="time">
|
||||
<el-date-picker v-model="queryParams.time" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="search-btn-con">
|
||||
@@ -106,6 +106,7 @@
|
||||
import { listDoctorRecord, getDoctorRecord, delDoctorRecord, addDoctorRecord, updateDoctorRecord } from '@/api/health/doctorRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import { listHealthRecord } from '@/api/health/healthRecord'
|
||||
import dayjs from 'dayjs'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { require } from '@/utils/require'
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -135,7 +136,7 @@ const data = reactive({
|
||||
departments: null,
|
||||
doctor: null,
|
||||
healthRecordId: null,
|
||||
visitingTime: null,
|
||||
time: '',
|
||||
personId: null
|
||||
},
|
||||
queryPersonParams: {
|
||||
@@ -189,6 +190,15 @@ const handlePersonChange = (personId) => {
|
||||
/** 查询就医记录列表 */
|
||||
function getList() {
|
||||
loading.value = true
|
||||
const timeRange = queryParams.value.time
|
||||
let st = ''
|
||||
let et = ''
|
||||
if (timeRange && timeRange.length === 2) {
|
||||
st = dayjs(timeRange[0]).format('YYYY-MM-DD')
|
||||
et = dayjs(timeRange[1]).format('YYYY-MM-DD')
|
||||
}
|
||||
queryParams.value.startTime = st
|
||||
queryParams.value.endTime = et
|
||||
listDoctorRecord(queryParams.value).then((response) => {
|
||||
doctorRecordList.value = response.rows
|
||||
total.value = response.total
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
<el-option v-for="dict in health_record_state" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发生时间" prop="time">
|
||||
<el-date-picker v-model="queryParams.time" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="search-btn-con">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
@@ -103,7 +106,7 @@
|
||||
<el-date-picker clearable v-model="form.occurTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择发生时间"> </el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="发生原因" prop="etiology">
|
||||
<el-select v-model="form.etiology" placeholder="请选择类型">
|
||||
<el-select v-model="form.etiology" placeholder="请选择发生原因">
|
||||
<el-option v-for="dict in etiology" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -132,17 +135,142 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog :title="detailTitle" v-model="detailOpen" width="1150px" append-to-body>
|
||||
<el-radio-group v-model="activeName" style="margin-bottom: 20px">
|
||||
<el-radio-button label="first">基本信息</el-radio-button>
|
||||
<el-radio-button label="second">就医信息</el-radio-button>
|
||||
<el-radio-button label="third">用药记录</el-radio-button>
|
||||
<el-radio-button label="fourth">体温记录</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div v-if="activeName === 'first'" class="basic-information">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<span class="title">人员姓名:</span><span class="content">{{ basicInformation.personName }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="title">档案名称:</span><span class="content">{{ basicInformation.name }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="title">类型:</span>
|
||||
<span class="content"><dict-tag style="display: inline" :options="record_type" :value="basicInformation.type" /></span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<span class="title">档案状态:</span>
|
||||
<span class="content"><dict-tag style="display: inline" :options="health_record_state" :value="basicInformation.state" /></span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="title">发生时间:</span><span class="content">{{ basicInformation.occurTime }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="title">发生原因:</span>
|
||||
<span class="content"><dict-tag style="display: inline" :options="etiology" :value="basicInformation.etiology" /></span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<span class="title">康复时间:</span><span class="content">{{ basicInformation.rehabilitationTime }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<span class="title">初期症状:</span><span class="content">{{ basicInformation.initialSymptoms }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<span class="title">中期症状:</span><span class="content">{{ basicInformation.mediumTermSymptoms }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<span class="title">后期症状:</span><span class="content">{{ basicInformation.laterStageSymptoms }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<span class="title">备注:</span><span class="content">{{ basicInformation.remark }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="activeName === 'second'" class="basic-information">
|
||||
<div class="main-con">
|
||||
<div class="content-con">
|
||||
<el-table v-loading="doctorRecordLoading" :data="doctorRecordList">
|
||||
<el-table-column label="医院名称" align="center" prop="hospitalName" />
|
||||
<el-table-column label="科室" align="center" prop="departments" />
|
||||
<el-table-column label="大夫" align="center" prop="doctor" />
|
||||
<el-table-column label="就诊时间" align="center" prop="visitingTime" width="180"> </el-table-column>
|
||||
<el-table-column label="诊断及开药" align="center" prop="prescribe" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="activeName === 'third'" class="basic-information">
|
||||
<div class="main-con">
|
||||
<div class="content-con">
|
||||
<el-table v-loading="marRecordLoading" :data="marRecordList">
|
||||
<el-table-column label="用药名称" align="center" prop="name" />
|
||||
<el-table-column label="用药类型" align="center" prop="type">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="mar_type" :value="scope.row.type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="药品来源" align="center" prop="resource">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="mar_resource" :value="scope.row.resource" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用药地点" align="center" prop="place">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="mar_place" :value="scope.row.place" />
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="用药时间" align="center" prop="dosingTime" width="180"> </el-table-column>
|
||||
<el-table-column label="用药剂量" align="center" prop="dosage" />
|
||||
</el-table>
|
||||
<el-pagination small background layout="total, prev, pager, next" :total="marTotal" @current-change="handleMarCurrentChange" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="activeName === 'fourth'" class="basic-information">
|
||||
<div class="main-con">
|
||||
<div class="content-con">
|
||||
<el-table v-loading="temperatureRecordLoading" :data="temperatureRecordList">
|
||||
<el-table-column label="测量时间" align="center" prop="measureTime" />
|
||||
<el-table-column label="体温(℃)" align="center" prop="temperature">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.temperature < 37" style="color: #37b328">{{ scope.row.temperature }}</span>
|
||||
<span v-else-if="scope.row.temperature >= 37 && scope.row.temperature < 37.5" style="color: #ff00ff">{{ scope.row.temperature }}</span>
|
||||
<span v-else-if="scope.row.temperature >= 37.5 && scope.row.temperature < 38.5" style="color: #ff0066">{{ scope.row.temperature }}</span>
|
||||
<span v-else-if="scope.row.temperature >= 38.5 && scope.row.temperature < 39.5" style="color: #ff0000">{{ scope.row.temperature }}</span>
|
||||
<span v-else-if="scope.row.temperature >= 39.5" style="color: #990000">{{ scope.row.temperature }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination small background layout="total, prev, pager, next" :total="tempTotal" @current-change="handleTempCurrentChange" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer> </template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="HealthRecord">
|
||||
import { listHealthRecord, getHealthRecord, delHealthRecord, addHealthRecord, updateHealthRecord } from '@/api/health/healthRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import { listTemperatureRecord } from '@/api/health/temperatureRecord'
|
||||
import { listMarRecord } from '@/api/health/marRecord'
|
||||
import { listDoctorRecord } from '@/api/health/doctorRecord'
|
||||
import dayjs from 'dayjs'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { require } from '@/utils/require'
|
||||
import { nextTick, reactive, toRefs } from 'vue'
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { record_type, etiology, health_record_state } = proxy.useDict('record_type', 'etiology', 'health_record_state')
|
||||
|
||||
const { mar_type, mar_place, mar_resource } = proxy.useDict('mar_type', 'mar_place', 'mar_resource')
|
||||
const healthRecordList = ref([])
|
||||
const open = ref(false)
|
||||
const loading = ref(true)
|
||||
@@ -153,6 +281,23 @@ const multiple = ref(true)
|
||||
const total = ref(0)
|
||||
const title = ref('')
|
||||
const personList = ref([])
|
||||
|
||||
const detailTitle = ref('')
|
||||
const detailOpen = ref(false)
|
||||
const basicInformation = ref(null)
|
||||
const activeName = ref('first')
|
||||
const currentId = ref('')
|
||||
const marRecordLoading = ref(false)
|
||||
const marRecordList = ref([])
|
||||
const marTotal = ref(0)
|
||||
|
||||
const temperatureRecordLoading = ref(false)
|
||||
const temperatureRecordList = ref([])
|
||||
const tempTotal = ref(0)
|
||||
|
||||
const doctorRecordLoading = ref(false)
|
||||
const doctorRecordList = ref([])
|
||||
|
||||
const operateList = ref([
|
||||
{ id: 'view', icon: 'View', title: '查看', hasPermi: ['health:healthRecord:query'] },
|
||||
{ id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['health:healthRecord:edit'] },
|
||||
@@ -165,10 +310,26 @@ const data = reactive({
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
type: null,
|
||||
time: '',
|
||||
etiology: null,
|
||||
personId: null,
|
||||
state: null
|
||||
},
|
||||
queryMarRecordParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
healthRecordId: null
|
||||
},
|
||||
queryDoctorRecordParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
healthRecordId: null
|
||||
},
|
||||
queryTemperatureRecordParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
healthRecordId: null
|
||||
},
|
||||
queryPersonParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 1000
|
||||
@@ -179,7 +340,7 @@ const data = reactive({
|
||||
occurTime: [{ required: true, message: '发生时间不能为空', trigger: 'blur' }],
|
||||
initialSymptoms: [{ required: true, message: '初期症状不能为空', trigger: 'blur' }],
|
||||
etiology: [{ required: true, message: '发生原因不能为空', trigger: 'blur' }],
|
||||
personId: [{ required: true, message: '人员id不能为空', trigger: 'blur' }],
|
||||
personId: [{ required: true, message: '人员姓名不能为空', trigger: 'blur' }],
|
||||
state: [{ required: true, message: '档案状态不能为空', trigger: 'blur' }]
|
||||
}
|
||||
})
|
||||
@@ -200,17 +361,36 @@ const handleOperate = (operate, row) => {
|
||||
}
|
||||
}
|
||||
|
||||
const { queryParams, form, rules, queryPersonParams } = toRefs(data)
|
||||
const { queryParams, form, rules, queryPersonParams, queryMarRecordParams, queryTemperatureRecordParams, queryDoctorRecordParams } = toRefs(data)
|
||||
|
||||
const handlePersonChange = (personId) => {
|
||||
getPerson(personId).then((response) => {
|
||||
form.value.name = response.data.name
|
||||
const date = new Date()
|
||||
const year = date.getFullYear() // 年份
|
||||
let month = date.getMonth() + 1 // 月份,返回值为0-11,所以需要加1
|
||||
let day = date.getDate() // 日期
|
||||
|
||||
// 对月份和日期进行补零
|
||||
month = month < 10 ? '0' + month : month.toString()
|
||||
day = day < 10 ? '0' + day : day.toString()
|
||||
|
||||
const currentDate = year + month + day
|
||||
form.value.name = response.data.name + currentDate + '档案'
|
||||
})
|
||||
}
|
||||
|
||||
/** 查询健康档案列表 */
|
||||
function getList() {
|
||||
loading.value = true
|
||||
const timeRange = queryParams.value.time
|
||||
let st = ''
|
||||
let et = ''
|
||||
if (timeRange && timeRange.length === 2) {
|
||||
st = dayjs(timeRange[0]).format('YYYY-MM-DD')
|
||||
et = dayjs(timeRange[1]).format('YYYY-MM-DD')
|
||||
}
|
||||
queryParams.value.startTime = st
|
||||
queryParams.value.endTime = et
|
||||
listHealthRecord(queryParams.value).then((response) => {
|
||||
healthRecordList.value = response.rows
|
||||
total.value = response.total
|
||||
@@ -264,12 +444,30 @@ function resetQuery() {
|
||||
proxy.resetForm('queryRef')
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
// 分页
|
||||
const handleCurrentChange = (val) => {
|
||||
queryParams.value.pageNum = val
|
||||
getList()
|
||||
}
|
||||
// 分页
|
||||
const handleTempCurrentChange = (val) => {
|
||||
queryTemperatureRecordParams.value.pageNum = val
|
||||
// 体温记录
|
||||
listTemperatureRecord(queryTemperatureRecordParams.value).then((res) => {
|
||||
temperatureRecordList.value = res.rows
|
||||
tempTotal.value = res.total
|
||||
})
|
||||
}
|
||||
|
||||
// 分页
|
||||
const handleMarCurrentChange = (val) => {
|
||||
queryMarRecordParams.value.pageNum = val
|
||||
// 用药记录
|
||||
listMarRecord(queryMarRecordParams.value).then((res) => {
|
||||
marRecordList.value = res.rows
|
||||
marTotal.value = res.total
|
||||
})
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
@@ -280,9 +478,31 @@ function handleSelectionChange(selection) {
|
||||
|
||||
// 查看
|
||||
const handleView = (row) => {
|
||||
title.value = '查看健康档案'
|
||||
form.value = row
|
||||
open.value = true
|
||||
const _id = row.id || ids.value
|
||||
currentId.value = _id
|
||||
activeName.value = 'first'
|
||||
getHealthRecord(_id).then((response) => {
|
||||
basicInformation.value = response.data
|
||||
detailOpen.value = true
|
||||
detailTitle.value = '查看健康档案'
|
||||
})
|
||||
queryMarRecordParams.value.healthRecordId = _id
|
||||
queryTemperatureRecordParams.value.healthRecordId = _id
|
||||
queryDoctorRecordParams.value.healthRecordId = _id
|
||||
// 体温记录
|
||||
listTemperatureRecord(queryMarRecordParams.value).then((res) => {
|
||||
temperatureRecordList.value = res.rows
|
||||
tempTotal.value = res.total
|
||||
})
|
||||
//用药记录
|
||||
listMarRecord(queryMarRecordParams.value).then((res) => {
|
||||
marRecordList.value = res.rows
|
||||
marTotal.value = res.total
|
||||
})
|
||||
// 就医记录
|
||||
listDoctorRecord(queryDoctorRecordParams.value).then((res) => {
|
||||
doctorRecordList.value = res.rows
|
||||
})
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
<el-option v-for="dict in mar_place" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用药时间" prop="dosingTime">
|
||||
<el-date-picker clearable v-model="queryParams.dosingTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择用药时间"> </el-date-picker>
|
||||
<el-form-item label="用药时间" prop="time">
|
||||
<el-date-picker v-model="queryParams.time" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="search-btn-con">
|
||||
@@ -135,6 +135,7 @@
|
||||
import { listMarRecord, getMarRecord, delMarRecord, addMarRecord, updateMarRecord } from '@/api/health/marRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import { listHealthRecord } from '@/api/health/healthRecord'
|
||||
import dayjs from 'dayjs'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { require } from '@/utils/require'
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -164,7 +165,7 @@ const data = reactive({
|
||||
name: null,
|
||||
type: null,
|
||||
healthRecordId: null,
|
||||
dosingTime: null,
|
||||
time: '',
|
||||
dosage: null,
|
||||
personId: null,
|
||||
resource: null,
|
||||
@@ -226,6 +227,15 @@ function getPersonList() {
|
||||
/** 查询用药记录列表 */
|
||||
function getList() {
|
||||
loading.value = true
|
||||
const timeRange = queryParams.value.time
|
||||
let st = ''
|
||||
let et = ''
|
||||
if (timeRange && timeRange.length === 2) {
|
||||
st = dayjs(timeRange[0]).format('YYYY-MM-DD')
|
||||
et = dayjs(timeRange[1]).format('YYYY-MM-DD')
|
||||
}
|
||||
queryParams.value.startTime = st
|
||||
queryParams.value.endTime = et
|
||||
listMarRecord(queryParams.value).then((response) => {
|
||||
marRecordList.value = response.rows
|
||||
total.value = response.total
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<el-option v-for="person in personList" :key="person.id" :label="person.name" :value="person.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量时间" prop="measureTime">
|
||||
<el-date-picker clearable v-model="queryParams.measureTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择测量时间"> </el-date-picker>
|
||||
<el-form-item label="测量时间" prop="time">
|
||||
<el-date-picker v-model="queryParams.time" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="search-btn-con">
|
||||
@@ -32,8 +32,15 @@
|
||||
<el-table-column label="人员姓名" align="center" prop="personName" />
|
||||
<el-table-column label="健康档案" align="center" prop="healthRecordName" />
|
||||
<el-table-column label="测量时间" align="center" prop="measureTime" width="180"> </el-table-column>
|
||||
<el-table-column label="体温(℃)" align="center" prop="temperature" />
|
||||
|
||||
<el-table-column label="体温(℃)" align="center" prop="temperature">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.temperature < 37" style="color: #37b328">{{ scope.row.temperature }}</span>
|
||||
<span v-else-if="scope.row.temperature >= 37 && scope.row.temperature < 37.5" style="color: #ff00ff">{{ scope.row.temperature }}</span>
|
||||
<span v-else-if="scope.row.temperature >= 37.5 && scope.row.temperature < 38.5" style="color: #ff0066">{{ scope.row.temperature }}</span>
|
||||
<span v-else-if="scope.row.temperature >= 38.5 && scope.row.temperature < 39.5" style="color: #ff0000">{{ scope.row.temperature }}</span>
|
||||
<span v-else-if="scope.row.temperature >= 39.5" style="color: #990000">{{ scope.row.temperature }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<div class="ctrl-btn d-flex">
|
||||
@@ -93,6 +100,7 @@ import {
|
||||
} from '@/api/health/temperatureRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import { listHealthRecord } from '@/api/health/healthRecord'
|
||||
import dayjs from 'dayjs'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { require } from '@/utils/require'
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -119,7 +127,7 @@ const data = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
healthRecordId: null,
|
||||
measureTime: null,
|
||||
time: '',
|
||||
temperature: null,
|
||||
personId: null
|
||||
},
|
||||
@@ -175,6 +183,15 @@ function getPersonList() {
|
||||
/** 查询体温记录列表 */
|
||||
function getList() {
|
||||
loading.value = true
|
||||
const timeRange = queryParams.value.time
|
||||
let st = ''
|
||||
let et = ''
|
||||
if (timeRange && timeRange.length === 2) {
|
||||
st = dayjs(timeRange[0]).format('YYYY-MM-DD')
|
||||
et = dayjs(timeRange[1]).format('YYYY-MM-DD')
|
||||
}
|
||||
queryParams.value.startTime = st
|
||||
queryParams.value.endTime = et
|
||||
listTemperatureRecord(queryParams.value).then((response) => {
|
||||
temperatureRecordList.value = response.rows
|
||||
total.value = response.total
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<el-option v-for="person in personList" :key="person.id" :label="person.name" :value="person.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量时间" prop="measureTime">
|
||||
<el-date-picker clearable v-model="queryParams.measureTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择测量时间"> </el-date-picker>
|
||||
<el-form-item label="测量时间" prop="time">
|
||||
<el-date-picker v-model="queryParams.time" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="search-btn-con">
|
||||
@@ -77,6 +77,7 @@
|
||||
<script setup name="WeightRecord">
|
||||
import { listWeightRecord, getWeightRecord, delWeightRecord, addWeightRecord, updateWeightRecord } from '@/api/health/weightRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import dayjs from 'dayjs'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { require } from '@/utils/require'
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -101,6 +102,7 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: '',
|
||||
personId: null
|
||||
},
|
||||
queryPersonParams: {
|
||||
@@ -142,6 +144,15 @@ function getPersonList() {
|
||||
/** 查询体重记录列表 */
|
||||
function getList() {
|
||||
loading.value = true
|
||||
const timeRange = queryParams.value.time
|
||||
let st = ''
|
||||
let et = ''
|
||||
if (timeRange && timeRange.length === 2) {
|
||||
st = dayjs(timeRange[0]).format('YYYY-MM-DD')
|
||||
et = dayjs(timeRange[1]).format('YYYY-MM-DD')
|
||||
}
|
||||
queryParams.value.startTime = st
|
||||
queryParams.value.endTime = et
|
||||
listWeightRecord(queryParams.value).then((response) => {
|
||||
weightRecordList.value = response.rows
|
||||
total.value = response.total
|
||||
|
||||
Reference in New Issue
Block a user