Browse Source

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

XMLWAN 4 years ago
parent
commit
c4b5cd8f47

+ 7 - 7
src/api/his/his.js View File

34
 
34
 
35
 
35
 
36
 
36
 
37
-// export function createCaseHistory(params) {
38
-//   return request({
39
-//     url: "/api/doctorworkstation/casehistory/create",
40
-//     method: "post",
41
-//     params:params
42
-//   });
43
-// }
37
+export function getInitData(params) {
38
+  return request({
39
+    url: "/api/hisprescription/config",
40
+    method: "get",
41
+    params:params
42
+  });
43
+}
44
 
44
 
45
 
45
 
46
 // export function createCaseHistory(params) {
46
 // export function createCaseHistory(params) {

File diff suppressed because it is too large
+ 548 - 477
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue


+ 23 - 5
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

1
 <template>
1
 <template>
2
   <div class="prescriptionTable">
2
   <div class="prescriptionTable">
3
-    <el-table v-if="activeType  == '1'" :data="prescription.advice" border style="width: 98%;" :row-style="{ color: '#303133' }"
3
+    <div>{{prescription.name}}</div>
4
+    <el-table v-if="activeType  == '1'" :data="prescription.advices" border style="width: 98%;" :row-style="{ color: '#303133' }"
4
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
       <el-table-column align="center" type="selection" width="40"></el-table-column>
6
       <el-table-column align="center" type="selection" width="40"></el-table-column>
6
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7
       <el-table-column align="center" prop="name" label="名称">
8
       <el-table-column align="center" prop="name" label="名称">
8
-        <template slot-scope="scope">{{ scope.row.name }}</template>
9
+        <template slot-scope="scope">{{ scope.row.drug_name }}</template>
9
       </el-table-column>
10
       </el-table-column>
10
 
11
 
11
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
12
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
12
         <template slot-scope="scope">
13
         <template slot-scope="scope">
13
-          <el-input v-model="input" placeholder=""></el-input>
14
+          <!--<el-input v-model="input" placeholder=""></el-input>-->
15
+          <!--<el-input  v-model="scope.row.single_dose"></el-input>-->
14
         </template>
16
         </template>
15
       </el-table-column>
17
       </el-table-column>
16
       <el-table-column align="center" prop="name" width="50" label="用法">
18
       <el-table-column align="center" prop="name" width="50" label="用法">
189
     props: {
191
     props: {
190
       preDrugs: Array,
192
       preDrugs: Array,
191
       activeType: String,
193
       activeType: String,
192
-      prescription:Object,
194
+      prescription:{
195
+        type:Object,
196
+        default: function () {
197
+          return {
198
+            name:"",
199
+            advices:[],
200
+            projects:[],
201
+          };
202
+        }
203
+
204
+      },
193
     },
205
     },
