|
|
|
@ -120,7 +120,7 @@ |
|
|
|
<div> |
|
|
|
<!-- 结果录入模版 --> |
|
|
|
<el-dialog title="结果录入模版" :visible.sync="dialogWinMoreResult" width="800px" :close-on-click-modal="false"> |
|
|
|
<div style="margin-top: -10px"> |
|
|
|
<div style="margin-top: -10px" @contextmenu.prevent="onContextmenuTemplate"> |
|
|
|
<el-checkbox v-model="LocalConfig.doctorCheck.isSplitChooseResult" size="small" true-label="Y" |
|
|
|
false-label="N">选结果模板时自动添加分隔符;</el-checkbox> |
|
|
|
<div style=" |
|
|
|
@ -834,32 +834,22 @@ export default { |
|
|
|
|
|
|
|
// 单击选择结果模版的结果 |
|
|
|
clickResult(item) { |
|
|
|
let result = []; |
|
|
|
let moreResult = this.moreResult.result || '' |
|
|
|
// console.log('this.moreResult',JSON.stringify(this.moreResult)) |
|
|
|
// console.log('item',item) |
|
|
|
//点击结果前 == 默认结果 |
|
|
|
if (this.moreResult.result == this.moreResult.defaultResult) { |
|
|
|
if (!moreResult || moreResult == this.moreResult.defaultResult ) { |
|
|
|
this.moreResult.result = item.result |
|
|
|
} else { |
|
|
|
|
|
|
|
if (this.moreResult.result) result = this.moreResult.result.split(";"); |
|
|
|
// 不用分隔符时,不判断包含关系 |
|
|
|
if (this.LocalConfig.doctorCheck.isSplitChooseResult == "Y" && result.indexOf(item.result) > -1) |
|
|
|
return; |
|
|
|
if (this.LocalConfig.doctorCheck.isSplitChooseResult == "Y" || result.length == 0) { |
|
|
|
result.push(item.result); |
|
|
|
} else { |
|
|
|
result[result.length - 1] = result[result.length - 1] + item.result; |
|
|
|
} |
|
|
|
|
|
|
|
let ret = ""; |
|
|
|
result.forEach((e, i) => { |
|
|
|
let splitStr = ";"; |
|
|
|
if (i == 0) splitStr = ""; |
|
|
|
ret += splitStr + e; |
|
|
|
}); |
|
|
|
this.moreResult.result = ret; |
|
|
|
this.selection.start = length(item.result) - 1 |
|
|
|
this.selection.end = this.selection.start |
|
|
|
}else if(moreResult.includes(item.result)){ |
|
|
|
// 结果包含已选时,不作处理 |
|
|
|
}else { |
|
|
|
let choosedResult = item.result |
|
|
|
if(this.LocalConfig.doctorCheck.isSplitChooseResult == 'Y') choosedResult = ';' + choosedResult |
|
|
|
this.insertSymbols(choosedResult) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 清除结果值 |
|
|
|
@ -1111,7 +1101,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 光标位置插入特殊符号 |
|
|
|
// 光标位置插入特殊符号(插入结果) |
|
|
|
insertSymbols(symbols) { |
|
|
|
let result = this.moreResult.result || ""; |
|
|
|
if (result) { |
|
|
|
@ -1123,8 +1113,8 @@ export default { |
|
|
|
result = symbols; |
|
|
|
} |
|
|
|
this.moreResult.result = result; |
|
|
|
this.selection.start++; |
|
|
|
this.selection.end++; |
|
|
|
this.selection.start = this.selection.start + length(symbols); |
|
|
|
this.selection.end = this.selection.start; |
|
|
|
}, |
|
|
|
// 获取光标位置的函数 |
|
|
|
getCaretPosition() { |
|
|
|
@ -1226,6 +1216,34 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 模板右击 |
|
|
|
onContextmenuTemplate(event) { |
|
|
|
if (!this.$peisAPI) return |
|
|
|
let menus = [ |
|
|
|
{ type: 'separator' }, |
|
|
|
{ label: '显示明细历次结果', itemId: '显示明细历次结果', enabled: true }, |
|
|
|
{ label: '预览影像报告', itemId: '预览影像报告', enabled: true } |
|
|
|
// { label: '测试菜单', itemId: '测试菜单', enabled: true }, |
|
|
|
// { |
|
|
|
// label: '更多操作', |
|
|
|
// submenu: [ |
|
|
|
// { label: '子菜单', itemId: '子菜单', enabled: true } |
|
|
|
// ] |
|
|
|
// } |
|
|
|
] |
|
|
|
|
|
|
|
this.$peisAPI.showContextMenu(menus) |
|
|
|
.then(res => { |
|
|
|
console.log('res', res) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
console.log('err', err) |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
console.log('finally') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 自定义右击事件 |
|
|
|
onContextMenuDIY(data) { |
|
|
|
//this.$message({showClose:true,message:data}) |
|
|
|
|