|
@@ -17,12 +17,12 @@ import {
|
|
|
isCourse,
|
|
|
patientInfo,
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
-import { stringNotBlank } from "@/utils/blank-utils";
|
|
|
import { ElMessageBox } from "element-plus";
|
|
|
import { parsingFragmentDataElements } from "@/utils/emr/emr-init-v2";
|
|
|
import { Install } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/plugins";
|
|
|
import { defineAsyncComponent } from "vue";
|
|
|
import env from "@/utils/setting";
|
|
|
+import { getInternalByCode, getViewById } from "@/utils/emr/emrUtils";
|
|
|
|
|
|
const GenerateSignature = defineAsyncComponent(
|
|
|
() =>
|
|
@@ -185,37 +185,6 @@ const GenerateSignatureDialog = defineComponent({
|
|
|
|
|
|
const us = useUserStore().userInfo;
|
|
|
|
|
|
-export function getInternalByCode(
|
|
|
- editor: EditType,
|
|
|
- name: string,
|
|
|
- code: "internal" | "business" = "internal",
|
|
|
- removeNotNull = true
|
|
|
-): DataElementItem[] {
|
|
|
- const signatureControl = editor.getDataElements(code, false, true);
|
|
|
- let data = signatureControl[name] as DataElementItem[];
|
|
|
- if (!data) {
|
|
|
- return [];
|
|
|
- }
|
|
|
- if (!XEUtils.isArray(data)) {
|
|
|
- data = [data];
|
|
|
- }
|
|
|
- if (removeNotNull) {
|
|
|
- // 移出不为空的数据
|
|
|
- XEUtils.remove(data, item => {
|
|
|
- return stringNotBlank(item.value);
|
|
|
- });
|
|
|
- }
|
|
|
- return data;
|
|
|
-}
|
|
|
-
|
|
|
-function getViewById(editor: EditType, id: string) {
|
|
|
- const find = editor.view.container.find(`#${id}`);
|
|
|
- if (XEUtils.isEmpty(find)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- return find[0];
|
|
|
-}
|
|
|
-
|
|
|
function dialog() {
|
|
|
let tmpClose = (_value: CloseValue, _data) => {};
|
|
|
let value: DialogState;
|