Browse Source

HIS 系统提交

XMLWAN 4 years ago
parent
commit
d309d113c5

+ 18 - 0
src/api/project/project.js View File

242
      methods:"get",
242
      methods:"get",
243
      params:params
243
      params:params
244
   })
244
   })
245
+}
246
+
247
+export function getPojectListById(params){
248
+  
249
+  return request({
250
+    url:"/api/his/getprojectlistbyid",
251
+    methods:"get",
252
+    params:params 
253
+  })
254
+}
255
+
256
+export function getHisPatientHistory(params){
257
+  
258
+    return request({
259
+        url:"/api/his/gethispatienthistory",
260
+        methods:"get",
261
+        params:params
262
+    })
245
 }
263
 }

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue View File

18
         </el-table>
18
         </el-table>
19
         <div slot="footer" class="dialog-footer">
19
         <div slot="footer" class="dialog-footer">
20
             <el-button @click="hide">取 消</el-button>
20
             <el-button @click="hide">取 消</el-button>
21
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
21
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
22
         </div>
22
         </div>
23
     </el-dialog>         
23
     </el-dialog>         
24
 </template>
24
 </template>

+ 117 - 30
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

11
     <div class="backColor"></div>
11
     <div class="backColor"></div>
12
     <div class="mainCenter">
12
     <div class="mainCenter">
13
       <div class="centerLeft">
13
       <div class="centerLeft">
14
-        <el-form :model="form" :rules="rules" ref="form" label-width="80px">
14
+        <el-form :model="form"  ref="form" label-width="80px">
15
           <el-form-item label="姓名:" prop="name">
15
           <el-form-item label="姓名:" prop="name">
16
             <el-input v-model="patientInfo.name" placeholder=""></el-input>
16
             <el-input v-model="patientInfo.name" placeholder=""></el-input>
17
           </el-form-item>
17
           </el-form-item>
28
               v-model="state1"
28
               v-model="state1"
29
               :fetch-suggestions="querySearch"
29
               :fetch-suggestions="querySearch"
30
               placeholder="请输入内容"
30
               placeholder="请输入内容"
31
-              @select="handleSelect"
32
             ></el-autocomplete>
31
             ></el-autocomplete>
33
           </el-form-item>
32
           </el-form-item>
34
           <el-form-item label="大病类别: " prop="name">
33
           <el-form-item label="大病类别: " prop="name">
105
               </el-option>
104
               </el-option>
106
             </el-select>
105
             </el-select>
107
           </div>
106
           </div>
108
-          <div style="height:84%;overflow-y: auto;margin-bottom: 60px;">
107
+          <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
109
             <el-tabs class="rightTabs" v-model="activeName">
108
             <el-tabs class="rightTabs" v-model="activeName">
110
               <el-tab-pane label="药品列表" name="1">
109
               <el-tab-pane label="药品列表" name="1">
111
                 <el-table :data="drugs" border @select='selectDrugs' style="width: 100%;"
110
                 <el-table :data="drugs" border @select='selectDrugs' style="width: 100%;"
123
                     <template slot-scope="scope">{{ scope.row.retail_price }}</template>
122
                     <template slot-scope="scope">{{ scope.row.retail_price }}</template>
124
                   </el-table-column>
123
                   </el-table-column>
125
                 </el-table>
124
                 </el-table>
125
+
126
               </el-tab-pane>
126
               </el-tab-pane>
127
               <el-tab-pane label="医嘱模板" name="2">
127
               <el-tab-pane label="医嘱模板" name="2">
128
                 <el-table :data="advices_template" border style="width: 100%;" :row-style="{ color: '#303133' }"
128
                 <el-table :data="advices_template" border style="width: 100%;" :row-style="{ color: '#303133' }"
145
               </el-tab-pane>
145
               </el-tab-pane>
146
             </el-tabs>
146
             </el-tabs>
147
           </div>
147
           </div>
