Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3
This commit is contained in:
commit
4bdd7e47f1
@ -75,4 +75,60 @@ export function saveresult(data?: Object) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
//获取药敏字典
|
||||||
|
export function getmeddictList(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/getmeddict',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取药敏模板
|
||||||
|
export function getmedgroupList(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/getmedgrouplist',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取药敏模板明细
|
||||||
|
export function getmedgroupMbList(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/getmedgroup',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//保存药敏结果
|
||||||
|
export function savemedresult(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/savemedresult',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//保存所有药敏结果
|
||||||
|
export function savemedresultall(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/savemedresultall',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//删除药敏结果
|
||||||
|
export function deletemedresult(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/deletemedresult',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取培养基记录
|
||||||
|
export function getmediumList(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/getmedium',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
@ -97,3 +97,19 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.btn_green {
|
||||||
|
background-color: #aef5ef !important;
|
||||||
|
color: #148A7F;
|
||||||
|
border-color: #aef5ef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btns_box {
|
||||||
|
padding: .3125rem .625rem !important;
|
||||||
|
font-size: .875rem;
|
||||||
|
height: 1.25rem !important;
|
||||||
|
margin: 5px 0;
|
||||||
|
margin-left: .625rem !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
}
|
||||||
@ -106,13 +106,63 @@
|
|||||||
|
|
||||||
.el-dialog:not(.is-fullscreen) {
|
.el-dialog:not(.is-fullscreen) {
|
||||||
margin-top: 6vh !important;
|
margin-top: 6vh !important;
|
||||||
|
padding: 0;
|
||||||
|
// border-radius: 20px;
|
||||||
|
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog.scrollbar .el-dialog__body {
|
.el-dialog.scrollbar .el-dialog__body {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
max-height: 70vh;
|
max-height: 70vh;
|
||||||
padding: 10px 20px 0;
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__header {
|
||||||
|
background: linear-gradient(90deg, #0c1a97 0%, #1373d3 100%);
|
||||||
|
padding: 10px 20px;
|
||||||
|
position: relative;
|
||||||
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
background: url('@/assets/logo/logo.png') no-repeat center;
|
||||||
|
background-size: contain;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标题文本样式
|
||||||
|
.el-dialog__title {
|
||||||
|
color: #fff;
|
||||||
|
/* 标题文字颜色 */
|
||||||
|
padding-left: 40px;
|
||||||
|
/* 给 Logo 留出空间 */
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__headerbtn .el-dialog__close {
|
||||||
|
color: #fff;
|
||||||
|
/* 关闭按钮颜色 */
|
||||||
|
font-size: 18px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__footer {
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table {
|
.el-table {
|
||||||
@ -125,7 +175,7 @@
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
background-color: #1F6DD3 !important;
|
background-color: #1F6DD3 !important;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
height: 1.875rem !important;
|
height: 1.6875rem !important;
|
||||||
font-size: .8125rem;
|
font-size: .8125rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,6 +186,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-table__body td {
|
||||||
|
font-size: .8125rem;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 表格最外层边框(可选) */
|
/* 表格最外层边框(可选) */
|
||||||
.el-table--border {
|
.el-table--border {
|
||||||
@ -177,10 +232,13 @@
|
|||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table--default .cell {
|
.el-table--default {
|
||||||
padding: 0 !important;
|
.cell {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.el-table__cell {
|
.el-table__cell {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
@ -249,7 +307,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-input.is-disabled .el-input__inner {
|
.el-input.is-disabled .el-input__inner {
|
||||||
-webkit-text-fill-color: #4e4c4c
|
-webkit-text-fill-color: #4e4c4c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -337,11 +395,6 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn_green {
|
|
||||||
background-color: #aef5ef !important;
|
|
||||||
color: #148A7F;
|
|
||||||
border-color: #aef5ef;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 表格input宽度,表格select宽度
|
// 表格input宽度,表格select宽度
|
||||||
.full-width-input .el-input__inner .el-select__inner {
|
.full-width-input .el-input__inner .el-select__inner {
|
||||||
|
|||||||
22
src/types/Object.d.ts
vendored
22
src/types/Object.d.ts
vendored
@ -135,4 +135,26 @@ export class XmTextresultNew {
|
|||||||
xmdh?: string;
|
xmdh?: string;
|
||||||
xh?: number;
|
xh?: number;
|
||||||
textresult?: string;
|
textresult?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class LabResultItem {
|
||||||
|
xmdh: string;
|
||||||
|
xmmc: string;
|
||||||
|
csjg: string;
|
||||||
|
qz: string;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ymTableDataItem {
|
||||||
|
zhywdh: string;
|
||||||
|
ywdh: any;
|
||||||
|
ywmc: any;
|
||||||
|
mic: string;
|
||||||
|
rad: string;
|
||||||
|
csjg: string;
|
||||||
|
jgbz: string;
|
||||||
|
ckz: string;
|
||||||
|
bz: string;
|
||||||
|
txtresult: string;
|
||||||
|
cp_bz: string;
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ export function useFingerprint() {
|
|||||||
|
|
||||||
// 组件挂载时自动获取指纹
|
// 组件挂载时自动获取指纹
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getFingerprint();
|
// getFingerprint();
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -41,7 +41,7 @@ const columns = ref([
|
|||||||
// 左侧表格配置
|
// 左侧表格配置
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
border: true, // 边框
|
||||||
height: '', // 高度
|
height: '82vh', // 高度
|
||||||
highlightCurrentRow: true, // 高亮当前行
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
})
|
})
|
||||||
const getCombination = () => {
|
const getCombination = () => {
|
||||||
|
|||||||
@ -52,14 +52,15 @@
|
|||||||
<el-tabs v-model="activeName" type="card" class="demo-tabs">
|
<el-tabs v-model="activeName" type="card" class="demo-tabs">
|
||||||
<el-tab-pane label="鉴定(终报)结果" name="first">
|
<el-tab-pane label="鉴定(终报)结果" name="first">
|
||||||
<ZbReport ref="labResultRef" v-model:labPat="labInfo" :labPatKey="queryParams" :dictData="dictData"
|
<ZbReport ref="labResultRef" v-model:labPat="labInfo" :labPatKey="queryParams" :dictData="dictData"
|
||||||
:labResutsData="labResuts" @fetchLabResults="resultsHandle" @changeStatus="changeStatus"
|
:labResutsData="zbLabResuts" @fetchLabResults="resultsHandle" @changeStatus="changeStatus"
|
||||||
@previewHandle="previewHandle" />
|
@previewHandle="previewHandle" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="初级和二级报告" name="second">
|
<el-tab-pane label="初级和二级报告" name="second">
|
||||||
<CbReport :labResutsData="labResuts" :labPat="labInfo" />
|
<CbReport v-model:labPat="labInfo" :labPatKey="queryParams" :instrdComOpt="instrdComOpt"
|
||||||
|
:dictData="dictData" @changeStatus="changeStatus" @previewHandle="previewHandle" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="培养基接种" name="third">
|
<el-tab-pane label="培养基接种" name="third">
|
||||||
<Byj />
|
<Byj :labPat="labInfo" :labPatKey="queryParams" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="操作记录" name="fourth">
|
<el-tab-pane label="操作记录" name="fourth">
|
||||||
<Record :labPat="labInfo" :labPatKey="queryParams" />
|
<Record :labPat="labInfo" :labPatKey="queryParams" />
|
||||||
@ -95,15 +96,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio_box">
|
<div class="radio_box">
|
||||||
<el-radio-group v-model="queryParams.days" @change="fetchlabPatList">
|
<el-radio-group v-model="queryParams.days" @change="fetchlabPatList" :size="aotuSize">
|
||||||
<el-radio :value="0">所有</el-radio>
|
<el-radio :value="-1">所有</el-radio>
|
||||||
<el-radio :value="30">近30天</el-radio>
|
<el-radio :value="30">近30天</el-radio>
|
||||||
<el-radio :value="60">近60天</el-radio>
|
<el-radio :value="60">近60天</el-radio>
|
||||||
<el-radio :value="90">近90天</el-radio>
|
<el-radio :value="90">近90天</el-radio>
|
||||||
<el-radio :value="7">近7天</el-radio>
|
<el-radio :value="7">近7天</el-radio>
|
||||||
<el-radio :value="1">此日 -></el-radio>
|
<el-radio :value="0">此日 -></el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-date-picker v-model="queryParams.jyrq" type="date" :size="aotuSize" @change="fetchlabPatList" />
|
<el-date-picker v-model="queryParams.jyrq" type="date" :size="aotuSize" @change="fetchlabPatList"
|
||||||
|
style="width: 9.375rem;" />
|
||||||
</div>
|
</div>
|
||||||
<LabPatList ref="labPatListRef" :labPatList="labPatList" :loading="loading" @select="selectJob"
|
<LabPatList ref="labPatListRef" :labPatList="labPatList" :loading="loading" @select="selectJob"
|
||||||
:tableKey="queryParams" :dictData="dictData" @search="searchJobs" />
|
:tableKey="queryParams" :dictData="dictData" @search="searchJobs" />
|
||||||
@ -186,13 +188,13 @@ const queryParams = ref({
|
|||||||
ybh: '',
|
ybh: '',
|
||||||
instrGroup: '04',
|
instrGroup: '04',
|
||||||
problemId: 0,
|
problemId: 0,
|
||||||
days: 90,
|
days: -1,
|
||||||
pageSize: 600,
|
pageSize: 600,
|
||||||
pageNum: 1
|
pageNum: 1
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const activeName = ref('first')
|
const activeName = ref('second');
|
||||||
|
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const ybs = ref(0)
|
const ybs = ref(0)
|
||||||
@ -271,8 +273,6 @@ const searchQuery = () => {
|
|||||||
}
|
}
|
||||||
labPatList.value = filterMhList;
|
labPatList.value = filterMhList;
|
||||||
|
|
||||||
getTotals();
|
|
||||||
|
|
||||||
if (filterMhList.length > 0) {
|
if (filterMhList.length > 0) {
|
||||||
highlightRowIndex.value = 0;
|
highlightRowIndex.value = 0;
|
||||||
const firstRow = filterMhList[0];
|
const firstRow = filterMhList[0];
|
||||||
@ -281,7 +281,7 @@ const searchQuery = () => {
|
|||||||
} else {
|
} else {
|
||||||
labPat.value = {};
|
labPat.value = {};
|
||||||
labInfo.value = {};
|
labInfo.value = {};
|
||||||
labResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
highlightRowIndex.value = -1;
|
highlightRowIndex.value = -1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -311,8 +311,6 @@ const handleQueryResult = (params: QueryParams) => {
|
|||||||
|
|
||||||
labPatList.value = filteredList;
|
labPatList.value = filteredList;
|
||||||
|
|
||||||
getTotals();
|
|
||||||
|
|
||||||
if (filteredList.length > 0) {
|
if (filteredList.length > 0) {
|
||||||
highlightRowIndex.value = 0;
|
highlightRowIndex.value = 0;
|
||||||
const firstRow = filteredList[0];
|
const firstRow = filteredList[0];
|
||||||
@ -321,7 +319,7 @@ const handleQueryResult = (params: QueryParams) => {
|
|||||||
} else {
|
} else {
|
||||||
labPat.value = {};
|
labPat.value = {};
|
||||||
labInfo.value = {};
|
labInfo.value = {};
|
||||||
labResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
highlightRowIndex.value = -1;
|
highlightRowIndex.value = -1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -329,7 +327,6 @@ const handleQueryResult = (params: QueryParams) => {
|
|||||||
// 处理重置
|
// 处理重置
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
labPatList.value = [...originalLabPatList.value];
|
labPatList.value = [...originalLabPatList.value];
|
||||||
getTotals();
|
|
||||||
}
|
}
|
||||||
const previewHandle = (url: string) => {
|
const previewHandle = (url: string) => {
|
||||||
if (!url) return ElMessage.warning('未查询到文件')
|
if (!url) return ElMessage.warning('未查询到文件')
|
||||||
@ -338,13 +335,11 @@ const previewHandle = (url: string) => {
|
|||||||
}
|
}
|
||||||
const handleinstrGroupChange = (val: any) => {
|
const handleinstrGroupChange = (val: any) => {
|
||||||
queryParams.value.yq = ''
|
queryParams.value.yq = ''
|
||||||
// labResuts.value = []
|
|
||||||
// labPat.value = {}
|
|
||||||
getYqConfig()
|
getYqConfig()
|
||||||
}
|
}
|
||||||
const mbStore = useCommonStore();
|
const mbStore = useCommonStore();
|
||||||
const yqHandleChange = (val: any) => {
|
const yqHandleChange = (val: any) => {
|
||||||
labResuts.value = []
|
zbLabResuts.value = [];
|
||||||
labPat.value = {}
|
labPat.value = {}
|
||||||
labInfo.value = {}
|
labInfo.value = {}
|
||||||
mbStore.setLxsrList([]);
|
mbStore.setLxsrList([]);
|
||||||
@ -402,11 +397,11 @@ const selectJob = (job: any) => {
|
|||||||
fetchLabResults();
|
fetchLabResults();
|
||||||
highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh == labInfo.value.ybh);
|
highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh == labInfo.value.ybh);
|
||||||
}
|
}
|
||||||
const labResuts = ref([])
|
const zbLabResuts = ref([])
|
||||||
//载入样本结果表单(中间labresult.vue组件)
|
//载入样本结果表单(中间labresult.vue组件)
|
||||||
const fetchLabResults = async () => {
|
const fetchLabResults = async () => {
|
||||||
sampleMedInfo({ jyrq: labInfo.value.jyrq ? labInfo.value.jyrq : queryParams.value.jyrq, yq: labInfo.value.yq, ybh: labInfo.value.ybh }).then((response: any) => {
|
sampleMedInfo({ jyrq: labInfo.value.jyrq ? labInfo.value.jyrq : queryParams.value.jyrq, yq: labInfo.value.yq, ybh: labInfo.value.ybh }).then((response: any) => {
|
||||||
labResuts.value = response.data;
|
zbLabResuts.value = response.data;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,7 +414,6 @@ const fetchLabPat = () => {
|
|||||||
}
|
}
|
||||||
queryLabPat(data).then((response: any) => {
|
queryLabPat(data).then((response: any) => {
|
||||||
labPat.value = response.data;
|
labPat.value = response.data;
|
||||||
labInfo.value = response.data;
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,7 +460,7 @@ const handleCreate = () => {
|
|||||||
labPat.value = response.data;
|
labPat.value = response.data;
|
||||||
labInfo.value = response.data;
|
labInfo.value = response.data;
|
||||||
labPat.value.id = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`;
|
labPat.value.id = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`;
|
||||||
labResuts.value = []
|
zbLabResuts.value = [];
|
||||||
labPatListRef.value?.clearCurrentRow();
|
labPatListRef.value?.clearCurrentRow();
|
||||||
fetchLabResults()
|
fetchLabResults()
|
||||||
}
|
}
|
||||||
@ -497,7 +491,6 @@ const delSampleHd = () => {
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
labPatList.value = labPatList.value.filter((item: any) => item.ybh != labInfo.value.ybh)
|
labPatList.value = labPatList.value.filter((item: any) => item.ybh != labInfo.value.ybh)
|
||||||
getTotals()
|
|
||||||
// 删除跳当前页面下一个样本
|
// 删除跳当前页面下一个样本
|
||||||
// handleNext()
|
// handleNext()
|
||||||
if (highlightRowIndex.value > labPatList.value.length - 1) {
|
if (highlightRowIndex.value > labPatList.value.length - 1) {
|
||||||
@ -615,7 +608,6 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
|
|||||||
labPatListRef.value.setCurrentRow(labPat.value);
|
labPatListRef.value.setCurrentRow(labPat.value);
|
||||||
});
|
});
|
||||||
}, 10)
|
}, 10)
|
||||||
getTotals()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -649,13 +641,8 @@ const fetchlabPatList = () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (res.rows.length > 0) {
|
if (res.rows.length > 0) {
|
||||||
highlightRowIndex.value = 0;
|
highlightRowIndex.value = 0;
|
||||||
setTimeout(() => { labPatListRef.value.setCurrentRow(res.rows[0]); }, 100)
|
setTimeout(() => { labPatListRef.value.setCurrentRow(res.rows[0]) }, 10)
|
||||||
selectJob(res.rows[0])
|
selectJob(res.rows[0])
|
||||||
getTotals()
|
|
||||||
} else {
|
|
||||||
ybs.value = 0
|
|
||||||
ws.value = 0
|
|
||||||
wjs.value = 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -687,12 +674,15 @@ interface DictData {
|
|||||||
const dictData = ref<DictData>({});
|
const dictData = ref<DictData>({});
|
||||||
const labInputcolList = ref([])
|
const labInputcolList = ref([])
|
||||||
const resultConfig = ref([])
|
const resultConfig = ref([])
|
||||||
|
|
||||||
|
const instrdComOpt = ref({}) //仪器通用配置
|
||||||
// 获取参数配置
|
// 获取参数配置
|
||||||
const getSysList = () => {
|
const getSysList = () => {
|
||||||
instrdconfig({ yq: queryParams.value.yq }).then((res: any) => {
|
instrdconfig({ yq: queryParams.value.yq }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
labInputcolList.value = res.data.labInputcolList.filter((item: any) => item.mrts != "年龄单位" && item.mrts != "!")
|
labInputcolList.value = res.data.labInputcolList.filter((item: any) => item.mrts != "年龄单位" && item.mrts != "!")
|
||||||
resultConfig.value = res.data.ResultConfig
|
resultConfig.value = res.data.ResultConfig
|
||||||
|
instrdComOpt.value = res.data.instrdComOpt
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mbStore.setLxsrList([]);
|
mbStore.setLxsrList([]);
|
||||||
@ -726,8 +716,8 @@ onMounted(async () => {
|
|||||||
|
|
||||||
const initSocket = () => {
|
const initSocket = () => {
|
||||||
initWebSocket({
|
initWebSocket({
|
||||||
// fullUrl: `ws://47.97.125.165:8904/ws/instr/${mbStore.fingerprint}`,
|
fullUrl: `ws://47.97.125.165:8904/ws/instr/${mbStore.fingerprint}`,
|
||||||
fullUrl: `ws://192.168.1.151:9801/ws/instr/${mbStore.fingerprint}`,
|
// fullUrl: `ws://192.168.1.151:9801/ws/instr/${mbStore.fingerprint}`,
|
||||||
onOpen: () => {
|
onOpen: () => {
|
||||||
console.log('WebSocket连接成功');
|
console.log('WebSocket连接成功');
|
||||||
},
|
},
|
||||||
@ -797,7 +787,7 @@ const sendMessage = () => {
|
|||||||
margin: .125rem 0;
|
margin: .125rem 0;
|
||||||
|
|
||||||
.el-radio {
|
.el-radio {
|
||||||
margin-right: 15px;
|
margin-right: .3125rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,72 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
培养基接种
|
<div class="mb5">
|
||||||
|
<el-button type="primary" plain size="small">打印培养基条码</el-button>
|
||||||
|
<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">
|
||||||
|
</CustomTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import CustomTable from '@/components/elTable/index.vue';
|
||||||
|
import { getmediumList } from '@/api/liswork/micro/index'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
labPat: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
//结果主键
|
||||||
|
labPatKey: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { labPat, labPatKey } = toRefs(props);
|
||||||
|
|
||||||
|
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 },
|
||||||
|
]);
|
||||||
|
const tableConfig = ref({
|
||||||
|
border: true,
|
||||||
|
height: '100%',
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleColumnDragEnd = (data: any) => {
|
||||||
|
columns.value = data.columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getbyjList = () => {
|
||||||
|
const data = {
|
||||||
|
jyrq: labPat.value.jyrq,
|
||||||
|
yq: labPat.value.yq,
|
||||||
|
ybh: labPat.value.ybh,
|
||||||
|
}
|
||||||
|
getmediumList(data).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableData.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => props.labPat, (newValue) => {
|
||||||
|
if (newValue.jyrq && newValue.ybh && newValue.yq) {
|
||||||
|
getbyjList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -1,33 +1,284 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<CustomTable :data="labResutsData.labResultList" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
<div class="title">
|
||||||
|
<div>
|
||||||
|
<span>初报人:</span>{{ cbInfo?.confirmer }} <span>报告时间:</span>{{ cbInfo?.confirmdt }}
|
||||||
|
</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>
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<CustomTable :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||||
@column-drag-end="handleColumnDragEnd">
|
@column-drag-end="handleColumnDragEnd">
|
||||||
|
<template #xmdh="{ column }">
|
||||||
|
细菌/结果({{ tableData.length }})项
|
||||||
|
</template>
|
||||||
|
<template #od="{ row }">
|
||||||
|
<el-input v-model="row.od" v-if="cbInfo?.jgbz != '2'" size="small" class="full-width-input foucs-input"
|
||||||
|
@change="handleCsjgEnter(row, 1)" />
|
||||||
|
<span v-else>{{ row.od }}</span>
|
||||||
|
</template>
|
||||||
|
<template #csjg="{ row }">
|
||||||
|
<el-input v-model="row.csjg" v-if="cbInfo?.jgbz != '2'" size="small" class="full-width-input"
|
||||||
|
@change="handleCsjgEnter(row, 1)" @dblclick="handleInputFocus(row, 1)" />
|
||||||
|
<span v-else>{{ row.csjg }}</span>
|
||||||
|
</template>
|
||||||
|
<template #jgbz="{ row }">
|
||||||
|
<el-select v-model="row.jgbz" class="full-width-input" v-if="cbInfo?.jgbz != '2'" placeholder=""
|
||||||
|
@change="handleCsjgEnter(row, 1)">
|
||||||
|
<el-option label="阳性" value="P" />
|
||||||
|
<el-option label="阴性" value="N" />
|
||||||
|
</el-select>
|
||||||
|
<span v-else> {{ formatJgbz(row.jgbz) }}</span>
|
||||||
|
</template>
|
||||||
|
<template #cutoff="{ row }">
|
||||||
|
<el-input v-model="row.cutoff" v-if="cbInfo?.jgbz != '2'" size="small" class="full-width-input"
|
||||||
|
@change="handleCsjgEnter(row, 1)" />
|
||||||
|
<span v-else>{{ row.cutoff }}</span>
|
||||||
|
</template>
|
||||||
|
<template #alarm_flag="{ row }">
|
||||||
|
<el-select v-model="row.alarm_flag" class="full-width-input" v-if="cbInfo?.jgbz != '2'" placeholder=""
|
||||||
|
@change="handleCsjgEnter(row, 1)">
|
||||||
|
<el-option label="危急值" value="H" />
|
||||||
|
<el-option label="无" value="" />
|
||||||
|
</el-select>
|
||||||
|
<span v-else> {{ row.alarm_flag == 'H' ? '危急值' : '' }}</span>
|
||||||
|
</template>
|
||||||
|
<template #germclass="{ row }">
|
||||||
|
{{ formatDict(row.germclass, 'germclass') }}
|
||||||
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="title ertext">
|
||||||
|
<div>
|
||||||
|
<span>二报人:</span>{{ erInfo?.confirmer }} <span>报告时间:</span>{{ erInfo?.confirmdt }}
|
||||||
|
</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>
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<CustomTable :data="tableData2" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||||
|
@column-drag-end="handleColumnDragEnd">
|
||||||
|
<template #xmdh="{ column }">
|
||||||
|
细菌/结果({{ tableData2.length }})项
|
||||||
|
</template>
|
||||||
|
<template #od="{ row }">
|
||||||
|
<el-input v-model="row.od" v-if="erInfo?.jgbz != '2'" size="small" class="full-width-input foucs-input"
|
||||||
|
@change="handleCsjgEnter(row, 2)" />
|
||||||
|
<span v-else>{{ row.od }}</span>
|
||||||
|
</template>
|
||||||
|
<template #csjg="{ row }">
|
||||||
|
<el-input v-model="row.csjg" v-if="erInfo?.jgbz != '2'" size="small" class="full-width-input"
|
||||||
|
@change="handleCsjgEnter(row, 2)" @dblclick="handleInputFocus(row, 2)" />
|
||||||
|
<span v-else>{{ row.csjg }}</span>
|
||||||
|
</template>
|
||||||
|
<template #jgbz="{ row }">
|
||||||
|
<el-select v-model="row.jgbz" class="full-width-input" v-if="erInfo?.jgbz != '2'" placeholder=""
|
||||||
|
@change="handleCsjgEnter(row, 2)">
|
||||||
|
<el-option label="阳性" value="P" />
|
||||||
|
<el-option label="阴性" value="N" />
|
||||||
|
</el-select>
|
||||||
|
<span v-else> {{ formatJgbz(row.jgbz) }}</span>
|
||||||
|
</template>
|
||||||
|
<template #cutoff="{ row }">
|
||||||
|
<el-input v-model="row.cutoff" v-if="erInfo?.jgbz != '2'" size="small" class="full-width-input"
|
||||||
|
@change="handleCsjgEnter(row, 2)" />
|
||||||
|
<span v-else>{{ row.cutoff }}</span>
|
||||||
|
</template>
|
||||||
|
<template #alarm_flag="{ row }">
|
||||||
|
<el-select v-model="row.alarm_flag" class="full-width-input" v-if="erInfo?.jgbz != '2'" placeholder=""
|
||||||
|
@change="handleCsjgEnter(row, 2)">
|
||||||
|
<el-option label="危急值" value="H" />
|
||||||
|
<el-option label="无" value="" />
|
||||||
|
</el-select>
|
||||||
|
<span v-else> {{ row.alarm_flag == 'H' ? '危急值' : '' }}</span>
|
||||||
|
</template>
|
||||||
|
<template #germclass="{ row }">
|
||||||
|
{{ formatDict(row.germclass, 'germclass') }}
|
||||||
|
</template>
|
||||||
|
</CustomTable>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 新增明细 -->
|
||||||
|
<ProjectDetails ref="itemDictRef" :dialog-title="'选择检验项目'" :tableKey="labPatKey" @select="handleItemSelect" />
|
||||||
|
|
||||||
|
<!-- 测试结果项目常用结果选择 -->
|
||||||
|
<projectsJg ref="csjgRef" :tableData='csjgTableData' :dialog-title="'项目常用结果选择'" @selectItem="selectItem"
|
||||||
|
label="qz" />
|
||||||
|
|
||||||
|
<!-- 组合项目 -->
|
||||||
|
<Combined ref="combinedRef" :queryParams="labPatKey" @dbMbHandle="combinedHandel" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
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";
|
||||||
|
// @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 { useCommonStore } from "@/store/modules/commonStore";
|
||||||
|
import { classCom } from '@/utils/classCom';
|
||||||
|
const autoSize = classCom.useAutoSize();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
labResutsData: {
|
|
||||||
type: Object,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
//结果主键
|
|
||||||
labPat: {
|
labPat: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
//结果主键
|
||||||
|
labPatKey: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
},
|
||||||
|
// 主键仪器参数
|
||||||
|
instrdComOpt: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
|
||||||
|
dictData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const { labPat, labPatKey, instrdComOpt } = toRefs(props);
|
||||||
|
|
||||||
|
const tableData = ref<LabResultItem[]>([])
|
||||||
|
const tableData2 = ref<LabResultItem[]>([])
|
||||||
|
|
||||||
|
const cbInfo = ref<any>({})
|
||||||
|
const erInfo = ref<any>({})
|
||||||
|
|
||||||
|
const mbStore = useCommonStore();
|
||||||
|
watch(labPat, (newVal: any) => {
|
||||||
|
//获取结果列表
|
||||||
|
getResultList()
|
||||||
|
// 获取病人信息
|
||||||
|
getLabPatInfo()
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => tableData, (newValue) => {
|
||||||
|
// 模板数据
|
||||||
|
if (labPat.value.jgbz != null && labPat.value.jgbz != 0 && labPat.value.jgbz != 'C') return;
|
||||||
|
mbList(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => tableData2, (newValue) => {
|
||||||
|
// 模板数据
|
||||||
|
if (labPat.value.jgbz != null && labPat.value.jgbz != 0 && labPat.value.jgbz != 'C') return;
|
||||||
|
mbList(2)
|
||||||
|
})
|
||||||
|
|
||||||
|
const getLabPatInfo = () => {
|
||||||
|
queryLabPat({ jyrq: labPat.value.jyrq, yq: instrdComOpt.value.yq1, ybh: labPat.value.ybh, }).then((response: any) => {
|
||||||
|
cbInfo.value = response.data;
|
||||||
|
})
|
||||||
|
queryLabPat({ jyrq: labPat.value.jyrq, yq: instrdComOpt.value.yq2, ybh: labPat.value.ybh, }).then((response: any) => {
|
||||||
|
erInfo.value = response.data;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getResultList = () => {
|
||||||
|
// 初级数据
|
||||||
|
sampleMedInfo({ jyrq: labPat.value.jyrq, yq: instrdComOpt.value.yq1, ybh: labPat.value.ybh, }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableData.value = res.data.map((item: any) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
zhxmdh: item.xmdh + ' ' + item.xmmc,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 二级数据
|
||||||
|
sampleMedInfo({ jyrq: labPat.value.jyrq, yq: instrdComOpt.value.yq2, ybh: labPat.value.ybh, }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableData2.value = res.data.map((item: any) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
zhxmdh: item.xmdh + ' ' + item.xmmc,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const mbList = (type: number) => {
|
||||||
|
const targetTable = type === 1 ? tableData.value : tableData2.value;
|
||||||
|
if (mbStore.lxsrs.length > 0) {
|
||||||
|
mbStore.lxsrs.forEach((mbmc) => {
|
||||||
|
const data = {
|
||||||
|
...labPatKey.value,
|
||||||
|
mbmc: mbmc,
|
||||||
|
}
|
||||||
|
setinputmdl(data).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
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 })
|
||||||
|
existingNames.add(item.xmdh)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
emitter.emit('clearLxsrList')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 事件定义
|
||||||
|
const emits = defineEmits([
|
||||||
|
'fetchLabResults',
|
||||||
|
'changeStatus',
|
||||||
|
'previewHandle'
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ label: "细菌/结果", prop: "xmdh", align: 'center', visible: true, slot: 'xmdh', width: 150 },
|
{ label: "细菌/结果", prop: "zhxmdh", align: 'center', 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: "csjg", align: 'center', visible: true, slot: 'csjg' },
|
||||||
{ label: "阴阳性", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz' },
|
{ label: "阴阳性", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', showOverflowTooltip: false },
|
||||||
{ label: "危急值", prop: "alarm_flag", align: 'center', visible: true, slot: 'alarm_flag' },
|
{ label: "危急值", prop: "alarm_flag", align: 'center', visible: true, slot: 'alarm_flag', showOverflowTooltip: false },
|
||||||
{ label: "菌属", prop: "xmmc", align: 'center', visible: true },
|
{ label: "菌属", prop: "germclass", align: 'center', visible: true, slot: 'germclass' },
|
||||||
|
{ label: "鉴定率", prop: "cutoff", align: 'center', visible: true, slot: 'cutoff' },
|
||||||
|
{ label: "抗生素组", prop: "bz1", align: 'center', visible: true, width: 120 },
|
||||||
])
|
])
|
||||||
|
|
||||||
const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||||
@ -72,9 +323,9 @@ const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
height: '28vh',
|
height: '32vh',
|
||||||
border: true,
|
border: true,
|
||||||
highlightCurrentRow: true,
|
// highlightCurrentRow: true,
|
||||||
cellStyle: CellStyleHd
|
cellStyle: CellStyleHd
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -82,6 +333,234 @@ const handleColumnDragEnd = (data: any) => {
|
|||||||
columns.value = data.columns;
|
columns.value = data.columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 unCheckshow = ref(false);
|
||||||
|
const reasonText = ref('');
|
||||||
|
const warningMsgdata = ref('');
|
||||||
|
const showuploadwarning = ref(false);
|
||||||
|
|
||||||
|
const shHandleCheck = () => {
|
||||||
|
check2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: labPat.value.yhdh, yq: labPat.value.yq }).then((res: any) => {
|
||||||
|
if (res.code == "4" && res.problemId === 4) {
|
||||||
|
labPatKey.value.problemId = res.problemId;
|
||||||
|
warningMsgdata.value = res.msg;
|
||||||
|
showuploadwarning.value = true;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
getLabPatInfo()
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const handleBatchDelete = (type: number) => {
|
||||||
|
bgType.value = type
|
||||||
|
}
|
||||||
|
|
||||||
|
// 项目结果保存
|
||||||
|
const handleCsjgEnter = async (row: any, type: number) => {
|
||||||
|
bgType.value = type
|
||||||
|
const yq = type === 1 ? instrdComOpt.value.yq1 : instrdComOpt.value.yq2
|
||||||
|
const targetTable = type === 1 ? tableData.value : tableData2.value;
|
||||||
|
// 判断数据中包含模板新增的数据 flag
|
||||||
|
if (targetTable.length == 0) return
|
||||||
|
const flag = targetTable.some((item: any) => item.changeflag == 2)
|
||||||
|
if (flag) {
|
||||||
|
saveresult(targetTable).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
getResultList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
if (!row) return
|
||||||
|
if (row && row.id) {
|
||||||
|
newresult({ ...row, ybh: labPat.value.ybh, jyrq: labPat.value.jyrq, yq }).then((response: any) => {
|
||||||
|
ElMessage.success("结果保存成功");
|
||||||
|
getResultList()
|
||||||
|
}).catch((error: any) => {
|
||||||
|
getResultList()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
changeresult(row).then((response: any) => {
|
||||||
|
ElMessage.success("结果保存成功");
|
||||||
|
getResultList()
|
||||||
|
}).catch((error: any) => {
|
||||||
|
getResultList()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// nextTick(() => {
|
||||||
|
// const input = document.activeElement;
|
||||||
|
// if (input?.tagName === "INPUT") input?.blur();
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
const itemDictRef = ref();
|
||||||
|
const openItemDictDialog = (type: number) => {
|
||||||
|
bgType.value = type
|
||||||
|
itemDictRef.value.openDictSelector();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleItemSelect = async (selectedItem: any) => {
|
||||||
|
const yq = bgType.value === 1 ? instrdComOpt.value.yq1 : instrdComOpt.value.yq2
|
||||||
|
const targetTable = bgType.value === 1 ? tableData.value : tableData2.value;
|
||||||
|
// 1. 构造新增行数据
|
||||||
|
const newRow = {
|
||||||
|
id: `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`,
|
||||||
|
xmdh: selectedItem.value,
|
||||||
|
xmmc: selectedItem.label,
|
||||||
|
dw: selectedItem.dw || "",
|
||||||
|
refs: selectedItem.refs || "",
|
||||||
|
jyrq: labPatKey.value.jyrq,
|
||||||
|
yq: yq,
|
||||||
|
ybh: labPatKey.value.ybh,
|
||||||
|
od: '',
|
||||||
|
csjg: "",
|
||||||
|
jgbz: "",
|
||||||
|
alarm_flag: '',
|
||||||
|
cutoff: '',
|
||||||
|
qz: '',
|
||||||
|
zhxmdh: selectedItem.value + ' ' + selectedItem.label,
|
||||||
|
};
|
||||||
|
|
||||||
|
const isDuplicate = targetTable.some((item: any) => item.xmdh === newRow.xmdh);
|
||||||
|
if (isDuplicate) return ElMessage.warning(`项目【${newRow.xmmc}】已存在`);
|
||||||
|
|
||||||
|
|
||||||
|
targetTable.push(newRow);
|
||||||
|
newresult({ ...newRow, ybh: labPat.value.ybh, jyrq: labPat.value.jyrq, yq })
|
||||||
|
// 5. 自动聚焦
|
||||||
|
// nextTick(() => {
|
||||||
|
// selectedRows.value = [newRow];
|
||||||
|
// tableRef.value.setCurrentRow(newRow);
|
||||||
|
// tableRef.value.setScrollTo(targetTable.length - 1)
|
||||||
|
// // 聚焦到新行的输入框
|
||||||
|
// const inputs = Array.from(document.querySelectorAll('.foucs-input .el-input__inner'))
|
||||||
|
// .filter(el => el instanceof HTMLElement) as HTMLElement[];
|
||||||
|
// if (inputs.length > 0) {
|
||||||
|
// inputs[inputs.length - 1].focus();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// ElMessage.success(`已新增项目:${newRow.xmmc}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const csjgRef = ref()
|
||||||
|
const csjgTableData = ref([])
|
||||||
|
const handleInputFocus = (row: any, type: number) => {
|
||||||
|
bgType.value = type
|
||||||
|
// dbRow.value = row
|
||||||
|
queryXmVal({ yq: labPatKey.value.yq, xmdh: row.xmdh }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
csjgTableData.value = res.data
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
csjgRef.value.open()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectItem = (row: any) => {
|
||||||
|
const targetTable = bgType.value === 1 ? tableData.value : tableData2.value;
|
||||||
|
// 查找修改行
|
||||||
|
const index = targetTable.findIndex((item: any) => item.xmdh == row.xmdh)
|
||||||
|
targetTable[index].csjg = row.qz
|
||||||
|
handleCsjgEnter(targetTable[index], bgType.value)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 组合项目
|
||||||
|
const combinedRef = ref()
|
||||||
|
|
||||||
|
const zhHandel = (type: number) => {
|
||||||
|
bgType.value = type
|
||||||
|
combinedRef.value.open()
|
||||||
|
};
|
||||||
|
|
||||||
|
const combinedHandel = (row: any) => {
|
||||||
|
const targetTable = bgType.value === 1 ? tableData.value : tableData2.value;
|
||||||
|
const data = {
|
||||||
|
...labPatKey.value,
|
||||||
|
mbmc: row.mbmc,
|
||||||
|
}
|
||||||
|
setinputmdl(data).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
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 })
|
||||||
|
existingNames.add(item.xmdh)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
handleCsjgEnter(null, bgType.value)
|
||||||
|
emitter.emit('clearLxsrList')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const formatDict = (v: string, dictType: string) => {
|
||||||
|
return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatJgbz = (v: string) => {
|
||||||
|
return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : ''
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped lang="scss">
|
||||||
|
.title {
|
||||||
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 3px 0;
|
||||||
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #057c34;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ertext {
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #e2e20c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
159
src/views/liswork/micro/labresult/components/kssMb.vue
Normal file
159
src/views/liswork/micro/labresult/components/kssMb.vue
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dict-input-wrapper">
|
||||||
|
<!-- 字典选择弹窗 -->
|
||||||
|
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="30vw" :close-on-click-modal="false" :draggable="true"
|
||||||
|
@close="handleDialogClose">
|
||||||
|
<el-input ref="inputRef" v-model="searchKey" placeholder="搜索(支持名称、编码、简拼)..." class="mb10" clearable
|
||||||
|
@clear="filterDictData" @input="filterDictData" />
|
||||||
|
|
||||||
|
<el-table :data="filteredDictData" height="300px" border @row-dblclick="selectItem" highlight-current-row>
|
||||||
|
<!-- <el-table-column prop="value" label="抗生素组" align="center" width="150" /> -->
|
||||||
|
<el-table-column prop="label" label="抗生素组" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="pinyin" label="简拼" align="center" width="150" /> <!-- 显示简拼便于调试 -->
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, computed, watch, onMounted } from 'vue';
|
||||||
|
import { getmedgroupList } from '@/api/liswork/micro/index';
|
||||||
|
import { getFirstLetter } from '@/utils/pinyin.js'; // 引入拼音处理工具
|
||||||
|
// 组件参数
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: { type: [String, Number], default: '' },
|
||||||
|
dictType: { type: String },
|
||||||
|
placeholder: { type: String, default: '请输入或双击选择' },
|
||||||
|
clearable: { type: Boolean, default: true },
|
||||||
|
disabled: { type: Boolean, default: false },
|
||||||
|
dialogTitle: { type: String, default: '选择字典项' },
|
||||||
|
tableKey: { type: Object, default: () => { } },
|
||||||
|
});
|
||||||
|
|
||||||
|
// 组件事件
|
||||||
|
const emit = defineEmits(['select']);
|
||||||
|
|
||||||
|
|
||||||
|
const dictData = ref([]); // 存储带简拼的字典数据
|
||||||
|
const filteredDictData = ref([]);
|
||||||
|
const isDictLoading = ref(false);
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
const searchKey = ref('');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 加载字典数据(并添加简拼字段)
|
||||||
|
const loadDictData = async () => {
|
||||||
|
try {
|
||||||
|
isDictLoading.value = true;
|
||||||
|
|
||||||
|
const response = await getmedgroupList();
|
||||||
|
|
||||||
|
const rawData = response.data.map((item, index) => {
|
||||||
|
return {
|
||||||
|
value: item.ywzmc || `未知编码_${index}`, // 确保value存在
|
||||||
|
label: item.ywzmc || `未知名称_${index}`, // 确保label存在
|
||||||
|
};
|
||||||
|
});
|
||||||
|
// 为每个字典项添加简拼字段
|
||||||
|
dictData.value = (rawData || []).map(item => ({
|
||||||
|
...item,
|
||||||
|
pinyin: getFirstLetter(item.label) // 新增pinyin字段存储简拼
|
||||||
|
}));
|
||||||
|
|
||||||
|
filteredDictData.value = [...dictData.value];
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`加载${props.dictType}字典失败:`, error);
|
||||||
|
dictData.value = [];
|
||||||
|
filteredDictData.value = [];
|
||||||
|
} finally {
|
||||||
|
isDictLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 核心搜索逻辑(支持模糊搜索+简拼搜索)
|
||||||
|
const filterDictData = () => {
|
||||||
|
const key = searchKey.value.trim().toLowerCase();
|
||||||
|
if (!key) {
|
||||||
|
filteredDictData.value = [...dictData.value];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
filteredDictData.value = dictData.value.filter(item => {
|
||||||
|
// 1. 模糊搜索:匹配label(名称)或value(编码)
|
||||||
|
const matchLabel = item.label.toLowerCase().includes(key);
|
||||||
|
const matchValue = String(item.value).toLowerCase().includes(key);
|
||||||
|
|
||||||
|
// 2. 简拼搜索:匹配首字母简拼
|
||||||
|
const matchPinyin = item.pinyin.toLowerCase().includes(key);
|
||||||
|
|
||||||
|
// 满足任一条件即匹配
|
||||||
|
return matchLabel || matchValue || matchPinyin;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const inputRef = ref()
|
||||||
|
// 关键修改:打开弹窗时重新加载数据
|
||||||
|
const openDictSelector = async () => {
|
||||||
|
if (props.disabled || isDictLoading.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开弹窗前先加载数据(确保每次打开都是最新的)
|
||||||
|
await loadDictData();
|
||||||
|
|
||||||
|
// 数据加载完成后再显示弹窗
|
||||||
|
dialogVisible.value = true;
|
||||||
|
searchKey.value = '';
|
||||||
|
nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
inputRef.value.focus();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
filterDictData();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 选择字典项
|
||||||
|
const selectItem = (item) => {
|
||||||
|
emit('select', item);
|
||||||
|
dialogVisible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const handleDialogClose = () => {
|
||||||
|
dialogVisible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
openDictSelector, // 暴露打开弹窗的方法
|
||||||
|
// 可选:暴露其他可能需要的方法(如刷新字典数据)
|
||||||
|
loadDictData
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 样式保持不变 */
|
||||||
|
.dict-input-wrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-icon {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #666;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-icon:hover {
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input__suffix) {
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
159
src/views/liswork/micro/labresult/components/meddict.vue
Normal file
159
src/views/liswork/micro/labresult/components/meddict.vue
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dict-input-wrapper">
|
||||||
|
<!-- 字典选择弹窗 -->
|
||||||
|
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="30vw" :close-on-click-modal="false" :draggable="true"
|
||||||
|
@close="handleDialogClose">
|
||||||
|
<el-input ref="inputRef" v-model="searchKey" placeholder="搜索(支持名称、编码、简拼)..." class="mb10" clearable
|
||||||
|
@clear="filterDictData" @input="filterDictData" />
|
||||||
|
|
||||||
|
<el-table :data="filteredDictData" height="300px" border @row-dblclick="selectItem" highlight-current-row>
|
||||||
|
<el-table-column prop="value" label="编码" align="center" width="150" />
|
||||||
|
<el-table-column prop="label" label="名称" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="pinyin" label="简拼" align="center" width="150" /> <!-- 显示简拼便于调试 -->
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, computed, watch, onMounted } from 'vue';
|
||||||
|
import { getmeddictList } from '@/api/liswork/micro/index';
|
||||||
|
import { getFirstLetter } from '@/utils/pinyin.js'; // 引入拼音处理工具
|
||||||
|
// 组件参数
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: { type: [String, Number], default: '' },
|
||||||
|
dictType: { type: String },
|
||||||
|
placeholder: { type: String, default: '请输入或双击选择' },
|
||||||
|
clearable: { type: Boolean, default: true },
|
||||||
|
disabled: { type: Boolean, default: false },
|
||||||
|
dialogTitle: { type: String, default: '选择字典项' },
|
||||||
|
tableKey: { type: Object, default: () => { } },
|
||||||
|
});
|
||||||
|
|
||||||
|
// 组件事件
|
||||||
|
const emit = defineEmits(['select']);
|
||||||
|
|
||||||
|
|
||||||
|
const dictData = ref([]); // 存储带简拼的字典数据
|
||||||
|
const filteredDictData = ref([]);
|
||||||
|
const isDictLoading = ref(false);
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
const searchKey = ref('');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 加载字典数据(并添加简拼字段)
|
||||||
|
const loadDictData = async () => {
|
||||||
|
try {
|
||||||
|
isDictLoading.value = true;
|
||||||
|
|
||||||
|
const response = await getmeddictList();
|
||||||
|
|
||||||
|
const rawData = response.data.map((item, index) => {
|
||||||
|
return {
|
||||||
|
value: item.ywdh || `未知编码_${index}`, // 确保value存在
|
||||||
|
label: item.ywmc || `未知名称_${index}`, // 确保label存在
|
||||||
|
};
|
||||||
|
});
|
||||||
|
// 为每个字典项添加简拼字段
|
||||||
|
dictData.value = (rawData || []).map(item => ({
|
||||||
|
...item,
|
||||||
|
pinyin: getFirstLetter(item.label) // 新增pinyin字段存储简拼
|
||||||
|
}));
|
||||||
|
|
||||||
|
filteredDictData.value = [...dictData.value];
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`加载${props.dictType}字典失败:`, error);
|
||||||
|
dictData.value = [];
|
||||||
|
filteredDictData.value = [];
|
||||||
|
} finally {
|
||||||
|
isDictLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 核心搜索逻辑(支持模糊搜索+简拼搜索)
|
||||||
|
const filterDictData = () => {
|
||||||
|
const key = searchKey.value.trim().toLowerCase();
|
||||||
|
if (!key) {
|
||||||
|
filteredDictData.value = [...dictData.value];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
filteredDictData.value = dictData.value.filter(item => {
|
||||||
|
// 1. 模糊搜索:匹配label(名称)或value(编码)
|
||||||
|
const matchLabel = item.label.toLowerCase().includes(key);
|
||||||
|
const matchValue = String(item.value).toLowerCase().includes(key);
|
||||||
|
|
||||||
|
// 2. 简拼搜索:匹配首字母简拼
|
||||||
|
const matchPinyin = item.pinyin.toLowerCase().includes(key);
|
||||||
|
|
||||||
|
// 满足任一条件即匹配
|
||||||
|
return matchLabel || matchValue || matchPinyin;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const inputRef = ref()
|
||||||
|
// 关键修改:打开弹窗时重新加载数据
|
||||||
|
const openDictSelector = async () => {
|
||||||
|
if (props.disabled || isDictLoading.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开弹窗前先加载数据(确保每次打开都是最新的)
|
||||||
|
await loadDictData();
|
||||||
|
|
||||||
|
// 数据加载完成后再显示弹窗
|
||||||
|
dialogVisible.value = true;
|
||||||
|
searchKey.value = '';
|
||||||
|
nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
inputRef.value.focus();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
filterDictData();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 选择字典项
|
||||||
|
const selectItem = (item) => {
|
||||||
|
emit('select', item);
|
||||||
|
dialogVisible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const handleDialogClose = () => {
|
||||||
|
dialogVisible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
openDictSelector, // 暴露打开弹窗的方法
|
||||||
|
// 可选:暴露其他可能需要的方法(如刷新字典数据)
|
||||||
|
loadDictData
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 样式保持不变 */
|
||||||
|
.dict-input-wrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-icon {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #666;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-icon:hover {
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input__suffix) {
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -51,7 +51,9 @@ const getRecordList = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
watch(() => props.labPat, (newValue) => {
|
watch(() => props.labPat, (newValue) => {
|
||||||
getRecordList()
|
if (newValue.jyrq && newValue.ybh && newValue.yq) {
|
||||||
|
getRecordList()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<el-button class="btn_green btns_box" :size="aotuSize" v-if="labPat.jgbz != 2"
|
<el-button class="btn_green btns_box" :size="autoSize" v-if="labPat.jgbz != 2"
|
||||||
@click="handleCheck(2)">审核</el-button>
|
@click="handleCheck(2)">审核</el-button>
|
||||||
<el-button class="btns_box" :size="aotuSize" v-if="labPat.jgbz == 2" @click="handleCheck(3)">取消审核</el-button>
|
<el-button class="btns_box" :size="autoSize" v-if="labPat.jgbz == 2" @click="handleCheck(3)">取消审核</el-button>
|
||||||
<el-button class="btns_box" type="primary" :size="aotuSize" plain
|
<el-button class="btns_box" type="primary" :size="autoSize" plain
|
||||||
:disabled="labPat.jgbz != null && labPat.jgbz != 0" @click="openItemDictDialog">新增</el-button>
|
:disabled="labPat.jgbz != null && labPat.jgbz != 0" @click="openItemDictDialog">新增</el-button>
|
||||||
<el-button class="btns_box" type="danger" :size="aotuSize" :disabled="labPat.jgbz != null && labPat.jgbz != 0"
|
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="labPat.jgbz != null && labPat.jgbz != 0"
|
||||||
plain @click="handleBatchDelete">删除</el-button>
|
plain @click="handleBatchDelete">删除</el-button>
|
||||||
<el-button class="btn_green btns_box" :size="aotuSize" @click="zhHandel">组合项目</el-button>
|
<el-button class="btn_green btns_box" :size="autoSize" @click="zhHandel">组合项目</el-button>
|
||||||
</div>
|
</div>
|
||||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||||
@column-drag-end="handleColumnDragEnd" @row-click="rowHandle">
|
@column-drag-end="handleColumnDragEnd" @row-click="rowHandle">
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #jgbz="{ row }">
|
<template #jgbz="{ row }">
|
||||||
<el-select v-model="row.jgbz" class="full-width-input" v-if="labPat.jgbz == 0 || labPat.jgbz == null"
|
<el-select v-model="row.jgbz" class="full-width-input" v-if="labPat.jgbz == 0 || labPat.jgbz == null"
|
||||||
@change="handleCsjgEnter(row)">
|
placeholder="" @change="handleCsjgEnter(row)">
|
||||||
<el-option label="阳性" value="P" />
|
<el-option label="阳性" value="P" />
|
||||||
<el-option label="阴性" value="N" />
|
<el-option label="阴性" value="N" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -51,23 +51,57 @@
|
|||||||
</template>
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
<div class="tabs_btns">
|
<div class="tabs_btns">
|
||||||
<el-tabs v-model="activeName2" type="card" class="demo-tabs" :size="aotuSize">
|
<el-tabs v-model="activeName2" type="card" class="demo-tabs" :size="autoSize">
|
||||||
<el-tab-pane label="药敏结果" name="first">
|
<el-tab-pane label="药敏结果" name="first">
|
||||||
<CustomTable :data="ymTableData" :columns="ymColumns" :config="ymTableConfig" :enable-column-drag="true"
|
<CustomTable ref="ymTableRef" :data="ymTableData" :columns="ymColumns" :config="ymTableConfig"
|
||||||
@column-drag-end="ymHandleColumnDragEnd">
|
:enable-column-drag="true" @row-click="ymRowHandle" @column-drag-end="ymHandleColumnDragEnd">
|
||||||
<template #ywdhHead="{ column }">
|
<template #ywdhHead="{ column }">
|
||||||
抗生素({{ ymTableData.length }})项
|
抗生素({{ ymTableData.length }})项
|
||||||
</template>
|
</template>
|
||||||
|
<template #mic="{ row }">
|
||||||
|
<el-input v-model="row.mic" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||||
|
class="ymFoucs full-width-input" @change="ymHandleEnter(row)" />
|
||||||
|
<span v-else>{{ row.mic }}</span>
|
||||||
|
</template>
|
||||||
|
<template #rad="{ row }">
|
||||||
|
<el-input v-model="row.rad" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||||
|
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||||
|
<span v-else>{{ row.rad }}</span>
|
||||||
|
</template>
|
||||||
|
<template #csjg="{ row }">
|
||||||
|
<el-input v-model="row.csjg" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||||
|
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||||
|
<span v-else>{{ row.csjg }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #jgbz="{ row }">
|
<template #jgbz="{ row }">
|
||||||
<el-radio-group v-model="row.jgbz">
|
<el-radio-group v-model="row.jgbz" :disabled="labPat.jgbz == 0 || labPat.jgbz == null ? false : true"
|
||||||
|
@change="(val: string) => { jgbzHandle(val, row) }">
|
||||||
<el-radio value="R">R</el-radio>
|
<el-radio value="R">R</el-radio>
|
||||||
<el-radio value="I">I</el-radio>
|
<el-radio value="I">I</el-radio>
|
||||||
<el-radio value="S">S</el-radio>
|
<el-radio value="S">S</el-radio>
|
||||||
<el-radio value="N">N</el-radio>
|
<el-radio value="N">N</el-radio>
|
||||||
<el-radio value="SDD">SDD</el-radio>
|
<el-radio value="D">SDD</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #bz="{ row }">
|
||||||
|
<el-input v-model="row.bz" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||||
|
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||||
|
<span v-else>{{ row.bz }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #txtresult="{ row }">
|
||||||
|
<el-input v-model="row.txtresult" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||||
|
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||||
|
<span v-else>{{ row.txtresult }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #cp_bz="{ row }">
|
||||||
|
<el-input v-model="row.cp_bz" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||||
|
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||||
|
<span v-else>{{ row.cp_bz }}</span>
|
||||||
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@ -77,12 +111,12 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div class="btns anchor">
|
<div class="btns anchor">
|
||||||
<template v-if="activeName2 == 'first'">
|
<template v-if="activeName2 == 'first'">
|
||||||
<el-button class="btns_box" type="primary" :size="aotuSize" plain
|
<el-button class="btns_box" type="primary" :size="autoSize" plain
|
||||||
:disabled="labPat.jgbz != null && labPat.jgbz != 0">新增</el-button>
|
:disabled="labPat.jgbz != null && labPat.jgbz != 0" @click="addMed">新增</el-button>
|
||||||
<el-button class="btns_box" type="danger" :size="aotuSize" :disabled="labPat.jgbz != null && labPat.jgbz != 0"
|
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="labPat.jgbz != null && labPat.jgbz != 0"
|
||||||
plain>删除</el-button>
|
plain @click="delMed">删除</el-button>
|
||||||
<el-button type="primary" class="btns_box" plain :size="autoSize">更换抗生素组</el-button>
|
<el-button type="primary" class="btns_box" plain :size="autoSize" @click="changeKss">更换抗生素组</el-button>
|
||||||
<el-button type="primary" class="btns_box" plain :size="autoSize">添加抗生素组</el-button>
|
<el-button type="primary" class="btns_box" plain :size="autoSize" @click="addKss">添加抗生素组</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="activeName2 == 'second'">
|
<template v-if="activeName2 == 'second'">
|
||||||
@ -104,6 +138,12 @@
|
|||||||
<!-- 组合项目 -->
|
<!-- 组合项目 -->
|
||||||
<Combined ref="combinedRef" :queryParams="labPatKey" @dbMbHandle="combinedHandel" />
|
<Combined ref="combinedRef" :queryParams="labPatKey" @dbMbHandle="combinedHandel" />
|
||||||
|
|
||||||
|
<!-- 药敏字典 -->
|
||||||
|
<Meddict ref="medDictRef" :dialog-title="'抗生素选择'" :tableKey="labPatKey" @select="medSelect" />
|
||||||
|
|
||||||
|
<!-- 抗生素组模板 -->
|
||||||
|
<kssMb ref="kssMbRef" :dialog-title="'抗生素组选择'" :tableKey="labPatKey" @select="kssSelect" />
|
||||||
|
|
||||||
<!-- 操作原因 -->
|
<!-- 操作原因 -->
|
||||||
<el-dialog v-model="unCheckshow" title="操作原因" width="500" :close-on-click-modal="false" :draggable="true"
|
<el-dialog v-model="unCheckshow" title="操作原因" width="500" :close-on-click-modal="false" :draggable="true"
|
||||||
@close="unconfirmlogCancel">
|
@close="unconfirmlogCancel">
|
||||||
@ -138,29 +178,26 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from "@/components/elTable/index.vue";
|
import CustomTable from "@/components/elTable/index.vue";
|
||||||
import { classCom } from "@/utils/classCom";
|
import { classCom } from "@/utils/classCom";
|
||||||
|
|
||||||
import { getresultmedList, savetestResult, changeresult, saveresult, newresult, } from '@/api/liswork/micro/index';
|
|
||||||
import {
|
import {
|
||||||
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, allPatquery, emrquery, datalink, changeLinkList,
|
getresultmedList, savetestResult, changeresult, saveresult, newresult, getmeddictList, savemedresult,
|
||||||
viewBackup, queryXmVal, printListwork, getresultchangelog, setinputmdl, lockSample, unLockSample, clearnotComplete, clearPrintflag,
|
savemedresultall, deletemedresult, getmedgroupMbList
|
||||||
noiteMresult, queryXmInfo, setitemInter
|
} from '@/api/liswork/micro/index';
|
||||||
} from "@/api/liswork/work/LisWork";
|
import { check2, uncheck2, unconfirmlog, checkuser, deleteresult, queryXmVal, setinputmdl, } from "@/api/liswork/work/LisWork";
|
||||||
import { useCommonStore } from "@/store/modules/commonStore";
|
import { useCommonStore } from "@/store/modules/commonStore";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import ProjectDetails from "@/components/projectDetails/index.vue";
|
import ProjectDetails from "@/components/projectDetails/index.vue";
|
||||||
import projectsJg from "@/components/projectsjg/index.vue"
|
import projectsJg from "@/components/projectsjg/index.vue";
|
||||||
|
// @ts-ignore
|
||||||
|
import kssMb from "./components/kssMb.vue";
|
||||||
import Combined from "./components/combinedDialog.vue";
|
import Combined from "./components/combinedDialog.vue";
|
||||||
|
// @ts-ignore
|
||||||
|
import Meddict from "./components/meddict.vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import emitter from "@/utils/mitt";
|
import emitter from "@/utils/mitt";
|
||||||
const aotuSize = classCom.useAutoSize();
|
const autoSize = classCom.useAutoSize();
|
||||||
|
import { LabResultItem, ymTableDataItem } from '@/types/index';
|
||||||
|
|
||||||
|
|
||||||
interface LabResultItem {
|
|
||||||
xmdh: string;
|
|
||||||
xmmc: string;
|
|
||||||
csjg: string;
|
|
||||||
qz: string;
|
|
||||||
[key: string]: any;
|
|
||||||
}
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
labPat: {
|
labPat: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -189,10 +226,6 @@ const emits = defineEmits([
|
|||||||
'previewHandle'
|
'previewHandle'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const autoSize = classCom.useAutoSize();
|
|
||||||
const activeName2 = ref('first')
|
const activeName2 = ref('first')
|
||||||
const textarea = ref('')
|
const textarea = ref('')
|
||||||
|
|
||||||
@ -414,7 +447,7 @@ const addRowFromDict = async (rowData: any) => {
|
|||||||
cutoff: '',
|
cutoff: '',
|
||||||
};
|
};
|
||||||
tableData.value.push(newRow);
|
tableData.value.push(newRow);
|
||||||
|
newresult({ ...newRow, ybh: labPat.value.ybh, jyrq: labPat.value.jyrq, yq: labPat.value.yq })
|
||||||
// 5. 自动聚焦
|
// 5. 自动聚焦
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
selectedRows.value = [newRow];
|
selectedRows.value = [newRow];
|
||||||
@ -457,6 +490,7 @@ const handleBatchDelete = () => {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const mbStore = useCommonStore();
|
const mbStore = useCommonStore();
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
|
|
||||||
@ -474,6 +508,9 @@ watch(labResutsData, (newVal: any) => {
|
|||||||
textarea.value = ''
|
textarea.value = ''
|
||||||
rowInfo.value = {}
|
rowInfo.value = {}
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
|
selectedRows.value = []
|
||||||
|
ymTableData.value = []
|
||||||
|
ymselectedRows.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return;
|
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return;
|
||||||
@ -531,30 +568,7 @@ const rowHandle = (row: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const ymTableData = ref([]);
|
// 项目结果保存
|
||||||
|
|
||||||
const ymColumns = ref([
|
|
||||||
{ label: "抗生素", prop: "zhywdh", visible: true, width: 120, headerSlot: 'ywdhHead' },
|
|
||||||
{ label: "Mic", prop: "mic", align: 'center', visible: true, width: 60 },
|
|
||||||
{ label: "KB", prop: "rad", align: 'center', visible: true, width: 40 },
|
|
||||||
{ label: "结果", prop: "csjg", align: 'center', visible: true, width: 50 },
|
|
||||||
{ label: "结果标志", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', width: 180, showOverflowTooltip: false },
|
|
||||||
{ label: "折点", prop: "ckz", align: 'center', visible: true },
|
|
||||||
{ label: "分组", prop: "bz", align: 'center', visible: true },
|
|
||||||
{ label: "专家值", prop: "txtresult", align: 'center', visible: true },
|
|
||||||
{ label: "引用说明", prop: "cp_bz", align: 'center', visible: true },
|
|
||||||
])
|
|
||||||
|
|
||||||
const ymTableConfig = ref({
|
|
||||||
height: '48vh',
|
|
||||||
border: true,
|
|
||||||
highlightCurrentRow: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
const ymHandleColumnDragEnd = (data: any) => {
|
|
||||||
ymColumns.value = data.columns;
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleCsjgEnter = async (row: any) => {
|
const handleCsjgEnter = async (row: any) => {
|
||||||
// 判断数据中包含模板新增的数据 flag
|
// 判断数据中包含模板新增的数据 flag
|
||||||
if (tableData.value.length == 0) return
|
if (tableData.value.length == 0) return
|
||||||
@ -622,7 +636,6 @@ const zhHandel = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const combinedHandel = (row: any) => {
|
const combinedHandel = (row: any) => {
|
||||||
console.log('data==>', row);
|
|
||||||
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return ElMessage.warning('已审核结果不可添加模板项目');
|
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return ElMessage.warning('已审核结果不可添加模板项目');
|
||||||
const data = {
|
const data = {
|
||||||
...labPatKey.value,
|
...labPatKey.value,
|
||||||
@ -643,6 +656,180 @@ const combinedHandel = (row: any) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ymTableRef = ref()
|
||||||
|
const ymTableData = ref<ymTableDataItem[]>([]);
|
||||||
|
|
||||||
|
const ymColumns = ref([
|
||||||
|
{ label: "抗生素", prop: "zhywdh", visible: true, width: 120, headerSlot: 'ywdhHead' },
|
||||||
|
{ label: "Mic", prop: "mic", align: 'center', visible: true, width: 60, slot: 'mic' },
|
||||||
|
{ label: "KB", prop: "rad", align: 'center', visible: true, width: 50, slot: 'rad' },
|
||||||
|
{ label: "结果", prop: "csjg", align: 'center', visible: true, width: 60, slot: 'csjg' },
|
||||||
|
{ label: "结果标志", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', width: 200, showOverflowTooltip: false },
|
||||||
|
{ label: "折点", prop: "ckz", align: 'center', visible: true, },
|
||||||
|
{ label: "分组", prop: "bz", align: 'center', visible: true, slot: 'bz' },
|
||||||
|
{ label: "专家值", prop: "txtresult", align: 'center', visible: true, slot: 'txtresult' },
|
||||||
|
{ label: "引用说明", prop: "cp_bz", align: 'center', visible: true, slot: 'cp_bz' },
|
||||||
|
])
|
||||||
|
const ymCellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||||
|
row: any;
|
||||||
|
column: any;
|
||||||
|
rowIndex: number;
|
||||||
|
columnIndex: number;
|
||||||
|
}) => {
|
||||||
|
if (column.label == "结果" && row.jgbz == "R") {
|
||||||
|
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||||
|
}
|
||||||
|
if (column.label == "结果" && row.jgbz == "I") {
|
||||||
|
return { background: '#ffff80 !important', color: '#606266' };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const ymTableConfig = ref({
|
||||||
|
height: '48vh',
|
||||||
|
border: true,
|
||||||
|
highlightCurrentRow: true,
|
||||||
|
cellStyle: ymCellStyleHd,
|
||||||
|
});
|
||||||
|
|
||||||
|
const ymHandleColumnDragEnd = (data: any) => {
|
||||||
|
ymColumns.value = data.columns;
|
||||||
|
}
|
||||||
|
const ymselectedRows = ref<ymTableDataItem[]>([]);
|
||||||
|
|
||||||
|
const ymRowHandle = (row: any) => {
|
||||||
|
ymselectedRows.value = [row];
|
||||||
|
}
|
||||||
|
|
||||||
|
const medDictRef = ref()
|
||||||
|
const kssMbRef = ref()
|
||||||
|
|
||||||
|
const kssType = ref('')
|
||||||
|
// 更换抗生素组
|
||||||
|
const changeKss = () => {
|
||||||
|
kssMbRef.value.openDictSelector();
|
||||||
|
kssType.value = '1'
|
||||||
|
}
|
||||||
|
// 添加抗生素组
|
||||||
|
const addKss = () => {
|
||||||
|
kssMbRef.value.openDictSelector();
|
||||||
|
kssType.value = '2'
|
||||||
|
}
|
||||||
|
|
||||||
|
const kssSelect = (row: any) => {
|
||||||
|
getmedgroupMbList({ mbmc: row.value }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
if (kssType.value == '1') {
|
||||||
|
ymTableData.value = []
|
||||||
|
res.data?.forEach((item: any, index: number) => {
|
||||||
|
ymTableData.value.push({ ...item, zhywdh: item.ywdh + ' ' + item.ywmc, xh: index + 1 })
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const existingNames = new Set(ymTableData.value.map((item: any) => item.ywdh))
|
||||||
|
res.data?.forEach((item: any) => {
|
||||||
|
if (!existingNames.has(item.ywdh)) {
|
||||||
|
ymTableData.value.push({ ...item, zhywdh: item.ywdh + ' ' + item.ywmc, xh: ymTableData.value.length + 1 })
|
||||||
|
existingNames.add(item.ywdh)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
ymTableData.value.forEach((item: any) => {
|
||||||
|
item.ybh = labPatKey.value.ybh
|
||||||
|
item.yq = labPatKey.value.yq
|
||||||
|
item.jyrq = labPat.value.jyrq
|
||||||
|
item.xmdh = selectedRows.value[0].xmdh
|
||||||
|
})
|
||||||
|
savemedresultall(ymTableData.value).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
rowHandle(selectedRows.value[0])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const addMed = () => {
|
||||||
|
medDictRef.value.openDictSelector();
|
||||||
|
}
|
||||||
|
const delMed = () => {
|
||||||
|
if (ymselectedRows.value.length === 0) return ElMessage.warning("请先选择要删除的记录");
|
||||||
|
const arr = ymselectedRows.value.filter((row: any) => !row.id);
|
||||||
|
if (arr.length) {
|
||||||
|
deletemedresult(ymselectedRows.value[0]).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('删除成功');
|
||||||
|
rowHandle(selectedRows.value[0])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const index = ymTableData.value.findIndex((item: any) => item.ywdh === ymselectedRows.value[0].ywdh);
|
||||||
|
if (index > -1) ymTableData.value.splice(index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ymselectedRows.value = [];
|
||||||
|
}
|
||||||
|
const medSelect = (row: any) => {
|
||||||
|
console.log('row==>', row);
|
||||||
|
const ymFlag = tableData.value.some((item: any) => item.ywdh === row.value);
|
||||||
|
if (ymFlag) return ElMessage.warning(`抗生素【${row.label}】已存在`);
|
||||||
|
// 1. 构造新增行数据
|
||||||
|
const newRow = {
|
||||||
|
id: `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`,
|
||||||
|
zhywdh: row.value + ' ' + row.label,
|
||||||
|
ywdh: row.value,
|
||||||
|
ywmc: row.label,
|
||||||
|
mic: '',
|
||||||
|
rad: '',
|
||||||
|
csjg: '',
|
||||||
|
jgbz: '',
|
||||||
|
ckz: '',
|
||||||
|
bz: '',
|
||||||
|
txtresult: '',
|
||||||
|
cp_bz: '',
|
||||||
|
xh: ymTableData.value.length + 1,
|
||||||
|
...labPatKey.value,
|
||||||
|
jyrq: labPat.value.jyrq,
|
||||||
|
xmdh: selectedRows.value[0].xmdh
|
||||||
|
};
|
||||||
|
ymTableData.value.push(newRow);
|
||||||
|
savemedresult(newRow)
|
||||||
|
nextTick(() => {
|
||||||
|
ymselectedRows.value = [newRow];
|
||||||
|
ymTableRef.value.setCurrentRow(newRow);
|
||||||
|
ymTableRef.value.setScrollTo(ymTableData.value.length - 1)
|
||||||
|
// 聚焦到新行的输入框
|
||||||
|
const inputs = Array.from(document.querySelectorAll('.ymFoucs .el-input__inner'))
|
||||||
|
.filter(el => el instanceof HTMLElement) as HTMLElement[];
|
||||||
|
if (inputs.length > 0) {
|
||||||
|
inputs[inputs.length - 1].focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 药敏结果保存
|
||||||
|
const ymHandleEnter = async (row: any) => {
|
||||||
|
if (!row) return
|
||||||
|
savemedresult({ ...row, ybh: labPat.value.ybh, jyrq: labPat.value.jyrq, yq: labPat.value.yq, xmdh: selectedRows.value[0].xmdh }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('保存成功');
|
||||||
|
rowHandle(selectedRows.value[0])
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const jgbzHandle = (val: string, row: any) => {
|
||||||
|
const obj: any = {
|
||||||
|
R: '耐药',
|
||||||
|
I: '中介',
|
||||||
|
S: '敏感',
|
||||||
|
N: '非敏感',
|
||||||
|
D: '剂量依赖性敏感'
|
||||||
|
}
|
||||||
|
row.csjg = obj[val]
|
||||||
|
|
||||||
|
ymHandleEnter(row)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取模板项目
|
// 获取模板项目
|
||||||
emitter.on('dbMbHandle', (info: any) => {
|
emitter.on('dbMbHandle', (info: any) => {
|
||||||
@ -678,14 +865,7 @@ const formatJgbz = (v: string) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btns_box {
|
|
||||||
padding: .3125rem .625rem !important;
|
|
||||||
font-size: .875rem;
|
|
||||||
height: 1.25rem !important;
|
|
||||||
margin: 5px 0;
|
|
||||||
margin-left: .625rem !important;
|
|
||||||
border-radius: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabs_btns {
|
.tabs_btns {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user