From 1863b7ded60ee0f3f6bc5cb1bd0922091c00e44d Mon Sep 17 00:00:00 2001 From: wuyy Date: Mon, 14 Sep 2026 17:02:02 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directive/common/numberWheel.ts | 16 ++++++++++++++++ src/directive/index.ts | 4 +++- src/views/blood/clinical/index.vue | 4 ++-- src/views/blood/crossMatching/index.vue | 6 +++--- src/views/doctor/components/PatientLisTable.vue | 4 ++-- 5 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 src/directive/common/numberWheel.ts diff --git a/src/directive/common/numberWheel.ts b/src/directive/common/numberWheel.ts new file mode 100644 index 0000000..42cf3fa --- /dev/null +++ b/src/directive/common/numberWheel.ts @@ -0,0 +1,16 @@ +/** +*禁止鼠标滚轮滚动 +*v-number-wheel +*/ +export default { + mounted(el: HTMLElement) { + const inputDom = el.querySelector('input') + if (!inputDom) return + + inputDom.addEventListener('wheel', (e: WheelEvent) => { + if (document.activeElement === inputDom) { + e.preventDefault() + } + }, { passive: false }) + } +} diff --git a/src/directive/index.ts b/src/directive/index.ts index c7b7a86..6cd5b2d 100644 --- a/src/directive/index.ts +++ b/src/directive/index.ts @@ -2,9 +2,11 @@ import { App } from 'vue' import hasRole from './permission/hasRole' import hasPermi from './permission/hasPermi' import copyText from './common/copyText' +import numberWheel from './common/numberWheel' -export default function directive(app: App){ +export default function directive(app: App) { app.directive('hasRole', hasRole) app.directive('hasPermi', hasPermi) app.directive('copyText', copyText) + app.directive('numberWheel', numberWheel) } diff --git a/src/views/blood/clinical/index.vue b/src/views/blood/clinical/index.vue index bd3f44b..64c97a8 100644 --- a/src/views/blood/clinical/index.vue +++ b/src/views/blood/clinical/index.vue @@ -628,8 +628,8 @@ const setMatchTable = (row) => { matchTable.value.push({ ...row.xkBloodInfo, price: row.price, - match_method: '006', - check_method: '002', + match_method: row.match_method, + check_method: row.check_method, result: '001', }) matchTable.value.forEach((item, index) => { diff --git a/src/views/blood/crossMatching/index.vue b/src/views/blood/crossMatching/index.vue index 9017198..15a06ce 100644 --- a/src/views/blood/crossMatching/index.vue +++ b/src/views/blood/crossMatching/index.vue @@ -678,12 +678,12 @@ const getBloodInfo = (row) => { const setMatchTable = (row) => { matchTable.value.push({ - ...row, + ...row.xkBloodInfo, second_match_medic: '', offer_affirm_abo: row.blood_type, check_offer_rh: row.rh_blood_type, - match_method: '006', - check_method: '002', + match_method: row.xkBloodBreed.blood_kind == '0002' ? '006' : '',//红细胞 设置默认值 + check_method: row.xkBloodBreed.blood_kind == '0002' ? '002' : '', first_side: 'N', second_side: 'N', result: '001', diff --git a/src/views/doctor/components/PatientLisTable.vue b/src/views/doctor/components/PatientLisTable.vue index e90c652..68a8741 100644 --- a/src/views/doctor/components/PatientLisTable.vue +++ b/src/views/doctor/components/PatientLisTable.vue @@ -4,7 +4,7 @@