fix: 健康档案,修改内容。

This commit is contained in:
tianyongbao
2024-09-26 23:31:39 +08:00
parent 730d72591e
commit 2f2f40a437
9 changed files with 296 additions and 28 deletions

View File

@@ -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