提交merge1.3

This commit is contained in:
2025-12-27 15:30:40 +08:00
parent 088861f66e
commit 3c497417dc
167 changed files with 0 additions and 17577 deletions

View File

@@ -1,37 +1,17 @@
<template>
<<<<<<< HEAD
<!-- 跌倒/坠床评估护理记录单主容器 -->
<div>
<div class="business">
<!-- 已有记录展示表格 -->
<el-table
=======
<div>
<div class="business">
<!-- <el-table
>>>>>>> v1.3
:data="tableDataSource"
border
stripe
fit
:header-cell-style="{ background: '#f2f2f2', color: 'black' }"
>
<<<<<<< HEAD
<!-- 记录时间列 -->
<el-table-column prop="content.recordTime" label="记录时间" />
<!-- 评估分数列 -->
<el-table-column prop="content.totalScore" label="评估分数" />
<!-- 护理措施列 -->
<el-table-column prop="content.patientCareSessionsTableList" label="护理措施" />
<!-- 责任护士列 -->
<el-table-column prop="content.nurseSignature" label="责任护士" />
<!-- 操作列编辑和删除按钮 -->
=======
<el-table-column prop="content.recordTime" label="记录时间" />
<el-table-column prop="content.totalScore" label="评估分数" />
<el-table-column prop="content.patientCareSessionsTableList" label="护理措施" />
<el-table-column prop="content.nurseSignature" label="责任护士" />
>>>>>>> v1.3
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
@@ -50,20 +30,6 @@
@click="handleDelete(scope.row)"
:disabled="admissionDataForm !== undefined"
>
<<<<<<< HEAD
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 跌倒/坠床评估护理记录单表单区域 -->
<div name="跌倒/坠床评估护理记录单" class="changeMajor" style="width: 99.9%">
<div>
<!-- 表单主体 -->
<el-form ref="formRef" :model="form" style="width: 99.9%">
<!-- 标题行 -->
=======
删除
</el-button>
</template>
@@ -73,7 +39,6 @@
<div name="跌倒/坠床评估护理记录单" class="changeMajor" style="width: 99.9%">
<div>
<el-form ref="formRef" :model="form" style="width: 99.9%">
>>>>>>> v1.3
<el-form-item style="text-align: center">
<div
style="
@@ -89,18 +54,10 @@
</div>
</el-form-item>
<<<<<<< HEAD
<!-- 日期时间选择器 -->
=======
>>>>>>> v1.3
<el-form-item label="日期:" class="changeMajorFromItem" style="width: 100%">
<el-row :span="20">
<el-col :span="8" style="padding-left: 0px !important">
<el-form-item>
<<<<<<< HEAD
<!-- 日期时间选择器 -->
=======
>>>>>>> v1.3
<el-date-picker
v-model="form.ZKDATE"
type="datetime"
@@ -110,10 +67,6 @@
style="width: 800px"
:disabled="admissionDataForm !== undefined"
/>
<<<<<<< HEAD
<!-- 时间选择器被注释掉 -->
=======
>>>>>>> v1.3
<!-- <span style="margin-left: 5px">时间</span>
<el-time-picker
v-model="form.ZKTIME"
@@ -124,10 +77,6 @@
/> -->
</el-form-item>
</el-col>
<<<<<<< HEAD
<!-- 新增/保存按钮 -->
=======
>>>>>>> v1.3
<el-col :span="5">
<el-button
v-if="!updateFlag"
@@ -151,10 +100,6 @@
</el-row>
</el-form-item>
<<<<<<< HEAD
<!-- 危险因素评估表格 -->
=======
>>>>>>> v1.3
<el-form-item style="padding-top: 10px; margin: 0px !important">
<el-table
:data="dangerData"
@@ -162,10 +107,6 @@
:span-method="handleSpan"
style="text-align: center"
>
<<<<<<< HEAD
<!-- 动态生成表格列 -->
=======
>>>>>>> v1.3
<el-table-column
v-for="column in dangerColumns"
:key="column.key"
@@ -174,10 +115,6 @@
:label="column.title"
align="center"
/>
<<<<<<< HEAD
<!-- 选择列复选框 -->
=======
>>>>>>> v1.3
<el-table-column prop="id" label="选择" width="80" align="center">
<template #default="{ row }">
<el-checkbox v-model="row.checked" @change="handleDangerChange(row)" />
@@ -186,10 +123,6 @@
</el-table>
</el-form-item>
<<<<<<< HEAD
<!-- 总分显示 -->
=======
>>>>>>> v1.3
<el-form-item
style="text-align: center; margin-bottom: 0px; padding: 0px"
class="changeMajorFromItem"
@@ -202,10 +135,6 @@
</el-row>
</el-form-item>
<<<<<<< HEAD
<!-- 护理措施表格 -->
=======
>>>>>>> v1.3
<el-form-item style="padding-top: 10px">
<el-table
:data="nursingData"
@@ -213,10 +142,6 @@
:span-method="arraySpanMethod"
style="width: 100%"
>
<<<<<<< HEAD
<!-- 动态生成表格列 -->
=======
>>>>>>> v1.3
<el-table-column
v-for="column in nursingColumns"
:key="column.key"
@@ -225,10 +150,6 @@
:label="column.title"
align="center"
/>
<<<<<<< HEAD
<!-- 选择列复选框 -->
=======
>>>>>>> v1.3
<el-table-column prop="id" label="选择" width="80" align="center">
<template #default="{ row }">
<el-checkbox v-model="row.checked" @change="handleNursingChange(row)" />
@@ -237,10 +158,6 @@
</el-table>
</el-form-item>
<<<<<<< HEAD
<!-- 护士签字输入框 -->
=======
>>>>>>> v1.3
<el-form-item
style="text-align: center; margin-bottom: 0px; padding: 0px"
class="changeMajorFromItem"
@@ -260,10 +177,6 @@
</el-row>
</el-form-item>
<<<<<<< HEAD
<!-- 备注信息 -->
=======
>>>>>>> v1.3
<el-form-item>
<el-row :span="20">
<el-col :span="5">
@@ -284,26 +197,6 @@
</template>
<script setup>
<<<<<<< HEAD
// 组件选项定义
defineOptions({
name: '跌倒/坠床评估护理记录单',
});
// 导入所需模块
import { ref, reactive, computed, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
// 使用路由相关功能
const route = useRoute();
const router = useRouter();
// 定义引用变量
const queryRef = ref();
const formRef = ref();
// 基本数据变量
=======
defineOptions({
name: 'FallBedFallAssessment',
});
@@ -328,7 +221,6 @@ const router = useRouter();
const queryRef = ref();
const formRef = ref();
>>>>>>> v1.3
const wardCode = ref('');
const patientId = ref('');
const visitId = ref('');
@@ -342,20 +234,6 @@ const totalScore = ref(0);
const lastSubmit = ref('');
const admissionDataForm = ref(route.params.admissionData);
<<<<<<< HEAD
// 表单数据模型
const form = reactive({
ZKDATE: '', // 日期
ZKTIME: '', // 时间
recordTime: '', // 记录时间
totalScore: 0, // 总分
bedFallRiskAssessmentList: [], // 跌倒风险评估列表
nurseSignature: '', // 护士签名
patientCareSessionsCheckedList: [], // 护理措施选中列表
});
// 危险因素表格列配置
=======
const form = reactive({
ZKDATE: '',
ZKTIME: '',
@@ -367,7 +245,6 @@ const form = reactive({
});
// 危险因素表格列
>>>>>>> v1.3
const dangerColumns = [
{
key: 'content',
@@ -432,11 +309,7 @@ const dangerData = ref([
{ id: '27', evalContent: '麻醉止痛剂', score: 2, checked: false },
]);
<<<<<<< HEAD
// 护理措施表格列配置
=======
// 护理措施表格列
>>>>>>> v1.3
const nursingColumns = [
{
key: 'content',
@@ -473,33 +346,21 @@ const instructions = [
'3.评分≥5高度风险每周至少评估一次需采取适宜的预防措施同时填写《预防患者跌倒/坠床知情告知书》',
];
<<<<<<< HEAD
// 计算属性:计算选中的危险因素总分
=======
// 计算属性
>>>>>>> v1.3
const calculate = computed(() => {
return dangerData.value
.filter((option) => option.checked)
.reduce((total, option) => total + option.score, 0);
});
<<<<<<< HEAD
// 计算属性:判断表单是否为空
=======
>>>>>>> v1.3
const isFormEmpty = computed(() => {
return (
form.ZKDATE === '' && form.ZKTIME === '' && form.recordTime === '' && form.nurseSignature === ''
);
});
<<<<<<< HEAD
// 危险因素选择变化处理函数
=======
// 方法 - 不再需要handleData方法通过表单输入和按钮加载数据
>>>>>>> v1.3
const handleDangerChange = (row) => {
totalScore.value = calculate.value;
form.bedFallRiskAssessmentList = dangerData.value
@@ -507,20 +368,12 @@ const handleDangerChange = (row) => {
.map((item) => item.id);
};
<<<<<<< HEAD
// 护理措施选择变化处理函数
=======
>>>>>>> v1.3
const handleNursingChange = (row) => {
form.patientCareSessionsCheckedList = nursingData.value
.filter((item) => item.checked)
.map((item) => item.id);
};
<<<<<<< HEAD
// 初始化函数:加载模拟数据
=======
>>>>>>> v1.3
const init = async () => {
// 使用模拟数据不再调用后端API
try {
@@ -582,10 +435,6 @@ const init = async () => {
}
};
<<<<<<< HEAD
// 危险因素表格合并单元格处理函数
=======
>>>>>>> v1.3
const handleSpan = ({ row, column, rowIndex, columnIndex }) => {
if (columnIndex === 0) {
if (rowIndex === 0) {
@@ -632,10 +481,6 @@ const handleSpan = ({ row, column, rowIndex, columnIndex }) => {
return [1, 1];
};
<<<<<<< HEAD
// 护理措施表格合并单元格处理函数
=======
>>>>>>> v1.3
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
// 护理措施
if (columnIndex === 0) {
@@ -652,14 +497,8 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
return [1, 1];
};
<<<<<<< HEAD
// 提交表单处理函数
const onSubmit = async () => {
// 检查上次提交时间,防止重复提交
=======
const onSubmit = async () => {
// 检查上次提交时间
>>>>>>> v1.3
if (lastSubmit.value && new Date() - lastSubmit.value < 2000) {
ElMessage.error('禁止重复提交!');
return;
@@ -684,16 +523,6 @@ const onSubmit = async () => {
if (isFormEmpty.value) {
ElMessage.error('请填写跌倒/坠床评估护理记录单后再进行操作');
<<<<<<< HEAD
} else {
form.totalScore = totalScore.value;
// 模拟保存数据不再调用后端API
console.log('保存的数据:', form);
if (updateFlag.value) {
// 模拟更新操作
=======
return;
}
@@ -720,35 +549,22 @@ const onSubmit = async () => {
// 更新本地数据
if (updateFlag.value) {
// 更新操作
>>>>>>> v1.3
const updatedIndex = tableDataSource.value.findIndex((item) => item.id === updateId.value);
if (updatedIndex !== -1) {
tableDataSource.value[updatedIndex].content = { ...form };
}
<<<<<<< HEAD
ElMessage.success('模拟更新成功');
} else {
// 模拟新增操作
=======
ElMessage.success('更新成功');
} else {
// 新增操作
>>>>>>> v1.3
const newRecord = {
id: Date.now().toString(),
content: { ...form },
};
tableDataSource.value.unshift(newRecord);
<<<<<<< HEAD
ElMessage.success('模拟新增成功');
}
=======
ElMessage.success('保存成功');
}
// 处理返回逻辑
>>>>>>> v1.3
if (admissionDataForm.value !== undefined) {
const admissionDataBack = JSON.parse(admissionDataForm.value);
admissionDataBack.project2 = totalScore.value;
@@ -769,13 +585,6 @@ const onSubmit = async () => {
}
}
<<<<<<< HEAD
reset();
}
};
// 编辑记录处理函数
=======
// 重置表单
reset();
} catch (error) {
@@ -784,7 +593,6 @@ const onSubmit = async () => {
}
};
>>>>>>> v1.3
const handleUpdate = (row) => {
const loginUser = JSON.parse(window.localStorage.getItem('loginUser'));
@@ -814,10 +622,6 @@ const handleUpdate = (row) => {
}
};
<<<<<<< HEAD
// 重置表单函数
=======
>>>>>>> v1.3
const reset = () => {
Object.assign(form, {
ZKDATE: '',
@@ -850,10 +654,6 @@ const reset = () => {
}
};
<<<<<<< HEAD
// 删除记录处理函数
=======
>>>>>>> v1.3
const handleDelete = (row) => {
const loginUser = JSON.parse(window.localStorage.getItem('loginUser'));
@@ -877,10 +677,6 @@ const handleDelete = (row) => {
}
};
<<<<<<< HEAD
// 打印预览函数(暂未实现)
=======
>>>>>>> v1.3
const dc_ajax_preview = () => {
var args = {
report: urlAddRandomNo('./grf/NurseRecord_Pressure_208.grf'),
@@ -891,10 +687,6 @@ const dc_ajax_preview = () => {
webapp_ws_ajax_run(args);
};
<<<<<<< HEAD
// 数据转换函数,用于报表打印
=======
>>>>>>> v1.3
const transformData = () => {
const jsonDate = [...tableDataSource.value];
@@ -1041,11 +833,7 @@ const transformData = () => {
return transformedData;
};
<<<<<<< HEAD
// 组件挂载后执行的生命周期函数
=======
// 生命周期钩子
>>>>>>> v1.3
onMounted(() => {
try {
// 安全获取用户信息
@@ -1058,9 +846,6 @@ onMounted(() => {
wardCode.value = window.localStorage.getItem('wardInfo') || '';
admissionDataForm.value = route.params.admissionData;
<<<<<<< HEAD
// 自动初始化表格数据不再依赖患者ID参数
=======
// 获取患者信息
if (patientInfo.value) {
patientId.value = patientInfo.value.patientId || '';
@@ -1068,7 +853,6 @@ onMounted(() => {
}
// 自动初始化表格数据
>>>>>>> v1.3
// 延迟执行,确保所有数据都已初始化
setTimeout(() => {
init();
@@ -1081,28 +865,17 @@ onMounted(() => {
}, 100);
}
});
<<<<<<< HEAD
</script>
<style scoped>
/* 页面样式定义 */
=======
// 暴露接口
defineExpose({ form, submit: onSubmit, reset });
</script>
<style scoped>
>>>>>>> v1.3
.business {
background: white;
border-radius: 5px;
padding: 10px 16px;
<<<<<<< HEAD
height: calc(100vh - var(--barHeight) * 1px - 50px);
=======
height: calc(100vh - 250px);
>>>>>>> v1.3
overflow: auto;
display: grid;
grid-row-gap: 16px;
@@ -1161,14 +934,4 @@ defineExpose({ form, submit: onSubmit, reset });
margin-bottom: 0px !important;
}
}
<<<<<<< HEAD
/* 备注信息列表样式 */
.instructions-list {
list-style-type: none;
padding-left: 0;
}
</style>
=======
</style>
>>>>>>> v1.3