pengjun 20 hours ago
parent
commit
95986d4724
  1. 15
      src/components/doctorCheck/CheckItemList.vue

15
src/components/doctorCheck/CheckItemList.vue

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<div @contextmenu.prevent="onContextmenu"> <div @contextmenu.prevent="onContextmenu">
<el-table :data="doctorCheck.checkItemList" style="width: 100%" :height="itemTableHeight" border highlight-current-row
@row-click="itemRowClick" @row-dblclick="itemDblClick" size="small">
<el-table :data="doctorCheck.checkItemList" style="width: 100%" :height="itemTableHeight" border
highlight-current-row @row-click="itemRowClick" @row-dblclick="itemDblClick" size="small">
<el-table-column prop="itemName" label="项目" min-width="160" /> <el-table-column prop="itemName" label="项目" min-width="160" />
<el-table-column prop="result" label="结果" min-width="420"> <el-table-column prop="result" label="结果" min-width="420">
<template slot-scope="scope"> <template slot-scope="scope">
@ -1099,7 +1099,9 @@ export default {
// //
input.addEventListener("click", (event) => { input.addEventListener("click", (event) => {
if (this.LocalConfig.doctorCheck.isSelectAll == 'Y') { if (this.LocalConfig.doctorCheck.isSelectAll == 'Y') {
input.select();
//
//input.select();
if(input.getAttribute('placeholder') == "请输入结果值") input.select();
} }
}); });
}); });
@ -1122,6 +1124,7 @@ export default {
this.selection.end = this.selection.start; this.selection.end = this.selection.start;
//console.log('',this.selection) //console.log('',this.selection)
}, },
// //
getCaretPosition() { getCaretPosition() {
let input = document.getElementById("resultBox"); let input = document.getElementById("resultBox");
@ -1134,15 +1137,21 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
let that = this; let that = this;
let resultBox = document.getElementById("resultBox"); // //.inline-input let resultBox = document.getElementById("resultBox"); // //.inline-input
// //
resultBox.addEventListener("click", function (event) { resultBox.addEventListener("click", function (event) {
event.preventDefault(); event.preventDefault();
//
event.target.focus()
// //
that.getCaretPosition(); that.getCaretPosition();
}); });
resultBox.addEventListener("input", function (event) { resultBox.addEventListener("input", function (event) {
event.preventDefault(); event.preventDefault();
//
event.target.focus()
// //
that.getCaretPosition(); that.getCaretPosition();
}); });

Loading…
Cancel
Save