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,13 +34,13 @@ export function createCaseHistory(params) {
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 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,16 +1,18 @@
1 1
 <template>
2 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 5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5 6
       <el-table-column align="center" type="selection" width="40"></el-table-column>
6 7
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7 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 10
       </el-table-column>
10 11
 
11 12
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
12 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 16
         </template>
15 17
       </el-table-column>
16 18
       <el-table-column align="center" prop="name" width="50" label="用法">
@@ -189,10 +191,21 @@
189 191
     props: {
190 192
       preDrugs: Array,
191 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 206
     data() {
195 207
       return {
208
+        advices:[],
196 209
         tableData: [],
197 210
         newoptions: [{
198 211
           value: '1',
@@ -213,7 +226,12 @@
213 226
         value: '1',
214 227
         input: 1
215 228
       }
216
-    }
229
+    },methods:{
230
+      setNewData:function(data){
231
+
232
+        // this.prescription.advices = data.advices
233
+      }
234
+    },
217 235
   }
218 236
 </script>
219 237
 

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

@@ -42,8 +42,10 @@
42 42
             <el-radio-button label="病历"></el-radio-button>
43 43
           </el-radio-group>
44 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 49
       </div>
48 50
 
49 51
     </div>
@@ -56,9 +58,8 @@
56 58
   import deskRecord from './components/deskRecord'
57 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 63
   export default {
63 64
     components: {
64 65
       BreadCrumb,
@@ -67,11 +68,11 @@
67 68
     },
68 69
     data() {
69 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 78
         search_input: '',
@@ -87,13 +88,11 @@
87 88
         patientTableData: [{}],
88 89
         patientInfo: {},
89 90
         hisPatientInfo: {},
90
-        case_history:{},
91
+        case_history: {}
91 92
       }
92 93
     },
93 94
     methods: {
94
-      changeTab(val){
95
-
96
-
95
+      changeTab(val) {
97 96
 
98 97
       },
99 98
       searchAction() {
@@ -144,40 +143,59 @@
144 143
             this.patientInfo = response.data.data.xt_info
145 144
             this.hisPatientInfo = response.data.data.his_info
146 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 173
               this.case_history.is_infect = true
175
-            }else{
174
+            } else {
176 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