|
|
@ -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"> |
|
|
@ -22,7 +22,7 @@ |
|
|
@click="btnPacsResult(scope.row, scope.$index)" :disabled="rowResultDisabled(scope.row)" |
|
|
@click="btnPacsResult(scope.row, scope.$index)" :disabled="rowResultDisabled(scope.row)" |
|
|
size="small">P</el-button> |
|
|
size="small">P</el-button> |
|
|
<el-button style="min-width: 23px; padding: 5.8px; margin-left: 2px" |
|
|
<el-button style="min-width: 23px; padding: 5.8px; margin-left: 2px" |
|
|
:disabled="rowResultDisabled(scope.row)" @click="btnPacsRessulst(scope.row)" size="small">S</el-button> |
|
|
|
|
|
|
|
|
:disabled="rowResultDisabled(scope.row)" @click="btnPacsRessulst(scope.row)" size="small">S</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -90,7 +90,7 @@ |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
height: 300px; |
|
|
height: 300px; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
display: ${LocalConfig.doctorCheck.resultModeDisp||'flex'}; |
|
|
|
|
|
|
|
|
display: ${LocalConfig.doctorCheck.resultModeDisp || 'flex'}; |
|
|
flex-wrap: wrap; |
|
|
flex-wrap: wrap; |
|
|
align-content: flex-start;` |
|
|
align-content: flex-start;` |
|
|
"> |
|
|
"> |
|
|
@ -193,7 +193,7 @@ export default { |
|
|
components: { |
|
|
components: { |
|
|
PacsTemplate, |
|
|
PacsTemplate, |
|
|
}, |
|
|
}, |
|
|
props: ["isCheckPicture", "registerCheckId", "doctor_check_check_charge","refParams"], |
|
|
|
|
|
|
|
|
props: ["isCheckPicture", "registerCheckId", "doctor_check_check_charge", "refParams"], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
pagePriv: { |
|
|
pagePriv: { |
|
|
@ -228,7 +228,7 @@ export default { |
|
|
currentRow: -1, //当前操作的行 |
|
|
currentRow: -1, //当前操作的行 |
|
|
|
|
|
|
|
|
dialogWinMoreResult: false, |
|
|
dialogWinMoreResult: false, |
|
|
dialogWinMoreResultTimes:0, // 控制避免多次开启监听 |
|
|
|
|
|
|
|
|
dialogWinMoreResultTimes: 0, // 控制避免多次开启监听 |
|
|
dialogWinPacsTemplate: false, |
|
|
dialogWinPacsTemplate: false, |
|
|
moreResult: { |
|
|
moreResult: { |
|
|
data: [], |
|
|
data: [], |
|
|
@ -266,8 +266,8 @@ export default { |
|
|
isSelectAll: 'N', // 录入结果时,是否全选 |
|
|
isSelectAll: 'N', // 录入结果时,是否全选 |
|
|
pacsDescFontSize: "14px", //描述内容的字体大小 |
|
|
pacsDescFontSize: "14px", //描述内容的字体大小 |
|
|
isSplitChooseResult: "Y", // 选结果时,是否自动加上分隔符 |
|
|
isSplitChooseResult: "Y", // 选结果时,是否自动加上分隔符 |
|
|
hisItemRight:0, // 历史检查明细右边边距 |
|
|
|
|
|
resultModeDisp:'flex', // flex 紧凑排列;block 一行一个 |
|
|
|
|
|
|
|
|
hisItemRight: 0, // 历史检查明细右边边距 |
|
|
|
|
|
resultModeDisp: 'flex', // flex 紧凑排列;block 一行一个 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -330,11 +330,11 @@ export default { |
|
|
this.userInfo.userId = window.sessionStorage.getItem("userId") || null; |
|
|
this.userInfo.userId = window.sessionStorage.getItem("userId") || null; |
|
|
this.userInfo.user = window.sessionStorage.getItem("user") || null; |
|
|
this.userInfo.user = window.sessionStorage.getItem("user") || null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 销毁前 |
|
|
// 销毁前 |
|
|
beforeDestroy(){ |
|
|
|
|
|
|
|
|
beforeDestroy() { |
|
|
if (this.$peisAPI) { |
|
|
if (this.$peisAPI) { |
|
|
try { |
|
|
try { |
|
|
// 取消 身高体重仪、血压仪 监听 |
|
|
// 取消 身高体重仪、血压仪 监听 |
|
|
@ -757,14 +757,14 @@ export default { |
|
|
this.moreResult.result = row.result; |
|
|
this.moreResult.result = row.result; |
|
|
this.moreResult.defaultResult = row.defaultResult; |
|
|
this.moreResult.defaultResult = row.defaultResult; |
|
|
this.moreResult.index = index; |
|
|
this.moreResult.index = index; |
|
|
if(!row?.result){ |
|
|
|
|
|
|
|
|
if (!row?.result) { |
|
|
this.selection.start = 0 |
|
|
this.selection.start = 0 |
|
|
this.selection.end = 0 |
|
|
this.selection.end = 0 |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
this.selection.start = row.result.length |
|
|
this.selection.start = row.result.length |
|
|
this.selection.end = row.result.length |
|
|
this.selection.end = row.result.length |
|
|
} |
|
|
} |
|
|
console.log('显示模板初始光标',this.selection) |
|
|
|
|
|
|
|
|
console.log('显示模板初始光标', this.selection) |
|
|
// "itemId": "3a0c517f-cbdb-9fff-e300-1f76b3e47580", |
|
|
// "itemId": "3a0c517f-cbdb-9fff-e300-1f76b3e47580", |
|
|
// "result": "00000", |
|
|
// "result": "00000", |
|
|
// "diagnosisId": "3a0ed8a2-72d9-ee50-78aa-5b1f474f2921", |
|
|
// "diagnosisId": "3a0ed8a2-72d9-ee50-78aa-5b1f474f2921", |
|
|
@ -776,11 +776,11 @@ export default { |
|
|
this.dialogWinMoreResult = true; |
|
|
this.dialogWinMoreResult = true; |
|
|
|
|
|
|
|
|
// 监听结果模板 点击时 光标位置 |
|
|
// 监听结果模板 点击时 光标位置 |
|
|
if(this.dialogWinMoreResultTimes == 0){ |
|
|
|
|
|
|
|
|
if (this.dialogWinMoreResultTimes == 0) { |
|
|
this.watchSelection(); |
|
|
this.watchSelection(); |
|
|
this.dialogWinMoreResultTimes++ // 下次打开,则无需重复开启监听 |
|
|
this.dialogWinMoreResultTimes++ // 下次打开,则无需重复开启监听 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -829,22 +829,22 @@ export default { |
|
|
|
|
|
|
|
|
// 单击选择结果模版的结果 |
|
|
// 单击选择结果模版的结果 |
|
|
clickResult(item) { |
|
|
clickResult(item) { |
|
|
let moreResult = this.moreResult.result || '' |
|
|
|
|
|
let resultIsNum = /^[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?$/.test(item.result); |
|
|
|
|
|
|
|
|
let moreResult = this.moreResult.result || '' |
|
|
|
|
|
let resultIsNum = /^[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?$/.test(item.result); |
|
|
// console.log('this.moreResult',JSON.stringify(this.moreResult)) |
|
|
// console.log('this.moreResult',JSON.stringify(this.moreResult)) |
|
|
// console.log('item',item) |
|
|
// console.log('item',item) |
|
|
//点击结果前 == 默认结果 |
|
|
//点击结果前 == 默认结果 |
|
|
|
|
|
|
|
|
if (!moreResult || moreResult == this.moreResult.defaultResult ) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!moreResult || moreResult == this.moreResult.defaultResult) { |
|
|
this.moreResult.result = item.result |
|
|
this.moreResult.result = item.result |
|
|
this.selection.start = item?.result.length||0 |
|
|
|
|
|
|
|
|
this.selection.start = item?.result.length || 0 |
|
|
this.selection.end = this.selection.start |
|
|
this.selection.end = this.selection.start |
|
|
console.log('=默认结果光标',this.selection) |
|
|
|
|
|
}else if(moreResult.includes(item.result) && !resultIsNum){ |
|
|
|
|
|
|
|
|
console.log('=默认结果光标', this.selection) |
|
|
|
|
|
} else if (moreResult.includes(item.result) && !resultIsNum) { |
|
|
// 结果包含已选(且不是数字)时,不作处理 |
|
|
// 结果包含已选(且不是数字)时,不作处理 |
|
|
}else { |
|
|
|
|
|
|
|
|
} else { |
|
|
let choosedResult = item.result |
|
|
let choosedResult = item.result |
|
|
if(this.LocalConfig.doctorCheck.isSplitChooseResult == 'Y') choosedResult = ';' + choosedResult |
|
|
|
|
|
|
|
|
if (this.LocalConfig.doctorCheck.isSplitChooseResult == 'Y') choosedResult = ';' + choosedResult |
|
|
this.insertSymbols(choosedResult) |
|
|
this.insertSymbols(choosedResult) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -976,7 +976,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
//console.log('this.doctorCheck.checkItemList',res.data) |
|
|
//console.log('this.doctorCheck.checkItemList',res.data) |
|
|
this.doctorCheck.checkItemList = res.data; |
|
|
this.doctorCheck.checkItemList = res.data; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.doctorCheck.checkItemList.forEach((e, i) => { |
|
|
this.doctorCheck.checkItemList.forEach((e, i) => { |
|
|
if (this.doctorCheck.RegisterCheckEdit.completeFlag == "0") { |
|
|
if (this.doctorCheck.RegisterCheckEdit.completeFlag == "0") { |
|
|
@ -993,7 +993,7 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 刷新历次明细显示 |
|
|
// 刷新历次明细显示 |
|
|
if(i == 0){ |
|
|
|
|
|
|
|
|
if (i == 0) { |
|
|
this.itemRowClick(e) |
|
|
this.itemRowClick(e) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -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,27 +1124,34 @@ 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"); |
|
|
this.selection.start = input.selectionStart; |
|
|
this.selection.start = input.selectionStart; |
|
|
this.selection.end = input.selectionEnd; |
|
|
this.selection.end = input.selectionEnd; |
|
|
console.log('点击后光标',this.selection) |
|
|
|
|
|
|
|
|
console.log('点击后光标', this.selection) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
watchSelection() { |
|
|
watchSelection() { |
|
|
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(); |
|
|
}); |
|
|
}); |
|
|
@ -1228,7 +1237,7 @@ export default { |
|
|
// 模板右击 |
|
|
// 模板右击 |
|
|
onContextmenuTemplate(event) { |
|
|
onContextmenuTemplate(event) { |
|
|
if (!this.$peisAPI) return |
|
|
if (!this.$peisAPI) return |
|
|
let menus = [ |
|
|
|
|
|
|
|
|
let menus = [ |
|
|
// { label: '测试菜单', itemId: '测试菜单', enabled: true }, |
|
|
// { label: '测试菜单', itemId: '测试菜单', enabled: true }, |
|
|
// { |
|
|
// { |
|
|
// label: '更多操作', |
|
|
// label: '更多操作', |
|
|
@ -1357,7 +1366,7 @@ export default { |
|
|
console.log( |
|
|
console.log( |
|
|
`watch 检查明细 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.refParams.registerCheckId}` |
|
|
`watch 检查明细 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.refParams.registerCheckId}` |
|
|
); |
|
|
); |
|
|
this.getCheckItemList(this.refParams.registerCheckId); |
|
|
|
|
|
|
|
|
this.getCheckItemList(this.refParams.registerCheckId); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|