Selaa lähdekoodia

病案首页添加“只看我的病人”功能

lighter 1 vuosi sitten
vanhempi
commit
13ab47bb8c

+ 25 - 7
src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue

@@ -35,20 +35,20 @@
       <aside class="layout_el-table">
         <el-table
             ref="asideTable"
-            :data="overview"
+            :data="cptOverviews"
             height="100%"
             stripe
             highlight-current-row
             @row-click="handleClickOverview"
         >
-          <el-table-column prop="bedNo" label="床" width="30"></el-table-column>
-          <el-table-column label="姓名" width="70">
+          <el-table-column prop="bedNo" label="床号" width="40"></el-table-column>
+          <el-table-column label="姓名" width="75">
             <template #default="scope">
               <img class="sex-icon" :src="scope.row.sex === 1 ? maleIcon : femaleIcon"/>
               {{ scope.row.name }}
             </template>
           </el-table-column>
-          <el-table-column label="住院号-次数" width="80">
+          <el-table-column label="住院号-次数" width="85">
             <template #default="scope">
               <span style="font-weight: bold; color: black">
                 {{ scope.row.bah }}
@@ -56,7 +56,12 @@
               -{{ scope.row.times }}
             </template>
           </el-table-column>
-          <el-table-column prop="doctorName" label="医生" width="55"></el-table-column>
+          <el-table-column prop="doctorName" label="医生" width="90">
+            <template #header>
+              <span style="margin-right: 8px">医生</span>
+              <el-checkbox v-model="onlyShowMyPatients">我的</el-checkbox>
+            </template>
+          </el-table-column>
         </el-table>
       </aside>
       <div style="width: 780px;padding: 0 20px;overflow-y:scroll; position: relative" id="scrollWrapper">
@@ -1128,11 +1133,13 @@ import AuditHistory from "@/components/inpatient/frontsheet-printpage/AuditHisto
 import {useUserStore} from "@/pinia/user-store";
 import HistorySheetExport from "@/views/hospitalization/case-front-sheet/component/HistorySheetExport.vue";
 
+const userStore = useUserStore()
 const userWards = ref([])
 const currentWard = ref('')
 const inOutStatus = ref(1)
 const inOutOptions = initInOutOptions()
 const inpatientNo = ref('')
+const onlyShowMyPatients = ref(false)
 const overview = ref([])
 const patient = ref({
   disdiagList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
@@ -1144,6 +1151,15 @@ const showGoSearchBtn2 = ref(false)
 const showDel = initShowDel()
 const asideTable = ref(null)
 
+const cptOverviews = computed(() => {
+  return overview.value.filter(item => {
+    if (onlyShowMyPatients.value) {
+      return item.doctorCode === userStore.userInfo.code
+    }
+    return true
+  })
+})
+
 const filterDisDiagList = computed(() => {
   return patient.value.disdiagList.filter(item => {
     return item.code && item.name
@@ -1460,8 +1476,6 @@ const showSearchSurgerior = (flag, index) => {
   showSearch.value = true
 }
 
-const userStore = useUserStore()
-
 const diseFamilyGrade = ref(null)
 const ybDiag = reactive({})
 const cyzgs = initCyzgs()
@@ -2062,6 +2076,10 @@ function initDiagTypes() {
   padding-bottom: 4px;
 }
 
+:deep(.el-checkbox__label) {
+  padding-left: 2px;
+}
+
 select,
 input {
   outline: none;