初级二级报告审核

This commit is contained in:
wyuu 2025-11-26 18:09:02 +08:00
parent 57e11ad63c
commit 53ed0eb7dd
11 changed files with 575 additions and 978 deletions

View File

@ -132,3 +132,11 @@ export function getmediumList(data?: Object) {
params: data
})
}
//微生物报告审核
export function cbebCheck(data?: Object) {
return request({
url: '/lisworkgerm/check',
method: 'get',
params: data
})
}

View File

@ -287,3 +287,20 @@ aside {
}
}
}
.next_box {
display: flex;
align-items: center;
justify-content: space-between;
.jtIcon {
width: 2.5rem;
height: 2rem;
line-height: 2rem;
font-size: 1rem;
text-align: center;
background-color: #1f6dd3;
color: #fff;
cursor: pointer;
}
}

View File

@ -7,8 +7,20 @@
class="compact-form">
<el-row :gutter="5">
<el-col :span="6">
<el-form-item label="样本号:" prop="ybh">
<el-form-item label="" prop="ybh">
<div class="next_box">
<div class="jtIcon" @click="handlePrev">
<el-icon>
<ArrowUpBold />
</el-icon>
</div>
<el-input v-model="labInfo.ybh" placeholder="样本编号" @keyup.enter="handleQuery" style="width:100%" />
<div class="jtIcon" @click="handleNext">
<el-icon>
<ArrowDownBold />
</el-icon>
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="6">
@ -51,13 +63,14 @@
<el-col :span="16">
<el-tabs v-model="activeName" type="card" class="demo-tabs">
<el-tab-pane label="鉴定(终报)结果" name="first">
<ZbReport ref="labResultRef" v-model:labPat="labInfo" :labPatKey="queryParams" :dictData="dictData"
:labResutsData="zbLabResuts" @fetchLabResults="resultsHandle" @changeStatus="changeStatus"
@previewHandle="previewHandle" />
<ZbReport ref="labResultRef" v-model:labPat="labInfo" :labPatKey="queryParams"
@update:labPatKey="queryParams = $event" :dictData="dictData" :labResutsData="zbLabResuts"
@fetchLabResults="resultsHandle" @changeStatus="changeStatus" @previewHandle="previewHandle" />
</el-tab-pane>
<el-tab-pane label="初级和二级报告" name="second">
<CbReport v-model:labPat="labInfo" :labPatKey="queryParams" :instrdComOpt="instrdComOpt"
:dictData="dictData" @changeStatus="changeStatus" @previewHandle="previewHandle" />
<CbReport v-model:labPat="labInfo" :labPatKey="queryParams" @update:labPatKey="queryParams = $event"
:instrdComOpt="instrdComOpt" :dictData="dictData" @changeStatus="changeStatus" :userList="userList"
@previewHandle="previewHandle" />
</el-tab-pane>
<el-tab-pane label="培养基接种" name="third">
<Byj :labPat="labInfo" :labPatKey="queryParams" />
@ -190,7 +203,8 @@ const queryParams = ref({
problemId: 0,
days: -1,
pageSize: 600,
pageNum: 1
pageNum: 1,
yhdh: ''
})
@ -757,6 +771,8 @@ const sendMessage = () => {
background: #F0F3F8;
}
:deep(.el-tabs--card>.el-tabs__header) {
height: 1.875rem !important;
margin-bottom: 0px;

View File

@ -1,18 +1,21 @@
<template>
<div>
<div class="mb5">
<el-button type="primary" plain size="small">打印培养基条码</el-button> &nbsp;
<div class="top-btns">
<el-button type="primary" plain size="small" @click="printHandle">打印培养基条码</el-button> &nbsp;
<el-checkbox v-model="checked">自动打印培养基条码</el-checkbox>
</div>
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
@column-drag-end="handleColumnDragEnd">
@column-drag-end="handleColumnDragEnd" @selection-change="handleSelectionChange">
<template #mediumname="{ column }">
培养基 {{ tableData.length }}个
</template>
</CustomTable>
</div>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue';
import { getmediumList } from '@/api/liswork/micro/index'
import { getmediumList } from '@/api/liswork/micro/index';
const props = defineProps({
labPat: {
@ -32,22 +35,32 @@ const checked = ref(false);
const tableRef = ref();
const tableData = ref([]);
const columns = ref([
{ label: "培养基", prop: "zhxmdh", align: 'center', visible: true, headerSlot: 'xmdh', width: 100 },
{ label: "接种时间", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
{ label: "培养基结果", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
{ label: "转种类型", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
{ label: "培养周期(小时)", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
{ label: "观察间隔(小时)", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
{ type: "selection", width: 40, align: 'center', visible: true },
{ label: "培养基", prop: "mediumname", align: 'center', visible: true, width: 80, headerSlot: 'mediumname' },
{ label: "接种时间", prop: "sheetdate", align: 'center', visible: true, width: 120 },
{ label: "接种人", prop: "sheetuser", align: 'center', visible: true, width: 60 },
{ label: "培养基结果", prop: "mediu", align: 'center', visible: true, },
{ label: "转种类型", prop: "comments", align: 'center', visible: true, },
{ label: "培养周期(小时)", prop: "conidtions", align: 'center', visible: true, width: 100 },
{ label: "观察间隔(小时)", prop: "watchinterval", align: 'center', visible: true, width: 100 },
]);
const tableConfig = ref({
border: true,
height: '100%',
height: '74vh',
})
const handleColumnDragEnd = (data: any) => {
columns.value = data.columns;
}
const handleSelectionChange = (selection: any) => {
console.log(selection);
}
const printHandle = () => {
console.log('打印培养基条码');
}
const getbyjList = () => {
const data = {
jyrq: labPat.value.jyrq,
@ -70,4 +83,10 @@ watch(() => props.labPat, (newValue) => {
</script>
<style scoped></style>
<style scoped lang="scss">
.top-btns {
margin-bottom: .3125rem;
display: flex;
align-items: center;
}
</style>

View File

@ -2,24 +2,26 @@
<div>
<div class="title">
<div>
<span>初报人:</span>{{ cbInfo?.confirmer }} &nbsp;&nbsp; <span>报告时间:</span>{{ cbInfo?.confirmdt }}&nbsp;&nbsp;
<span>初报人:</span>{{ formatUser(cbInfo?.confirmer) }} &nbsp;&nbsp; <span>报告时间:</span>{{ cbInfo?.confirmdt
}}&nbsp;&nbsp;
</div>
<div><span>{{ cbInfo?.jgbz == '2' ? '已初报' : '' }}</span></div>
</div>
<div>
<el-button class="btn_green btns_box" :size="autoSize" v-if="cbInfo?.jgbz != 2"
@click="handleCheck(1, 'cb')">初报审核</el-button>
<el-button class="btns_box" :size="autoSize" v-if="cbInfo?.jgbz == 2"
@click="handleCheck(2, 'cb')">取消审核</el-button>
@click="handleCheck(3)">初报审核</el-button>
<el-button class="btns_box" :size="autoSize" v-if="cbInfo?.jgbz == 2" @click="handleCheck(-3)">取消审核</el-button>
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="cbInfo?.jgbz == '2'"
@click="openItemDictDialog(1)">新增</el-button>
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="cbInfo?.jgbz == '2'" plain
@click="handleBatchDelete(1)">删除</el-button>
<el-button class="btn_green btns_box" :size="autoSize" :disabled="cbInfo?.jgbz == '2'"
@click="zhHandel(1)">组合项目</el-button>
<el-button type="primary" plain class=" btns_box" @click="printHandle(1)">打印</el-button>
<el-button type="primary" plain class=" btns_box" @click="previewHandle(2)">预览</el-button>
</div>
<CustomTable :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
@column-drag-end="handleColumnDragEnd">
@column-drag-end="handleColumnDragEnd" @row-click="cbRowClick">
<template #xmdh="{ column }">
细菌/结果({{ tableData.length }})项
</template>
@ -62,24 +64,26 @@
<div class="title ertext">
<div>
<span>二报人:</span>{{ erInfo?.confirmer }} &nbsp;&nbsp; <span>报告时间:</span>{{ erInfo?.confirmdt }}&nbsp;&nbsp;
<span>二报人:</span>{{ formatUser(erInfo?.confirmer) }} &nbsp;&nbsp; <span>报告时间:</span>{{ erInfo?.confirmdt
}}&nbsp;&nbsp;
</div>
<div><span>{{ erInfo?.jgbz == '2' ? '已二报' : '' }}</span></div>
</div>
<div>
<el-button class="btn_green btns_box" :size="autoSize" v-if="erInfo?.jgbz != 2"
@click="handleCheck(1, 'erb')">二报审核</el-button>
<el-button class="btns_box" :size="autoSize" v-if="erInfo?.jgbz == 2"
@click="handleCheck(2, 'erb')">取消审核</el-button>
@click="handleCheck(4)">二报审核</el-button>
<el-button class="btns_box" :size="autoSize" v-if="erInfo?.jgbz == 2" @click="handleCheck(-4)">取消审核</el-button>
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="erInfo?.jgbz == '2'"
@click="openItemDictDialog(2)">新增</el-button>
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="erInfo?.jgbz == '2'" plain
@click="handleBatchDelete(2)">删除</el-button>
<el-button class="btn_green btns_box" :size="autoSize" :disabled="erInfo?.jgbz == '2'"
@click="zhHandel(2)">组合项目</el-button>
<el-button type="primary" plain class=" btns_box" @click="printHandle(2)">打印</el-button>
<el-button type="primary" plain class=" btns_box" @click="previewHandle(2)">预览</el-button>
</div>
<CustomTable :data="tableData2" :columns="columns" :config="tableConfig" :enable-column-drag="true"
@column-drag-end="handleColumnDragEnd">
@column-drag-end="handleColumnDragEnd" @row-click="erbRowClick">
<template #xmdh="{ column }">
细菌/结果({{ tableData2.length }})项
</template>
@ -129,25 +133,34 @@
<!-- 组合项目 -->
<Combined ref="combinedRef" :queryParams="labPatKey" @dbMbHandle="combinedHandel" />
<!-- 校验用户 -->
<CheckUser ref="checkUserRef" :title="checktitle" @onConfirm="handleCheckUserConfirm" />
<!-- 取消审核操作原因 -->
<Unconfirmlog ref="unconfirmlogRef" :reasonText="reasonText" :tableKey="labPatKey" @onConfirm="proceedCheck" />
<!-- 危急值结果上报 -->
<UploadWarning ref="uploadwarningRef" :warningMsgdata="warningMsgdata" :tableKey="labPatKey"
@onupload="proceedCheck" />
</div>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
import { LabResultItem, ymTableDataItem } from '@/types/index';
import { changeresult, saveresult, newresult, sampleMedInfo } from '@/api/liswork/micro/index';
import {
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, allPatquery, emrquery, datalink, changeLinkList,
viewBackup, queryXmVal, printListwork, getresultchangelog, setinputmdl, lockSample, unLockSample, clearnotComplete, clearPrintflag,
noiteMresult, queryXmInfo, setitemInter, queryLabPat
} from "@/api/liswork/work/LisWork";
import { LabResultItem } from '@/types/index';
import { changeresult, saveresult, newresult, sampleMedInfo, cbebCheck } from '@/api/liswork/micro/index';
import { deleteresult, queryXmVal, setinputmdl, queryLabPat, checkuser, printListwork } from "@/api/liswork/work/LisWork";
import CheckUser from "../../work/components/CheckUser.vue";
import Unconfirmlog from "../../work/components/unconfirmlog.vue";
import UploadWarning from "../../work/components/uploadwarning.vue";
// @ts-ignore
import ProjectDetails from "@/components/projectDetails/index.vue";
import projectsJg from "@/components/projectsjg/index.vue";
// @ts-ignore
import Combined from "./components/combinedDialog.vue";
import emitter from '@/utils/mitt';
import { ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { useCommonStore } from "@/store/modules/commonStore";
import { classCom } from '@/utils/classCom';
const autoSize = classCom.useAutoSize();
@ -170,10 +183,14 @@ const props = defineProps({
dictData: {
type: Object,
default: () => { }
}
},
userList: {
type: Array as () => Array<any>,
default: () => []
},
})
const { labPat, labPatKey, instrdComOpt } = toRefs(props);
const { labPat, labPatKey, instrdComOpt, userList } = toRefs(props);
const tableData = ref<LabResultItem[]>([])
const tableData2 = ref<LabResultItem[]>([])
@ -266,12 +283,13 @@ const mbList = (type: number) => {
const emits = defineEmits([
'fetchLabResults',
'changeStatus',
'previewHandle'
'previewHandle',
'update:labPatKey'
]);
const columns = ref([
{ label: "细菌/结果", prop: "zhxmdh", align: 'center', visible: true, headerSlot: 'xmdh', width: 150 },
{ label: "细菌/结果", prop: "zhxmdh", visible: true, headerSlot: 'xmdh', width: 150 },
{ label: "菌落计数", prop: "od", align: 'center', visible: true, slot: 'od' },
{ label: "检验结果", prop: "csjg", align: 'center', visible: true, slot: 'csjg' },
{ label: "阴阳性", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', showOverflowTooltip: false },
@ -325,7 +343,7 @@ const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
const tableConfig = ref({
height: '32vh',
border: true,
// highlightCurrentRow: true,
highlightCurrentRow: true,
cellStyle: CellStyleHd
});
@ -333,62 +351,94 @@ const handleColumnDragEnd = (data: any) => {
columns.value = data.columns;
}
const checktitle = ref('');
const shType = ref('') // 审核类型 cb初报 erb二报
const bgType = ref(1) // 报告类型 1初报 2二报
const handleCheck = (checkType: number, shtype: string) => {
shType.value = shtype
// yhdh = checkuserid.value
switch (checkType) {
// case 1: // 初审
// check1({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: props.labPat.yhdh }).then((res: any) => {
// emits("changeStatus", props.labPat);
// })
// break;
case 1: // 审核
labPatKey.value.problemId = 0
shHandleCheck()
break;
case 2: // 取消审核
labPatKey.value.problemId = 0
unShHandle()
break;
default:
break;
const checkUserRef = ref();
const unconfirmlogRef = ref();
const uploadwarningRef = ref();
const runnextstepname = ref(-1);
const reasonText = ref('');
const warningMsgdata = ref('');
const handleCheck = (checkType: number,) => {
runnextstepname.value = checkType
labPatKey.value.problemId = 0;
if (!labPatKey.value.yhdh) {
checktitle.value = '审核人工号密码验证'
checkUserRef.value.open()
} else {
proceedCheck()
}
};
const unCheckshow = ref(false);
const reasonText = ref('');
const warningMsgdata = ref('');
const showuploadwarning = ref(false);
const handleCheckUserConfirm = (info: { yhdh: string, mm: string }) => {
checkuser({ yhdh: info.yhdh, mm: info.mm }).then((response: any) => {
if (response.code == 0) {
emits('update:labPatKey', {
...labPatKey.value,
yhdh: info.yhdh
});
proceedCheck()
}
})
}
const shHandleCheck = () => {
check2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: labPat.value.yhdh, yq: labPat.value.yq }).then((res: any) => {
const proceedCheck = () => {
const data = {
yq: labPat.value.yq,
yhdh: labPat.value.yhdh,
ybh: labPat.value.ybh,
jyrq: labPat.value.jyrq,
jgbz: runnextstepname.value,
}
cbebCheck(data).then((res: any) => {
if (res.code == "4" && res.problemId === 4) {
labPatKey.value.problemId = res.problemId;
warningMsgdata.value = res.msg;
showuploadwarning.value = true;
uploadwarningRef.value.open();
}
getLabPatInfo()
})
};
const unShHandle = () => {
uncheck2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: labPat.value.yhdh, yq: labPat.value.yq }).then((res: any) => {
if (res.code == "4") {
labPatKey.value.problemId = res.problemId;
reasonText.value = res.msg;
unCheckshow.value = true;
unconfirmlogRef.value.open();
}
getLabPatInfo()
emits("changeStatus", labPat.value);
})
};
const selectedRows = ref<LabResultItem[]>([])
const erbRowClick = (row: LabResultItem) => {
bgType.value = 2
selectedRows.value = [row];
}
const cbRowClick = (row: LabResultItem) => {
bgType.value = 1
selectedRows.value = [row];
}
const handleBatchDelete = (type: number) => {
bgType.value = type
if (selectedRows.value.length === 0) return ElMessage.warning("请先选择要删除的记录");
ElMessageBox.confirm(
`确定要删除选中的 ${selectedRows.value.length} 条记录吗?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
deleteresult(selectedRows.value).then((res: any) => {
if (res.code == 0) {
ElMessage.success('删除成功');
getResultList()
selectedRows.value = []
}
})
}).catch(() => {
});
}
// 项目结果保存
@ -428,7 +478,35 @@ const handleCsjgEnter = async (row: any, type: number) => {
// if (input?.tagName === "INPUT") input?.blur();
// });
}
};
const printHandle = (type: number) => {
const yq = type === 1 ? instrdComOpt.value.yq1 : instrdComOpt.value.yq2
const data = {
jyrq: labPat.value.jyrq,
yq: yq,
ybh: labPat.value.ybh,
sqh: labPat.value.sqh
}
printListwork(data).then((res: any) => {
if (res.code == 0) {
classCom.printBase64PDF(res.data)
}
})
};
const previewHandle = (type: number) => {
const yq = type === 1 ? instrdComOpt.value.yq1 : instrdComOpt.value.yq2
const data = {
jyrq: labPat.value.jyrq,
yq: yq,
ybh: labPat.value.ybh,
sqh: labPat.value.sqh
}
printListwork(data).then((res: any) => {
if (res.code == 0) {
emits('previewHandle', res.data);
}
})
};
const itemDictRef = ref();
const openItemDictDialog = (type: number) => {
@ -515,6 +593,7 @@ const zhHandel = (type: number) => {
const combinedHandel = (row: any) => {
const targetTable = bgType.value === 1 ? tableData.value : tableData2.value;
const yq = bgType.value === 1 ? instrdComOpt.value.yq1 : instrdComOpt.value.yq2;
const data = {
...labPatKey.value,
mbmc: row.mbmc,
@ -524,7 +603,7 @@ const combinedHandel = (row: any) => {
const existingNames = new Set(targetTable.map((item: any) => item.xmdh))
res.data?.forEach((item: any) => {
if (!existingNames.has(item.xmdh)) {
targetTable.push({ ...item, jyrq: labPat.value.jyrq, zhxmdh: item.xmdh + ' ' + item.xmmc })
targetTable.push({ ...item, jyrq: labPat.value.jyrq, zhxmdh: item.xmdh + ' ' + item.xmmc, yq })
existingNames.add(item.xmdh)
}
})
@ -541,6 +620,9 @@ const formatDict = (v: string, dictType: string) => {
const formatJgbz = (v: string) => {
return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : ''
}
const formatUser = (yhdh: string) => {
return userList.value.find((item: any) => item.userName == yhdh)?.nickName || yhdh
}
</script>
<style scoped lang="scss">

View File

@ -127,7 +127,6 @@
</div>
</div>
<!-- 新增明细 -->
<ProjectDetails ref="itemDictRef" :dialog-title="'选择检验项目'" :tableKey="labPatKey" @select="handleItemSelect" />
@ -144,34 +143,15 @@
<!-- 抗生素组模板 -->
<kssMb ref="kssMbRef" :dialog-title="'抗生素组选择'" :tableKey="labPatKey" @select="kssSelect" />
<!-- 操作原因 -->
<el-dialog v-model="unCheckshow" title="操作原因" width="500" :close-on-click-modal="false" :draggable="true"
@close="unconfirmlogCancel">
<div class="dialog-body mb10">
<p class="reason-text mb5">{{ reasonText }} </p>
<el-form ref="uncheckFormRef" style="max-width: 600px" :model="uncheckForm" :rules="rules" label-width="auto">
<template v-if="labPatKey.problemId == 4">
<el-input type="textarea" v-model="uncheckForm.reason" class="reason-input" placeholder="请输入操作原因..."
:rows="4"></el-input>
</template>
<template v-if="labPatKey.problemId == 6">
<el-form-item label="用户工号:" prop="yhdh">
<el-input v-model.trim="uncheckForm.yhdh" placeholder="请输入用户工号" maxlength="20"
@keyup.enter="submitForm" />
</el-form-item>
<el-form-item label="密码:" prop="mm">
<el-input v-model.trim="uncheckForm.mm" placeholder="请输入密码" type="mm" maxlength="20" show-password
@keyup.enter="submitForm" />
</el-form-item>
</template>
</el-form>
</div>
<!-- 校验用户 -->
<CheckUser ref="checkUserRef" :title="checktitle" @onConfirm="handleCheckUserConfirm" />
<div style="text-align: center; width: 100%;">
<el-button type="primary" @click="unconfirmlogConfirm()"> 确认 </el-button>
<el-button @click="unconfirmlogCancel">取消</el-button>
</div>
</el-dialog>
<!-- 取消审核操作原因 -->
<Unconfirmlog ref="unconfirmlogRef" :reasonText="reasonText" :tableKey="labPatKey" @onConfirm="unShHandle" />
<!-- 危急值结果上报 -->
<UploadWarning ref="uploadwarningRef" :warningMsgdata="warningMsgdata" :tableKey="labPatKey"
@onupload="shHandleCheck" />
</div>
</template>
@ -184,6 +164,9 @@ import {
} from '@/api/liswork/micro/index';
import { check2, uncheck2, unconfirmlog, checkuser, deleteresult, queryXmVal, setinputmdl, } from "@/api/liswork/work/LisWork";
import { useCommonStore } from "@/store/modules/commonStore";
import CheckUser from "../../work/components/CheckUser.vue";
import Unconfirmlog from "../../work/components/unconfirmlog.vue";
import UploadWarning from "../../work/components/uploadwarning.vue";
// @ts-ignore
import ProjectDetails from "@/components/projectDetails/index.vue";
import projectsJg from "@/components/projectsjg/index.vue";
@ -223,14 +206,15 @@ const { labPat, labPatKey, labResutsData, dictData } = toRefs(props);
const emits = defineEmits([
'fetchLabResults',
'changeStatus',
'previewHandle'
'previewHandle',
'update:labPatKey'
]);
const activeName2 = ref('first')
const textarea = ref('')
const columns = ref([
{ label: "细菌/结果", prop: "zhxmdh", align: 'center', visible: true, headerSlot: 'xmdh', width: 150 },
{ label: "细菌/结果", prop: "zhxmdh", visible: true, headerSlot: 'xmdh', width: 150 },
{ label: "菌落计数", prop: "od", align: 'center', visible: true, slot: 'od' },
{ label: "检验结果", prop: "csjg", align: 'center', visible: true, slot: 'csjg' },
{ label: "阴阳性", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', showOverflowTooltip: false },
@ -292,18 +276,36 @@ const handleColumnDragEnd = (data: any) => {
columns.value = data.columns;
}
const unCheckshow = ref(false);
const reasonText = ref('');
const warningMsgdata = ref('');
const showuploadwarning = ref(false);
const checktitle = ref('');
const checkUserRef = ref();
const runnextstepname = ref(-1);
const handleCheck = (checkType: number) => {
// yhdh = checkuserid.value
switch (checkType) {
// case 1: // 初审
// check1({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: props.labPat.yhdh }).then((res: any) => {
// emits("changeStatus", props.labPat);
// })
// break;
runnextstepname.value = checkType
labPatKey.value.problemId = 0;
if (!labPatKey.value.yhdh) {
checktitle.value = '审核人工号密码验证'
checkUserRef.value.open()
} else {
proceedCheck(checkType)
}
};
const handleCheckUserConfirm = (info: { yhdh: string, mm: string }) => {
checkuser({ yhdh: info.yhdh, mm: info.mm }).then((response: any) => {
if (response.code == 0) {
emits('update:labPatKey', {
...labPatKey.value,
yhdh: info.yhdh
});
proceedCheck(runnextstepname.value)
}
})
}
const proceedCheck = (type: number) => {
switch (type) {
case 2: // 审核
labPatKey.value.problemId = 0
shHandleCheck()
@ -315,96 +317,34 @@ const handleCheck = (checkType: number) => {
default:
break;
}
};
}
const uploadwarningRef = ref();
const shHandleCheck = () => {
check2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: props.labPat.yhdh }).then((res: any) => {
emits("changeStatus", props.labPat);
if (res.code == "4" && res.problemId === 4) {
labPatKey.value.problemId = res.problemId;
warningMsgdata.value = res.msg;
showuploadwarning.value = true;
uploadwarningRef.value.open();
}
})
};
const unconfirmlogRef = ref();
const unShHandle = () => {
uncheck2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: props.labPat.yhdh }).then((res: any) => {
if (res.code == "4") {
labPatKey.value.problemId = res.problemId;
reasonText.value = res.msg;
unCheckshow.value = true;
unconfirmlogRef.value.open();
}
emits("changeStatus", props.labPat);
})
};
const uncheckFormRef = ref();
const uncheckForm = ref({
reason: '',
yhdh: '',
mm: '',
})
// 取消审核原因
const unconfirmlogConfirm = async () => {
if (labPatKey.value.problemId == 4) {
// if (!uncheckForm.value.inputValue) return ElMessage.warning("请输入操作原因")
} else if (labPatKey.value.problemId == 6) {
const valid = await uncheckFormRef.value.validate().catch(() => { });
if (!valid) return false;
}
unconfirmlog({ ...labPatKey.value, jyrq: labPat.value.jyrq, ...uncheckForm.value }).then((response: any) => {
if (response.code == "0") {
unCheckshow.value = false;
unShHandle();
}
})
};
const checkuserid = ref()
const checkShow = ref(false);
const ruleForm = ref({
yhdh: '',
mm: ''
});
const rules = ref(
{
yhdh: [{ required: true, message: "请输入用户工号", trigger: "blur" },
{ min: 3, max: 20, message: "长度在 3 到 20 个字符", trigger: "blur" }
],
mm: [{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
]
}
);
const unconfirmlogCancel = () => {
unCheckshow.value = false;
uncheckForm.value.reason = '';
uncheckForm.value.yhdh = '';
uncheckForm.value.mm = '';
uncheckFormRef.value.resetFields();
}
const ruleFormRef = ref();
const submitForm = () => {
ruleFormRef.value.validate((valid: boolean) => {
if (valid) {
checkuser(ruleForm.value).then((res: any) => {
if (res.code == 0) {
checkuserid.value = ruleForm.value.yhdh
checkShow.value = false;
ElMessage.success("验证成功");
}
})
} else {
return false;
}
});
}
const itemDictRef = ref();
const openItemDictDialog = () => {

View File

@ -1,89 +1,33 @@
<template>
<!-- 遮罩层 -->
<div
v-if="visible"
class="dialog-mask"
@click="handleCancel"
></div>
<!-- 弹窗主体 -->
<div
v-if="visible"
class="dialog-container"
>
<div class="dialog-box">
<!-- 标题区域 -->
<div class="dialog-header">
<h3 class="dialog-title">{{ title }}</h3>
<button
class="dialog-close"
@click="handleCancel"
aria-label="关闭"
>
<span>×</span>
</button>
</div>
<!-- 内容区域 -->
<div class="dialog-body">
<!-- 工号输入 -->
<div class="form-item">
<label class="form-label">用户工号</label>
<input
type="text"
v-model.trim="userId"
class="form-input"
placeholder="请输入用户工号"
@keyup.enter="handleConfirm"
>
</div>
<!-- 密码输入 -->
<div class="form-item">
<label class="form-label">密码</label>
<input
type="password"
v-model="password"
class="form-input"
placeholder="请输入密码"
@keyup.enter="handleConfirm"
>
</div>
<!-- 错误提示 -->
<p v-if="errorMsg" class="error-message">{{ errorMsg }}</p>
</div>
<!-- 按钮区域 -->
<div class="dialog-footer">
<button
class="btn btn-cancel"
@click="handleCancel"
>
取消
</button>
<button
class="btn btn-confirm"
@click="handleConfirm"
:disabled="!userId || !password"
>
确认验证
</button>
</div>
<div>
<el-dialog v-model="checkShow" :title="title" width="500" :close-on-click-modal="false" :draggable="true"
@close="handleCancel">
<el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-width="auto">
<el-form-item label="用户工号:" prop="yhdh">
<el-input ref="yhdhRef" v-model.trim="ruleForm.yhdh" placeholder="请输入用户工号" maxlength="20"
@keyup.enter="handleConfirm" />
</el-form-item>
<el-form-item label="密码:" prop="mm">
<el-input v-model.trim="ruleForm.mm" placeholder="请输入密码" type="mm" maxlength="20" show-password
@keyup.enter="handleConfirm" />
</el-form-item>
<el-form-item>
<div style="text-align: center; width: 100%;">
<el-button type="primary" @click="handleConfirm()"> 确认 </el-button>
<el-button @click="handleCancel">取消</el-button>
</div>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script setup>
<script setup lang="ts">
import { set } from '@vueuse/core';
import { defineProps, defineEmits, ref, watch } from 'vue';
// 组件属性
const props = defineProps({
// 控制弹窗显示/隐藏
visible: {
type: Boolean,
default: false
},
// 弹窗标题(由外部参数控制)
title: {
type: String,
@ -103,221 +47,59 @@ const props = defineProps({
// 组件事件
const emit = defineEmits([
'update:visible', // 控制弹窗显示状态
'onConfirm', // 验证成功回调
'onCancel' // 取消验证回调
]);
// 表单数据
const userId = ref('');
const password = ref('');
const errorMsg = ref('');
const ruleForm = ref({
yhdh: '',
mm: '',
});
// 监听弹窗显示状态,重置表单
watch(
() => props.visible,
(newVal) => {
if (newVal) {
// 打开弹窗时重置表单
userId.value = '';
password.value = '';
errorMsg.value = '';
}
const rules = ref(
{
yhdh: [{ required: true, message: "请输入用户工号", trigger: "blur" },
{ min: 3, max: 20, message: "长度在 3 到 20 个字符", trigger: "blur" }
],
mm: [{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
]
}
);
const yhdhRef = ref();
const open = () => {
checkShow.value = true;
nextTick(() => {
setTimeout(() => {
yhdhRef.value.focus();
}, 100);
});
};
const checkShow = ref(false);
const ruleFormRef = ref();
// 处理确认验证
const handleConfirm = () => {
// 基础验证
if (!userId.value) {
errorMsg.value = '请输入用户工号';
return;
ruleFormRef.value.validate((valid: boolean) => {
if (valid) {
emit('onConfirm', { yhdh: ruleForm.value.yhdh, mm: ruleForm.value.mm });
checkShow.value = false;
} else {
return false;
}
if (!password.value) {
errorMsg.value = '请输入密码';
return;
}
// 应用外部传入的验证规则
if (userId.value.length < props.validationRules.userIdMinLength) {
errorMsg.value = `工号长度不能少于${props.validationRules.userIdMinLength}位`;
return;
}
if (password.value.length < props.validationRules.passwordMinLength) {
errorMsg.value = `密码长度不能少于${props.validationRules.passwordMinLength}位`;
return;
}
// 验证通过,返回用户工号
emit('onConfirm', {
userId: userId.value,
password: password.value
});
// 关闭弹窗
emit('update:visible', false);
};
// 处理取消
const handleCancel = () => {
emit('onCancel');
emit('update:visible', false);
checkShow.value = false;
ruleForm.value.yhdh = '';
ruleForm.value.mm = '';
ruleFormRef.value.resetFields();
};
defineExpose({
open,
});
</script>
<style scoped>
/* 遮罩层 */
.dialog-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
transition: opacity 0.3s;
}
/* 弹窗容器 */
.dialog-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1001;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
/* 弹窗主体 */
.dialog-box {
width: 100%;
max-width: 400px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
overflow: hidden;
}
/* 标题区域 */
.dialog-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid #f0f0f0;
background-color: #f9fafb;
}
.dialog-title {
margin: 0;
font-size: 16px;
font-weight: 600;
color: #333;
}
.dialog-close {
padding: 0;
background: transparent;
border: none;
font-size: 20px;
color: #999;
cursor: pointer;
transition: color 0.2s;
}
.dialog-close:hover {
color: #333;
}
/* 内容区域 */
.dialog-body {
padding: 24px 20px;
}
.form-item {
margin-bottom: 16px;
}
.form-label {
display: block;
margin-bottom: 8px;
font-size: 14px;
color: #666;
}
.form-input {
width: 100%;
padding: 10px 12px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
box-sizing: border-box;
transition: border-color 0.2s;
}
.form-input:focus {
outline: none;
border-color: #4096ff;
box-shadow: 0 0 0 2px rgba(64, 150, 255, 0.2);
}
.error-message {
margin: 8px 0 0;
color: #f56c6c;
font-size: 12px;
line-height: 1.5;
}
/* 按钮区域 */
.dialog-footer {
display: flex;
justify-content: flex-end;
padding: 12px 20px;
border-top: 1px solid #f0f0f0;
background-color: #f9fafb;
}
.btn {
padding: 8px 16px;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
transition: all 0.2s;
}
.btn-cancel {
margin-right: 10px;
border: 1px solid #dcdfe6;
background-color: #fff;
color: #606266;
}
.btn-cancel:hover {
background-color: #f5f7fa;
border-color: #c0c4cc;
}
.btn-confirm {
border: 1px solid #4096ff;
background-color: #4096ff;
color: #fff;
}
.btn-confirm:hover {
background-color: #66b1ff;
border-color: #66b1ff;
}
.btn-confirm:disabled {
opacity: 0.6;
cursor: not-allowed;
background-color: #4096ff;
border-color: #4096ff;
}
</style>
<style scoped lang="scss"></style>

View File

@ -76,82 +76,13 @@
<ProjectDetails ref="itemDictRef" :dialog-title="'选择检验项目'" :tableKey="tableKey" @select="handleItemSelect" />
<!-- 校验用户 -->
<el-dialog v-model="checkShow" title="用户身份验证" width="500" :close-on-click-modal="false" :draggable="true"
@close="resetForm">
<el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-width="auto">
<el-form-item label="用户工号:" prop="yhdh">
<el-input v-model.trim="ruleForm.yhdh" placeholder="请输入用户工号" maxlength="20" @keyup.enter="submitForm" />
</el-form-item>
<el-form-item label="密码:" prop="mm">
<el-input v-model.trim="ruleForm.mm" placeholder="请输入密码" type="mm" maxlength="20" show-password
@keyup.enter="submitForm" />
</el-form-item>
<el-form-item>
<div style="text-align: center; width: 100%;">
<el-button type="primary" @click="submitForm()"> 确认 </el-button>
<el-button @click="resetForm">取消</el-button>
</div>
</el-form-item>
</el-form>
</el-dialog>
<CheckUser ref="checkUserRef" :title="checktitle" @onConfirm="handleCheckUserConfirm" />
<!-- 危急值结果上报 -->
<el-dialog v-model="showuploadwarning" title="危急值结果上报" width="500" :close-on-click-modal="false" :draggable="true"
@close="warningResetForm">
<div class="red-static-text">{{ warningMsgdata }}</div>
<el-form ref="warningFormRef" style="max-width: 600px" :model="warningForm" :rules="wrules" label-width="auto">
<el-form-item label="上报方式:" prop="uploadTp">
<el-radio-group v-model="warningForm.uploadTp" size="default">
<el-radio value="1">系统通知</el-radio>
<el-radio value="2">电话通知</el-radio>
</el-radio-group>
</el-form-item>
<template v-if="warningForm.uploadTp == 2">
<el-form-item label="电话通知人:" prop="userId">
<el-input v-model.trim="warningForm.userId" class="form-input" placeholder="请输入医生工号" @keyup.enter=" " />
</el-form-item>
<el-form-item label="联系电话:" prop="phone">
<el-input v-model="warningForm.phone" class="form-input" placeholder="请输入联系电话" @keyup.enter=" " />
</el-form-item>
</template>
<el-form-item>
<div style="text-align: center; width: 100%;">
<el-button type="primary" @click="handleWarningSuccess()"> 确认 </el-button>
<el-button @click="warningResetForm">取消</el-button>
</div>
</el-form-item>
</el-form>
</el-dialog>
<UploadWarning ref="uploadwarningRef" :warningMsgdata="warningMsgdata" :tableKey="tableKey"
@onupload="shHandleCheck" />
<!-- 操作原因 -->
<el-dialog v-model="unCheckshow" title="操作原因" width="500" :close-on-click-modal="false" :draggable="true"
@close="unconfirmlogCancel">
<div class="dialog-body mb10">
<p class="reason-text mb5">{{ reasonText }} </p>
<el-form ref="uncheckFormRef" style="max-width: 600px" :model="uncheckForm" :rules="rules" label-width="auto">
<template v-if="tableKey.problemId == 4">
<el-input type="textarea" v-model="uncheckForm.reason" class="reason-input" placeholder="请输入操作原因..."
:rows="4"></el-input>
</template>
<template v-if="tableKey.problemId == 6">
<el-form-item label="用户工号:" prop="yhdh">
<el-input v-model.trim="uncheckForm.yhdh" placeholder="请输入用户工号" maxlength="20"
@keyup.enter="submitForm" />
</el-form-item>
<el-form-item label="密码:" prop="mm">
<el-input v-model.trim="uncheckForm.mm" placeholder="请输入密码" type="mm" maxlength="20" show-password
@keyup.enter="submitForm" />
</el-form-item>
</template>
</el-form>
</div>
<Unconfirmlog ref="unconfirmlogRef" :reasonText="reasonText" :tableKey="tableKey" @onConfirm="unShHandle" />
<div style="text-align: center; width: 100%;">
<el-button type="primary" @click="unconfirmlogConfirm()"> 确认 </el-button>
<el-button @click="unconfirmlogCancel">取消</el-button>
</div>
</el-dialog>
<!-- 合并当前病人其他结果 -->
@ -261,7 +192,6 @@
</el-col>
</el-row>
</el-dialog>
</div>
</template>
@ -280,6 +210,9 @@ import { classCom } from '@/utils/classCom'
import CustomTable from '@/components/elTable/index.vue'
import dayjs from 'dayjs';
import emitter from "@/utils/mitt";
import CheckUser from "./CheckUser.vue";
import Unconfirmlog from './unconfirmlog.vue';
import UploadWarning from "./uploadwarning.vue";
import { useCommonStore } from "@/store/modules/commonStore";
import ContextMenu from "@/components/contextMenu/index.vue";
import ViewBackup from "./viewBackup.vue";
@ -785,53 +718,12 @@ const beforeEnter = (row) => {
lastResult.value = res.data || {}
})
};
const warningForm = ref({
userId: '',
phone: '',
uploadTp: '1'
})
const uncheckForm = ref({
reason: '',
yhdh: '',
mm: '',
})
const wrules = ref({
userId: [{ required: true, message: "请输入用户工号", trigger: "blur" },
{ min: 3, max: 20, message: "长度在 3 到 20 个字符", trigger: "blur" }
],
phone: [{ required: true, message: "请输入联系电话", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
]
})
const unCheckshow = ref(false);
const inputValue = ref('');
const reasonText = ref('');
const warningMsgdata = ref('');
const showuploadwarning = ref(false);
const checkuserid = ref()
const checkShow = ref(false);
const ruleForm = ref({
yhdh: '',
mm: ''
});
const rules = ref(
{
yhdh: [{ required: true, message: "请输入用户工号", trigger: "blur" },
{ min: 3, max: 20, message: "长度在 3 到 20 个字符", trigger: "blur" }
],
mm: [{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
]
}
);
const checktitle = ref('');
const checkUserRef = ref();
const csjgRef = ref();
@ -839,9 +731,32 @@ const itemDictRef = ref(); // DictInput组件引用
const tableRef = ref();
const runnextstepname = ref(-1)
const handleCheck = (checkType) => {
// yhdh = checkuserid.value
runnextstepname.value = checkType
tableKey.value.problemId = 0;
// tableKey.value.yhdh = checkuserid.value
if (!tableKey.value.yhdh) {
checktitle.value = '审核人工号密码验证'
checkUserRef.value.open()
} else {
proceedCheck(checkType)
}
};
const handleCheckUserConfirm = (info) => {
checkuser({ yhdh: info.yhdh, mm: info.mm }).then(response => {
if (response.code == 0) {
emits('update:tableKey', {
...tableKey.value,
yhdh: info.yhdh
});
proceedCheck(runnextstepname.value)
}
})
}
const proceedCheck = (checkType) => {
switch (checkType) {
case 1: // 初审
check1({ ...tableKey.value, yhdh: props.labPat.yhdh }).then(res => {
@ -859,89 +774,33 @@ const handleCheck = (checkType) => {
default:
break;
}
};
}
const uploadwarningRef = ref();
const shHandleCheck = () => {
check2({ ...props.tableKey, yhdh: props.labPat.yhdh }).then(res => {
emits("changeStatus", props.labPat);
if (res.code == "4" && res.problemId === 4) {
tableKey.value.problemId = res.problemId;
warningMsgdata.value = res.msg;
showuploadwarning.value = true;
uploadwarningRef.value.open();
}
})
};
const warningFormRef = ref(null);
const warningResetForm = () => {
warningForm.value.userId = '';
warningForm.value.phone = '';
warningForm.value.uploadTp = '1';
warningFormRef.value.resetFields();
showuploadwarning.value = false;
};
// 处理危急值登记
const handleWarningSuccess = async () => {
if (warningForm.value.uploadTp == 2) {
const valid = await warningFormRef.value.validate().catch(() => { });
if (!valid) return false;
}
reglimit({ ...tableKey.value, qrr: warningForm.value.userId, tzfs: warningForm.value.uploadTp, phone: warningForm.value.phone }).then(response => {
showuploadwarning.value = false;
if (response.code == 0) {
shHandleCheck();
}
if (response.code == 4) {
ElMessageBox.confirm(response.msg, '系统提示', { confirmButtonText: '是', cancelButtonText: '否', type: 'warning' }).then(() => {
tableKey.value.problemId = tableKey.value.problemId + 1;
handleWarningSuccess();
}).catch(() => {
shHandleCheck();
});
}
})
};
const unconfirmlogRef = ref();
const unShHandle = () => {
uncheck2({ ...tableKey.value, yhdh: props.labPat.yhdh }).then(res => {
if (res.code == "4") {
tableKey.value.problemId = res.problemId;
reasonText.value = res.msg;
unCheckshow.value = true;
unconfirmlogRef.value.open();
}
emits("changeStatus", props.labPat);
})
};
const uncheckFormRef = ref();
// 取消审核原因
const unconfirmlogConfirm = async () => {
if (tableKey.value.problemId == 4) {
if (!uncheckForm.value.inputValue) return ElMessage.warning("请输入操作原因")
} else if (tableKey.value.problemId == 6) {
const valid = await uncheckFormRef.value.validate().catch(() => { });
if (!valid) return false;
}
unconfirmlog({ ...tableKey.value, ...uncheckForm.value }).then(response => {
if (response.code == "0") {
unCheckshow.value = false;
unShHandle();
}
})
};
const unconfirmlogCancel = () => {
unCheckshow.value = false;
uncheckForm.value.reason = '';
uncheckForm.value.yhdh = '';
uncheckForm.value.mm = '';
uncheckFormRef.value.resetFields();
}
const ruleFormRef = ref(null);
@ -963,12 +822,7 @@ const submitForm = () => {
}
const resetForm = () => {
checkShow.value = false;
ruleForm.value.userId = '';
ruleForm.value.mm = '';
ruleFormRef.value.resetFields();
};
// 2. 打开项目选择弹窗
const openItemDictDialog = () => {
itemDictRef.value.openDictSelector();
@ -1022,7 +876,8 @@ const addRowFromDict = async (rowData) => {
const emits = defineEmits([
'fetchLabResults',
'changeStatus',
'previewHandle'
'previewHandle',
'update:tableKey'
]);
const csjgTableData = ref([]);

View File

@ -1,186 +1,113 @@
<template>
<!-- 遮罩层 -->
<div
v-if="visible"
class="dialog-mask"
@click="handleMaskClick"
></div>
<!-- 弹窗主体 -->
<div
v-if="visible"
class="dialog-wrapper"
>
<div class="dialog-container">
<!-- 标题 -->
<div class="dialog-header">
<h3>操作原因</h3>
<button class="close-btn" @click="handleCancel">×</button>
<div>
<el-dialog v-model="unCheckshow" title="操作原因" width="500" :close-on-click-modal="false" :draggable="true"
@close="unconfirmlogCancel">
<div class="dialog-body mb10">
<p class="reason-text mb5">{{ reasonText }} </p>
<el-form ref="uncheckFormRef" style="max-width: 600px" :model="uncheckForm" :rules="rules" label-width="auto">
<template v-if="tableKey.problemId == 4">
<el-input type="textarea" v-model="uncheckForm.reason" class="reason-input" placeholder="请输入操作原因..."
:rows="4"></el-input>
</template>
<template v-if="tableKey.problemId == 6">
<el-form-item label="用户工号:" prop="yhdh">
<el-input v-model.trim="uncheckForm.yhdh" placeholder="请输入用户工号" maxlength="20"
@keyup.enter="unconfirmlogConfirm" />
</el-form-item>
<el-form-item label="密码:" prop="mm">
<el-input v-model.trim="uncheckForm.mm" placeholder="请输入密码" type="mm" maxlength="20" show-password
@keyup.enter="unconfirmlogConfirm" />
</el-form-item>
</template>
</el-form>
</div>
<!-- 内容区 -->
<div class="dialog-body">
<p class="reason-text">{{ reasonText }}</p>
<textarea
v-model="inputValue"
class="reason-input"
placeholder="请输入操作原因..."
rows="4"
></textarea>
<div style="text-align: center; width: 100%;">
<el-button type="primary" @click="unconfirmlogConfirm()"> 确认 </el-button>
<el-button @click="unconfirmlogCancel">取消</el-button>
</div>
</el-dialog>
<!-- 按钮区 -->
<div class="dialog-footer">
<button class="btn cancel" @click="handleCancel">取消</button>
<button class="btn confirm" @click="handleConfirm">确认</button>
</div>
</div>
</div>
</template>
<script setup>
import { defineProps, defineEmits, ref } from 'vue';
<script setup lang="ts">
import { ElMessage } from 'element-plus';
import { unconfirmlog } from "@/api/liswork/work/LisWork";
// 组件属性
const props = defineProps({
visible: {
type: Boolean,
default: false
},
reasonText: {
type: String,
default: '请填写操作原因'
},
tableKey: {
type: Object,
required: true
}
});
const { tableKey } = toRefs(props);
// 组件事件
const emit = defineEmits(['update:visible', 'onConfirm', 'onCancel']);
const emit = defineEmits(['onConfirm']);
const uncheckForm = ref({
reason: '',
yhdh: '',
mm: '',
})
const rules = ref({
yhdh: [{ required: true, message: "请输入用户工号", trigger: "blur" },
{ min: 3, max: 20, message: "长度在 3 到 20 个字符", trigger: "blur" }
],
mm: [{ required: true, message: "请输入联系电话", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
]
})
// 输入框内容
const inputValue = ref('');
// 确认按钮点击
const handleConfirm = () => {
emit('onConfirm', inputValue.value); // 传递输入值
emit('update:visible', false);
inputValue.value = ''; // 重置输入
const unCheckshow = ref(false);
const open = () => {
unCheckshow.value = true;
};
// 取消按钮点击
const handleCancel = () => {
emit('onCancel');
emit('update:visible', false);
inputValue.value = ''; // 重置输入
const uncheckFormRef = ref();
// 取消审核原因
const unconfirmlogConfirm = async () => {
if (tableKey.value.problemId == 4) {
if (!uncheckForm.value.reason) return ElMessage.warning("请输入操作原因")
} else if (tableKey.value.problemId == 6) {
const valid = await uncheckFormRef.value.validate().catch(() => { });
if (!valid) return false;
}
unconfirmlog({ ...tableKey.value, ...uncheckForm.value }).then((response: any) => {
if (response.code == "0") {
emit('onConfirm');
unCheckshow.value = false;
}
})
};
// 遮罩层点击
const handleMaskClick = () => {
handleCancel();
};
const unconfirmlogCancel = () => {
unCheckshow.value = false;
uncheckForm.value.reason = '';
uncheckForm.value.yhdh = '';
uncheckForm.value.mm = '';
uncheckFormRef.value.resetFields();
}
defineExpose({
open,
});
</script>
<style scoped>
/* 基础样式与之前保持一致,确保按钮边框和输入框正常 */
.dialog-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
}
.dialog-wrapper {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1001;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.dialog-container {
width: 100%;
max-width: 500px;
background: #fff;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.dialog-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
border-bottom: 1px solid #eee;
}
.dialog-header h3 {
margin: 0;
font-size: 16px;
color: #333;
}
.close-btn {
background: none;
border: none;
font-size: 20px;
color: #999;
cursor: pointer;
}
.dialog-body {
padding: 20px;
}
.reason-text {
margin: 0 0 15px 0;
color: #666;
}
.reason-input {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
resize: vertical;
box-sizing: border-box;
}
.reason-input:focus {
outline: none;
border-color: #4096ff;
}
.dialog-footer {
padding: 15px 20px;
border-top: 1px solid #eee;
text-align: right;
}
.btn {
padding: 6px 16px;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
}
.cancel {
margin-right: 10px;
border: 1px solid #ddd;
background: #fff;
color: #666;
}
.confirm {
border: 1px solid #4096ff;
background: #4096ff;
color: #fff;
}
</style>
<style scoped></style>

View File

@ -1,179 +1,113 @@
<template>
<!-- 遮罩层 -->
<div
v-if="visible"
class="dialog-mask"
@click="handleCancel"
></div>
<!-- 弹窗主体 -->
<div
v-if="visible"
class="dialog-container"
>
<div class="dialog-box">
<!-- 标题区域 -->
<div class="dialog-header">
<h3 class="dialog-title">危急值结果上报</h3>
<button
class="dialog-close"
@click="handleCancel"
aria-label="关闭"
>
<span>×</span>
</button>
</div>
<!-- 内容区域 -->
<div class="dialog-body">
<div class="red-static-text">{{ msgdata }}</div>
<el-col :span="1">
<el-form-item label="上报方式" prop="uploadTp">
<el-radio-group v-model="uploadTp" size="default">
<el-radio v-for="(item, index) in uploadtypeptions" :key="index" :label="item.value"
:disabled="item.disabled">{{item.label}}</el-radio>
<div>
<el-dialog v-model="showuploadwarning" title="危急值结果上报" width="500" :close-on-click-modal="false" :draggable="true"
@close="warningResetForm">
<div class="red-static-text">{{ warningMsgdata }}</div>
<el-form ref="warningFormRef" style="max-width: 600px" :model="warningForm" :rules="wrules" label-width="auto">
<el-form-item label="上报方式:" prop="uploadTp">
<el-radio-group v-model="warningForm.uploadTp" size="default">
<el-radio value="1">系统通知</el-radio>
<el-radio value="2">电话通知</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<div class="form-item" v-if="uploadTp === 2">
<label class="form-label">电话通知人</label>
<input
type="text"
v-model.trim="userId"
class="form-input"
placeholder="请输入医生工号"
@keyup.enter="handleupload"
>
</div>
<div class="form-item" v-if="uploadTp === 2">
<label class="form-label">联系电话</label>
<input
type="text"
v-model="phone"
class="form-input"
placeholder="请输入联系电话"
@keyup.enter="handleupload"
>
</div>
<template v-if="warningForm.uploadTp == '2'">
<el-form-item label="电话通知人:" prop="userId">
<el-input v-model.trim="warningForm.userId" class="form-input" placeholder="请输入医生工号" @keyup.enter=" " />
</el-form-item>
<el-form-item label="联系电话:" prop="phone">
<el-input v-model="warningForm.phone" class="form-input" placeholder="请输入联系电话" @keyup.enter=" " />
</el-form-item>
</template>
<!-- 错误提示 -->
<p v-if="errorMsg" class="error-message">{{ errorMsg }}</p>
<el-form-item>
<div style="text-align: center; width: 100%;">
<el-button type="primary" @click="handleWarningSuccess()"> 确认 </el-button>
<el-button @click="warningResetForm">取消</el-button>
</div>
</el-form-item>
</el-form>
</el-dialog>
<!-- 按钮区域 -->
<div class="dialog-footer">
<button
class="btn btn-cancel"
@click="handleCancel"
>
取消
</button>
<button
class="btn btn-upload"
@click="handleupload"
:disabled="isSubmitDisabled"
>
确认上报
</button>
</div>
</div>
</div>
</template>
<script setup>
import { defineProps, defineEmits, ref, watch } from 'vue';
const uploadtypeptions = ref([{
"label": "系统通知",
"value": 1
}, {
"label": "电话通知",
"value": 2
}])
<script setup lang="ts">
import { reglimit } from "@/api/liswork/work/LisWork";
import { ElMessageBox } from "element-plus";
// 组件属性
const props = defineProps({
// 控制弹窗显示/隐藏
visible: {
type: Boolean,
default: false
tableKey: {
type: Object,
required: true
},
// 弹窗内容
msgdata: {
warningMsgdata: {
type: String,
default: ''
},
// 显示规则
showRules: {
type: Number,
default:1
}
});
const { tableKey, warningMsgdata } = toRefs(props);
// 组件事件
const emit = defineEmits([
'update:visible', // 控制弹窗显示状态
'onupload', // 验证成功回调
'onCancel' // 取消验证回调
]);
const emits = defineEmits(['onupload',]);
const showuploadwarning = ref(false);
// 表单数据
const uploadTp = ref('1');
const userId = ref('');
const phone = ref('');
const errorMsg = ref('');
// 监听弹窗显示状态,重置表单
watch(
() => props.visible,
(newVal) => {
if (newVal) {
// 打开弹窗时重置表单
uploadTp.value = 1; // 打开弹窗时默认选中1
userId.value = '';
phone.value = '';
errorMsg.value = '';
const warningForm = ref({
userId: '',
phone: '',
uploadTp: '1'
})
const wrules = ref({
userId: [{ required: true, message: "请输入用户工号", trigger: "blur" },
{ min: 3, max: 20, message: "长度在 3 到 20 个字符", trigger: "blur" }
],
phone: [{ required: true, message: "请输入联系电话", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
]
})
const open = () => {
showuploadwarning.value = true;
}
const warningFormRef = ref();
const warningResetForm = () => {
warningForm.value.userId = '';
warningForm.value.phone = '';
warningForm.value.uploadTp = '1';
warningFormRef.value.resetFields();
showuploadwarning.value = false;
};
// 处理危急值登记
const handleWarningSuccess = async () => {
if (warningForm.value.uploadTp == '2') {
const valid = await warningFormRef.value.validate().catch(() => { });
if (!valid) return false;
}
reglimit({ ...tableKey.value, qrr: warningForm.value.userId, tzfs: warningForm.value.uploadTp, phone: warningForm.value.phone }).then((response: any) => {
showuploadwarning.value = false;
if (response.code == 0) {
emits('onupload');
}
);
const isSubmitDisabled = computed(() => {
// 系统通知(1):无需其他字段,直接可提交
if (uploadTp.value === 1) {
return false;
}
// 电话通知(2):需填写通知人和电话
return !userId.value || !phone.value;
});
// 处理确认验证
const handleupload = () => {
errorMsg.value = ''; // 清空之前的错误提示
// 基础验证
if(uploadTp.value===2) {
if (!userId.value) {
errorMsg.value = '请输入用户工号';
return;
}
if(props.showRules===3) {
if (!phone.value) {
errorMsg.value = '请输入电话';
return;
}
}
}
// 验证通过,返回用户工号
emit('onupload', {
userId: userId.value,
phone: phone.value,
uploadTp:uploadTp.value
if (response.code == 4) {
ElMessageBox.confirm(response.msg, '系统提示', { confirmButtonText: '是', cancelButtonText: '否', type: 'warning' }).then(() => {
tableKey.value.problemId = tableKey.value.problemId + 1;
handleWarningSuccess();
}).catch(() => {
emits('onupload');
});
// 关闭弹窗
emit('update:visible', false);
}
})
};
// 处理取消
const handleCancel = () => {
emit('onCancel');
emit('update:visible', false);
};
defineExpose({
open
});
</script>
<style scoped>
@ -329,10 +263,14 @@ const handleCancel = () => {
background-color: #4096ff;
border-color: #4096ff;
}
.red-static-text {
color: red; /* 字体颜色设为红色 */
white-space: pre-wrap; /* 保留空格和换行(可选,配合 pre 标签或手动换行时使用) */
line-height: 1.6; /* 行高,增强多行可读性 */
color: red;
/* 字体颜色设为红色 */
white-space: pre-wrap;
/* 保留空格和换行(可选,配合 pre 标签或手动换行时使用) */
line-height: 1.6;
/* 行高,增强多行可读性 */
/* 可选:添加其他样式 */
font-size: 14px;
margin: 10px 0;

View File

@ -7,9 +7,21 @@
class="compact-form">
<el-row :gutter="5">
<el-col :span="6">
<el-form-item label="样本号:" prop="ybh">
<el-form-item label="" prop="ybh">
<div class="next_box">
<div class="jtIcon" @click="handlePrev">
<el-icon>
<ArrowUpBold />
</el-icon>
</div>
<el-input v-model="queryParams.ybh" placeholder="样本编号" @keyup.enter="handleQuery"
style="width:100%" />
<div class="jtIcon" @click="handleNext">
<el-icon>
<ArrowDownBold />
</el-icon>
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="6">
@ -52,8 +64,9 @@
</el-col>
<el-col :span="16">
<LabResult ref="labResultRef" :labPat="labPat" :tableData="labResuts" :tableKey="queryParams"
:userList="userList" :resultSysList="resultConfig" @fetchLabResults="resultsHandle" :dictData="dictData"
@changeStatus="changeStatus" @previewHandle="previewHandle" />
@update:tableKey="queryParams = $event" :userList="userList" :resultSysList="resultConfig"
@fetchLabResults="resultsHandle" :dictData="dictData" @changeStatus="changeStatus"
@previewHandle="previewHandle" />
</el-col>
</el-row>
</div>
@ -151,6 +164,7 @@ const queryParams = ref({
instrGroup: '02',
problemId: 0,
days: 0,
yhdh: ''
})
const ybs = ref(0)
const ws = ref(0)
@ -651,8 +665,7 @@ onMounted(async () => {
const initSocket = () => {
initWebSocket({
// fullUrl: `ws://47.97.125.165:8904/ws/instr/${mbStore.fingerprint}`,
fullUrl: `ws://192.168.1.151:9801/ws/instr/${mbStore.fingerprint}`,
fullUrl: `ws://47.97.125.165:8904/ws/instr/${mbStore.fingerprint}`,
onOpen: () => {
console.log('WebSocket连接成功');
},