194
     data() {
206
     data() {
195
       return {
207
       return {
208
+        advices:[],
196
         tableData: [],
209
         tableData: [],
197
         newoptions: [{
210
         newoptions: [{
198
           value: '1',
211
           value: '1',
213
         value: '1',
226
         value: '1',
214
         input: 1
227
         input: 1
215
       }
228
       }
216
-    }
229
+    },methods:{
230
+      setNewData:function(data){
231
+
232
+        // this.prescription.advices = data.advices
233
+      }
234
+    },
217
   }
235
   }
218
 </script>
236
 </script>
219
 
237
 

+ 54 - 36
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

42
             <el-radio-button label="病历"></el-radio-button>
42
             <el-radio-button label="病历"></el-radio-button>
43
           </el-radio-group>
43
           </el-radio-group>
44
         </div>
44
         </div>
45
-        <desk-prescription :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo" v-if="titleType == '处方'" style="flex:1;"></desk-prescription>
46
-        <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"  v-if="titleType == '病历'"></desk-record>
45
+        <desk-prescription ref="prescriptions"  :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"
46
+                           v-if="titleType == '处方'" style="flex:1;"></desk-prescription>
47
+        <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
48
+                     :hisPatientInfo="hisPatientInfo" v-if="titleType == '病历'"></desk-record>
47
       </div>
49
       </div>
48
 
50
 
49
     </div>
51
     </div>
56
   import deskRecord from './components/deskRecord'
58
   import deskRecord from './components/deskRecord'
57
   import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
59
   import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
58
 
60
 
59
-  import {
60
-    uParseTime
61
-  } from "@/utils/tools";
61
+  import { uParseTime } from '@/utils/tools'
62
+
62
   export default {
63
   export default {
63
     components: {
64
     components: {
64
       BreadCrumb,
65
       BreadCrumb,
67
     },
68
     },
68
     data() {
69
     data() {
69
       return {
70
       return {
70
-        prescriptions:[
71
+        prescriptions: [
71
           {
72
           {
72
-            name:"处方1",
73
-            advice:[],
74
-            project:[],
73
+            name: '处方1',
74
+            advice: [],
75
+            project: []
75
           }
76
           }
76
         ],
77
         ],
77
         search_input: '',
78
         search_input: '',
87
         patientTableData: [{}],
88
         patientTableData: [{}],
88
         patientInfo: {},
89
         patientInfo: {},
89
         hisPatientInfo: {},
90
         hisPatientInfo: {},
90
-        case_history:{},
91
+        case_history: {}
91
       }
92
       }
92
     },
93
     },
93
     methods: {
94
     methods: {
94
-      changeTab(val){
95
-
96
-
95
+      changeTab(val) {
97
 
96
 
98
       },
97
       },
99
       searchAction() {
98
       searchAction() {
144
             this.patientInfo = response.data.data.xt_info
143
             this.patientInfo = response.data.data.xt_info
145
             this.hisPatientInfo = response.data.data.his_info
144
             this.hisPatientInfo = response.data.data.his_info
146
             this.case_history = response.data.data.case_history
145
             this.case_history = response.data.data.case_history
147
-            this.patientInfo.birth = uParseTime(this.patientInfo.birthday, "{y}-{m}-{d}");
148
-            if(this.case_history.temperature <= 0){
149
-              this.case_history.temperature = ""
146
+            this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
147
+            if (this.case_history.temperature <= 0) {
148
+              this.case_history.temperature = ''
150
             }
149
             }
151
-            if(this.case_history.blood_sugar <= 0){
152
-              this.case_history.blood_sugar = ""
150
+            if (this.case_history.blood_sugar <= 0) {
151
+              this.case_history.blood_sugar = ''
153
             }
152
             }
154
-            if(this.case_history.pulse <= 0){
155
-              this.case_history.pulse = ""
153
+            if (this.case_history.pulse <= 0) {
154
+              this.case_history.pulse = ''
156
             }
155
             }
157
-            if(this.case_history.sbp <= 0){
158
-              this.case_history.sbp = ""
156
+            if (this.case_history.sbp <= 0) {
157
+              this.case_history.sbp = ''
159
             }
158
             }
160
-            if(this.case_history.dbp <= 0){
161
-              this.case_history.dbp = ""
159
+            if (this.case_history.dbp <= 0) {
160
+              this.case_history.dbp = ''
162
             }
161
             }
163
-            if(this.case_history.height <= 0){
164
-              this.case_history.height = ""
162
+            if (this.case_history.height <= 0) {
163
+              this.case_history.height = ''
165
             }
164
             }
166
-            if(this.case_history.blood_fat <= 0){
167
-              this.case_history.blood_fat = ""
165
+            if (this.case_history.blood_fat <= 0) {
166
+              this.case_history.blood_fat = ''
168
             }
167
             }
169
-            if(this.case_history.sick_type <= 0){
170
-              this.case_history.sick_type = ""
168
+            if (this.case_history.sick_type <= 0) {
169
+              this.case_history.sick_type = ''
171
             }
170
             }
172
-            this.case_history.sick_date = uParseTime(this.case_history.sick_date, "{y}-{m}-{d}");
173
-            if(this.case_history.is_infect == 1){
171
+            this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
172
+            if (this.case_history.is_infect == 1) {
174
               this.case_history.is_infect = true
173
               this.case_history.is_infect = true
175
-            }else{
174
+            } else {
176
               this.case_history.is_infect = false
175
               this.case_history.is_infect = false
177
-
178
             }
176
             }
179
-
180
-
177
+            this.prescriptions = []
178
+            if (response.data.data.prescription.length > 0) {
179
+              for (let i = 0; i < response.data.data.prescription.length; i++) {
180
+                var prescription = response.data.data.prescription[i]
181
+                let index = i + 1
182
+                let obj = {
183
+                  name: "处方" + index,
184
+                  advices: prescription.advices,
185
+                  projects: prescription.project,
186
+                }
187
+                this.prescriptions.push(obj)
188
+              }
189
+            }else{
190
+              let obj = {
191
+                name: "处方" + 1,
192
+                advices: [],
193
+                projects: [],
194
+              }
195
+              this.prescriptions.push(obj)
196
+            }
197
+            console.log()
198
+            this.$refs.prescriptions.setData(this.prescriptions)
181
           }
199
           }
182
         })
200
         })
183
 
201