diff --git a/src/api/liswork/work/LisWork.ts b/src/api/liswork/work/LisWork.ts index e5235cd..6899b6e 100644 --- a/src/api/liswork/work/LisWork.ts +++ b/src/api/liswork/work/LisWork.ts @@ -386,5 +386,45 @@ export function changeLinkList(query?: Object) { data: query }) } +// 清除所有未做项目 +export function clearnotComplete(query?: Object) { + return request({ + url: '/liswork/clearnotcomplete', + method: 'get', + params: query + }) +} +// 查看备份数据 +export function viewBackup(query?: Object) { + return request({ + url: '/liswork/viewbackup', + method: 'get', + params: query + }) +} +// 未建项目结果 +export function noiteMresult(query?: Object) { + return request({ + url: '/liswork/noitemresult', + method: 'get', + params: query + }) +} +// 项目与通道号对照 +export function setitemInter(query?: Object) { + return request({ + url: '/liswork/setiteminter', + method: 'get', + params: query + }) +} +// 清除打印标志 +export function clearPrintflag(query?: Object) { + return request({ + url: '/liswork/clearprintflag', + method: 'get', + params: query + }) +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index d47a998..4b4ba9d 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -173,6 +173,32 @@ aside { } } + +.compact-form { + flex: 1; + position: relative; + height: 100%; + overflow-y: auto; + overflow-x: hidden; + + + .el-form-item { + margin-bottom: 0px; + } + + .el-form-item__label { + padding-bottom: 0px; + color: #08355E; + font-size: 12px; + } + + // pointer-events: none; + + :deep(.el-radio__label) { + color: #08355E; + } +} + .filter-container { padding-bottom: 10px; diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 1347340..c449373 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -172,6 +172,10 @@ padding: 0 !important; } + .el-table--default .cell { + padding: 0 !important; + } + .el-table__cell { padding: 0 !important; height: 30px; @@ -231,6 +235,10 @@ background-color: #dfdcdc !important; } + .el-select-dropdown__item.is-hovering { + background-color: #a4beef !important; + } + .el-input.is-disabled .el-input__wrapper { background-color: #dfdcdc !important; } diff --git a/src/components/contextMenu/index.vue b/src/components/contextMenu/index.vue index ebf3478..5b054b3 100644 --- a/src/components/contextMenu/index.vue +++ b/src/components/contextMenu/index.vue @@ -115,14 +115,17 @@ const handleKeyDown = (e: KeyboardEvent) => { onMounted(() => { - document.addEventListener('click', handleClickOutside); - document.addEventListener('keydown', handleKeyDown); - + // 关闭所有菜单 emitter.on('closeAllContextMenus', () => { if (visible.value) { hideMenu(); } }); + + document.addEventListener('click', handleClickOutside); + document.addEventListener('keydown', handleKeyDown); + + }); // 卸载时移除事件监听 diff --git a/src/components/projectDetails/index.vue b/src/components/projectDetails/index.vue index d668f64..32045b7 100644 --- a/src/components/projectDetails/index.vue +++ b/src/components/projectDetails/index.vue @@ -3,8 +3,8 @@ - + @@ -100,7 +100,7 @@ const filterDictData = () => { }); }; - +const inputRef = ref() // 关键修改:打开弹窗时重新加载数据 const openDictSelector = async () => { if (props.disabled || isDictLoading.value) { @@ -113,6 +113,11 @@ const openDictSelector = async () => { // 数据加载完成后再显示弹窗 dialogVisible.value = true; searchKey.value = ''; + nextTick(() => { + setTimeout(() => { + inputRef.value.focus(); + }, 100); + }); filterDictData(); }; diff --git a/src/components/projectsjg/index.vue b/src/components/projectsjg/index.vue index 2000155..8d326f3 100644 --- a/src/components/projectsjg/index.vue +++ b/src/components/projectsjg/index.vue @@ -1,7 +1,7 @@ @@ -233,7 +270,8 @@ import { ref, toRefs, watch, nextTick, onMounted, computed } from "vue"; import userVerification from "@/components/userVerification/index.vue"; import { check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, changeresult, allPatquery, emrquery, datalink, changeLinkList, - newresult, queryXmVal, printListwork, getresultchangelog, setinputmdl, saveResult, lockSample, unLockSample + viewBackup, newresult, queryXmVal, printListwork, getresultchangelog, setinputmdl, saveResult, lockSample, unLockSample, clearnotComplete, clearPrintflag, + noiteMresult, queryXmInfo, setitemInter } from "@/api/liswork/work/LisWork"; import { ElMessageBox, ElMessage } from "element-plus"; import ProjectDetails from "@/components/projectDetails/index.vue"; @@ -241,12 +279,10 @@ import projectsJg from "@/components/projectsjg/index.vue" import { classCom } from '@/utils/classCom' import CustomTable from '@/components/elTable/index.vue' import dayjs from 'dayjs'; -// @ts-ignore -import { listUser } from '@/api/system/user.js' import emitter from "@/utils/mitt"; import { useCommonStore } from "@/store/modules/commonStore"; import ContextMenu from "@/components/contextMenu/index.vue"; - +import ViewBackup from "./viewBackup.vue"; // 组件属性定义 const props = defineProps({ resultSysList: { type: Array, required: true }, @@ -336,7 +372,14 @@ const contextMenuItems = computed(() => [ // { label: '删除记录', action: 'delete', danger: true, shortcut: 'd', }, { label: '查看电子病历', action: 'emrquery', shortcut: 'E', }, { label: '查看360全景视图', action: 'patquery', shortcut: 'Y', }, + { label: '查看备份数据', action: 'viewbackup', shortcut: 'P', }, { label: '双工流水线', action: 'datalink', shortcut: 'F', }, + { type: 'divider' }, + { label: '解除审核', action: 'unblock', shortcut: 'C', }, + { label: '清除打印标志', action: 'clearPrint', shortcut: 'U', }, + { label: '清除所有未做项目', action: 'clearPro', shortcut: 'T', }, + { type: 'divider' }, + { label: '未建项目结果', action: 'unbuilt', shortcut: 'N', }, ]); // 处理菜单选择 @@ -364,9 +407,24 @@ const handleMenuSelect = (item) => { case 'patquery': patqueryHandle() //360视图 break; + case 'viewbackup': + viewbackupHandle() //查看备份数据 + break; case 'datalink': datalinkHandle() //流水线 break; + case 'unblock': + handleCheck(3) //解除审核 + break; + case 'clearPrint': + clearPrintHandle() //清除打印标志 + break; + case 'clearPro': + clearProHandle() //清除所有未做项目 + break; + case 'unbuilt': + unbuiltHandle() //未建项目结果 + break; case 'delete': if (confirm(`确定要删除患者的记录吗?`)) { @@ -374,6 +432,98 @@ const handleMenuSelect = (item) => { break; } }; +const builtShow = ref(false) +const builtTableData = ref([]) +const builtOptions = ref([]) +const unbuiltHandle = () => { + queryXmInfo({ yq: tableKey.value.yq }).then(res => { + if (res.code == 0) { + builtOptions.value = res.data.map(item => { + return { + value: item.xmdh, + label: item.xmdh + ' - ' + item.xmmc + } + }) + } + }) + + noiteMresult(tableKey.value).then(res => { + builtTableData.value = res.data.map(item => { + return { + ...item, + xmdh0: '' + } + }) + }) + + builtShow.value = true +}; + +const cpHandle = () => { + const validItems = builtTableData.value.filter(item => item.xmdh0); + + if (validItems.length === 0) { + console.log("没有需要处理的项"); + return; + } + + let successCount = 0; + let failCount = 0; + + + const requests = validItems.map((item, index) => { + return setitemInter({ ...tableKey.value, xmdh0: item.xmdh0, xmdh: item.xmdh }) + .then(response => ({ + index, + success: true, + data: response + })) + .catch(error => ({ + index, + success: false, + error: error + })); + }); + + Promise.all(requests).then(results => { + results.forEach(result => { + if (result.success) { + successCount++; + // console.log(`第 ${result.index + 1} 项成功:`, result.data); + } else { + failCount++; + // console.error(`第 ${result.index + 1} 项失败:`, result.error); + } + }); + // 输出统计结果 + ElMessageBox.alert( + `项目与通道号对照已经完成,成功${successCount}个;失败${failCount}个。
你可以重新从仪器端传送一遍数据,就可以看到正确的结果了。`, + '信息', + { + dangerouslyUseHTMLString: true, + } + ) + }) +}; + + + +const clearPrintHandle = () => { + clearPrintflag(tableKey.value).then(res => { + if (res.code == 0) { + emits('changeStatus', labPat.value) + } + }) +}; + + +const clearProHandle = () => { + clearnotComplete(tableKey.value).then(res => { + if (res.code == 0) { + emits('fetchLabResults') + } + }) +}; const mTableData = ref([]) @@ -420,6 +570,18 @@ const patqueryHandle = () => { } }) }; +const backRef = ref() +const backLabInfo = ref({}) +const backTableData = ref([]) +const viewbackupHandle = () => { + viewBackup(tableKey.value).then(res => { + if (res.data) { + backTableData.value = res.data.labresultbk + backLabInfo.value = res.data.labpatbk + } + }) + backRef.value.openDialog() +}; const dlObj = { 0: '申请发送', 1: '已发送指令', @@ -526,7 +688,7 @@ const handleConfirm = (data) => { if (res.code == 0) { formRef.value?.cancel() ElMessage.success(res.msg) - emits('fetchLabResults') + emits('fetchLabResults', true) } }); } else { @@ -534,7 +696,7 @@ const handleConfirm = (data) => { if (res.code == 0) { formRef.value?.cancel() ElMessage.success(res.msg) - emits('fetchLabResults') + emits('fetchLabResults', true) } }); } @@ -614,7 +776,6 @@ const handleColumnDragEnd = (data) => { }; const lastResult = ref({}); const beforeEnter = (row) => { - console.log('row==>', row); const data = { ...tableKey.value, xmdh: row.xmdh, @@ -1083,4 +1244,43 @@ const formatDict = (v, dictType) => { .custom-table-container { height: 100%; } + +.tips { + font-family: SourceHanSansCN, SourceHanSansCN; +} + +.btns_box { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + margin-top: 1.875rem; + + .btn { + width: 80%; + height: 2.5rem; + line-height: 2.5rem; + margin-bottom: 0.5rem; + font-size: 0.9rem; + font-weight: 500; + border-radius: 0.5rem; + background-color: var(--el-color-primary); + color: var(--el-color-white); + cursor: pointer; + + &:hover { + background-color: var(--el-color-primary-light-2); + } + + &:last-child { + margin-bottom: 0; + } + + &.disabled { + background-color: var(--el-color-primary-light-5); + cursor: not-allowed; + } + + } +} diff --git a/src/views/liswork/work/components/viewBackup.vue b/src/views/liswork/work/components/viewBackup.vue new file mode 100644 index 0000000..5b3aa6c --- /dev/null +++ b/src/views/liswork/work/components/viewBackup.vue @@ -0,0 +1,154 @@ + + + + + + \ No newline at end of file diff --git a/src/views/liswork/work/index.vue b/src/views/liswork/work/index.vue index ef59bdb..9efe1a5 100644 --- a/src/views/liswork/work/index.vue +++ b/src/views/liswork/work/index.vue @@ -51,9 +51,9 @@ :userList="userList" @changeStatus="changeStatus" /> - + @@ -63,7 +63,7 @@
- - - - - - - - - - - - - - - - -
@@ -177,19 +149,33 @@ const queryParams = ref({ const ybs = ref(0) const ws = ref(0) const wjs = ref(0) -const activeTab = ref(1) +const activeTab = ref('LabPatList') const tabList = ref([ - { label: '标本列表', value: 1 }, - { label: '结果图形', value: 9 }, - { label: '历史对照', value: 2 }, - { label: '其他结果', value: 3 }, - { label: '结果复查', value: 4 }, - { label: '收费信息', value: 5 }, - { label: '组合项目', value: 6 }, - { label: '临床意义', value: 7 }, - { label: '样本流转', value: 8 }, + { label: '标本列表', value: 'LabPatList' }, + { label: '结果图形', value: 'ResultGraph' }, + { label: '历史对照', value: 'History' }, + { label: '其他结果', value: 'Others' }, + { label: '结果复查', value: 'Reexamination' }, + { label: '收费信息', value: 'Charge' }, + { label: '组合项目', value: 'Combination' }, + { label: '临床意义', value: 'Clinical' }, + { label: '样本流转', value: 'Sample' }, ]) -const labPat = ref({},) + +const activeTabMap = { + ResultGraph, + History, + Others, + Reexamination, + Charge, + Combination, + Clinical, + Sample +} + +const activeTabName = computed(() => activeTabMap[activeTab.value as keyof typeof activeTabMap] || 'LabPatList'); + +const labPat = ref({}) const labPatList = ref>([]); const originalLabPatList = ref([]) //原始数据 const loading = ref(false) @@ -340,6 +326,13 @@ const getYqConfig = () => { }) } +const resultsHandle = (flag: boolean) => { + if (flag) { + fetchLabPat(); + } + fetchLabResults() +} + const highlightRowIndex = ref(-1) const labPatListRef = ref() //样本列表点击切换样本信息,同步载入左边样本信息表单和中间结果表单 @@ -350,13 +343,13 @@ const selectJob = (job: any) => { queryParams.value.jyrq = job.jyrq; queryParams.value.yq = job.yq.trim(); queryParams.value.ybh = job.ybh; + fetchLabPat(); fetchLabResults(); highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh); } const labResuts = ref([]) //载入样本结果表单(中间labresult.vue组件) const fetchLabResults = async () => { - fetchLabPat(); queryLabResults({ jyrq: queryParams.value.jyrq, yq: queryParams.value.yq, ybh: queryParams.value.ybh }).then((response: any) => { labResuts.value = response.data; }) @@ -365,7 +358,7 @@ const fetchLabResults = async () => { //载入样本编辑表单(左边labpat.vue组件) const fetchLabPat = () => { queryLabPat(queryParams.value).then((response: any) => { - labPat.value = response.data[0]; + labPat.value = response.data; }) } @@ -373,7 +366,6 @@ const lastRow: any = ref({}) const handleQuery = () => { if (!labPatList.value.length) return - // fetchlabPatList() if (!queryParams.value.ybh) { highlightRowIndex.value = -1; ElMessage.warning('请输入样本编号') @@ -504,7 +496,7 @@ const handleNext = () => { const changeStatus = (updatedPat: any, flag: boolean) => { queryLabPat(queryParams.value).then((response: any) => { if (response.code == 0) { - labPat.value = response.data[0]; + labPat.value = response.data; const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh); if (index !== -1) { labPatList.value = labPatList.value.map((item, i) => @@ -558,7 +550,6 @@ const fetchlabPatList = () => { loading.value = false; if (res.data.length > 0) { highlightRowIndex.value = 0; - labPat.value = res.data[0]; setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]); }, 100) selectJob(res.data[0]) getTotals()