소스 검색

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

See999 4 년 전
부모
커밋
20e679c6b0

+ 2 - 1
src/api/his/his.js 파일 보기

@@ -21,9 +21,10 @@ export function getPatientInfo(params) {
21 21
 
22 22
 
23 23
 export function createCaseHistory(params) {
24
+  console.log("params",params)
24 25
   return request({
25 26
     url: "/api/doctorworkstation/casehistory/create",
26
-    method: "post",
27
+    method: "get",
27 28
     params:params
28 29
   });
29 30
 }

+ 48 - 1
src/api/project/project.js 파일 보기

@@ -1,4 +1,5 @@
1 1
 import request from "@/utils/request";
2
+import url from "postcss-url";
2 3
 
3 4
 export function saveProject(params){
4 5
 
@@ -270,4 +271,50 @@ export function changePatient(id,params){
270 271
       method:"get",
271 272
       params:params
272 273
     })
273
-  }
274
+  }
275
+
276
+
277
+  export function getPatientCaseHistory(params){
278
+     
279
+    return request({
280
+        url:"/api/patient/getpatientcasehistory",
281
+        method:"get",
282
+        params:params
283
+    })
284
+  }
285
+
286
+  export function SaveHisPatientCaseHistoryTemplate(params){
287
+      
288
+    return request({
289
+       url:"/api/doctorworkstation/casehistorytemplate/create",
290
+       method:"get",
291
+       params:params
292
+    })
293
+  }
294
+
295
+  export function getHistoryTemplate(params){
296
+   
297
+    return request({
298
+      url:"/api/doctorworkstation/casehistorytemplate/get",
299
+      method:"get",
300
+      params:params
301
+    })
302
+  }
303
+
304
+  export function getTemplateDetail(id,params){
305
+     
306
+     return request({
307
+        url:"/api/doctorworkstation/gettemplatedetail?id="+id,
308
+        method:"get",
309
+        params:params
310
+     })
311
+  }
312
+
313
+  export function updateRecordTemplate(params){
314
+    
315
+    return request({
316
+        url:"/api/doctorworkstation/updaterecordtemplate",
317
+        method:"get",
318
+        params:params  
319
+    })
320
+  } 

+ 45 - 23
src/xt_pages/data/components/addInspection.vue 파일 보기

@@ -45,7 +45,8 @@
45 45
                 </el-form-item>
46 46
   
47 47
                  <el-form-item label="组套明细" style="width:50%;">
48
-                    <el-select v-model="form.project_detail" placeholder="请选择">
48
+                    <el-select v-model="form.project_detail" placeholder="请选择"
49
+                     @change="chagneInspection">
49 50
                         <el-option
50 51
                         v-for="item in projectList"
51 52
                         :key="item.id"
@@ -110,7 +111,7 @@
110 111
 
111 112
 <script>
112 113
 import { getDictionaryDataConfig,getDataConfig } from "@/utils/data";
