Преглед на файлове

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx преди 4 години
родител
ревизия
c65024e66c
променени са 2 файла, в които са добавени 22 реда и са изтрити 11 реда
  1. 20 9
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  2. 2 2
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue

+ 20 - 9
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Целия файл

@@ -103,7 +103,7 @@
103 103
           <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
104 104
             <el-tabs class="rightTabs" v-model="activeName">
105 105
               <el-tab-pane label="药品列表" name="1">
106
-                <el-table :data="drugs" border @select='selectDrugs' style="width: 100%;"
106
+                <el-table ref="multipleTable" :data="drugs" border @select='selectDrugs' style="width: 100%;"
107 107
                           :row-style="{ color: '#303133' }"
108 108
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
109 109
                           highlight-current-row>
@@ -121,7 +121,7 @@
121 121
 
122 122
               </el-tab-pane>
123 123
               <el-tab-pane label="医嘱模板" name="2">
124
-                <el-table :data="advices_template" border style="width: 100%;" :row-style="{ color: '#303133' }"
124
+                <el-table  ref="multipleTableTwo" :data="advices_template" border style="width: 100%;" :row-style="{ color: '#303133' }"
125 125
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
126 126
                           highlight-current-row>
127 127
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
@@ -421,7 +421,6 @@
421 421
           name: newTabName,
422 422
           advices: [],
423 423
           project:[],
424
-          projects:[]
425 424
 
426 425
         })
427 426
         this.editableTabsValue = newTabName
@@ -492,21 +491,33 @@
492 491
       },
493 492
       comfirm() {
494 493
         this.preDrugs = this.curDrugs
495
-
494
+        console.log(this.prescriptions)
496 495
         for (let i = 0; i < this.prescriptions.length; i++){
497
-          console.log("名称",this.prescriptions[i].name)
498
-          console.log("名称2",this.editableTabsValue)
499 496
           if(this.prescriptions[i].name == this.editableTabsValue){
500 497
            var temp =  this.deepClone(this.preDrugs)
501 498
             var temp2 =  this.deepClone(this.teamList)
499
+            console.log(this.prescriptions[i].advices)
500
+            console.log(this.prescriptions[i].project)
501
+
502
+            console.log(temp)
503
+            console.log(temp2)
504
+
502 505
 
503
-            this.prescriptions[i].advices = temp
504
-            this.prescriptions[i].project = temp2
506
+            if(temp.length > 0){
507
+              for (let b = 0; b < temp.length; b++){
508
+                this.prescriptions[i].advices.push(temp[b])
509
+              }
510
+            }
511
+            if(temp2.length > 0){
512
+              for (let b = 0; b < temp2.length; b++) {
513
+                this.prescriptions[i].project.concat(temp2[b])
514
+              }
515
+            }
505 516
             this.curPrescriptions = this.prescriptions[i]
517
+            this.$refs.multipleTable.clearSelection();
506 518
             // this.$refs.prescription_tables.setNewData(this.prescriptions[i])
507 519
           }
508 520
         }
509
-        console.log("222222",this.prescriptions)
510 521
       },
511 522
       selectChange(row){
512 523
         this.teamList = row

+ 2 - 2
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Целия файл

@@ -189,7 +189,7 @@
189 189
                 let obj = {
190 190
                   name: "处方" + index,
191 191
                   advices: prescription.advices,
192
-                  projects: prescription.project,
192
+                  project: prescription.project,
193 193
                 }
194 194
                 this.prescriptions.push(obj)
195 195
               }
@@ -197,7 +197,7 @@
197 197
               let obj = {
198 198
                 name: "处方" + 1,
199 199
                 advices: [],
200
-                projects: [],
200
+                project: [],
201 201
               }
202 202
               this.prescriptions.push(obj)
203 203
             }