From ccc7165298efd0d0546a1deb614e491cafea8f38 Mon Sep 17 00:00:00 2001 From: wyuu Date: Mon, 1 Dec 2025 18:00:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?wsw=E6=A3=80=E9=AA=8C=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/liswork/micro/index.ts | 8 + src/components/Ballpit/index.vue | 511 ++++++++++++++++++ .../liswork/components/history/index.vue | 6 +- src/views/liswork/micro/index.vue | 65 ++- src/views/liswork/micro/labresult/pyj.vue | 2 - .../liswork/work/components/CheckUser.vue | 14 +- .../liswork/work/components/builtDialog.vue | 177 ++++++ .../liswork/work/components/labresult.vue | 152 +----- src/views/login.vue | 144 +++-- 10 files changed, 828 insertions(+), 252 deletions(-) create mode 100644 src/views/liswork/work/components/builtDialog.vue diff --git a/package.json b/package.json index bfbf776..00c114e 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "select2": "^4.1.0-rc.0", "socket.io-client": "^4.8.1", "sortablejs": "^1.14.0", + "three": "^0.181.2", "vue": "3.5.23", "vue-cropper": "1.1.1", "vue-plugin-hiprint": "^0.0.60", diff --git a/src/api/liswork/micro/index.ts b/src/api/liswork/micro/index.ts index 3382b75..65aa33a 100644 --- a/src/api/liswork/micro/index.ts +++ b/src/api/liswork/micro/index.ts @@ -179,4 +179,12 @@ export function cbebCheck(data?: Object) { method: 'get', params: data }) +} +//修改样本检验日期 +export function changepatjyrq(data?: Object) { + return request({ + url: '/lisworkgerm/changepatjyrq', + method: 'get', + params: data + }) } \ No newline at end of file diff --git a/src/components/Ballpit/index.vue b/src/components/Ballpit/index.vue index e69de29..196d08f 100644 --- a/src/components/Ballpit/index.vue +++ b/src/components/Ballpit/index.vue @@ -0,0 +1,511 @@ + + + diff --git a/src/views/liswork/components/history/index.vue b/src/views/liswork/components/history/index.vue index b802622..eff959b 100644 --- a/src/views/liswork/components/history/index.vue +++ b/src/views/liswork/components/history/index.vue @@ -217,9 +217,9 @@ const handleRowClick = (row: any) => { const myEcharts = ref() const getEcharts = (data: any) => { const periods = ['nine', 'eight', 'seven', 'six', 'five', 'four', 'three', 'two', 'one', 'first'] - - const xData = periods.map(period => { return data[`${period}Date`] }).filter(Boolean) //过滤掉空值 - const yData = periods.map(period => { return data[`${period}Csjg`] }).filter(Boolean) + if (!data) return + 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); diff --git a/src/views/liswork/micro/index.vue b/src/views/liswork/micro/index.vue index e67719b..7bff319 100644 --- a/src/views/liswork/micro/index.vue +++ b/src/views/liswork/micro/index.vue @@ -27,8 +27,8 @@ + value-format="YYYY-MM-DD" :clearable="false" @change="jyrqChange" ref="datePickerRef" + style="width:100%" /> @@ -65,12 +65,12 @@ - - @@ -78,7 +78,7 @@ - + @@ -134,8 +134,8 @@ - + @@ -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 @@