fix: 健康管理系统,自测问题修复及功能优化完善。
This commit is contained in:
@@ -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'] }]
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user