148
+
149
+         <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showTwo">
150
+            <el-tabs class="rightTabs" v-model="activeName">
151
+              <el-tab-pane label="项目列表" name="1">
152
+                 <el-table :data="tabProject" border @select='selectChange' style="width: 100%;"
153
+                          :row-style="{ color: '#303133' }"
154
+                          :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
155
+                          highlight-current-row >
156
+                  <el-table-column align="center" type="selection" width="40"></el-table-column>
157
+                  <el-table-column align="center" prop="name" label="名称">
158
+                    <template slot-scope="scope">{{ scope.row.project_name }}</template>
159
+                  </el-table-column>
160
+                  <el-table-column align="center" label="规格" width="60">
161
+                    <template slot-scope="scope">{{ scope.row.single_dose }}</template>
162
+                  </el-table-column>
163
+                  <el-table-column align="center" label="单价" width="40">
164
+                    <template slot-scope="scope">{{ scope.row.price }}</template>
165
+                  </el-table-column>
166
+                </el-table>
167
+              </el-tab-pane>
168
+              <el-tab-pane label="项目组套" name="2">
169
+                <el-table :data="tabPrjectTeam" border style="width: 100%;" :row-style="{ color: '#303133' }"
170
+                          :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
171
+                          highlight-current-row
172
+                         @select='selectTeam'>
173
+                  <el-table-column align="center" type="selection" width="40"></el-table-column>
174
+                  <el-table-column align="center" prop="name" label="名称">
175
+                    <template slot-scope="scope">{{scope.row.project_team}}</template>
176
+                  </el-table-column>
177
+                </el-table>
178
+              </el-tab-pane>
179
+            </el-tabs>
180
+          </div>
181
+
148
           <div class="comfirmBox">
182
           <div class="comfirmBox">
149
             <div>
183
             <div>
150
               <span>药品类型:</span>
184
               <span>药品类型:</span>
154
                   value="0">
188
                   value="0">
155
                 </el-option>
189
                 </el-option>
156
                 <el-option
190
                 <el-option
157
-                  v-for="item,index in getDictionaryDataConfig('system','drug_type')"
191
+                  v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
158
                   :key="index"
192
                   :key="index"
159
                   :label="item.name"
193
                   :label="item.name"
160
                   :value="item.id">
194
                   :value="item.id">
180
   import selectTemplate from './selectTemplate'
214
   import selectTemplate from './selectTemplate'
181
   import saveTemplate from './saveTemplate'
215
   import saveTemplate from './saveTemplate'
182
   import additionalCharges from './additionalCharges'
216
   import additionalCharges from './additionalCharges'
183
-  import { getHisProject,addProjectTeam } from '@/api/project/project'
217
+  import { getHisProject,addProjectTeam,getAllProjectTeam,getPojectListById } from '@/api/project/project'
184
   // import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
218
   // import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
185
 
219
 
186
   export default {
220
   export default {
229
         customTabIndex:1,
263
         customTabIndex:1,
230
         options:[],
264
         options:[],
231
         tabProject:[],
265
         tabProject:[],
232
-        strids:""
266
+        strids:"",
267
+        showOne:true,
268
+        showTwo:false,
269
+        tableData:[],
270
+        tabPrjectTeam:[],
271
+        teamList:[],
233
       }
272
       }
234
     },
273
     },
235
     methods: {
274
     methods: {
274
                 this.customTabIndex = 1
313
                 this.customTabIndex = 1
275
               }
314
               }
276
               if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
315
               if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
316
+               
277
                 this.customTabIndex = 2
317
                 this.customTabIndex = 2
278
               }
318
               }
279
 
319
 
349
           this.$nextTick(() => {
389
           this.$nextTick(() => {
350
             this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
390
             this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
351
           });
391
           });
392
+         this.customTabIndex = 1
352
         }
393
         }
353
         if(index == 2){
394
         if(index == 2){
354
           this.showTwo = true
395
           this.showTwo = true
355
           this.showOne = false
396
           this.showOne = false
397
+           this.$nextTick(() => {
398
+            this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
399
+          });
400
+         this.customTabIndex = 2
356
         }
401
         }
357
         this.rightTab = index
402
         this.rightTab = index
358
 
403
 
359
 
404
 
360
         //用来区分处方属于项目还是药品
405
         //用来区分处方属于项目还是药品
361
         if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.projects.length == 0){
406
         if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.projects.length == 0){
407
+        
362
           this.customTabIndex = 1
408
           this.customTabIndex = 1
363
         }
409
         }
364
         if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
410
         if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
411
+         
365
           this.customTabIndex = 2
412
           this.customTabIndex = 2
366
         }
413
         }
367
         if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length == 0){
414
         if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length == 0){
381
       },
428
       },
