| 
					
				 | 
			
			
				@@ -799,7 +799,7 @@ const clickSaveData = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (stringNotBlank(editor.documentData._id)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const documentSocket = emrMitt.emit('getDocumentSocket') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (documentSocket === null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      await ElMessageBox.alert('未连接上服务器,无法保存', '提示', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      await ElMessageBox.alert('未连接上服务器,无法保存,请刷新页面,或重新打开病历。', '提示', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         type: 'warning' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -937,30 +937,14 @@ const objectValuesCannotBeNull = (object) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 前端打印 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const frontEndPrinting = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  pageIsZoom() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   waitForLoadingToComplete() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (getId() == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    xcMessage.warning('请先保存病历。') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  const document = await hisSaveEmr.loadDocument({documentId: getId()}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  editor.execute("print", { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    value: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      showPreview: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      document 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  editMain.print() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 服务打印 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const servicePrint = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   waitForLoadingToComplete() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  editor.execute("print", { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    value: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      showPreview: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      mode: 'backend' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  editMain.print('server') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1216,6 +1200,18 @@ const courseSegmentLocking = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let courseTitles = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  function editorGetData(value, dataSource, code) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (value === null) return '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (value[dataSource] === null) return '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (value[dataSource].value === null) return '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return value[dataSource]?.value[0][code] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } catch { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   循环病程返回数据元((value, node) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let fragment = node.getAttribute('fragment') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let pushData = { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1225,21 +1221,19 @@ const courseSegmentLocking = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       emrDocumentId: getId(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       emrCategoryCode: categoryCode.value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       jump: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      createName: value['编辑者']?.value[0].name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      createName: editorGetData(value, '编辑者', 'name'), //value['编辑者']?.value[0].name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       createDate: value['查房时间']?.value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      createId: value['编辑者']?.value[0].code || fragment.createId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      createId: editorGetData(value, '编辑者', 'code') || fragment.createId, // value['编辑者']?.value[0].code || fragment.createId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       type: 'category', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       trueCreationTime: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (typeof pushData.createId === 'undefined' || !pushData.createId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      console.log(value, fragment) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (fragment != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       pushData.trueCreationTime = fragment?.creationTime 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     courseTitles.push(pushData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (emrConfig.value.editor) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      let editorCode = value['编辑者']?.value[0]?.code; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let editorCode = pushData.createId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 如果这个为空的话,就让她删了重新写,只能删除不能写 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (stringIsBlank(editorCode)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         node.view.setReadonly(true); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1897,52 +1891,13 @@ const 循环病程返回数据元 = (callback) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const pageIsZoom = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  let rate = changeRatio(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (rate !== 100) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ElMessageBox.alert("当前页面不是100%显示,请按键盘ctrl+0恢复100%显示标准,如果页面是100%缩放请检查系统缩放(可自行百度),设置=》屏幕缩放(选择100%),以防页面显示错乱,以及续打对不准!", '提示', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      type: "warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }).then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }).catch(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    return true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  return false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function changeRatio() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  let ratio = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  const screen = window.screen; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  const ua = navigator.userAgent.toLowerCase(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (window.devicePixelRatio !== undefined) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ratio = window.devicePixelRatio; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } else if (~ua.indexOf('msie')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // @ts-ignore 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (screen.deviceXDPI && screen.logicalXDPI) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // @ts-ignore 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      ratio = screen.deviceXDPI / screen.logicalXDPI; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } else if (window.outerWidth !== undefined && window.innerWidth !== undefined) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ratio = window.outerWidth / window.innerWidth; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (ratio) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ratio = Math.round(ratio * 100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  return ratio; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 加载页面大纲 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 async function getOutline() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     outlineData.value = editor.getOutline() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    console.log(outlineData.value) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } catch (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |