Browse Source

优化代码

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
7671fe86eb

+ 1 - 1
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue

@@ -40,7 +40,7 @@
     <emr-group-consultation v-if="index === 4"/>
     <emr-operation v-if="index === 5" :emr-data="props.emrData"
                    @to-fill-in-data="toFillInData"/>
-    <emr-test @close="close"/>
+    <emr-test @close="close" v-if="index === 6"/>
   </el-drawer>
 
 </template>

+ 1 - 2
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTest.vue

@@ -42,7 +42,7 @@
         </div>
         <div>
           <test-describe front="申请项目"
-                         :text="inspectionHeader?.aply_CNTN.substring(0, 13) + inspectionHeader.aply_CNTN.substring(13)"/>
+                         :text="inspectionHeader?.aply_CNTN"/>
         </div>
       </div>
       <div class="test-date">
@@ -261,7 +261,6 @@ function filterAgeUnit(val) {
   return ''
 }
 
-
 function getItemAlert(val, strValue, value) {
   if (strValue !== '' || value === '') return ''
   switch (val) {

+ 4 - 5
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue

@@ -1278,10 +1278,11 @@ const zoomFunc = (val) => {
 let interval = null
 let intervalTime = 1000 * 60 * 5
 const autoSaveChange = () => {
+  store.commit('app/setEmrAutosave', autoSave)
   if (autoSave) {
     interval = setInterval(() => {
-      autoSaveFunc();
-    }, intervalTime);
+      autoSaveFunc()
+    }, intervalTime)
   } else {
     clearInterval(interval)
   }
@@ -1296,9 +1297,7 @@ const autoSaveFunc = () => {
 }
 
 onMounted(async () => {
-  if (store.state.app.emrAutosave) {
-    autoSave = store.state.app.emrAutosave;
-  }
+  autoSave = store.state.app.emrAutosave;
   autoSaveChange()
   extractData = await getExtractDataElement(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes)
   await nextTick()