382
       comfirm() {
429
       comfirm() {
383
         this.preDrugs = this.curDrugs
430
         this.preDrugs = this.curDrugs
384
-        console.log(this.editableTabsValue)
431
+        
385
         for (let i = 0; i < this.prescriptions.length; i++){
432
         for (let i = 0; i < this.prescriptions.length; i++){
433
+          console.log("名称",this.prescriptions[i].name)
434
+          console.log("名称2",this.editableTabsValue)
386
           if(this.prescriptions[i].name == this.editableTabsValue){
435
           if(this.prescriptions[i].name == this.editableTabsValue){
387
             this.prescriptions[i].advices = this.preDrugs
436
             this.prescriptions[i].advices = this.preDrugs
437
+            this.prescriptions[i].project = this.teamList
388
             this.curPrescriptions = this.prescriptions[i]
438
             this.curPrescriptions = this.prescriptions[i]
389
             // this.$refs.prescription_tables.setNewData(this.prescriptions[i])
439
             // this.$refs.prescription_tables.setNewData(this.prescriptions[i])
390
           }
440
           }
391
         }
441
         }
392
-
393
-
394
-        // console.log(this.prescriptions)
442
+        console.log("222222",this.prescriptions)
395
       },
443
       },
396
       selectChange(row){
444
       selectChange(row){
397
-        // console.log("row222",row)
398
-        var ids = []
399
-        for(let i=0;i<row.length;i++){
400
-          ids.push(row[i].id)
401
-        }
402
-        console.log("ids",ids)
403
-        var strids = ids.join(",")
404
-        this.strids = strids
445
+        this.teamList = row
405
       },
446
       },
406
-      addProjectTeam(){
407
-        var params = {
408
-          strids:this.strids
409
-        }
410
-        addProjectTeam(params).then(response=>{
411
-          if(response.data.state == 1){
412
-            var team = response.data.data.team
413
-            console.log("team",team)
414
-          }
415
-        })
416
-      }, getlist(){
447
+      getlist(){
417
         getHisProject().then(response=>{
448
         getHisProject().then(response=>{
418
           if(response.data.state == 1){
449
           if(response.data.state == 1){
419
             var project = response.data.data.project
450
             var project = response.data.data.project
422
           }
453
           }
423
         })
454
         })
424
       },
455
       },
425
-    },created(){
456
+      querySearch(){
457
+
458
+      },
459
+      getAllProjectTeam(){
460
+        getAllProjectTeam().then(response=>{
461
+          if(response.data.state == 1){
462
+            var team =  response.data.data.team
463
+            console.log("team",team)
464
+            this.tabPrjectTeam = team
465
+          }
466
+        })  
467
+      },
468
+      selectTeam(row){
469
+          var arr = []
470
+          for(let i=0;i<row.length;i++){
471
+             arr.push(row[i].project_id)
472
+          }
473
+        var ids =  arr.join(",")
474
+        console.log("ids",ids)
475
+        var strArr = ids.split(",")
476
+        var res = [];//接收不重复的数据
477
+      
478
+        for (var i = 0; i<strArr.length; i++){
479
+        var flag = true;
480
+       
481
+        for (var j = 0; j<i; j++){
482
+          if(strArr[i]===strArr[j]){
483
+            flag = false;
484
+            break;
485
+           }
486
+         }
487
+        if(flag){
488
+          res.push(strArr[i])
489
+         }
490
+        }
491
+        console.log("res",res)
492
+      
493
+        var idstr =  res.join(",")
494
+        console.log("idstr",idstr)
495
+        const params = {
496
+           project_id:idstr
497
+        }
498
+        getPojectListById(params).then(response=>{
499
+           if(response.data.state == 1){
500
+             var project =  response.data.data.project
501
+             console.log("project222",project)
502
+             this.teamList = []
503
+             this.teamList = project
504
+           }
505
+        })
506
+      }
507
+    },
508
+    created(){
426
       this.getInitData()
509
       this.getInitData()
427
       //获取所有项目
510
       //获取所有项目
428
       this.getlist()
511
       this.getlist()
512
+      //获取所以项目组套
513
+      this.getAllProjectTeam()
514
+
515
+   
429
     }
516
     }
430
   }
517
   }
431
 </script>
518
 </script>

+ 50 - 71
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

80
         </template>
80
         </template>
81
       </el-table-column>
81
       </el-table-column>
82
     </el-table>
82
     </el-table>
