瀏覽代碼

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 年之前
父節點
當前提交
c65024e66c

+ 20 - 9
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

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

+ 2 - 2
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

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