Browse Source

住院医生优化

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

File diff suppressed because it is too large
+ 476 - 935
package-lock.json


+ 1 - 1
package.json

@@ -13,7 +13,7 @@
     "@babel/standalone": "7.14.8",
     "@element-plus/icons-vue": "^2.0.6",
     "@vitejs/plugin-legacy": "^1.8.2",
-    "@vueuse/core": "^9.3.0",
+    "@vueuse/core": "^9.6.0",
     "axios": "^0.27.2",
     "clipboard": "^2.0.11",
     "dayjs": "^1.10.6",

+ 2 - 5
src/components/xiao-chan/checkbox/XcCheckbox.vue

@@ -30,11 +30,8 @@ const changeCheckbox = () => {
 }
 
 watch(() => props.modelValue, () => {
-  if (props.modelValue === props.activeValue) {
-    tempValue.value = true
-  } else {
-    tempValue.value = false
-  }
+  tempValue.value = props.modelValue === props.activeValue;
+  emit('update:modelValue', tempValue.value ? props.activeValue : props.inactiveValue)
 }, {deep: true, immediate: true})
 
 </script>

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

@@ -1,73 +1,69 @@
 <template>
   <div class="header" style="border: 0">
-    <el-collapse>
-      <el-collapse-item title="患者信息">
-        <div class="box">
-          <div>
-            住院号:{{ huanZheXinXi.inpatientNo }}_{{ huanZheXinXi.admissTimes }}
-          </div>
-          <div>
-            床号:{{ huanZheXinXi.bedNo }}
-          </div>
-          <div>
-            姓名:{{ huanZheXinXi.name }}
-          </div>
-          <div>
-            身份证号:{{ huanZheXinXi.socialNo }}
-          </div>
-          <div>
-            出生日期:{{ huanZheXinXi.birthDate }} {{ huanZheXinXi.age }} 岁
-          </div>
-          <div>
-            性别:{{ huanZheXinXi.sexName }}
-          </div>
-          <div>
-            联系电话:{{ huanZheXinXi.homeTel }}
-          </div>
-          <div>
-            入院日期:{{ huanZheXinXi.admissDate }}
-            {{ huanZheXinXi.actIptDays }}天
-          </div>
-        </div>
-
-        <div class="box">
-          <div>
-            管床医生:{{ huanZheXinXi.referPhysicianName }}
-          </div>
-          <div>
-            病区:{{ huanZheXinXi.admissWardName }}
-          </div>
-          <div>
-            入院医生:{{ huanZheXinXi.admissPhysicianName }}
-          </div>
-          <div>
-            入院诊断:{{ huanZheXinXi.admissDiagStr }}
-          </div>
-          <div>
-            小科室:{{ huanZheXinXi.smallDeptName }}
-          </div>
-          <div>
-            身份:{{ huanZheXinXi.medTypeName }}
-          </div>
-
-        </div>
-
-        <div class="box">
-          <div>
-            总费用:{{ huanZheXinXi.totalCharge }} {{ huanZheXinXi.balance }} 岁
-          </div>
-          <div>
-            药品占比:{{ huanZheXinXi.yp }}
-          </div>
-          <div>
-            检验检查:{{ huanZheXinXi.jyjc }}
-          </div>
-          <div>
-            医保:{{ huanZheXinXi.chargeYb }} {{ huanZheXinXi.yb }}
-          </div>
-        </div>
-      </el-collapse-item>
-    </el-collapse>
+    <div class="box">
+      <div>
+        住院号:{{ huanZheXinXi.inpatientNo }}_{{ huanZheXinXi.admissTimes }}
+      </div>
+      <div>
+        床号:{{ huanZheXinXi.bedNo }}
+      </div>
+      <div>
+        姓名:{{ huanZheXinXi.name }}
+      </div>
+      <div>
+        身份证号:{{ huanZheXinXi.socialNo }}
+      </div>
+      <div>
+        出生日期:{{ huanZheXinXi.birthDate }} {{ huanZheXinXi.age }} 岁
+      </div>
+      <div>
+        性别:{{ huanZheXinXi.sexName }}
+      </div>
+      <div>
+        联系电话:{{ huanZheXinXi.homeTel }}
+      </div>
+      <div>
+        入院日期:{{ huanZheXinXi.admissDate }}
+        {{ huanZheXinXi.actIptDays }}天
+      </div>
+    </div>
+
+    <div class="box">
+      <div>
+        管床医生:{{ huanZheXinXi.referPhysicianName }}
+      </div>
+      <div>
+        病区:{{ huanZheXinXi.admissWardName }}
+      </div>
+      <div>
+        入院医生:{{ huanZheXinXi.admissPhysicianName }}
+      </div>
+      <div>
+        入院诊断:{{ huanZheXinXi.admissDiagStr }}
+      </div>
+      <div>
+        小科室:{{ huanZheXinXi.smallDeptName }}
+      </div>
+      <div>
+        身份:{{ huanZheXinXi.medTypeName }}
+      </div>
+
+    </div>
+
+    <div class="box">
+      <div>
+        总费用:{{ huanZheXinXi.totalCharge }} {{ huanZheXinXi.balance }} 岁
+      </div>
+      <div>
+        药品占比:{{ huanZheXinXi.yp }}
+      </div>
+      <div>
+        检验检查:{{ huanZheXinXi.jyjc }}
+      </div>
+      <div>
+        医保:{{ huanZheXinXi.chargeYb }} {{ huanZheXinXi.yb }}
+      </div>
+    </div>
   </div>
 
 </template>

