|
|
@@ -6,10 +6,19 @@ import {
|
|
|
useLiftingRestrictions,
|
|
|
usePatientList
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
+import {
|
|
|
+ FunctionList
|
|
|
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/emr-function/useEmrFunction";
|
|
|
|
|
|
const userInfo = useUserStore().userInfo
|
|
|
|
|
|
-const buttonList = ref<{ name: string, click: Function, disabled?: boolean }[]>([])
|
|
|
+const buttonList = ref<FunctionList[]>([])
|
|
|
+
|
|
|
+function handleClick(item: FunctionList) {
|
|
|
+ if (item.click && !(item.disabled ?? false)) {
|
|
|
+ item.click(item)
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
emrMitt.on('setHeaderFunction', (value) => {
|
|
|
buttonList.value = value
|
|
|
@@ -21,8 +30,9 @@ emrMitt.on('setHeaderFunction', (value) => {
|
|
|
<div class="mac_left">
|
|
|
<div class="mac_item"
|
|
|
v-for="item in buttonList">
|
|
|
- <button @click="item.click"
|
|
|
- :disabled="item.disabled ?? false">
|
|
|
+ <button
|
|
|
+ @click="handleClick(item)"
|
|
|
+ :disabled="item.disabled ?? false">
|
|
|
{{ item.name }}
|
|
|
</button>
|
|
|
</div>
|
|
|
@@ -54,8 +64,6 @@ emrMitt.on('setHeaderFunction', (value) => {
|
|
|
|
|
|
<style lang="scss">
|
|
|
.mac_header {
|
|
|
- --system-color-light-hsl: 240, 24%, 100%;
|
|
|
- --system-color-dark-hsl: 240, 3%, 11%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
width: 100%;
|
|
|
@@ -112,11 +120,9 @@ emrMitt.on('setHeaderFunction', (value) => {
|
|
|
position: relative;
|
|
|
user-select: none;
|
|
|
appearance: none;
|
|
|
- cursor: var(--system-cursor-default), auto;
|
|
|
background-color: transparent;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
|
|
|
-
|
|
|
&:hover {
|
|
|
background: #4169E1;
|
|
|
color: white;
|