fix: 健康管理系统,自测问题修复及功能优化完善。

This commit is contained in:
tianyongbao
2024-12-20 15:48:05 +08:00
parent 775ab0b222
commit 0f75162f6b
24 changed files with 3200 additions and 171 deletions

View File

@@ -15,3 +15,29 @@ export function getTemperatureAnalysis(query) {
params: query
})
}
export function getHealthAnalysis(query) {
return request({
url: '/health/analysis/healthAnalysis',
method: 'get',
params: query
})
}
export function getRecordAnalysis(query) {
return request({
url: '/health/analysis/recordAnalysis',
method: 'get',
params: query
})
}
export function getDoctorAnalysis(query) {
return request({
url: '/health/analysis/doctorAnalysis',
method: 'get',
params: query
})
}

View File

@@ -195,6 +195,30 @@
"style": {
"navigationBarTitleText": "活动记录"
}
} ,
{
"path": "pages/health/statistic/doctorStatistic/index",
"style": {
"navigationBarTitleText": "就医统计"
}
} ,
{
"path": "pages/health/statistic/healthStatistic/index",
"style": {
"navigationBarTitleText": "档案统计"
}
} ,
{
"path": "pages/health/statistic/marStatistic/index",
"style": {
"navigationBarTitleText": "用药统计"
}
} ,
{
"path": "pages/health/statistic/temperatureStatistic/index",
"style": {
"navigationBarTitleText": "体温统计"
}
}
],
"subPackages": [

View File

@@ -36,13 +36,14 @@
<u--input v-model="form.endTime" disabled disabledColor="#ffffff" placeholder="请选择结束时间" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="活动时长" prop="exerciseTime" >
<!-- <u-form-item label="活动时长" prop="exerciseTime" >
<u--input v-model="form.exerciseTime" placeholder="请填写活动时长"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="活动量" prop="activityVolume" >
<u--input v-model="form.activityVolume" placeholder="请填写活动量"
</u-form-item> -->
<u-form-item label="活动量" prop="activityVolumeName" required @click="handleActivityVolume">
<u--input v-model="form.activityVolumeName" disabled disabledColor="#ffffff" placeholder="请选择活动量"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="总费用" prop="totalCost" >
<u--input v-model="form.totalCost" type="number" placeholder="请填写总费用"
@@ -78,6 +79,8 @@
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showType" :columns="typeList" keyName="dictLabel" @cancel="handleTypeCancel"
@confirm="handleTypeConfirm"></u-picker>
<u-picker itemHeight="88" :show="showActivityVolume" :columns="activityVolumeList" keyName="dictLabel" @cancel="handleActivityVolumeCancel"
@confirm="handleActivityVolumeConfirm"></u-picker>
<u-datetime-picker
:show="startTimeShow"
mode="datetime"
@@ -110,8 +113,13 @@ const birthdayShow = ref(false)
const title = ref("活动记录")
const startTimeShow = ref(false)
const endTimeShow = ref(false)
const typeList = ref([])
const showType = ref(false)
const activityVolumeList = ref([])
const showActivityVolume = ref(false)
const data = reactive({
form: {
id: null,
@@ -130,7 +138,7 @@ form: {
updateTime: null,
delFlag: null,
remark: null,
totalCost: null,
totalCost: 0,
partner: null,
costDetail: null
},
@@ -140,8 +148,7 @@ rules: {
partner: [{ required: true, message: '成员不能为空', trigger: ['change', 'blur'] }],
startTime: [{ required: true, message: '开始时间不能为空', trigger: ['change', 'blur'] }],
endTime: [{ required: true, message: '结束时间不能为空', trigger: ['change', 'blur'] }],
exerciseTime: [{ required: true, message: '活动时长不能为空', trigger: ['change', 'blur'] }],
activityVolume: [{ required: true, message: '活动量不能为空', trigger: ['change', 'blur'] }],
activityVolumeName: [{ required: true, message: '活动不能为空', trigger: ['change', 'blur'] }],
typeName: [{ required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
}
})
@@ -190,6 +197,10 @@ function getData() {
// 类型
getDicts('activity_type').then(res => {
typeList.value =[res.data]
})
// 类型
getDicts('activity_exercise').then(res => {
activityVolumeList.value =[res.data]
})
if(form.value.id!=null){
getActivity(form.value.id).then(res => {
@@ -197,6 +208,10 @@ function getData() {
// 类型
getDicts('activity_type').then(result => {
form.value.typeName=dictStr(form.value.type, result.data)
})
// 类型
getDicts('activity_exercise').then(result => {
form.value.activityVolumeName=dictStr(form.value.activityVolume, result.data)
})
})
}
@@ -221,6 +236,24 @@ function getData() {
showType.value = false
}
function handleActivityVolume() {
if (activityVolumeList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '活动量为空 ', type: 'warning'
})
} else {
showActivityVolume.value = true
}
}
function handleActivityVolumeConfirm(e) {
form.value.activityVolumeName = e.value[0].dictLabel
form.value.activityVolume = e.value[0].dictValue
showActivityVolume.value = false
}
function handleActivityVolumeCancel() {
showActivityVolume.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {

View File

@@ -14,7 +14,7 @@
<view class="list-item">
<view class="item-header">
<u--text lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="dictStr(item.type,typeList) +':在'+item.place+'活动'+item.exerciseTime" size="30rpx" color="#333333" :bold="true"></u--text>
:text="dictStr(item.type,typeList) +'- 在 '+item.place+' 活动 '+item.exerciseTimeStr" size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">活动名称</text>
@@ -38,11 +38,11 @@
</view> -->
<view class="item-row">
<text class="row-label">活动量</text>
<text class="row-value">{{ item.activityVolume }}</text>
<text class="row-value">{{dictStr(item.activityVolume,activityVolumeList) }}</text>
</view>
<view class="item-row">
<text class="row-label">总费用</text>
<text class="row-value">{{ item.totalCost }}</text>
<text class="row-label">总费用</text>
<text class="row-value">{{ item.totalCost+' 元' }}</text>
</view>
<view class="item-row">
<text class="row-label">费用明细</text>
@@ -89,6 +89,8 @@ const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const typeList = ref([])
const activityVolumeList = ref([])
const flag= ref(true)
const data = reactive({
@@ -141,6 +143,10 @@ function getList() {
// 类型
getDicts('activity_type').then(res => {
typeList.value = res.data
})
// 类型
getDicts('activity_exercise').then(res => {
activityVolumeList.value = res.data
})
status.value = 'loading'
listActivity({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {

View File

@@ -46,11 +46,8 @@
<u--input v-model="form.partner" placeholder="请填写陪同人"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="诊断及开药" prop="prescribe" labelPosition="top">
<u--textarea v-model="form.prescribe" placeholder="请填写诊断及开药" border="none" autoHeight inputAlign="right" count
maxlength="2000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
<u-form-item label="总费用" prop="totalCost" required >
<u-form-item label="总费用" prop="totalCost" required >
<u--input v-model="form.totalCost" placeholder="请填写总费用"
inputAlign="right" border="none">
<template #suffix>
@@ -59,7 +56,15 @@
></up-text>
</template></u--input>
</u-form-item>
<u-form-item label="费用明细" prop="costDetail" required >
<u-form-item label="诊断结果" prop="diagnosis" required labelPosition="top">
<u--textarea v-model="form.diagnosis" placeholder="请填写诊断结果" border="none" autoHeight inputAlign="right" count
maxlength="2000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
<u-form-item label="处理及医嘱" prop="prescribe" required labelPosition="top">
<u--textarea v-model="form.prescribe" placeholder="请填写处理及医嘱" border="none" autoHeight inputAlign="right" count
maxlength="2000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
<u-form-item label="费用明细" prop="costDetail" >
<u--textarea v-model="form.costDetail" placeholder="请填写费用明细" border="none" autoHeight inputAlign="right" count
maxlength="2000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
@@ -126,7 +131,7 @@ form: {
visitingTime: null,
prescribe: null,
personId: null,
totalCost: null,
totalCost: 0,
partner: null,
costDetail: null
},
@@ -148,7 +153,8 @@ rules: {
doctor: [{ required: true, message: '大夫不能为空', trigger: ['change', 'blur'] }],
totalCost: [{ type: 'number', required: true, message: '总费用不能为空', trigger: ['change', 'blur'] }],
partner: [{ required: true, message: '陪同人不能为空', trigger: ['change', 'blur'] }],
prescribe: [{ required: true, message: '诊断及开药不能为空', trigger: ['change', 'blur'] }],
prescribe: [{ required: true, message: '处理及医嘱不能为空', trigger: ['change', 'blur'] }],
diagnosis: [{ required: true, message: '诊断结果不能为空', trigger: ['change', 'blur'] }],
typeName: [{ required: true, message: '就医类型不能为空', trigger: ['change', 'blur'] }],
visitingTime: [{ required: true, message: '就诊时间不能为空', trigger: ['change', 'blur'] }]
}

View File

@@ -1,17 +1,22 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<view class="search-view">
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
<view class="search-view">
<u-input v-model="queryParams.healthRecordName" border="false" type="select" @click="handleHealthRecord" placeholder="请选择健康档案" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择就诊时间" suffixIcon="calendar"
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择就诊日期" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
@@ -22,7 +27,7 @@
<view class="filter-panel-content">
<view class="select-header">就诊时间</view>
<view class="select-header">就诊日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -58,7 +63,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -99,8 +104,8 @@
<text class="row-value">{{ item.partner }}</text>
</view>
<view class="item-row">
<text class="row-label">总费用</text>
<text class="row-value">{{ item.totalCost }}</text>
<text class="row-label">总费用</text>
<text class="row-value">{{ item.totalCost +' 元'}}</text>
</view>
<view class="item-row">
<text class="row-label">诊断及开药</text>
@@ -129,6 +134,8 @@
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
@confirm="handlePersonConfirm"></u-picker>
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handleHealthRecordCancel"
@confirm="handleHealthRecordConfirm"></u-picker>
</view>
<!--返回首页按钮 -->
<suspend></suspend>
@@ -137,6 +144,7 @@
<script setup>
import { listDoctorRecord, delDoctorRecord } from '@/api/health/doctorRecord'
import { listPerson } from '@/api/health/person'
import { listHealthRecord } from '@/api/health/healthRecord'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
@@ -153,6 +161,9 @@ const timeShow= ref(false)
const showPerson = ref(false)
const personList = ref([])
const showHealthRecord = ref(false)
const healthRecordList = ref([])
const typeList = ref([])
const flag= ref(true)
@@ -170,14 +181,19 @@ const data = reactive({
healthRecordId: null,
time: '',
personId: null
}
},
queryHealthRecordParams: {
pageNum: 1,
personId:null,
pageSize: 1000
}
})
const { filterPanel, queryPersonParams, queryParams} = toRefs(data)
const { filterPanel, queryPersonParams,queryHealthRecordParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getList()
getData()
});
onShow(() => {
@@ -208,13 +224,15 @@ function loadmore() {
getList()
}
}
function getList() {
// 类型
getDicts('doctor_type').then(res => {
function getData() {
// 类型
getDicts('doctor_type').then(res => {
typeList.value = res.data
})
listPerson(queryPersonParams.value).then((response) => {
personList.value = [response.rows]
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
})
status.value = 'loading'
listDoctorRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
@@ -227,7 +245,22 @@ function getList() {
}).catch(() => {
status.value = 'nomore'
})
})
}
function getList() {
status.value = 'loading'
listDoctorRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
if (listData.value.length < res.total) {
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
status.value = 'nomore'
})
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
@@ -268,24 +301,58 @@ function settingCancel() {
function handlePersonConfirm(e) {
queryParams.value.personName = e.value[0].name
queryParams.value.personId= e.value[0].id
showPerson.value = false
queryParams.value.healthRecordName = ''
queryParams.value.healthRecordId = ''
queryHealthRecordParams.value.personId=e.value[0].id
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
})
}
function handlePersonCancel() {
queryParams.value.personName = ''
queryParams.value.personId = ''
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleHealthRecord() {
if (healthRecordList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '健康档案为空 ', type: 'warning'
})
} else {
showHealthRecord.value = true
}
}
function handleHealthRecordConfirm(e) {
queryParams.value.healthRecordName = e.value[0].name
queryParams.value.healthRecordId = e.value[0].id
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handlePersonCancel() {
showPerson.value = false
}
function searchBlur() {
pageNum.value = 1
function handleHealthRecordCancel() {
queryParams.value.healthRecordName= ''
queryParams.value.healthRecordId = ''
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
}
function resetQuery() {
queryParams.value.personName = ''
queryParams.value.startTime = ''
queryParams.value.time = ''
queryParams.value.healthRecordName= ''
queryParams.value.healthRecordId = ''
queryParams.value.endTime = ''
queryParams.value.personId = ''
}
@@ -310,8 +377,7 @@ function settingCancel() {
}
}
});
}
}
</script>
<style lang="scss" scoped>

View File

@@ -11,7 +11,7 @@
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择发生时间" suffixIcon="calendar"
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择发生日期" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
@@ -25,7 +25,7 @@
<view v-for="item in typeList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectType(item)">{{ item.dictLabel }}</view>
</view>
<view class="select-header">发生时间</view>
<view class="select-header">发生日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -61,7 +61,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -97,6 +97,10 @@
<text class="row-label">康复时间</text>
<text class="row-value">{{ item.rehabilitationTime }}</text>
</view>
<view class="item-row">
<text class="row-label">康复周期</text>
<text class="row-value">{{ item.duration }}</text>
</view>
<view class="item-row">
<text class="row-label">发生原因</text>
<text class="row-value">{{ dictStr(item.etiology, etiologyList) }}</text>
@@ -315,6 +319,7 @@ function settingCancel() {
queryParams.value.endTime = ''
queryParams.value.personId = ''
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/health/healthRecord/details?id=${item.id}` })

View File

@@ -11,7 +11,7 @@
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择测量时间" suffixIcon="calendar"
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择测量日期" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
@@ -20,7 +20,7 @@
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="select-header">测量时间</view>
<view class="select-header">测量日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -56,7 +56,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"

View File

@@ -9,83 +9,254 @@
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">成员数</div>
<div class="num">3<span></span></div>
<div class="title">成员</div>
<div class="num">{{ personCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">档案数量</div>
<div class="num">5<span></span></div>
<div class="num">{{ healthRecordCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">活动次数</div>
<div class="num">{{ activityCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">活动费用</div>
<div class="num">{{ activityCost }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">就医医院</div>
<div class="num">{{ hospitalCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">就诊大夫</div>
<div class="num">{{ doctorTotalCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">就医次数</div>
<div class="num">8<span></span></div>
<div class="num">{{ doctorCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">就医费用</div>
<div class="num">{{ doctorCost }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">用药天数</div>
<div class="num">{{ marDayCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">用药次数</div>
<div class="num">100<span></span></div>
<div class="num">{{ marCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">用药种类</div>
<div class="num">{{ medicalTypeCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">测量体温次数</div>
<div class="num">{{ temperatureTotalCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">发烧天数>=37</div>
<div class="num">{{ feverDayCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">低烧36.9~37.5</div>
<div class="num">{{ lowerTempCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">中烧37.5~38.5</div>
<div class="num">{{ middleTempCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">高烧>=38.5</div>
<div class="num">{{ higherTempCount }}<span></span></div>
</div>
</div>
</div>
<div v-for="(item, index) in personList" :key="index">
<div class="header-title" ref="searchHeightRef">&nbsp;&nbsp;&nbsp;&nbsp;{{ item.personName + '-健康档案概览' }}</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">档案数量</div>
<div class="num">{{ item.healthRecordCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">就医医院</div>
<div class="num">{{ item.hospitalCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../..//assets/one.png" alt="" />
<div class="info-sum">
<div class="title">就诊大夫</div>
<div class="num">{{ item.doctorTotalCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">就医次数</div>
<div class="num">{{ item.doctorCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">就医费用</div>
<div class="num">{{ item.doctorCost }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">用药天数</div>
<div class="num">{{ item.marDayCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../..//assets/one.png" alt="" />
<div class="info-sum">
<div class="title">用药次数</div>
<div class="num">{{ item.marCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">发烧天数>=37</div>
<div class="num">{{ item.feverDayCount }}<span></span></div>
</div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">体温记录</div>
<div class="num">88<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">体重身高记录</div>
<div class="num">100<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="../../assets/one.png" alt="" />
<div class="info-sum">
<div class="title">活动记录</div>
<div class="num">8<span></span></div>
</div>
</div>
<div class="item">
<img src="../../assets/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">药品数量</div>
<div class="num">10<span></span></div>
</div>
</div>
</div>
<div></div>
</div>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import { getHealthAnalysis } from '@/api/health/statisticAnalysis.js'
import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
//信息
const personCount = ref(0) //成员总数
const healthRecordCount = ref(0) //健康档案总数
const activityCount = ref(0) //活动总数
const activityCost = ref(0) //活动费用
const doctorCount = ref(0) //就医总数
const doctorCost = ref(0) //就医费用
const hospitalCount = ref(0) //医院总数
const doctorTotalCount = ref(0) //医生总数
const marDayCount = ref(0) //用药天数
const marCount = ref(0) //用药次数
const medicalTypeCount = ref(0) //用药类别
const feverDayCount = ref(0) //发烧天数
const temperatureTotalCount = ref(0) //体温测量次数
const lowerTempCount = ref(0) //低烧次数
const middleTempCount = ref(0) //中烧次数
const higherTempCount = ref(0) //高烧次数
const personList = ref([]) //人员记录
const getHealthAnalysisData = () => {
getHealthAnalysis().then((res) => {
personCount.value = res.data.personCount
healthRecordCount.value = res.data.healthRecordCount
activityCount.value = res.data.activityCount
activityCost.value = res.data.activityCost
doctorCount.value = res.data.doctorCount
doctorCost.value = res.data.doctorCost
hospitalCount.value = res.data.hospitalCount
doctorTotalCount.value = res.data.doctorTotalCount
marCount.value = res.data.marCount
feverDayCount.value = res.data.feverDayCount
marDayCount.value = res.data.marDayCount
medicalTypeCount.value = res.data.medicalTypeCount
temperatureTotalCount.value = res.data.temperatureTotalCount
lowerTempCount.value = res.data.lowerTempCount
middleTempCount.value = res.data.middleTempCount
higherTempCount.value = res.data.higherTempCount
personList.value = res.data.personList
})
}
onMounted(() => {
getHealthAnalysisData()
})
</script>

View File

@@ -14,18 +14,7 @@
</uni-grid-item>
</uni-grid>
</view>
<!-- 宫格组件 -->
<uni-section title="药品管理" v-show="auth.hasPermi('health:medicineStockIn:list')" type="line"></uni-section>
<view class="grid-body">
<uni-grid :column="4" :showBorder="false">
<uni-grid-item v-for="(item, index) in medicineGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
<view class="grid-item-box">
<uni-icons :type="item.icon" size="30"></uni-icons>
<text class="text">{{ item.text }}</text>
</view>
</uni-grid-item>
</uni-grid>
</view>
</view>
@@ -45,10 +34,7 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
{ path: '/pages/health/marRecord/list', text: '用药记录', icon: 'shop-filled', permission: 'health:marRecord:list' },
{ path: '/pages/health/temperatureRecord/list', text: '体温记录', icon: 'spinner-cycle', permission: 'health:temperatureRecord:list' },
{ path: '/pages/health/heightWeightRecord/list', text: '身高体重记录', icon: 'map-pin-ellipse', permission: 'health:heightWeightRecord:list' },
{ path: '/pages/health/activity/list', text: '活动记录', icon: 'images-filled', permission: 'health:activity:list' }
])
const medicineGridList=ref([
{ path: '/pages/health/activity/list', text: '活动记录', icon: 'images-filled', permission: 'health:activity:list' },
{ path: '/pages/health/medicineBasic/list', text: '药品基础信息', icon: 'folder-add-filled', permission: 'health:medicineBasic:list' },
{ path: '/pages/health/medicineStockIn/list', text: '药品入库清单', icon: 'arrow-down', permission: 'health:medicineStockIn:list' },
{ path: '/pages/health/medicineStock/list', text: '药品实时库存', icon: 'color', permission: 'health:medicineStockIn:list' }

View File

@@ -1,17 +1,22 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<view class="search-view">
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
<view class="search-view">
<u-input v-model="queryParams.healthRecordName" border="false" type="select" @click="handleHealthRecord" placeholder="请选择健康档案" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择用药时间" suffixIcon="calendar"
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择用药日期" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
@@ -25,7 +30,7 @@
<view v-for="item in typeList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectType(item)">{{ item.dictLabel }}</view>
</view>
<view class="select-header">用药时间</view>
<view class="select-header">用药日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -121,6 +126,8 @@
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
@confirm="handlePersonConfirm"></u-picker>
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handleHealthRecordCancel"
@confirm="handleHealthRecordConfirm"></u-picker>
</view>
<!--返回首页按钮 -->
<suspend></suspend>
@@ -128,7 +135,8 @@
<script setup>
import { listMarRecord, delMarRecord } from '@/api/health/marRecord'
import { listPerson, getPerson } from '@/api/health/person'
import { listPerson } from '@/api/health/person'
import { listHealthRecord } from '@/api/health/healthRecord'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
@@ -149,6 +157,9 @@ const resourceList = ref([])
const placeList = ref([])
const unitList = ref([])
const showHealthRecord = ref(false)
const healthRecordList = ref([])
const flag= ref(true)
const time =ref( Number(new Date()))
const data = reactive({
@@ -166,14 +177,19 @@ const data = reactive({
personId: null,
resource: null,
place: null
}
} ,
queryHealthRecordParams: {
pageNum: 1,
personId:null,
pageSize: 1000
}
})
const { filterPanel, queryPersonParams, queryParams} = toRefs(data)
const { filterPanel, queryPersonParams,queryHealthRecordParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getList()
getList()
});
onShow(() => {
@@ -216,7 +232,7 @@ function loadmore() {
getList()
}
}
function getList() {
function getList() {
listPerson(queryPersonParams.value).then((response) => {
personList.value = [response.rows]
})
@@ -289,25 +305,53 @@ function settingCancel() {
function handlePersonConfirm(e) {
queryParams.value.personName = e.value[0].name
queryParams.value.personId= e.value[0].id
showPerson.value = false
queryParams.value.healthRecordName = ''
queryParams.value.healthRecordId = ''
queryHealthRecordParams.value.personId=e.value[0].id
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
})
}
function handlePersonCancel() {
showPerson.value = false
}
function handleHealthRecord() {
if (healthRecordList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '健康档案为空 ', type: 'warning'
})
} else {
showHealthRecord.value = true
}
}
function handleHealthRecordConfirm(e) {
queryParams.value.healthRecordName = e.value[0].name
queryParams.value.healthRecordId = e.value[0].id
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleHealthRecordCancel() {
showHealthRecord.value = false
}
function searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.personName = ''
queryParams.value.healthRecordId = ''
queryParams.value.personName = ''
queryParams.value.startTime = ''
queryParams.value.time = ''
queryParams.value.healthRecordName= ''
queryParams.value.healthRecordId = ''
queryParams.value.endTime = ''
queryParams.value.personId = ''
}

View File

@@ -5,13 +5,13 @@
<u-input v-model="queryParams.keys" border="false" type="select" @click="searchBlur" placeholder="请输入名称编码品牌厂家" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
<u-icon name="plus-circle-fill" v-show="auth.hasPermi('health:medicineBasic:add')" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx" v-show="auth.hasPermi('health:medicineBasic:add')">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择创建时间" suffixIcon="calendar"
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择录入日期" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
@@ -25,7 +25,7 @@
<view v-for="item in typeList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectType(item)">{{ item.dictLabel }}</view>
</view>
<view class="select-header">创建时间</view>
<view class="select-header">录入日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -61,7 +61,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -74,7 +74,7 @@
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
<u--text suffixIcon="arrow-right" lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.shortName +'-'+ item.brand +'('+ item.packaging+')' " size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
@@ -106,10 +106,14 @@
<text class="row-label">生产厂家</text>
<text class="row-value">{{ item.manufacturers }}</text>
</view>
<view class="item-row">
<text class="row-label">录入时间</text>
<text class="row-value">{{ item.createTime }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleCopy(item)">复制</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
<view class="btn filling" v-show="auth.hasPermi('health:medicineBasic:edit')" @click="handleEdit(item)">修改</view>
<view class="btn filling" v-show="auth.hasPermi('health:medicineBasic:edit')" @click="handleCopy(item)">复制</view>
<view class="btn filling" v-show="auth.hasPermi('health:medicineBasic:remove')" @click="handleDelete(item)">删除</view>
</view>
</view>
</u-list-item>
@@ -129,6 +133,7 @@ import { listMedicineBasic, delMedicineBasic } from '@/api/health/medicineBasic'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";

View File

@@ -12,7 +12,7 @@
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.medicineName+'库存'+item.leftCount+dictStr(item.unit, unitList) " size="30rpx" color="#333333" :bold="true"></u--text>
:text="item.medicineName+' 库存 '+item.leftCount+dictStr(item.unit, unitList) " size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">规格总数</text>

View File

@@ -26,11 +26,11 @@
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="入库数量" prop="quantity" required >
<u--input v-model="form.quantity" placeholder="请填写入库数量"
<u--input v-model="form.quantity" @change="handleQuantityChange" placeholder="请填写入库数量"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="规格总数" prop="totalCount" required >
<u--input v-model="form.totalCount" placeholder="请填写规格总数"
<u--input v-model="form.totalCount" readonly placeholder="请填写规格总数"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="使用状态" prop="stateName" required @click="handleState">
@@ -257,6 +257,14 @@ function dictStr(val, arr) {
return str
}
const handleQuantityChange = (val) => {
if(form.value.medicineId!=null){
getMedicineBasic(form.value.medicineId).then((response) => {
form.value.totalCount = response.data.specifications * val
})
}
}
function selectProductionDate() {
productionDateShow.value = true
proxy.$refs['productionDateRef'].innerValue = new Date().getTime()
@@ -373,11 +381,16 @@ function handleMedicalConfirm(e) {
form.value.unitName=dictStr( response.data.unit, result.data)
})
form.value.packageUnit = response.data.packageUnit
form.value.totalCount = response.data.specifications
if (form.value.quantity != null) {
form.value.totalCount = response.data.specifications * form.value.quantity
}
// 药品来源
getDicts('package_unit').then(result => {
form.value.packageUnitName=dictStr( response.data.packageUnit, result.data)
})
})
showMedical.value = false

View File

@@ -61,7 +61,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -104,15 +104,15 @@
</view>
<view class="item-row">
<text class="row-label">规格总数</text>
<text class="row-value">{{ item.totalCount }}</text>
<text class="row-value">{{ item.totalCount +dictStr(item.unit, unitList)}}</text>
</view>
<view class="item-row">
<!-- <view class="item-row">
<text class="row-label">规格单位</text>
<text class="row-value">{{ dictStr(item.unit, unitList) }}</text>
</view>
</view> -->
<view class="item-row">
<text class="row-label">剩余数量</text>
<text class="row-value">{{ item.leftCount }}</text>
<text class="row-value">{{ item.leftCount +dictStr(item.unit, unitList)}}</text>
</view>
<view class="item-row">
<text class="row-label">备注</text>

View File

@@ -29,6 +29,15 @@
<u--input v-model="form.birthday" disabled disabledColor="#ffffff" placeholder="请选择发生时间" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="性别" prop="sexName" required @click="handleSex">
<u--input v-model="form.sexName" disabled disabledColor="#ffffff" placeholder="请选择性别"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="身份证" prop="identityCard" >
<u--input v-model="form.identityCard" placeholder="请填写身份证"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="排序" prop="ranking" >
<u--input v-model="form.ranking" type="number" placeholder="请填写排序"
inputAlign="right" border="none"></u--input>
@@ -65,6 +74,8 @@
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showType" :columns="typeList" keyName="dictLabel" @cancel="handleTypeCancel"
@confirm="handleTypeConfirm"></u-picker>
<u-picker itemHeight="88" :show="showSex" :columns="sexList" keyName="dictLabel" @cancel="handleSexCancel"
@confirm="handleSexConfirm"></u-picker>
<u-datetime-picker
:show="birthdayShow"
mode="date"
@@ -89,6 +100,10 @@ const title = ref("成员管理")
const typeList = ref([])
const showType = ref(false)
const sexList = ref([])
const showSex = ref(false)
const data = reactive({
form: {
id: null,
@@ -105,6 +120,8 @@ form: {
nickName: null,
height: null,
weight: null,
sex: null,
identityCard: null,
ranking: 0
},
rules: {
@@ -112,6 +129,7 @@ rules: {
nickName: [{ required: true, message: '昵称不能为空', trigger: ['change', 'blur'] }],
birthday: [{ required: true, message: '生日不能为空', trigger: ['change', 'blur'] }],
typeName: [{ required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
sexName: [{ required: true, message: '性别不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, rules} = toRefs(data)
@@ -127,7 +145,7 @@ onLoad((option) => {
getData()
})
onReady(() => {
form.value.birthday = dayjs(new Date().getTime()).format("YYYY-MM-DD")
// form.value.birthday = dayjs(new Date().getTime()).format("YYYY-MM-DD")
})
function dictStr(val, arr) {
let str = ''
@@ -142,6 +160,10 @@ function getData() {
// 类型
getDicts('person_type').then(res => {
typeList.value =[res.data]
})
// 类型
getDicts('sys_user_sex').then(res => {
sexList.value =[res.data]
})
if(form.value.id!=null){
getPerson(form.value.id).then(res => {
@@ -149,6 +171,10 @@ function getData() {
// 类型
getDicts('person_type').then(result => {
form.value.typeName=dictStr(form.value.type, result.data)
})
// 类型
getDicts('sys_user_sex').then(result => {
form.value.sexName=dictStr(form.value.sex, result.data)
})
})
}
@@ -173,6 +199,24 @@ function getData() {
showType.value = false
}
function handleSex() {
if (sexList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '性别为空 ', type: 'warning'
})
} else {
showSex.value = true
}
}
function handleSexConfirm(e) {
form.value.sexName = e.value[0].dictLabel
form.value.sex = e.value[0].dictValue
showSex.value = false
}
function handleSexCancel() {
showSex.value = false
}
function selectBirthday() {
birthdayShow.value = true
proxy.$refs['birthdayRef'].innerValue = new Date().getTime()

View File

@@ -14,7 +14,7 @@
<view class="list-item">
<view class="item-header">
<u--text lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.name+''+item.nickName+'-'+dictStr(item.type,typeList) +'-'+item.age" size="30rpx" color="#333333" :bold="true"></u--text>
:text="item.name+''+item.nickName+'- '+dictStr(item.sex,sexList) +' - '+dictStr(item.type,typeList) +' - '+item.age" size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<!-- <view class="item-row">
<text class="row-label">昵称</text>
@@ -28,6 +28,10 @@
<text class="row-label">生日</text>
<text class="row-value">{{ item.birthday }}</text>
</view>
<view class="item-row">
<text class="row-label">身份证</text>
<text class="row-value">{{ item.identityCard }}</text>
</view>
<!-- <view class="item-row">
<text class="row-label">年龄</text>
<text class="row-value">{{ item.age }}</text>
@@ -76,7 +80,7 @@ const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const typeList = ref([])
const sexList = ref([])
const flag= ref(true)
const data = reactive({
filterPanel: false,
@@ -129,6 +133,10 @@ function getList() {
getDicts('person_type').then(res => {
typeList.value = res.data
})
// 类型
getDicts('sys_user_sex').then(res => {
sexList.value = res.data
})
status.value = 'loading'
listPerson({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)

View File

@@ -1,17 +1,22 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<view class="search-view">
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
<view class="search-view">
<u-input v-model="queryParams.healthRecordName" border="false" type="select" @click="handleHealthRecord" placeholder="请选择健康档案" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择记录时间" suffixIcon="calendar"
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择记录日期" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
@@ -20,7 +25,7 @@
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="select-header">记录时间</view>
<view class="select-header">记录日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -56,7 +61,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -103,6 +108,8 @@
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
@confirm="handlePersonConfirm"></u-picker>
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handleHealthRecordCancel"
@confirm="handleHealthRecordConfirm"></u-picker>
</view>
<!--返回首页按钮 -->
<suspend></suspend>
@@ -110,7 +117,8 @@
<script setup>
import { listProcessRecord, delProcessRecord } from '@/api/health/processRecord'
import { listPerson, getPerson } from '@/api/health/person'
import { listPerson } from '@/api/health/person'
import { listHealthRecord } from '@/api/health/healthRecord'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
@@ -125,6 +133,10 @@ const settingColumns = ref([])
const timeShow= ref(false)
const showPerson = ref(false)
const personList = ref([])
const showHealthRecord = ref(false)
const healthRecordList = ref([])
const flag= ref(true)
const time =ref( Number(new Date()))
const data = reactive({
@@ -138,9 +150,14 @@ const data = reactive({
recordingTime: null,
temperature: null,
personId: null
}
} ,
queryHealthRecordParams: {
pageNum: 1,
personId:null,
pageSize: 1000
}
})
const { filterPanel, queryPersonParams, queryParams} = toRefs(data)
const { filterPanel, queryPersonParams,queryHealthRecordParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
@@ -169,6 +186,9 @@ function getList() {
listPerson(queryPersonParams.value).then((response) => {
personList.value = [response.rows]
})
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
})
status.value = 'loading'
listProcessRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
@@ -221,13 +241,49 @@ function settingCancel() {
function handlePersonConfirm(e) {
queryParams.value.personName = e.value[0].name
queryParams.value.personId= e.value[0].id
showPerson.value = false
queryParams.value.healthRecordName = ''
queryParams.value.healthRecordId = ''
queryHealthRecordParams.value.personId=e.value[0].id
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
})
}
function handlePersonCancel() {
queryParams.value.personName = ''
queryParams.value.personId = ''
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleHealthRecord() {
if (healthRecordList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '健康档案为空 ', type: 'warning'
})
} else {
showHealthRecord.value = true
}
}
function handleHealthRecordConfirm(e) {
queryParams.value.healthRecordName = e.value[0].name
queryParams.value.healthRecordId = e.value[0].id
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handlePersonCancel() {
showPerson.value = false
function handleHealthRecordCancel() {
queryParams.value.healthRecordName= ''
queryParams.value.healthRecordId = ''
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function searchBlur() {
pageNum.value = 1
@@ -235,12 +291,13 @@ function settingCancel() {
getList()
}
function resetQuery() {
queryParams.value.personName = ''
queryParams.value.healthRecordId = ''
queryParams.value.startTime = ''
queryParams.value.time = ''
queryParams.value.healthRecordName= ''
queryParams.value.healthRecordId = ''
queryParams.value.endTime = ''
queryParams.value.personName = ''
queryParams.value.personId = ''
}
function enterDetails(item) {

View File

@@ -0,0 +1,614 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
<view class="search-view">
<u-input v-model="queryParams.healthRecordName" border="false" type="select" @click="handleHealthRecord" placeholder="请选择健康档案" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" placeholder="请选择就医日期" border="false" type="select" readonly suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="select-header">就医日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
:disabledColor="'#fff'"
class="dateInput"
border="surround"
v-model="queryParams.startTime"
placeholder="请选择开始时间"
>
<template v-slot:suffix>
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
</template>
</u-input>
<u-input
:disabled="true"
:disabledColor="'#fff'"
class="dateInput"
border="surround"
v-model="queryParams.endTime"
placeholder="请选择结束时间"
>
<template v-slot:suffix>
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
</template>
</u-input>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
<u-datetime-picker
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
></u-datetime-picker>
</view>
</u-transition>
</view>
</u-sticky>
<div class="app-container" style="overflow: auto">
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">就医次数</div>
<div class="num">{{ doctor.doctorCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">就医费用</div>
<div class="num">{{ doctor.doctorCost }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">常去医院</div>
<div class="num">{{ doctor.commonHospital }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">常去科室</div>
<div class="num">{{ doctor.commonDepartments }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">常看大夫</div>
<div class="num">{{ doctor.commonDoctor }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">门诊次数</div>
<div class="num">{{ doctor.clinicCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">急诊次数</div>
<div class="num">{{ doctor.emergencyCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">输液次数</div>
<div class="num">{{ doctor.infusionCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">住院次数</div>
<div class="num">{{ doctor.hospitalizedCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">线上问诊次数</div>
<div class="num">{{ doctor.onlineCount }}<span></span></div>
</div>
</div>
</div>
<div></div>
</div>
<u-list :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header">
<u--text lines="2"
:text="item.hospitalName+'-'+dictStr(item.type, typeList)+'-'+item.doctor" size="30rpx" color="#333333" ></u--text>
</view>
<!-- <view class="item-row">
<text class="row-label">就医类型</text>
<text class="row-value">{{ dictStr(item.type, typeList) }}</text>
</view> -->
<!-- <view class="item-row">
<text class="row-label">就诊大夫</text>
<text class="row-value">{{item.doctor}}</text>
</view> -->
<view class="item-row">
<text class="row-label">就诊时间</text>
<text class="row-value">{{ item.visitingTime}}</text>
</view>
<view class="item-row">
<text class="row-label">诊断结果</text>
<text class="row-value">{{ item.diagnosis}}</text>
</view>
<view class="item-row">
<text class="row-label">就诊费用</text>
<text class="row-value">{{ item.totalCost+' 元'}}</text>
</view>
<view class="item-row">
<text class="row-label">处理及医嘱</text>
<text class="row-value">{{ item.prescribe}}</text>
</view>
</view>
</u-list-item>
<view>
</view>
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
@confirm="handlePersonConfirm"></u-picker>
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handleHealthRecordCancel"
@confirm="handleHealthRecordConfirm"></u-picker>
</view>
<!-- 悬停按钮返回工作台-->
<suspend></suspend>
</template>
<script setup>
import { getDoctorAnalysis } from '@/api/health/statisticAnalysis'
import { listPerson } from '@/api/health/person'
import { listHealthRecord } from '@/api/health/healthRecord'
import { getDicts } from '@/api/system/dict/data.js'
import dayjs from 'dayjs'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const personList = ref([])
const showHealthRecord = ref(false)
const healthRecordList = ref([])
const typeList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const showPerson = ref(false)
const timeShow= ref(false)
const time =ref( Number(new Date()))
const flag= ref(true)
const doctor = ref({})
const data = reactive({
filterPanel: false,
queryPersonParams: {
pageNum: 1,
pageSize: 100
},
queryParams: {
type: 1,
time: null,
dataType: null,
recordId: null,
id: null
} ,
queryHealthRecordParams: {
pageNum: 1,
personId:null,
pageSize: 1000
}
})
const { filterPanel, queryPersonParams, queryHealthRecordParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
listData.value=[]
getList()
isShow.value = false
}
});
function formatMultiLineData(data) {
if (data != null) {
return data.replace(/<br\/>/g, '')
}
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function openOrCloseDate(data) {
timeShow.value = !timeShow.value
flag.value = data
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.startTime!=undefined&&queryParams.value.endTime!=''&&queryParams.value.endTime!=undefined){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function resetQuery() {
queryParams.value.id = ''
queryParams.value.recordId = ''
queryParams.value.type = '1'
queryParams.value.startTime = ''
queryParams.value.endTime = ''
queryParams.value.time = ''
}
function getList() {
// 使用状态
getDicts('doctor_type').then(res => {
typeList.value = res.data
})
getDoctorAnalysis({...queryParams.value }).then(res => {
doctor.value = { ...res.data }
listData.value = listData.value.concat(res.data.doctorTableList)
}).catch(() => {
})
}
function getDict() {
listPerson(queryPersonParams.value).then((response) => {
personList.value = [response.rows]
})
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function handlePerson() {
if (personList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '人员为空 ', type: 'warning'
})
} else {
showPerson.value = true
}
}
function handlePersonConfirm(e) {
queryParams.value.personName = e.value[0].name
queryParams.value.id= e.value[0].id
queryParams.value.healthRecordName = ''
queryParams.value.recordId = ''
queryHealthRecordParams.value.personId=e.value[0].id
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
})
}
function handlePersonCancel() {
queryParams.value.personName = ''
queryParams.value.id=''
showPerson.value = false
listData.value = []
getList()
filterPanel.value = false
}
function handleHealthRecord() {
if (healthRecordList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '健康档案为空 ', type: 'warning'
})
} else {
showHealthRecord.value = true
}
}
function handleHealthRecordConfirm(e) {
queryParams.value.healthRecordName = e.value[0].name
queryParams.value.recordId = e.value[0].id
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleHealthRecordCancel() {
queryParams.value.healthRecordName = ''
queryParams.value.recordId = ''
showHealthRecord.value = false
listData.value = []
getList()
filterPanel.value = false
}
</script>
<style lang="scss" scoped>
.app-container {
.header-con {
width: 100%;
height: 100px;
background-color: #ffffff;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
align-items: center;
.item {
width: 50%;
height: 100%;
display: flex;
position: relative;
align-items: center;
margin: 5px 10px 5px 10px;
.title {
margin-left: 5px;
color: rgb(133, 133, 148);
margin-bottom: 5px;
font-size: 14px;
}
.num {
margin-left: 5px;
font-weight: bold;
font-size: 14px;
}
}
img {
height: 30px;
width: 30px;
}
}
.header-title {
width: 100%;
height: 30px;
background-color: #ffffff;
margin-bottom: 3px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
}
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
align-items: center;
position: relative;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,619 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
<view class="search-view">
<u-input v-model="queryParams.healthRecordName" border="false" type="select" @click="handleHealthRecord" placeholder="请选择健康档案" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" placeholder="请选择建档日期" border="false" type="select" readonly suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="select-header">建档日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
:disabledColor="'#fff'"
class="dateInput"
border="surround"
v-model="queryParams.startTime"
placeholder="请选择开始时间"
>
<template v-slot:suffix>
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
</template>
</u-input>
<u-input
:disabled="true"
:disabledColor="'#fff'"
class="dateInput"
border="surround"
v-model="queryParams.endTime"
placeholder="请选择结束时间"
>
<template v-slot:suffix>
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
</template>
</u-input>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
<u-datetime-picker
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
></u-datetime-picker>
</view>
</u-transition>
</view>
</u-sticky>
<div class="app-container" style="overflow: auto">
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">档案数量</div>
<div class="num">{{ record.healthRecordCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">平均康复周期</div>
<div class="num">
{{ record.perDuration.split(',')[0] }}
<span></span>
{{ record.perDuration.split(',')[1] }}
<span>小时</span>
</div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">就医医院</div>
<div class="num">{{ record.hospitalCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">就诊大夫</div>
<div class="num">{{ record.doctorTotalCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">就医次数</div>
<div class="num">{{ record.doctorCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">就医费用</div>
<div class="num">{{ record.doctorCost }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">用药天数</div>
<div class="num">{{ record.marDayCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">用药次数</div>
<div class="num">{{ record.marCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">发烧天数</div>
<div class="num">{{ record.feverDayCount }}<span></span></div>
</div>
</div>
<!-- <div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">用药次数</div>
<div class="num">{{ record.marCount }}<span></span></div>
</div>
</div> -->
</div>
<div></div>
</div>
<u-list :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header">
<u--text lines="2"
:text="item.name" size="30rpx" color="#333333" ></u--text>
</view>
<view class="item-row">
<text class="row-label">发生时间</text>
<text class="row-value">{{ item.occurTime}}</text>
</view>
<view class="item-row">
<text class="row-label">持续时间</text>
<text class="row-value">{{item.duration}}</text>
</view>
<view class="item-row">
<text class="row-label">过程记录次数</text>
<text class="row-value">{{ item.processCount+" 次"}}</text>
</view>
<view class="item-row">
<text class="row-label">就医次数</text>
<text class="row-value">{{ item.doctorCount+" 次"}}</text>
</view>
<view class="item-row">
<text class="row-label">就医费用</text>
<text class="row-value">{{ item.doctorCost+" 元"}}</text>
</view>
<view class="item-row">
<text class="row-label">用药天数</text>
<text class="row-value">{{ item.marDayCount+" 天"}}</text>
</view>
<view class="item-row">
<text class="row-label">用药次数</text>
<text class="row-value">{{ item.marCount+" 次"}}</text>
</view>
<view class="item-row">
<text class="row-label">发烧天数</text>
<text class="row-value">{{ item.feverDayCount+" 次"}}</text>
</view>
</view>
</u-list-item>
<view>
</view>
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
@confirm="handlePersonConfirm"></u-picker>
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handleHealthRecordCancel"
@confirm="handleHealthRecordConfirm"></u-picker>
</view>
<!-- 悬停按钮返回工作台-->
<suspend></suspend>
</template>
<script setup>
import { getRecordAnalysis } from '@/api/health/statisticAnalysis'
import { listPerson } from '@/api/health/person'
import { listHealthRecord } from '@/api/health/healthRecord'
import { getDicts } from '@/api/system/dict/data.js'
import dayjs from 'dayjs'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const personList = ref([])
const showHealthRecord = ref(false)
const healthRecordList = ref([])
const personTypeList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const showPerson = ref(false)
const timeShow= ref(false)
const time =ref( Number(new Date()))
const flag= ref(true)
const record = ref({})
const data = reactive({
filterPanel: false,
queryPersonParams: {
pageNum: 1,
pageSize: 100
},
queryParams: {
type: 1,
time: null,
dataType: null,
recordId: null,
id: null
} ,
queryHealthRecordParams: {
pageNum: 1,
personId:null,
pageSize: 1000
}
})
const { filterPanel, queryPersonParams,queryHealthRecordParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
listData.value=[]
getList()
isShow.value = false
}
});
function formatMultiLineData(data) {
if (data != null) {
return data.replace(/<br\/>/g, '')
}
}
function openOrCloseDate(data) {
timeShow.value = !timeShow.value
flag.value = data
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.startTime!=undefined&&queryParams.value.endTime!=''&&queryParams.value.endTime!=undefined){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function resetQuery() {
queryParams.value.id = ''
queryParams.value.recordId = ''
queryParams.value.type = '1'
queryParams.value.startTime = ''
queryParams.value.endTime = ''
queryParams.value.time = ''
}
function getList() {
getRecordAnalysis({...queryParams.value }).then(res => {
record.value = { ...res.data }
listData.value = listData.value.concat(res.data.recordList)
}).catch(() => {
})
}
function getDict() {
listPerson(queryPersonParams.value).then((response) => {
personList.value = [response.rows]
})
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function handlePerson() {
if (personList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '人员为空 ', type: 'warning'
})
} else {
showPerson.value = true
}
}
function handlePersonConfirm(e) {
queryParams.value.personName = e.value[0].name
queryParams.value.id= e.value[0].id
queryParams.value.healthRecordName = ''
queryParams.value.recordId = ''
queryHealthRecordParams.value.personId=e.value[0].id
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
})
}
function handlePersonCancel() {
queryParams.value.personName = ''
queryParams.value.id=''
showPerson.value = false
listData.value = []
getList()
filterPanel.value = false
}
function handleHealthRecord() {
if (healthRecordList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '健康档案为空 ', type: 'warning'
})
} else {
showHealthRecord.value = true
}
}
function handleHealthRecordConfirm(e) {
queryParams.value.healthRecordName = e.value[0].name
queryParams.value.recordId = e.value[0].id
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleHealthRecordCancel() {
queryParams.value.healthRecordName = ''
queryParams.value.recordId = ''
showHealthRecord.value = false
listData.value = []
getList()
filterPanel.value = false
}
</script>
<style lang="scss" scoped>
.app-container {
.header-con {
width: 100%;
height: 100px;
background-color: #ffffff;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
align-items: center;
.item {
width: 50%;
height: 100%;
display: flex;
position: relative;
align-items: center;
margin: 5px 10px 5px 10px;
.title {
margin-left: 5px;
color: rgb(133, 133, 148);
margin-bottom: 5px;
font-size: 14px;
}
.num {
margin-left: 5px;
font-weight: bold;
font-size: 14px;
}
}
img {
height: 30px;
width: 30px;
}
}
.header-title {
width: 100%;
height: 30px;
background-color: #ffffff;
margin-bottom: 3px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
}
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
align-items: center;
position: relative;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -3,7 +3,7 @@
<!-- 宫格组件 -->
<uni-section title="健康管理" v-show="auth.hasPermi('health:person:list')" type="line"></uni-section>
<uni-section title="统计分析" v-show="auth.hasPermi('health:person:list')" type="line"></uni-section>
<view class="grid-body">
<uni-grid :column="4" :showBorder="false">
<uni-grid-item v-for="(item, index) in healthGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
@@ -26,9 +26,10 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
import { ref } from "vue";
const healthGridList=ref([
{ path: '/pages/health/temperatureRecord/list', text: '体温统计', icon: 'spinner-cycle', permission: 'health:temperatureRecord:list' },
{ path: '/pages/health/marRecord/list', text: '用药统计', icon: 'shop-filled', permission: 'health:marRecord:list' }
{ path: '/pages/health/statistic/healthStatistic/index', text: '档案统计', icon: 'map', permission: 'health:healthRecord:list' },
{ path: '/pages/health/statistic/doctorStatistic/index', text: '就医统计', icon: 'person', permission: 'health:doctorRecord:list' },
{ path: '/pages/health/statistic/marStatistic/index', text: '用药统计', icon: 'shop-filled', permission: 'health:marRecord:list' },
{ path: '/pages/health/statistic/temperatureStatistic/index', text: '体温统计', icon: 'spinner-cycle', permission: 'health:temperatureRecord:list' }
])
function navigateTo(path) {
uni.navigateTo({

View File

@@ -0,0 +1,673 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
<view class="search-view">
<u-input v-model="queryParams.healthRecordName" border="false" type="select" @click="handleHealthRecord" placeholder="请选择健康档案" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" placeholder="请选择用药日期" border="false" type="select" readonly suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="select-header">用药日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
:disabledColor="'#fff'"
class="dateInput"
border="surround"
v-model="queryParams.startTime"
placeholder="请选择开始时间"
>
<template v-slot:suffix>
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
</template>
</u-input>
<u-input
:disabled="true"
:disabledColor="'#fff'"
class="dateInput"
border="surround"
v-model="queryParams.endTime"
placeholder="请选择结束时间"
>
<template v-slot:suffix>
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
</template>
</u-input>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
<u-datetime-picker
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
></u-datetime-picker>
</view>
</u-transition>
</view>
</u-sticky>
<div class="app-container" style="overflow: auto">
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">用药天数</div>
<div class="num">{{ mar.marDays }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">用药种类</div>
<div class="num">{{ mar.marCategoryCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">用药次数</div>
<div class="num">{{ mar.marCount }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top1Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top1Name }}</div>
<div class="num">{{ mar.top1 }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef" v-show="mar.top2Name != null">
<div class="item" v-show="mar.top2Name != null">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top2Name }}</div>
<div class="num">{{ mar.top2 }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top3Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top3Name }}</div>
<div class="num">{{ mar.top3 }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef" v-show="mar.top4Name != null">
<div class="item" v-show="mar.top4Name != null">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top4Name }}</div>
<div class="num">{{ mar.top4 }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top5Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top5Name }}</div>
<div class="num">{{ mar.top5 }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef" v-show="mar.top6Name != null">
<div class="item" v-show="mar.top6Name != null">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top6Name }}</div>
<div class="num">{{ mar.top6 }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top7Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top7Name }}</div>
<div class="num">{{ mar.top7 }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef" v-show="mar.top8Name != null">
<div class="item" v-show="mar.top8Name != null">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top8Name }}</div>
<div class="num">{{ mar.top8 }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top9Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top9Name }}</div>
<div class="num">{{ mar.top9 }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef" v-show="mar.top10Name != null">
<div class="item" v-show="mar.top10Name != null">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top10Name }}</div>
<div class="num">{{ mar.top10 }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top11Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top11Name }}</div>
<div class="num">{{ mar.top11 }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef" v-show="mar.top12Name != null">
<div class="item" v-show="mar.top12Name != null">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top12Name }}</div>
<div class="num">{{ mar.top12 }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top13Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top13Name }}</div>
<div class="num">{{ mar.top13 }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef" v-show="mar.top14Name != null">
<div class="item" v-show="mar.top14Name != null">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top14Name }}</div>
<div class="num">{{ mar.top14 }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top15Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top15Name }}</div>
<div class="num">{{ mar.top15 }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef" v-show="mar.top16Name != null">
<div class="item" v-show="mar.top16Name != null">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top16Name }}</div>
<div class="num">{{ mar.top16 }}<span></span></div>
</div>
</div>
<div class="item" v-show="mar.top17Name != null">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">{{ mar.top17Name }}</div>
<div class="num">{{ mar.top17 }}<span></span></div>
</div>
</div>
</div>
<div></div>
</div>
<u-list :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header">
<u--text lines="2"
:text="item.medicalName" size="30rpx" color="#333333" ></u--text>
</view>
<view class="item-row">
<text class="row-label">用药天数</text>
<text class="row-value">{{ item.useDays+" 天"}}</text>
</view>
<view class="item-row">
<text class="row-label">用药次数</text>
<text class="row-value">{{item.count+" 次"}}</text>
</view>
<view class="item-row">
<text class="row-label">用药总量</text>
<text class="row-value">{{ item.dosage+item.unit}}</text>
</view>
</view>
</u-list-item>
<view>
</view>
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
@confirm="handlePersonConfirm"></u-picker>
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handleHealthRecordCancel"
@confirm="handleHealthRecordConfirm"></u-picker>
</view>
<!-- 悬停按钮返回工作台-->
<suspend></suspend>
</template>
<script setup>
import { getMarAnalysis } from '@/api/health/statisticAnalysis'
import { listPerson } from '@/api/health/person'
import { listHealthRecord } from '@/api/health/healthRecord'
import { getDicts } from '@/api/system/dict/data.js'
import dayjs from 'dayjs'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const personList = ref([])
const showHealthRecord = ref(false)
const healthRecordList = ref([])
const personTypeList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const showPerson = ref(false)
const timeShow= ref(false)
const time =ref( Number(new Date()))
const flag= ref(true)
const mar = ref({})
const data = reactive({
filterPanel: false,
queryPersonParams: {
pageNum: 1,
pageSize: 100
},
queryParams: {
type: 1,
time: null,
recordId: null,
dataType: null,
id: null
} ,
queryHealthRecordParams: {
pageNum: 1,
personId:null,
pageSize: 1000
}
})
const { filterPanel, queryPersonParams,queryHealthRecordParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
listData.value=[]
getList()
isShow.value = false
}
});
function formatMultiLineData(data) {
if (data != null) {
return data.replace(/<br\/>/g, '')
}
}
function openOrCloseDate(data) {
timeShow.value = !timeShow.value
flag.value = data
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.startTime!=undefined&&queryParams.value.endTime!=''&&queryParams.value.endTime!=undefined){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function resetQuery() {
queryParams.value.id = ''
queryParams.value.recordId = ''
queryParams.value.type = '1'
queryParams.value.startTime = ''
queryParams.value.endTime = ''
queryParams.value.time = ''
}
function getList() {
getMarAnalysis({...queryParams.value }).then(res => {
mar.value = { ...res.data }
listData.value = listData.value.concat(res.data.marMapList)
}).catch(() => {
})
}
function getDict() {
listPerson(queryPersonParams.value).then((response) => {
personList.value = [response.rows]
})
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function handlePerson() {
if (personList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '人员为空 ', type: 'warning'
})
} else {
showPerson.value = true
}
}
function handlePersonConfirm(e) {
queryParams.value.personName = e.value[0].name
queryParams.value.id= e.value[0].id
queryParams.value.healthRecordName = ''
queryParams.value.recordId = ''
queryHealthRecordParams.value.personId=e.value[0].id
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
})
}
function handlePersonCancel() {
queryParams.value.personName = ''
queryParams.value.id=''
showPerson.value = false
listData.value = []
getList()
filterPanel.value = false
}
function handleHealthRecord() {
if (healthRecordList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '健康档案为空 ', type: 'warning'
})
} else {
showHealthRecord.value = true
}
}
function handleHealthRecordConfirm(e) {
queryParams.value.healthRecordName = e.value[0].name
queryParams.value.recordId = e.value[0].id
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleHealthRecordCancel() {
queryParams.value.healthRecordName = ''
queryParams.value.recordId = ''
showHealthRecord.value = false
listData.value = []
getList()
filterPanel.value = false
}
</script>
<style lang="scss" scoped>
.app-container {
.header-con {
width: 100%;
height: 100px;
background-color: #ffffff;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
align-items: center;
.item {
width: 50%;
height: 100%;
display: flex;
position: relative;
align-items: center;
margin: 5px 10px 5px 10px;
.title {
margin-left: 5px;
color: rgb(133, 133, 148);
margin-bottom: 5px;
font-size: 14px;
}
.num {
margin-left: 5px;
font-weight: bold;
font-size: 14px;
}
}
img {
height: 30px;
width: 30px;
}
}
.header-title {
width: 100%;
height: 30px;
background-color: #ffffff;
margin-bottom: 3px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
}
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
align-items: center;
position: relative;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,580 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
<view class="search-view">
<u-input v-model="queryParams.healthRecordName" border="false" type="select" @click="handleHealthRecord" placeholder="请选择健康档案" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" placeholder="请选择测量日期" border="false" type="select" readonly suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="select-header">测量日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
:disabledColor="'#fff'"
class="dateInput"
border="surround"
v-model="queryParams.startTime"
placeholder="请选择开始时间"
>
<template v-slot:suffix>
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
</template>
</u-input>
<u-input
:disabled="true"
:disabledColor="'#fff'"
class="dateInput"
border="surround"
v-model="queryParams.endTime"
placeholder="请选择结束时间"
>
<template v-slot:suffix>
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
</template>
</u-input>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
<u-datetime-picker
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
></u-datetime-picker>
</view>
</u-transition>
</view>
</u-sticky>
<div class="app-container" style="overflow: auto">
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">发烧天数</div>
<div class="num">{{ temp.feverDay }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">最高体温</div>
<div class="num">{{ temp.maxTemp }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">最低体温</div>
<div class="num">{{ temp.minTemp }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">平均体温</div>
<div class="num">{{ temp.averageTemp }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">正常次数(小于36.9)</div>
<div class="num">{{ temp.normalTempCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">低烧(36.9~37.5)</div>
<div class="num">{{ temp.lowerTempCount }}<span></span></div>
</div>
</div>
</div>
<div class="header-con" ref="searchHeightRef">
<div class="item">
<img src="@/static/images/one.png" alt="" />
<div class="info-sum">
<div class="title">中烧(37.5~38.5)</div>
<div class="num">{{ temp.middleTempCount }}<span></span></div>
</div>
</div>
<div class="item">
<img src="@/static/images/ticketSum.png" alt="" />
<div class="info-sum">
<div class="title">高烧大于38.5</div>
<div class="num">{{ temp.higherTempCount }}<span></span></div>
</div>
</div>
</div>
<div></div>
</div>
<u-list :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header">
<u--text lines="2"
:text="item.time+' 测量 '+item.count+' 次'" size="30rpx" color="#333333" ></u--text>
</view>
<view class="item-row">
<text class="row-label">最高体温</text>
<text class="row-value">{{ item.max+" ℃"}}</text>
</view>
<view class="item-row">
<text class="row-label">最低体温</text>
<text class="row-value">{{item.min+" ℃"}}</text>
</view>
<view class="item-row">
<text class="row-label">平均体温</text>
<text class="row-value">{{ item.average+" ℃"}}</text>
</view>
<view class="item-row">
<text class="row-label">测量明细</text>
<text class="row-value">{{ formatMultiLineData(item.detail)}}</text>
</view>
</view>
</u-list-item>
<view>
</view>
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
@confirm="handlePersonConfirm"></u-picker>
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handleHealthRecordCancel"
@confirm="handleHealthRecordConfirm"></u-picker>
</view>
<!-- 悬停按钮返回工作台-->
<suspend></suspend>
</template>
<script setup>
import { getTemperatureAnalysis } from '@/api/health/statisticAnalysis'
import { listPerson } from '@/api/health/person'
import { listHealthRecord } from '@/api/health/healthRecord'
import { getDicts } from '@/api/system/dict/data.js'
import dayjs from 'dayjs'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const personList = ref([])
const showHealthRecord = ref(false)
const healthRecordList = ref([])
const personTypeList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const showPerson = ref(false)
const timeShow= ref(false)
const time =ref( Number(new Date()))
const flag= ref(true)
const temp = ref({})
const data = reactive({
filterPanel: false,
queryPersonParams: {
pageNum: 1,
pageSize: 100
},
queryParams: {
type: 1,
time: null,
dataType: null,
recordId: null,
id: null
} ,
queryHealthRecordParams: {
pageNum: 1,
personId:null,
pageSize: 1000
}
})
const { filterPanel, queryPersonParams,queryHealthRecordParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
listData.value=[]
getList()
isShow.value = false
}
});
function formatMultiLineData(data) {
if (data != null) {
return data.replace(/<br\/>/g, '')
}
}
function openOrCloseDate(data) {
timeShow.value = !timeShow.value
flag.value = data
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.startTime!=undefined&&queryParams.value.endTime!=''&&queryParams.value.endTime!=undefined){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function resetQuery() {
queryParams.value.id = ''
queryParams.value.recordId = ''
queryParams.value.type = '1'
queryParams.value.startTime = ''
queryParams.value.endTime = ''
queryParams.value.time = ''
}
function getList() {
getTemperatureAnalysis({...queryParams.value }).then(res => {
temp.value = { ...res.data }
listData.value = listData.value.concat(res.data.tableList)
}).catch(() => {
})
}
function getDict() {
listPerson(queryPersonParams.value).then((response) => {
personList.value = [response.rows]
})
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function handlePerson() {
if (personList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '人员为空 ', type: 'warning'
})
} else {
showPerson.value = true
}
}
function handlePersonConfirm(e) {
queryParams.value.personName = e.value[0].name
queryParams.value.id= e.value[0].id
queryParams.value.healthRecordName = ''
queryParams.value.recordId = ''
queryHealthRecordParams.value.personId=e.value[0].id
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
})
}
function handlePersonCancel() {
queryParams.value.personName = ''
queryParams.value.id=''
showPerson.value = false
listData.value = []
getList()
filterPanel.value = false
}
function handleHealthRecord() {
if (healthRecordList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '健康档案为空 ', type: 'warning'
})
} else {
showHealthRecord.value = true
}
}
function handleHealthRecordConfirm(e) {
queryParams.value.healthRecordName = e.value[0].name
queryParams.value.recordId = e.value[0].id
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleHealthRecordCancel() {
queryParams.value.healthRecordName = ''
queryParams.value.recordId = ''
showHealthRecord.value = false
listData.value = []
getList()
filterPanel.value = false
}
</script>
<style lang="scss" scoped>
.app-container {
.header-con {
width: 100%;
height: 100px;
background-color: #ffffff;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
align-items: center;
.item {
width: 50%;
height: 100%;
display: flex;
position: relative;
align-items: center;
margin: 5px 10px 5px 10px;
.title {
margin-left: 5px;
color: rgb(133, 133, 148);
margin-bottom: 5px;
font-size: 14px;
}
.num {
margin-left: 5px;
font-weight: bold;
font-size: 14px;
}
}
img {
height: 30px;
width: 30px;
}
}
.header-title {
width: 100%;
height: 30px;
background-color: #ffffff;
margin-bottom: 3px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
}
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
align-items: center;
position: relative;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -1,17 +1,22 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<view class="search-view">
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
<view class="search-view">
<u-input v-model="queryParams.healthRecordName" border="false" type="select" @click="handleHealthRecord" placeholder="请选择健康档案" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择测量时间" suffixIcon="calendar"
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择测量日期" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
@@ -20,7 +25,7 @@
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="select-header">测量时间</view>
<view class="select-header">测量日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -56,7 +61,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -70,7 +75,7 @@
<view class="list-item">
<view class="item-header">
<u--text lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.personName+'体温:'+item.temperature +'℃'" size="30rpx" color="#333333" :bold="true"></u--text>
:text="item.personName+'- 体温:'+item.temperature +'℃'" size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">测量时间</text>
@@ -99,6 +104,8 @@
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
@confirm="handlePersonConfirm"></u-picker>
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handleHealthRecordCancel"
@confirm="handleHealthRecordConfirm"></u-picker>
</view>
<!--返回首页按钮 -->
<suspend></suspend>
@@ -106,7 +113,8 @@
<script setup>
import { listTemperatureRecord, delTemperatureRecord } from '@/api/health/temperatureRecord'
import { listPerson, getPerson } from '@/api/health/person'
import { listPerson } from '@/api/health/person'
import { listHealthRecord } from '@/api/health/healthRecord'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
@@ -121,6 +129,11 @@ const settingColumns = ref([])
const timeShow= ref(false)
const showPerson = ref(false)
const personList = ref([])
const showHealthRecord = ref(false)
const healthRecordList = ref([])
const flag= ref(true)
const time =ref( Number(new Date()))
const data = reactive({
@@ -134,9 +147,14 @@ const data = reactive({
measureTime: null,
temperature: null,
personId: null
}
} ,
queryHealthRecordParams: {
pageNum: 1,
personId:null,
pageSize: 1000
}
})
const { filterPanel, queryPersonParams, queryParams} = toRefs(data)
const { filterPanel, queryPersonParams,queryHealthRecordParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
@@ -165,6 +183,9 @@ function getList() {
listPerson(queryPersonParams.value).then((response) => {
personList.value = [response.rows]
})
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
})
status.value = 'loading'
listTemperatureRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
@@ -217,13 +238,40 @@ function settingCancel() {
function handlePersonConfirm(e) {
queryParams.value.personName = e.value[0].name
queryParams.value.personId= e.value[0].id
showPerson.value = false
queryParams.value.healthRecordName = ''
queryParams.value.healthRecordId = ''
queryHealthRecordParams.value.personId=e.value[0].id
listHealthRecord(queryHealthRecordParams.value).then((response) => {
healthRecordList.value = [response.rows]
showPerson.value = false
pageNum.value = 1
listData.value = []
getList()
})
}
function handlePersonCancel() {
showPerson.value = false
}
function handleHealthRecord() {
if (healthRecordList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '健康档案为空 ', type: 'warning'
})
} else {
showHealthRecord.value = true
}
}
function handleHealthRecordConfirm(e) {
queryParams.value.healthRecordName = e.value[0].name
queryParams.value.healthRecordId = e.value[0].id
showHealthRecord.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handlePersonCancel() {
showPerson.value = false
function handleHealthRecordCancel() {
showHealthRecord.value = false
}
function searchBlur() {
pageNum.value = 1
@@ -231,11 +279,11 @@ function settingCancel() {
getList()
}
function resetQuery() {
queryParams.value.personName = ''
queryParams.value.healthRecordId = ''
queryParams.value.personName = ''
queryParams.value.startTime = ''
queryParams.value.time = ''
queryParams.value.healthRecordName= ''
queryParams.value.healthRecordId = ''
queryParams.value.endTime = ''
queryParams.value.personId = ''
}