@@ -116,7 +116,8 @@ import SelectTable from '@/components/SelectTable/index.vue';
import { listUser } from '@/api/system/user.js'
import { PropType } from 'vue';
import emitter from '@/utils/mitt';
-
+import { classCom } from '@/utils/classCom';
+const aotuSize = classCom.useAutoSize();
interface LabSysItem {
kj: string;
dict: string;
@@ -501,11 +502,6 @@ onMounted(() => {
-.flex-between {
- height: 32px;
-}
-
-
.sh_box {
position: absolute;
diff --git a/src/views/liswork/work/components/labresult.vue b/src/views/liswork/work/components/labresult.vue
index 5b98b38..9a788b4 100644
--- a/src/views/liswork/work/components/labresult.vue
+++ b/src/views/liswork/work/components/labresult.vue
@@ -2,17 +2,17 @@
- 初审
- 审核
- 取消审核
- 初审
+ 审核
+ 取消审核
+ 新增
- 删除
- 打印
- 预览
+ 打印
+ 预览
@@ -173,7 +173,6 @@ import dayjs from 'dayjs';
import { listUser } from '@/api/system/user.js'
import emitter from "@/utils/mitt";
import { useCommonStore } from "@/store/modules/commonStore";
-import { set } from "@vueuse/core";
// 组件属性定义
const props = defineProps({
@@ -190,6 +189,7 @@ const { tableData, tableKey, } = toRefs(props);
const selectedRows = ref([]);
const lastjyrq = ref('');
const mbStore = useCommonStore();
+const aotuSize = classCom.useAutoSize();
watch(() => props.tableData, (newVal) => {
selectedRows.value = [];
@@ -380,63 +380,31 @@ const selectedItemLabel = ref(""); // 选择的项目名称xmmc
const labResuts = ref([])
const tableRef = ref();
const fetchLabItemDict = async (dictType) => {
- // 日志1:确认方法被调用
try {
// 1. 验证必要参数(如当前仪器yq)
if (!tableKey.value.yq) {
- console.error("[fetchLabItemDict] 缺少必要参数:yq(仪器)");
ElMessage.error("请先选择仪器");
return [];
}
- // 日志2:打印请求参数
const requestParams = {
pageNum: 1,
pageSize: 1000, // 加载足够多的项目
yq: tableKey.value.yq, // 当前选中的仪器
};
-
- // 2. 调用API(确保queryXmInfo是正确的API方法)
const response = await queryXmInfo(requestParams);
- // 日志3:打印原始响应
-
- // 3. 验证响应格式
- if (!response) {
- throw new Error("API返回为空");
- }
- if (response.code !== "0") { // 假设0为成功状态码
- throw new Error(`API返回错误:${response.msg || "未知错误"}`);
- }
- if (!Array.isArray(response.data)) {
- throw new Error(`API返回data不是数组,实际为:${typeof response.data}`);
- }
-
- // 4. 格式化数据(适配DictInput的{value, label}结构)
const formattedData = response.data.map((item, index) => {
- // 验证项目数据完整性
- if (!item.xmdh) {
- console.warn(`[fetchLabItemDict] 第${index}条数据缺少xmdh(项目编码):`, item);
- }
- if (!item.xmmc) {
- console.warn(`[fetchLabItemDict] 第${index}条数据缺少xmmc(项目名称):`, item);
- }
-
return {
value: item.xmdh || `未知编码_${index}`, // 确保value存在
label: item.xmmc || `未知名称_${index}`, // 确保label存在
- dw: item.dw || "", // 单位(可选)
- refs: item.refs || "", // 参考值(可选)
+ dw: item.dw || "",
+ refs: item.refs || "",
};
});
-
- // 日志4:打印格式化后的数据量
return formattedData;
-
} catch (error) {
- // 日志5:捕获并显示错误
console.error(`[fetchLabItemDict] 加载失败:`, error.message);
- ElMessage.error(`项目字典加载失败:${error.message}`);
return []; // 失败时返回空数组,避免弹窗报错
}
};
@@ -671,6 +639,7 @@ const handleCsjgEnter = async (row) => {
*/
const handleRowClick = (row) => {
selectedRows.value = [row];
+ emitter.emitWithCache('refreshClinical', row);
};
/**
@@ -875,7 +844,8 @@ const formatYs = (v) => {
}
.flex-between {
- height: 32px;
+ // height: 32px;
+ margin-bottom: 0.5rem;
}
.custom-table-container {
diff --git a/src/views/liswork/work/index.vue b/src/views/liswork/work/index.vue
index bc9a503..3675316 100644
--- a/src/views/liswork/work/index.vue
+++ b/src/views/liswork/work/index.vue
@@ -3,25 +3,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -143,6 +158,8 @@ import Sample from './sample/index.vue'
import ResultGraph from './resultGraph/index.vue'
import { getNextNumber, getPreviousNumber } from "@/utils/getNextNumber";
import { useCommonStore } from '@/store/modules/commonStore';
+import { classCom } from '@/utils/classCom';
+const aotuSize = classCom.useAutoSize();
const previewShow = ref(false);
@@ -527,6 +544,7 @@ const getSysList = () => {
mbStore.setLxsrList([]);
}
getSysList()
+
onMounted(async () => {
// 加载病人来源字典
const dictRefs = await comDict('PT', 'AU', 'SX', 'DP', 'BT', 'SRD', 'HOS', 'ST');
@@ -542,14 +560,12 @@ onMounted(async () => {
HOS: toRaw(dictRefs.HOS.value) || [],
ST: toRaw(dictRefs.ST.value) || [],
};
-
});