+ 17 - 2
src/components/zhu-yuan-yi-sheng/public/PatientList.vue

@@ -18,8 +18,21 @@
             @row-contextmenu="settingUpAThirdLevelDoctor"
   >
     <el-table-column label="床" prop="bedNo" width="30"/>
-    <el-table-column label="姓名" width="70" prop="name"/>
-    <el-table-column label="住院号" prop="inpatientNo" width="65"/>
+    <el-table-column label="姓名" width="70" prop="name">
+      <template #default="{row}">
+        {{ row.name }}
+        <span v-if="row.orderNoCount > 0" style="color: red">
+              {{ row.orderNoCount }}
+          </span>
+      </template>
+    </el-table-column>
+    <el-table-column label="住院号" prop="inpatientNo" width="65">
+      <template #default="{row}">
+        <div :style="{color: row.dismissOrder ===1 ? 'red' : '#19e63c'}">
+          {{ row.inpatientNo }}
+        </div>
+      </template>
+    </el-table-column>
     <el-table-column label="性别" prop="sex" width="65">
       <template #default="scope">
         {{ cptSex(scope.row.sex) }}
@@ -94,6 +107,8 @@ onMounted(() => {
 </script>
 
 <style scoped lang="scss">
+
+
 .el_table__current {
   background-color: #a7d3ff;
 }

+ 115 - 163
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/table/YzTable.vue

@@ -1,89 +1,54 @@
 <template>
-  <div class="el-table__yz">
-    <el-table :data="tempYzData"
-              :height="400"
-              @row-click="rowClick"
-              row-key="actOrderNo"
-              ref="elTableRef"
-              @selection-change="selectedRow"
-              :row-class-name="rowStyle">
-      <el-table-column :width="30" type="selection"/>
-      <el-table-column :width="20" prop="orderGroup" label="组"/>
-      <el-table-column :width="20" prop="statusFlag" label="状态">
-        <template #default="scope">
-          <div v-html="getYiZhuFlag(scope.row.statusFlag)"></div>
-        </template>
-      </el-table-column>
-      <el-table-column label="医嘱号" prop="actOrderNo">
-        <template #default="scope">
-          <div v-html="errorOrderNo(scope.row)"></div>
-        </template>
-      </el-table-column>
-      <el-table-column label="医嘱名称" prop="orderName" width="120" show-overflow-tooltip/>
-      <el-table-column label="频率" prop="frequCode"/>
-      <el-table-column label="给药方式" prop="supplyCodeName"/>
-      <el-table-column label="剂量">
-        <template #default="scope">
-          {{ scope.row.dose }} {{ scope.row.doseUnitName }}
-        </template>
-      </el-table-column>
-      <el-table-column label="开始时间">
-        <template #default="scope">
-          <div v-html="timeFomat(scope.row.startTime)"></div>
-        </template>
-      </el-table-column>
-      <el-table-column label="结束时间">
-        <template #default="scope">
-          <div v-html="timeFomat(scope.row.endTime)"></div>
-        </template>
-      </el-table-column>
-      <el-table-column label="医嘱时间">
-        <template #default="scope">
-          <div v-html="timeFomat(scope.row.orderTime)"></div>
-        </template>
-      </el-table-column>
-      <el-table-column label="紧急" width="40" prop="emergencyFlag">
-        <template #header>
-          紧急
-        </template>
-        <template #default="scope">
-          {{ scope.row.emergencyFlag === '1' ? '√' : '' }}
-        </template>
-      </el-table-column>
-      <el-table-column label="自费" width="40" prop="ybSelfFlag">
-        <template #header>
-          自费
-        </template>
-        <template #default="scope">
-          {{ scope.row.ybSelfFlag === '1' ? '√' : '' }}
-        </template>
-      </el-table-column>
-      <el-table-column label="医生" prop="physicianName"/>
-      <el-table-column label="费用标志" prop="selfBuyName"/>
-      <el-table-column label="执行科室" prop="execUnitName"/>
-      <el-table-column label="领量">
-        <template #default="scope">
-          {{ scope.row.drugQuan }}
-          {{ scope.row.drugQuanName }}
-        </template>
-      </el-table-column>
-      <el-table-column label="药房" prop="groupNoName"/>
-      <el-table-column label="序号" prop="serialName"/>
-      <el-table-column label="嘱托" prop="instruction" show-overflow-tooltip width="70"/>
-      <el-table-column label="父医嘱" prop="parentNo"/>
-    </el-table>
+  <div>
+    <table>
+      <colgroup>
+        <col v-for="item in header" :style="{width: item.width + 'px'}"/>
+      </colgroup>
+      <thead>
+      <tr>
+        <th v-for="item in header">
+          {{ item.name }}
+        </th>
+      </tr>
+      </thead>
+    </table>
+
+    <el-scrollbar :height="maxHeight" @scroll="scroll">
+      <div style="display: flex">
+        <div :style="{height: virtualHeight + 'px'}">
+        </div>
+        <div :style="{transform: `translateY(${translateY})`}" style="height: 100%">
+          <table>
+            <colgroup>
+              <col v-for="item in header" :style="{width: item.width + 'px'}"/>
+            </colgroup>
+            <tbody>
+            <tr v-for="(item,index) in tempYzData.slice(startIndex, startIndex + itemCount)"
+                @click="rowClick(item)">
+              <td v-for="he in header" :title="item[he.code]">
+                <div v-if="he.func" v-html="he.func(item,startIndex + index)"/>
+                <div v-else>
+                  {{ item[he.code] }}
+                </div>
+              </td>
+            </tr>
+            </tbody>
+          </table>
+        </div>
+      </div>
+    </el-scrollbar>
+
+
   </div>
 </template>
 
-<script setup name='YzTable'>
+<script setup name='YzTable' lang="tsx">
 import {stringIsBlank} from "@/utils/blank-utils";
 import {
-  selectedData,
-  yiZhuData,
   tempYzData
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {getFormatDatetime} from "@/utils/date";
-import XcCheckbox from "@/components/xiao-chan/checkbox/XcCheckbox";
+import {defineProps, defineEmits, ref, watch} from 'vue'
 
 const props = defineProps({
   data: {
@@ -93,9 +58,14 @@ const props = defineProps({
 
 const emit = defineEmits(['rowClick'])
 
-const index = 0
 const header = [
-  {code: 'orderGroup', name: '组'},
+  {
+    func: (val, index) => (
+        <div>{index}</div>
+    ),
+    width: 20
+  },
+  {code: 'orderGroup', name: '组', width: 10},
   {
     code: 'statusFlag', name: '状态', func: (val) => {
       return getYiZhuFlag(val.statusFlag)
@@ -111,61 +81,49 @@ const header = [
       }
     }
   },
-  {code: 'orderName', name: '医嘱名称', width: 200},
+  {code: 'orderName', name: '医嘱名称', width: 120},
   {
     code: 'dose', name: '剂量', width: 40, func: (val) => {
       return nu(val.dose) + ' ' + nu(val.doseUnitName)
     }
   },
   {code: 'frequCode', name: '频率', width: 42},
-  {code: 'supplyCodeName', name: '给药方式'},
+  {code: 'supplyCodeName', name: '给药方式', width: 50},
   {
-    code: 'startTime', name: '开始时间', width: 60, func: (val) => {
+    code: 'startTime', name: '开始时间', width: 45, func: (val) => {
       return timeFomat(val.startTime)
     }
   },
   {
-    code: 'endTime', name: '结束时间', width: 60, func: (val) => {
+    code: 'endTime', name: '结束时间', width: 45, func: (val) => {
       return timeFomat(val.endTime)
     }
   },
-  {
-    code: 'orderTime', name: '医嘱时间', width: 60, func: (val) => {
-      return timeFomat(val.orderTime)
-    }
-  },
   {
     code: 'emergencyFlag', name: '紧急', func: (val) => {
       return `${val.emergencyFlag === '1' ? '√' : ''}`
-    }
+    },
+    width: 20
+
   },
-  {code: 'ybSelfFlag', name: '医保自费'},
-  {code: 'physicianName', name: '医生'},
-  {code: 'selfBuyName', name: '费用标志'},
-  {code: 'execUnitName', name: '执行科室'},
+  {code: 'ybSelfFlag', name: '自费', width: 20},
+  {code: 'physicianName', name: '医生', width: 30},
+  {code: 'selfBuyName', name: '费用标志', width: 30},
+  {code: 'execUnitName', name: '执行科室', width: 40},
   {
     code: 'drugQuan', name: '领量', func: (val) => {
       return nu(val.drugQuan) + nu(val.drugQuanName)
-    }
+    },
+    width: 20
   },
-  {code: 'groupNoName', name: '药房'},
-  {code: 'serialName', name: '序号'},
-  {code: 'instruction', name: '嘱托', width: 200},
-  {code: 'parentNo', name: '父医嘱'},
-]
-
-const tableRef = ref()
+  {code: 'groupNoName', name: '药房', width: 50},
+  {code: 'serial', name: '序号', width: 20},
+  {code: 'instruction', name: '嘱托', width: 120},
+  // {code: 'parentNo', name: '父医嘱', width: 30},
+];
 
 const timeFomat = (val) => {
-  if (val) {
-    let temp = val.split(" ")
-    return `${temp[0]}<br>${temp[1]}`
-  }
-  // return `${getFormatDatetime(val, "YY-MM-DD HH:mm")}`;
-}
-
-const emergencySign = (val) => {
-  console.log(val)
+  return getFormatDatetime(val, 'YY-MM-DD HH:mm')
 }
 
 const errorOrderNo = (val) => {
@@ -177,26 +135,38 @@ const errorOrderNo = (val) => {
 }
 
 
-const setBackgroundColor = (item) => {
-  if (yiZhuData.value.actOrderNo == item.actOrderNo) {
-    return {
-      'backgroundColor': 'rgba(0,58,241,0.68)',
-      'color': '#fff'
-    }
-  }
-}
-const setWidth = (val) => {
-  if (val.width) {
-    return {
-      'width': val.width + 'px'
-    }
-  }
+// div 的最大高度
+const maxHeight = ref(400)
+// 开始位置
+const startIndex = ref(0)
+// 可以看见 的 内容大小
+const itemCount = ref(0)
+//  实际的高度
+const virtualHeight = ref(0)
+// 每一个 元素的大小
+const itemHeight = ref(24)
+// 偏移量
+const translateY = ref('0px')
+
+const scrollStyle = ref({})
+
+const scroll = ({scrollTop}) => {
+  translateY.value = scrollTop + 'px'
+  startIndex.value = Math.floor(scrollTop / itemHeight.value)
 }
 
-const rowClick = (val, index) => {
+const rowClick = (val) => {
   emit('rowClick', val)
 }
 
+watch(() => tempYzData.value, (oldData, newData) => {
+  if (oldData.length !== newData.length) {
+    itemCount.value = Math.ceil(maxHeight.value / itemHeight.value)
+    virtualHeight.value = itemHeight.value * tempYzData.value.length
+  }
+})
+
+
 const nu = (val) => {
   if (val === null) {
     return ''
@@ -207,19 +177,6 @@ const nu = (val) => {
   }
 }
 
-const elTableRef = ref(null)
-const rowStyle = ({row}) => {
-  if (row.actOrderNo === yiZhuData.value.actOrderNo) {
-    return 'current_order_no'
-  }
-}
-
-
-const selectedRow = (val) => {
-  selectedData.value = val
-}
-
-
 function getYiZhuFlag(val) {
   if (stringIsBlank(val)) {
     return val
@@ -243,38 +200,33 @@ function getYiZhuFlag(val) {
 </script>
 
 <style scoped lang="scss">
-.el-table__yz {
-  :deep(.el-table .current_order_no) {
-    background: rgba(0, 58, 241, 0.68);
-    color: #fff;
-  }
-}
-
-
-.table {
-  width: 100%;
-}
-
 table {
-  border-collapse: collapse;
-  border-spacing: 0;
-}
-
-table, tbody {
   width: 100%;
-  cursor: default;
-}
-
+  border-spacing: 0;
+  border-collapse: separate;
+  table-layout: fixed;
 
-tbody {
+  tr, td, th {
+    border: 1px solid #fff;
+  }
 
   td {
-    white-space: nowrap;
-    text-overflow: ellipsis;
-    overflow: hidden;
-    line-height: 40px;
+    height: 20px;
+    width: 100%;
+    word-break: keep-all; /* 不换行 */
+    white-space: nowrap; /* 不换行 */
+    overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
+    text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*/
   }
+
+
 }
 
+.el-table__yz {
+  :deep(.el-table .current_order_no) {
+    background: rgba(0, 58, 241, 0.68);
+    color: #fff;
+  }
+}
 
 </style>

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

@@ -321,7 +321,7 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
   }
   await fuYiZhuClick()
   qingKong()
-  await Sleep(200)
+  await Sleep(300)
   yiZhuData.value = row
   if (tempOrderNo !== null) {
     yiZhuData.value.actOrderNo = tempOrderNo;
@@ -605,7 +605,6 @@ const qingKong = () => {
     kfFlag: null,
     selfBuy: null,
     ybSelfFlag: '0',
-    ybSelfFlagBoolean: false,
     emergencyFlag: '0',
     drugQuan: 0,
     miniUnitName: '',
@@ -645,12 +644,14 @@ const toAddAnOrder = async () => {
     qingKong()
     return
   }
+
   let param = {
     inpatientNo: props.patientInfo.inpatientNo,
     admissTimes: props.patientInfo.admissTimes,
     actOrderNo: yiZhuData.value.actOrderNo,
     data: yiZhuData.value
   }
+  console.log(param)
   try {
     let res = await enterOrders(param)
     if (res !== null && res.error) {

+ 62 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -1,5 +1,37 @@
 <template>
-  <page-layer>
+
+  <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">
+    <div style=" width: 158px">
+      <patient-list/>
+    </div>
+    <div style="flex: 1">
+      <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>
+  </div>
+
+  <page-layer v-if="false">
 
     <template #headerBlock>
       <huan-zhe-xin-xi v-show="basicPatientInformation" :huan-zhe-xin-xi="patientInfo"></huan-zhe-xin-xi>
@@ -9,7 +41,6 @@
       <div style="display: inline-block;width: 158px">
         <patient-list/>
       </div>
-
     </template>
 
     <template #main>
@@ -90,8 +121,8 @@ let pathList = $ref([
 const currentPagePosition = (val) => {
   if (router.currentRoute.value.path === val) {
     return {
-      backgroundColor: 'white',
-      color: '#0a84fd'
+      backgroundColor: '#0a84fd',
+      color: '#fff'
     }
   }
 }
@@ -100,6 +131,33 @@ const currentPagePosition = (val) => {
 </script>
 
 <style lang="scss" scoped>
+
+.yz__header {
+  position: relative;
+
+  .yz__close {
+    position: absolute;
+    right: 0;
+    border: 1px solid;
+  }
+
+}
+
+.yz__main {
+  display: flex;
+
+  .tag {
+    display: flex;
+    width: 100%;
+
+    div {
+      padding: 5px 20px;
+      border: 1px solid;
+      cursor: default;
+    }
+  }
+}
+
 :deep(el-tabs el-tabs--top demo-tabs) {
   background-color: white;
 }

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

@@ -472,7 +472,9 @@ onMounted(() => {
   nextTick(async () => {
     emrSidebarRef.value.queryData()
     patientId = props.huanZheXinXi.inpatientNo
-    currentEmr.value = new EMRInteractive(JSON.stringify(patientData), emrEvent);
+    await queryingBasicPatientInformation()
+    console.log(patientData)
+    currentEmr.value = new EMRInteractive(patientData, emrEvent);
     emrSnippetRef.value.setPatientData(patientData)
     emrRef.value.parentElement.emr = currentEmr.value
     window.addEventListener('beforeunload', monitorPageRefresh, {capture: true})

+ 0 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -95,7 +95,6 @@ export const yiZhuData = ref({
     kfFlag: null,
     selfBuy: null,
     ybSelfFlag: '0',
-    ybSelfFlagBoolean: false,
     emergencyFlag: '0',
     drugQuan: 0,
     miniUnitName: '',

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

@@ -28,7 +28,7 @@
       />
     </div>
 
-    <div>
+    <div style="width: 100%;height: 500px;overflow: hidden">
       <yz-table :data="tempYzData" @rowClick="rowClick"/>
     </div>
 
@@ -65,7 +65,6 @@
         ref="mubanRef"
         @muBanShuJu="muBanShuJu"/>
 
-
   </div>
 
 

+ 4 - 1
vite.config.js

@@ -8,7 +8,6 @@ import VueSetupExtend from 'vite-plugin-vue-setup-extend'
 import AutoImport from 'unplugin-auto-import/vite'
 import Icons from "unplugin-icons/vite";
 
-
 const pathResolve = (dir) => {
     return resolve(__dirname, '.', dir)
 }
@@ -18,6 +17,10 @@ const alias = {
 }
 
 export default defineConfig({
+    esbuild: {
+        jsxFactory: 'h',
+        jsxFragment: 'Fragment'
+    },
     externals: {
         "BMap": "BMap",
         "BMapLib": "BMapLib"

Some files were not shown because too many files changed in this diff