版本更新
This commit is contained in:
@@ -0,0 +1,948 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="患者详情"
|
||||
v-model="props.open"
|
||||
width="1700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between" class="app-container">
|
||||
<div style="width: 50%">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">基本信息</span>
|
||||
</template>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<span>姓名:{{ patientInfo.patientName }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span>性别:{{ patientInfo.genderEnum_enumText }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span>年龄:{{ patientInfo.ageString }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">体征信息</span>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<div style="width: 100%">
|
||||
<el-date-picker
|
||||
v-model="receptionTime"
|
||||
type="daterange"
|
||||
range-separator="~"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placement="bottom"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 84%; margin-bottom: 10px; margin-right: 10px"
|
||||
/>
|
||||
<el-button type="primary" style="margin-bottom: 10px" @click="getPatientList">
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<el-button type="primary" @click="confirmCharge()" :disabled="buttonDisabled">
|
||||
保存
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleReadCard('02')"
|
||||
style="width: 65px"
|
||||
:disabled="true"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="patientListRef"
|
||||
max-height="650"
|
||||
:data="patientList"
|
||||
row-key="encounterId"
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column prop="busNo" label="体温" width="80" />
|
||||
<el-table-column prop="statusEnum_enumText" label="收缩压" min-width="120" />
|
||||
<el-table-column prop="busNo" label="舒张压" width="80" />
|
||||
<el-table-column prop="statusEnum_enumText" label="心率" min-width="120" />
|
||||
<el-table-column prop="busNo" label="脉搏" width="80" />
|
||||
<el-table-column prop="statusEnum_enumText" label="呼吸" min-width="120" />
|
||||
<el-table-column prop="busNo" label="血氧" width="80" />
|
||||
<el-table-column prop="statusEnum_enumText" label="动脉压" min-width="120" />
|
||||
<el-table-column prop="busNo" label="血糖" width="80" />
|
||||
<el-table-column prop="statusEnum_enumText" label="物理降温" min-width="120" />
|
||||
<el-table-column prop="busNo" label="左瞳孔(光)" width="80" />
|
||||
<el-table-column prop="statusEnum_enumText" label="右瞳孔(光)" min-width="120" />
|
||||
<el-table-column prop="busNo" label="CCU心率" width="280" />
|
||||
<el-table-column prop="statusEnum_enumText" label="左瞳孔(大小)" min-width="120" />
|
||||
<el-table-column prop="busNo" label="右瞳孔(大小)" width="280" />
|
||||
<el-table-column prop="statusEnum_enumText" label="意识" min-width="120" />
|
||||
<el-table-column prop="busNo" label="新生儿箱温" width="280" />
|
||||
<el-table-column prop="statusEnum_enumText" label="血酮" min-width="120" />
|
||||
<el-table-column prop="busNo" label="体重" width="280" />
|
||||
<el-table-column prop="statusEnum_enumText" label="身高" min-width="120" />
|
||||
<el-table-column prop="busNo" label="腹围" width="280" />
|
||||
<el-table-column prop="statusEnum_enumText" label="大便次数" min-width="120" />
|
||||
<el-table-column prop="busNo" label="灌肠次数" width="280" />
|
||||
<el-table-column prop="statusEnum_enumText" label="灌肠后大便次数" min-width="120" />
|
||||
<el-table-column prop="busNo" label="出量" width="280" />
|
||||
<el-table-column prop="statusEnum_enumText" label="入量" min-width="120" />
|
||||
<el-table-column prop="statusEnum_enumText" label="尿量" min-width="120" />
|
||||
<el-table-column prop="busNo" label="大便量" width="280" />
|
||||
<el-table-column label="操作" min-width="150" fixed="right">
|
||||
<!-- <template #default="scope"> -->
|
||||
<template>
|
||||
<el-button link type="primary" size="small">保存</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<div style="width: 49%">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">体征录入</span>
|
||||
</template>
|
||||
<div style="margin-bottom: 10px">
|
||||
<el-button type="primary" @click="confirmCharge()" :disabled="buttonDisabled">
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
<el-form ref="dynamicForm" :model="formData" label-width="100px" :rules="formRules">
|
||||
<div class="page-bottom">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item style="margin-top: 15px" label="录入时间">
|
||||
<div class="input-time-inline">
|
||||
<el-select
|
||||
v-model="formData.timePoint"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder=""
|
||||
>
|
||||
<el-option
|
||||
v-for="item in InputOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="3">
|
||||
<el-form-item style="margin-top: 15px">
|
||||
<div v-if="formData.id === '' || formData.id === undefined">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left: 20px"
|
||||
@click="handleAdd"
|
||||
:disabled="buttonDisabled"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left: 20px"
|
||||
@click="handleUpdate"
|
||||
:disabled="buttonDisabled"
|
||||
>保存</el-button
|
||||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="temperature" label="体温">
|
||||
<div class="input-select-container">
|
||||
<el-input
|
||||
v-model="formData.temperature"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
style="width: 80%"
|
||||
/>
|
||||
<el-select
|
||||
v-model="formData.column133"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder=""
|
||||
@change="
|
||||
handlechangedict(bodyTemperatureList, formData.column133, 'column009')
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bodyTemperatureList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="flex-container">
|
||||
<el-form-item prop="bloodPressure" label="血压">
|
||||
<div class="flex-container">
|
||||
<el-input
|
||||
prop="lowBloodPressure"
|
||||
v-model="formData.date"
|
||||
style="width: 90px"
|
||||
size="small"
|
||||
@keydown="onKeyDown('1', '1', $event)"
|
||||
:ref="`input-1-1`"
|
||||
/>
|
||||
<label>/</label>
|
||||
<el-input
|
||||
prop="HighBloodPressure"
|
||||
v-model="formData.times"
|
||||
style="width: 90px"
|
||||
size="small"
|
||||
@keydown="onKeyDown('1', '2', $event)"
|
||||
:ref="`input-1-2`"
|
||||
/>
|
||||
</div>
|
||||
<el-select
|
||||
v-model="formData.column134"
|
||||
size="small"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
placeholder=""
|
||||
@change="
|
||||
handlechangedict(
|
||||
bloodPressureList,
|
||||
formData.column134,
|
||||
'column012',
|
||||
'column013'
|
||||
)
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bloodPressureList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="heartRate" label="心率">
|
||||
<el-input
|
||||
v-model="formData.heartRate"
|
||||
size="small"
|
||||
@keydown="onKeyDown('1', '0', $event)"
|
||||
:ref="`input-1-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="pulseRate" label="脉搏">
|
||||
<el-input
|
||||
v-model="formData.pulseRate"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '1', $event)"
|
||||
:ref="`input-0-1`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="respirationRate" label="呼吸">
|
||||
<el-input
|
||||
v-model="formData.respirationRate"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '2', $event)"
|
||||
:ref="`input-0-2`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<div class="layui-form-item">
|
||||
<el-form-item prop="bloodOxygen" label="血氧">
|
||||
<el-input
|
||||
v-model="formData.bloodOxygen"
|
||||
size="small"
|
||||
@keydown="onKeyDown('1', '3', $event)"
|
||||
:ref="`input-1-3`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item prop="column089" label="动脉压">
|
||||
<el-input
|
||||
v-model="formData.column089"
|
||||
size="small"
|
||||
@keydown="onKeyDown('2', '0', $event)"
|
||||
:ref="`input-2-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="bloodGlucose" label="血糖">
|
||||
<div class="input-select-container">
|
||||
<el-input
|
||||
v-model="formData.bloodGlucose"
|
||||
size="small"
|
||||
@keydown="onKeyDown('2', '1', $event)"
|
||||
:ref="`input-2-1`"
|
||||
/>
|
||||
<el-select
|
||||
v-model="formData.column135"
|
||||
clearable
|
||||
placeholder=""
|
||||
size="small"
|
||||
@change="handlechangedict(bloodSugarList, formData.column135, 'column091')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bloodSugarList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="physicalCooling" label="物理降温">
|
||||
<el-input
|
||||
v-model="formData.physicalCooling"
|
||||
size="small"
|
||||
@keydown="onKeyDown('2', '2', $event)"
|
||||
:ref="`input-2-2`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="左瞳孔(光)">
|
||||
<el-select v-model="formData.column092" clearable placeholder="" size="small">
|
||||
<el-option
|
||||
v-for="item in pupilList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="右瞳孔(光)">
|
||||
<el-select v-model="formData.column093" clearable placeholder="" size="small">
|
||||
<el-option
|
||||
v-for="item in pupilList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="左瞳孔(大小)">
|
||||
<el-input
|
||||
v-model="formData.column051"
|
||||
size="small"
|
||||
@keydown="onKeyDown('3', '0', $event)"
|
||||
:ref="`input-3-0`"
|
||||
/> </el-form-item
|
||||
></el-col> -->
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="右瞳孔(大小)">
|
||||
<el-input
|
||||
v-model="formData.column052"
|
||||
size="small"
|
||||
@keydown="onKeyDown('3', '1', $event)"
|
||||
:ref="`input-3-1`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="意识">
|
||||
<el-select v-model="formData.column138" clearable placeholder="" size="small">
|
||||
<el-option
|
||||
v-for="item in sanityList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="CCU心率">
|
||||
<el-select v-model="formData.ccuHeartRate" clearable placeholder="" size="small">
|
||||
<el-option
|
||||
v-for="item in CCUHeartRateList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="新生儿箱温">
|
||||
<el-input
|
||||
v-model="formData.newbornsIncubator"
|
||||
size="small"
|
||||
@keydown="onKeyDown('4', '0', $event)"
|
||||
:ref="`input-4-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="血酮">
|
||||
<div class="flex-container">
|
||||
<el-input
|
||||
v-model="formData.bloodKetone"
|
||||
size="small"
|
||||
@keydown="onKeyDown('4', '1', $event)"
|
||||
:ref="`input-4-1`"
|
||||
/>
|
||||
<template>
|
||||
<el-select
|
||||
v-model="formData.column141"
|
||||
clearable
|
||||
placeholder=""
|
||||
size="small"
|
||||
@change="
|
||||
handlechangedict(bloodKetoneList, formData.column141, 'column140')
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bloodKetoneList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</div> </el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item prop="column009" label="体重(kg)">
|
||||
<div class="input-select-container">
|
||||
<el-input
|
||||
v-model="formData.column009"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
<el-select
|
||||
v-model="formData.column133"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder=""
|
||||
@change="
|
||||
handlechangedict(bodyTemperatureList, formData.column133, 'column009')
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bodyTemperatureList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="height" label="身高(cm)">
|
||||
<div class="input-select-container">
|
||||
<el-input
|
||||
v-model="formData.height"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
<el-select
|
||||
v-model="formData.column133"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder=""
|
||||
@change="
|
||||
handlechangedict(bodyTemperatureList, formData.column133, 'column009')
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bodyTemperatureList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="waistCircumference" label="腹围(cm)">
|
||||
<div class="input-select-container">
|
||||
<el-input
|
||||
v-model="formData.waistCircumference"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
<el-select
|
||||
v-model="formData.column133"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder=""
|
||||
@change="
|
||||
handlechangedict(bodyTemperatureList, formData.column133, 'column009')
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bodyTemperatureList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- </el-form-item> -->
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<div class="flex-container">
|
||||
<el-form-item prop="stoolFrequency" label="大便次数(次)">
|
||||
<div class="input-select-container">
|
||||
<el-input
|
||||
v-model="formData.stoolFrequency"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
<el-select
|
||||
v-model="formData.column133"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder=""
|
||||
@change="
|
||||
handlechangedict(bodyTemperatureList, formData.column133, 'column009')
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bodyTemperatureList"
|
||||
:key="item.code"
|
||||
:label="item.display"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="flex-container">
|
||||
<el-form-item prop="enemaFrequency" label="灌肠次数(次)">
|
||||
<el-input
|
||||
v-model="formData.enemaFrequency"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="flex-container">
|
||||
<el-form-item prop="sfAfterEnema" label="灌肠后大便次数(次)">
|
||||
<el-input
|
||||
v-model="formData.sfAfterEnema"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<div class="flex-container">
|
||||
<el-form-item prop="output" label="出量(ml)">
|
||||
<el-input
|
||||
v-model="formData.output"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="flex-container">
|
||||
<el-form-item prop="input" label="入量(ml)">
|
||||
<el-input
|
||||
v-model="formData.input"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="flex-container">
|
||||
<el-form-item prop="urineVolume" label="尿量(ml)">
|
||||
<el-input
|
||||
v-model="formData.urineVolume"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<div class="flex-container">
|
||||
<el-form-item prop="stoolVolume" label="大便量(ml)">
|
||||
<el-input
|
||||
v-model="formData.stoolVolume"
|
||||
size="small"
|
||||
@keydown="onKeyDown('0', '0', $event)"
|
||||
:ref="`input-0-0`"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, nextTick } from 'vue';
|
||||
import { listPatient, addVitalSigns } from './api';
|
||||
import moment from "moment";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
patientId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const { method_code, unit_code, rate_code, distribution_category_code } = proxy.useDict(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
'rate_code',
|
||||
'distribution_category_code'
|
||||
);
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
patientId: undefined, // 患者id
|
||||
});
|
||||
// const patientInfo = ref({
|
||||
// patientName: '张三',
|
||||
// });
|
||||
const patientInfo = ref({});
|
||||
const form = ref({});
|
||||
const title = ref('');
|
||||
const rowRules = ref({
|
||||
conditionDefinitionId: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||
dose: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
|
||||
doseQuantity: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
|
||||
quantity: [{ required: true, message: '请输入数量', trigger: 'change' }],
|
||||
dispensePerDuration: [{ required: true, message: '请输入用药天数', trigger: 'change' }],
|
||||
});
|
||||
|
||||
// 表单配置数据
|
||||
const formConfig = ref([
|
||||
{
|
||||
type: 'input', // 表单项类型
|
||||
label: '用户名', // 标签文本
|
||||
prop: 'username', // 表单字段名
|
||||
rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }], // 验证规则
|
||||
attrs: {
|
||||
// el-input 的属性
|
||||
placeholder: '请输入用户名',
|
||||
clearable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '性别',
|
||||
prop: 'gender',
|
||||
options: [
|
||||
// select 的选项
|
||||
{ value: 'male', label: '男' },
|
||||
{ value: 'female', label: '女' },
|
||||
],
|
||||
attrs: {
|
||||
placeholder: '请选择性别',
|
||||
},
|
||||
},
|
||||
// 更多表单项配置...
|
||||
]);
|
||||
|
||||
const InputOptions = ref([
|
||||
{
|
||||
value: '0200', label: '2点',
|
||||
},
|
||||
{
|
||||
value: '0600', label: '6点',
|
||||
},
|
||||
{
|
||||
value: '1000', label: '10点',
|
||||
},
|
||||
{
|
||||
value: '1400', label: '14点',
|
||||
},
|
||||
{
|
||||
value: '1800', label: '18点',
|
||||
},
|
||||
{
|
||||
value: '2200', label: '22点',
|
||||
},
|
||||
])
|
||||
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
username: '',
|
||||
gender: '',
|
||||
});
|
||||
// 表格列配置数据
|
||||
const tableColumns = ref([
|
||||
{
|
||||
type: 'selection', // 特殊列类型
|
||||
width: '55',
|
||||
// selectable: checkSelectable, // 可选函数
|
||||
},
|
||||
{
|
||||
prop: 'encounterBusNo', // 字段名
|
||||
label: '病历号', // 列标题
|
||||
align: 'center',
|
||||
width: '120',
|
||||
},
|
||||
{
|
||||
prop: 'patientName',
|
||||
label: '姓名',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'statusEnum_enumText',
|
||||
label: '收费状态',
|
||||
align: 'center',
|
||||
formatter: (row) => formatStatus(row.statusEnum_enumText), // 格式化函数
|
||||
},
|
||||
// 更多列配置...
|
||||
]);
|
||||
|
||||
function getPatientList() {}
|
||||
/**
|
||||
* 取得患者信息详细
|
||||
*/
|
||||
function getPatientDetial() {
|
||||
patientInfo.value = props.patientInfo;
|
||||
console.log(props, 'props', props.patientInfo);
|
||||
reset();
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
console.log(props, 'props', title.value);
|
||||
console.log(queryParams.value, 'queryParams.value', props.patientId);
|
||||
queryParams.value.patientId = props.patientId;
|
||||
listPatient(queryParams.value).then((res) => {
|
||||
if (res.data && res.data.records && res.data.records.length > 0) {
|
||||
form.value = res.data.records[0];
|
||||
}
|
||||
form.value.addressInfo =
|
||||
form.value.addressProvince +
|
||||
'' +
|
||||
form.value.addressCity +
|
||||
'' +
|
||||
form.value.addressDistrict +
|
||||
'' +
|
||||
form.value.addressStreet +
|
||||
'' +
|
||||
form.value.address;
|
||||
|
||||
// loading.value = false;
|
||||
console.log(res, 'resqqqqqqqqqqqqqqqqqqqqqqq', form.value);
|
||||
});
|
||||
}
|
||||
|
||||
function close() {
|
||||
reset();
|
||||
emit('close');
|
||||
}
|
||||
function confirmCharge() {
|
||||
let params = {}
|
||||
params = formData.value
|
||||
params.patientId = props.patientInfo.patientId
|
||||
params.encounterId = props.patientInfo.encounterId
|
||||
params.recordingDate = moment(new Date()).format('YYYY-MM-DD');
|
||||
params.timePoint = formData.value.timePoint
|
||||
params.vitalSignsCode = ['003']
|
||||
params.vitalSignsValues = ['38']
|
||||
addVitalSigns(formData.value).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
activeFlag: undefined, // 活动标记
|
||||
tempFlag: undefined, // 临时标识
|
||||
name: undefined, // 患者姓名
|
||||
nameJson: undefined, // 患者其他名称
|
||||
busNo: undefined, // 病历号
|
||||
genderEnum: undefined, // 性别
|
||||
genderEnum_enumText: undefined, // 性别
|
||||
birthDate: undefined, // 生日
|
||||
deceasedDate: undefined, // 死亡时间
|
||||
maritalStatusEnum: undefined, // 婚姻状态
|
||||
maritalStatusEnum_enumText: undefined, // 婚姻状态
|
||||
prfsEnum: undefined, // 职业编码
|
||||
prfsEnum_enumText: undefined, // 职业编码
|
||||
phone: undefined, // 电话
|
||||
address: undefined, // 地址
|
||||
addressProvince: undefined, // 地址省
|
||||
addressCity: undefined, // 地址市
|
||||
addressDistrict: undefined, // 地址区
|
||||
addressStreet: undefined, // 地址街道
|
||||
addressJson: undefined, // 患者其他地址
|
||||
nationalityCode: undefined, // 民族
|
||||
idCard: undefined, // 身份证号
|
||||
pyStr: undefined, //拼音码
|
||||
wbStr: undefined, // 五笔码
|
||||
bloodAbo: undefined, // 血型ABO
|
||||
bloodAbo_enumText: undefined, // 血型ABO
|
||||
bloodRh: undefined, // 血型RH
|
||||
bloodRh_enumText: undefined, // 血型RH
|
||||
workCompany: undefined, // 工作单位
|
||||
nativePlace: undefined, // 籍贯
|
||||
countryCode: undefined, // 国家编码
|
||||
linkName: undefined, // 联系人
|
||||
linkRelationCode: undefined, // 联系人关系
|
||||
linkRelationCode_codeText: undefined, // 联系人关系
|
||||
linkTelcom: undefined, // 联系人电话
|
||||
linkJsons: undefined, // 其他联系人
|
||||
tenanid: undefined, // 租户ID
|
||||
ageString: undefined, // 病人年龄
|
||||
priorityEnum: undefined, // 护理级别
|
||||
priorityEnum_enumText: undefined, // 护理级别
|
||||
statusEnum: undefined, // 患者状态
|
||||
statusEnum_enumText: undefined, // 患者状态
|
||||
organizationId: undefined, // 入院科室
|
||||
organizationId_dictText: undefined, // 入院科室
|
||||
startTime: undefined, // 入院日期
|
||||
endTime: undefined, // 出院日期
|
||||
responsibleDoctor: undefined, // 责任医生
|
||||
responsibleNurse: undefined, // 责任护士
|
||||
iptDiseTypeCode: undefined, // 主要诊断
|
||||
typeCode: undefined, // 费别
|
||||
typeCode_dictText: undefined, // 费别
|
||||
hospitalizationDays: undefined, //住院天数
|
||||
classEnum: undefined, // 就诊类别
|
||||
classEnum_enumText: undefined, // 就诊类别
|
||||
postoperativeDays: undefined, // 术后天数
|
||||
surgeryStartTime: undefined, // 手术开始日期
|
||||
surgeryEndTime: undefined, // 手术结束日期
|
||||
surgeryStatusEnum: undefined, // 手术状态
|
||||
surgeryStatusEnum_enumText: undefined, // 手术状态
|
||||
categoryCode: undefined, // 过敏源类别
|
||||
categoryCode_dictText: undefined, // 过敏源类别
|
||||
caty: undefined, // 入院科室名称
|
||||
locationId: undefined, // 床位号
|
||||
locationId_dictText: undefined, // 床位号
|
||||
encounterId: undefined, // 就诊流水号
|
||||
encounterLocationId: undefined, // 就诊地点流水号
|
||||
};
|
||||
proxy.resetForm('formRef');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getPatientDetial,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.pagination-container .el-pagination) {
|
||||
right: 20px !important;
|
||||
}
|
||||
|
||||
.input-select-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-select-container .el-input__inner,
|
||||
.input-select-container .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
display: flex;
|
||||
align-items: center; /* 垂直居中对齐 */
|
||||
justify-content: flex-start; /* 水平起始对齐 */
|
||||
gap: 8px; /* 两个输入框之间的间距 */
|
||||
}
|
||||
|
||||
.flex-container label {
|
||||
margin: 0 8px; /* 标签的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,124 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 获取患者列表
|
||||
*
|
||||
* @param query 查询参数对象,可以包含多个查询条件
|
||||
* @returns Promise<any> 返回一个Promise对象,解析后得到患者列表数据
|
||||
*/
|
||||
export function listPatient(query) {
|
||||
return request({
|
||||
url: '/nursing-record/patient-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询患者体征数据
|
||||
*
|
||||
* @param query 查询参数对象,可以包含多个查询条件
|
||||
* @returns Promise<any> 返回一个Promise对象,解析后得到患者列表数据
|
||||
*/
|
||||
export function getVitalSignsInfo(query) {
|
||||
return request({
|
||||
url: '/vital-signs/patient-message',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取空床列表
|
||||
*
|
||||
* @param organizationId 科室ID
|
||||
* @returns Promise<any> 返回一个Promise对象,解析后得到患者列表数据
|
||||
*/
|
||||
export function getEmptyBed(organizationId) {
|
||||
return request({
|
||||
url: '/patient-home-manage/empty-bed',
|
||||
method: 'get',
|
||||
params: { organizationId }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存换床信息
|
||||
*
|
||||
*/
|
||||
export function saveBedTransfer(params) {
|
||||
return request({
|
||||
url: '/patient-home-manage/bed-transfer',
|
||||
method: 'put',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取科室列表
|
||||
*
|
||||
* @returns Promise<any> 返回一个Promise对象,解析后得到科室列表数据
|
||||
*/
|
||||
export function getCaty() {
|
||||
return request({
|
||||
url: '/patient-home-manage/caty',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存转科信息
|
||||
*
|
||||
*/
|
||||
export function saveDepartmentTransfer(params) {
|
||||
return request({
|
||||
url: '/patient-home-manage/department-transfer',
|
||||
method: 'put',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存出院信息
|
||||
*
|
||||
*/
|
||||
export function saveDischargeHospital(params) {
|
||||
return request({
|
||||
url: '/patient-home-manage/discharge-from-hospital',
|
||||
method: 'put',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增体征录入
|
||||
*/
|
||||
export function addVitalSigns(data) {
|
||||
return request({
|
||||
url: '/vital-signs/record-saving',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除体征录入
|
||||
*/
|
||||
export function delVitalSigns(data) {
|
||||
return request({
|
||||
url: '/vital-signs/record-delete',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
636
openhis-ui-vue3/src/views/inpatientNurse/tprChart/index.vue
Normal file
636
openhis-ui-vue3/src/views/inpatientNurse/tprChart/index.vue
Normal file
@@ -0,0 +1,636 @@
|
||||
<template>
|
||||
<div class="business-temperature" style="display: flex; justify-content: space-evenly">
|
||||
<!--<div class="business1">
|
||||
<PatientInfo @send-data="handleData">
|
||||
<el-button size="small" type="primary" style="margin-left: 10px" @click="seleteData"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button size="small" type="primary" style="margin-left: 10px" @click="printJS"
|
||||
>打印</el-button
|
||||
>
|
||||
<label class="layui-form-label" style="margin-left: 10px">日期</label>
|
||||
<div class="layui-input-inline" style="width: 180px">
|
||||
<el-date-picker
|
||||
v-model="recordingDate"
|
||||
style="width: 180px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
</PatientInfo>
|
||||
</div>-->
|
||||
<el-card style="width: 35%">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">患者列表</span>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入患者名/病历号"
|
||||
clearable
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
@keyup.enter="getPatientListInfo"
|
||||
/>
|
||||
<el-button type="primary" style="margin-bottom: 10px" @click="getPatientListInfo">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-table
|
||||
ref="patientListRef"
|
||||
height="620"
|
||||
:data="patientList"
|
||||
row-key="encounterId"
|
||||
@row-click="viewPatient"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="bedLocationId_dictText" label="床号" min-width="50" />
|
||||
<el-table-column label="病历号" align="center" prop="encounterId" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<el-table-column label="性别" align="center" prop="genderEnum_enumText" />
|
||||
<el-table-column label="年龄" align="center" prop="ageString" />
|
||||
<!-- <el-table-column label="时间" align="center" prop="receptionTime" width="160">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.receptionTime) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getPatientListInfo"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="width: 60%">
|
||||
<div>
|
||||
<el-button size="default" type="primary" @click="openAddTprDialog"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="business-temperature-sheet" style="width: 60%">
|
||||
<div>
|
||||
<el-tooltip content="首页" placement="right-end">
|
||||
<el-button
|
||||
style="margin-left: 12px; margin-top: 400px"
|
||||
icon="Upload"
|
||||
size="default"
|
||||
type="primary"
|
||||
@click="toFirst"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="上一页" placement="right-end">
|
||||
<el-button
|
||||
style="margin-left: 12px; margin-top: 15px"
|
||||
icon="ArrowUpBold"
|
||||
size="default"
|
||||
type="primary"
|
||||
@click="lastWeek"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="下一页" placement="right-end">
|
||||
<el-button
|
||||
style="margin-left: 12px; margin-top: 15px"
|
||||
icon="ArrowDown"
|
||||
size="default"
|
||||
type="primary"
|
||||
@click="nextWeek"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="尾页" placement="right-end">
|
||||
<el-button
|
||||
style="margin-left: 12px; margin-top: 15px"
|
||||
icon="Download"
|
||||
size="default"
|
||||
type="primary"
|
||||
@click="toEnd"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="打印本页" placement="right-end">
|
||||
<el-button
|
||||
style="margin-left: 12px; margin-top: 15px"
|
||||
icon="Printer"
|
||||
size="default"
|
||||
type="primary"
|
||||
@click="printPage"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div id="my_dataviz" ref="printRef" style="width: 780px; background-color: white" />
|
||||
</div>
|
||||
</el-card>
|
||||
<div v-show="false">
|
||||
<temperatureSheet ref="refTemp" />
|
||||
</div>
|
||||
<add-tpr-dialog
|
||||
ref="addTprDialogRef"
|
||||
:open="openAddTpr"
|
||||
:patientId="patientId"
|
||||
:patientInfo="patientData"
|
||||
@close="closePatientDetialDialog"
|
||||
/>
|
||||
<!-- </div> -->
|
||||
<iframe id="printIframe" ref="printIframe" style="display:none;"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// import PatientInfo from '@/components/PatientInfo'
|
||||
import html2pdf from 'html2pdf.js';
|
||||
import cloneDeep from 'lodash.clonedeep';
|
||||
import { init } from '@/action/nurseStation/temperatureSheet/line.js';
|
||||
import temperatureSheet from '../../../components/Auto/printBills/temperatureSheet';
|
||||
import addTprDialog from './components/addTprDialog.vue';
|
||||
// import printJS from 'print-js';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import moment from 'moment';
|
||||
import { listPatient, getVitalSignsInfo } from './components/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
// import { getSignsCharts } from '@/api/signsManagement'
|
||||
// import { date } from 'jszip/lib/defaults'
|
||||
const userStore = useUserStore();
|
||||
// 响应式数据
|
||||
const printRef = ref(null);
|
||||
const printIframe = ref(null);
|
||||
const refTemp = ref(null);
|
||||
const recordingDate = ref(undefined);
|
||||
const week = ref(0);
|
||||
const patientId = ref('');
|
||||
const visitId = ref('');
|
||||
const admissionDate = ref(undefined);
|
||||
const inputData = ref({});
|
||||
const openAddTpr = ref(false);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const print = ref(null);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
orgId: userStore.orgId,
|
||||
});
|
||||
|
||||
const data1 = reactive({
|
||||
patientInfo: {},
|
||||
grParamBOS: {
|
||||
age: '',
|
||||
birth: '',
|
||||
cwh: '',
|
||||
hosNum: '',
|
||||
inDate: '',
|
||||
inDiagName: '',
|
||||
name: '',
|
||||
deptName: '',
|
||||
operaDays: '',
|
||||
sex: '',
|
||||
weekNo: '',
|
||||
beginDate: '',
|
||||
hospDays: '',
|
||||
total: '',
|
||||
hospDate: '',
|
||||
operaDate: '',
|
||||
outdate: ''
|
||||
},
|
||||
rows: [],
|
||||
types: []
|
||||
});
|
||||
const patientData = ref({});
|
||||
const integerPoints = [2, 6, 10, 14, 18, 22];
|
||||
const closestPoint = ref(null);
|
||||
const receptionTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const patientList = ref([]);
|
||||
const chargeLoading = ref(false);
|
||||
const encounterId = ref('');
|
||||
const addTprDialogRef = ref(null);
|
||||
const patientInfo = ref({});
|
||||
|
||||
// /**
|
||||
// * 查看患者
|
||||
// */
|
||||
// function viewPatient(row) {
|
||||
// console.log('接收子组件传来的数据', patientInfo);
|
||||
// patientId.value = patientInfo.patientId; // 接收子组件传来的数据
|
||||
// visitId.value = String(patientInfo.visitId); // 接收子组件传来的数据
|
||||
|
||||
// // // 入科时间存在的场合使用入科时间
|
||||
// // if (patientInfo.admWardDateTime) {
|
||||
// // admissionDate = patientInfo.admWardDateTime; // 接收子组件传来的数据
|
||||
// // } else {
|
||||
// // admissionDate = patientInfo.admissionDate; // 接收子组件传来的数据
|
||||
// // }
|
||||
|
||||
// // data1.patientInfo = patientInfo;
|
||||
// // data1.grParamBOS.patientId = patientInfo.patientId;
|
||||
// // data1.grParamBOS.age = patientInfo.age;
|
||||
// // data1.grParamBOS.birth = null;
|
||||
// // data1.grParamBOS.cwh = patientInfo.bedLabel;
|
||||
// // data1.grParamBOS.hosNum = patientInfo.hosNum;
|
||||
|
||||
// // // 入科时间存在的场合使用入科时间
|
||||
// // if (patientInfo.admWardDateTime) {
|
||||
// // data1.grParamBOS.inDate = patientInfo.admWardDateTime;
|
||||
// // } else {
|
||||
// // data1.grParamBOS.inDate = patientInfo.admissionDate;
|
||||
// // }
|
||||
|
||||
// // console.log('patientInfo.admissionDate', patientInfo.admissionDate, data1.grParamBOS.inDate);
|
||||
// // data1.grParamBOS.inDiagName = patientInfo.diagnosis;
|
||||
// // data1.grParamBOS.name = patientInfo.name;
|
||||
// // data1.grParamBOS.deptName = patientInfo.deptName;
|
||||
// data1.grParamBOS.operaDays = null;
|
||||
// // data1.grParamBOS.sex = patientInfo.sex;
|
||||
// data1.grParamBOS.weekNo = null;
|
||||
// data1.grParamBOS.beginDate = getCurrentDate();
|
||||
// data1.grParamBOS.hospDays = null;
|
||||
// data1.grParamBOS.total = null;
|
||||
// getSignsCharts();
|
||||
// }
|
||||
// init1(data1);
|
||||
getPatientListInfo();
|
||||
// init1(data1);
|
||||
/**
|
||||
* 患者列表
|
||||
*/
|
||||
function getPatientListInfo() {
|
||||
listPatient(queryParams.value).then((res) => {
|
||||
console.log(userStore, 'userStore', res);
|
||||
patientList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
function init1(data) {
|
||||
console.log('体温单初始化', data);
|
||||
const inDate = data.grParamBOS.hospDate;
|
||||
const outdate = data.grParamBOS.outdate;
|
||||
week.value = Math.floor(dateDiff(inDate, outdate) / 7);
|
||||
setTemperatureComp(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击患者列表行 获取患者体温单数据
|
||||
*/
|
||||
function viewPatient(row) {
|
||||
patientInfo.value = row;
|
||||
console.log('点击患者列表行 获取患者体温单数据', row);
|
||||
chargeLoading.value = true;
|
||||
encounterId.value = row.encounterId;
|
||||
patientId.value = row.patientId; // 接收子组件传来的数据
|
||||
// visitId.value = String(patientInfo.value.visitId); // 接收子组件传来的数据
|
||||
|
||||
// 入科时间存在的场合使用入科时间
|
||||
admissionDate.value = row.admissionDate; // 接收子组件传来的数据
|
||||
|
||||
data1.patientInfo = row;
|
||||
data1.grParamBOS.patientId = row.patientId;
|
||||
data1.grParamBOS.age = row.ageString;
|
||||
data1.grParamBOS.birth = row.birthDate;
|
||||
data1.grParamBOS.cwh = row.bedLocationId_dictText;
|
||||
data1.grParamBOS.hosNum = row.encounterId;
|
||||
|
||||
// 入科时间存在的场合使用入科时间
|
||||
data1.grParamBOS.inDate = row.admissionDate;
|
||||
|
||||
console.log(
|
||||
'patientInfo.admissionDate',
|
||||
patientInfo.value.admissionDate,
|
||||
data1.grParamBOS.inDate
|
||||
);
|
||||
// data1.grParamBOS.inDiagName = patientInfo.value.diagnosis;
|
||||
data1.grParamBOS.name = patientInfo.value.patientName;
|
||||
// data1.grParamBOS.deptName = patientInfo.value.deptName;
|
||||
data1.grParamBOS.operaDays = null;
|
||||
// data1.grParamBOS.sex = patientInfo.sex;
|
||||
data1.grParamBOS.weekNo = null;
|
||||
data1.grParamBOS.beginDate = getCurrentDate();
|
||||
data1.grParamBOS.hospDays = null;
|
||||
data1.grParamBOS.total = null;
|
||||
// getChargeList(row.encounterId).then((res) => {
|
||||
// chargeList.value = res.data;
|
||||
// setTimeout(() => {
|
||||
// chargeLoading.value = false;
|
||||
// chargeListRef.value.toggleAllSelection();
|
||||
// }, 100);
|
||||
// });
|
||||
getSignsCharts();
|
||||
}
|
||||
|
||||
function getSignsCharts() {
|
||||
const params = {
|
||||
patientId: patientId.value,
|
||||
};
|
||||
getVitalSignsInfo(params).then((response) => {
|
||||
console.log('体温单返回值', response);
|
||||
if (response.code === 200) {
|
||||
// data1.grParamBOS.hospDate = data1.grParamBOS.inDate.substring(0, 10)
|
||||
data1.grParamBOS.hospDate =
|
||||
response.data.hospDate && response.data.hospDate.length > 10
|
||||
? response.data.hospDate.substring(0, 10)
|
||||
: response.data.hospDate;
|
||||
data1.grParamBOS.operaDate = response.data.operaDate;
|
||||
data1.grParamBOS.outdate = response.data.outdate;
|
||||
data1.rows = response.data.temperaturePulses.map((item) => ({
|
||||
rowBOS: item.chartsSmalls,
|
||||
weekNo: item.weekNo - 1,
|
||||
}));
|
||||
data1.types = response.data.others.map((item) => ({
|
||||
...item, // 保留其他属性
|
||||
weekNo: item.weekNo - 1, // 将 weekNo 减 1
|
||||
}));
|
||||
// // 取入院特殊标记的值
|
||||
// const typeValue = '院,' + formatDateTo(response.data.hospDate).formattedTime;
|
||||
// const newRowBOS = {
|
||||
// collectionMode: null,
|
||||
// date: formatDateTo(response.data.hospDate).formattedDate,
|
||||
// times: formatHourTimes(response.data.hospDate, response.data.temperaturePulses)
|
||||
// .formattedTime,
|
||||
// typeCode: '018',
|
||||
// typeValue: typeValue,
|
||||
// weekNo: 1,
|
||||
// };
|
||||
// let foundZero = false;
|
||||
// for (const item of data1.rows) {
|
||||
// if (item.weekNo1 === 0) {
|
||||
// item.rowBOS.push(newRowBOS);
|
||||
// foundZero = true;
|
||||
// break; // 找到后可以跳出循环
|
||||
// }
|
||||
// }
|
||||
// if (!foundZero) {
|
||||
// data1.rows.push({
|
||||
// rowBOS: [newRowBOS],
|
||||
// weekNo: 0,
|
||||
// });
|
||||
// }
|
||||
console.log('体温单查询this.data1', data1);
|
||||
init1(data1);
|
||||
}
|
||||
});
|
||||
}
|
||||
function getPatientList() {}
|
||||
// 体温单控件数据设置
|
||||
function setTemperatureComp(data) {
|
||||
console.log(data,'体温单控件数据设置');
|
||||
if (data !== undefined) {
|
||||
inputData.value = data;
|
||||
}
|
||||
const inDate = inputData.value.grParamBOS.hospDate;
|
||||
const outdate = inputData.value.grParamBOS.outdate;
|
||||
const begin = moment(new Date(inDate))
|
||||
.add(week.value * 7, 'day')
|
||||
.format('YYYY-MM-DD HH:mm:ss');
|
||||
inputData.value.grParamBOS.weekNo = week.value;
|
||||
inputData.value.grParamBOS.beginDate = begin;
|
||||
inputData.value.grParamBOS.hospDays = week.value * 7;
|
||||
inputData.value.grParamBOS.total = Math.floor(dateDiff(inDate, outdate) / 7);
|
||||
init(sliceData(inputData.value));
|
||||
}
|
||||
function getCurrentDate() {
|
||||
// 获取当前日期
|
||||
const today = new Date();
|
||||
const year = today.getFullYear();
|
||||
const month = (today.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始,所以需要加1
|
||||
const day = today.getDate().toString().padStart(2, '0');
|
||||
|
||||
return `${year}-${month}-${day}`; // 格式化为 YYYY-MM-DD
|
||||
}
|
||||
function seleteData() {
|
||||
const inDate = inputData.value.grParamBOS.hospDate;
|
||||
week.value = Math.floor(dateDiff(inDate, recordingDate.value) / 7);
|
||||
setTemperatureComp();
|
||||
}
|
||||
function lastWeek() {
|
||||
week.value--;
|
||||
if (week.value < 0) {
|
||||
week.value = 0;
|
||||
}
|
||||
setTemperatureComp();
|
||||
}
|
||||
function nextWeek() {
|
||||
week.value = Number(week.value) + 1;
|
||||
if (week.value > inputData.value.grParamBOS.total) {
|
||||
week.value = inputData.value.grParamBOS.total;
|
||||
}
|
||||
setTemperatureComp();
|
||||
}
|
||||
function toFirst() {
|
||||
week.value = 0;
|
||||
setTemperatureComp();
|
||||
}
|
||||
function toEnd() {
|
||||
week.value = inputData.value.grParamBOS.total;
|
||||
setTemperatureComp();
|
||||
}
|
||||
// 拆分当前周数据
|
||||
function sliceData(data) {
|
||||
const rows = data.rows.filter((item) => item.weekNo === week.value);
|
||||
const types = data.types.filter((item) => item.weekNo === week.value);
|
||||
// const datas = JSON.parse(JSON.stringify(data));
|
||||
const datas = cloneDeep(data);
|
||||
datas.rows = rows;
|
||||
datas.types = types;
|
||||
console.log(datas,"666666666666666666")
|
||||
return datas;
|
||||
}
|
||||
// 计算时间差
|
||||
function dateDiff(start, end) {
|
||||
let diffTime = start ? moment(new Date()).diff(moment(start.substring(0, 10))) / 1000 :start;
|
||||
if (end) {
|
||||
diffTime = moment(end.substring(0, 10)).diff(moment(start.substring(0, 10))) / 1000;
|
||||
}
|
||||
if (diffTime > 24 * 3600) {
|
||||
return Math.floor(diffTime / (24 * 3600));
|
||||
} else if (diffTime > 3600) {
|
||||
return '0';
|
||||
} else {
|
||||
return '0';
|
||||
}
|
||||
}
|
||||
// 打印体温单
|
||||
function printTW() {
|
||||
// this.$print(this.$refs.print);
|
||||
printRef.value.focus();
|
||||
printRef.value.contentWindow.print();
|
||||
// this.$refs.refTemp.printPage();
|
||||
}
|
||||
// 打印体温单
|
||||
function printPage() {
|
||||
const element = printRef.value;
|
||||
|
||||
if (!element) {
|
||||
console.error('未找到可打印的内容');
|
||||
return;
|
||||
}
|
||||
|
||||
// 创建一个克隆元素用于打印,避免修改原 DOM
|
||||
const clone = element.cloneNode(true);
|
||||
|
||||
// 设置宽度为 A4(780px ≈ 210mm),高度自适应
|
||||
clone.style.transform = 'scale(0.7)';
|
||||
clone.style.transformOrigin = 'top left';
|
||||
clone.style.width = 'calc(210mm * 1.11)';
|
||||
clone.style.height = 'calc(297mm * 1.11)';
|
||||
clone.style.marginLeft = '50px';
|
||||
|
||||
// 插入到 body 中以便 html2pdf 渲染
|
||||
document.body.appendChild(clone);
|
||||
|
||||
// 设置 html2pdf 配置
|
||||
const opt = {
|
||||
margin: 0,
|
||||
filename: '体温单.pdf',
|
||||
image: { type: 'jpeg', quality: 1 },
|
||||
html2canvas: { scale: 2, useCORS: true }, // 启用跨域资源支持
|
||||
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' },
|
||||
pagebreak: { mode: ['avoid-all'] },
|
||||
onclone: (clonedDoc) => {
|
||||
const chart = clonedDoc.getElementById(clone.id);
|
||||
if (chart) {
|
||||
chart.style.width = '210mm'; // 强制 A4 宽度
|
||||
chart.style.margin = '0 auto';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 导出为 PDF 并打印
|
||||
html2pdf().from(clone).set(opt).toPdf().get('pdf').then(function (pdf) {
|
||||
pdf.autoPrint(); // 自动打印
|
||||
window.open(pdf.output('bloburl'), '_blank'); // 在新窗口打开 PDF(以便用户确认)
|
||||
}).finally(() => {
|
||||
document.body.removeChild(clone); // 清理临时元素
|
||||
});
|
||||
}
|
||||
// 转化时间
|
||||
function formatDateTo(dateStr) {
|
||||
const [formattedDate, timePartWithSeconds] = dateStr ? dateStr.split('T'): ['', ''];
|
||||
const [formattedHour, minutePart] = timePartWithSeconds.split(':');
|
||||
const formattedTime = `${formattedHour}:${minutePart}`;
|
||||
|
||||
// 返回格式化的日期字符串
|
||||
return {
|
||||
formattedDate: formattedDate,
|
||||
formattedTime: formattedTime,
|
||||
formattedHour: formattedHour,
|
||||
};
|
||||
}
|
||||
// 转化时间
|
||||
function formatHourTimes(dateStr, temperaturePulses) {
|
||||
const formattedTime = formatDateTo(dateStr).formattedTime;
|
||||
const formattedDate = formatDateTo(dateStr).formattedDate;
|
||||
let times = '';
|
||||
if (formattedTime >= '00:00' && formattedTime < '04:00') {
|
||||
times = '02:00:00';
|
||||
} else if (formattedTime >= '04:00' && formattedTime < '08:00') {
|
||||
times = '06:00:00';
|
||||
} else if (formattedTime >= '08:00' && formattedTime < '12:00') {
|
||||
times = '10:00:00';
|
||||
} else if (formattedTime >= '12:00' && formattedTime < '16:00') {
|
||||
times = '14:00:00';
|
||||
} else if (formattedTime >= '16:00' && formattedTime < '20:00') {
|
||||
times = '18:00:00';
|
||||
} else if (formattedTime >= '20:00' && formattedTime <= '23:59') {
|
||||
times = '22:00:00';
|
||||
}
|
||||
const filteredData = temperaturePulses.filter((item) =>
|
||||
item.chartsSmalls.some(
|
||||
(chart) =>
|
||||
chart.date === formattedDate &&
|
||||
chart.times === times &&
|
||||
(chart.typeCode === '9507' ||
|
||||
chart.typeCode === '9505' ||
|
||||
chart.typeCode === '9502' ||
|
||||
chart.typeCode === '9503')
|
||||
)
|
||||
);
|
||||
if (filteredData.length > 0) {
|
||||
if (formattedTime >= '00:00' && formattedTime < '04:00') {
|
||||
if (filteredData.length === 1) {
|
||||
times = '06:00:00';
|
||||
} else if (filteredData.length === 2) {
|
||||
times = '10:00:00';
|
||||
} else if (filteredData.length === 3) {
|
||||
times = '14:00:00';
|
||||
} else {
|
||||
times = '02:00:00';
|
||||
}
|
||||
} else if (formattedTime >= '04:00' && formattedTime < '08:00') {
|
||||
times = '02:00:00';
|
||||
} else if (formattedTime >= '08:00' && formattedTime < '12:00') {
|
||||
times = '06:00:00';
|
||||
} else if (formattedTime >= '12:00' && formattedTime < '16:00') {
|
||||
times = '10:00:00';
|
||||
} else if (formattedTime >= '16:00' && formattedTime < '20:00') {
|
||||
times = '18:00:00';
|
||||
} else {
|
||||
times = '18:00:00';
|
||||
}
|
||||
}
|
||||
// 返回格式化的日期字符串
|
||||
return {
|
||||
formattedTime: times,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开体征录入
|
||||
*/
|
||||
function openAddTprDialog() {
|
||||
patientData.value = patientInfo.value
|
||||
openAddTpr.value = true;
|
||||
// patientId.value = row.id;
|
||||
nextTick(() => {
|
||||
proxy.$refs['addTprDialogRef'].getPatientDetial();
|
||||
});
|
||||
console.log(openAddTpr.value, '打开体征录入对话框');
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭新增体征弹窗
|
||||
*/
|
||||
function closePatientDetialDialog(str) {
|
||||
openAddTpr.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.business-temperature {
|
||||
// display: grid;
|
||||
grid-template-columns: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
::v-deep .business-temperature .el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
.business1 {
|
||||
background: white;
|
||||
padding: 10px 16px;
|
||||
border-radius: 6px;
|
||||
height: 40%;
|
||||
justify-content: center;
|
||||
}
|
||||
.layui-form-label {
|
||||
line-height: 35px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.layui-input-inline {
|
||||
display: inline-block;
|
||||
}
|
||||
.business-temperature-sheet {
|
||||
display: grid;
|
||||
grid-template-columns: 59px 1px 780px;
|
||||
}
|
||||
::v-deep .business-temperature-sheet .el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
#chart {
|
||||
max-height: 270mm;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user