83
-    <el-table v-if="activeType  == 2" :data="prescription.project" border style="width: 98%;" :row-style="{ color: '#303133' }"
83
+
84
+    <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 98%;" :row-style="{ color: '#303133' }"
84
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
85
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
85
       <el-table-column align="center" type="selection" width="40"></el-table-column>
86
       <el-table-column align="center" type="selection" width="40"></el-table-column>
86
-      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
87
-      <el-table-column align="center" prop="name" label="名称">
88
-        <template slot-scope="scope">{{ scope.row.name }}</template>
87
+      <el-table-column align="center" type="index" width="40" label="序号">
88
+         <template slot-scope="scope">
89
+            {{scope.$index + 1}}
90
+         </template>
89
       </el-table-column>
91
       </el-table-column>
90
-      <el-table-column align="center" prop="name" width="50" label="组套">
92
+      <el-table-column align="center" prop="project_name" label="名称">
93
+        <template slot-scope="scope">{{ scope.row.project_name }}</template>
94
+      </el-table-column>
95
+      <el-table-column align="center" prop="statistical_classification" width="50" label="组">
91
         <template slot-scope="scope">
96
         <template slot-scope="scope">
92
-          <!-- <el-select v-model="value" placeholder="">
93
-              <el-option
94
-              v-for="item in newoptions"
95
-              :key="item.value"
96
-              :label="item.label"
97
-              :value="item.value">
98
-              </el-option>
99
-          </el-select> -->
100
-          <el-input v-model="input" placeholder=""></el-input>
97
+          {{getGroup(scope.row.statistical_classification)}}
101
         </template>
98
         </template>
102
       </el-table-column>
99
       </el-table-column>
103
-      <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
100
+      <el-table-column align="center" prop="single_dose" width="130" :label="'单次\n用量'">
104
         <template slot-scope="scope">
101
         <template slot-scope="scope">
105
-          <el-input v-model="input" placeholder=""></el-input>
102
+          <el-input v-model="scope.row.single_dose" placeholder=""></el-input>
106
         </template>
103
         </template>
107
       </el-table-column>
104
       </el-table-column>
108
-      <el-table-column align="center" prop="name" width="50" label="用法">
105
+      <el-table-column align="center" prop="delivery_way" width="130" label="用法">
109
         <template slot-scope="scope">
106
         <template slot-scope="scope">
110
-          <!-- <el-select v-model="value" placeholder="">
111
-              <el-option
112
-              v-for="item in newoptions"
113
-              :key="item.value"
114
-              :label="item.label"
115
-              :value="item.value">
116
-              </el-option>
117
-          </el-select> -->
118
-          <el-input v-model="input" placeholder=""></el-input>
107
+          <el-input v-model="scope.row.delivery_way" placeholder=""></el-input>
119
         </template>
108
         </template>
120
       </el-table-column>
109
       </el-table-column>
121
-      <el-table-column align="center" prop="name" width="50" label="频率">
110
+      <el-table-column align="center" prop="execution_frequency" width="130" label="频率">
122
         <template slot-scope="scope">
111
         <template slot-scope="scope">
123
-          <!-- <el-select v-model="value" placeholder="">
124
-              <el-option
125
-              v-for="item in newoptions"
126
-              :key="item.value"
127
-              :label="item.label"
128
-              :value="item.value">
129
-              </el-option>
130
-          </el-select> -->
131
-          <el-input v-model="input" placeholder=""></el-input>
112
+          <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
132
         </template>
113
         </template>
133
       </el-table-column>
114
       </el-table-column>
134
-      <el-table-column align="center" prop="name" width="50" label="天数">
115
+      <el-table-column align="center" prop="number_days" width="130" label="天数">
135
         <template slot-scope="scope">
116
         <template slot-scope="scope">
136
-          <!-- <el-select v-model="value" placeholder="">
137
-              <el-option
138
-              v-for="item in newoptions"
139
-              :key="item.value"
140
-              :label="item.label"
141
-              :value="item.value">
142
-              </el-option>
143
-          </el-select> -->
144
-          <el-input v-model="input" placeholder=""></el-input>
117
+          <el-input v-model="scope.row.number_days" placeholder=""></el-input>
145
         </template>
118
         </template>
146
       </el-table-column>
119
       </el-table-column>
147
-      <el-table-column align="center" prop="name" width="100" label="总量">
120
+      <el-table-column align="center" prop="total" width="100" label="总量">
148
         <template slot-scope="scope">
