diff --git a/src/main.js b/src/main.js
index b7f312a..9bd3759 100644
--- a/src/main.js
+++ b/src/main.js
@@ -70,7 +70,7 @@ import ImagePreview from "@/components/ImagePreview"
import TreeSelect from '@/components/TreeSelect'
// 字典标签组件
import DictTag from '@/components/DictTag'
-import Print from 'vue3-print-nb';
+import print from 'vue3-print-nb';
const app = createApp(App)
// 全局方法挂载
@@ -96,7 +96,7 @@ app.component('Editor', Editor)
//VUE3标准方法注入全局方法
app.provide('comDict', comDict);
-app.use(Print); // 注册打印插件
+app.use(print); // 注册打印插件
app.provide('$vuePrint', app.config.globalProperties.$vuePrint);
app.use(router)
app.use(store)
diff --git a/src/views/checkCode/report/index.vue b/src/views/checkCode/report/index.vue
index 1324ab9..9ed6a66 100644
--- a/src/views/checkCode/report/index.vue
+++ b/src/views/checkCode/report/index.vue
@@ -123,6 +123,10 @@
+
+
@@ -177,7 +181,6 @@ import { usePrintStore } from '@/store/modules/printStore'
//@ts-ignore
import useUserStore from '@/store/modules/user'
import { useRoute } from 'vue-router'
-
const route = useRoute()
const userStore = useUserStore()
@@ -221,9 +224,15 @@ const queryParams = reactive({
dybz: '',
userid: ''
});
+// 获取当前日期(当天)
+const today = dayjs();
+
+// 计算前6天的日期(当天 + 前6天 = 7天)
+const startOfWeek = today.subtract(6, 'day');
+
+const startDate = route.query.startdate ? String(route.query.startdate) : startOfWeek.format('YYYY-MM-DD');
+const endDate = route.query.endate ? String(route.query.endate) : today.format('YYYY-MM-DD');
-const startDate = typeof route.query.startdate === 'string' ? route.query.startdate : '';
-const endDate = typeof route.query.endate === 'string' ? route.query.endate : '';
queryParams.times = [startDate, endDate];
queryParams.ksdh = (route.query.deptcode as string) || '';
queryParams.userid = (route.query.userid as string) || '';
@@ -297,20 +306,21 @@ const columns = ref([
{ prop: 'dybz', label: '印', align: 'center', visible: true, slot: 'dybz', width: 40 },
{ prop: 'jzbz', label: '急', align: 'center', visible: true, slot: 'jzbz', width: 40 },
{ prop: 'alarmflag', label: '危', align: 'center', visible: true, slot: 'alarmflag', width: 40 },
- { prop: 'jyrqname', label: '检验日期', align: 'center', visible: true, sortable: true, width: 100 },
- { prop: 'brdh', label: '病人代号', align: 'center', visible: true, width: 100 },
+ { prop: 'brdh', label: '病人代号', align: 'center', visible: true, sortable: true, width: 100 },
{ prop: 'brxm', label: '病人姓名', align: 'center', visible: true, },
{ prop: 'brxbname', label: '性别', align: 'center', visible: true, width: 40 },
{ prop: 'ch', label: '床号', align: 'center', visible: true, width: 50 },
- { prop: 'yqdl', label: '仪器', align: 'center', visible: true, width: 100 },
- { prop: 'ybh', label: '样本号', align: 'center', visible: true, width: 60 },
+ { prop: 'jymd', label: '检验目的', align: 'center', visible: true, width: 200 },
{ prop: 'yblxname', label: '样本类型', align: 'center', visible: true, },
- { prop: 'jymd', label: '检验目的', align: 'center', visible: true, width: 118 },
- { prop: 'sqsj', label: '申请时间', align: 'center', visible: true, width: 150 },
+ { prop: 'sqsj', label: '送检时间', align: 'center', visible: true, width: 150 },
+ { prop: 'confirmtime', label: '报告时间', align: 'center', visible: true, sortable: true, width: 150 },
{ prop: 'sjysname', label: '送检医生', align: 'center', visible: true, width: 80 },
{ prop: 'brlyname', label: '病人类型', align: 'center', visible: true, width: 80 },
- { prop: 'yqmc', label: '仪器名称', align: 'center', visible: true, width: 150 },
{ prop: 'yljg', label: '医疗机构', align: 'center', visible: true, width: 150 },
+ { prop: 'jyrqname', label: '检验日期', align: 'center', visible: true, width: 100 },
+ { prop: 'ybh', label: '样本号', align: 'center', visible: true, width: 60 },
+ { prop: 'yqmc', label: '仪器名称', align: 'center', visible: true, width: 150 },
+ { prop: 'yqdl', label: '仪器', align: 'center', visible: true, width: 100 },
])
const selectionChange = (selection: any) => {
@@ -321,6 +331,20 @@ const selectionChange = (selection: any) => {
const rightTableRef = ref()
const rowHandle = (row: any) => {
+ console.log('row==>', row);
+ if (row.yqdl == '细菌仪') {
+ rightColumns.value[1].visible = false
+ rightColumns.value[2].visible = true
+ rightColumns.value[4].visible = false
+ rightColumns.value[5].visible = false
+ rightColumns.value[6].visible = true
+ } else {
+ rightColumns.value[1].visible = true
+ rightColumns.value[2].visible = false
+ rightColumns.value[4].visible = true
+ rightColumns.value[5].visible = true
+ rightColumns.value[6].visible = false
+ }
timelineItems.value =
[
{ title: '检验申请', time: row.sqsj },
@@ -467,10 +491,12 @@ const rightTableData = ref([])
// 配置项
const rightColumns = ref([
{ prop: 'xmdh', label: '项目代号', align: 'center', visible: true, },
- { prop: 'xmmc', label: '项目名称', align: 'center', visible: true, width: 150 },
+ { prop: 'xmmc', label: '项目名称', align: 'center', visible: true, },
+ { prop: 'xmmc', label: '培养结果', align: 'center', visible: true, width: 150 },
{ prop: 'csjg', label: '检验结果', align: 'center', visible: true, },
{ prop: 'refs', label: '参考值', align: 'center', visible: true, },
{ prop: 'dw', label: '单位', align: 'center', visible: true, },
+ { prop: 'od', label: '菌落计数', align: 'center', visible: true, },
{ prop: 'jgbz', label: '结果标志', align: 'center', visible: true, slot: 'jgbz' },
])
@@ -502,7 +528,7 @@ const rightTableConfig = ref(
{
// stripe: true, // 斑马纹
border: true, // 边框
- height: '40vh', // 高度
+ height: '25vh', // 高度
highlightCurrentRow: true, // 高亮当前行
cellStyle: rightCellStyleHd
}
@@ -512,11 +538,12 @@ const formatJgbz = (v: string) => {
return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : ''
}
-
+const expertComment = ref('')
const xmRow = ref({})
// 查询抗生素
const xmrowHandle = (row: any) => {
xmRow.value = row
+ expertComment.value = row.textresult
const data = {
jyrq: Info.value.jyrq,
yq: Info.value.yq,
@@ -528,7 +555,7 @@ const xmrowHandle = (row: any) => {
bottomTableData.value = res.rows
if (res.rows.length > 0) {
nextTick(() => {
- rightTableConfig.value.height = `calc(50vh - ${heightForm.value}px)`
+ rightTableConfig.value.height = `calc(35vh - ${heightForm.value}px)`
rightTableRef.value?.doLayout && rightTableRef.value.doLayout();
});
} else {
@@ -753,10 +780,11 @@ const getEcharts = (data: any) => {
const bottomTableData = ref([])
// 配置项
const bottomColumns = ref([
- { prop: 'ywdh', label: '抗生素编号', align: 'center', visible: true, },
- { prop: 'ywmc', label: '抗生素名称', align: 'center', visible: true, },
- { prop: 'csjg', label: '测试结果', align: 'center', visible: true },
- // { prop: 'jgbz', label: '结果标志', align: 'center', visible: true },
+ { prop: 'ywdh', label: '抗生素代码', align: 'center', visible: true, },
+ { prop: 'ywmc', label: '抗生素名称', align: 'center', width: 200, visible: true, },
+ { prop: 'mic', label: 'MIC', align: 'center', visible: true },
+ { prop: 'rad', label: 'KB', align: 'center', visible: true },
+ { prop: 'csjg', label: '药敏结果', align: 'center', visible: true },
])
const botCellStyleHd = ({ row, column, rowIndex, columnIndex }: {
row: any;
@@ -764,10 +792,10 @@ const botCellStyleHd = ({ row, column, rowIndex, columnIndex }: {
rowIndex: number;
columnIndex: number;
}) => {
- if (column.label == '测试结果' && row.jgbz == 'R') {
+ if (column.label == '药敏结果' && row.jgbz == 'R') {
return { background: '#ffc0c0 !important', color: '#606266' };
}
- if (column.label == '测试结果' && row.jgbz.trim() == "") {
+ if (column.label == '药敏结果' && row.jgbz.trim() == "") {
return { background: '#ffff80 !important', color: '#606266' };
}
}
@@ -776,7 +804,7 @@ const bottomTableConfig = ref(
{
// stripe: true, // 斑马纹
border: true, // 边框
- height: '32vh', // 高度
+ height: '40vh', // 高度
highlightCurrentRow: true, // 高亮当前行
cellStyle: botCellStyleHd
}
@@ -951,4 +979,20 @@ function adjustTableHeight() {
:deep(.el-form-item--default) {
margin-bottom: 1.125rem;
}
+
+.expert-comment {
+ /* 限制最大显示行数为2行 */
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ /* 超出部分隐藏 */
+ overflow: hidden;
+ /* 可选:设置行高和最大宽度,优化显示效果 */
+ line-height: 1.5;
+ /* 行高,根据字体大小调整 */
+ max-width: 100%;
+ pointer-events: auto;
+ /* 允许鼠标交互 */
+ cursor: default;
+}
\ No newline at end of file
diff --git a/src/views/liswork/work/components/batchCode.vue b/src/views/liswork/work/components/batchCode.vue
index 52e46db..8dc309a 100644
--- a/src/views/liswork/work/components/batchCode.vue
+++ b/src/views/liswork/work/components/batchCode.vue
@@ -1,6 +1,6 @@
-
+
@@ -55,8 +55,7 @@
}} 个
-
-
+
@@ -64,7 +63,6 @@
-
@@ -139,6 +137,9 @@ const handleEnter = () => {
}
prevSpecimen.value = res.data
tableData.value.push(res.data)
+ nextTick(() => {
+ tableRef.value.setScrollTop(tableData.value.length * 30);
+ })
currentScanCount.value++;
}
})
@@ -147,25 +148,34 @@ const handleEnter = () => {
// 上一个标本
const goPrev = () => {
emit('goPrev');
+ sqhRef.value?.focus()
};
// 下一个标本
const goNext = () => {
emit('goNext');
+ sqhRef.value?.focus()
};
// 最后一个标本
const goLast = () => {
emit('goLast');
+ sqhRef.value?.focus()
};
-
+const tableRef = ref()
const printHandle = () => {
if (!tableData.value.length) return ElMessage.warning('样本打印数据为空')
+
};
const open = () => {
ybh.value = labPat.value.ybh
show.value = true;
+ nextTick(() => {
+ setTimeout(() => {
+ sqhRef.value?.focus()
+ }, 100);
+ })
};
const handleClose = () => {
@@ -182,6 +192,12 @@ const formatDict = (v: string, dictType: string) => {
defineExpose({
open,
});
+
+onMounted(() => {
+ for (let index = 0; index < 100; index++) {
+ tableData.value.push({ ybh: index, sqh: '321421321', brxm: '李是大', brdh: '4332132', jymd: '高蛋白大 大的 ' },);
+ }
+});
\ No newline at end of file
diff --git a/src/views/liswork/work/history/index.vue b/src/views/liswork/work/history/index.vue
index 4cd44fd..92e61f7 100644
--- a/src/views/liswork/work/history/index.vue
+++ b/src/views/liswork/work/history/index.vue
@@ -32,7 +32,7 @@
-
+
@@ -42,7 +42,6 @@ import * as echarts from 'echarts';
import { historyInfo } from '@/api/liswork/work/LisWork'
import dayjs from 'dayjs';
import CustomTable from '@/components/elTable/index.vue'
-import { getGroupInstrdList } from '@/api/liswork/work/LisWork'
const props = defineProps({
// 主键
queryParams: {
@@ -57,12 +56,11 @@ const props = defineProps({
// 解构 props
const { queryParams } = toRefs(props);
-const instrOptions = ref>([])
const tableData: any = ref([]);
const tableRef = ref();
const columns = ref([
{ label: '项目', prop: 'xmmc', width: 140, align: 'center', visible: true, },
- { label: '本次', prop: 'firstCsjg', width: 140, align: 'center', visible: true, },
+ { label: '本次', prop: 'firstCsjg', width: 100, align: 'center', visible: true, },
{ label: '上一次', prop: 'oneCsjg', width: 150, align: 'center', visible: true, headerSlot: 'oneCsjg' },
{ label: '上二次', prop: 'twoCsjg', width: 150, align: 'center', visible: true, headerSlot: 'twoCsjg' },
{ label: '上三次', prop: 'threeCsjg', width: 150, align: 'center', visible: true, headerSlot: 'threeCsjg' },
@@ -108,7 +106,7 @@ const cellStyle = ({ column, row }: any) => {
const config = {
border: true,
- maxHeight: '350px',
+ height: '44vh',
highlightCurrentRow: true,
cellStyle: cellStyle
}
@@ -123,22 +121,16 @@ const formatHeader = (column: any, prefix: string) => {
const yljgKey = `${prefix}yljg`;
const dateKey = `${prefix}Date`;
const ybhKey = `${prefix}ybh`;
- const yqKey = `${prefix}yq`;
+ const yqKey = `${prefix}yqmc`;
const brxbKey = `${prefix}brxb`;
const nlKey = `${prefix}nl`;
const item = tableData.value[index];
- return `${item[yljgKey]}
${item[dateKey]}
${formatYq(item[yqKey])}(${item[ybhKey]})
${item[brxbKey]},${item[nlKey]}`;
+ return `${item[yljgKey]}
${item[dateKey]}
${item[yqKey]}(${item[ybhKey]})
${item[brxbKey]},${item[nlKey]}`;
}
return column.label;
};
-const formatDict = (v: string, dictType: string) => {
- return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v;
-}
-const formatYq = (yq: string) => {
- return instrOptions.value?.find((item: any) => item.yq == yq.trim())?.yqmc || yq;
-}
const getList = () => {
historyInfo(queryParams.value).then((res: any) => {
@@ -153,7 +145,7 @@ const getList = () => {
map.set(item.xmdh, {
csjg: item.csjg,
jyrq: dayjs(item.jyrq).format('YY/MM/DD'),
- yq: item.yq,
+ yqmc: item.yqmc,
ybh: item.ybh,
yljg: item.yljg,
result_flag: item.result_flag,
@@ -184,7 +176,7 @@ const getList = () => {
if (item) {
row[`${period}Csjg`] = item.csjg;
row[`${period}Date`] = item.jyrq;
- row[`${period}yq`] = item.yq;
+ row[`${period}yqmc`] = item.yqmc;
row[`${period}ybh`] = item.ybh;
row[`${period}yljg`] = item.yljg;
row[`${period}brxb`] = item.brxb;
@@ -341,14 +333,6 @@ const getEcharts = (data: any) => {
}
onMounted(() => {
- getGroupInstrdList().then((res: any) => {
- if (res.code == 0) {
- instrOptions.value = res.data.map((item: any) => ({
- yq: item.yq.trim(),
- yqmc: item.yqmc
- }))
- }
- })
})
diff --git a/src/views/liswork/work/index.vue b/src/views/liswork/work/index.vue
index e7b1eb9..8558bb2 100644
--- a/src/views/liswork/work/index.vue
+++ b/src/views/liswork/work/index.vue
@@ -509,6 +509,8 @@ const handleNext = () => {
}
// 最后一个样本
const handleLast = () => {
+ queryParams.value.ybh = labPatList.value[labPatList.value.length - 1].ybh;
+ handleNext();
}
const batchRef = ref()
// 批量扫码
diff --git a/src/views/liswork/work/others/index.vue b/src/views/liswork/work/others/index.vue
index c3c9e3e..00aa891 100644
--- a/src/views/liswork/work/others/index.vue
+++ b/src/views/liswork/work/others/index.vue
@@ -81,7 +81,7 @@ const tableDetailRef = ref();
const columns = ref([
{ label: '项目', prop: 'xmmc', width: 140, align: 'center', visible: true, },
- { label: '本次', prop: 'firstCsjg', width: 100, align: 'center', visible: true, headerSlot: 'firstCsjg' },
+ { label: '本次', prop: 'firstCsjg', width: 150, align: 'center', visible: true, headerSlot: 'firstCsjg' },
{ label: '上一次', prop: 'oneCsjg', width: 150, align: 'center', visible: true, headerSlot: 'oneCsjg' },
{ label: '上二次', prop: 'twoCsjg', width: 150, align: 'center', visible: true, headerSlot: 'twoCsjg' },
{ label: '上三次', prop: 'threeCsjg', width: 150, align: 'center', visible: true, headerSlot: 'threeCsjg' },
@@ -143,11 +143,11 @@ const formatHeader = (column: any, prefix: string) => {
const dateKey = `${prefix}Date`;
const ybhKey = `${prefix}ybh`;
const yqdlKey = `${prefix}yqdl`;
- const yqKey = `${prefix}yq`;
+ const yqKey = `${prefix}yqmc`;
const brxbKey = `${prefix}brxb`;
const nlKey = `${prefix}nl`;
const item = tableDataDetail.value[index];
- return ` ${item[dateKey]}
(${item[ybhKey]})
${formatyq(item[yqKey])}
${item[brxbKey]},${item[nlKey]}`;
+ return ` ${item[dateKey]}
${item[yqKey]} (${item[ybhKey]})
${item[brxbKey]},${item[nlKey]}`;
}
return column.label;
};
@@ -194,7 +194,7 @@ const handleRowClick = (row: any) => {
csjg: item.csjg,
jyrq: dayjs(item.jyrq).format('YY/MM/DD'),
yqdl: item.yqdl,
- yq: item.yq,
+ yqmc: item.yqmc,
ybh: item.ybh,
yljg: item.yljg,
result_flag: item.result_flag,
@@ -226,7 +226,7 @@ const handleRowClick = (row: any) => {
row[`${period}Csjg`] = item.csjg;
row[`${period}Date`] = item.jyrq;
row[`${period}yqdl`] = item.yqdl;
- row[`${period}yq`] = item.yq;
+ row[`${period}yqmc`] = item.yqmc;
row[`${period}ybh`] = item.ybh;
row[`${period}yljg`] = item.yljg;
row[`${period}ResultFlag`] = item.result_flag;
@@ -246,14 +246,6 @@ const handleRowClick = (row: any) => {
})
}
-
-const formatDict = (v: string, dictType: string) => {
- return dictData.value[dictType]?.find((item: any) => item.value == v)?.label || v;
-}
-
-const formatyq = (v: string) => {
- return instrOptions.value.find((item: any) => item.yq == v.trim())?.yqmc || v;
-}