Browse Source

优化住院医生和操作指南。

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
e7e80d2210

+ 9 - 0
src/api/public-api.js

@@ -171,3 +171,12 @@ export function getOperationGuide() {
         method: 'get',
     })
 }
+
+export function getOperationGuidePdf() {
+    return request({
+        url: '/publicApi/getOperationGuidePdf',
+        method: 'get',
+    })
+}
+
+

+ 7 - 3
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -134,6 +134,7 @@
             <option :value="null"/>
             <template v-for="item in fuYiZhuData">
               <option :value="item.actOrderNo"
+                      :title="item.actOrderNo + '|' +item.orderName"
                       v-if="yiZhuData?.actOrderNo !== item?.actOrderNo">
                 {{ item.orderName }}
               </option>
@@ -809,9 +810,12 @@ onActivated(() => {
 
 const editingAreaRef = ref()
 onMounted(async () => {
-  await nextTick();
-  // 获取编辑器的宽度
-  winsize.value.editor = editingAreaRef.value.clientWidth
+  await nextTick()
+  await Sleep(100)
+  if (winsize.value.editor === 0) {
+    // 获取编辑器的宽度
+    winsize.value.editor = editingAreaRef.value.clientWidth
+  }
 })
 
 

+ 34 - 11
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -20,7 +20,7 @@
           <div class="tag">
             <div v-for="(item,index) in pathList"
                  :style="currentPagePosition(item.path)"
-                 @click="item.func? item.func(index) :  handleClick(item.path)">
+                 @click="item.func? item.func(index) :  handleClick(item.path,item.disable)">
               <span> {{ item.title }}</span>
             </div>
             <div @click="downloadGuide" style="background-color: red;color: white">
@@ -51,7 +51,9 @@ import PatientList from "@/components/zhu-yuan-yi-sheng/public/PatientList";
 import {getDrgIntelligentGrouping} from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import {getJyJcZdTree} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
 import {ElMessageBox} from "element-plus";
-import {getOperationGuide} from "@/api/public-api";
+import {getOperationGuide, getOperationGuidePdf} from "@/api/public-api";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+import axios from "axios";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -65,11 +67,7 @@ const basicPatientInformation = ref(true)
 let fileName = $ref('v1.1.0')
 
 watch(() => router.currentRoute.value.path, () => {
-  getOperationGuide().then((res) => {
-    fileName = res
-  }).catch(() => {
-    fileName = 'v1.1.0'
-  })
+
   let path = router.currentRoute.value.path
   if (path === '/inpatient/zhuYuanYiSheng/dianZiBingLi') {
     xianShiLieBiao.value = false
@@ -78,13 +76,17 @@ watch(() => router.currentRoute.value.path, () => {
   }
 }, {immediate: true})
 
-const handleClick = (path) => {
-  router.push(path);
+const handleClick = (path, disable) => {
+  if (disable) {
+    xcMessage.info('该功能在开发中。。。')
+  } else {
+    router.push(path);
+  }
 }
 
 let pathList = $ref([
   {path: '/inpatient/zhuYuanYiSheng/yiZhuLuRu', title: '医嘱录入'},
-  {path: '/inpatient/zhuYuanYiSheng/yiZhuLuRu?pattern=takeMedicine', title: '出院带药'},
+  {path: '/inpatient/zhuYuanYiSheng/yiZhuLuRu?pattern=takeMedicine', title: '出院带药', disable: true},
   {path: '/inpatient/zhuYuanYiSheng/huiZhenShenQing', title: '会诊申请'},
   {path: '/inpatient/zhuYuanYiSheng/jianChaShenQing', title: '检查申请'},
   {path: '/inpatient/zhuYuanYiSheng/jianYanShenQing', title: '检验申请'},
@@ -136,13 +138,34 @@ const currentPagePosition = (val) => {
   }
 }
 
+// 点击下载操作指南,先查询一遍最新的。
 const downloadGuide = () => {
-  window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生操作指南 ${fileName}.docx`, '_blank')
+  getOperationGuide().then((res) => {
+    fileName = res
+    ElMessageBox.confirm('请选择线上预览版本还是下载操作指南', '提示', {
+      cancelButtonText: '下载',
+      confirmButtonText: '线上预览',
+      distinguishCancelAndClose: true
+    }).then(() => {
+      window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生操作指南 ${fileName}.pdf`, '_blank')
+    }).catch((e) => {
+      if (e === 'cancel') {
+        window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生操作指南 ${fileName}.docx`, '_blank')
+      }
+    })
+  }).catch(() => {
+    fileName = 'v1.1.0'
+  })
 }
 
 
 const mainRef = ref()
 onMounted(async () => {
+  getOperationGuide().then((res) => {
+    fileName = res
+  }).catch(() => {
+    fileName = 'v1.1.0'
+  })
   if (localStorage.getItem('downloadZn') === null) {
     ElMessageBox.confirm('下载住院医生操作指南', '提示', {
       type: 'info',

+ 2 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/EmrMain.vue

@@ -206,7 +206,6 @@ const objectValuesCannotBeNull = (object) => {
 // 前端打印
 const frontEndPrinting = () => {
   waitForLoadingToComplete()
-  console.log(editor)
   editor.execute("print", {
     value: {
       showPreview: true,
@@ -341,9 +340,9 @@ const monitorPageRefresh = (event) => {
  * @param styles
  */
 const clickSnippet = ({content, styles}) => {
-  console.log(readonlyPattern())
   if (!readonlyPattern()) {
     currentEmr.value.callMethod('setCursor', 'AREA_END')
+    console.log(patientData)
     currentEmr.value.insertSnippet(content, styles, patientData)
   }
 }
@@ -487,6 +486,7 @@ const reQueryPatientInformation = () => {
   if (!readonlyPattern()) {
     getExtractDataElement(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes).then((res) => {
       // getExtractDataElement('005959', 23).then((res) => {
+      Object.assign(patientData, res)
       editor.setValues(res)
     })
   }

+ 1 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -70,7 +70,7 @@ import {
 } from '../public-js/zhu-yuan-yi-sheng'
 import store from '@/store'
 import {stringIsBlank} from '@/utils/blank-utils'
-import { getTheTransferList} from '@/api/public-api'
+import {getTheTransferList} from '@/api/public-api'
 import router from '@/router'
 import sleep from "@/utils/sleep";
 import DoctorSOrderFee from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/DoctorSOrderFee.vue";
@@ -142,8 +142,6 @@ const stopOrderDialog = ref({
  * 停止医嘱
  */
 const clickToStopTheOrder = () => {
-
-
   selectedData.value.forEach(item => {
     item.endTime = getFormatDatetime(item.endTimeTemp)
   })