113
-import { saveProjectTeam,getAllProjectList,addProjectList,DeleteProject } from "@/api/project/project"
114
+import { saveProjectTeam,getAllProjectList,addProjectList,DeleteProject,getProjectDetail } from "@/api/project/project"
114 115
 export default {
115 116
     data(){
116 117
         return{
@@ -142,7 +143,8 @@ export default {
142 143
               team_type: [{ required:true,message:'请填写组套类型',trigger:'change' }]
143 144
            },
144 145
            tableData:[],
145
-           projectList:[]
146
+           projectList:[],
147
+           tabList:[],
146 148
         }
147 149
     },
148 150
     methods:{
@@ -168,7 +170,6 @@ export default {
168 170
          this.visible = false
169 171
         },
170 172
         submitAction(formName){
171
-          
172 173
            this.$refs[formName].validate((valid)=>{
173 174
                 var arr = []
174 175
                 for(let i=0;i<this.tableData.length;i++){
@@ -200,6 +201,8 @@ export default {
200 201
                    this.form.tube_color = "",
201 202
                    this.form.team_type = "",
202 203
                    this.form.remark = ""
204
+                   this.tableData = []
205
+                   this.form.number = ""
203 206
                    this.$parent.getlist()
204 207
                  }else{
205 208
                     this.$message.error("项目组套名称已存在!")
@@ -213,28 +216,13 @@ export default {
213 216
                var projectList = response.data.data.projectList
214 217
                console.log('projectlist33333',projectList)
215 218
                this.projectList = projectList
216
-               var hisprojectlist = response.data.data.hisprojectlist
217
-               console.log("hisprojectlist",hisprojectlist)
218
-               this.tableData = hisprojectlist
219
+            //    var hisprojectlist = response.data.data.hisprojectlist
220
+            //    console.log("hisprojectlist",hisprojectlist)
221
+            //    this.tableData = hisprojectlist
219 222
              }
220 223
           })   
221 224
         },
222
-        addProjectList(){
223
-            const params = {
224
-              id:this.form.project_detail,
225
-              number:parseInt(this.form.number)
226
-            }
227
-           console.log("params",params)
228
-          addProjectList(params).then(response=>{
229
-             if(response.data.state == 1){
230
-               var projectList = response.data.data.projectList
231
-               this.$message.success("保存成功")
232
-               this.form.project_detail = ""
233
-               this.form.number = ""
234
-               this.getlist()
235
-             }
236
-          })
237
-        },
225
+       
238 226
         getId(id){
239 227
           var name = ""
240 228
           var statistics_category =  getDictionaryDataConfig('system','statistics_category') 
@@ -246,6 +234,40 @@ export default {
246 234
           }
247 235
           return name
248 236
         },
237
+        chagneInspection(id){
238
+           getProjectDetail(id).then(response=>{
239
+              if(response.data.state == 1){
240
+               var projectdetail = response.data.data.projecDetail
241
+               console.log("projectdetail",projectdetail)
242
+               this.tableData.push(projectdetail)
243
+              }
244
+           })
245
+        },
246
+       addProjectList(){
247
+          for(let i=0;i<this.tabList.length;i++){
248
+            if(this.form.project_detail == this.tabList[i].id){
249
+                this.tabList[i].number = this.form.number
250
+            }
251
+         }
252
+         this.tableData = []
253
+         this.tableData = this.tabList
254
+         
255
+       
256
+        //     const params = {
257
+        //       id:this.form.project_detail,
258
+        //       number:parseInt(this.form.number)
259
+        //     }
260
+        //    console.log("params",params)
261
+        //   addProjectList(params).then(response=>{
262
+        //      if(response.data.state == 1){
263
+        //        var projectList = response.data.data.projectList
264
+        //        this.$message.success("保存成功")
265
+        //        this.form.project_detail = ""
266
+        //        this.form.number = ""
267
+        //        this.getlist()
268
+        //      }
269
+        //   })
270
+        },
249 271
         DeleteProject(id,index){
250 272
            this.$confirm("确认删除此项目吗?", "删除", {
251 273
             confirmButtonText: "确 定",

+ 3 - 1
src/xt_pages/data/components/inspection.vue 파일 보기

@@ -115,7 +115,9 @@ export default {
115 115
         this.page = val
116 116
         this.getlist()
117 117
       },
118
-        searchAction(){},
118
+        searchAction(){
119
+          this.getlist()  
120
+        },
119 121
         clickSelfPayment(){
120 122
             this.$refs.selfPayment.show();
121 123
         },

+ 11 - 6
src/xt_pages/data/components/project.vue 파일 보기

@@ -4,7 +4,7 @@
4 4
             <div class="cell clearfix" style="margin-bottom:0;">
5 5
                 <el-input style="width: 180px;margin-right:10px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
6 6
                 <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction" >搜索</el-button>
7
-                <label class="title"><span class="name">是否启用</span> : </label>
7
+                <label class="title"><span class="name">状态</span> : </label>
8 8
                 <el-select v-model="is_start" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeStart">
9 9
                     <el-option
10 10
                     v-for="item in options"
@@ -13,8 +13,8 @@
13 13
                     :value="item.value">
14 14
                     </el-option>
15 15
                 </el-select>
16
-                <label class="title"><span class="name">是否收费</span> : </label>
17
-                <el-select v-model="is_charge" style="width:140px;margin-right:10px;" placeholder="请选择">
16
+                <label class="title"><span class="name">是否收费预估项:</span> : </label>
17
+                <el-select v-model="is_charge" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeOption">
18 18
                     <el-option
19 19
                     v-for="item in optionOne"
20 20
                     :key="item.value"
@@ -116,8 +116,8 @@ export default {
116 116
         }
117 117
     },
118 118
     methods:{
119
-        changeStart(id){
120
-          console.log("id",id)
119
+        changeStart(){
120
+         this.getlist()
121 121
         },
122 122
         handleSizeChange(val) {
123 123
             this.limit = val
@@ -127,7 +127,9 @@ export default {
127 127
             this.page = val
128 128
             this.getlist()
129 129
         },
130
-        searchAction(){},
130
+        searchAction(){
131
+           this.getlist()   
132
+        },
131 133
         clickSelfPayment(){
132 134
             this.$refs.selfPayment.show();
133 135
         },
@@ -194,6 +196,9 @@ export default {
194 196
              });
195 197
             })
196 198
             .catch(() => {});
199
+        },
200
+        changeOption(){
201
+          this.getlist()
197 202
         }
198 203
         
199 204
     },

+ 3 - 1
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 파일 보기

@@ -257,7 +257,7 @@
257 257
   import saveTemplate from './saveTemplate'
258 258
   import additionalCharges from './additionalCharges'
259 259
   import { addProjectTeam, getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
260
-
260
+ 
261 261
   export default {
262 262
     props: {
263 263
       patientInfo: Object,
@@ -864,6 +864,7 @@
864 864
         })
865 865
       },
866 866
       selectTeam(row) {
867
+        console.log("row------",row)
867 868
         var arr = []
868 869
         for (let i = 0; i < row.length; i++) {
869 870
           arr.push(row[i].project_id)
@@ -889,6 +890,7 @@
889 890
         const params = {
890 891
           project_id: idstr
891 892
         }
893
+        console.log("params",params)
892 894
         getPojectListById(params).then(response => {
893 895
           if (response.data.state == 1) {
894 896
             var project = response.data.data.project

+ 88 - 36
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue 파일 보기

@@ -10,7 +10,7 @@
10 10
     </div> -->
11 11
     <div class="backColor"></div>
12 12
     <div class="mainTitle">基本信息:</div>
13
-    <el-form class="basicForm" :model="patientInfo" :rules="rules" ref="form" label-width="120px">
13
+    <el-form class="basicForm" :model="patientInfo" ref="form" label-width="120px">
14 14
       <el-form-item label="姓名:" prop="name">
15 15
         <el-input v-model="patientInfo.name" placeholder="" readonly></el-input>
16 16
       </el-form-item>
@@ -37,14 +37,14 @@
37 37
         <el-input v-model="patientInfo.phone" placeholder="" readonly></el-input>
38 38
       </el-form-item>
39 39
       <el-form-item label="医保类型: " prop="name">
40
-        <!-- <el-select v-model="scope.row.delivery_way" placeholder="请选择">
41
-          <el-option
42
-            v-for="(item,index) in arr"
43
-            :key="index"
44
-            :label="item.name"
45
-            :value="item.name">
46
-          </el-option>
47
-        </el-select> -->
40
+        <el-select v-model="delivery_way" placeholder="请选择">
41
+         <el-option
42
+            v-for="item in wayOptions"
43
+           :key="item.id"
44
+           :label="item.name"
45
+           :value="item.id"
46
+          />
47
+        </el-select>
48 48
       </el-form-item>
49 49
       <el-form-item label="医保证号: " prop="name">
50 50
         <el-input v-model="patientInfo.home_address" placeholder="" readonly></el-input>
@@ -54,7 +54,7 @@
54 54
       </el-form-item>
55 55
     </el-form>
56 56
     <div class="mainTitle">体格信息:</div>
57
-    <el-form class="physiqueForm" :model="case_history" :rules="rules" ref="form" label-width="80px">
57
+    <el-form class="physiqueForm" :model="case_history" ref="form" label-width="80px">
58 58
       <el-form-item label="体温:" prop="name">
59 59
         <el-input v-model="case_history.temperature" placeholder=""></el-input>
60 60
         <span>℃</span>
@@ -64,7 +64,7 @@
64 64
         (次/分)
65 65
       </el-form-item>
66 66
       <el-form-item label="呼吸: " prop="name">
67
-        <el-input v-model="case_history.pulse" placeholder=""></el-input>
67
+        <el-input v-model="case_history.breathing" placeholder=""></el-input>
68 68
         (次/分)
69 69
       </el-form-item>
70 70
       <el-form-item label="血压:" prop="name">
@@ -75,11 +75,11 @@
75 75
       </el-form-item>
76 76
     </el-form>
77 77
     <div class="mainTitle">病历信息:</div>
78
-    <el-form class="recordForm" :model="case_history" :rules="rules" ref="form" label-width="80px">
78
+    <el-form class="recordForm" :model="case_history" ref="form" label-width="80px">
79 79
       <el-form-item label="发病日期: " prop="name">
80 80
         <el-date-picker
81 81
           style="width:100%;"
82
-          v-model="case_history.sick_date"
82
+          v-model="start_time"
83 83
           type="date"
84 84
           placeholder="选择日期">
85 85
         </el-date-picker>
@@ -135,19 +135,35 @@
135 135
           v-model="case_history.diagnostic">
136 136
         </el-input>
137 137
       </el-form-item>
138
+       <el-form-item label="医嘱:" prop="doctor_advice" style="width:100%;">
139
+        <el-input
140
+          type="textarea"
141
+          :rows="2"
142
+          placeholder="请输入内容"
143
+          v-model="doctor_advice">
144
+        </el-input>
145
+      </el-form-item>
146
+       <el-form-item label="备注:" prop="name" style="width:100%;">
147
+        <el-input
148
+          type="textarea"
149
+          :rows="2"
150
+          placeholder="请输入内容"
151
+          v-model="remark">
152
+        </el-input>
153
+      </el-form-item>
138 154
     </el-form>
139
-    <medicalRecord ref='medicalRecord'></medicalRecord>
140
-    <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
155
+   
141 156
   </div>
142 157
 </template>
143 158
 
144 159
 <script>
160
+  const moment = require('moment')
145 161
   import medicalRecord from './medicalRecord'
146 162
   import saveRecordTemplate from './saveRecordTemplate'
147 163
   import { getDictionaryDataConfig } from "@/utils/data";
148 164
   import {  createCaseHistory } from '@/api/his/his'
149
-
150
-
165
+  import { getDataConfig } from "@/utils/data";
166
+  import { getTemplateDetail } from "@/api/project/project"
151 167
   export default {
152 168
     props: {
153 169
       case_history: Object,
@@ -161,6 +177,8 @@
161 177
     },
162 178
     data() {
163 179
       return {
180
+        id:0,
181
+        delivery_way:"",
164 182
         case_history:{
165 183
           sick_type:'',
166 184
           symptom:"",
@@ -185,7 +203,11 @@
185 203
         },
186 204
         form: {
187 205
           name: ''
188
-        }
206
+        },
207
+        wayOptions:[],
208
+        start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
209
+        doctor_advice:"",
210
+        remark:""
189 211
       }
190 212
     },
191 213
     methods: {
@@ -193,20 +215,27 @@
193 215
         return getDictionaryDataConfig(module, filed_name)
194 216
 
195 217
       },
196
-      setData(case_history,patientInfo,hisPatientInfo){
197
-        this.form.name = patientInfo.name
218
+      // setData(case_history,patientInfo,hisPatientInfo){
219
+      //   this.form.name = patientInfo.name
198 220
 
199 221
 
200 222
 
201
-      },
202
-      open(index) {
203
-        if (index == 1) {
223
+      // },
224
+      createCaseHistory() {
225
+        console.log("触发了吗")
204 226
           if(this.patientInfo.id == undefined){
205 227
             this.$message.error("请先选择病人")
206 228
             return
207 229
           }
208
-
230
+          if(this.case_history.is_infect == true){
231
+            this.case_history.is_infect = 1
232
+          }
233
+          if(this.case_history.is_infect == false){
234
+             this.case_history.is_infect = 2
235
+          }
209 236
           let params = {
237
+            "his_patient_id":this.hisPatientInfo.id,
238
+            "delivery_way":this.delivery_way?"":0,
210 239
             "patient_id":this.patientInfo.id,
211 240
             "temperature":this.case_history.temperature,
212 241
             "blood_sugar":this.case_history.blood_sugar,
@@ -217,7 +246,7 @@
217 246
             "height":this.case_history.height,
218 247
             "sick_type":this.case_history.sick_type,
219 248
             "symptom":this.case_history.symptom,
220
-            "sick_date":this.case_history.sick_date,
249
+            "sick_date":this.start_time,
221 250
             "is_infect":this.case_history.is_infect,
222 251
             "chief_conplaint":this.case_history.chief_conplaint,
223 252
             "history_of_present_illness":this.case_history.history_of_present_illness,
@@ -225,26 +254,49 @@
225 254
             "personal_history":this.case_history.personal_history,
226 255
             "family_history":this.case_history.family_history,
227 256
             "record_date":this.record_date,
228
-
229
-
257
+            "diagnostic":this.case_history.diagnostic,
258
+            "breathing":this.case_history.breathing,
259
+            "doctor_advice":this.doctor_advice,
260
+            "remark":this.remark
230 261
           }
262
+        
231 263
           createCaseHistory(params).then(response => {
232 264
             if (response.data.state == 0) {
233
-              this.$message.error(response.data.msg)
265
+              this.$message.error("患者病历已存在")
234 266
               return false
235 267
             } else {
236 268
               this.$message.success("保存成功")
237 269
             }
238 270
           })
239
-        } else if (index == 2) {
240
-          this.$router.push('/outpatientDoctorStation/recordPrint')
241
-        } else if (index == 3) {
242
-          this.$refs.medicalRecord.show()
243
-        } else if (index == 4) {
244
-          this.$refs.saveRecordTemplate.show()
245
-        }
271
+       
246 272
 
247
-      }
273
+      },
274
+      getMsgFormSon(data){
275
+       this.getTemplateDetail(data)
276
+     },
277
+
278
+      getTemplateDetail(id){
279
+          getTemplateDetail(id).then(response=>{
280
+              if(response.data.state == 1){  
281
+                var templatedetail =  response.data.data.templateDetail
282
+                console.log("templatedetail",templatedetail)
283
+            
284
+                this.case_history.chief_conplaint =  templatedetail.chief_conplaint 
285
+                this.case_history.history_of_present_illness =  templatedetail.history_of_present_illness 
286
+                this.case_history.past_history =  templatedetail.past_history 
287
+                this.case_history.personal_history =    templatedetail.personal_history 
288
+                this.case_history.family_history = templatedetail.family_history 
289
+                this.case_history.diagnostic = templatedetail.diagnostic 
290
+               
291
+              }
292
+          })
293
+        },
294
+    },
295
+    created(){
296
+       this.wayOptions = getDataConfig("patient", "reimbursement_ways");
297
+
298
+       console.log("2222",this.wayOptions)
299
+     
248 300
     }
249 301
   }
250 302
 </script>

+ 66 - 41
src/xt_pages/outpatientDoctorStation/components/medicalRecord.vue 파일 보기

@@ -7,10 +7,10 @@
7 7
         class="recordDialog"
8 8
     >
9 9
         <div>
10
-            <el-tabs v-model="activeName" @tab-click="handleClick">
11
-                <el-tab-pane label="历史病历" name="first">
10
+            <el-tabs v-model="activeName">
11
+                <!-- <el-tab-pane label="历史病历" name="first">
12 12
                     <div style="display:flex;align-items: center;margin-bottom:10px;">
13
-                        <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item" style="width:140px;"/>
13
+                        <el-input size="small" v-model.trim="search_input" class="filter-item" style="width:140px;"/>
14 14
                         <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
15 15
                         <span>日期:</span>
16 16
                         <el-date-picker
@@ -31,7 +31,7 @@
31 31
                     <el-table :data="tableData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
32 32
                         <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
33 33
                         <el-table-column align="center" prop="name" label="病历编号">
34
-                            <template slot-scope="scope">{{ scope.row.date }}</template>
34
+                            <template slot-scope="scope">{{ scope.row.id }}</template>
35 35
                         </el-table-column>
36 36
                         <el-table-column align="center" prop="name" label="名称">
37 37
                             <template slot-scope="scope">{{ scope.row.date }}</template>
@@ -52,48 +52,50 @@
52 52
                             </template>
53 53
                         </el-table-column>
54 54
                     </el-table>
55
-                </el-tab-pane>
56
-                <el-tab-pane label="病历模板" name="second">
55
+                </el-tab-pane> -->
56
+                <el-tab-pane label="病历模板" name="first">
57 57
                     <div style="display:flex;align-items: center;margin-bottom:10px;">
58
-                        <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item" style="width:140px;"/>
59
-                        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
58
+                        <el-input size="small"  v-model.trim="search_input" class="filter-item" style="width:140px;"/>
59
+                        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary"  @click="searchAction">搜索</el-button>
60 60
                         <span>日期:</span>
61 61
                         <el-date-picker
62 62
                         size="small"
63 63
                         style="width:140px;margin:0 10px;"
64
-                        v-model="value1"
64
+                        v-model="start_time"
65 65
                         type="date"
66
-                        placeholder="选择日期">
66
+                        placeholder="选择日期"
67
+                        @change="changeStarTime">
67 68
                         </el-date-picker>
68 69
                         <el-date-picker
69 70
                         style="width:140px;"
70 71
                         size="small"
71
-                        v-model="value1"
72
+                        v-model="end_time"
72 73
                         type="date"
73
-                        placeholder="选择日期">
74
+                        placeholder="选择日期"
75
+                        @change="changeEndTime">
74 76
                         </el-date-picker>
75 77
                     </div>
76
-                    <el-table :data="tableData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
78
+                    <el-table :data="tempalateData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
77 79
                         <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
78 80
                         <el-table-column align="center" prop="name" label="病历编号">
79
-                            <template slot-scope="scope">{{ scope.row.date }}</template>
81
+                            <template slot-scope="scope">{{ scope.row.id }}</template>
80 82
                         </el-table-column>
81 83
                         <el-table-column align="center" prop="name" label="名称">
82
-                            <template slot-scope="scope">{{ scope.row.date }}</template>
84
+                            <template slot-scope="scope">{{ scope.row.template_name }}</template>
83 85
                         </el-table-column>
84 86
                         <el-table-column align="center" prop="name" label="创建人">
85
-                            <template slot-scope="scope">{{ scope.row.date }}</template>
87
+                            <template slot-scope="scope">{{ scope.row.user_name }}</template>
86 88
                         </el-table-column>
87 89
                         <el-table-column align="center" prop="name" label="创建日期">
88
-                            <template slot-scope="scope">{{ scope.row.date }}</template>
90
+                            <template slot-scope="scope">{{ scope.row.record_date }}</template>
89 91
                         </el-table-column>
90 92
                         <el-table-column align="center" prop="name" label="模板说明">
91
-                            <template slot-scope="scope">{{ scope.row.date }}</template>
93
+                            <template slot-scope="scope">{{ scope.row.template_remark }}</template>
92 94
                         </el-table-column>
93 95
                         <el-table-column align="center" prop="name" label="操作" width='200'>
94 96
                             <template slot-scope="scope">
95
-                                <el-button type="primary" size="mini">调用</el-button>
96
-                                <el-button type="primary" size="mini" @click="totemplateDetail">详情</el-button>
97
+                                <el-button type="primary" size="mini" @click="totemplateDetailTwo(scope.row.id)">调用</el-button>
98
+                                <el-button type="primary" size="mini" @click="totemplateDetail(scope.row.id)">详情</el-button>
97 99
                             </template>
98 100
                         </el-table-column>
99 101
                     </el-table>
@@ -104,7 +106,7 @@
104 106
         <record-template-detail ref="recordTemplateDetail"></record-template-detail>
105 107
         <div slot="footer" class="dialog-footer">
106 108
             <el-button @click="hide">取 消</el-button>
107
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
109
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
108 110
         </div>
109 111
     </el-dialog>
110 112
 </template>
@@ -112,6 +114,7 @@
112 114
 <script>
113 115
 import recordHistoryDetail from './recordHistoryDetail'
114 116
 import recordTemplateDetail from './recordTemplateDetail'
117
+import { getHistoryTemplate } from "@/api/project/project"
115 118
 export default {
116 119
     components:{
117 120
         recordHistoryDetail,
@@ -119,29 +122,17 @@ export default {
119 122
     },
120 123
     data(){
121 124
         return{
122
-          submitLoading:false,
123 125
             visible:false,
124 126
             activeName:'first',
125 127
             form:{
126 128
                 name:''
127 129
             },
128
-            tableData: [{
129
-            date: '2016-05-02',
130
-            name: '王小虎',
131
-            address: '上海市普陀区金沙江路 1518 弄'
132
-            }, {
133
-            date: '2016-05-04',
134
-            name: '王小虎',
135
-            address: '上海市普陀区金沙江路 1517 弄'
136
-            }, {
137
-            date: '2016-05-01',
138
-            name: '王小虎',
139
-            address: '上海市普陀区金沙江路 1519 弄'
140
-            }, {
141
-            date: '2016-05-03',
142
-            name: '王小虎',
143
-            address: '上海市普陀区金沙江路 1516 弄'
144
-            }],
130
+            tableData: [],
131
+            tempalateData:[],
132
+            value1:"",
133
+            search_input:"",
134
+            start_time:"",
135
+            end_time:"",
145 136
         }
146 137
     },
147 138
     methods:{
@@ -165,9 +156,43 @@ export default {
165 156
         toHistoryDetail(){
166 157
             this.$refs.recordHistoryDetail.show()
167 158
         },
168
-        totemplateDetail(){
169
-            this.$refs.recordTemplateDetail.show()
159
+        totemplateDetail(id){
160
+            this.$refs.recordTemplateDetail.show(id)
161
+        },
162
+        totemplateDetailTwo(id){
163
+         this.$emit('func',id)
164
+         this.visible = false
165
+        },
166
+        //获取历史数据历史模板
167
+        getlist(){
168
+            const params = {
169
+               keyword:this.search_input,
170
+               start_time:this.start_time,
171
+               end_time:this.end_time
172
+            }
173
+          getHistoryTemplate(params).then(response=>{
174
+            if(response.data.state == 1){
175
+              var template =  response.data.data.template
176
+              console.log("templagte",template)
177
+              this.tempalateData = template
178
+              var history =  response.data.data.history
179
+              console.log("history",history)
180
+              this.tableData = history
181
+            }
182
+          })
183
+        },
184
+        searchAction(){
185
+          this.getlist()
186
+        },
187
+        changeStarTime(){
188
+           this.getlist()
189
+        },
190
+        changeEndTime(){
191
+          this.getlist()
170 192
         }
193
+    },
194
+    created(){
195
+       this.getlist()
171 196
     }
172 197
 }
173 198
 </script>

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/recordHistoryDetail.vue 파일 보기

@@ -52,7 +52,7 @@
52 52
         </div>
53 53
         <div slot="footer" class="dialog-footer">
54 54
             <el-button @click="hide">取 消</el-button>
55
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
55
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
56 56
         </div>
57 57
     </el-dialog>         
58 58
 </template>

+ 65 - 14
src/xt_pages/outpatientDoctorStation/components/recordTemplateDetail.vue 파일 보기

@@ -7,19 +7,19 @@
7 7
         class="recordDialog"
8 8
         append-to-body
9 9
     >
10
-        <el-form class="recordForm" :model="form" :rules="rules" ref="form" label-width="80px">
10
+        <el-form class="recordForm" :model="form" ref="form" label-width="80px">
11 11
             <el-form-item label="模板名称: " prop="name" style="width:100%;">
12
-                <el-input v-model="form.name" placeholder=""></el-input>
12
+                <el-input v-model="form.template_name" placeholder=""></el-input>
13 13
             </el-form-item>
14 14
             <el-form-item label="模板说明: " prop="name" style="width:100%;">
15
-                <el-input v-model="form.name" placeholder=""></el-input>
15
+                <el-input v-model="form.template_remark" placeholder=""></el-input>
16 16
             </el-form-item>
17 17
             <el-form-item label="主诉:" prop="name" style="width:100%;">
18 18
                 <el-input
19 19
                 type="textarea"
20 20
                 :rows="2"
21 21
                 placeholder="请输入内容"
22
-                v-model="textarea">
22
+                v-model="form.chief_conplaint">
23 23
                 </el-input>
24 24
             </el-form-item>
25 25
             <el-form-item label="现病史:" prop="name" style="width:100%;">
@@ -27,7 +27,7 @@
27 27
                 type="textarea"
28 28
                 :rows="2"
29 29
                 placeholder="请输入内容"
30
-                v-model="textarea">
30
+                v-model="form.history_of_present_illness">
31 31
                 </el-input>
32 32
             </el-form-item>
33 33
             <el-form-item label="既往史:" prop="name" style="width:100%;">
@@ -35,7 +35,7 @@
35 35
                 type="textarea"
36 36
                 :rows="2"
37 37
                 placeholder="请输入内容"
38
-                v-model="textarea">
38
+                v-model="form.past_history">
39 39
                 </el-input>
40 40
             </el-form-item>
41 41
             <el-form-item label="个人史:" prop="name" style="width:100%;">
@@ -43,7 +43,7 @@
43 43
                 type="textarea"
44 44
                 :rows="2"
45 45
                 placeholder="请输入内容"
46
-                v-model="textarea">
46
+                v-model="form.personal_history">
47 47
                 </el-input>
48 48
             </el-form-item>
49 49
             <el-form-item label="家族史:" prop="name" style="width:100%;">
@@ -51,7 +51,7 @@
51 51
                 type="textarea"
52 52
                 :rows="2"
53 53
                 placeholder="请输入内容"
54
-                v-model="textarea">
54
+                v-model="form.family_history">
55 55
                 </el-input>
56 56
             </el-form-item>
57 57
             <el-form-item label="诊断信息:" prop="name" style="width:100%;">
@@ -59,25 +59,36 @@
59 59
                 type="textarea"
60 60
                 :rows="2"
61 61
                 placeholder="请输入内容"
62
-                v-model="textarea">
62
+                v-model="form.diagnostic">
63 63
                 </el-input>
64 64
             </el-form-item>
65 65
         </el-form>
66 66
         <div slot="footer" class="dialog-footer">
67 67
             <el-button @click="hide">取 消</el-button>
68
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
68
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
69 69
         </div>
70 70
     </el-dialog>         
71 71
 </template>
72 72
 
73 73
 <script>
74
+import { getTemplateDetail,updateRecordTemplate } from "@/api/project/project"
74 75
 export default {
75 76
     data(){
76 77
         return{
77 78
             visible:false,
78 79
             form:{
79
-                name:''
80
+              id:0,
81
+              template_name:'',
82
+              template_remark:"",
83
+              chief_conplaint:"",
84
+              history_of_present_illness:"",
85
+              past_history:"",
86
+              personal_history:"",
87
+              family_history:"",
88
+              diagnostic:""
80 89
             },
90
+            textarea:"",
91
+            templatedetail:{}
81 92
         }
82 93
     },
83 94
     methods:{
@@ -90,14 +101,54 @@ export default {
90 101
             this.form.name = "";
91 102
             this.form.intro = "";
92 103
         },
93
-        show() {
94
-            // this.clear()
95
-            this.visible = true
104
+        show(id) {
105
+          this.getTemplateDetail(id)
106
+          this.visible = true
107
+          
96 108
         },
97 109
         hide() {
98 110
             // this.clear()
99 111
             this.visible = false
100 112
         },
113
+        getTemplateDetail(id){
114
+          getTemplateDetail(id).then(response=>{
115
+              if(response.data.state == 1){  
116
+                var templatedetail =  response.data.data.templateDetail
117
+                console.log("templatedetail",templatedetail)
118
+                this.form.id = templatedetail.id
119
+                this.form.template_name =   templatedetail.template_name 
120
+                this.form.template_remark = templatedetail.template_remark 
121
+                this.form.chief_conplaint =  templatedetail.chief_conplaint 
122
+                this.form.history_of_present_illness =  templatedetail.history_of_present_illness 
123
+                this.form.past_history =  templatedetail.past_history 
124
+                this.form.personal_history =    templatedetail.personal_history 
125
+                this.form.family_history = templatedetail.family_history 
126
+                this.form.diagnostic = templatedetail.diagnostic 
127
+               
128
+              }
129
+          })
130
+        },
131
+        submitAction(){
132
+          var params = {
133
+            id:this.form.id,
134
+            template_name:this.form.template_name,
135
+            template_remark:this.form.template_remark,
136
+            chief_conplaint:this.form.chief_conplaint,
137
+            history_of_present_illness:this.form.history_of_present_illness,
138
+            past_history:this.form.past_history,
139
+            personal_history:this.form.personal_history,
140
+            family_history:this.form.family_history,
141
+            diagnostic:this.form.diagnostic
142
+          }  
143
+          updateRecordTemplate(params).then(response=>{
144
+             if(response.data.state == 1){
145
+                var template =  response.data.data.templateDetail
146
+                this.$message.success("保存成功")
147
+                this.visible = false
148
+                this.$parents.getlist()
149
+             }
150
+          }) 
151
+        }
101 152
     }
102 153
 }
103 154
 </script>

+ 62 - 12
src/xt_pages/outpatientDoctorStation/components/saveRecordTemplate.vue 파일 보기

@@ -6,35 +6,39 @@
6 6
         :before-close="_close"
7 7
         class="recordDialog"
8 8
     >
9
-        <el-form class="recordForm" :model="form" :rules="rules" ref="form" label-width="80px">
10
-            <el-form-item label="模板类别:" prop="name" style="width:100%;">
11
-                <el-radio v-model="radio" label="1">私人模板</el-radio>
12
-                <el-radio v-model="radio" label="2">公共模板</el-radio>
13
-            </el-form-item>
9
+        <el-form class="recordForm" :model="form"  ref="form" label-width="80px">
10
+            <!-- <el-form-item label="模板类别:" prop="name" style="width:100%;">
11
+                <el-radio v-model="mode_type" label="1">私人模板</el-radio>
12
+                <el-radio v-model="mode_type" label="2">公共模板</el-radio>
13
+            </el-form-item> -->
14 14
             <el-form-item label="模板名称: " prop="name" style="width:100%;">
15
-                <el-input v-model="form.name" placeholder=""></el-input>
15
+                <el-input v-model="form.template_name" placeholder=""></el-input>
16 16
             </el-form-item>
17 17
             <el-form-item label="模板说明:" prop="name" style="width:100%;">
18 18
                 <el-input
19 19
                 type="textarea"
20 20
                 :rows="2"
21 21
                 placeholder="请输入内容"
22
-                v-model="textarea">
22
+                v-model="template_remark">
23 23
                 </el-input>
24 24
             </el-form-item>
25 25
             <el-form-item label="创建人:" prop="name" style="width:49%;">
26
+                <span>{{user_name}}</span>
26 27
             </el-form-item>
27 28
             <el-form-item label="创建时间:" prop="name" style="width:49%;">
29
+                {{start_time}}
28 30
             </el-form-item>
29 31
         </el-form>
30 32
         <div slot="footer" class="dialog-footer">
31 33
             <el-button @click="hide">取 消</el-button>
32
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
34
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
33 35
         </div>
34 36
     </el-dialog>         
35 37
 </template>
36 38
 
37 39
 <script>
40
+const moment = require('moment')
41
+import { SaveHisPatientCaseHistoryTemplate } from "@/api/project/project"
38 42
 export default {
39 43
     data(){
40 44
         return{
@@ -42,8 +46,22 @@ export default {
42 46
             form:{
43 47
                 name:''
44 48
             },
49
+            mode_type:"1",
50
+            textarea:"",
51
+            chief_conplain:"",
52
+            past_history:"",
53
+            history_of_present_illness:"",
54
+            personal_history:"",
55
+            family_history:"",
56
+            diagnostic:"",
57
+            mode_type:"",
58
+            start_time:"",
59
+            user_name:"",
60
+            template_name:"",
61
+            template_remark:""
45 62
         }
46
-    },
63
+     },
64
+    
47 65
     methods:{
48 66
         _close: function(done) {
49 67
             // this.clear()
@@ -54,14 +72,46 @@ export default {
54 72
             this.form.name = "";
55 73
             this.form.intro = "";
56 74
         },
57
-        show() {
58
-            // this.clear()
59
-            this.visible = true
75
+        show(obj) {
76
+         console.log("obj",obj)
77
+         this.chief_conplain= obj.chief_conplain
78
+         this.past_history = obj.past_history
79
+         this.history_of_present_illness = obj.history_of_present_illness
80
+         this.personal_history = obj.personal_history
81
+         this.family_history = obj.family_history
82
+         this.diagnostic = obj.diagnostic
83
+         this.visible = true
60 84
         },
61 85
         hide() {
62 86
             // this.clear()
63 87
             this.visible = false
64 88
         },
89
+
90
+        submitAction(){
91
+          var params = {
92
+             template_name:this.template_name,
93
+             template_remark:this.template_remark,
94
+             user_name:this.user_name,
95
+             record_date:this.start_time,
96
+             chief_conplain:this.chief_conplain,
97
+             past_history:this.past_history,
98
+             history_of_present_illness:this.history_of_present_illness,
99
+             personal_history:this.personal_history,
100
+             family_history:this.family_history,
101
+             diagnostic:this.diagnostic,
102
+            }
103
+            console.log("params",params)
104
+          SaveHisPatientCaseHistoryTemplate(params).then(response=>{
105
+              if(response.data.state == 1){
106
+                 this.$message.success("保存成功")
107
+                 this.visible = false
108
+              }
109
+          })   
110
+        }
111
+    },
112
+    created(){
113
+      this.start_time = moment().format("YYYY-MM-DD HH:mm:ss")
114
+      this.user_name = this.$store.getters.xt_user.user.user_name
65 115
     }
66 116
 }
67 117
 </script>

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/saveTemplate.vue 파일 보기

@@ -46,7 +46,7 @@
46 46
         </div>
47 47
         <div slot="footer" class="dialog-footer">
48 48
             <el-button @click="hide">取 消</el-button>
49
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
49
+            <el-button type="primary" @click="submitAction()">保 存</el-button>
50 50
         </div>
51 51
     </el-dialog>         
52 52
 </template>

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/selectTemplate.vue 파일 보기

@@ -43,7 +43,7 @@
43 43
         </div>
44 44
         <div slot="footer" class="dialog-footer">
45 45
             <el-button @click="hide">取 消</el-button>
46
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
46
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
47 47
         </div>
48 48
     </el-dialog>         
49 49
 </template>

+ 80 - 11
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 파일 보기

@@ -51,10 +51,10 @@
51 51
             <el-button size="small" @click="open(5)" type="primary">存模板</el-button>
52 52
           </div>
53 53
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '病历'">
54
-            <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
55
-            <el-button size="small" @click="open(2)" type="primary">打印</el-button>
56
-            <el-button size="small" @click="open(3)" type="primary">病历调用</el-button>
57
-            <el-button size="small" @click="open(4)" type="primary">存模板</el-button>
54
+            <el-button size="small" @click="opentwo(1)" type="primary" style="margin-left:10px;">保存</el-button>
55
+            <el-button size="small" @click="opentwo(2)" type="primary">打印</el-button>
56
+            <el-button size="small" @click="opentwo(3)" type="primary">病历调用</el-button>
57
+            <el-button size="small" @click="opentwo(4)" type="primary">存模板</el-button>
58 58
           </div>
59 59
         </div>
60 60
         <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
@@ -64,7 +64,11 @@
64 64
                            :hisPatientInfo="hisPatientInfo"
65 65
                            v-if="titleType == '处方'" style="flex:1;"></desk-prescription>
66 66
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
67
-                     :hisPatientInfo="hisPatientInfo" v-if="titleType == '病历'"></desk-record>
67
+                     :hisPatientInfo="hisPatientInfo"   v-if="titleType == '病历'"  ref="child"></desk-record>
68
+                    
69
+        <!-- <medicalRecord ref='medicalRecord'  @func="getMsgFormSon"></medicalRecord> -->
70
+         <medicalRecord ref='medicalRecord' ></medicalRecord>
71
+       <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
68 72
       </div>
69 73
 
70 74
     </div>
@@ -75,16 +79,19 @@
75 79
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
76 80
   import deskPrescription from './components/deskPrescription'
77 81
   import deskRecord from './components/deskRecord'
78
-  import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
82
+  import { getPatientInfo, getSchedulePatientList,createCaseHistory } from '@/api/his/his'
79 83
   import { getDictionaryDataConfig } from '@/utils/data'
80
-
84
+  import medicalRecord from './components/medicalRecord'
85
+  import saveRecordTemplate from './components/saveRecordTemplate'
81 86
   import { uParseTime } from '@/utils/tools'
82 87
 
83 88
   export default {
84 89
     components: {
85 90
       BreadCrumb,
86 91
       deskPrescription,
87
-      deskRecord
92
+      deskRecord,
93
+      medicalRecord,
94
+      saveRecordTemplate
88 95
     },
89 96
     data() {
90 97
       return {
@@ -178,7 +185,7 @@
178 185
             console.log("999888811111")
179 186
 
180 187
             this.prescriptions = []
181
-            this.$refs.prescriptions.clearData()
188
+            // this.$refs.prescriptions.clearData()
182 189
             this.patientInfo = response.data.data.xt_info
183 190
             this.hisPatientInfo = response.data.data.his_info
184 191
             this.case_history = response.data.data.case_history
@@ -299,13 +306,75 @@
299 306
         //     psn_name:"杨美英",
300 307
         //     age:60.7
301 308
         // }
302
-      }
309
+      },
310
+      opentwo(index) {
311
+        console.log("index===",index)
312
+        if (index == 1) {
313
+          if(this.patientInfo.id == undefined){
314
+            this.$message.error("请先选择病人")
315
+            return
316
+          }
317
+          this.$refs.child.createCaseHistory()
318
+          // if(this.case_history.is_infect == true){
319
+          //   this.case_history.is_infect = 1
320
+          // }
321
+          // if(this.case_history.is_infect == false){
322
+          //    this.case_history.is_infect = 2
323
+          // }
324
+          // let params = {
325
+          //   "his_patient_id":this.hisPatientInfo.id,
326
+          //   "delivery_way":this.delivery_way?"":0,
327
+          //   "patient_id":this.patientInfo.id,
328
+          //   "temperature":this.case_history.temperature,
329
+          //   "blood_sugar":this.case_history.blood_sugar,
330
+          //   "pulse":this.case_history.pulse,
331
+          //   "sbp":this.case_history.sbp,
332
+          //   "dbp":this.case_history.dbp,
333
+          //   "blood_fat":this.case_history.blood_fat,
334
+          //   "height":this.case_history.height,
335
+          //   "sick_type":this.case_history.sick_type,
336
+          //   "symptom":this.case_history.symptom,
337
+          //   "sick_date":this.start_time,
338
+          //   "is_infect":this.case_history.is_infect,
339
+          //   "chief_conplaint":this.case_history.chief_conplaint,
340
+          //   "history_of_present_illness":this.case_history.history_of_present_illness,
341
+          //   "past_history":this.case_history.past_history,
342
+          //   "personal_history":this.case_history.personal_history,
343
+          //   "family_history":this.case_history.family_history,
344
+          //   "record_date":this.record_date,
345
+          //   "diagnostic":this.case_history.diagnostic,
346
+          //   "breathing":this.case_history.breathing,
347
+          //   // "doctor_advice":this.doctor_advice,
348
+          //   // "remark":this.remark
349
+          //   "doctor_advice":this.$ref.doctor_advice,
350
+          //   // "remark":this.remark
351
+          // }
352
+          // console.log("params",params)
353
+          // return
354
+          // createCaseHistory(params).then(response => {
355
+          //   if (response.data.state == 0) {
356
+          //     this.$message.error("患者病历已存在")
357
+          //     return false
358
+          //   } else {
359
+          //     this.$message.success("保存成功")
360
+          //   }
361
+          // })
362
+        } else if (index == 2) {
363
+          this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date)
364
+        } else if (index == 3) {
365
+          this.$refs.medicalRecord.show()
366
+        } else if (index == 4) {
367
+          this.$refs.saveRecordTemplate.show(this.case_history)
368
+        }
369
+
370
+      },
303 371
       // changePatient(val){
304 372
       //   console.log("患者val",val)
305 373
       //   this.hisPatientInfo = val.hisPatientInfo
306 374
       //   console.log("333333",this.hisPatientInfo)
307 375
       // }
308
-    }, created() {
376
+    }, 
377
+    created() {
309 378
       var nowDate = new Date()
310 379
       var nowYear = nowDate.getFullYear()
311 380
       var nowMonth = nowDate.getMonth() + 1

+ 93 - 49
src/xt_pages/outpatientDoctorStation/recordPrint.vue 파일 보기

@@ -4,7 +4,6 @@
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
        <template>
6 6
         <el-button
7
-          :loading="loading"
8 7
           size="small"
9 8
           icon="el-icon-printer"
10 9
           @click="printThisPage"
@@ -17,25 +16,25 @@
17 16
         <el-container class="newContainer">
18 17
             <div style="width:270px;margin-right:20px;">
19 18
                 <div class="cell clearfix" style="margin-bottom:10px;">
20
-                    <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
21
-                    <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
19
+                    <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
20
+                    <el-button size="small" class="filter-item" type="primary" :model="keyword" @click="searchAction">搜索</el-button>
22 21
                 </div>
23
-                <el-table ref="tab" @row-click="changePatient" highlight-current-row :data="tableData" height="480" border style="width: 100%">
22
+                <el-table ref="tab" @row-click="changePatient" highlight-current-row :data="patientTableData" height="480" border style="width: 100%">
24 23
                     <el-table-column prop="date"  label="患者">
25 24
                         <template slot-scope="scope">
26
-                            {{ scope.row.patient.name }}
25
+                            {{scope.row.patients.name?scope.row.patients.name:''}}
27 26
                         </template>
28 27
                     </el-table-column>
29
-                    <el-table-column prop="name" label="透析号">
28
+                    <el-table-column prop="name" label="就诊号">
30 29
                         <template slot-scope="scope">
31
-                            {{ scope.row.patient.dialysis_no }}
30
+                           {{ scope.row.his_patient.number ?scope.row.his_patient.number:''}}
32 31
                         </template>
33 32
                     </el-table-column>
34 33
                 </el-table>
35 34
             </div>
36 35
             
37 36
             <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
38
-              <printOne v-bind:childResponse="childResponse"></printOne>
37
+              <printOne v-bind:childResponse="childResponse" :patient="patient" :hispatient = "hispatient" :history="history"></printOne>
39 38
             </div>
40 39
         </el-container>
41 40
     </div>
@@ -44,17 +43,13 @@
44 43
 
45 44
 <script>
46 45
 
47
-import {
48
-  getDialysisRecordInitData,
49
-  getDialysisSchedules
50
-} from "@/api/dialysis_record";
51 46
 import { parseTime } from "@/utils";
52
-import { getDialysisRecord } from "@/api/dialysis";
53 47
 import { getDataConfig } from "@/utils/data";
54 48
 import { jsGetAge, uParseTime } from "@/utils/tools";
55
-// import LabelBox from "./printItem/LabelBox";
56 49
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
57 50
 import print from "print-js";
51
+import { getSchedulePatientList } from '@/api/his/his'
52
+import { getPatientCaseHistory } from "@/api/project/project"
58 53
 import printOne from "./recordTemplate/printOne"
59 54
 export default {
60 55
   name: "dialysisPrintOrder",
@@ -69,6 +64,13 @@ export default {
69 64
         { path: false, name: "打印单" }
70 65
       ],
71 66
       childResponse: {},
67
+      patientTableData: [],
68
+      search_input:"",
69
+      patient:{},
70
+      hispatient:{},
71
+      educationOptions:[],
72
+      history:{},
73
+      keyword:""
72 74
     };
73 75
   },
74 76
   methods: {
@@ -106,46 +108,88 @@ export default {
106 108
         style: style,
107 109
         scanStyles: false
108 110
       });
111
+    },
112
+
113
+     //患者列表
114
+      getPatientList(){
115
+        
116
+         let params = {
117
+           'record_date':this.$route.query.record,
118
+        }
119
+     
120
+      getSchedulePatientList(params).then(response => {
121
+         if (response.data.state == 0) {
122
+            this.$message.error(response.data.msg)
123
+            return false
124
+         } else {
125
+            this.patientTableData = []
126
+            console.log("list0000000",response.data.data.list)
127
+            // for (let i = 0; i < response.data.data.list.length; i++) {
128
+            //   if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
129
+            //      this.patientTableData.push(response.data.data.list[i])
130
+            //     }
131
+            //   }
132
+              this.patientTableData = response.data.data.list
133
+             }  
134
+          })
135
+      },
136
+
137
+    changePatient(val){
109 138
 
110
-      // if (this.org_template_info.template_id == 1) {
111
-      //   printJS({
112
-      //     printable: "dialysis-print-box",
113
-      //     type: "html",
114
-      //     style: style,
115
-      //     scanStyles: false
116
-      //   });
117
-      // }
139
+        const params = {
140
+          patient_id:val.patient_id
141
+        }
142
+        console.log("params",params)
143
+      getPatientCaseHistory(params).then(response=>{
144
+         if(response.data.state == 1){
145
+           var patient = response.data.data.patient
146
+           console.log("patinet",patient)
147
+           this.patient = patient
148
+           var history = response.data.data.history
149
+           console.log("history",history)
150
+           this.history = history
151
+           var hispatient = response.data.data.hispatient
152
+           console.log("hispatient",hispatient)
153
+           this.hispatient = hispatient
154
+         }
155
+      })
156
+    },
157
+    searchAction(){
158
+      this.getPatientList()
118 159
     },
160
+    
119 161
   },
120 162
   created() {
163
+    this.getPatientList() 
164
+   
121 165
   },
122
-  computed:{
123
-    filtedSchedules: function() {
124
-      var search_keyword = this.search_keyword
125
-      if (search_keyword.length > 0) {
126
-        var schedules = []
127
-        for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
128
-        const scheduleInfo = this.zone_schedules[o_i]
129
-        var originSchedules = scheduleInfo.schedules
130
-        if (originSchedules.length == 0) {
131
-            continue
132
-        }
133
-        var filtedSchedules = []
134
-        for (let s_i = 0; s_i < originSchedules.length; s_i++) {
135
-            const schedule = originSchedules[s_i]
136
-            if (schedule.patient.name.indexOf(search_keyword) != -1) {
137
-            filtedSchedules.push(schedule)
138
-            // break
139
-            }
140
-        }
141
-        if (filtedSchedules.length > 0) {
142
-            schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
143
-        }
144
-        }
145
-        return schedules
146
-      }
147
-    }
148
-  },
166
+  // computed:{
167
+  //   filtedSchedules: function() {
168
+  //     var search_keyword = this.search_keyword
169
+  //     if (search_keyword.length > 0) {
170
+  //       var schedules = []
171
+  //       for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
172
+  //       const scheduleInfo = this.zone_schedules[o_i]
173
+  //       var originSchedules = scheduleInfo.schedules
174
+  //       if (originSchedules.length == 0) {
175
+  //           continue
176
+  //       }
177
+  //       var filtedSchedules = []
178
+  //       for (let s_i = 0; s_i < originSchedules.length; s_i++) {
179
+  //           const schedule = originSchedules[s_i]
180
+  //           if (schedule.patient.name.indexOf(search_keyword) != -1) {
181
+  //           filtedSchedules.push(schedule)
182
+  //           // break
183
+  //           }
184
+  //       }
185
+  //       if (filtedSchedules.length > 0) {
186
+  //           schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
187
+  //       }
188
+  //       }
189
+  //       return schedules
190
+  //     }
191
+  //   }
192
+  // },
149 193
 };
150 194
 </script>
151 195
 

+ 86 - 24
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue 파일 보기

@@ -2,86 +2,148 @@
2 2
     <div id='prescription-print' class="prescription-print">
3 3
         <div class="printTitle">门诊病历</div>
4 4
         <div class="infoTitle">
5
-            <p>姓名:阿萨德</p>
6
-            <p>性别:男</p>
7
-            <p>年龄:12岁</p>
5
+            <p>姓名:{{patient.name}}</p>
6
+            <p>性别:
7
+                <span v-if="patient.gender == 1">男</span>
8
+                <span v-if="patient.gender == 2">女</span>
9
+            </p>
10
+            <p>年龄:{{patient.age}}岁</p>
8 11
         </div>
9 12
         <div class="infoTitle">
10
-            <p>婚姻状况:婚姻状况保密</p>
11
-            <p>职业:未分类</p>
13
+            <p>婚姻状况:
14
+              <span v-if="patient.marital_status == 1">已婚 </span>
15
+              <span v-if="patient.marital_status == 2">未婚 </span>
16
+            </p>
17
+            <p>职业:{{getProfession(patient.profession)}}</p>
12 18
         </div>
13 19
         <div class="otherInfo">
14 20
             <p>医保号:</p>
15
-            <p style="flex:1;">7938749234</p>
21
+            <p style="flex:1;">{{patient.health_care_no}}</p>
16 22
         </div>
17 23
         <div class="otherInfo">
18 24
             <p>联系电话:</p>
19
-            <p style="flex:1;">23234343234</p>
25
+            <p style="flex:1;">{{patient.phone}}</p>
20 26
         </div>
21 27
         <div class="otherInfo">
22 28
             <p>通讯地址:</p>
23
-            <p style="flex:1;">奥数都我阿苏do一按实际的福克斯</p>
29
+            <p style="flex:1;">{{patient.home_address}}</p>
24 30
         </div>
25 31
         <div class="otherInfo">
26 32
             <p>药物过敏史:</p>
27
-            <p style="flex:1;">奥数都我阿苏do一按实际的福克斯</p>
33
+            <p style="flex:1;">{{patient.past_history}}</p>
28 34
         </div>
29 35
         <div class="otherInfo">
30 36
             <p>病历编号:</p>
31
-            <p style="flex:1;">2020110300002525</p>
37
+            <p style="flex:1;">{{patient.id}}</p>
32 38
         </div>
33 39
         <div style="page-break-after:always;margin-top:50px;"></div>
34 40
 
35 41
 
36 42
         <div class="printTitle">病历内容</div>
37 43
         <div class="recordTitle">
38
-            <p>科别:全科</p>
39
-            <p>姓名:阿萨德</p>
40
-            <p>性别:男</p>
41
-            <p>年龄:12岁</p>
44
+            <p>科别:{{hispatient.departments}}</p>
45
+            <p>姓名:{{hispatient.name}}</p>
46
+            <p>性别:
47
+                <span v-if="hispatient.gender == 1">男</span>
48
+                <span v-if="hispatient.gender == 2">女</span>
49
+            </p>
50
+            <p>年龄:{{hispatient.age}}岁</p>
42 51
         </div>
43 52
         <div class="otherInfo">
44 53
             <p class="otherName">主诉:</p>
45
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
54
+            <p style="flex:1;">{{history.chief_conplaint}}</p>
46 55
         </div>
47 56
         <div class="otherInfo">
48 57
             <p class="otherName">现病史:</p>
49
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
58
+            <p style="flex:1;">{{history.history_of_present_illness}}</p>
50 59
         </div>
51 60
         <div class="otherInfo">
52 61
             <p class="otherName">既往史:</p>
53
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
62
+            <p style="flex:1;">{{history.past_history}}</p>
54 63
         </div>
55 64
         <div class="otherInfo">
56 65
             <p class="otherName">药物过敏史:</p>
57
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
66
+            <p style="flex:1;">{{history.past_history}}</p>
58 67
         </div>
59 68
         <div class="otherInfo">
60 69
             <p class="otherName">个人史:</p>
61
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的爱神的箭了卡萨建档立卡加上来得及阿斯利康的爱神的箭了卡萨建档立卡加上来得及阿斯利康的爱神的箭了卡萨建档立卡加上来得及阿斯利康的爱神的箭了卡萨建档立卡加上来得及阿斯利康的爱神的箭了卡萨建档立卡加上来得及阿斯利康的爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
70
+            <p style="flex:1;">{{history.personal_history}}</p>
62 71
         </div>
63 72
         <div class="otherInfo">
64 73
             <p class="otherName">家族史:</p>
65
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
74
+            <p style="flex:1;">{{history.family_history}}</p>
66 75
         </div>
67 76
         <div class="otherInfo">
68 77
             <p class="otherName">体格检查:</p>
69
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
78
+            <p style="flex:1;"></p>
70 79
         </div>
71 80
         <div class="otherInfo">
72 81
             <p class="otherName">门诊诊断:</p>
73
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
82
+            <p style="flex:1;">{{history.diagnostic}}</p>
74 83
         </div>
75 84
         <div class="otherInfo">
76 85
             <p class="otherName">门诊医嘱:</p>
77
-            <p style="flex:1;">爱神的箭了卡萨建档立卡加上来得及阿斯利康的</p>
86
+            <p style="flex:1;"></p>
78 87
         </div>
79 88
         <div style="margin-top:20px;text-align:right;">
80
-            医生签名:阿斯加德
89
+            医生签名:{{getDoctor(history.doctor)}}
81 90
         </div>
82 91
     </div>
83 92
 </template>
93
+<script>
94
+import { getDataConfig } from "@/utils/data";
95
+import { getAllDoctorList } from "@/api/project/project"
96
+export default {
97
+    props:{
98
+      patient:Object,
99
+      hispatient:Object,
100
+      history:Object,
101
+    },
102
+    return:{
103
+      educationOptions:[]
104
+    },
105
+    data(){
84 106
 
107
+    },
108
+    methods:{
109
+      getProfession(id){
110
+        var name = ""
111
+        for(let i=0;i<this.educationOptions.length;i++){
112
+           if(id == this.educationOptions[i].id){
113
+              name = this.educationOptions[i].name
114
+           }
115
+        }
116
+        return name
117
+      },
118
+      getAllDoctorList(){
119
+           getAllDoctorList().then(response=>{
120
+             if(response.data.state == 1){
121
+               var doctor =  response.data.data.doctor
122
+
123
+               this.doctorList = doctor
124
+            //    var department = response.data.data.department
125
+            //    console.log("department",department)
126
+            //    this.departmentList = department
127
+             }
128
+           })   
129
+       },
130
+      getDoctor(id){
131
+        var name = ""
132
+        for(let i=0;i<this.doctorList.length;i++){
133
+          if(id == this.doctorList[i].admin_user_id){
134
+              name = this.doctorList[i].user_name
135
+          }
136
+        }
137
+        return name
138
+      }
139
+    },
140
+    created(){
141
+      this.educationOptions = getDataConfig("patient", "education_types");
142
+      console.log("22222",this.educationOptions)
143
+      this.getAllDoctorList()
144
+    }
145
+}
146
+</script>
85 147
 
86 148
 
87 149
 <style lang="scss" scoped>

+ 7 - 7
src/xt_pages/outpatientRegistration/index.vue 파일 보기

@@ -6,7 +6,7 @@
6 6
         <div class="app-container">
7 7
             <div class="nameTitle">患者基本信息:</div>
8 8
             <div class="formMain">
9
-                <el-form class="basicForm" :model="form" :rules="rules" ref="form"  label-width="100px">
9
+                <el-form class="basicForm" :model="form"  :rules="rules"  ref="form"  label-width="100px">
10 10
                     <el-form-item label="结算类型:">
11 11
                         <el-select v-model="form.settlementValue" placeholder="请选择">
12 12
                             <el-option
@@ -64,16 +64,13 @@
64 64
                     </el-form-item>
65 65
                     <el-form-item label="证件号码:" required prop="idCard">
66 66
                         <el-input v-model="form.idCard"></el-input>
67
-                        <!-- <div class="el-form-item__error" v-show="show">
68
-                          请填写证件号码
69
-                        </div> -->
70 67
                     </el-form-item>
71 68
    
72 69
                 </el-form>
73 70
             </div>
74 71
             <div class="nameTitle">患者挂号信息:</div>
75 72
             <div class="formMain">
76
-                <el-form class="basicForm" :model="form" :rules="rules" label-width="100px">
73
+                <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
77 74
                     <el-form-item label="挂号类型:"  prop="register">
78 75
                         <el-select v-model="form.register"  placeholder="请选择">
79 76
                             <el-option
@@ -248,7 +245,7 @@ export default {
248 245
             },
249 246
 
250 247
             rules: {
251
-              idCard: [{ required: true, message: '请填写项目名称', trigger: 'blur'  }],
248
+              idCard: [{ required: true, message: '证件号码不能为空', trigger: 'blur'  }],
252 249
               register: [{ required: true, message: '请选择挂号类型' , trigger: 'blur' }],
253 250
               doctor: [{ required: true, message: '请选择医生' , trigger: 'blur' }],
254 251
               department: [{ required: true, message: '请填写科室', trigger: 'blur' }],
@@ -361,6 +358,9 @@ export default {
361 358
            })   
362 359
         },
363 360
         saveHisPatient(formName){   
361
+           if(this.form.idCard == ""){
362
+             this.$message.error("证件号码不能为空")
363
+           }
364 364
           this.$refs[formName].validate((valid)=>{
365 365
              if(valid){
366 366
                   if(this.form.costChecked == true){
@@ -405,7 +405,7 @@ export default {
405 405
                      this.form.medicalCare = "",
406 406
                      this.form.birthday ="",
407 407
                      this.form.age ="",
408
-                     this.form.idCard = "",
408
+                    //  this.form.idCard = "",
409 409
                      this.form.register = "",
410 410
                      this.form.doctor = "",
411 411
                      this.form.department = "",

+ 5 - 3
src/xt_pages/outpatientRegistration/registrationHistory.vue 파일 보기

@@ -88,7 +88,7 @@
88 88
                 </el-table-column>
89 89
                 <el-table-column align="center" prop="name" label="操作" width="80">
90 90
                     <template slot-scope="scope">
91
-                        <el-button size="mini" type="primary" v-if="scope.row.is_return == 1" @click ="toReturnPatient(scope.row.id)" >退号</el-button> 
91
+                        <el-button size="mini" type="primary" v-if="scope.row.is_return == 1" @click ="toReturnPatient(scope.row.id)">退号</el-button> 
92 92
                         <el-button size="mini" type="primary" v-if="scope.row.is_return == 2" :disabled="true">已退号</el-button>
93 93
                         <el-button size="mini" type="primary" v-if="scope.row.is_return == 3" :disabled="true">已就诊</el-button>  
94 94
                     </template>
@@ -206,12 +206,14 @@ export default {
206 206
         // },
207 207
         changeStart(val){
208 208
           this.start_time = val
209
+          this.getlist()
209 210
         },
210 211
         changeEnd(val){
211
-           this.end_time = val
212
+          this.end_time = val
213
+          this.getlist()
212 214
         },
213 215
         changeRegister(val){
214
-
216
+          this.getlist()
215 217
         },
216 218
        handleSizeChange(val) {
217 219
           this.limit = val