bug修复
This commit is contained in:
parent
1b1c15113d
commit
1863b7ded6
16
src/directive/common/numberWheel.ts
Normal file
16
src/directive/common/numberWheel.ts
Normal 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 })
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,9 +2,11 @@ import { App } from 'vue'
|
|||||||
import hasRole from './permission/hasRole'
|
import hasRole from './permission/hasRole'
|
||||||
import hasPermi from './permission/hasPermi'
|
import hasPermi from './permission/hasPermi'
|
||||||
import copyText from './common/copyText'
|
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('hasRole', hasRole)
|
||||||
app.directive('hasPermi', hasPermi)
|
app.directive('hasPermi', hasPermi)
|
||||||
app.directive('copyText', copyText)
|
app.directive('copyText', copyText)
|
||||||
|
app.directive('numberWheel', numberWheel)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -628,8 +628,8 @@ const setMatchTable = (row) => {
|
|||||||
matchTable.value.push({
|
matchTable.value.push({
|
||||||
...row.xkBloodInfo,
|
...row.xkBloodInfo,
|
||||||
price: row.price,
|
price: row.price,
|
||||||
match_method: '006',
|
match_method: row.match_method,
|
||||||
check_method: '002',
|
check_method: row.check_method,
|
||||||
result: '001',
|
result: '001',
|
||||||
})
|
})
|
||||||
matchTable.value.forEach((item, index) => {
|
matchTable.value.forEach((item, index) => {
|
||||||
|
|||||||
@ -678,12 +678,12 @@ const getBloodInfo = (row) => {
|
|||||||
|
|
||||||
const setMatchTable = (row) => {
|
const setMatchTable = (row) => {
|
||||||
matchTable.value.push({
|
matchTable.value.push({
|
||||||
...row,
|
...row.xkBloodInfo,
|
||||||
second_match_medic: '',
|
second_match_medic: '',
|
||||||
offer_affirm_abo: row.blood_type,
|
offer_affirm_abo: row.blood_type,
|
||||||
check_offer_rh: row.rh_blood_type,
|
check_offer_rh: row.rh_blood_type,
|
||||||
match_method: '006',
|
match_method: row.xkBloodBreed.blood_kind == '0002' ? '006' : '',//红细胞 设置默认值
|
||||||
check_method: '002',
|
check_method: row.xkBloodBreed.blood_kind == '0002' ? '002' : '',
|
||||||
first_side: 'N',
|
first_side: 'N',
|
||||||
second_side: 'N',
|
second_side: 'N',
|
||||||
result: '001',
|
result: '001',
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<el-table-column label="项目名" prop="item_name" align="center" />
|
<el-table-column label="项目名" prop="item_name" align="center" />
|
||||||
<el-table-column label="结果" prop="item_result" align="center" :show-overflow-tooltip="false">
|
<el-table-column label="结果" prop="item_result" align="center" :show-overflow-tooltip="false">
|
||||||
<template #default="{ row }">
|
<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" />
|
v-if="row.result_type == 'A'" @input="syncParent" />
|
||||||
<el-select v-model="row.item_result" placeholder="" class="full-width-input" allow-create filterable
|
<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">
|
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_name" align="center" />
|
||||||
<el-table-column label="结果" prop="item_result" align="center" :show-overflow-tooltip="false">
|
<el-table-column label="结果" prop="item_result" align="center" :show-overflow-tooltip="false">
|
||||||
<template #default="{ row }">
|
<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" />
|
v-if="row.result_type == 'A'" @input="syncParent" />
|
||||||
<el-select v-model="row.item_result" placeholder="" class="full-width-input" allow-create filterable
|
<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">
|
v-else-if="row.result_type == 'B'" default-first-option clearable @change="syncParent">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user