|
|
@@ -56,7 +56,10 @@
|
|
|
import {huanZheXinXi} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
|
|
|
import {getEmrInpatientData} from "@/api/dictionary/emr-data-maintenance-api";
|
|
|
import EmrSidebar from "@/components/zhu-yuan-yi-sheng/emr/EmrSidebar.vue";
|
|
|
-import {EMRInteractive} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init";
|
|
|
+import {
|
|
|
+ courseOfDisease,
|
|
|
+ EMRInteractive
|
|
|
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init";
|
|
|
import {ElMessageBox} from "element-plus";
|
|
|
import {uuid} from "@/utils/getUuid";
|
|
|
import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
|
@@ -87,6 +90,8 @@ let isEditorChange = $ref(false)
|
|
|
let patientData = $ref({})
|
|
|
// 是否开启审阅模式
|
|
|
let reviewMode = $ref(false)
|
|
|
+// 病程记录定位时间
|
|
|
+let localizationDurationTime = $ref('')
|
|
|
|
|
|
const updateCaseHistoryUrl = (val) => {
|
|
|
let valCode = val.code ? val.code : val.emrCategoryCode;
|
|
|
@@ -211,10 +216,28 @@ const checkEmrChange = (cb) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const nodeClick = (val, templateType) => {
|
|
|
- checkEmrChange(() => {
|
|
|
- updateCaseHistoryUrl(val)
|
|
|
- })
|
|
|
+const nodeClick = (val, parent, templateType) => {
|
|
|
+ if (val.roundTime) {
|
|
|
+ if (documentId === parent.emrDocumentId) {
|
|
|
+ positioningTime(val.value)
|
|
|
+ } else {
|
|
|
+ updateCaseHistoryUrl(parent);
|
|
|
+ localizationDurationTime = val.value
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ checkEmrChange(() => {
|
|
|
+ updateCaseHistoryUrl(val);
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const positioningTime = (val) => {
|
|
|
+ let componentView = currentEmr.value.callMethod('getElementByValue', 'ward_round_time', val);
|
|
|
+ if (componentView) {
|
|
|
+ componentView.focusEnter();
|
|
|
+ currentEmr.value.callMethod('scrollToCursor')
|
|
|
+ currentEmr.value.callMethod('highlight', componentView, 1500)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -228,9 +251,12 @@ const editorEvents = ({name}, fragment) => {
|
|
|
// 设置成编辑模式
|
|
|
currentEmr.value.callMethod('setEditorMode', 'free')
|
|
|
}
|
|
|
- if (categoryCode === "bingchengjiluzhuanyong" && documentId) {
|
|
|
- console.log(currentEmr.value.callMethod('getElementsData'));
|
|
|
- console.log("这个是病程记录")
|
|
|
+ if (localizationDurationTime) {
|
|
|
+ positioningTime(localizationDurationTime)
|
|
|
+ localizationDurationTime = ''
|
|
|
+ }
|
|
|
+ if (categoryCode === courseOfDisease && documentId) {
|
|
|
+ emrSidebarRef.diseaseDurationRecordTime(currentEmr.value.callMethod('getElementsData'));
|
|
|
}
|
|
|
|
|
|
} else if (name === 'contentchange') {
|