Browse Source

住院医生三级医生设置

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
511394fe17

+ 55 - 0
package-lock.json

@@ -292,6 +292,50 @@
         }
       }
     },
+    "@jiaminghi/bezier-curve": {
+      "version": "0.0.9",
+      "resolved": "https://registry.npmmirror.com/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz",
+      "integrity": "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw==",
+      "requires": {
+        "@babel/runtime": "^7.5.5"
+      }
+    },
+    "@jiaminghi/c-render": {
+      "version": "0.4.3",
+      "resolved": "https://registry.npmmirror.com/@jiaminghi/c-render/-/c-render-0.4.3.tgz",
+      "integrity": "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q==",
+      "requires": {
+        "@babel/runtime": "^7.5.5",
+        "@jiaminghi/bezier-curve": "*",
+        "@jiaminghi/color": "*",
+        "@jiaminghi/transition": "*"
+      }
+    },
+    "@jiaminghi/charts": {
+      "version": "0.2.18",
+      "resolved": "https://registry.npmmirror.com/@jiaminghi/charts/-/charts-0.2.18.tgz",
+      "integrity": "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA==",
+      "requires": {
+        "@babel/runtime": "^7.5.5",
+        "@jiaminghi/c-render": "^0.4.3"
+      }
+    },
+    "@jiaminghi/color": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmmirror.com/@jiaminghi/color/-/color-0.1.1.tgz",
+      "integrity": "sha512-M09+Sb5HGqVim0zo+nG5gU1v+6gXT8ptr0BZR6dMGt83XmCJgnZtO8s7llTW4hLFFFM5co6geZvTekqLpSPAAQ==",
+      "requires": {
+        "@babel/runtime": "^7.5.5"
+      }
+    },
+    "@jiaminghi/transition": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmmirror.com/@jiaminghi/transition/-/transition-1.1.11.tgz",
+      "integrity": "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg==",
+      "requires": {
+        "@babel/runtime": "^7.5.5"
+      }
+    },
     "@jridgewell/resolve-uri": {
       "version": "3.0.8",
       "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.8.tgz",
@@ -343,6 +387,17 @@
         "@jridgewell/sourcemap-codec": "^1.4.10"
       }
     },
+    "@kjgl77/datav-vue3": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmmirror.com/@kjgl77/datav-vue3/-/datav-vue3-1.3.3.tgz",
+      "integrity": "sha512-G/ypeuT2pTquSssLOFXZyQNpt3J+0I3AioqxU1G1s+Har+QWqOm6tin2nR542I63dhpmSDhgIvcuG3xfHL6B6A==",
+      "requires": {
+        "@jiaminghi/c-render": "^0.4.3",
+        "@jiaminghi/charts": "^0.2.18",
+        "@vueuse/core": "^9.1.0",
+        "lodash-es": "^4.17.21"
+      }
+    },
     "@leichtgewicht/ip-codec": {
       "version": "2.0.4",
       "resolved": "https://registry.npmmirror.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",

+ 2 - 2
src/api/public-api.js

@@ -7,11 +7,11 @@ export function getRoleCode() {
     })
 }
 
-export function getRenYuan(code) {
+export function getRenYuan(code, deptCode = '') {
     return request({
         url: '/publicApi/getRenYuan',
         method: 'get',
-        params: {code},
+        params: {code, deptCode},
     })
 }
 

+ 8 - 0
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.js

@@ -287,3 +287,11 @@ export function drugWithdrawal(data) {
         data: data
     })
 }
+
+export function saveTheThirdLevelDoctor(data) {
+    return request({
+        url: url + '/saveTheThirdLevelDoctor',
+        method: 'post',
+        data: data
+    })
+}

+ 17 - 5
src/components/SelectStaffCode.vue

@@ -19,6 +19,7 @@
 <script name="SelectStaffCode" setup>
 import {getRenYuan} from "@/api/public-api";
 import {stringNotBlank} from "@/utils/blank-utils";
