|
@@ -8,12 +8,14 @@ import {
|
|
|
RefreshRight,
|
|
|
SortDown,
|
|
|
Avatar,
|
|
|
- FolderChecked
|
|
|
+ FolderChecked,
|
|
|
+ Unlock,
|
|
|
+ UserFilled
|
|
|
} from "@element-plus/icons-vue";
|
|
|
import {
|
|
|
emrConfig,
|
|
|
emrMitt,
|
|
|
- query,
|
|
|
+ query, useLiftingRestrictions, usePatientList,
|
|
|
useRecoveryEmr
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
import {
|
|
@@ -21,13 +23,12 @@ import {
|
|
|
Button,
|
|
|
PopoverButton
|
|
|
} from "./useEmrFunction";
|
|
|
-import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
import {
|
|
|
emrRootContextKey
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-func/useEmrStore";
|
|
|
import {useSystemStore} from "@/pinia/system-store";
|
|
|
import {RevisionShowMode} from "@/utils/emr/emr-init-v2";
|
|
|
-import XEUtils from "xe-utils";
|
|
|
+import {isDev} from "@/utils/public";
|
|
|
|
|
|
interface EmrFunctionListProps {
|
|
|
openRecovery: Function;
|
|
@@ -41,7 +42,8 @@ const props = defineProps<EmrFunctionListProps>()
|
|
|
let zoom = 1;
|
|
|
|
|
|
const size = useSystemStore().userConfig.emr_size
|
|
|
-const buttonSize = size === 'default' ? '28px' : '48px'
|
|
|
+const buttonSize = size === 'default' ? '28px' : '49px'
|
|
|
+const useFunctionLayout = ref<FunctionList[]>([])
|
|
|
|
|
|
const emits = defineEmits(['update:isOpenPage', 'update:reviewMode'])
|
|
|
|
|
@@ -50,8 +52,8 @@ function setRevisionShowMode(value: number) {
|
|
|
emrMitt.emit('editor')?.setRevisionShowMode(value);
|
|
|
}
|
|
|
|
|
|
-const businessFunctions = [
|
|
|
- {
|
|
|
+const emrFunction: { [key: string]: FunctionList } = {
|
|
|
+ baocun: {
|
|
|
iconfontName: 'baocun',
|
|
|
title: '保存正在编写的电子病历 快捷键 Ctrl + S',
|
|
|
name: '保存',
|
|
@@ -60,7 +62,7 @@ const businessFunctions = [
|
|
|
emrMitt.emit('clickSaveData')
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
+ tijiao: {
|
|
|
iconfontName: 'tijiao',
|
|
|
title: '标识病历为提交,提交不是保存,该功能只是在病历的前面加上一个🔒的样式',
|
|
|
name: '提交',
|
|
@@ -69,7 +71,7 @@ const businessFunctions = [
|
|
|
emrMitt.emit('clickToSubmitTheMedicalRecord')
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
+ shenhe: {
|
|
|
iconfontName: 'huizhenshenqing',
|
|
|
title: "由上级医生点击,上级医生审核完成病历后需要点击该按钮。",
|
|
|
name: '审核',
|
|
@@ -78,7 +80,7 @@ const businessFunctions = [
|
|
|
emrMitt.emit('auditClick')
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
+ shanchu: {
|
|
|
iconfontName: <Delete/>,
|
|
|
title: '删除当前病历,可在回收站恢复,出院患者无法删除,需要把出院患者召回才行',
|
|
|
name: '删除',
|
|
@@ -87,14 +89,14 @@ const businessFunctions = [
|
|
|
emrMitt.emit('clickDelete')
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
+ huanyuan: {
|
|
|
iconfontName: 'huanyuan',
|
|
|
title: '还原当前病历上一次保存的状态',
|
|
|
name: '还原',
|
|
|
disabled: !emrConfig.value.editor,
|
|
|
- click: props.openRecovery,
|
|
|
+ click: () => props.openRecovery(),
|
|
|
},
|
|
|
- {
|
|
|
+ huishouzhan: {
|
|
|
iconfontName: 'huifushanchu',
|
|
|
title: '恢复已被删除的病历',
|
|
|
name: '回收站',
|
|
@@ -102,164 +104,174 @@ const businessFunctions = [
|
|
|
click() {
|
|
|
useRecoveryEmr()
|
|
|
},
|
|
|
- }
|
|
|
-];
|
|
|
-
|
|
|
-const functionList = ref<FunctionList[][]>([
|
|
|
- [
|
|
|
- {
|
|
|
- name: '数据同步',
|
|
|
- title: "数据同步,患者基本信息只会在空的时候填充,从病历提取的数据会强制替换,如入院诊断,鼠标右键可选择性填充数据",
|
|
|
- iconfontName: 'tongbu',
|
|
|
- disabled: !emrConfig.value.editor,
|
|
|
- click() {
|
|
|
- emrMitt.emit('syncEmrPatientData')
|
|
|
- },
|
|
|
- contextmenu() {
|
|
|
- emrMitt.emit('selectFill')
|
|
|
- },
|
|
|
+ },
|
|
|
+ shujutongbu: {
|
|
|
+ name: '数据同步',
|
|
|
+ title: "数据同步,患者基本信息只会在空的时候填充,从病历提取的数据会强制替换,如入院诊断,鼠标右键可选择性填充数据",
|
|
|
+ iconfontName: 'tongbu',
|
|
|
+ disabled: !emrConfig.value.editor,
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('syncEmrPatientData')
|
|
|
},
|
|
|
- {
|
|
|
- title: window.indexedDB ? '病历暂存点击后页面刷新不会导致病历消失,重新打开病历会自动触发恢复的方法。' : '你的电脑不支持暂存',
|
|
|
- iconfontName: <FolderChecked/>,
|
|
|
- name: '暂存',
|
|
|
- disabled: !window.indexedDB,
|
|
|
- click() {
|
|
|
- root?.store.cache.saveCache()
|
|
|
- }
|
|
|
- }
|
|
|
- ],
|
|
|
- businessFunctions,
|
|
|
- [
|
|
|
- {
|
|
|
- iconfontName: <RefreshLeft/>,
|
|
|
- title: '撤销 快捷键 Ctrl + Z',
|
|
|
- name: '撤销',
|
|
|
- click() {
|
|
|
- emrMitt.emit('editor')!.execute('undo')
|
|
|
- }
|
|
|
+ contextmenu() {
|
|
|
+ emrMitt.emit('selectFill')
|
|
|
},
|
|
|
- {
|
|
|
- iconfontName: <RefreshRight/>,
|
|
|
- title: '重做 快捷键 Ctrl + Y',
|
|
|
- name: '重做',
|
|
|
- click() {
|
|
|
- emrMitt.emit('editor')!.execute('redo')
|
|
|
- }
|
|
|
+ },
|
|
|
+ zancun: {
|
|
|
+ title: window.indexedDB ? '病历暂存点击后页面刷新不会导致病历消失,重新打开病历会自动触发恢复的方法。' : '你的电脑不支持暂存',
|
|
|
+ iconfontName: <FolderChecked/>,
|
|
|
+ name: '暂存',
|
|
|
+ disabled: !window.indexedDB,
|
|
|
+ click() {
|
|
|
+ root?.store.cache.saveCache()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ chexiao: {
|
|
|
+ iconfontName: <RefreshLeft/>,
|
|
|
+ title: '撤销 快捷键 Ctrl + Z',
|
|
|
+ name: '撤销',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('editor')!.execute('undo')
|
|
|
}
|
|
|
- ],
|
|
|
- [
|
|
|
- {
|
|
|
- title: "",
|
|
|
- name: '审阅',
|
|
|
- iconfontName: 'shenyue',
|
|
|
- dropdown: [
|
|
|
- {
|
|
|
- name: '嵌入模式',
|
|
|
- title: '开启后会在病历中会有其他医生的修改痕迹,默认开启',
|
|
|
- click() {
|
|
|
- setRevisionShowMode(RevisionShowMode.嵌入)
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- name: '卡片模式',
|
|
|
- title: '病历右侧会以列表的形式显示 添加,删除,更新的记录,可以通过该模式消除痕迹,选择 √ 或 X即可。',
|
|
|
- click() {
|
|
|
- setRevisionShowMode(RevisionShowMode.卡片)
|
|
|
- }
|
|
|
+ },
|
|
|
+ chongzuo: {
|
|
|
+ iconfontName: <RefreshRight/>,
|
|
|
+ title: '重做 快捷键 Ctrl + Y',
|
|
|
+ name: '重做',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('editor')!.execute('redo')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ shenyue: {
|
|
|
+ title: "",
|
|
|
+ name: '审阅',
|
|
|
+ iconfontName: 'shenyue',
|
|
|
+ dropdown: [
|
|
|
+ {
|
|
|
+ name: '嵌入模式',
|
|
|
+ title: '开启后会在病历中会有其他医生的修改痕迹,默认开启',
|
|
|
+ click() {
|
|
|
+ setRevisionShowMode(RevisionShowMode.嵌入)
|
|
|
}
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- iconfontName: <Printer/>,
|
|
|
- title: "",
|
|
|
- name: '打印',
|
|
|
- click() {
|
|
|
- emrMitt.emit('getEditMain')?.print()
|
|
|
},
|
|
|
- dropdown: [
|
|
|
- {
|
|
|
- name: '页面',
|
|
|
- title: '页面打印',
|
|
|
- click() {
|
|
|
- emrMitt.emit('getEditMain')?.print()
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- name: '服务',
|
|
|
- title: '服务打印',
|
|
|
- click() {
|
|
|
- emrMitt.emit('getEditMain')?.print('server')
|
|
|
- }
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- iconfontName: <ZoomIn/>,
|
|
|
- title: '放大病历',
|
|
|
- name: '放大',
|
|
|
- click() {
|
|
|
- emrMitt.emit('editor')!.execute('zoom', {value: zoom += 0.1})
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- iconfontName: <ZoomOut/>,
|
|
|
- title: '缩小病历',
|
|
|
- name: '缩小',
|
|
|
- click() {
|
|
|
- emrMitt.emit('editor')!.execute('zoom', {value: zoom -= 0.1})
|
|
|
- }
|
|
|
- },
|
|
|
- ],
|
|
|
- [
|
|
|
- {
|
|
|
- iconfontName: <SortDown/>,
|
|
|
- title: '仅在病程记录中生效,根据病程记录的时间来进行排序,从小到大。',
|
|
|
- name: '排序',
|
|
|
- click() {
|
|
|
- emrMitt.emit('diseaseCourseSequencing')
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- iconfontName: 'chaifenyemian',
|
|
|
- title: "为页面添加分页标识符,分页符后强制为新页面。",
|
|
|
- name: '分页符',
|
|
|
- click() {
|
|
|
- emrMitt.emit('editor')!.execute('insertContents', {value: [{type: 'pagebreak'}]})
|
|
|
+ {
|
|
|
+ name: '卡片模式',
|
|
|
+ title: '病历右侧会以列表的形式显示 添加,删除,更新的记录,可以通过该模式消除痕迹,选择 √ 或 X即可。',
|
|
|
+ click() {
|
|
|
+ setRevisionShowMode(RevisionShowMode.卡片)
|
|
|
+ }
|
|
|
}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ daying: {
|
|
|
+ iconfontName: <Printer/>,
|
|
|
+ title: "",
|
|
|
+ name: '打印',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('getEditMain')?.print()
|
|
|
},
|
|
|
- {
|
|
|
- iconfontName: 'xianshifenye',
|
|
|
- title: '病历中显示分页',
|
|
|
- name: '显示分页',
|
|
|
- activation: false,
|
|
|
- click(value) {
|
|
|
- value.activation = !value.activation
|
|
|
- emits('update:isOpenPage', value.activation)
|
|
|
- emrMitt.emit('editor')!.setPaginate(value.activation)
|
|
|
- }
|
|
|
+ dropdown: [
|
|
|
+ {
|
|
|
+ name: '页面',
|
|
|
+ title: '页面打印',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('getEditMain')?.print()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '服务',
|
|
|
+ title: '服务打印',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('getEditMain')?.print('server')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ fangda: {
|
|
|
+ iconfontName: <ZoomIn/>,
|
|
|
+ title: '放大病历',
|
|
|
+ name: '放大',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('editor')!.execute('zoom', {value: zoom += 0.1})
|
|
|
}
|
|
|
- ],
|
|
|
- [
|
|
|
- {
|
|
|
- title: "点击可以打开聊天室",
|
|
|
- name: '聊天室',
|
|
|
- iconfontName: <Avatar/>,
|
|
|
- click() {
|
|
|
- emrMitt.emit('openChatRoom')
|
|
|
- }
|
|
|
+ },
|
|
|
+ suoxiao: {
|
|
|
+ iconfontName: <ZoomOut/>,
|
|
|
+ title: '缩小病历',
|
|
|
+ name: '缩小',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('editor')!.execute('zoom', {value: zoom -= 0.1})
|
|
|
}
|
|
|
- ]
|
|
|
-]);
|
|
|
+ },
|
|
|
+ bingchengjilupaixu: {
|
|
|
+ iconfontName: <SortDown/>,
|
|
|
+ title: '仅在病程记录中生效,根据病程记录的时间来进行排序,从小到大。',
|
|
|
+ name: '排序',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('diseaseCourseSequencing')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fenyefu: {
|
|
|
+ iconfontName: 'chaifenyemian',
|
|
|
+ title: "为页面添加分页标识符,分页符后强制为新页面。",
|
|
|
+ name: '分页符',
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('editor')!.execute('insertContents', {value: [{type: 'pagebreak'}]})
|
|
|
+ }
|
|
|
+ },
|
|
|
+ xianshifenyefu: {
|
|
|
+ iconfontName: 'xianshifenye',
|
|
|
+ title: '病历中显示分页',
|
|
|
+ name: '显示分页',
|
|
|
+ activation: false,
|
|
|
+ click(value: FunctionList) {
|
|
|
+ value.activation = !value.activation
|
|
|
+ emits('update:isOpenPage', value.activation)
|
|
|
+ emrMitt.emit('editor')!.setPaginate(value.activation)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ liaotianshi: {
|
|
|
+ title: "点击可以打开聊天室",
|
|
|
+ name: '聊天室',
|
|
|
+ iconfontName: <Avatar/>,
|
|
|
+ click() {
|
|
|
+ emrMitt.emit('openChatRoom')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ jiesuobinglixianzhi: {
|
|
|
+ title: '解锁病历限制',
|
|
|
+ name: '解锁限制',
|
|
|
+ iconfontName: <Unlock/>,
|
|
|
+ click() {
|
|
|
+ useLiftingRestrictions()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ huanzheliebiao: {
|
|
|
+ title: '患者列表',
|
|
|
+ name: '患者列表',
|
|
|
+ iconfontName: <UserFilled/>,
|
|
|
+ click() {
|
|
|
+ usePatientList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- const data = []
|
|
|
+if (isDev) {
|
|
|
+ let a: any = {};
|
|
|
+ for (let emrFunctionElement in emrFunction) {
|
|
|
+ a[emrFunctionElement] = emrFunction[emrFunctionElement].name
|
|
|
+ }
|
|
|
+ console.log(a)
|
|
|
+}
|
|
|
|
|
|
- functionList.value.forEach((item) => {
|
|
|
- data.push(...item)
|
|
|
+onMounted(() => {
|
|
|
+ const data: FunctionList[] = [];
|
|
|
+ const layout = useSystemStore().userConfig.emr_function_layout.split(",")
|
|
|
+ layout.forEach(item => {
|
|
|
+ data.push(emrFunction[item])
|
|
|
})
|
|
|
-
|
|
|
- emrMitt.emit('setHeaderFunction', data)
|
|
|
+ useFunctionLayout.value = data
|
|
|
+ emrMitt.emit('setHeaderFunction', useFunctionLayout.value)
|
|
|
})
|
|
|
|
|
|
|
|
@@ -269,24 +281,17 @@ onMounted(() => {
|
|
|
<div
|
|
|
class="emr_function-content">
|
|
|
<el-scrollbar>
|
|
|
- <template v-for="(item , itemIndex) in functionList">
|
|
|
- <div class="emr_function-action-group"
|
|
|
- :style="{marginTop:itemIndex === 0 ? 0 : null}"
|
|
|
- >
|
|
|
- <div
|
|
|
- v-for="(child,index) in item"
|
|
|
- v-title="child.title"
|
|
|
- >
|
|
|
- <PopoverButton
|
|
|
- v-if="child.dropdown && child.dropdown.length >0"
|
|
|
- :child="child"
|
|
|
- :index="index"
|
|
|
- />
|
|
|
- <Button
|
|
|
- v-else
|
|
|
- :child="child"
|
|
|
- :index="index"/>
|
|
|
- </div>
|
|
|
+ <template v-for="(item,itemIndex) in useFunctionLayout">
|
|
|
+ <div class="button_item">
|
|
|
+ <PopoverButton
|
|
|
+ v-if="item.dropdown && item.dropdown.length >0"
|
|
|
+ :child="item"
|
|
|
+ :index="itemIndex"
|
|
|
+ />
|
|
|
+ <Button
|
|
|
+ v-else
|
|
|
+ :child="item"
|
|
|
+ :index="itemIndex"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-scrollbar>
|
|
@@ -298,55 +303,78 @@ onMounted(() => {
|
|
|
width: max-content;
|
|
|
background-color: white;
|
|
|
padding: 4px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ height: 100%;
|
|
|
+ cursor: pointer;
|
|
|
|
|
|
- .emr_function-action-group {
|
|
|
- margin: 8px 0;
|
|
|
+ .el-button:hover {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ }
|
|
|
|
|
|
- .el-button:hover {
|
|
|
- background-color: #f5f7fa;
|
|
|
- }
|
|
|
+ .el-button:active {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ border: 1px solid var(--el-border-color);
|
|
|
+ }
|
|
|
|
|
|
- .el-button:active {
|
|
|
- background-color: #f5f7fa;
|
|
|
- border: 1px solid var(--el-border-color);
|
|
|
- }
|
|
|
+ button {
|
|
|
+ width: v-bind(buttonSize);
|
|
|
+ height: v-bind(buttonSize);
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 5px;
|
|
|
+ border-radius: 0;
|
|
|
|
|
|
- .emr-function-button-upright {
|
|
|
+ &.activation {
|
|
|
+ background-color: var(--el-button-hover-bg-color);
|
|
|
+ color: var(--el-button-active-border-color);
|
|
|
+ }
|
|
|
|
|
|
- > span {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- height: 100%;
|
|
|
- cursor: pointer;
|
|
|
+ .el-icon {
|
|
|
+ i {
|
|
|
+ width: 16px;
|
|
|
+ height: 12px;
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .el-icon {
|
|
|
- margin-bottom: 6px;
|
|
|
- }
|
|
|
+ // 显示文字就要竖着排列
|
|
|
+ .emr-function-button-upright {
|
|
|
+ > span {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ height: 100%;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
|
|
|
- button {
|
|
|
- width: v-bind(buttonSize);
|
|
|
- height: v-bind(buttonSize);
|
|
|
- font-size: 12px;
|
|
|
- padding: 5px;
|
|
|
- border-radius: 0;
|
|
|
+ .el-icon {
|
|
|
+ margin-bottom: 6px;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- &.activation {
|
|
|
- background-color: var(--el-button-hover-bg-color);
|
|
|
- color: var(--el-button-active-border-color);
|
|
|
- }
|
|
|
+ button {
|
|
|
+ width: v-bind(buttonSize);
|
|
|
+ height: v-bind(buttonSize);
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 5px;
|
|
|
+ border-radius: 0;
|
|
|
|
|
|
- .el-icon {
|
|
|
- i {
|
|
|
- width: 16px;
|
|
|
- height: 12px;
|
|
|
- }
|
|
|
+ &.activation {
|
|
|
+ background-color: var(--el-button-hover-bg-color);
|
|
|
+ color: var(--el-button-active-border-color);
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-icon {
|
|
|
+ i {
|
|
|
+ width: 16px;
|
|
|
+ height: 12px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.el-popper.emr_function-popper {
|