121
         <template slot-scope="scope">
149
           <div style="display:flex;">
122
           <div style="display:flex;">
150
-            <el-input v-model="input" style="width:50%" placeholder=""></el-input>
151
-            <!-- <el-select v-model="value" style="width:50%" placeholder="">
152
-                <el-option
153
-                v-for="item in newoptions"
154
-                :key="item.value"
155
-                :label="item.label"
156
-                :value="item.value">
157
-                </el-option>
158
-            </el-select> -->
159
-            <el-input v-model="input" style="width:50%" placeholder=""></el-input>
123
+            <el-input v-model="scope.row.total" style="width:50" placeholder=""></el-input>
160
           </div>
124
           </div>
161
         </template>
125
         </template>
162
       </el-table-column>
126
       </el-table-column>
163
       <el-table-column align="center" prop="name" width="50" label="单价">
127
       <el-table-column align="center" prop="name" width="50" label="单价">
164
         <template slot-scope="scope">
128
         <template slot-scope="scope">
165
-          <el-input v-model="scope.row.unitPrice" placeholder=""></el-input>
129
+          <el-input v-model="scope.row.price" placeholder=""></el-input>
166
         </template>
130
         </template>
167
       </el-table-column>
131
       </el-table-column>
168
-      <el-table-column align="center" prop="name" width="50" label="备注">
132
+      <el-table-column align="center" prop="name" width="120" label="备注">
169
         <template slot-scope="scope">
133
         <template slot-scope="scope">
170
-          <!-- <el-autocomplete
171
-          class="inline-input"
172
-          v-model="state1"
173
-          :fetch-suggestions="querySearch"
174
-          placeholder=""
175
-          @select="handleSelect"
176
-          ></el-autocomplete> -->
134
+           <el-input v-model="scope.row.remark"></el-input>
177
         </template>
135
         </template>
178
       </el-table-column>
136
       </el-table-column>
179
       <el-table-column align="center" width="40" prop="name" label="操作">
137
       <el-table-column align="center" width="40" prop="name" label="操作">
183
       </el-table-column>
141
       </el-table-column>
184
     </el-table>
142
     </el-table>
185
 
143
 
144
+
145
+    
146
+
186
   </div>
147
   </div>
187
 </template>
148
 </template>
188
 
149
 
189
 <script>
150
 <script>
151
+  import { getDictionaryDataConfig} from "@/utils/data";
190
   export default {
152
   export default {
191
     props: {
153
     props: {
192
       preDrugs: Array,
154
       preDrugs: Array,
193
-      activeType: String,
155
+      activeType: Number,
194
       prescription:{
156
       prescription:{
195
         type:Object,
157
         type:Object,
196
         default: function () {
158
         default: function () {
197
           return {
159
           return {
198
             name:"",
160
             name:"",
199
             advices:[],
161
             advices:[],
200
-            projects:[],
162
+            project:[],
201
           };
163
           };
202
         }
164
         }
203
-
204
       },
165
       },
205
     },
166
     },
206
     data() {
167
     data() {
224
           label: '5'
185
           label: '5'
225
         }],
186
         }],
226
         value: '1',
187
         value: '1',
227
-        input: 1
188
+        input: 1,
228
       }
189
       }
229
-    },methods:{
190
+    },
191
+    methods:{
230
       setNewData:function(data){
192
       setNewData:function(data){
231
 
193
 
232
         // this.prescription.advices = data.advices
194
         // this.prescription.advices = data.advices
195
+      },
196
+      getDictionaryDataConfig(module, filed_name) {
197
+        return getDictionaryDataConfig(module, filed_name)
198
+      },
199
+      getGroup(id){
200
+         var name = ""
201
+          var statistics_category =  getDictionaryDataConfig('system','statistics_category') 
202
+          console.log("2235",statistics_category)
203
+          for(let i=0;i<statistics_category.length;i++){
204
+             if(id == statistics_category[i].id){
205
+                 name = statistics_category[i].name
206
+             }
207
+          }
208
+         return name
233
       }
209
       }
234
     },
210
     },
211
+    created(){
212
+      
213
+    },
235
   }
214
   }
236
 </script>
215
 </script>
237
 
216
 

+ 3 - 1
src/xt_pages/outpatientDoctorStation/components/saveTemplate.vue View File

6
         :before-close="_close"
6
         :before-close="_close"
7
     >
7
     >
