bug修复

This commit is contained in:
wuyy 2026-09-14 17:02:02 +08:00
parent 1b1c15113d
commit 1863b7ded6
5 changed files with 26 additions and 8 deletions

View File

@ -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 })
}
}

View File

@ -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)
}

View File

@ -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) => {

View File

@ -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',

View File

@ -4,7 +4,7 @@
<el-table-column label="项目名" prop="item_name" align="center" />
<el-table-column label="结果" prop="item_result" align="center" :show-overflow-tooltip="false">
<template #default="{ row }">
<el-input v-model="row.item_result" placeholder="" type="number" class="full-width-input"
<el-input v-model="row.item_result" v-number-wheel placeholder="" type="number" class="full-width-input"
v-if="row.result_type == 'A'" @input="syncParent" />
<el-select v-model="row.item_result" placeholder="" class="full-width-input" allow-create filterable
v-else-if="row.result_type == 'B'" default-first-option clearable @change="syncParent">
@ -19,7 +19,7 @@
<el-table-column label="项目名" prop="item_name" align="center" />
<el-table-column label="结果" prop="item_result" align="center" :show-overflow-tooltip="false">
<template #default="{ row }">
<el-input v-model="row.item_result" placeholder="" type="number" class="full-width-input"
<el-input v-model="row.item_result" v-number-wheel placeholder="" type="number" class="full-width-input"
v-if="row.result_type == 'A'" @input="syncParent" />
<el-select v-model="row.item_result" placeholder="" class="full-width-input" allow-create filterable
v-else-if="row.result_type == 'B'" default-first-option clearable @change="syncParent">