+import store from "@/store";
 
 const props = defineProps({
   modelValue: {
@@ -36,6 +37,10 @@ const props = defineProps({
   clearable: {
     type: Boolean,
     default: true
+  },
+  deptCode: {
+    type: Boolean,
+    default: false
   }
 })
 
@@ -45,7 +50,12 @@ let value = $ref()
 
 const modelChange = () => {
   value = props.modelValue[props.name[0]]
-  if (stringNotBlank(value) && staffList.length === 0) {
+  if (stringNotBlank(value)) {
+    for (let i = 0, len = staffList.length; i < len; i++) {
+      if (value === staffList[i].code) {
+        return
+      }
+    }
     getRenYuan(value).then(res => {
       staffList = res
     })
@@ -61,12 +71,14 @@ watch(() => props.modelValue[props.name[0]], () => {
   modelChange()
 })
 
+let deptCode = props.deptCode ? store.state.user.info.deptCode : ''
 const methodStaff = (val) => {
-  if (val.length > 1) {
-    getRenYuan(val).then(res => {
-      staffList = res
-    })
+  if (val.length === 0) {
+    return
   }
+  getRenYuan(val, deptCode).then(res => {
+    staffList = res
+  });
 }
 
 const selectRef = ref()

+ 1 - 1
src/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="header" style="border: 0">
+  <div class="header" style="border: 0;color: #000000">
     <div class="box">
       <div>
         住院号:{{ huanZheXinXi.inpatientNo }}_{{ huanZheXinXi.admissTimes }}

+ 29 - 34
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue

@@ -6,9 +6,30 @@
         <el-radio-button :label="2">个人模板</el-radio-button>
         <el-radio-button :label="3">科室模板</el-radio-button>
       </el-radio-group>
-      <el-table :data="jianChaFenLeiShuJu.data" :height="windowSize.h / 1.4" highlight-current-row stripe
-                @row-click="clickToViewData">
-        <el-table-column label="名称" prop="name"></el-table-column>
+      <el-table :data="jianChaFenLeiShuJu.data"
+                :height="windowSize.h / 1.4"
+                highlight-current-row stripe>
+        <el-table-column label="名称" prop="name">
+          <template #default="{row}">
+            <el-popover trigger="click" :width="0" placement="right">
+              <template #reference>
+                <el-button @click="clickToViewData(row)">{{ row.name }}</el-button>
+              </template>
+              <template #default>
+                <el-button @click="dianJiQueRenXuanZhong">确定</el-button>
+                <el-button @click="okAndEdit">确定并编辑</el-button>
+                <xc-table :local-data="detailsOfNewInspectionItems"
+                          :height="400"
+                          @selection-change="xuanZhong"
+                          :open-paging="false">
+                  <el-table-column type="selection"></el-table-column>
+                  <el-table-column label="项目名称" prop="orderName" width="220"></el-table-column>
+                  <el-table-column label="说明" prop="ybComment"></el-table-column>
+                </xc-table>
+              </template>
+            </el-popover>
+          </template>
+        </el-table-column>
         <el-table-column label="操作">
           <template #default="scope">
             <el-button v-if="chaZhaoLeiXing !== 1" type="danger"
@@ -61,17 +82,7 @@
       </el-table>
     </el-main>
   </el-container>
-  <el-dialog v-model="xiangXiShuJu.dialog" title="查询">
-    <el-button @click="okAndEdit">确定并编辑</el-button>
-    <el-button @click="dianJiQueRenXuanZhong">确定</el-button>
-    <el-button @click="xiangXiShuJu.dialog = false">取消</el-button>
-    <xc-table :local-data="xiangXiShuJu.data" :height="windowSize.h / 2" @selection-change="xuanZhong"
-              :open-paging="false">
-      <el-table-column type="selection"></el-table-column>
-      <el-table-column label="项目名称" prop="orderName"></el-table-column>
-      <el-table-column label="说明" prop="ybComment"></el-table-column>
-    </xc-table>
-  </el-dialog>
+
   <el-dialog v-model="baoCunMuBan.dialog" center title="保存检查模板" width="30%">
     <el-form ref="baoCunMuBanRef" :model="baoCunMuBan" :rules="baoCunMuBanJiaoYan" label-width="80px">
       <el-row>
@@ -137,11 +148,9 @@ import {
 } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
 import {yaoPinXiangMuPiPeiYiBao} from '@/api/public-api'
 import CuoWuXinXi from '@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue'
-import {logoutShortcut, xcHotKey} from '@/utils/xckeydown'
 import Sleep from '@/utils/sleep'
 import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
-import XcCode from "@/components/xiao-chan/code/XcCode.vue";
 
 const props = defineProps({
   jianCha: {
@@ -154,10 +163,9 @@ const chaZhaoLeiXing = ref(1)
 const windowSize = computed(() => {
   return store.state.app.windowSize
 })
-const xiangXiShuJu = ref({
-  dialog: false,
-  data: [],
-})
+
+const detailsOfNewInspectionItems = ref([])
+
 const jianChaFenLeiShuJu = ref({
   currentPage: 1,
   total: 0,
@@ -217,7 +225,6 @@ const dianJiQueRenXuanZhong = () => {
   if (tiShi) {
     ElMessage.error('请勿重复添加。')
   }
-  xiangXiShuJu.value.dialog = false
 }
 
 const dianJiBianJi = (row, index) => {
@@ -279,8 +286,7 @@ const clickToViewData = ({code, bwCode}) => {
   }
   chaKanFenLeiXiangQing(code, chaZhaoLeiXing.value === 1 ? bwCode : 'mb', props.jianCha).then((res) => {
     if (listNotBlank(res)) {
-      xiangXiShuJu.value.data = res
-      xiangXiShuJu.value.dialog = true
+      detailsOfNewInspectionItems.value = res
     } else {
       ElMessage.error('没有找到对应的数据')
     }
@@ -361,14 +367,6 @@ const clickSaveTemplate = async () => {
   }
 }
 
-const shortcutToOpenEditing = () => {
-  if (xuanZhongJianCha.value.data.length > 0) {
-    dianJiBianJi(xuanZhongJianCha.value.data[0], 0)
-  } else {
-    ElMessage.error('您还没有选择数据')
-  }
-}
-
 const starAdd = (obj) => {
   let index = [0, 1, 2, 3, 6, 7, 8, 9]
   if (index.indexOf(obj.columnIndex) > -1) {
@@ -385,9 +383,6 @@ onMounted(() => {
   dianJiLeiXingChaXun()
 })
 
-onUnmounted(() => {
-  logoutShortcut()
-})
 </script>
 
 <style scoped>

+ 48 - 4
src/components/zhu-yuan-yi-sheng/public/PatientList.vue

@@ -38,18 +38,47 @@
       </template>
     </el-table-column>
   </el-table>
+
+  <xc-dialog-v2 v-model="thirdLevelDoctorSetting.dialog" width="450px" title="三级医生设置">
+    <el-form label-width="80px">
+      <el-form-item label="患者:">
+        {{ thirdLevelDoctorSetting.data.name }}
+      </el-form-item>
+      <el-form-item label="管床医生:">
+        <select-staff-code v-model="thirdLevelDoctorSetting.data"
+                           :name="['referPhysician', 'referPhysicianName']"
+                           dept-code/>
+      </el-form-item>
+      <el-form-item label="主治医生:">
+        <select-staff-code v-model="thirdLevelDoctorSetting.data"
+                           :name="['consultPhysician', 'consultPhysicianName']"
+                           dept-code/>
+      </el-form-item>
+      <el-form-item label="科室医生:">
+
+        <select-staff-code v-model="thirdLevelDoctorSetting.data"
+                           :name="['deptDirector', 'deptDirectorName']" dept-code/>
+      </el-form-item>
+      <el-form-item label="科室医生:">
+        <el-button @click="submitToTheThirdLevelDoctor">提交</el-button>
+      </el-form-item>
+    </el-form>
+  </xc-dialog-v2>
 </template>
 
 <script setup name='PatientList'>
 import {computed, onMounted, ref} from "vue";
 import {getWardsApi} from "@/api/login";
-import {getOverView, getPatientInfo} from "@/api/inpatient/patient";
+import {getOverView} from "@/api/inpatient/patient";
 import {allWardsVisible} from "@/utils/permission";
 import XcCheckbox from "@/components/xiao-chan/checkbox/XcCheckbox";
 import {cptSex} from "@/utils/computed";
-import {setBaseinfo} from "@/data/inpatient";
-import {getMyPatient} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
+import {getMyPatient, saveTheThirdLevelDoctor} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import {clickOnThePatient, huanZheXinXi} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
+import {getRenYuan} from "@/api/public-api";
+import store from "@/store";
+import SelectStaffCode from "@/components/SelectStaffCode.vue";
 
 const myPatient = ref(false)
 const wardsClearable = allWardsVisible()
@@ -90,13 +119,26 @@ const rowClass = ({row}) => {
   }
 }
 
+const thirdLevelDoctorSetting = $ref({
+  dialog: false,
+  data: {},
+  deptList: []
+})
+
 const settingUpAThirdLevelDoctor = (row, column, event) => {
   event.returnValue = false
+  thirdLevelDoctorSetting.dialog = true
+  thirdLevelDoctorSetting.data = row
+}
+
+const submitToTheThirdLevelDoctor = () => {
+  saveTheThirdLevelDoctor(thirdLevelDoctorSetting.data).then(() => {
+    thirdLevelDoctorSetting.dialog = false
+  })
 }
 
 onMounted(() => {
   getWardsApi().then((res) => {
-    console.log(res)
     if (res.length > 0) {
       allWards.value = res
       currentWard.value = wardsClearable ? '' : res[0].code
@@ -112,4 +154,6 @@ onMounted(() => {
 .el_table__current {
   background-color: #a7d3ff;
 }
+
+//
 </style>

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

@@ -1,6 +1,11 @@
 <template>
-  <div class="yz_editor__main" ref="editorMainRef">
+  <div class="yz_editor__main" ref="editorMainRef" style="color: #000000">
     <div class="editing_area">
+      <div v-if="tiShiBiaoTi?.length > 0" style="background-color: #ffdb04;padding: 5px">
+        <span v-for="item in tiShiBiaoTi">
+            {{ item }}
+        </span>
+      </div>
       <div class="yz_editor__disable" v-if="isEdit"></div>
       <div class="yz_input__box">
         <div>
@@ -311,6 +316,7 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
   if (yiZhuData.value.actOrderNo === 'tempOrderNo') {
     yiZhuData.value.actOrderNo = await getOrderNo()
   }
+
   let tempOrderNo = null
 
   // 在使用 查询医嘱搜索的时候 row 是不会有 actOrderNo 的所以要保留一下 原来的医嘱
@@ -330,7 +336,6 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
   if (row.serial === '01' || row.serial === '99') {
     try {
       let res = await huoQuFeiYongXinXi(row.orderCode, row.serial, props.patientInfo.smallDept)
-
       // 加载药品计量
       yaoPinJiLiangData.value = res.yaoPingJiLiang
       if (newData) {
@@ -530,7 +535,7 @@ const addOrderNo = async () => {
     BizException(ExceptionEnum.MESSAGE_ERROR, '请先选择患者')
   }
   // 如果有录入数据的话就需要保存一下
-  if (stringNotBlank(yiZhuData.value.actOrderNo) && yiZhuData.value.statusFlag === '1') {
+  if (stringNotBlank(yiZhuData.value.actOrderNo) && yiZhuData.value.statusFlag === '1' && yiZhuData.value.actOrderNo !== 'tempOrderNo') {
     let param = {
       inpatientNo: props.patientInfo.inpatientNo,
       admissTimes: props.patientInfo.admissTimes,
@@ -814,25 +819,6 @@ onActivated(() => {
   xcHotKey(shortcutKeyRegistration)
 })
 
-/**
- * 判断是否有真在编辑的内容
- * @returns {Promise<unknown>}
- */
-const determineWhetherThereIsContentBeingEdited = () => {
-  return new Promise((resolve, reject) => {
-    if (stringNotBlank(yiZhuData.value.actOrderNo) && yiZhuData.value.statusFlag === '1') {
-      ElMessageBox.alert('请先保存正在编辑的医嘱', '提示', {
-        type: 'warning',
-      }).finally(() => {
-      })
-      reject()
-    } else {
-      resolve()
-    }
-  })
-}
-
-
 onMounted(async () => {
   await nextTick();
   let inputs = editorMainRef.value.querySelectorAll('input')

+ 8 - 15
src/router/modules/dashboard.js

@@ -481,17 +481,6 @@ const route = [
                 component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/Home.vue')),
                 meta: {title: '住院医生', passRule: true},
                 children: [
-                    {
-                        path: 'xinZengShuJu/:passRule/:name',
-                        name: 'xinZengShuJu',
-                        component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/XinZengShuJu.vue')),
-                        meta: {
-                            title: '新增数据',
-                            hideTabs: true,
-                            activeMenu: '/inpatient/zhuYuanYiSheng/yiZhuLuRu',
-                            blankPage: true,
-                        },
-                    },
                     {
                         path: 'dianZiBingLi',
                         name: 'dianZiBingLi',
@@ -505,10 +494,14 @@ const route = [
                         component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue')),
                         meta: {
                             title: '医嘱录入',
-                            // hideTabs: true,
-                            // passRule: true,
-                            // activeMenu: '/inpatient/zhuYuanYiSheng/yiZhuLuRu',
-                            // parentName: '住院医生',
+                        },
+                    },
+                    {
+                        path: 'orderTemplateMaintenance',
+                        name: 'orderTemplateMaintenance',
+                        component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TemplateMaintenance.vue')),
+                        meta: {
+                            title: '医嘱模板维护',
                         },
                     },
                     {

+ 27 - 25
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -1,32 +1,34 @@
 <template>
-  <div class="yz__header">
-    <div class="yz__close" @click="basicPatientInformation = !basicPatientInformation">
-      <el-icon>
-        <Close/>
-      </el-icon>
-    </div>
-    <transition name="el-zoom-in-top">
-      <huan-zhe-xin-xi v-show="basicPatientInformation"
-                       :huan-zhe-xin-xi="patientInfo"/>
-    </transition>
-  </div>
-  <div class="yz__main" style="overflow: auto">
-    <div style="width: 158px">
-      <patient-list/>
+  <div style="color:#000;">
+    <div class="yz__header">
+      <div class="yz__close" @click="basicPatientInformation = !basicPatientInformation">
+        <el-icon>
+          <Close/>
+        </el-icon>
+      </div>
+      <transition name="el-zoom-in-top">
+        <huan-zhe-xin-xi v-show="basicPatientInformation"
+                         :huan-zhe-xin-xi="patientInfo"/>
+      </transition>
     </div>
-    <div style="width: 100%;overflow:auto;">
-      <div class="tag">
-        <div v-for="item in pathList"
-             :style="currentPagePosition(item.path)"
-             @click="handleClick(item.path)">
-          <span> {{ item.title }}</span>
+    <div class="yz__main" style="overflow: auto">
+      <div style="width: 158px">
+        <patient-list/>
+      </div>
+      <div style="width: 100%;overflow:auto">
+        <div class="tag">
+          <div v-for="item in pathList"
+               :style="currentPagePosition(item.path)"
+               @click="handleClick(item.path)">
+            <span> {{ item.title }}</span>
+          </div>
         </div>
+        <router-view v-slot="{ Component }">
+          <keep-alive>
+            <component :is="Component"/>
+          </keep-alive>
+        </router-view>
       </div>
-      <router-view v-slot="{ Component }">
-        <keep-alive>
-          <component :is="Component"/>
-        </keep-alive>
-      </router-view>
     </div>
   </div>
 </template>

+ 2 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/OpenNewWindiow.vue

@@ -4,6 +4,7 @@
       <huan-zhe-xin-xi :huan-zhe-xin-xi="patientInfo" v-if="patientInfo"/>
     </div>
     <emr-main :huan-zhe-xin-xi="patientInfo" :max-height="maxHeight" v-if="path === 'emr'"/>
+    <tian-jia-yi-zhu v-if="path === 'yzOrder'" :patient-info="patientInfo"/>
   </div>
 </template>
 
@@ -12,6 +13,7 @@ import EmrMain from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medica
 import {getPatientInfo} from "@/api/inpatient/patient";
 import router from "@/router";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
+import TianJiaYiZhu from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue";
 import {ElMessageBox} from "element-plus";
 
 let show = $ref(false)

+ 0 - 44
src/views/hospitalization/zhu-yuan-yi-sheng/XinZengShuJu.vue

@@ -1,44 +0,0 @@
-<template>
-  <div v-loading=" name==='' ">
-    <tian-jia-yi-zhu v-if="name === '添加医嘱'"></tian-jia-yi-zhu>
-    <tian-jia-jian-cha-jian-yan v-else-if="name === '检验' || name === '检查'"
-                                :jian-cha="name === '检查'">
-    </tian-jia-jian-cha-jian-yan>
-    <xin-zhen-cao-yao v-if="name === '草药'"></xin-zhen-cao-yao>
-  </div>
-</template>
-
-<script setup name="XinZengShuJu">
-
-import TianJiaYiZhu from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue";
-import {onActivated, ref} from "vue";
-import router from '@/router'
-import TianJiaJianChaJianYan from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue";
-import XinZengShouShuShenQing
-  from "@/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/XinZengShouShuShenQing.vue";
-import XinZhenCaoYao from "@/views/hospitalization/zhu-yuan-yi-sheng/cao-yao-yi-zhu/XinZhengCaoYao.vue";
-import store from '@/store'
-
-
-const name = ref('')
-
-let userInfo = computed(() => {
-  return store.state.user.info
-})
-
-
-onActivated(() => {
-  name.value = ''
-  if (router.currentRoute.value.params.name) {
-    name.value = router.currentRoute.value.params.name
-  } else {
-    router.go(-1)
-  }
-})
-
-
-</script>
-
-<style scoped>
-
-</style>

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

@@ -6,14 +6,17 @@
       <el-button @click="resetData">历史记录</el-button>
 
       <div v-if="tempTimes === huanZheXinXi.admissTimes">
-        <el-button type="success" icon="CircleCheck" @click="clickSaveData">保存数据</el-button>
-        <el-button icon="Delete" type="danger" @click="clickDelete">删除电子病历</el-button>
+        <el-button type="success" icon="CircleCheck" @click="clickSaveData">保存</el-button>
+        <el-button icon="Delete" type="danger" @click="clickDelete">删除</el-button>
       </div>
-      <el-button style="margin-left: 5px" type="primary" icon="Printer" @click="testPrint">打印电子病历</el-button>
       <el-button style="margin-left: 5px" @click="clickToSubmitTheMedicalRecord" :disabled="!documentId">提交病历
       </el-button>
+      <el-button-group>
+        <el-button type="primary" icon="Printer" @click="frontEndPrinting">页面打印</el-button>
+        <el-button type="primary" icon="Printer" @click="servicePrint">服务打印</el-button>
+      </el-button-group>
       <el-button style="margin-left: 5px" type="primary" @click="openAssistant.dialog = true">
-        电子助手
+        病历助手
       </el-button>
       <el-button-group>
         <el-button icon="RefreshLeft" @click="clickUndo('undo')">撤销</el-button>
@@ -121,7 +124,7 @@ let jumpPositioning = {
 const clickSaveData = async () => {
   waitForLoadingToComplete()
   let data = {
-    // 这个是 唯一 id 我是在本地生成的
+    // 这个是 唯一 id 调用服务的雪花算法
     emrDocumentId: documentId ? documentId : await getUuid(),
     emrCategoryCode: categoryCode,
     patNo: props.huanZheXinXi.inpatientNo,
@@ -178,9 +181,25 @@ const objectValuesCannotBeNull = (object) => {
   }
 }
 
-const testPrint = () => {
+// 前端打印
+const frontEndPrinting = () => {
   waitForLoadingToComplete()
-  currentEmr.value.printDocument(true, null);
+  editor.execute("print", {
+    value: {
+      showPreview: true,
+    }
+  })
+}
+
+// 服务打印
+const servicePrint = () => {
+  waitForLoadingToComplete()
+  editor.execute("print", {
+    value: {
+      showPreview: true,
+      mode: 'backend'
+    }
+  })
 }
 
 /**

+ 0 - 11
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init.js

@@ -122,16 +122,5 @@ export function EMRInteractive(data, editorEvent) {
             ElMessage.error("删除失败" + err)
         });
     };
-
-    this.printDocument = (showPreview, docs = null) => {
-        this.editor && this.editor.execute("print", {
-            value: {
-                showPreview: true,
-                mode: 'backend'
-            }
-        })
-    };
-
-
 }
 

+ 0 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue → src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TemplateMaintenance.vue


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

@@ -285,14 +285,7 @@ const openGroupOrderTemplate = async (code) => {
  */
 const orderTemplateClick = () => {
   router.push({
-    name: 'xinZengShuJu',
-    params: {
-      passRule: true,
-      name: '添加医嘱',
-    },
-    query: {
-      path: '/inpatient/zhuYuanYiSheng/yiZhuLuRu',
-    },
+    name: 'orderTemplateMaintenance',
   })
 }
 

+ 10 - 1
vite.config.js

@@ -48,12 +48,21 @@ export default defineConfig({
     ],
     server: {
         host: '0.0.0.0',
+        port: 3000,
         proxy: {
-            '/emr': {
+            '/emr/runtime': {
                 //这里配置运行时服务地址
                 target: 'http://172.16.32.125:8001/emr',
                 secure: false, //如果运行时服务是https,此处配置为true
                 changeOrigin: true, //支持跨域调用,这里配置为true
+                rewrite: path => path.replace(/^\/emr/, '')
+            },
+            '/emr/archive': {
+                //这里配置运行时服务地址
+                target: 'http://172.16.32.125:8001/emr',
+                secure: false, //如果运行时服务是https,此处配置为true
+                changeOrigin: true, //支持跨域调用,这里配置为true
+                rewrite: path => path.replace(/^\/emr/, '')
             },
             '/bdp/dataservice/api': {
                 // 这个地址是,创智和宇的查询电子病历下拉框的接口