8
         <div>
8
         <div>
9
-            <el-form :model="form" :rules="rules" class="adviceForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
9
+            <el-form :model="form"  class="adviceForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
10
                 <el-form-item label="创建人 : " style="width: 100%;margin-bottom:0;">
10
                 <el-form-item label="创建人 : " style="width: 100%;margin-bottom:0;">
11
                     医生
11
                     医生
12
                 </el-form-item>
12
                 </el-form-item>
59
             form:{
59
             form:{
60
                 name:''
60
                 name:''
61
             },
61
             },
62
+            radio:"1",
63
+            options:[]
62
         }
64
         }
63
     },
65
     },
64
     methods:{
66
     methods:{

+ 1 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

194
               }
194
               }
195
               this.prescriptions.push(obj)
195
               this.prescriptions.push(obj)
196
             }
196
             }
197
-            console.log()
197
+            console.log("中国22222222",this.prescriptions)
198
             this.$refs.prescriptions.setData(this.prescriptions)
198
             this.$refs.prescriptions.setData(this.prescriptions)
199
           }
199
           }
200
         })
200
         })

+ 91 - 45
src/xt_pages/outpatientRegistration/registrationHistory.vue View File

5
         </div>
5
         </div>
6
         <div class="app-container">
6
         <div class="app-container">
7
             <div class="cell clearfix">
7
             <div class="cell clearfix">
8
-                <el-input style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
8
+                <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/>
9
                 <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
9
                 <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
10
-                <el-date-picker
10
+                <!-- <el-date-picker
11
                 v-model="value1"
11
                 v-model="value1"
12
                 @change="changeTime"
12
                 @change="changeTime"
13
                 style="margin-right:10px;"
13
                 style="margin-right:10px;"
15
                 range-separator="-"
15
                 range-separator="-"
16
                 start-placeholder="开始日期"
16
                 start-placeholder="开始日期"
17
                 end-placeholder="结束日期">
17
                 end-placeholder="结束日期">
18
+                </el-date-picker> -->
19
+                <el-date-picker type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
20
+                    placeholder="选择时间" v-model="start_time" style="width:200px"
21
+                    @change="changeStart"
22
+                 >
23
+                </el-date-picker> -
24
+                <el-date-picker type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
25
+                    placeholder="选择时间" v-model="end_time" style="width:200px"
26
+                    @change="changeEnd"
27
+                 >
18
                 </el-date-picker>
28
                 </el-date-picker>
19
-                <!-- <label class="title"><span class="name">挂号类型</span> : </label>
20
-                <el-select v-model="value" placeholder="请选择" style="width:150px;">
29
+                <label class="title"><span class="name">挂号类型</span> : </label>
30
+                <el-select v-model="register_type" placeholder="请选择" style="width:150px;" @change="changeRegister">
21
                     <el-option
31
                     <el-option
22
-                    v-for="item in options"
32
+                    v-for="item in register"
23
                     :key="item.value"
33
                     :key="item.value"
24
                     :label="item.label"
34
                     :label="item.label"
25
                     :value="item.value">
35
                     :value="item.value">
26
                     </el-option>
36
                     </el-option>
27
-                </el-select> -->
37
+                </el-select>
28
             </div>
38
             </div>
29
             <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
39
             <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
30
                 <el-table-column align="center" type="index" label="序号" width="60">
40
                 <el-table-column align="center" type="index" label="序号" width="60">
97
 <script>
107
 <script>
98
 const moment = require('moment')
108
 const moment = require('moment')
99
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
109
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
110
+import { getHisPatientHistory } from "@/api/project/project"
100
 export default {
111
 export default {
101
     components:{
112
     components:{
102
         BreadCrumb
113
         BreadCrumb
107
                 { path: false, name: '门诊挂号' },
118
                 { path: false, name: '门诊挂号' },
108
                 { path: false, name: '挂号历史' }
119
                 { path: false, name: '挂号历史' }
109
             ],
120
             ],
121
+            register_type:0,
110
             search_input:'',
122
             search_input:'',
111
             value1:'',
123
             value1:'',
112
-            tableData: []
124
+            tableData: [],
125
+            register: [
126
+                {value: 0,label:"全部"},
127
+                {value: 1,label: '普通'},
128
+                {value: 2,label: "主治"},
129
+                {value: 3,label: "主任"},
130
+                {value: 4,label: "免收诊金"},
131
+                {value: 5,label: "专家"}
132
+            ],
133
+            start_time:"",
134
+            end_time:"",
135
+            limit:20,
136
+            page:1,
113
         }
137
         }
