This commit is contained in:
菲菲
2025-03-17 14:31:30 +08:00
parent 7c6cb39f83
commit 0266e941c5
8 changed files with 142 additions and 72 deletions

View File

@@ -1,8 +1,8 @@
import request from '@/utils/request' import request from '@/utils/request'
export function listSkinRecord(query) { export function listInfusionRecord(query) {
return request({ return request({
url: '/outpatientmanage/outpatient-record-page', url: '/outpatientmanage/infusion/init',
method: 'get', method: 'get',
params: query params: query
}) })

View File

@@ -1,8 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container-infusion">
<div class="left"> <div class="left">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="入院日期" prop="patientname"> <el-form-item label="医嘱执行时间" prop="patientname">
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-" <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> start-placeholder="开始日期" end-placeholder="结束日期" style="width: auto;"></el-date-picker>
</el-form-item> </el-form-item>
@@ -34,14 +34,11 @@
<div class="right"> <div class="right">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"> <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="结束日期" ></el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</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="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-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>
@@ -49,11 +46,15 @@
</el-form> </el-form>
<div> <div>
<p style="margin: 0px 0px 10px 0px;">院注医嘱</p> <p style="margin: 0px 0px 10px 0px;">院注医嘱</p>
<el-table :data="infusionList" border style="width: 100%;height: 300px;" @selection-change="handleSelectionChange"> <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 type="selection" width="55" align="center" />
<el-table-column prop="executionCount" label="组" width="60" /> <el-table-column prop="groupId" label="组" width="60" />
<el-table-column prop="executionCount" label="已执行次数" width="100" /> <el-table-column prop="executionCount" label="已执行次数" width="100" />
<el-table-column prop="doctorId_dictText" 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="medicationInformation" label="药品信息" width="180" />
<el-table-column prop="medicationAntity" label="药品数量" width="80" /> <el-table-column prop="medicationAntity" label="药品数量" width="80" />
<el-table-column prop="rateCode" label="用药频次" width="80" /> <el-table-column prop="rateCode" label="用药频次" width="80" />
@@ -63,22 +64,27 @@
<el-table-column prop="medicationStatusEnum_enumText" label="药品状态" width="100" /> <el-table-column prop="medicationStatusEnum_enumText" label="药品状态" width="100" />
<el-table-column prop="flagText" label="是否皮试" width="60" /> <el-table-column prop="flagText" label="是否皮试" width="60" />
<el-table-column prop="clinicalStatusEnum_enumText" 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> </el-table>
</div> </div>
<div> <div>
<p style="margin: 13px 0px 10px 0px;">院注执行历史</p> <p style="margin: 13px 0px 10px 0px;">院注执行历史</p>
<el-table :data="historyRecordsList" border style="width: 100%;max-height: 250px;"> <el-table :data="historyRecordsList" border style="width: 100%;height: 250px;">
<el-table-column prop="name" label="执行时间" width="150" /> <el-table-column prop="occurrenceStartTime" label="执行时间" width="150" />
<el-table-column prop="genderEnum_enumText" label="执行人" width="80" /> <el-table-column prop="performerId_dictText" label="执行人" width="80" />
<el-table-column prop="name" label="患者姓名" width="100" /> <el-table-column prop="prescriptionNo" label="处方号" width="100" />
<el-table-column prop="idCard" label="开单医生" width="100" /> <el-table-column prop="doctorId_dictText" label="开单医生" width="100" />
<el-table-column prop="description" label="科别" width="120" /> <el-table-column prop="medicationInformation" label="药品信息" width="180" />
<el-table-column prop="phone" label="医嘱" width="160" /> <el-table-column prop="medicationAntity" label="药品数量" width="80" />
<el-table-column prop="encounterTime" label="" width="50" /> <el-table-column prop="rateCode" label="用药频次" width="80" />
<el-table-column prop="subjectStatusEnum_enumText" label="频次" width="80" /> <el-table-column prop="dose" label="单词剂量" width="160" />
<el-table-column prop="organizationName" label="每次量" width="80" /> <el-table-column prop="speed" label="输液速度" width="80" />
<el-table-column prop="doctorName" label="用法" width="160" /> <el-table-column prop="orgId_dictText" label="发放科室" width="120" />
<el-table-column prop="encounterBusNo" label="医嘱备注" width="180" /> <el-table-column prop="medicationStatusEnum_enumText" label="药品状态" width="100" />
</el-table> </el-table>
</div> </div>
</div> </div>
@@ -93,17 +99,26 @@
<script setup name="InfusionRecord"> <script setup name="InfusionRecord">
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import { listPatients,updateInfusionRecord } from './component/api'; import { listPatients,updateInfusionRecord,listInfusionRecord } from './component/api';
// import prescriptioncard from './component/prescription.vue' // import prescriptioncard from './component/prescription.vue'
const showSearch = ref(true); const showSearch = ref(true);
const showPrescription = ref(false); const showPrescription = ref(false);
const total = ref(1); const total = ref(1);
const tableRef = ref(null);
const selectedGroupIds = ref(new Set());
const currentRow = ref(null); const currentRow = ref(null);
const dateRange = ref([]); const dateRange = ref([]);
const historyRecordsList = ref([]) const historyRecordsList = ref([])
const patientList = ref([]); const patientList = ref([]);
const infusionList = 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 ids = ref([]);
@@ -122,7 +137,7 @@ const { queryParams } = toRefs(data);
/** 查询门诊输液列表 */ /** 查询门诊输液列表 */
function getList() { function getList() {
// listJobLog(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => { // listInfusionRecord(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
// jobLogList.value = response.rows; // jobLogList.value = response.rows;
// total.value = response.total; // total.value = response.total;
// loading.value = false; // loading.value = false;
@@ -138,7 +153,9 @@ function getList() {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
queryParams.value.pageNum = 1; queryParams.value.beginTime = dateRange.value[0];
queryParams.value.endTime = dateRange.value[1];
queryParams.value.pageNo = 1;
getList(); getList();
} }
/** 重置按钮操作 */ /** 重置按钮操作 */
@@ -156,10 +173,60 @@ function handleSubmit(){
}); });
} }
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) { function handleSelectionChange(selection) {
ids.value = selection.map(item => item.dictId); // 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) { function handleCurrentChange(row) {
currentRow.value = row; // 更新当前选中行的数据 currentRow.value = row; // 更新当前选中行的数据
@@ -170,8 +237,9 @@ getList();
</script> </script>
<style scoped> <style>
.app-container { .app-container-infusion {
padding: 20px;
display: flex; display: flex;
} }
.left { .left {
@@ -181,10 +249,8 @@ getList();
margin-left: 2%; margin-left: 2%;
width: 72%; width: 72%;
} }
/* .el-table__row--current { .selected-row {
background-color: rgb(70, 211, 28) ; background-color: #effae8 !important;
} */ }
/* .el-table__body tr.current-row>td.el-table__cell {
background-color: #9b804e;
} */
</style> </style>

View File

@@ -2,22 +2,15 @@ import request from '@/utils/request'
export function listSkinRecord(query) { export function listSkinRecord(query) {
return request({ return request({
url: '/outpatientmanage/outpatient-record-page', url: '/outpatientmanage/skintest/outpatient-record-page',
method: 'get', method: 'get',
params: query params: query
}) })
} }
export function listStatus() { export function lists() {
return request({ return request({
url: '/outpatientmanage/list-skinteststatus', url: '/outpatientmanage/skintest/init',
method: 'get',
})
}
export function listSkinResult() {
return request({
url: '/outpatientmanage/list-skintestresult',
method: 'get', method: 'get',
}) })
} }

View File

@@ -193,7 +193,7 @@
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import { ElMessage,ElMessageBox } from 'element-plus' import { ElMessage,ElMessageBox } from 'element-plus'
import { listSkinRecord,listStatus,listSkinResult,updateNurseSign,updateSkinTestRecord } from './component/api'; import { listSkinRecord,updateNurseSign,updateSkinTestRecord,lists } from './component/api';
const showSearch = ref(true); const showSearch = ref(true);
const total = ref(1); const total = ref(1);
@@ -252,15 +252,13 @@ function reset() {
/** 查询门诊皮试列表 */ /** 查询门诊皮试列表 */
function getList() { function getList() {
listSkinRecord(queryParams.value).then(response => { listSkinRecord(queryParams.value).then(response => {
console.log("1234",response);
skinRecordList.value = response.data.records; skinRecordList.value = response.data.records;
total.value = response.data.total; total.value = response.data.total;
}); });
listStatus().then(response => { lists().then(response => {
statusList.value = response.data console.log("1234",response);
}); skinResultList.value = response.data.verificationStatus
listSkinResult().then(response => {6 statusList.value = response.data.clinicalStatus
skinResultList.value = response.data
}); });
} }

View File

@@ -10,7 +10,7 @@ export function listOutpatienRecords(query) {
export function listDoctorNames() { export function listDoctorNames() {
return request({ return request({
url: '/patientmanage/records/list-doctornames', url: '/patientmanage/records/init',
method: 'get', method: 'get',
}) })
} }

View File

@@ -82,11 +82,11 @@ const doctorOptions = computed(() => {
/** 查询门诊记录列表 */ /** 查询门诊记录列表 */
function getList() { function getList() {
listOutpatienRecords(queryParams.value).then(response => { listOutpatienRecords(queryParams.value).then(response => {
console.log(response);
outpatienRecordsList.value = response.data.records; outpatienRecordsList.value = response.data.records;
total.value = response.data.total; total.value = response.data.total;
}); });
listDoctorNames().then(response => { listDoctorNames().then(response => {
console.log(response);
doctorList.value = response.data; doctorList.value = response.data;
}); });
} }

View File

@@ -61,6 +61,12 @@ export function listPatient(query) {
params: query params: query
}) })
} }
export function lists() {
return request({
url: '/patientmanage/information/init',
method: 'get'
})
}
// 修改 // 修改
export function updatePatient(data) { export function updatePatient(data) {

View File

@@ -225,7 +225,7 @@
import pcas from 'china-division/dist/pcas-code.json'; import pcas from 'china-division/dist/pcas-code.json';
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import {listmaritalstatus,listoccupationtype,lisadministrativegender,listbloodtypeabo,listbloodtypearh,listfamilyrelationshiptype, import {listmaritalstatus,listoccupationtype,lisadministrativegender,listbloodtypeabo,listbloodtypearh,listfamilyrelationshiptype,
addPatient,listPatient,updatePatient} from "./component/api" addPatient,listPatient,updatePatient,lists} from "./component/api"
const showSearch = ref(true); const showSearch = ref(true);
const open = ref(false); const open = ref(false);
@@ -298,24 +298,30 @@ function getList() {
patientList.value = response.data.records patientList.value = response.data.records
total.value = response.data.total; total.value = response.data.total;
}); });
listmaritalstatus().then(response => { lists().then(response => {
maritalstatusList.value = response.data console.log(response);
}); occupationtypeList.value = response.data.occupationType
listoccupationtype().then(response => { administrativegenderList.value = response.data.administrativeGender
occupationtypeList.value = response.data bloodtypeaboList.value = response.data.bloodTypeABO
}); bloodtypearhList.value = response.data.bloodTypeRH
lisadministrativegender().then(response => { familyrelationshiptypeList.value = response.data.familyRelationshipType
administrativegenderList.value = response.data maritalstatusList.value = response.data.maritalStatus
});
listbloodtypeabo().then(response => {
bloodtypeaboList.value = response.data
});
listbloodtypearh().then(response => {
bloodtypearhList.value = response.data
});
listfamilyrelationshiptype().then(response => {
familyrelationshiptypeList.value = response.data
}); });
// listoccupationtype().then(response => {
// occupationtypeList.value = response.data
// });
// lisadministrativegender().then(response => {
// administrativegenderList.value = response.data
// });
// listbloodtypeabo().then(response => {
// bloodtypeaboList.value = response.data
// });
// listbloodtypearh().then(response => {
// bloodtypearhList.value = response.data
// });
// listfamilyrelationshiptype().then(response => {
// familyrelationshiptypeList.value = response.data
// });
} }
/** 表单重置 */ /** 表单重置 */
@@ -443,6 +449,7 @@ function submitForm() {
}); });
} else { } else {
form.value.address = getAddress(form); 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 // form.value.address = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address
addPatient(form.value).then(response => { addPatient(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功"); proxy.$modal.msgSuccess("新增成功");