Browse Source

病案首页可以增加手术数量

lighter 10 months ago
parent
commit
f126831a6c
1 changed files with 20 additions and 6 deletions
  1. 20 6
      src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue

+ 20 - 6
src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue

@@ -558,19 +558,27 @@
               <th>I助</th>
               <th>II助</th>
             </tr>
-            <tr v-for="n in 5" :key="n">
+            <tr v-for="n in defaultSurgerySize" :key="n">
               <td style="border: none; width: 25px">
                 <div v-if="patient.surgeryList[n - 1].name">
                   <div
                       v-if="n > 1"
-                      class="sxjt"
+                      class="order-arrow"
                       @click="changeSurgeryOrder(n - 1, n - 2)">↑</div>
                   <div
-                      v-if="n < 5 && patient.surgeryList[n].name"
-                      class="sxjt"
+                      v-if="n < defaultSurgerySize && patient.surgeryList[n].name"
+                      class="order-arrow"
                       style="margin-top: 5px"
                       @click="changeSurgeryOrder(n - 1, n)"
                   >↓</div>
+                  <div
+                      v-if="n === defaultSurgerySize"
+                      class="order-arrow"
+                      style="margin-top: 4px"
+                      @click="addSurgeSize"
+                  >
+                    +
+                  </div>
                 </div>
               </td>
               <td style="padding: 3px">
@@ -1154,12 +1162,18 @@ const patient = ref({
   disdiagList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
   surgeryList: [{}, {}, {}, {}, {}],
 })
+const defaultSurgerySize = ref(5)
 const dics = ref({})
 const showGoSearchBtn1 = ref(false)
 const showGoSearchBtn2 = ref(false)
 const showDel = initShowDel()
 const asideTable = ref(null)
 
+function addSurgeSize() {
+  patient.value.surgeryList.push({})
+  defaultSurgerySize.value += 1
+}
+
 const cptOverviews = computed(() => {
   return overview.value.filter(item => {
     if (onlyShowMyPatients.value) {
@@ -2213,11 +2227,11 @@ table td {
   color: #e8b600;
 }
 
-.sxjt {
+.order-arrow {
   font-size: 16px;
   cursor: pointer;
 }
-.sxjt:hover {
+.order-arrow:hover {
   color: #0a84fd;
 }
 </style>