114
     },
138
     },
115
     created(){
139
     created(){
116
-        let a = JSON.parse(localStorage.getItem("temp"))
117
-        let arr = []
118
-        a.map(item => {
119
-            if(item.org_id == this.$store.getters.xt_user.org_id){
120
-                item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
121
-                arr.push(item)
122
-            }
140
+        // let a = JSON.parse(localStorage.getItem("temp"))
141
+        // let arr = []
142
+        // a.map(item => {
143
+        //     if(item.org_id == this.$store.getters.xt_user.org_id){
144
+        //         item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
145
+        //         arr.push(item)
146
+        //     }
123
             
147
             
124
-        })
125
-        console.log('aaaaaaaaaaaaaa',a)
126
-        this.tableData = arr
148
+        // })
149
+        // this.tableData = arr
150
+       this.getlist()
127
     },
151
     },
128
     methods:{
152
     methods:{
129
-        searchAction(){
130
-            let arr = this.tableData
131
-            let a = []
132
-            arr.map(item => {
133
-                if(item.name.indexOf(this.search_input) > -1 && item.org_id == this.$store.getters.xt_user.org_id){
134
-                    a.push(item)
135
-                }
136
-            })
137
-            this.tableData = a
153
+        // searchAction(){
154
+        //     let arr = this.tableData
155
+        //     let a = []
156
+        //     arr.map(item => {
157
+        //         if(item.name.indexOf(this.search_input) > -1 && item.org_id == this.$store.getters.xt_user.org_id){
158
+        //             a.push(item)
159
+        //         }
160
+        //     })
161
+        //     this.tableData = a
162
+        // },
163
+        // changeTime(val){
164
+        //     let arr = JSON.parse(localStorage.getItem("temp"))
165
+        //     arr.map(item => {
166
+        //         item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
167
+        //     })
168
+        //     this.tableData = arr
169
+        //     console.log(new Date(val[0]).getTime() / 1000)
170
+        //     console.log(new Date(val[1]).getTime() / 1000)
171
+        //     let arr1 = this.tableData
172
+        //     let a = []
173
+        //     arr1.map(item => {
174
+        //      if(new Date(item.create_time).getTime() / 1000 > new Date(val[0]).getTime() / 1000 && new Date(item.create_time).getTime() / 1000 < new Date(val[1]).getTime() / 1000 && item.org_id == this.$store.getters.xt_user.org_id){
175
+        //         a.push(item)
176
+        //       }
177
+        //     })
178
+        //     this.tableData = a
179
+        // },
180
+        changeStart(val){
181
+          this.start_time = val
182
+        },
183
+        changeEnd(val){
184
+           this.end_time = val
185
+        },
186
+        changeRegister(val){
187
+
138
         },
188
         },
139
-        changeTime(val){
140
-            let arr = JSON.parse(localStorage.getItem("temp"))
141
-            arr.map(item => {
142
-                item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
143
-            })
144
-            this.tableData = arr
145
-            console.log(new Date(val[0]).getTime() / 1000)
146
-            console.log(new Date(val[1]).getTime() / 1000)
147
-            let arr1 = this.tableData
148
-            let a = []
149
-            arr1.map(item => {
150
-                // if(new Date(val[0]).getTime() / 1000){
151
-                //     a.push(item)
152
-                // }
153
-                if(new Date(item.create_time).getTime() / 1000 > new Date(val[0]).getTime() / 1000 && new Date(item.create_time).getTime() / 1000 < new Date(val[1]).getTime() / 1000 && item.org_id == this.$store.getters.xt_user.org_id){
154
-                    a.push(item)
155
-                }
156
-            })
157
-            this.tableData = a
189
+        getlist(){
190
+            var params = {
191
+               keyword:this.search_input,
192
+               start_time:this.start_time,
193
+               end_time:this.end_time,
194
+               register_type:this.register_type,
195
+               limit:this.limit,
196
+               page:this.page,
197
+            }
198
+           console.log("params",params)
199
+          getHisPatientHistory(params).then(response=>{
200
+
201
+          })
202
+ 
158
         }
203
         }
159
 
204
 
205
+
160
     }
206
     }
161
 }
207
 }
162
 </script>
208
 </script>