From 04c2ffe8de91b64bb821d8852c5741a727aaa869 Mon Sep 17 00:00:00 2001 From: wyuu Date: Thu, 27 Nov 2025 17:50:31 +0800 Subject: [PATCH 1/7] --- src/assets/styles/ruoyi.scss | 4 + src/components/elTable/index.vue | 5 +- src/views/liswork/components/charge/index.vue | 7 +- .../liswork/components/clinical/index.vue | 2 - .../liswork/components/combination/index.vue | 5 +- .../liswork/components/history/index.vue | 5 +- src/views/liswork/components/others/index.vue | 5 +- .../components/reexamination/index.vue | 6 +- .../liswork/components/resultGraph/index.vue | 5 +- src/views/liswork/components/sample/index.vue | 5 +- src/views/liswork/micro/index.vue | 45 ++--- .../micro/labresult/components/pyjDict.vue | 160 ++++++++++++++++++ .../micro/labresult/{byj.vue => pyj.vue} | 54 +++++- .../liswork/micro/labresult/zbReport.vue | 2 +- src/views/liswork/work/index.vue | 16 +- 15 files changed, 281 insertions(+), 45 deletions(-) create mode 100644 src/views/liswork/micro/labresult/components/pyjDict.vue rename src/views/liswork/micro/labresult/{byj.vue => pyj.vue} (56%) diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index c8a4094..19a70cf 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -395,6 +395,9 @@ cursor: pointer; } + .el-table--default .cell { + padding: 0 0 0 .3125rem !important; + } // 表格input宽度,表格select宽度 .full-width-input .el-input__inner .el-select__inner { @@ -411,6 +414,7 @@ box-shadow: none; background: transparent !important; padding: 0 !important; + padding-left: .3125rem !important; outline: none; &:hover { diff --git a/src/components/elTable/index.vue b/src/components/elTable/index.vue index bfe57ab..ee6aef4 100644 --- a/src/components/elTable/index.vue +++ b/src/components/elTable/index.vue @@ -26,7 +26,10 @@ - - + @@ -179,7 +179,7 @@ import Record from './labresult/record.vue'; // @ts-ignore import { comDict } from '@/utils/dict' import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork"; -import { wswsamplelistpage, sampleMedInfo } from "@/api/liswork/micro/index"; +import { wswsamplelistpage, sampleMedInfo, changepatjyrq } from "@/api/liswork/micro/index"; import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict"; import { ElMessage, ElMessageBox } from "element-plus"; import BatchCode from '../work/components/batchCode.vue'; @@ -192,6 +192,7 @@ import { listUser } from '@/api/system/user.js' import dayjs from 'dayjs' const aotuSize = classCom.useAutoSize(); import { initWebSocket, sendWebSocketMessage, closeWebSocket, getWebSocketState } from '@/utils/webSocket'; +import Labpat from './labpat.vue'; const previewShow = ref(false); const lbFlag = ref(false); @@ -271,7 +272,9 @@ watch(() => labPat.value, (newValue) => { }, { deep: true }); const checkUserRef = ref() +const datePickerRef = ref() const jyrqChange = (val: string) => { + datePickerRef.value?.blur(); ElMessageBox.confirm( `确定修改当前样本检验日期?`, '提示', @@ -288,6 +291,7 @@ const jyrqChange = (val: string) => { } }).catch(() => { fetchLabPat(); + datePickerRef.value?.blur(); }) }; @@ -299,6 +303,7 @@ const handleCheckUserConfirm = (info: { yhdh: string, mm: string }) => { updateJyrq() } else { fetchLabPat(); + datePickerRef.value?.blur(); } }) }; @@ -309,7 +314,19 @@ const checkUserCancel = () => { // 更新检验日期 const updateJyrq = () => { - // updateLabPat({ ...queryParams.value, ...labPat.value }) + changepatjyrq({ ...queryParams.value, jyrq: ybJyrq.value }).then((response: any) => { + if (response.code == 0) { + ElMessage.success('检验日期修改成功'); + changeStatus( + { + jyrq: ybJyrq.value, + ybh: labPat.value.ybh, + yq: labPat.value.yq + }, false + ) + datePickerRef.value?.blur(); + } + }); }; // 模糊查询 @@ -475,22 +492,22 @@ const lastRow: any = ref({}) // 批量扫码ybh同步样本编号 const ybhChangeTb = (val: string) => { // console.log('val==>', val); - labInfo.value.ybh = val + labPat.value.ybh = val queryParams.value.ybh = val handleQuery(); } const handleQuery = () => { if (!labPatList.value.length) return - if (!labInfo.value.ybh) { + if (!labPat.value.ybh) { highlightRowIndex.value = -1; ElMessage.warning('请输入样本编号') - labInfo.value.ybh = lastRow.value.ybh + labPat.value.ybh = lastRow.value.ybh queryParams.value.ybh = lastRow.value.ybh return; } // queryParams.value = { ...queryParams.value }; // 查找匹配的行 - const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == labInfo.value.ybh); + const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == labPat.value.ybh); const row = labPatList.value[matchedIndex] if (matchedIndex !== -1) { @@ -524,15 +541,15 @@ const handleCreate = () => { // 删除样本 const delSampleHd = () => { - if (labInfo.value.jgbz == '2') return ElMessage.warning('标本已审核,不能删除!') + if (labPat.value.jgbz == '2') return ElMessage.warning('标本已审核,不能删除!') const data = { - jyrq: labInfo.value.jyrq, - yq: labInfo.value.yq.trim(), - ybh: labInfo.value.ybh, + jyrq: labPat.value.jyrq, + yq: labPat.value.yq.trim(), + ybh: labPat.value.ybh, } ElMessageBox.confirm( - `确定删除当前${labInfo.value.ybh}号标本?`, + `确定删除当前${labPat.value.ybh}号标本?`, '提示', { confirmButtonText: '确定', @@ -544,7 +561,7 @@ const delSampleHd = () => { delSample(data).then((res: any) => { if (res.code == 0) { ElMessage.success('删除成功') - labPatList.value = labPatList.value.filter((item: any) => item.ybh != labInfo.value.ybh) + labPatList.value = labPatList.value.filter((item: any) => item.ybh != labPat.value.ybh) // 删除跳当前页面下一个样本 // handleNext() if (highlightRowIndex.value > labPatList.value.length - 1) { @@ -564,8 +581,7 @@ const delSampleHd = () => { // 上一个样本 const handlePrev = () => { if (!lbFlag.value) { - const ybh = getPreviousNumber(labInfo.value.ybh) as string; - labInfo.value.ybh = ybh; + const ybh = getPreviousNumber(labPat.value.ybh) as string; queryParams.value.ybh = ybh; const index = labPatList.value.findIndex((item: any) => item.ybh == ybh) if (index !== -1) { @@ -594,8 +610,7 @@ const handlePrev = () => { // 下一个样本 const handleNext = () => { if (!lbFlag.value) { - const ybh = getNextNumber(labInfo.value.ybh) as string; - labInfo.value.ybh = ybh; + const ybh = getNextNumber(labPat.value.ybh) as string; queryParams.value.ybh = ybh; const index = labPatList.value.findIndex((item: any) => item.ybh == ybh) if (index !== -1) { @@ -617,15 +632,13 @@ const handleNext = () => { } selectJob(row); } else { - labInfo.value.ybh = getNextNumber(labInfo.value.ybh) as string; - queryParams.value.ybh = labInfo.value.ybh; + queryParams.value.ybh = labPat.value.ybh; handleCreate(); } } } // 最后一个样本 const handleLast = () => { - labInfo.value.ybh = labPatList.value[labPatList.value.length - 1].ybh; queryParams.value.ybh = labPatList.value[labPatList.value.length - 1].ybh; handleNext(); } diff --git a/src/views/liswork/micro/labresult/pyj.vue b/src/views/liswork/micro/labresult/pyj.vue index ae3a80a..0bc6896 100644 --- a/src/views/liswork/micro/labresult/pyj.vue +++ b/src/views/liswork/micro/labresult/pyj.vue @@ -102,7 +102,6 @@ const handleCsjgEnter = (row: any) => { const handleInputFocus = (row: any) => { updateItem.value = row; pyjRef.value.openDictSelector(); - console.log('row', row); } const selectItem = (item: any) => { if (updateItem.value) { @@ -117,7 +116,6 @@ const selectItem = (item: any) => { } }); } else { - console.log('labPat==>', labPat.value); const data = { mediumno: item.value, mediumname: item.label, diff --git a/src/views/liswork/work/components/CheckUser.vue b/src/views/liswork/work/components/CheckUser.vue index 0627494..d1c1280 100644 --- a/src/views/liswork/work/components/CheckUser.vue +++ b/src/views/liswork/work/components/CheckUser.vue @@ -1,7 +1,7 @@ @@ -206,6 +174,7 @@ import { import { ElMessageBox, ElMessage } from "element-plus"; import ProjectDetails from "@/components/projectDetails/index.vue"; import projectsJg from "@/components/projectsjg/index.vue" +import BuiltDialog from "./builtDialog.vue"; import { classCom } from '@/utils/classCom' import CustomTable from '@/components/elTable/index.vue' import dayjs from 'dayjs'; @@ -366,82 +335,12 @@ const handleMenuSelect = (item) => { break; } }; -const builtShow = ref(false) -const builtTableData = ref([]) -const builtOptions = ref([]) +const builtRef = 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 + builtRef.value.open() }; -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) { @@ -791,7 +690,7 @@ const shHandleCheck = () => { const unconfirmlogRef = ref(); const unShHandle = () => { uncheck2({ ...tableKey.value, yhdh: props.labPat.yhdh }).then(res => { - console.log('res',res); + console.log('res', res); if (res.code == "4") { tableKey.value.problemId = res.problemId; reasonText.value = res.msg; @@ -1103,43 +1002,4 @@ 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/login.vue b/src/views/login.vue index 2aa2d01..ca2e212 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,13 +1,15 @@ @@ -116,6 +107,7 @@ import { getCodeImg, getInfo, getLocalconfig } from "@/api/login"; import Cookies from "js-cookie"; import { encrypt, decrypt } from "@/utils/jsencrypt"; import useUserStore from '@/store/modules/user'; +import FloatingLines from '@/components/Ballpit/index.vue'; // 初始化响应式变量 const activeName = ref('first'); @@ -136,12 +128,12 @@ const loginForm = ref({ rememberMe: false, code: "", uuid: "", - loginParam:{loginYLJG:"",localid:""} + loginParam: { loginYLJG: "", localid: "" } }); const selectOptions = ref([{ id: '1', name: '总院' }]); const loginRules = ref({ // 修复:改为ref响应式,方便动态修改 username: [{ required: true, trigger: "blur", message: "请输入您的账号" }], -// password: [{ required: true, trigger: "blur", message: "请输入您的密码" }], + // password: [{ required: true, trigger: "blur", message: "请输入您的密码" }], hospid: [{ required: true, message: '请选择医疗机构', trigger: 'change' }], code: [{ required: true, trigger: "change", message: "请输入验证码" }] }); @@ -153,41 +145,41 @@ const redirect = ref(undefined); // 路由监听(优化版) watch( - () => route.query.redirect, - (newRedirect) => { - if (redirect.value !== newRedirect) { - redirect.value = newRedirect || ''; - } - }, - { immediate: true, deep: false } + () => route.query.redirect, + (newRedirect) => { + if (redirect.value !== newRedirect) { + redirect.value = newRedirect || ''; + } + }, + { immediate: true, deep: false } ); // 登录方法(修复proxy.$refs问题) const handleLogin = async () => { loginForm.value.loginParam.loginYLJG - loading.value = true; - Cookies.set("czlis_username", loginForm.value.username, { expires: 30 }); - Cookies.set("czlis_loginYLJG", loginForm.value.loginParam.loginYLJG, {expires: 30}); - // 调用action的登录方法 - userStore.login(loginForm.value).then(() => { - const query = route.query; - const otherQueryParams = Object.keys(query).reduce((acc, cur) => { - if (cur !== "redirect") { - acc[cur] = query[cur]; - } - return acc; - }, {}); - const targetPath = redirect.value || "/"; - if (route.path !== targetPath) { - router.push({ path: targetPath, query: otherQueryParams }); - } - }).catch(() => { - loading.value = false; - // 重新获取验证码 - if (captchaEnabled.value) { - getCode(); - } - }); + loading.value = true; + Cookies.set("czlis_username", loginForm.value.username, { expires: 30 }); + Cookies.set("czlis_loginYLJG", loginForm.value.loginParam.loginYLJG, { expires: 30 }); + // 调用action的登录方法 + userStore.login(loginForm.value).then(() => { + const query = route.query; + const otherQueryParams = Object.keys(query).reduce((acc, cur) => { + if (cur !== "redirect") { + acc[cur] = query[cur]; + } + return acc; + }, {}); + const targetPath = redirect.value || "/"; + if (route.path !== targetPath) { + router.push({ path: targetPath, query: otherQueryParams }); + } + }).catch(() => { + loading.value = false; + // 重新获取验证码 + if (captchaEnabled.value) { + getCode(); + } + }); }; // 获取验证码 @@ -202,7 +194,7 @@ const getCode = () => { if (!captchaEnabled.value) { loginRules.value.code = []; } else { - loginRules.value.code = [{required: true, trigger: "change", message: "请输入验证码"}]; + loginRules.value.code = [{ required: true, trigger: "change", message: "请输入验证码" }]; } }); }; @@ -212,10 +204,10 @@ const getCookie = () => { const cookieUsername = Cookies.get("czlis_username"); const cookieloginYLJG = Cookies.get("czlis_loginYLJG"); //console.log('cookieloginYLJG', cookieloginYLJG); - if (cookieUsername !== undefined && cookieUsername !== null&& cookieUsername !=="") { + if (cookieUsername !== undefined && cookieUsername !== null && cookieUsername !== "") { loginForm.value.username = cookieUsername; } - if (cookieloginYLJG !== undefined && cookieloginYLJG !== null&& cookieloginYLJG !=="") { + if (cookieloginYLJG !== undefined && cookieloginYLJG !== null && cookieloginYLJG !== "") { loginForm.value.loginParam.loginYLJG = cookieloginYLJG; } //console.log('loginForm', loginForm); @@ -223,16 +215,16 @@ const getCookie = () => { // 获取本地配置 const Localconfig = (localid) => { - getLocalconfig({localid}).then(res => { + getLocalconfig({ localid }).then(res => { if (res) { - const {localconfig, hosplist, oem: oemData} = res; + const { localconfig, hosplist, oem: oemData } = res; // 修复:赋值oem数据,显示动态标题 if (oemData) oem.value = oemData; - // console.log('oemData', oemData); - // console.log('oem', oem.value); + // console.log('oemData', oemData); + // console.log('oem', oem.value); // 修复:判重后更新下拉选项,避免递归 if (JSON.stringify(selectOptions.value) !== JSON.stringify(hosplist)) { - selectOptions.value = hosplist || [{id: '1', name: '总院'}]; + selectOptions.value = hosplist || [{ id: '1', name: '总院' }]; // 判重后赋值,避免重复修改触发更新 if (!selectOptions.value.some(item => item.id === loginForm.value.hospid)) { loginForm.value.loginParam.loginYLJG = selectOptions.value[0]?.id || '1'; @@ -246,11 +238,11 @@ const Localconfig = (localid) => { }; // 获取指纹并加载配置 -const {getFingerprint} = useFingerprint(); +const { getFingerprint } = useFingerprint(); const refreshFingerprint = async () => { try { const res = await getFingerprint(); - loginForm.value.loginParam.localid=res.visitorId + loginForm.value.loginParam.localid = res.visitorId Localconfig(res.visitorId); } catch (err) { console.error("获取指纹失败:", err); @@ -276,15 +268,18 @@ onMounted(() => { \ No newline at end of file diff --git a/src/views/liswork/work/components/mergeResults.vue b/src/views/liswork/work/components/mergeResults.vue new file mode 100644 index 0000000..a829390 --- /dev/null +++ b/src/views/liswork/work/components/mergeResults.vue @@ -0,0 +1,113 @@ + + + + + \ No newline at end of file diff --git a/src/views/liswork/work/components/viewBackup.vue b/src/views/liswork/work/components/viewBackup.vue index 5b3aa6c..276097d 100644 --- a/src/views/liswork/work/components/viewBackup.vue +++ b/src/views/liswork/work/components/viewBackup.vue @@ -105,17 +105,15 @@ diff --git a/src/views/liswork/labItem/tab/CommonlyValues.vue b/src/views/liswork/labItem/tab/CommonlyValues.vue index 02a8f65..661c6c7 100644 --- a/src/views/liswork/labItem/tab/CommonlyValues.vue +++ b/src/views/liswork/labItem/tab/CommonlyValues.vue @@ -30,12 +30,12 @@ import { dictData,getDictData } from '@/hooks'; import { ElMessageBox } from 'element-plus'; import {delXmValNewService} from '@/api/liswork/labItem/labItemApi' -const props = defineProps({ - formData: { - type: Object, - default: {} - } -}); +// const props = defineProps({ +// formData: { +// type: Object, +// default: {} +// } +// }); const modelParam = defineModel() const emit = defineEmits(['refreshTabData']) @@ -78,7 +78,7 @@ const maxXh = computed(() => { const bClickAdd = () => { const newData = { - xmid: props.formData.xmid, + xmid: modelParam.value.basicData.xmid, qz: '', srm: '', jgbz: '', @@ -94,8 +94,8 @@ const bClickDel = async () => { {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}); //删掉界面上面的数据 //tableList.value = tableList.value?.filter((item:any) => item.xh != selectRow.value.xh ); - await delXmValNewService({xmid:props.formData.xmid,xh:selectRow.value.xh}) - emit('refreshTabData',props.formData) + await delXmValNewService({xmid:modelParam.value.basicData.xmid,xh:selectRow.value.xh}) + emit('refreshTabData',modelParam.value.basicData) } @@ -114,6 +114,10 @@ onActivated(async ()=>{ tableList.value = modelParam.value.commonlyValuesData || [] }) +defineExpose({ + commonlyValuesData: tableList +}) + diff --git a/src/views/liswork/labItem/tab/base/Basic.vue b/src/views/liswork/labItem/tab/base/Basic.vue index 4a5047d..22f79ed 100644 --- a/src/views/liswork/labItem/tab/base/Basic.vue +++ b/src/views/liswork/labItem/tab/base/Basic.vue @@ -164,12 +164,12 @@ import CalcGuilde from './child/CalcGuilde.vue'; import SelectTable from '@/components/SelectTable/index.vue' import Condition from './child/Condition.vue'; -const props = defineProps({ - dataList: { - type: Object , //Object as PropType - required: false - } -}); +// const props = defineProps({ +// dataList: { +// type: Object , //Object as PropType +// required: false +// } +// }); const modelParam = defineModel() @@ -251,7 +251,7 @@ const ygxbCheck = computed({ watch( () => modelParam.value, (newVal:any) => { - formData.value = {...newVal }; + formData.value = {...newVal.basicData}; }, { immediate: true,deep: true } ); @@ -292,6 +292,11 @@ onActivated(async () => { await getDictData('XMGL'); }) + +defineExpose({ + basicData: formData +}) + diff --git a/src/views/liswork/labItem/tab/commonDescriptions.vue b/src/views/liswork/labItem/tab/commonDescriptions.vue index d564e37..49943eb 100644 --- a/src/views/liswork/labItem/tab/commonDescriptions.vue +++ b/src/views/liswork/labItem/tab/commonDescriptions.vue @@ -20,18 +20,17 @@ import CustomTable from '@/components/elTable/index.vue' import { XmTextresultNew } from '@/types'; import { ElMessageBox } from 'element-plus'; import { ref } from 'vue'; +import { delXmTextresultNew } from '@/api/liswork/labItem/labItemApi'; -const props = defineProps({ - dataList: { - type: Array, - default: () => [] - }, - formData: { - type: Object, - default: {} - } -}); +// const props = defineProps({ +// formData: { +// type: Object, +// default: {} +// } +// }); + +const modelParam = defineModel() const tableRef = ref(); const tableList = ref>([]) @@ -53,12 +52,21 @@ const handleColumnDragEnd = (data: any) => { } const selectRow = ref() +const emit = defineEmits(['refreshTabData']) //序号最大值 const maxXh = computed(() => { return tableList.value.length > 0 ? Math.max(...tableList.value.map((item:any) => item.xh || 0)) : 0; }); +watch( + () => modelParam.value, + (newVal:any) => { + tableList.value = [...newVal.commonDescriptionsData]; + }, + { immediate: true, deep: true } +); + const rowClick = (row:any) => { selectRow.value = row } @@ -66,8 +74,8 @@ const rowClick = (row:any) => { const onAddClick = () => { const newData: XmTextresultNew = { - xmid: props.formData.xmid, - xmdh: props.formData.xmdh, + xmid: modelParam.value.basicData.xmid, + xmdh: modelParam.value.basicData.xmdh, xh: maxXh.value + 1 } tableList.value.push(newData) @@ -77,19 +85,13 @@ const onDelClick = async ()=> { if(selectRow.value){ await ElMessageBox.confirm('是否要删除选中的数据?','警告', { confirmButtonText: 'OK',cancelButtonText: 'Cancel',type: 'warning',}); - tableList.value = tableList.value.filter((item:any) => item.xh != selectRow.value.xh) + //tableList.value = tableList.value.filter((item:any) => item.xh != selectRow.value.xh) + await delXmTextresultNew({xmid:modelParam.value.basicData.xmid,xh:selectRow.value.xh}) + emit('refreshTabData',modelParam.value.basicData) } } - -watch( - () => props.dataList, - (newVal:any) => { - tableList.value = newVal; - } -); - defineExpose({ commonDescriptionsData: tableList }) diff --git a/src/views/liswork/labItem/tab/referenceValueDetails.vue b/src/views/liswork/labItem/tab/referenceValueDetails.vue index 4218a4a..3340571 100644 --- a/src/views/liswork/labItem/tab/referenceValueDetails.vue +++ b/src/views/liswork/labItem/tab/referenceValueDetails.vue @@ -73,7 +73,7 @@ @@ -95,12 +95,14 @@ import {getDictData,dictData} from '@/hooks' import SelectTable from '@/components/SelectTable/index.vue' import { ElMessageBox } from 'element-plus'; -const props = defineProps({ - dataList: { - type: Array, - default: [] - } -}); +// const props = defineProps({ +// dataList: { +// type: Array, +// default: [] +// } +// }); + +const modelParam = defineModel() const optionsXb = [ {value: '1' ,label: '男'}, @@ -126,14 +128,15 @@ const bblxOptions = ref>([]); const tableRefUp = ref(); const tableRefDown = ref(); -const dataListUp = ref(props.dataList); +const dataListUp = ref(); const dataListDown = ref(); const columnsUp = ref([ - { prop: 'xh', label: '序号', visible: false, align: 'center', width: 70 }, + { prop: 'xmid', label: 'xmid', visible: false, align: 'center'}, + { prop: 'xh', label: '序号', visible: false, align: 'center' }, { prop: 'xb', label: '性别', visible: true, align: 'center',slot: 'xb', width: 70 }, - { prop: 'cp_nl1', label: '年龄下限', visible: true, align: 'center',slot:'cp_nl1', width: 100 }, + { prop: 'nl1', label: '年龄下限', visible: true, align: 'center',slot:'cp_nl1', width: 100 }, { prop: 'cp_nldw1', label: '年龄单位', visible: true, align: 'center',slot:'cp_nldw1', width: 70 }, - { prop: 'cp_nl2', label: '年龄上限', visible: true, align: 'center',slot: 'cp_nl2', width: 100 }, + { prop: 'nl2', label: '年龄上限', visible: true, align: 'center',slot: 'cp_nl2', width: 100 }, { prop: 'cp_nldw2', label: '年龄单位', visible: true, align: 'center',slot: 'cp_nldw2', width: 100 }, { prop: 'bblx', label: '标本类型', visible: true, align: 'center',slot: 'bblx', width: 100 }, { prop: 'slzq', label: '生理周期', visible: true, align: 'center',slot: 'slzq', width: 100 }, @@ -180,9 +183,18 @@ const maxXh = computed(() => { return dataListUp.value.length > 0 ? Math.max(...dataListUp.value.map((item:any) => item.xh || 0)) : 0; }); +watch( + () => modelParam.value, + (newVal:any) => { + dataListUp.value = [...newVal.referenceValueDetailsData]; + }, + { immediate: true, deep: true } +); const onAddClick = () => { const newData = { + xmid: modelParam.value.basicData.xmid, + yq: '0', xh: maxXh.value + 1 } dataListUp.value.push(newData) diff --git a/src/views/liswork/labItem/tab/useInstr.vue b/src/views/liswork/labItem/tab/useInstr.vue index 99862d3..e339d71 100644 --- a/src/views/liswork/labItem/tab/useInstr.vue +++ b/src/views/liswork/labItem/tab/useInstr.vue @@ -14,16 +14,16 @@ - + @@ -35,32 +35,28 @@ import CustomTable from '@/components/elTable/index.vue' import { XmInfoVs } from '@/types'; import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue' import {ElMessageBox} from 'element-plus' +import { deleteXmInfoVs } from '@/api/liswork/labItem/labItemApi'; -const props = defineProps({ - // 显示数据 - dataList: { - type: Array, - required: true, - default: () => [] - }, - formData: { - type: Object, - required: false, - default: {} - } -}); - +// const props = defineProps({ +// formData: { +// type: Object, +// required: false, +// default: {} +// } +// }); +const modelParam = defineModel() //const yq = ref(''); const tableRef = ref(); const yqList = ref>([]); const columns = ref([ + { prop: 'vsid', label: '对照编码', visible: false, align: 'center' }, { prop: 'yq', label: '仪器代号', visible: true, align: 'center', slot: 'yq', width: 150 }, { prop: 'xs', label: '调整系数', visible: true, align: 'center', slot: 'xs', width: 100 }, { prop: 'zkxm', label: '质控', visible: true, align: 'center', slot: 'zkxm', width: 40 }, - { prop: 'cksx', label: '参考上限', visible: true, align: 'center',slot: 'cksx', width: 100 }, { prop: 'ckxx', label: '参考下限', visible: true, align: 'center',slot: 'ckxx', width: 100 }, + { prop: 'cksx', label: '参考上限', visible: true, align: 'center',slot: 'cksx', width: 100 }, { prop: 'dyckz', label: '打印参考值', visible: true, align: 'center',slot: 'dyckz', width: 100 }, ]); const tableConfig = ref({ @@ -74,6 +70,15 @@ const selectRow = ref({ xmid: 0 }) +watch( + () => modelParam.value, + (newVal:any) => { + yqList.value = [...newVal.userInstrData]; + }, + { immediate: true, deep: true } +); + +const emit = defineEmits(['refreshTabData']) //退拽属性 const handleColumnDragEnd = (data: any) => { @@ -93,7 +98,7 @@ const handInputChange = () => { const onClickAdd = () => { const newData: XmInfoVs = { yq: '', - xmid: props.formData.xmid, + xmid: modelParam.value.basicData.xmid, } yqList.value.push(newData) } @@ -106,7 +111,8 @@ const onClickDel = async () => { cancelButtonText: '取消', type: 'warning', }); - yqList.value = yqList.value.filter(item => item.yq != selectRow.value.yq); + await deleteXmInfoVs({vsid:selectRow.value.vsid || 0}) + emit('refreshTabData',modelParam.value.basicData) } } @@ -114,8 +120,17 @@ const onRowClick = (row: any) => { selectRow.value = row } +const getDyckz = (row: XmInfoVs) => { + if(!row.cksx && !row.ckxx){ + return ''; + }else{ + return `${row.ckxx || ''}--${row.cksx || ''}`; + } + +} + onActivated(() =>{ - yqList.value = Array.isArray(props.dataList) ? props.dataList : []; + }) defineExpose({ From fdacc38f17914f0923c29bec15fc49dc36681f7a Mon Sep 17 00:00:00 2001 From: wyuu Date: Wed, 3 Dec 2025 18:06:10 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E3=80=81=E4=B8=93=E5=AE=B6=E8=AF=84=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/liswork/micro/index.ts | 8 ++ src/assets/styles/index.scss | 4 +- src/components/tabViews/index.vue | 2 +- src/views/checkCode/report/index.vue | 10 +- .../components/otherInformation/index.vue | 125 ++++++++++++++++++ .../{others => othersResult}/index.vue | 0 src/views/liswork/components/sample/index.vue | 2 +- src/views/liswork/micro/index.vue | 50 ++++--- src/views/liswork/micro/labpat.vue | 2 - .../liswork/micro/labresult/cbReport.vue | 89 ++++++++----- .../labresult/components/commentDialog.vue | 89 +++++++++++++ .../liswork/micro/labresult/zbReport.vue | 107 +++++++++------ src/views/liswork/work/index copy.vue | 2 +- src/views/liswork/work/index.vue | 44 +++--- .../inspectionReport/report/index.vue | 10 +- 15 files changed, 413 insertions(+), 131 deletions(-) create mode 100644 src/views/liswork/components/otherInformation/index.vue rename src/views/liswork/components/{others => othersResult}/index.vue (100%) create mode 100644 src/views/liswork/micro/labresult/components/commentDialog.vue diff --git a/src/api/liswork/micro/index.ts b/src/api/liswork/micro/index.ts index 65aa33a..0acd6c5 100644 --- a/src/api/liswork/micro/index.ts +++ b/src/api/liswork/micro/index.ts @@ -34,6 +34,14 @@ export function getresultmedList(query?: Object) { params: query }) } +// 获取专家评语字典 +export function getgermtextdict(query?: Object) { + return request({ + url: '/lisworkgerm/getgermtextdict', + method: 'get', + params: query + }) +} // 写入专家评语 export function savetestResult(query?: Object) { return request({ diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 2123427..5331e82 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -293,8 +293,8 @@ aside { align-items: center; justify-content: space-between; - .jtIcon { - width: 2.5rem; + .jt_btn { + width: 1.5rem; height: 2rem; line-height: 2rem; font-size: 1rem; diff --git a/src/components/tabViews/index.vue b/src/components/tabViews/index.vue index bdc7554..e583251 100644 --- a/src/components/tabViews/index.vue +++ b/src/components/tabViews/index.vue @@ -70,7 +70,7 @@ const scrollToActiveTab = () => { // 如果Tab不在可见区域内,则滚动到可见区域 if (tabRect.left < containerRect.left || tabRect.right > containerRect.right) { scrollContainer.scrollTo({ - left: tabRect.left - containerRect.left + scrollContainer.scrollLeft - 100, + left: tabRect.left - containerRect.left + scrollContainer.scrollLeft - 200, behavior: 'smooth' }); } diff --git a/src/views/checkCode/report/index.vue b/src/views/checkCode/report/index.vue index 04ea533..53f1ac9 100644 --- a/src/views/checkCode/report/index.vue +++ b/src/views/checkCode/report/index.vue @@ -535,7 +535,15 @@ const rightTableConfig = ref( ) const formatJgbz = (v: string) => { - return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : '' + const jgbzMap = { + 'H': '高', + 'L': '低', + 'N': '阴性', + 'P': '阳性', + 'Q': '弱阳性', + 'M': '正常' + }; + return jgbzMap[v as keyof typeof jgbzMap] ?? ''; } const expertComment = ref('') diff --git a/src/views/liswork/components/otherInformation/index.vue b/src/views/liswork/components/otherInformation/index.vue new file mode 100644 index 0000000..0e1d645 --- /dev/null +++ b/src/views/liswork/components/otherInformation/index.vue @@ -0,0 +1,125 @@ + + + + + + \ No newline at end of file diff --git a/src/views/liswork/components/others/index.vue b/src/views/liswork/components/othersResult/index.vue similarity index 100% rename from src/views/liswork/components/others/index.vue rename to src/views/liswork/components/othersResult/index.vue diff --git a/src/views/liswork/components/sample/index.vue b/src/views/liswork/components/sample/index.vue index 504bf17..950caf2 100644 --- a/src/views/liswork/components/sample/index.vue +++ b/src/views/liswork/components/sample/index.vue @@ -189,7 +189,7 @@ const lastTimeIndex = computed(() => { const getInfo = () => { reqinfo(queryParams.value).then((res: any) => { - info.value = res.data[0] + info.value = res.data[0] || {} }) } diff --git a/src/views/liswork/micro/index.vue b/src/views/liswork/micro/index.vue index 2521f9b..86fe029 100644 --- a/src/views/liswork/micro/index.vue +++ b/src/views/liswork/micro/index.vue @@ -9,18 +9,12 @@
-
- - - -
+ -
- - - -
+
@@ -94,14 +88,16 @@ - + @@ -164,12 +160,13 @@ import tabView from '@/components/tabViews/index.vue'; import iFrame from "@/components/iFrame/index.vue"; import LabPatList from './labpatlist.vue'; import History from '../components/history/index.vue' -import Others from '../components/others/index.vue' +import OthersResult from '../components/othersResult/index.vue' import Reexamination from '../components/reexamination/index.vue' import Charge from '../components/charge/index.vue' import Combination from '../components/combination/index.vue' import Clinical from '../components/clinical/index.vue' import Sample from '../components/sample/index.vue' +import OtherInformation from '../components/otherInformation/index.vue' import ResultGraph from '../components/resultGraph/index.vue' import CheckUser from '../work/components/CheckUser.vue'; // 中间部分 @@ -220,23 +217,25 @@ const tabList = ref([ { label: '标本列表', value: 'LabPatList' }, { label: '结果图形', value: 'ResultGraph' }, { label: '历史对照', value: 'History' }, - { label: '其他结果', value: 'Others' }, + { label: '其他结果', value: 'OthersResult' }, { label: '结果复查', value: 'Reexamination' }, { label: '收费信息', value: 'Charge' }, { label: '组合项目', value: 'Combination' }, { label: '临床意义', value: 'Clinical' }, { label: '样本流转', value: 'Sample' }, + { label: '其他信息', value: 'OtherInformation' }, ]) const activeTabMap = { ResultGraph, History, - Others, + OthersResult, Reexamination, Charge, Combination, Clinical, - Sample + Sample, + OtherInformation } const activeTabName = computed(() => activeTabMap[activeTab.value as keyof typeof activeTabMap] || 'LabPatList'); @@ -498,16 +497,15 @@ const ybhChangeTb = (val: string) => { } const handleQuery = () => { if (!labPatList.value.length) return - if (!labPat.value.ybh) { + if (!queryParams.value.ybh) { highlightRowIndex.value = -1; ElMessage.warning('请输入样本编号') - labPat.value.ybh = lastRow.value.ybh queryParams.value.ybh = lastRow.value.ybh return; } // queryParams.value = { ...queryParams.value }; // 查找匹配的行 - const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == labPat.value.ybh); + const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh); const row = labPatList.value[matchedIndex] if (matchedIndex !== -1) { diff --git a/src/views/liswork/micro/labpat.vue b/src/views/liswork/micro/labpat.vue index 3e71883..f04d818 100644 --- a/src/views/liswork/micro/labpat.vue +++ b/src/views/liswork/micro/labpat.vue @@ -72,10 +72,8 @@ import { ref, reactive, watch, toRaw, computed, onMounted, nextTick } from 'vue' import { changepatcolumn, updateLabPat, checkYsUser } from "@/api/liswork/work/LisWork"; import SelectTable from '@/components/SelectTable/index.vue'; import YhVerification from '../work/components/yhVerification.vue'; - import emitter from '@/utils/mitt'; import { classCom } from '@/utils/classCom'; -import Labpat from '../work/components/labpat.vue'; const aotuSize = classCom.useAutoSize(); diff --git a/src/views/liswork/micro/labresult/cbReport.vue b/src/views/liswork/micro/labresult/cbReport.vue index 3a2f38b..70ac4f8 100644 --- a/src/views/liswork/micro/labresult/cbReport.vue +++ b/src/views/liswork/micro/labresult/cbReport.vue @@ -1,22 +1,18 @@ - -
- 二报人:{{ formatUser(erInfo?.confirmer) }}    报告时间:{{ erInfo?.confirmdt - }}   + 初报人:{{ formatUser(cbInfo?.confirmer) }} + 报告时间: {{ cbInfo?.confirmdt }}
-
{{ erInfo?.jgbz == '2' ? '已二报' : '' }}
+
{{ cbInfo?.jgbz == '2' ? '已初报' : '' }}
+
- 二报审核 - 取消审核 - 新增 - 删除 - 取消审核 + 新增 + 删除 + 组合项目 打印 预览 @@ -122,7 +118,13 @@ {{ formatDict(row.germclass, 'germclass') }} - +
+
+ 二报人:{{ formatUser(erInfo?.confirmer) }} + 报告时间:{{ erInfo?.confirmdt }} +
+
{{ erInfo?.jgbz == '2' ? '已二报' : '' }}
+
@@ -341,7 +343,7 @@ const CellStyleHd = ({ row, column, rowIndex, columnIndex }: { }; const tableConfig = ref({ - height: '32vh', + height: '33vh', border: true, highlightCurrentRow: true, cellStyle: CellStyleHd @@ -618,7 +620,15 @@ const formatDict = (v: string, dictType: string) => { } const formatJgbz = (v: string) => { - return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : '' + const jgbzMap = { + 'H': '高', + 'L': '低', + 'N': '阴性', + 'P': '阳性', + 'Q': '弱阳性', + 'M': '正常' + }; + return jgbzMap[v as keyof typeof jgbzMap] ?? ''; } const formatUser = (yhdh: string) => { return userList.value.find((item: any) => item.userName == yhdh)?.nickName || yhdh @@ -627,22 +637,29 @@ const formatUser = (yhdh: string) => { \ No newline at end of file diff --git a/src/views/liswork/micro/labresult/components/commentDialog.vue b/src/views/liswork/micro/labresult/components/commentDialog.vue new file mode 100644 index 0000000..0dcaf86 --- /dev/null +++ b/src/views/liswork/micro/labresult/components/commentDialog.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/src/views/liswork/micro/labresult/zbReport.vue b/src/views/liswork/micro/labresult/zbReport.vue index 6c2a438..31ef8a5 100644 --- a/src/views/liswork/micro/labresult/zbReport.vue +++ b/src/views/liswork/micro/labresult/zbReport.vue @@ -4,11 +4,12 @@ 审核 取消审核 - 新增 - 删除 - 组合项目 + 新增 + 删除 + 组合项目
@@ -113,22 +114,31 @@
+ + + @@ -208,6 +218,7 @@ import ViewBackup from "../../work/components/viewBackup.vue" import userVerification from "@/components/userVerification/index.vue"; import DlDialog from "../../work/components/dlDialog.vue"; import MergeResults from "../../work/components/mergeResults.vue"; +import CommentDialog from "./components/commentDialog.vue"; const props = defineProps({ labPat: { @@ -701,8 +712,9 @@ watch(labResutsData, (newVal: any) => { } }) -const handleTextareaEnter = () => { +const handleTextarea = () => { if (!rowInfo.value.xmdh) return + if (!textarea.value) return ElMessage.warning('请填写专家评语!') savetestResult({ ...rowInfo.value, textresult: textarea.value }).then((res: any) => { if (res.code == 0) { ElMessage.success('保存成功'); @@ -714,6 +726,8 @@ const rowHandle = (row: any) => { selectedRows.value = [row]; emitter.emitWithCache('refreshClinical', row); rowInfo.value = row + textarea.value = row.textresult + const data = { ybh: labPat.value.ybh, yq: labPat.value.yq, @@ -909,6 +923,15 @@ const kssSelect = (row: any) => { } }) } + +const commentRef = ref() +const pyMb = () => { + commentRef.value.open() +} + +const handleCommentConfirm = (text: string) => { + textarea.value = text +} const addMed = () => { medDictRef.value.openDictSelector(); } @@ -1004,7 +1027,15 @@ const formatDict = (v: string, dictType: string) => { return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v; } const formatJgbz = (v: string) => { - return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : '' + const jgbzMap = { + 'H': '高', + 'L': '低', + 'N': '阴性', + 'P': '阳性', + 'Q': '弱阳性', + 'M': '正常' + }; + return jgbzMap[v as keyof typeof jgbzMap] ?? ''; } diff --git a/src/views/liswork/work/index copy.vue b/src/views/liswork/work/index copy.vue index 030a2c2..5dbca2e 100644 --- a/src/views/liswork/work/index copy.vue +++ b/src/views/liswork/work/index copy.vue @@ -132,7 +132,7 @@ import { } from "../../../api/liswork/work/LisWork"; import { querylabInstrList, querylabInstrListByLisgroup } from "../../../api/liswork/dict/LabInstr"; import { getComDicts, queryComDictListService } from "../../../api/liswork/dict/ComDict"; -import LabPatForm from './components/labpat.vue' +import LabPatForm from './labpat.vue' import LabResultForm from './labresult.vue' import LabPatListForm from './labpatlist.vue' import Unconfirmlog from './components/unconfirmlog.vue' diff --git a/src/views/liswork/work/index.vue b/src/views/liswork/work/index.vue index 398db96..9905d24 100644 --- a/src/views/liswork/work/index.vue +++ b/src/views/liswork/work/index.vue @@ -9,18 +9,12 @@
-
- - - -
+ -
- - - -
+
@@ -79,15 +73,18 @@ - + @@ -137,12 +134,13 @@ import { queryLabPatList, queryLabResults, loadDefault, queryLabPat, instrdconfi import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict"; import { ElMessage, ElMessageBox } from "element-plus"; import History from '../components/history/index.vue' -import Others from '../components/others/index.vue' +import OthersResult from '../components/othersResult/index.vue' import Reexamination from '../components/reexamination/index.vue' import Charge from '../components/charge/index.vue' import Combination from '../components/combination/index.vue' import Clinical from '../components/clinical/index.vue' import Sample from '../components/sample/index.vue' +import OtherInformation from '../components/otherInformation/index.vue' import ResultGraph from '../components/resultGraph/index.vue' import { getNextNumber, getPreviousNumber } from "@/utils/getNextNumber"; import { useCommonStore } from '@/store/modules/commonStore'; @@ -174,23 +172,25 @@ const tabList = ref([ { label: '标本列表', value: 'LabPatList' }, { label: '结果图形', value: 'ResultGraph' }, { label: '历史对照', value: 'History' }, - { label: '其他结果', value: 'Others' }, + { label: '其他结果', value: 'OthersResult' }, { label: '结果复查', value: 'Reexamination' }, { label: '收费信息', value: 'Charge' }, { label: '组合项目', value: 'Combination' }, { label: '临床意义', value: 'Clinical' }, { label: '样本流转', value: 'Sample' }, + { label: '其他信息', value: 'OtherInformation' }, ]) const activeTabMap = { ResultGraph, History, - Others, + OthersResult, Reexamination, Charge, Combination, Clinical, - Sample + Sample, + OtherInformation } const activeTabName = computed(() => activeTabMap[activeTab.value as keyof typeof activeTabMap] || 'LabPatList'); diff --git a/src/views/regional/inspectionReport/report/index.vue b/src/views/regional/inspectionReport/report/index.vue index 598371e..93e6c8d 100644 --- a/src/views/regional/inspectionReport/report/index.vue +++ b/src/views/regional/inspectionReport/report/index.vue @@ -544,7 +544,15 @@ const rightTableConfig = ref( ) const formatJgbz = (v: string) => { - return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : '' + const jgbzMap = { + 'H': '高', + 'L': '低', + 'N': '阴性', + 'P': '阳性', + 'Q': '弱阳性', + 'M': '正常' + }; + return jgbzMap[v as keyof typeof jgbzMap] ?? ''; } const expertComment = ref('')