需求111
This commit is contained in:
@@ -1,183 +1,295 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:title="dialogTitle"
|
||||
v-model="props.open"
|
||||
width="1400px"
|
||||
width="900px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
:close-on-click-modal="false"
|
||||
@close="handleDialogClose"
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between; width: 100%">
|
||||
<div style="width: 40%">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-input
|
||||
v-model="searchKey"
|
||||
placeholder="模板名称"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="getTemplateListInfo"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getTemplateListInfo" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button size="default" type="primary" @click="openTemplateDialog"
|
||||
>新增模板</el-button
|
||||
>
|
||||
<el-button type="danger" plain @click="deleteTemplate()" :disabled="false">
|
||||
删除
|
||||
</el-button>
|
||||
<el-table
|
||||
ref="patientListRef"
|
||||
height="680"
|
||||
:data="templateList"
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
@row-click="setTemplate"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="templateName" label="模板名称" width="180" />
|
||||
<el-table-column prop="contextJson" label="模板内容" width="80" />
|
||||
<el-table-column prop="useScopeCodeText" label="使用范围" width="80" />
|
||||
<el-table-column label="操作" min-width="150" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleEditTemplate(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="templateTotal > 0"
|
||||
:total="templateTotal"
|
||||
v-model:page="templateQueryParams.pageNo"
|
||||
v-model:limit="templateQueryParams.pageSize"
|
||||
@pagination="getTemplateListInfo"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="110px">
|
||||
<!-- 基础信息 -->
|
||||
<div class="form-section">
|
||||
<h4 class="section-title">基础信息</h4>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="日期" prop="recordDate">
|
||||
<el-date-picker
|
||||
v-model="form.recordDate"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="时间" prop="recordTime">
|
||||
<el-time-picker
|
||||
v-model="form.recordTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm"
|
||||
value-format="HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div
|
||||
style="display: flex; justify-content: space-between; width: 69%"
|
||||
class="app-container"
|
||||
>
|
||||
<el-form ref="formRef" :model="form" label-width="100px">
|
||||
<el-form-item class="changeMajorFromItem" label-width="100px" label="记录时间:">
|
||||
<el-date-picker
|
||||
v-model="form.recordingTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期"
|
||||
style="width: 30%"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生命体征:" class="changeMajorFromItem" />
|
||||
<el-form-item class="changeMajorFromItem" label-width="10px">
|
||||
<el-row :span="24">
|
||||
<!-- 第一个表单项 -->
|
||||
<el-col :span="5">
|
||||
<el-form-item label="体温:" prop="tw" label-width="80px">
|
||||
<el-input v-model="form.tw" style="width: 80%" /> ℃
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 第二个表单项 -->
|
||||
<el-col :span="5">
|
||||
<el-form-item label="脉搏:" prop="mb" label-width="80px">
|
||||
<el-input v-model="form.mb" style="width: 80%" /> 次
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 第三个表单项 -->
|
||||
<el-col :span="5">
|
||||
<el-form-item label="呼吸:" prop="hx" label-width="80px">
|
||||
<el-input v-model="form.hx" style="width: 80%" /> 次
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 第四个表单项 -->
|
||||
<el-col :span="9">
|
||||
<el-form-item label="血压:" prop="bloodPressure" label-width="80px">
|
||||
<div class="xy-container" style="display: flex; align-items: center">
|
||||
<el-input v-model="form.systolicBloodPressure" style="width: 25%" />
|
||||
<span>/</span>
|
||||
<el-input v-model="form.diastolicBloodPressure" style="width: 25%" />
|
||||
(高/低)mmHg
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 第一个表单项 -->
|
||||
<el-col :span="5" style="margin-top: 10px">
|
||||
<el-form-item label="心率:" prop="xl" label-width="80px">
|
||||
<el-input v-model="form.xl" style="width: 80%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 第二个表单项 -->
|
||||
<el-col :span="5" style="margin-top: 10px">
|
||||
<el-form-item label="血氧:" prop="xy" label-width="80px">
|
||||
<el-input v-model="form.xy" style="width: 80%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 第五个表单项 -->
|
||||
<el-col :span="4" style="margin-top: 10px">
|
||||
<el-form-item style="margin-left: 20px">
|
||||
<el-checkbox
|
||||
v-model="form.vitalSignsSyncFlag"
|
||||
label="同步到体征表"
|
||||
name="SYP"
|
||||
/>
|
||||
<!-- @change="checkTimeValidity" -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="病情观察与护理记录:"
|
||||
label-width="90px"
|
||||
class="changeMajorFromItem"
|
||||
prop="column081"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.bqgcOther"
|
||||
type="textarea"
|
||||
:rows="8"
|
||||
:autosize="{ minRows: 3, maxRows: 8 }"
|
||||
class="el-textarea"
|
||||
style="width: 95%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 生命体征 -->
|
||||
<div class="form-section">
|
||||
<h4 class="section-title">生命体征</h4>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="意识" prop="consciousnessCode">
|
||||
<el-select v-model="form.consciousnessCode" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="清醒" value="1" />
|
||||
<el-option label="嗜睡" value="2" />
|
||||
<el-option label="意识模糊" value="3" />
|
||||
<el-option label="昏睡" value="4" />
|
||||
<el-option label="谵妄" value="5" />
|
||||
<el-option label="浅昏迷" value="6" />
|
||||
<el-option label="中度昏迷" value="7" />
|
||||
<el-option label="深昏迷" value="8" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="体温(°C)" prop="temperature">
|
||||
<el-input-number
|
||||
v-model="form.temperature"
|
||||
:precision="1"
|
||||
:step="0.1"
|
||||
:min="35"
|
||||
:max="42"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="脉搏(次/分)" prop="pulseRate">
|
||||
<el-input-number v-model="form.pulseRate" :min="0" :max="300" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="心率(次/分)" prop="heartRate">
|
||||
<el-input-number v-model="form.heartRate" :min="0" :max="300" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="呼吸(次/分)" prop="breathRate">
|
||||
<el-input-number v-model="form.breathRate" :min="0" :max="100" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="血氧饱和度(%)" prop="bloodOxygen">
|
||||
<el-input-number
|
||||
v-model="form.bloodOxygen"
|
||||
:min="0"
|
||||
:max="100"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血压(mmHg)" prop="bloodPressure">
|
||||
<div style="display: flex; align-items: center; gap: 8px">
|
||||
<el-input-number
|
||||
v-model="form.systolicBloodPressure"
|
||||
:min="0"
|
||||
:max="300"
|
||||
placeholder="收缩压"
|
||||
style="width: 100px"
|
||||
/>
|
||||
<span>/</span>
|
||||
<el-input-number
|
||||
v-model="form.diastolicBloodPressure"
|
||||
:min="0"
|
||||
:max="200"
|
||||
placeholder="舒张压"
|
||||
style="width: 100px"
|
||||
/>
|
||||
<span>mmHg</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="吸氧(升/分)" prop="oxygen">
|
||||
<div style="display: flex; gap: 8px">
|
||||
<el-select v-model="form.oxygenMethod" placeholder="方式" style="width: 120px">
|
||||
<el-option label="鼻导管" value="1" />
|
||||
<el-option label="面罩" value="2" />
|
||||
<el-option label="高流量" value="3" />
|
||||
<el-option label="机械通气" value="4" />
|
||||
</el-select>
|
||||
<el-input-number
|
||||
v-model="form.oxygenFlow"
|
||||
:min="0"
|
||||
:max="20"
|
||||
placeholder="流量"
|
||||
style="width: 100px"
|
||||
/>
|
||||
<span>L</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="form.vitalSignsSyncFlag" label="同步到体征表" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 入量记录 -->
|
||||
<div class="form-section">
|
||||
<h4 class="section-title">入量记录</h4>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="入量名称" prop="inputName">
|
||||
<el-input v-model="form.inputName" placeholder="请输入入量名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="量(ml)" prop="inputAmount">
|
||||
<el-input-number v-model="form.inputAmount" :min="0" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="途径" prop="inputRoute">
|
||||
<el-select v-model="form.inputRoute" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="口服" value="1" />
|
||||
<el-option label="静脉" value="2" />
|
||||
<el-option label="鼻饲" value="3" />
|
||||
<el-option label="肛门" value="4" />
|
||||
<el-option label="皮下" value="5" />
|
||||
<el-option label="其他" value="6" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 出量记录 -->
|
||||
<div class="form-section">
|
||||
<h4 class="section-title">出量记录</h4>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="出量名称" prop="outputName">
|
||||
<el-select v-model="form.outputName" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="尿量" value="尿量" />
|
||||
<el-option label="大便" value="大便" />
|
||||
<el-option label="呕吐" value="呕吐" />
|
||||
<el-option label="引流量" value="引流量" />
|
||||
<el-option label="出血" value="出血" />
|
||||
<el-option label="其他" value="其他" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="量(ml)" prop="outputAmount">
|
||||
<el-input-number v-model="form.outputAmount" :min="0" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 专科护理 -->
|
||||
<div class="form-section">
|
||||
<h4 class="section-title">专科护理</h4>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="皮肤情况" prop="skinConditionCode">
|
||||
<el-select v-model="form.skinConditionCode" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="完好" value="1" />
|
||||
<el-option label="压疮" value="2" />
|
||||
<el-option label="出血点" value="3" />
|
||||
<el-option label="破损" value="4" />
|
||||
<el-option label="水肿" value="5" />
|
||||
<el-option label="瘀斑" value="6" />
|
||||
<el-option label="过敏" value="7" />
|
||||
<el-option label="其他" value="8" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="管路护理" prop="pipelineCare">
|
||||
<el-select v-model="form.pipelineCare" multiple placeholder="请选择" style="width: 100%">
|
||||
<el-option label="尿管" value="2" />
|
||||
<el-option label="胃管" value="1" />
|
||||
<el-option label="引流管" value="5" />
|
||||
<el-option label="静脉置管" value="3" />
|
||||
<el-option label="吸氧管" value="4" />
|
||||
<el-option label="T管" value="5" />
|
||||
<el-option label="胸腔引流管" value="6" />
|
||||
<el-option label="腹腔引流管" value="7" />
|
||||
<el-option label="伤口引流管" value="8" />
|
||||
<el-option label="脑室引流管" value="9" />
|
||||
<el-option label="其他" value="10" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 综合描述 -->
|
||||
<div class="form-section">
|
||||
<h4 class="section-title">综合描述</h4>
|
||||
<el-form-item label="病情观察及措施" prop="conditionObservation">
|
||||
<el-input
|
||||
v-model="form.conditionObservation"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入病情观察及护理措施..."
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<!-- 签章 -->
|
||||
<div class="form-section">
|
||||
<h4 class="section-title">签章</h4>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="护士签名" prop="nurseSignature">
|
||||
<el-select
|
||||
v-model="form.nurseSignature"
|
||||
placeholder="请选择或自动获取当前登录人"
|
||||
style="width: 100%"
|
||||
:value-key="String"
|
||||
>
|
||||
<el-option :label="userStore.nickName || '当前用户'" :value="String(userStore.id)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">保存</el-button>
|
||||
<el-button @click="close">取 消</el-button>
|
||||
<el-button type="primary" @click="submit" :disabled="submitting">保存</el-button>
|
||||
<el-button @click="handleDialogClose" :disabled="submitting">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<record-template
|
||||
ref="recordRemplateDialogRef"
|
||||
:open="openRecordTemplate"
|
||||
:patientId="patientId"
|
||||
:editData="editData"
|
||||
:recordTitle="recordTitle"
|
||||
@close="closeRecordTemplateDialog"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import recordTemplate from './recordTemplate.vue';
|
||||
import {nextTick, ref} from 'vue';
|
||||
import {deleteRecordTemplate, getRecordTemplateList, saveRecord, updateRecord} from './api';
|
||||
import moment from 'moment';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { saveRecord, updateRecord } from './api';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
@@ -200,220 +312,285 @@ const props = defineProps({
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const searchKey = ref('');
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
const templateQueryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 患者id
|
||||
|
||||
const formRef = ref(null);
|
||||
const submitting = ref(false); // 防止重复提交
|
||||
const form = ref({
|
||||
recordDate: '',
|
||||
recordTime: '',
|
||||
consciousnessCode: undefined,
|
||||
temperature: undefined,
|
||||
pulseRate: undefined,
|
||||
heartRate: undefined,
|
||||
breathRate: undefined,
|
||||
systolicBloodPressure: undefined,
|
||||
diastolicBloodPressure: undefined,
|
||||
bloodOxygen: undefined,
|
||||
oxygenMethod: undefined,
|
||||
oxygenFlow: undefined,
|
||||
vitalSignsSyncFlag: false,
|
||||
inputName: '',
|
||||
inputAmount: undefined,
|
||||
inputRoute: undefined,
|
||||
outputName: undefined,
|
||||
outputAmount: undefined,
|
||||
skinConditionCode: undefined,
|
||||
pipelineCare: [],
|
||||
conditionObservation: '',
|
||||
nurseSignature: String(userStore.id),
|
||||
});
|
||||
const templateTotal = ref(0);
|
||||
const templateList = ref([]);
|
||||
|
||||
const patientInfo = ref({});
|
||||
const form = ref({});
|
||||
const templateIds = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const editData = ref({});
|
||||
const rules = ref({
|
||||
recordDate: [{ required: true, message: '请选择日期', trigger: 'change' }],
|
||||
recordTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
||||
});
|
||||
|
||||
const title = ref('');
|
||||
|
||||
const recordTitle = ref('');
|
||||
const openRecordTemplate = ref(false);
|
||||
const dialogTitle = computed(() => {
|
||||
return props.title === '新增' ? '护理记录 - 新增' : '护理记录 - 编辑';
|
||||
});
|
||||
|
||||
/**
|
||||
* 取得患者信息详细
|
||||
* 显示弹窗
|
||||
*/
|
||||
function show() {
|
||||
patientInfo.value = props.patientInfo;
|
||||
console.log(props, 'props', props.patientInfo);
|
||||
reset();
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
if (title.value === '编辑') {
|
||||
form.value = props.editData.content;
|
||||
}
|
||||
console.log(props, 'props', title.value);
|
||||
getTemplateListInfo();
|
||||
}
|
||||
if (props.title === '编辑' && props.editData.content) {
|
||||
const content = props.editData.content;
|
||||
// 从 recordingTime 或 recordTime 中正确提取日期和时间
|
||||
let recordDate = '';
|
||||
let recordTime = '';
|
||||
|
||||
/** 选择删除模板条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, '选择条数');
|
||||
templateIds.value = selection.map((item) => item.id);
|
||||
console.log(templateIds.value, '选择条数');
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/**
|
||||
* 模板列表
|
||||
*/
|
||||
function getTemplateListInfo() {
|
||||
console.log(searchKey.value, '搜索关键字');
|
||||
templateQueryParams.value.searchKey = searchKey.value;
|
||||
getRecordTemplateList(templateQueryParams.value).then((res) => {
|
||||
console.log('模板列表', res);
|
||||
templateList.value = res.data.records;
|
||||
templateTotal.value = res.data.total;
|
||||
});
|
||||
// 优先使用 recordingTime(格式: "YYYY-MM-DD HH:mm:ss")
|
||||
const fullDateTime = content.recordingTime || content.recordTime || '';
|
||||
if (fullDateTime) {
|
||||
const parts = fullDateTime.split(' ');
|
||||
if (parts.length >= 2) {
|
||||
recordDate = parts[0];
|
||||
recordTime = parts[1];
|
||||
} else if (fullDateTime.includes(':')) {
|
||||
// 纯时间格式
|
||||
recordTime = fullDateTime;
|
||||
} else {
|
||||
// 纯日期格式
|
||||
recordDate = fullDateTime;
|
||||
}
|
||||
}
|
||||
|
||||
form.value = {
|
||||
recordDate: recordDate,
|
||||
recordTime: recordTime,
|
||||
consciousnessCode: content.consciousnessCode,
|
||||
temperature: content.temperature,
|
||||
pulseRate: content.pulseRate || content.mb,
|
||||
heartRate: content.heartRate || content.xl,
|
||||
breathRate: content.breathRate || content.hx,
|
||||
systolicBloodPressure: content.systolicBloodPressure,
|
||||
diastolicBloodPressure: content.diastolicBloodPressure,
|
||||
bloodOxygen: content.bloodOxygen || content.xy,
|
||||
oxygenMethod: content.oxygenMethod,
|
||||
oxygenFlow: content.oxygenFlow,
|
||||
vitalSignsSyncFlag: content.vitalSignsSyncFlag || false,
|
||||
inputName: content.inputName || '',
|
||||
inputAmount: content.inputAmount,
|
||||
inputRoute: content.inputRoute,
|
||||
outputName: content.outputName,
|
||||
outputAmount: content.outputAmount,
|
||||
skinConditionCode: content.skinConditionCode,
|
||||
pipelineCare: content.pipelineCare || [],
|
||||
conditionObservation: content.conditionObservation || content.bqgcOther || '',
|
||||
nurseSignature: content.nurseSignature || String(userStore.id),
|
||||
};
|
||||
} else {
|
||||
// 默认值 - 新增时自动获取当前日期时间
|
||||
const now = new Date();
|
||||
form.value.recordDate = moment(now).format('YYYY-MM-DD');
|
||||
form.value.recordTime = moment(now).format('HH:mm:ss');
|
||||
// 其他字段设为空或默认值
|
||||
form.value.consciousnessCode = undefined;
|
||||
form.value.temperature = undefined;
|
||||
form.value.pulseRate = undefined;
|
||||
form.value.heartRate = undefined;
|
||||
form.value.breathRate = undefined;
|
||||
form.value.systolicBloodPressure = undefined;
|
||||
form.value.diastolicBloodPressure = undefined;
|
||||
form.value.bloodOxygen = undefined;
|
||||
form.value.oxygenMethod = undefined;
|
||||
form.value.oxygenFlow = undefined;
|
||||
form.value.vitalSignsSyncFlag = false;
|
||||
form.value.inputName = '';
|
||||
form.value.inputAmount = undefined;
|
||||
form.value.inputRoute = undefined;
|
||||
form.value.outputName = undefined;
|
||||
form.value.outputAmount = undefined;
|
||||
form.value.skinConditionCode = undefined;
|
||||
form.value.pipelineCare = [];
|
||||
form.value.conditionObservation = '';
|
||||
form.value.nurseSignature = String(userStore.id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除模板
|
||||
*
|
||||
* @param index - 要删除的处方在列表中的索引
|
||||
* 重置表单
|
||||
*/
|
||||
function deleteTemplate(index) {
|
||||
console.log(templateIds.value, '删除记录单模板');
|
||||
if (templateIds.value.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择要删除的数据信息!');
|
||||
return;
|
||||
}
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据!')
|
||||
.then(function () {
|
||||
return deleteRecordTemplate(templateIds.value);
|
||||
})
|
||||
.then(() => {
|
||||
getTemplateListInfo();
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
function close() {
|
||||
reset();
|
||||
emit('close');
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
submitting.value = false;
|
||||
form.value = {
|
||||
tw: undefined,
|
||||
mb: undefined,
|
||||
hx: undefined,
|
||||
recordDate: '',
|
||||
recordTime: '',
|
||||
consciousnessCode: undefined,
|
||||
temperature: undefined,
|
||||
pulseRate: undefined,
|
||||
heartRate: undefined,
|
||||
breathRate: undefined,
|
||||
systolicBloodPressure: undefined,
|
||||
diastolicBloodPressure: undefined,
|
||||
xl: undefined,
|
||||
xy: undefined,
|
||||
bloodOxygen: undefined,
|
||||
oxygenMethod: undefined,
|
||||
oxygenFlow: undefined,
|
||||
vitalSignsSyncFlag: false,
|
||||
bqgc: undefined,
|
||||
bqgcOther: undefined,
|
||||
inputName: '',
|
||||
inputAmount: undefined,
|
||||
inputRoute: undefined,
|
||||
outputName: undefined,
|
||||
outputAmount: undefined,
|
||||
skinConditionCode: undefined,
|
||||
pipelineCare: [],
|
||||
conditionObservation: '',
|
||||
nurseSignature: String(userStore.id),
|
||||
};
|
||||
proxy.resetForm('formRef');
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存记录单
|
||||
* 关闭弹窗
|
||||
*/
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
/**
|
||||
* Dialog 关闭回调
|
||||
*/
|
||||
function handleDialogClose() {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
*/
|
||||
function submit() {
|
||||
if (title.value === '新增') {
|
||||
if (submitting.value) return;
|
||||
submitting.value = true;
|
||||
|
||||
// 验证表单
|
||||
proxy.$refs['formRef'].validate((valid) => {
|
||||
if (!valid) {
|
||||
submitting.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 组合日期和时间
|
||||
const recordingTime = `${form.value.recordDate} ${form.value.recordTime}`;
|
||||
|
||||
const submitData = {
|
||||
...form.value,
|
||||
recordingTime: recordingTime,
|
||||
// 兼容旧字段
|
||||
mb: form.value.pulseRate,
|
||||
xl: form.value.heartRate,
|
||||
hx: form.value.breathRate,
|
||||
xy: form.value.bloodOxygen,
|
||||
bqgcOther: form.value.conditionObservation,
|
||||
};
|
||||
|
||||
console.log('提交数据:', submitData);
|
||||
|
||||
if (props.title === '新增') {
|
||||
const insertParam = {
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
patientId: props.patientInfo.patientId,
|
||||
orgId: props.patientInfo.orgId,
|
||||
recordingTime: form.value.recordingTime,
|
||||
vitalSignsSyncFlag: form.value.vitalSignsSyncFlag ? form.value.vitalSignsSyncFlag : false,
|
||||
contextJson: JSON.stringify(form.value),
|
||||
recordingTime: recordingTime,
|
||||
vitalSignsSyncFlag: form.value.vitalSignsSyncFlag,
|
||||
contextJson: JSON.stringify(submitData),
|
||||
};
|
||||
console.log(insertParam, 'insertParam');
|
||||
console.log('新增数据:', insertParam);
|
||||
saveRecord(insertParam).then((res) => {
|
||||
console.log('保存结果:', res);
|
||||
submitting.value = false;
|
||||
if (res.code == 200) {
|
||||
emit('close', 'success');
|
||||
reset();
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '保存失败');
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.error('保存错误:', err);
|
||||
submitting.value = false;
|
||||
});
|
||||
} else {
|
||||
const updateParamParam = {
|
||||
const updateParam = {
|
||||
recordId: props.editData.recordId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
patientId: props.patientInfo.patientId,
|
||||
orgId: props.patientInfo.orgId,
|
||||
recordingTime: form.value.recordingTime,
|
||||
vitalSignsSyncFlag: form.value.vitalSignsSyncFlag ? form.value.vitalSignsSyncFlag : false,
|
||||
contextJson: JSON.stringify(form.value),
|
||||
recordingTime: recordingTime,
|
||||
vitalSignsSyncFlag: form.value.vitalSignsSyncFlag,
|
||||
contextJson: JSON.stringify(submitData),
|
||||
};
|
||||
console.log(updateParamParam, 'updateParamParam');
|
||||
updateRecord(updateParamParam).then((res) => {
|
||||
console.log('更新数据:', updateParam);
|
||||
updateRecord(updateParam).then((res) => {
|
||||
console.log('更新结果:', res);
|
||||
submitting.value = false;
|
||||
if (res.code == 200) {
|
||||
emit('close', 'success');
|
||||
reset();
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '更新失败');
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.error('更新错误:', err);
|
||||
submitting.value = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设定病情观测
|
||||
*/
|
||||
function setTemplate(row) {
|
||||
console.log(row, '设定病情观测');
|
||||
form.value.bqgcOther = row.contextJson;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增护理模板
|
||||
*/
|
||||
function openTemplateDialog() {
|
||||
recordTitle.value = '新增模板';
|
||||
openRecordTemplate.value = true;
|
||||
nextTick(() => {
|
||||
proxy.$refs['recordRemplateDialogRef'].show();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑护理模板
|
||||
*/
|
||||
function handleEditTemplate(row) {
|
||||
recordTitle.value = '编辑模板';
|
||||
openRecordTemplate.value = true;
|
||||
editData.value = row;
|
||||
nextTick(() => {
|
||||
proxy.$refs['recordRemplateDialogRef'].show();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭记录模板对话框
|
||||
*
|
||||
* 该函数用于关闭记录模板对话框。
|
||||
*/
|
||||
function closeRecordTemplateDialog(str) {
|
||||
openRecordTemplate.value = false;
|
||||
getTemplateListInfo();
|
||||
if (str === 'success') {
|
||||
proxy.$modal.msgSuccess('操作成功!');
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.pagination-container .el-pagination) {
|
||||
right: 20px !important;
|
||||
.form-section {
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px dashed #ebeef5;
|
||||
}
|
||||
|
||||
.input-select-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.form-section:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.input-select-container .el-input__inner,
|
||||
.input-select-container .el-select {
|
||||
.section-title {
|
||||
margin: 0 0 12px 0;
|
||||
color: #409eff;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
padding-left: 8px;
|
||||
border-left: 3px solid #409eff;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
display: flex;
|
||||
align-items: center; /* 垂直居中对齐 */
|
||||
justify-content: flex-start; /* 水平起始对齐 */
|
||||
gap: 8px; /* 两个输入框之间的间距 */
|
||||
:deep(.el-input-number .el-input__inner) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.flex-container label {
|
||||
margin: 0 8px; /* 标签的间距 */
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<div class="nursing-code-reference">
|
||||
<div class="reference-section">
|
||||
<h5>一、意识</h5>
|
||||
<span class="code-item">1.意识清</span>
|
||||
<span class="code-item">2.嗜睡</span>
|
||||
<span class="code-item">3.意识模糊</span>
|
||||
<span class="code-item">4.昏睡</span>
|
||||
<span class="code-item">5.浅昏迷</span>
|
||||
<span class="code-item">6.深昏迷</span>
|
||||
</div>
|
||||
<div class="reference-section">
|
||||
<h5>二、管路</h5>
|
||||
<span class="code-item">1.尿管</span>
|
||||
<span class="code-item">2.鼻饲管</span>
|
||||
<span class="code-item">3.胃肠减压管</span>
|
||||
<span class="code-item">4.外周静脉置管</span>
|
||||
<span class="code-item">5.中心静脉置管</span>
|
||||
<span class="code-item">6.胸腔闭式引流管</span>
|
||||
<span class="code-item">7.腹腔引流管</span>
|
||||
<span class="code-item">8.头部引流管</span>
|
||||
<span class="code-item">9.其他引流管</span>
|
||||
<span class="code-item">10.其他置管</span>
|
||||
</div>
|
||||
<div class="reference-section">
|
||||
<h5>三、皮肤</h5>
|
||||
<span class="code-item">1.完好</span>
|
||||
<span class="code-item">2.压疮</span>
|
||||
<span class="code-item">3.出血点</span>
|
||||
<span class="code-item">4.破损</span>
|
||||
<span class="code-item">5.水肿</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.nursing-code-reference {
|
||||
background: #fafafa;
|
||||
padding: 12px 16px;
|
||||
border-radius: 4px;
|
||||
margin-top: 16px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.reference-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.reference-section h5 {
|
||||
margin: 0;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.code-item {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
padding: 2px 6px;
|
||||
background: #f4f4f5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user