.
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listInfusionRecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/outpatientmanage/infusion/init',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listPatients() {
|
||||||
|
return request({
|
||||||
|
url: '/outpatientmanage/infusion/patients',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateInfusionRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/outpatientmanage/infusion/outpatient-record-skintest',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,256 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container-infusion">
|
||||||
|
<div class="left">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
|
<el-form-item label="医嘱执行时间" prop="patientname">
|
||||||
|
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
|
||||||
|
start-placeholder="开始日期" end-placeholder="结束日期" style="width: auto;"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="phone">
|
||||||
|
<el-input v-model="queryParams.phone" placeholder="门诊号/病人/ID" clearable style="width: 180px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table :data="patientList" border style="width: 100%" highlight-current-row @current-change="handleCurrentChange" >
|
||||||
|
<!-- <el-table-column label="操作" align="center" width="90" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handlePrescription(scope.row)" v-hasPermi="['system:menu:edit']">处方</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column prop="prescriptionNo" label="处方号" width="150" />
|
||||||
|
<el-table-column prop="patientName" label="姓名" width="100" />
|
||||||
|
<el-table-column prop="genderEnum_enumText" label="性别" width="80" />
|
||||||
|
<el-table-column prop="ageString" label="年龄" width="80" />
|
||||||
|
<el-table-column prop="status" label="身份证号" width="140" />
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="right">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
<el-button type="primary" icon="SuccessFilled" @click="handleSubmit">确认执行</el-button>
|
||||||
|
<el-button type="primary" icon="SuccessFilled" @click="handleSubmitCanel">取消执行</el-button>
|
||||||
|
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印患者卡</el-button>
|
||||||
|
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印瓶签</el-button>
|
||||||
|
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印输液单</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div>
|
||||||
|
<p style="margin: 0px 0px 10px 0px;">院注医嘱</p>
|
||||||
|
<el-table :data="infusionList" border style="width: 100%;height: 300px;" :row-class-name="rowClassName"
|
||||||
|
@selection-change="handleSelectionChange" ref="tableRef">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column prop="groupId" label="组" width="60" />
|
||||||
|
<el-table-column prop="executionCount" label="已执行次数" width="100" />
|
||||||
|
<el-table-column prop="doctorId_dictText" label="开单医生" width="100" />
|
||||||
|
<el-table-column prop="patientName" label="患者姓名" width="100" />
|
||||||
|
<el-table-column prop="genderEnum_enumText" label="性别" width="80" />
|
||||||
|
<el-table-column prop="status" label="身份证号" width="140" />
|
||||||
|
<el-table-column prop="medicationInformation" label="药品信息" width="180" />
|
||||||
|
<el-table-column prop="medicationAntity" label="药品数量" width="80" />
|
||||||
|
<el-table-column prop="rateCode" label="用药频次" width="80" />
|
||||||
|
<el-table-column prop="dose" label="单词剂量" width="160" />
|
||||||
|
<el-table-column prop="speed" label="输液速度" width="80" />
|
||||||
|
<el-table-column prop="orgId_dictText" label="发放科室" width="120" />
|
||||||
|
<el-table-column prop="medicationStatusEnum_enumText" label="药品状态" width="100" />
|
||||||
|
<el-table-column prop="flagText" label="是否皮试" width="60" />
|
||||||
|
<el-table-column prop="clinicalStatusEnum_enumText" label="皮试结果" width="60" />
|
||||||
|
<el-table-column label="操作" align="center" width="90" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleSubmit(scope.row)" >执行</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p style="margin: 13px 0px 10px 0px;">院注执行历史</p>
|
||||||
|
<el-table :data="historyRecordsList" border style="width: 100%;height: 250px;">
|
||||||
|
<el-table-column prop="occurrenceStartTime" label="执行时间" width="150" />
|
||||||
|
<el-table-column prop="performerId_dictText" label="执行人" width="80" />
|
||||||
|
<el-table-column prop="prescriptionNo" label="处方号" width="100" />
|
||||||
|
<el-table-column prop="doctorId_dictText" label="开单医生" width="100" />
|
||||||
|
<el-table-column prop="medicationInformation" label="药品信息" width="180" />
|
||||||
|
<el-table-column prop="medicationAntity" label="药品数量" width="80" />
|
||||||
|
<el-table-column prop="rateCode" label="用药频次" width="80" />
|
||||||
|
<el-table-column prop="dose" label="单词剂量" width="160" />
|
||||||
|
<el-table-column prop="speed" label="输液速度" width="80" />
|
||||||
|
<el-table-column prop="orgId_dictText" label="发放科室" width="120" />
|
||||||
|
<el-table-column prop="medicationStatusEnum_enumText" label="药品状态" width="100" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-dialog title="处方信息" v-model="showPrescription" width="60vw" :before-close="handleClose">
|
||||||
|
<prescriptioncard></prescriptioncard>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="InfusionRecord">
|
||||||
|
import { ref, computed } from 'vue';
|
||||||
|
import { listPatients,updateInfusionRecord,listInfusionRecord } from './component/api.js';
|
||||||
|
// import prescriptioncard from '@/views/clinicmanagement/infusionrecord/component/prescription.vue'
|
||||||
|
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const showPrescription = ref(false);
|
||||||
|
const total = ref(1);
|
||||||
|
|
||||||
|
const tableRef = ref(null);
|
||||||
|
const selectedGroupIds = ref(new Set());
|
||||||
|
|
||||||
|
const currentRow = ref(null);
|
||||||
|
const dateRange = ref([]);
|
||||||
|
const historyRecordsList = ref([])
|
||||||
|
const patientList = ref([]);
|
||||||
|
// const infusionList = ref([]);
|
||||||
|
const infusionList = ref([
|
||||||
|
{ groupId: 1, executionCount: 2, doctorId_dictText: '张三', patientName: '李四', genderEnum_enumText: '男', status: '123456789012345678', medicationInformation: '药品A', medicationAntity: 10, rateCode: '每日一次', dose: '10mg', speed: '50ml/h', orgId_dictText: '内科', medicationStatusEnum_enumText: '已发放', flagText: '是', clinicalStatusEnum_enumText: '阴性' },
|
||||||
|
{ groupId: 1, executionCount: 2, doctorId_dictText: '张三', patientName: '王五', genderEnum_enumText: '女', status: '123456789012345679', medicationInformation: '药品A', medicationAntity: 10, rateCode: '每日一次', dose: '10mg', speed: '50ml/h', orgId_dictText: '内科', medicationStatusEnum_enumText: '已发放', flagText: '是', clinicalStatusEnum_enumText: '阴性' },
|
||||||
|
{ groupId: 2, executionCount: 1, doctorId_dictText: '李六', patientName: '赵七', genderEnum_enumText: '男', status: '123456789012345680', medicationInformation: '药品B', medicationAntity: 5, rateCode: '每日两次', dose: '5mg', speed: '30ml/h', orgId_dictText: '外科', medicationStatusEnum_enumText: '已发放', flagText: '否', clinicalStatusEnum_enumText: '无' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const ids = ref([]);
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
patientname: undefined,
|
||||||
|
patientid: undefined
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { queryParams } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询门诊输液列表 */
|
||||||
|
function getList() {
|
||||||
|
// listInfusionRecord(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
||||||
|
// jobLogList.value = response.rows;
|
||||||
|
// total.value = response.total;
|
||||||
|
// loading.value = false;
|
||||||
|
// });
|
||||||
|
listPatients().then(response => {
|
||||||
|
console.log('Full response:', response); // 打印完整响应
|
||||||
|
patientList.value = response.data;
|
||||||
|
total.value = response.total;
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('Error:', error); // 捕获并打印错误
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.beginTime = dateRange.value[0];
|
||||||
|
queryParams.value.endTime = dateRange.value[1];
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
dateRange.value = [];
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSubmit(){
|
||||||
|
updateInfusionRecord(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("执行成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function isEqual(set1, set2) {
|
||||||
|
if (set1.size !== set2.size) return false;
|
||||||
|
for (let item of set1) {
|
||||||
|
if (!set2.has(item)) return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
// console.log('Current selection:', selection);
|
||||||
|
// console.log('Current selectedGroupIds:', selectedGroupIds.value);
|
||||||
|
|
||||||
|
// 获取当前选中的 groupId 集合
|
||||||
|
const currentGroupIds = new Set(selection.map(item => item.groupId));
|
||||||
|
|
||||||
|
// 更新 selectedGroupIds
|
||||||
|
// 如果当前选中的 groupId 已经存在,则移除它;否则添加它
|
||||||
|
selection.forEach(item => {
|
||||||
|
const groupId = item.groupId;
|
||||||
|
if (selectedGroupIds.value.has(groupId)) {
|
||||||
|
selectedGroupIds.value.delete(groupId);
|
||||||
|
} else {
|
||||||
|
selectedGroupIds.value.add(groupId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 动态更新表格行的选中状态
|
||||||
|
infusionList.value.forEach(row => {
|
||||||
|
// 如果当前行的 groupId 在 selectedGroupIds 中,则选中;否则取消选中
|
||||||
|
const isSelected = selectedGroupIds.value.has(row.groupId);
|
||||||
|
// console.log('Row groupId:', row.groupId, 'isSelected:', isSelected);
|
||||||
|
tableRef.value.toggleRowSelection(row, isSelected);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('Current selectedGroupIds:', selectedGroupIds.value);
|
||||||
|
|
||||||
|
}
|
||||||
|
function handleSubmitCanel(){
|
||||||
|
ids.value = []
|
||||||
|
currentRow.value = []
|
||||||
|
selectedGroupIds.value.clear(); // 清空 selectedGroupIds
|
||||||
|
infusionList.value.forEach(row => {
|
||||||
|
tableRef.value.toggleRowSelection(row, false); // 取消选中所有行
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function rowClassName({ row }) {
|
||||||
|
if (selectedGroupIds.value.has(row.groupId)) {
|
||||||
|
console.log('Row groupId:', row.groupId, 'selectedGroupIds:', selectedGroupIds.value);
|
||||||
|
return 'selected-row';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function handleCurrentChange(row) {
|
||||||
|
currentRow.value = row; // 更新当前选中行的数据
|
||||||
|
console.log("当前选中行的数据:", currentRow.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.app-container-infusion {
|
||||||
|
padding: 20px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.left {
|
||||||
|
width: 28%;
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
margin-left: 2%;
|
||||||
|
width: 72%;
|
||||||
|
}
|
||||||
|
.selected-row {
|
||||||
|
background-color: #effae8 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listSkinRecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/outpatientmanage/skintest/outpatient-record-page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function lists() {
|
||||||
|
return request({
|
||||||
|
url: '/outpatientmanage/skintest/init',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function updateSkinTestRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/outpatientmanage/outpatient-record-skintest',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function updateNurseSign(data) {
|
||||||
|
return request({
|
||||||
|
url: '/outpatientmanage/outpatient-record-signcheck',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
363
openhis-ui-vue3/src/views/clinicmanagement/skinrecord/index.vue
Normal file
363
openhis-ui-vue3/src/views/clinicmanagement/skinrecord/index.vue
Normal file
@@ -0,0 +1,363 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
|
<el-form-item label="门诊号" prop="encounterBusNo">
|
||||||
|
<el-input v-model="queryParams.encounterBusNo" placeholder="请输入门诊号" clearable style="width: 210px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="处方号" prop="prescriptionNo">
|
||||||
|
<el-input v-model="queryParams.prescriptionNo" placeholder="请输入处方号" clearable style="width: 200px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="病人ID" prop="patientBusNo">
|
||||||
|
<el-input v-model="queryParams.patientBusNo" placeholder="请输入病人ID" clearable style="width: 200px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="电话" prop="phone">
|
||||||
|
<el-input v-model="queryParams.phone" placeholder="请输入电话" clearable style="width: 200px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="查询时间" >
|
||||||
|
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
|
||||||
|
start-placeholder="开始日期" end-placeholder="结束日期" ></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="皮试项目状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable @keyup.enter="handleQuery" style="width: 160px">
|
||||||
|
<el-option v-for="item in statusList"
|
||||||
|
:key="item.value" :label="item.info" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table :data="skinRecordList" border style="width: 100%">
|
||||||
|
<el-table-column prop="prescriptionNo" label="处方号" width="150" />
|
||||||
|
<el-table-column prop="encounterBusNo" label="门诊号" width="150" />
|
||||||
|
<el-table-column prop="patientBusNo" label="病人ID" width="150" />
|
||||||
|
<el-table-column prop="patientName" label="病人" width="120" />
|
||||||
|
<el-table-column label="发药状态" width="180">
|
||||||
|
<template #default="scope">
|
||||||
|
<span :class="getStatusColor(scope.row.medicationStatusEnum_enumText)">
|
||||||
|
{{ scope.row.medicationStatusEnum_enumText }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="medicationInformation" label="药品信息" width="150" />
|
||||||
|
<el-table-column prop="medicationDetail" label="药品" width="160" />
|
||||||
|
<el-table-column prop="medicationLotNumber" label="药品批号" width="160" />
|
||||||
|
<el-table-column prop="verificationStatusEnum_enumText" label="状态" width="80" />
|
||||||
|
<el-table-column prop="clinicalStatusEnum_enumText" label="皮试结果" width="120" >
|
||||||
|
<template #default="scope">
|
||||||
|
<span :class="getClinicalStatus(scope.row.clinicalStatusEnum_enumText)">
|
||||||
|
{{ scope.row.clinicalStatusEnum_enumText }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="performerId_dictText" label="执行护士" width="130" />
|
||||||
|
<el-table-column prop="performerCheckId_dictText" label="核对护士" width="130" />
|
||||||
|
<el-table-column prop="occurrenceStartTime" key="occurrenceStartTime" label="开始时间" width="180" >
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.occurrenceStartTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="occurrenceEndTime" key="occurrenceEndTime" label="结束时间" width="180">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.occurrenceEndTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="doctorId_dictText" label="开单医生" width="180" />
|
||||||
|
<el-table-column prop="note" label="备注" width="180" />
|
||||||
|
<el-table-column label="操作" align="center" width="210" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
|
:disabled="!!scope.row.performerCheckId_dictText ">修改</el-button>
|
||||||
|
<el-button link type="primary" icon="EditPen" @click="sign(scope.row)"
|
||||||
|
:disabled="!!scope.row.performerCheckId_dictText || scope.row.medicationStatusEnum_enumText == '未完成'">签名</el-button>
|
||||||
|
<!-- <el-button link type="primary" icon="Finished" @click="submitForm(scope.row)" v-hasPermi="['system:menu:add']">保存</el-button> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
<el-dialog title="查看" v-model="open" width="900px" append-to-body>
|
||||||
|
<el-form ref="skinRecordRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="处方号" prop="prescriptionNo">
|
||||||
|
<el-input v-model="form.prescriptionNo" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="门诊号" prop="encounterBusNo">
|
||||||
|
<el-input v-model="form.encounterBusNo" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="病人" prop="patientName">
|
||||||
|
<el-input v-model="form.patientName" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row><br>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="药品信息" prop="medicationInformation">
|
||||||
|
<el-input v-model="form.medicationInformation" clearable disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="药品" prop="medicationDetail">
|
||||||
|
<el-input v-model="form.medicationDetail" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row><br>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="药品批号" prop="medicationLotNumber">
|
||||||
|
<el-input v-model="form.medicationLotNumber" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="状态" prop="verificationStatusEnum">
|
||||||
|
<el-select v-model="form.verificationStatusEnum" placeholder="请选择状态" clearable >
|
||||||
|
<el-option v-for="item in statusList"
|
||||||
|
:key="item.value" :label="item.info" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="皮试结果" prop="clinicalStatusEnum">
|
||||||
|
<el-select v-model="form.clinicalStatusEnum" placeholder="请选择皮试结果" clearable :disabled="isViewMode">
|
||||||
|
<el-option v-for="item in skinResultList"
|
||||||
|
:key="item.value" :label="item.info" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row><br>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="执行护士" prop="performerId_dictText">
|
||||||
|
<el-input v-model="form.performerId_dictText" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="核对护士" prop="performerCheckId_dictText">
|
||||||
|
<el-input v-model="form.performerCheckId_dictText" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="开单医生" prop="name">
|
||||||
|
<el-input v-model="form.name" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row><br>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开始时间" prop="occurrenceStartTime">
|
||||||
|
<el-date-picker v-model="form.occurrenceStartTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="开始时间" :default-time="defaultTime"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="结束时间" prop="occurrenceEndTime">
|
||||||
|
<el-date-picker v-model="form.occurrenceEndTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="结束时间" :default-time="defaultTime"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row><br>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="发药状态" prop="medicationStatusEnum">
|
||||||
|
<el-input v-model="form.medicationStatusEnum" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="备注" prop="note">
|
||||||
|
<el-input v-model="form.note" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="saveForm">确认项目</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="skinRecord">
|
||||||
|
import { ref, computed } from 'vue';
|
||||||
|
import { ElMessage,ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
import { listSkinRecord,updateNurseSign,updateSkinTestRecord,lists } from './component/api';
|
||||||
|
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(1);
|
||||||
|
const dateRange = ref([]);
|
||||||
|
const skinRecordList = ref([]);
|
||||||
|
const skinResultList = ref([]);
|
||||||
|
const statusList = ref([]);
|
||||||
|
|
||||||
|
const open = ref(false);
|
||||||
|
|
||||||
|
const getStatusColor = (status) => {
|
||||||
|
return status !== '已完成' ? 'status-red' : '';
|
||||||
|
};
|
||||||
|
|
||||||
|
const getClinicalStatus = (status) => {
|
||||||
|
return status === '阳性' ? 'status-red' : '';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
encounterBusNo: undefined,
|
||||||
|
prescriptionNo: undefined,
|
||||||
|
patientBusNo: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { queryParams,form } = toRefs(data);
|
||||||
|
/** 表单重置 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
prescriptionNo: 0,
|
||||||
|
encounterBusNo: undefined,
|
||||||
|
patientName: undefined,
|
||||||
|
medicationInformation: undefined,
|
||||||
|
medicationDetail: undefined,
|
||||||
|
medicationLotNumber: undefined,
|
||||||
|
status: undefined,
|
||||||
|
clinicalStatusEnum: 0,
|
||||||
|
performerId_dictText: undefined,
|
||||||
|
performerCheckId_dictText: undefined,
|
||||||
|
occurrenceStartTime: undefined,
|
||||||
|
occurrenceEndTime: undefined,
|
||||||
|
medicationStatusEnum: undefined,
|
||||||
|
note: undefined,
|
||||||
|
};
|
||||||
|
proxy.resetForm("skinRecordRef");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询门诊皮试列表 */
|
||||||
|
function getList() {
|
||||||
|
listSkinRecord(queryParams.value).then(response => {
|
||||||
|
console.log("12346999999");
|
||||||
|
skinRecordList.value = response.data.records;
|
||||||
|
total.value = response.data.total;
|
||||||
|
});
|
||||||
|
lists().then(response => {
|
||||||
|
console.log("1234",response);
|
||||||
|
skinResultList.value = response.data.verificationStatus
|
||||||
|
statusList.value = response.data.clinicalStatus
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.beginTime = dateRange.value[0];
|
||||||
|
queryParams.value.endTime = dateRange.value[1];
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
|
console.log("123",queryParams.value,typeof queryParams.value.beginTime)
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
dateRange.value = [];
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
function handleUpdate(row) {
|
||||||
|
if (row.medicationStatusEnum_enumText === '已完成') {
|
||||||
|
// 如果状态是“已完成”,允许编辑
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
form.value = row;
|
||||||
|
} else {
|
||||||
|
// 如果状态不是“已完成”,提示用户
|
||||||
|
ElMessageBox.alert('请先领药', '提示', {
|
||||||
|
type: 'error',
|
||||||
|
center: true // 确保对话框居中
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function sign(row){
|
||||||
|
console.log("564564",row);
|
||||||
|
proxy.$modal.confirm('签字后无法修改信息').then(() => {
|
||||||
|
updateNurseSign(row).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("签名成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
}).catch(error => {
|
||||||
|
// 处理签名失败的逻辑
|
||||||
|
proxy.$modal.msgError("签名失败:" + error.message);
|
||||||
|
});
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveForm() {
|
||||||
|
if (form.value.startTime > form.value.endTime) {
|
||||||
|
ElMessage({
|
||||||
|
message: '开始时间不能大于结束时间',
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
// const index = skinRecordList.value.findIndex(item => item.id === form.id);
|
||||||
|
// const statusInfo = statusList.value.find(item => item.value === form.value.verificationStatusEnum)?.info || '';
|
||||||
|
// const clinicalStatusInfo = skinResultList.value.find(item => item.value === form.value.clinicalStatusEnum)?.info || '';
|
||||||
|
// if (index !== -1) {
|
||||||
|
// //暂存数据
|
||||||
|
// skinRecordList.value[index].verificationStatusEnum_enumText = statusInfo;
|
||||||
|
// skinRecordList.value[index].clinicalStatusEnum_enumText = clinicalStatusInfo;
|
||||||
|
// skinRecordList.value[index].occurrenceStartTime = form.occurrenceStartTime;
|
||||||
|
// skinRecordList.value[index].occurrenceEndTime = form.occurrenceEndTime;
|
||||||
|
// skinRecordList.value[index].note = form.note;
|
||||||
|
// console.log(skinRecordList.value[index]);
|
||||||
|
// }
|
||||||
|
console.log("564564",form.value);
|
||||||
|
// return;
|
||||||
|
updateSkinTestRecord(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("更新成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
open.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["patientRef"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
updateSkinTestRecord(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("更新成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.status-red {
|
||||||
|
color: red; /* 设置字体颜色为红色 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listOutpatienRecords(query) {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/records/outpatient-record-page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listDoctorNames() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/records/init',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
|
<el-form-item label="查询内容" prop="searchKey">
|
||||||
|
<el-input v-model="queryParams.searchKey" placeholder="身份证号/病人ID/门诊号/姓名" clearable style="width: 210px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="电话" prop="phone">
|
||||||
|
<el-input v-model="queryParams.phone" placeholder="请输入联系方式" clearable style="width: 200px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="起始时间">
|
||||||
|
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
|
||||||
|
start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="医生" prop="doctorName">
|
||||||
|
<el-select v-model="queryParams.doctorName" placeholder="请选择医生" clearable @keyup.enter="handleQuery"
|
||||||
|
style="width: 160px">
|
||||||
|
<el-option v-for="item in doctorOptions" :key="item.value" :label="item.label"
|
||||||
|
:value="item.label" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table :data="outpatienRecordsList" border style="width: 100%">
|
||||||
|
<el-table-column prop="name" label="患者" width="180" />
|
||||||
|
<el-table-column prop="idCard" label="身份证" width="180" />
|
||||||
|
<el-table-column prop="description" label="疾病" width="180" />
|
||||||
|
<el-table-column prop="patientBusNo" label="病人ID" width="180" />
|
||||||
|
<el-table-column prop="encounterBusNo" label="门诊号" width="180" />
|
||||||
|
<el-table-column prop="genderEnum_enumText" label="性别" width="80" />
|
||||||
|
<el-table-column prop="phone" label="电话" width="120" />
|
||||||
|
<el-table-column prop="encounterTime" label="就诊时间" width="180" />
|
||||||
|
<el-table-column prop="subjectStatusEnum_enumText" label="状态" width="120" />
|
||||||
|
<el-table-column prop="organizationName" label="接诊医院" width="180" />
|
||||||
|
<el-table-column prop="doctorName" label="接诊医生" width="180" />
|
||||||
|
<!-- <el-table-column prop="address" label="会诊医院" width="180" />
|
||||||
|
<el-table-column prop="workCompany" label="会诊医生工作单位" width="180" />
|
||||||
|
<el-table-column prop="organizationName" label="协同服务" width="180" /> -->
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="outpatienRecords">
|
||||||
|
import { ref, computed } from 'vue';
|
||||||
|
import { listOutpatienRecords, listDoctorNames } from "./component/api"
|
||||||
|
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const dateRange = ref([]);
|
||||||
|
const outpatienRecordsList = ref([]);
|
||||||
|
const doctorList = ref([]);
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
doctorName: undefined,
|
||||||
|
searchKey: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
patientid: undefined
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { queryParams } = toRefs(data);
|
||||||
|
|
||||||
|
const doctorOptions = computed(() => {
|
||||||
|
return doctorList.value.map((name, index) => ({
|
||||||
|
value: index, // 使用索引作为 value
|
||||||
|
label: name // 使用名字作为 label
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 查询门诊记录列表 */
|
||||||
|
function getList() {
|
||||||
|
listOutpatienRecords(queryParams.value).then(response => {
|
||||||
|
outpatienRecordsList.value = response.data.records;
|
||||||
|
total.value = response.data.total;
|
||||||
|
});
|
||||||
|
listDoctorNames().then(response => {
|
||||||
|
console.log(response);
|
||||||
|
// doctorList.value = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.beginTime = dateRange.value[0];
|
||||||
|
queryParams.value.endTime = dateRange.value[1];
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
|
console.log("123",queryParams.value,typeof queryParams.value.beginTime)
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
dateRange.value = [];
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
export function listmaritalstatus() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/list-maritalstatus',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listoccupationtype() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/list-occupationtype',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function lisadministrativegender() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/list-administrativegender',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listbloodtypeabo() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/list-bloodtypeabo',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function listbloodtypearh() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/list-bloodtypearh',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listfamilyrelationshiptype() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/list-familyrelationshiptype',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function addPatient(data) {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/patient-information',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询菜单列表
|
||||||
|
export function listPatient(query) {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/patient-information-page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function lists() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/init',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function updatePatient(data) {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/information/patient-information',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,453 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
|
<el-form-item label="病人名称" prop="name">
|
||||||
|
<el-input v-model="queryParams.name" placeholder="请输入病人名称/缩写" clearable style="width: 200px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="病人ID" prop="busNo">
|
||||||
|
<el-input v-model="queryParams.busNo" placeholder="请以输入病人ID" clearable style="width: 200px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:menu:add']">添加病人</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table :data="patientList" border style="width: 100%">
|
||||||
|
<el-table-column prop="idCard" label="身份证号" width="180" />
|
||||||
|
<el-table-column prop="busNo" label="病人ID" width="180" />
|
||||||
|
<el-table-column prop="name" label="病人名称" width="180" />
|
||||||
|
<el-table-column prop="genderEnum_enumText" label="性别" width="180" />
|
||||||
|
<el-table-column prop="maritalStatusEnum_enumText" label="婚姻状况" width="180" /><!--:formatter="formatMaritalStatus"-->
|
||||||
|
<el-table-column prop="nationalityCode" label="民族" width="180" />
|
||||||
|
<el-table-column prop="birthDate" label="生日" width="160" />
|
||||||
|
<el-table-column prop="phone" label="电话" width="140" />
|
||||||
|
<el-table-column prop="bloodAbo_text" label="血型ABO" width="140" />
|
||||||
|
<el-table-column prop="bloodRh_enumText" label="血型RH" width="140" />
|
||||||
|
<el-table-column prop="linkName" label="联系人" width="180" />
|
||||||
|
<el-table-column prop="linkTelcom" label="联系人电话" width="180" />
|
||||||
|
<el-table-column prop="linkRelationCode_enumText" label="联系人关系" width="180" />
|
||||||
|
<el-table-column prop="address" label="家庭地址" width="180" />
|
||||||
|
<el-table-column prop="prfsEnum_enumText" label="职业" width="180" />
|
||||||
|
<el-table-column prop="workCompany" label="工作单位" width="180" />
|
||||||
|
<el-table-column prop="organizationName" label="登记医院" width="180" />
|
||||||
|
<el-table-column prop="deceasedDate" label="死亡时间" width="180" />
|
||||||
|
<el-table-column prop="createTime" label="登记时间" width="180" />
|
||||||
|
<el-table-column label="操作" align="center" width="210" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:menu:edit']">修改</el-button>
|
||||||
|
<el-button link type="primary" icon="View" @click="handleSee(scope.row)" v-hasPermi="['system:menu:add']">查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 添加或修改对话框 -->
|
||||||
|
<el-dialog :title="title" v-model="open" width="980px" append-to-body>
|
||||||
|
<el-form ref="patientRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="姓名" prop="name">
|
||||||
|
<el-input v-model="form.name" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="其他姓名" prop="nameJson">
|
||||||
|
<el-input v-model="form.nameJson" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="民族" prop="nationalityCode">
|
||||||
|
<el-input v-model="form.nationalityCode" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<!-- <el-col :span="6">
|
||||||
|
<el-form-item label="年龄" prop="age">
|
||||||
|
<el-input v-model="form.age" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="性别" prop="genderEnum">
|
||||||
|
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode">
|
||||||
|
<el-radio v-for="item in administrativegenderList" :key="item.value" :label="item.value" >
|
||||||
|
{{ item.info }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="活动标识" prop="tempFlag">
|
||||||
|
<el-radio-group v-model="form.tempFlag" :disabled="isViewMode">
|
||||||
|
<el-radio v-for="dict in patient_temp_flag" :key="dict.value" :label="dict.value" >
|
||||||
|
{{ dict.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="证件类别" prop="idType">
|
||||||
|
<el-select v-model="form.idType" placeholder="证件类别" clearable :disabled="isViewMode">
|
||||||
|
<el-option v-for="dict in sys_idtype"
|
||||||
|
:key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="证件号码" prop="idCard">
|
||||||
|
<el-input v-model="form.idCard" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="国家编码" prop="countryCode">
|
||||||
|
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="联系方式" prop="phone">
|
||||||
|
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="职业" prop="prfsEnum">
|
||||||
|
<el-select v-model="form.prfsEnum" placeholder="职业" clearable :disabled="isViewMode">
|
||||||
|
<el-option v-for="item in occupationtypeList"
|
||||||
|
:key="item.value" :label="item.info" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="工作单位" prop="workCompany">
|
||||||
|
<el-input v-model="form.workCompany" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="联系人" prop="linkName">
|
||||||
|
<el-input v-model="form.linkName" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系人关系" prop="linkRelationCode">
|
||||||
|
<el-select v-model="form.linkRelationCode" placeholder="联系人关系" clearable :disabled="isViewMode">
|
||||||
|
<el-option v-for="item in familyrelationshiptypeList"
|
||||||
|
:key="item.value" :label="item.info" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="联系人电话" prop="linkRelationCode">
|
||||||
|
<el-input v-model="form.linkTelcom" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="地址选择" prop="addressSelect">
|
||||||
|
<!-- <RegionFullGroup v-model="form.addressSelectvalue" @change="handleChangeAddress" :disabled="isViewMode"/> -->
|
||||||
|
<el-cascader :options="options" :props="{ checkStrictly: true, value: 'code', label: 'name' }"
|
||||||
|
v-model="selectedOptions" @change="handleChange" :disabled="isViewMode">
|
||||||
|
<template #default="{ node, data }">
|
||||||
|
<span>{{ data.name }}</span>
|
||||||
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||||
|
</template>
|
||||||
|
</el-cascader>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="详细地址" prop="address">
|
||||||
|
<el-input v-model="form.address" clearable :disabled="isViewMode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="血型ABO" prop="bloodAbo">
|
||||||
|
<el-select v-model="form.bloodAbo" placeholder="血型ABO" clearable :disabled="isViewMode">
|
||||||
|
<el-option v-for="item in bloodtypeaboList"
|
||||||
|
:key="item.value" :label="item.info" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="血型RH" prop="bloodRh">
|
||||||
|
<el-select v-model="form.bloodRh" placeholder="血型RH" clearable :disabled="isViewMode">
|
||||||
|
<el-option v-for="item in bloodtypearhList"
|
||||||
|
:key="item.value" :label="item.info" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="婚姻状态" prop="maritalStatusEnum">
|
||||||
|
<el-select v-model="form.maritalStatusEnum" placeholder="婚姻状态" clearable :disabled="isViewMode">
|
||||||
|
<el-option v-for="item in maritalstatusList"
|
||||||
|
:key="item.value" :label="item.info" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="死亡时间" prop="deceasedDate">
|
||||||
|
<el-date-picker v-model="form.deceasedDate" type="datetime" placeholder="请选择时间"
|
||||||
|
format="YYYY/MM/DD HH:mm:ss" :disabled="isViewMode" value-format="YYYY/MM/DD HH:mm:ss"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="patientManagement">
|
||||||
|
import pcas from 'china-division/dist/pcas-code.json';
|
||||||
|
import { ref, computed } from 'vue';
|
||||||
|
import {listmaritalstatus,listoccupationtype,lisadministrativegender,listbloodtypeabo,listbloodtypearh,listfamilyrelationshiptype,
|
||||||
|
addPatient,listPatient,updatePatient,lists} from "./component/api"
|
||||||
|
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const open = ref(false);
|
||||||
|
const title = ref("");
|
||||||
|
const total = ref();
|
||||||
|
const patientList = ref([])
|
||||||
|
const maritalstatusList = ref([]) //婚姻
|
||||||
|
const occupationtypeList = ref([]) //职业
|
||||||
|
const administrativegenderList = ref([]) //性别
|
||||||
|
const bloodtypeaboList = ref([]) //血型abo
|
||||||
|
const bloodtypearhList = ref([]) //血型RH
|
||||||
|
const familyrelationshiptypeList = ref([]) //家庭关系
|
||||||
|
const addressCom = ref(""); //地址
|
||||||
|
|
||||||
|
const options = ref(pcas); // 地区数据
|
||||||
|
const selectedOptions = ref([]); // v-model 绑定的选中值
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
const { patient_gender_enum,sys_idtype,prfs_enum,blood_rh,blood_abo,marital_status_enum,patient_temp_flag,link_relation_code} =
|
||||||
|
proxy.useDict("patient_gender_enum", "sys_idtype","prfs_enum","blood_rh","blood_abo","marital_status_enum","patient_temp_flag","link_relation_code");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
isViewMode: false,
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
busNo: undefined
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
|
||||||
|
idCard: [
|
||||||
|
{ required: true, message: '证件号码不能为空', trigger: 'blur' },
|
||||||
|
{ min: 18, message: '证件号码不能少于18位', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
phone: [{ required: true, message: "联系方式不能为空", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { queryParams, form, rules,isViewMode } = toRefs(data);
|
||||||
|
|
||||||
|
const handleChange = () => {
|
||||||
|
const checkedNodes = selectedOptions.value.map((code) => {
|
||||||
|
const node = findNodeByCode(options.value, code);
|
||||||
|
return node ? node.name : null;
|
||||||
|
});
|
||||||
|
form.value.addressProvince = checkedNodes[0] || '';
|
||||||
|
form.value.addressCity = checkedNodes[1] || '';
|
||||||
|
form.value.addressDistrict = checkedNodes[2] || '';
|
||||||
|
form.value.addressStreet = checkedNodes[3] || '';
|
||||||
|
form.value.address = '';
|
||||||
|
};
|
||||||
|
|
||||||
|
// 递归查找节点
|
||||||
|
const findNodeByCode = (data, code) => {
|
||||||
|
for (const item of data) {
|
||||||
|
if (item.code === code) return item;
|
||||||
|
if (item.children) {
|
||||||
|
const result = findNodeByCode(item.children, code);
|
||||||
|
if (result) return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 查询菜单列表 */
|
||||||
|
function getList() {
|
||||||
|
listPatient(queryParams.value).then(response => {
|
||||||
|
patientList.value = response.data.records
|
||||||
|
total.value = response.data.total;
|
||||||
|
});
|
||||||
|
lists().then(response => {
|
||||||
|
console.log(response);
|
||||||
|
occupationtypeList.value = response.data.occupationType
|
||||||
|
administrativegenderList.value = response.data.administrativeGender
|
||||||
|
bloodtypeaboList.value = response.data.bloodTypeABO
|
||||||
|
bloodtypearhList.value = response.data.bloodTypeRH
|
||||||
|
familyrelationshiptypeList.value = response.data.familyRelationshipType
|
||||||
|
maritalstatusList.value = response.data.maritalStatus
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
name: undefined,
|
||||||
|
nameJson: undefined,
|
||||||
|
menuName: undefined,
|
||||||
|
age: undefined,
|
||||||
|
genderEnum: 0,
|
||||||
|
idType: undefined,
|
||||||
|
idCard: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
prfsEnum: undefined,
|
||||||
|
address: undefined,
|
||||||
|
tempFlag: undefined,
|
||||||
|
countryCode: undefined,
|
||||||
|
bloodRh: undefined,
|
||||||
|
bloodAbo: undefined,
|
||||||
|
nationalityCode: undefined,
|
||||||
|
deceasedDate: undefined,
|
||||||
|
linkName: undefined,
|
||||||
|
linkRelationCode: undefined,
|
||||||
|
linkTelcom: undefined,
|
||||||
|
workCompany: undefined,
|
||||||
|
addressCity: undefined,
|
||||||
|
addressDistrict: undefined,
|
||||||
|
addressStreet: undefined,
|
||||||
|
addressProvince: undefined,
|
||||||
|
maritalStatusEnum: undefined,
|
||||||
|
busNo: undefined,
|
||||||
|
organizationId: undefined,
|
||||||
|
};
|
||||||
|
proxy.resetForm("patientRef");
|
||||||
|
}
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
selectedOptions.value = []
|
||||||
|
isViewMode.value = false;
|
||||||
|
open.value = true;
|
||||||
|
title.value = "添加病人";
|
||||||
|
}
|
||||||
|
//查看按钮
|
||||||
|
function handleSee(row){
|
||||||
|
isViewMode.value = true;
|
||||||
|
form.value = row;
|
||||||
|
open.value = true;
|
||||||
|
title.value = "查看病人";
|
||||||
|
}
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
form.value = JSON.parse(JSON.stringify(row));
|
||||||
|
addressCom.value = row.addressProvince + row.addressCity + row.addressDistrict + row.addressStreet + row.address
|
||||||
|
const selectedOptions1 = ref([row.addressProvince,row.addressCity,row.addressDistrict,row.addressStreet])
|
||||||
|
const codes = convertAddressToCodes(selectedOptions1.value);
|
||||||
|
selectedOptions.value = codes.filter(code => code !== null);
|
||||||
|
isViewMode.value = false;
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改菜单";
|
||||||
|
}
|
||||||
|
const convertAddressToCodes = (selectedOptions1) => {
|
||||||
|
const [provinceName, cityName, areaName, streetName] = selectedOptions1;
|
||||||
|
const findCode = (data, name) => {
|
||||||
|
for (const item of data) {
|
||||||
|
if (item.name === name) {
|
||||||
|
return item.code;
|
||||||
|
}
|
||||||
|
if (item.children) {
|
||||||
|
const result = findCode(item.children, name);
|
||||||
|
if (result) return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
const provinceCode = findCode(options.value, provinceName);
|
||||||
|
const cityCode = findCode(options.value, cityName);
|
||||||
|
const areaCode = findCode(options.value, areaName);
|
||||||
|
const streetCode = findCode(options.value, streetName);
|
||||||
|
return [provinceCode, cityCode, areaCode, streetCode];
|
||||||
|
};
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
// 获取完整地址字符串
|
||||||
|
function getAddress(form) {
|
||||||
|
const addressParts = [
|
||||||
|
form.value.addressProvince,
|
||||||
|
form.value.addressCity,
|
||||||
|
form.value.addressDistrict,
|
||||||
|
form.value.addressStreet,
|
||||||
|
form.value.address,
|
||||||
|
];
|
||||||
|
// 使用 reduce 方法拼接地址
|
||||||
|
return addressParts.reduce((acc, part) => {
|
||||||
|
return part ? acc + part : acc;
|
||||||
|
}, "");
|
||||||
|
}
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["patientRef"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.value.busNo != undefined) {
|
||||||
|
const newAddress = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address
|
||||||
|
if (addressCom.value !== newAddress) {
|
||||||
|
form.value.address = getAddress(form);
|
||||||
|
}
|
||||||
|
updatePatient(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
form.value.address = getAddress(form);
|
||||||
|
console.log("/***/*/*/*/*/*/*/*/*/")
|
||||||
|
// form.value.address = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address
|
||||||
|
addPatient(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getList();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user