diff --git a/src/api/liswork/qualityControl/index.ts b/src/api/liswork/qualityControl/index.ts
index 9998c0f..3004621 100644
--- a/src/api/liswork/qualityControl/index.ts
+++ b/src/api/liswork/qualityControl/index.ts
@@ -107,6 +107,14 @@ export function queryValXmdh(data?: Object) {
params: data
})
}
+// 保存质控品参数
+export function saveBtQcSample(data?: Object) {
+ return request({
+ url: '/qc/saveQcSample',
+ method: 'post',
+ data
+ })
+}
// 查询质控品录入
export function getqcval(data?: Object) {
return request({
diff --git a/src/api/liswork/work/LisWork.ts b/src/api/liswork/work/LisWork.ts
index 4b35c5c..cad508c 100644
--- a/src/api/liswork/work/LisWork.ts
+++ b/src/api/liswork/work/LisWork.ts
@@ -1,5 +1,6 @@
// @ts-ignore
import request from '@/utils/request'
+import { ElLoading, ElMessage } from 'element-plus'
// 查询数据列表
export function queryLabPatList(query?: Object) {
@@ -154,10 +155,23 @@ export function printsample(query?: Object) {
// 打印报告单
export function printListwork(query?: Object) {
+ // 1. 开启 loading 效果
+ const loadingInstance = ElLoading.service({
+ lock: true,
+ text: '数据加载中...',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+
+ // 2. 发起请求并处理 loading 关闭
return request({
url: '/liswork/print',
method: 'get',
params: query
+ }).finally(() => {
+ loadingInstance.close()
+ }).catch((error: any) => {
+ ElMessage.error('数据加载失败,请稍后重试')
+ throw error
})
}
// 查询默认值
diff --git a/src/components/SelectTable/index.vue b/src/components/SelectTable/index.vue
index 76bc34b..11d65f9 100644
--- a/src/components/SelectTable/index.vue
+++ b/src/components/SelectTable/index.vue
@@ -146,7 +146,7 @@ const handleDataEcho = () => {
} else if (props.tableData) {
row = props.tableData?.find((item: any) => props.objKey && item[props.objKey] === props.data)
}
- selectShowValue.value = row ? (props.keyValue ? `${row[props.value]} ${row[props.label]}` : (props.label ? row[props.label] : (props.value ? row[props.value] : ''))) : '';
+ selectShowValue.value = row ? (props.keyValue ? `${row[props.value]} ${row[props.label]}` : (props.label ? row[props.label] : (props.value ? row[props.value] : ''))) : props.data;
}
};
diff --git a/src/views/checkCode/index.vue b/src/views/checkCode/index.vue
index a892f15..b684726 100644
--- a/src/views/checkCode/index.vue
+++ b/src/views/checkCode/index.vue
@@ -4,10 +4,14 @@
-
-
+
+
+
+
+
+
-
+
@@ -68,8 +72,6 @@
清单打印
-
- {{ row.jzbz == '1' ? '急' : '' }}
+ {{ row.jzbz == '1' ? '急' : '' }}
{{ row.jjzt == '1' ? '计价' : '无' }}
@@ -185,7 +187,9 @@ const userStore = useUserStore()
const printStore = usePrintStore();
//@ts-ignore
import { getDicts } from '@/api/system/dict/data'
-
+//@ts-ignore
+const { proxy } = getCurrentInstance();
+const { lis_reqcx_type } = proxy.useDict("lis_reqcx_type"); //参数类别
const compactForm = ref(null);
const lisReqs: any = ref([])
const nickName = ref('')
@@ -194,7 +198,8 @@ const title = ref('采样登记')
const sqhText = ref('')
const tableRef = ref()
interface QueryParams {
- times: string[]; // 明确类型为字符串元组
+ st: string;
+ et: string;
yljg: string;
zt: string;
queryType: string;
@@ -204,8 +209,8 @@ interface QueryParams {
}
// 提交表单数据
const queryParams = reactive({
- times: ['2025-07-18 00:00:00', '2025-07-18 23:59:59'],
- // times: [],
+ st: '2025-07-18 00:00:00',
+ et: '2025-07-18 23:59:59',
yljg: '1',
zt: '',
queryType: '',
@@ -306,9 +311,9 @@ const cellStyleHd = ({ row, column, rowIndex, columnIndex }: {
columnIndex: number;
}) => {
// console.log(row, column, rowIndex, columnIndex);
- if (column.title == "急" && row.jzbz == "1") {
- return { color: '#f00' };
- }
+ // if (column.title == "急" && row.jzbz == "1") {
+ // return { backgroundColor: `transparent !important`, color: '#f00' };
+ // }
if (column.title == "类别") {
const bgColor = classCom.decimalToHexColor(row.bkcolor);
@@ -329,6 +334,12 @@ const rowClassNameHd = ({ row, rowIndex }: {
row: any;
rowIndex: number;
}) => {
+ if (row.zt.trim()) {
+ const bgColor = lisReqs.value.find((item: any) => item.value == row.zt.trim())?.elTagClass || '#FFF';
+ return {
+ backgroundColor: `${bgColor} !important`,
+ };
+ }
return 'custom-row-class'; // 返回自定义类名
};
@@ -590,14 +601,13 @@ const timeDate = () => {
// 计算前6天的日期(当天 + 前6天 = 7天)
const startOfWeek = today.subtract(6, 'day');
- const startDate = route.query.startdate ? String(route.query.startdate) : startOfWeek.format('YYYY-MM-DD HH:mm:ss');
- const endDate = route.query.endate ? String(route.query.endate) : today.format('YYYY-MM-DD HH:mm:ss');
+ queryParams.st = route.query.startdate ? String(route.query.startdate) : startOfWeek.format('YYYY-MM-DD HH:mm:ss');
+ queryParams.et = route.query.endate ? String(route.query.endate) : today.format('YYYY-MM-DD HH:mm:ss');
- queryParams.times = [startDate, endDate];
}
onMounted(async () => {
- timeDate()
+ // timeDate()
queryParams.ksdh = (route.query.deptcode as string) ? (route.query.deptcode as string) : '';
queryParams.userid = (route.query.userid as string) ? (route.query.userid as string) : '';
@@ -641,12 +651,11 @@ const formatDict = (v: string, dictType: string) => {
const handletime = (val: Array) => {
- // console.log('时间', val);
// 校验日期格式
- const dayDiff = getDayDiff(val[0], val[1]);
+ const dayDiff = getDayDiff(queryParams.st, queryParams.et);
if (dayDiff === -1) return ElMessage.warning('请选择有效的日期范围');
//校验是否超过7天
- if (dayDiff > 7) return ElMessage.warning('查询时间范围不能超过7天,请重新选择');
+ // if (dayDiff > 7) return ElMessage.warning('查询时间范围不能超过7天,请重新选择');
}
// 生成条码
@@ -654,17 +663,11 @@ const printHandle = () => {
const data = {
dept: queryParams.ksdh,
userid: queryParams.userid,
- st: '',
- et: '',
+ st: queryParams.st,
+ et: queryParams.et,
yljg: queryParams.yljg
}
- if (queryParams.times && queryParams.times.length) {
- data.st = queryParams.times[0]
- data.et = queryParams.times[1]
- } else {
- data.st = ''
- data.et = ''
- }
+
addObj(data).then((res: any) => {
if (res.code == 0) {
getList()
@@ -689,8 +692,8 @@ const getList = () => {
const data = {
dept: queryParams.ksdh,
userid: queryParams.userid,
- st: queryParams.times[0],
- et: queryParams.times[1],
+ st: queryParams.st,
+ et: queryParams.et,
yljg: queryParams.yljg,
queryType: queryParams.queryType,
queryValue: queryParams.queryValue,
@@ -702,19 +705,13 @@ const getList = () => {
if (!data.userid) return ElMessage.warning('用户userid不能为空!')
// 校验日期格式
- const dayDiff = getDayDiff(queryParams.times[0], queryParams.times[1]);
+ const dayDiff = getDayDiff(queryParams.st, queryParams.et);
if (dayDiff === -1) return ElMessage.warning('请选择有效的日期范围');
//校验是否超过7天
- if (dayDiff > 7) return ElMessage.warning('查询时间范围不能超过7天,请重新选择');
- if (queryParams.times && queryParams.times.length > 0) {
- data.st = queryParams.times[0]
- data.et = queryParams.times[1]
- } else {
- data.st = ''
- data.et = ''
- }
+ // if (dayDiff > 7) return ElMessage.warning('查询时间范围不能超过7天,请重新选择');
+
loading.value = true;
fetchCodeList(data).then((response: any) => {
diff --git a/src/views/checkCode/report/index.vue b/src/views/checkCode/report/index.vue
index a6298d5..041c328 100644
--- a/src/views/checkCode/report/index.vue
+++ b/src/views/checkCode/report/index.vue
@@ -6,9 +6,13 @@
-
-
+
+
+
+
+
@@ -199,7 +203,8 @@ const options = ref([
{ label: '复制正常数据', value: 'Y' },
])
interface QueryParams {
- times: string[]; // 明确类型为字符串元组
+ st: string,
+ et: string,
alarmflag: boolean,
jzbz: boolean,
ksdh: string,
@@ -215,8 +220,10 @@ interface QueryParams {
// 提交表单数据
const queryParams = reactive({
- times: ['2025-08-19', '2025-08-19'],
+ // times: ['2025-08-19', '2025-08-19'],
// ksdh: '0203',
+ st: '',
+ et: '',
ksdh: '0210',
brlyname: '',
sqh: '25080109476',
@@ -246,10 +253,10 @@ const queryRules = ref({
const handletime = (val: Array) => {
// console.log('时间', val);
// 校验日期格式
- const dayDiff = getDayDiff(val[0], val[1]);
+ const dayDiff = getDayDiff(queryParams.st, queryParams.et);
if (dayDiff === -1) return ElMessage.warning('请选择有效的日期范围');
//校验是否超过7天
- if (dayDiff > 7) return ElMessage.warning('查询时间范围不能超过7天,请重新选择');
+ // if (dayDiff > 7) return ElMessage.warning('查询时间范围不能超过7天,请重新选择');
}
// 时间线数据
@@ -846,10 +853,10 @@ onMounted(async () => {
// 计算前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');
+ queryParams.st = route.query.startdate ? String(route.query.startdate) : startOfWeek.format('YYYY-MM-DD');
+ queryParams.et = route.query.endate ? String(route.query.endate) : today.format('YYYY-MM-DD');
+
- queryParams.times = [startDate, endDate];
queryParams.ksdh = (route.query.deptcode as string) ? (route.query.deptcode as string) : '';
queryParams.userid = (route.query.userid as string) ? (route.query.userid as string) : '';
queryParams.brdh = (route.query.brdh as string) ? (route.query.brdh as string) : '';
@@ -899,8 +906,8 @@ const getList = () => {
brdh: queryParams.brdh,
ch: queryParams.ch,
userid: queryParams.userid,
- st: '',
- et: '',
+ st: queryParams.st,
+ et: queryParams.et,
yljg: queryParams.yljg,
}
@@ -908,19 +915,12 @@ const getList = () => {
if (!data.yljg) return ElMessage.error('医疗机构yljg不能为空');
if (!data.userid) return ElMessage.error('用户userid不能为空');
// 校验日期格式
- const dayDiff = getDayDiff(queryParams.times[0], queryParams.times[1]);
+ const dayDiff = getDayDiff(queryParams.st, queryParams.et);
if (dayDiff === -1) return ElMessage.warning('请选择有效的日期范围');
//校验是否超过7天
- if (dayDiff > 7) return ElMessage.warning('查询时间范围不能超过7天,请重新选择');
+ // if (dayDiff > 7) return ElMessage.warning('查询时间范围不能超过7天,请重新选择');
- if (queryParams.times && queryParams.times.length) {
- data.st = queryParams.times[0]
- data.et = queryParams.times[1]
- } else {
- data.st = ''
- data.et = ''
- }
loading.value = true
reportList(data).then((res: any) => {
if (res.code == 0) {
diff --git a/src/views/lisquery/reportQuery/index.vue b/src/views/lisquery/reportQuery/index.vue
index b6996a7..a0d5433 100644
--- a/src/views/lisquery/reportQuery/index.vue
+++ b/src/views/lisquery/reportQuery/index.vue
@@ -84,6 +84,9 @@
+
+
+
{{ row.alarmflag == 1 ? '危' : '' }}
@@ -217,24 +220,38 @@ const tableData = ref([])
const columns = ref([
{ type: 'selection', field: '', title: '', resizable: true, align: 'center', width: 40 },
{ field: 'dybz', title: '印', align: 'center', resizable: true, slotName: 'dybz', width: 40 },
- { field: 'jzbz', title: '急', align: 'center', resizable: true, slotName: 'jzbz', width: 40 },
- { field: 'alarmflag', title: '危', align: 'center', resizable: true, slotName: 'alarmflag', width: 40 },
- { field: 'brdh', title: '病人代号', align: 'center', resizable: true, sortable: true, width: 100 },
- { field: 'brxm', title: '病人姓名', align: 'center', resizable: true, width: 60 },
+ { field: 'jgbz', title: '审', align: 'center', resizable: true, slotName: 'jgbz', width: 40 },
+ { field: 'yljg', title: '医疗机构', align: 'center', resizable: true, width: 130 },
+ { field: 'yqdl', title: '检验仪器', align: 'center', resizable: true, width: 80 },
+ { field: 'jyrqname', title: '标本日期', align: 'center', resizable: true, width: 80 },
+ { field: 'ybh', title: '标本号', align: 'center', resizable: true, width: 60 },
+ // { field: 'jzbz', title: '急', align: 'center', resizable: true, slotName: 'jzbz', width: 40 },
+ // { field: 'alarmflag', title: '危', align: 'center', resizable: true, slotName: 'alarmflag', width: 40 },
+ { field: 'brxm', title: '姓名', align: 'center', resizable: true, width: 50 },
+ { field: 'brdh', title: '住院号', align: 'center', resizable: true, sortable: true, width: 100 },
+ { field: 'sqh', title: '申请号', align: 'center', resizable: true, width: 100 },
+ { field: 'brlyname', title: '病人类型', align: 'center', resizable: true, width: 60 },
{ field: 'brxbname', title: '性别', align: 'center', resizable: true, width: 40 },
+ { field: 'nl', title: '年龄', align: 'center', resizable: true, width: 40 },
+ { field: 'ksname', title: '科室', align: 'center', resizable: true, width: 90 },
{ field: 'ch', title: '床号', align: 'center', resizable: true, width: 50 },
- { field: 'jymd', title: '检验目的', align: 'center', resizable: true, width: 200 },
- { field: 'yblxname', title: '样本类型', align: 'center', resizable: true, width: 60 },
- { field: 'sqsj', title: '送检时间', align: 'center', resizable: true, width: 150 },
- { field: 'confirmtime', title: '报告时间', align: 'center', resizable: true, sortable: true, width: 150 },
{ field: 'sjysname', title: '送检医生', align: 'center', resizable: true, width: 80 },
- { field: 'brlyname', title: '病人类型', align: 'center', resizable: true, width: 80 },
- { field: 'yljg', title: '医疗机构', align: 'center', resizable: true, width: 150 },
- { field: 'jyrqname', title: '检验日期', align: 'center', resizable: true, width: 100 },
- { field: 'ybh', title: '样本号', align: 'center', resizable: true, width: 60 },
- { field: 'yqmc', title: '仪器名称', align: 'center', resizable: true, width: 150 },
- { field: 'yqdl', title: '仪器', align: 'center', resizable: true, width: 100 },
-
+ { field: 'bbsjsj', title: '送检时间', align: 'center', resizable: true, width: 80 },
+ { field: 'cysj', title: '采样时间', align: 'center', resizable: true, width: 80 },
+ { field: 'jysh', title: '检验医生', align: 'center', resizable: true, width: 80 },
+ { field: 'dysj', title: '报告日期', align: 'center', resizable: true, width: 80 },
+ { field: 'yblxname', title: '标本', align: 'center', resizable: true, width: 50 },
+ { field: 'fb', title: '费别', align: 'center', resizable: true, width: 50 },
+ { field: 'hdys', title: '核对医生', align: 'center', resizable: true, width: 60 },
+ { field: 'zd', title: '临床诊断', align: 'center', resizable: true, width: 100 },
+ { field: 'bz', title: '备注', align: 'center', resizable: true, width: 100 },
+ { field: 'sjysname', title: '审核人', align: 'center', resizable: true, width: 60 },
+ { field: 'confirmtime', title: '审核时间', align: 'center', resizable: true, width: 80 },
+ { field: 'zh', title: '最后修改人', align: 'center', resizable: true, width: 100 },
+ { field: 'zhtime', title: '最后修改时间', align: 'center', resizable: true, width: 100 },
+ { field: 'sfz', title: '身份证', align: 'center', resizable: true, width: 100 },
+ { field: 'phone', title: '病人联系方式', align: 'center', resizable: true, width: 100 },
+ { field: 'jsphone', title: '家属联系方式', align: 'center', resizable: true, width: 100 },
])
const selectionChange = (selection: any) => {
@@ -319,16 +336,20 @@ const editHandle = () => {
router.push({
name: 'Micro', // 必须用 name 跳转,不能用 path
state: { // 核心:参数存在 state 中
- id: 123,
- name: '测试参数',
+ yq: Info.value.yq,
+ jyrq: Info.value.jyrq,
+ lisgroup: Info.value.lisgroup,
+ ybh: Info.value.ybh,
}
});
} else {
router.push({
name: 'Work',
state: {
- id: 123,
- name: '测试参数',
+ yq: Info.value.yq,
+ jyrq: Info.value.jyrq,
+ lisgroup: Info.value.lisgroup,
+ ybh: Info.value.ybh,
}
});
}
diff --git a/src/views/liswork/micro/index.vue b/src/views/liswork/micro/index.vue
index acaa3bb..8807e46 100644
--- a/src/views/liswork/micro/index.vue
+++ b/src/views/liswork/micro/index.vue
@@ -204,10 +204,6 @@ const queryParams = ref({
const activeName = ref('first');
-const total = ref(0)
-const ybs = ref(0)
-const ws = ref(0)
-const wjs = ref(0)
const activeTab = ref('LabPatList')
const tabList = ref([
{ label: '标本列表', value: 'LabPatList' },
@@ -405,12 +401,13 @@ const previewHandle = (url: string) => {
pdfUrl.value = `data:application/pdf;base64,${url}`
previewShow.value = true
}
-const handleinstrGroupChange = (val: any) => {
+const handleinstrGroupChange = () => {
queryParams.value.yq = ''
getYqConfig()
}
const mbStore = useCommonStore();
-const yqHandleChange = (val: any) => {
+const yqHandleChange = () => {
+ queryParams.value.ybh = ''
zbLabResuts.value = [];
labPat.value = {}
mbStore.setLxsrList([]);
@@ -719,9 +716,19 @@ const fetchlabPatList = () => {
loading.value = false;
originalLabPatList.value = res.data;
if (res.data.length > 0) {
- highlightRowIndex.value = 0;
- setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]) }, 10)
- selectJob(res.data[0])
+ if (queryParams.value.ybh) {
+ const index = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh)
+ if (index !== -1) {
+ highlightRowIndex.value = index;
+ const row = labPatList.value[index];
+ setTimeout(() => { labPatListRef.value.setCurrentRow(row); }, 10)
+ selectJob(row);
+ }
+ } else {
+ highlightRowIndex.value = 0;
+ setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]) }, 10)
+ selectJob(res.data[0])
+ }
} else {
labInfo.value = {}
labPat.value = {}
@@ -730,13 +737,6 @@ const fetchlabPatList = () => {
}
})
}
-// 计算样本数
-const getTotals = () => {
- ybs.value = labPatList.value.length
- ws.value = labPatList.value.filter((item: any) => item.jgbz != 2).length
- wjs.value = labPatList.value.filter((item: any) => item.alarmflag == 1).length
-}
-
loadinstrGroupOptions()
fetchlabPatList()
@@ -772,8 +772,37 @@ const getSysList = () => {
}
getSysList()
+// 定义参数类型(类型安全)
+interface RouteStateParams {
+ yq: string;
+ jyrq: string;
+ lisgroup: string;
+ ybh: string;
+}
+
+// 报告查询跳转后操作
+const getParams = () => {
+ const state = history.state as Partial;
+
+ // 只读取一次参数
+ if (state && state.yq) {
+ queryParams.value.yq = state.yq;
+ queryParams.value.jyrq = state.jyrq ?? queryParams.value.jyrq;
+ queryParams.value.instrGroup = state.lisgroup ?? queryParams.value.instrGroup;
+ queryParams.value.ybh = state.ybh ?? queryParams.value.ybh;
+
+ getSysList()
+ getYqConfig()
+ fetchlabPatList()
+ sendMessage()
+ // 读取后清空 state 刷新/回退不重复读取
+ history.replaceState({}, document.title);
+ }
+};
+
const userList = ref([]);
onMounted(async () => {
+ getParams()
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
listUser(data).then((res: any) => {
userList.value = res.rows;
@@ -797,6 +826,10 @@ onMounted(async () => {
initSocket()
});
+onActivated(() => {
+ getParams()
+})
+
const initSocket = () => {
initWebSocket({
fullUrl: `ws://47.97.125.165:8904/ws/instr/${mbStore.fingerprint}`,
diff --git a/src/views/liswork/micro/labresult/zbReport.vue b/src/views/liswork/micro/labresult/zbReport.vue
index cbcebcd..431f297 100644
--- a/src/views/liswork/micro/labresult/zbReport.vue
+++ b/src/views/liswork/micro/labresult/zbReport.vue
@@ -10,6 +10,7 @@
@click="handleBatchDelete">删除
组合项目
+ 打印
{
combinedRef.value.open()
};
+const printHandle = (type: number) => {
+ const data = {
+ jyrq: labPat.value.jyrq,
+ yq: labPat.value.yq,
+ ybh: labPat.value.ybh,
+ sqh: labPat.value.sqh
+ }
+ printListwork(data).then((res: any) => {
+ if (res.code == 0) {
+ classCom.printBase64PDF(res.data)
+ }
+ })
+};
+
const combinedHandel = (row: any) => {
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return ElMessage.warning('已审核结果不可添加模板项目');
const data = {
diff --git a/src/views/liswork/qualityControl/components/setBatch/index.vue b/src/views/liswork/qualityControl/components/setBatch/index.vue
index c05473e..d68a0ea 100644
--- a/src/views/liswork/qualityControl/components/setBatch/index.vue
+++ b/src/views/liswork/qualityControl/components/setBatch/index.vue
@@ -18,7 +18,6 @@
保存
复制靶值
新增靶值
- 删除靶值
计算
@@ -80,7 +79,8 @@
+ @column-drag-end="columnDragEnd"
+ :config="{ border: true, highlightCurrentRow: true, height: '100%', actionWidth: 80 }">
{{ row.xmdh }} {{ row.xmmc }}
@@ -90,6 +90,9 @@
{{ formatDict(row.sjph, 'LOT') }}
+
+ 删除
+
@@ -158,10 +161,11 @@