@@ -73,11 +73,11 @@ import { changepatcolumn, updateLabPat, checkYsUser } from "@/api/liswork/work/L
import SelectTable from '@/components/SelectTable/index.vue';
import YhVerification from './yhVerification.vue';
-import { PropType } from 'vue';
import emitter from '@/utils/mitt';
import { classCom } from '@/utils/classCom';
-import { use } from 'vxe-pc-ui';
const aotuSize = classCom.useAutoSize();
+
+
interface LabSysItem {
kj: string;
dict: string;
@@ -118,7 +118,7 @@ watch(() => props.labPat, (newVal) => {
sqhValue.value = '';
})
-const emit = defineEmits(['update:labPat', 'changeStatus']);
+const emit = defineEmits(['update:labPat', 'changeStatus', 'batchShow']);
const lastValue = ref('');
const brlyFields = ref([
@@ -155,6 +155,10 @@ const handleInputFocus = () => {
// 表单引用
const formRef = ref();
+// 批量扫码
+const batchHandle = () => {
+ emit('batchShow')
+};
// 处理确定按钮点击
const handleConfirm = async () => {
form.value.mm = ''
@@ -219,6 +223,7 @@ const handleFieldChange = async () => {
}
}
};
+
// 保存病人信息
const saveLabPat = async (changedField: any) => {
if (props.labPat.id) {
diff --git a/src/views/liswork/work/components/labresult.vue b/src/views/liswork/work/components/labresult.vue
index c46176c..6e332cf 100644
--- a/src/views/liswork/work/components/labresult.vue
+++ b/src/views/liswork/work/components/labresult.vue
@@ -1059,6 +1059,7 @@ const handleCsjgEnter = async (row) => {
}
})
} else {
+ if (!row) return
if (row && row.id) {
emitter.emit('saveResult');
newresult(row).then(response => {
diff --git a/src/views/liswork/work/history/index.vue b/src/views/liswork/work/history/index.vue
index 7f0abf1..4cd44fd 100644
--- a/src/views/liswork/work/history/index.vue
+++ b/src/views/liswork/work/history/index.vue
@@ -42,18 +42,22 @@ 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: {
type: Object,
default: {}
- }
+ },
+ dictData: {
+ type: Object,
+ default: () => ({})
+ },
})
// 解构 props
const { queryParams } = toRefs(props);
-
+const instrOptions = ref
>([])
const tableData: any = ref([]);
const tableRef = ref();
const columns = ref([
@@ -119,13 +123,23 @@ const formatHeader = (column: any, prefix: string) => {
const yljgKey = `${prefix}yljg`;
const dateKey = `${prefix}Date`;
const ybhKey = `${prefix}ybh`;
- const yqdlKey = `${prefix}yqdl`;
+ const yqKey = `${prefix}yq`;
+ const brxbKey = `${prefix}brxb`;
+ const nlKey = `${prefix}nl`;
const item = tableData.value[index];
- return `${item[yljgKey]}
${item[dateKey]}
${item[yqdlKey]}(${item[ybhKey]})`;
+ return `${item[yljgKey]}
${item[dateKey]}
${formatYq(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) => {
const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
@@ -139,13 +153,15 @@ const getList = () => {
map.set(item.xmdh, {
csjg: item.csjg,
jyrq: dayjs(item.jyrq).format('YY/MM/DD'),
- yqdl: item.yqdl,
+ yq: item.yq,
ybh: item.ybh,
yljg: item.yljg,
result_flag: item.result_flag,
xmmc: item.xmmc,
cksx: item.cksx,
- ckxx: item.ckxx
+ ckxx: item.ckxx,
+ brxb: item.brxb,
+ nl: item.nl,
});
});
dataMaps.set(period, map);
@@ -168,9 +184,11 @@ const getList = () => {
if (item) {
row[`${period}Csjg`] = item.csjg;
row[`${period}Date`] = item.jyrq;
- row[`${period}yqdl`] = item.yqdl;
+ row[`${period}yq`] = item.yq;
row[`${period}ybh`] = item.ybh;
row[`${period}yljg`] = item.yljg;
+ row[`${period}brxb`] = item.brxb;
+ row[`${period}nl`] = item.nl;
row[`${period}ResultFlag`] = item.result_flag;
if (!row.xmmc) {
@@ -196,7 +214,6 @@ watch(() => props.queryParams, (newValue) => {
}, { immediate: true })
const handleRowClick = (row: any) => {
- console.log('row==>', row);
nextTick(() => {
getEcharts(row)
})
@@ -204,10 +221,10 @@ const handleRowClick = (row: any) => {
const myEcharts = ref()
const getEcharts = (data: any) => {
- const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
+ const periods = ['nine', 'eight', 'seven', 'six', 'five', 'four', 'three', 'two', 'one', 'first']
- const xData = periods.map(period => { return data[`${period}Date`] || ''; })
- const yData = periods.map(period => { return data[`${period}Csjg`] || ''; })
+ const xData = periods.map(period => { return data[`${period}Date`] }).filter(Boolean) //过滤掉空值
+ const yData = periods.map(period => { return data[`${period}Csjg`] }).filter(Boolean)
const Intance = echarts.init(myEcharts.value);
@@ -251,7 +268,10 @@ const getEcharts = (data: any) => {
data: xData,
axisLabel: {
interval: 0,
- rotate: 30 // 日期标签旋转,避免重叠
+ rotate: 30, // 日期标签旋转,避免重叠
+ },
+ axisTick: {
+ alignWithLabel: true // 让刻度线与标签对齐
}
},
yAxis: {
@@ -320,6 +340,16 @@ const getEcharts = (data: any) => {
Intance.setOption(option);
}
+onMounted(() => {
+ getGroupInstrdList().then((res: any) => {
+ if (res.code == 0) {
+ instrOptions.value = res.data.map((item: any) => ({
+ yq: item.yq.trim(),
+ yqmc: item.yqmc
+ }))
+ }
+ })
+})