陈少旭 2 gadus atpakaļ
vecāks
revīzija
da455590fd

+ 7 - 5
src/xt_pages/outpatientCharges/statementTemplate/printFour.vue Parādīt failu

94
                                 </div>
94
                                 </div>
95
                                 <div style="border-right:1px solid #000;width:15%;text-align:center;">
95
                                 <div style="border-right:1px solid #000;width:15%;text-align:center;">
96
                                     <p class="chargeP">
96
                                     <p class="chargeP">
97
-                                        <span v-if='item.type == 1'>{{item.advice.drug.drug_spec}}</span>
98
-                                        <span v-if='item.type == 2'>{{item.project.project.unit}}</span>
99
-                                        <span v-if='item.type == 3'>{{item.project.unit}}</span>
97
+                                        <span v-if='item.type == 1'>{{ item.advice.drug.dose + item.advice.drug.dose_unit + "*" +item.advice.drug.min_number + item.advice.drug.min_unit +"/" + item.advice.drug.max_unit}}</span>
98
+                                        <span v-if='item.project.type == 2'>{{item.project.project.unit}}</span>
99
+                                        <span v-if='item.project.type == 3'>{{item.project.unit}}</span>
100
                                     </p>
100
                                     </p>
101
                                 </div>
101
                                 </div>
102
                                 <div style="border-right:1px solid #000;width:15%;text-align:center;">
102
                                 <div style="border-right:1px solid #000;width:15%;text-align:center;">
103
                                     <p class="chargeP">
103
                                     <p class="chargeP">
104
-                                        <span>{{item.cnt}}次</span>
104
+                                      <span v-if='item.type == 1'>{{item.cnt}}{{item.advice.prescribing_number_unit}}</span>
105
+                                      <span v-if='item.project.type == 2'>{{item.cnt}}{{item.project.project.unit}}</span>
106
+                                      <span v-if='item.project.type == 3'>{{item.cnt}}{{item.project.unit}}</span>
105
                                     </p>
107
                                     </p>
106
                                 </div>
108
                                 </div>
107
                                 <div style="border-right:1px solid #000;width:15%;text-align:center;">
109
                                 <div style="border-right:1px solid #000;width:15%;text-align:center;">
199
                               </div>
201
                               </div>
200
                               <div style="border-right:1px solid #000;width:15%;text-align:center;">
202
                               <div style="border-right:1px solid #000;width:15%;text-align:center;">
201
                                   <p class="chargeP">
203
                                   <p class="chargeP">
202
-                                      <span v-if='item.advice_id > 0'>{{item.advice.drug.drug_spec}}</span>
204
+                                      <span v-if='item.advice_id > 0'>{{item.advice.drug.dose + item.advice.drug.dose_unit + "*" +item.advice.drug.min_number + item.advice.drug.min_unit +"/" + item.advice.drug.max_unit}}</span>
203
                                       <span v-if='item.project.type == 2'>{{item.project.project.unit}}</span>
205
                                       <span v-if='item.project.type == 2'>{{item.project.project.unit}}</span>
204
                                       <span v-if='item.project.type == 3'>{{item.project.unit}}</span>
206
                                       <span v-if='item.project.type == 3'>{{item.project.unit}}</span>
205
                                   </p>
207
                                   </p>

+ 9 - 1
src/xt_pages/outpatientTool/components/settle.vue Parādīt failu

129
               <template slot-scope="scope">{{scope.row.hifmi_pay.toFixed(2)}}</template>
129
               <template slot-scope="scope">{{scope.row.hifmi_pay.toFixed(2)}}</template>
130
           </el-table-column>
130
           </el-table-column>
131
 
131
 
132
+        <el-table-column align="center" prop="item_name" label="其他支付">
133
+          <template slot-scope="scope">{{scope.row.oth_pay.toFixed(2)}}</template>
134
+        </el-table-column>
135
+
136
+        <el-table-column align="center" prop="item_name" label="公务员医疗补助资金支出">
137
+          <template slot-scope="scope">{{scope.row.cvlserv_pay.toFixed(2)}}</template>
138
+        </el-table-column>
139
+
132
         <el-table-column align="center" prop="item_name" label="微信支付">
140
         <el-table-column align="center" prop="item_name" label="微信支付">
133
           <template slot-scope="scope">{{scope.row.wechat_pay}}</template>
141
           <template slot-scope="scope">{{scope.row.wechat_pay}}</template>
134
         </el-table-column>
142
         </el-table-column>
352
         })
360
         })
353
         this.sameRowArr = sameRowArr
361
         this.sameRowArr = sameRowArr
354
       }, merge({ row, column, rowIndex, columnIndex }) {
362
       }, merge({ row, column, rowIndex, columnIndex }) {
355
-        if (columnIndex === 0 || columnIndex === 1  || columnIndex === 15) {
363
+        if (columnIndex === 0 || columnIndex === 1) {
356
           const _row = this.tempArr[rowIndex]
364
           const _row = this.tempArr[rowIndex]
357
           const _col = _row > 0 ? 1 : 0
365
           const _col = _row > 0 ? 1 : 0
358
           return {
366
           return {

+ 63 - 35
src/xt_pages/user/components/PatientSidebar.vue Parādīt failu

98
               name:'1-7',
98
               name:'1-7',
99
               label:'血管通路'
99
               label:'血管通路'
100
             },
100
             },
101
-            {
102
-              name: '1-2',
103
-              label: '病程管理'
104
-            },
105
-            {
106
-              name: '1-9',
107
-              label: '阶段小结'
108
-            },
109
-            {
110
-              name: '1-10',
111
-              label: '出院小结'
112
-            },
113
-            {
114
-              name: '1-3',
115
-              label: '检验检查'
116
-            },
117
-            {
118
-              name:'1-8',
119
-              label:'传染病管理'
120
-            },
121
-            {
122
-              name: '1-5',
123
-              label: '抢救记录'
124
-            },
125
-            {
126
-              name: '1-11',
127
-              label: '首次病程记录'
128
-            }
101
+            // {
102
+            //   name: '1-2',
103
+            //   label: '病程管理'
104
+            // },
105
+            // {
106
+            //   name: '1-9',
107
+            //   label: '阶段小结'
108
+            // },
109
+            // {
110
+            //   name: '1-10',
111
+            //   label: '出院小结'
112
+            // },
113
+            // {
114
+            //   name: '1-3',
115
+            //   label: '检验检查'
116
+            // },
117
+            // {
118
+            //   name:'1-8',
119
+            //   label:'传染病管理'
120
+            // },
121
+            // {
122
+            //   name: '1-5',
123
+            //   label: '抢救记录'
124
+            // },
125
+            // {
126
+            //   name: '1-11',
127
+            //   label: '首次病程记录'
128
+            // }
129
           ]
129
           ]
130
         },
130
         },
131
         {
131
         {
149
               label: '宣教信息'
149
               label: '宣教信息'
150
             }
150
             }
151
           ]
151
           ]
152
-        }, {
152
+        },
153
+        {
153
           name: '3',
154
           name: '3',
154
           label: '病情记录',
155
           label: '病情记录',
155
           children: [
156
           children: [
162
               label: '体格检查'
163
               label: '体格检查'
163
             },
164
             },
164
             {
165
             {
165
-              name: '3-3',
166
+              name: '1-11',
166
               label: '首次病程记录'
167
               label: '首次病程记录'
167
             },
168
             },
168
             {
169
             {
169
-              name: '3-4',
170
+              name: '1-2',
170
               label: '病程记录'
171
               label: '病程记录'
171
             }, {
172
             }, {
172
-              name: '3-5',
173
+              name: '1-5',
173
               label: '抢救记录'
174
               label: '抢救记录'
174
             }, {
175
             }, {
175
-              name: '3-6',
176
+              name: '1-9',
176
               label: '阶段小结'
177
               label: '阶段小结'
177
             }, {
178
             }, {
178
-              name: '3-7',
179
+              name: '1-10',
179
               label: '出院小结'
180
               label: '出院小结'
180
             }
181
             }
181
           ]
182
           ]
182
-        }
183
+        },
184
+        {
185
+          name: '4',
186
+          label: '检验检查',
187
+          children: [
188
+            {
189
+              name: '1-3',
190
+              label: '肾科检验'
191
+            },
192
+            {
193
+              name: '4-1',
194
+              label: '肾科检查'
195
+            },
196
+            {
197
+              name: '4-3',
198
+              label: 'KT/V'
199
+            },
200
+            {
201
+              name: '1-8',
202
+              label: '传染病管理'
203
+            },
204
+          ]
205
+        },
206
+
183
       ],
207
       ],
184
       name:""
208
       name:""
185
     }
209
     }
237
       } else if(name == '3-2'){
261
       } else if(name == '3-2'){
238
         this.$router.push({path:'/patient/patient/'+this.id+'/firstDisease'})
262
         this.$router.push({path:'/patient/patient/'+this.id+'/firstDisease'})
239
 
263
 
264
+      }else if(name == '4-1'){
265
+        this.$router.push({path:'/patients/inspection_check?id='+this.id})
266
+      }else if(name == '4-3'){
267
+        this.$router.push({path:'/patients/ktv?id='+this.id})
240
       }
268
       }
241
     },
269
     },
242
     changePatient(value) {
270
     changePatient(value) {

+ 524 - 113
src/xt_pages/user/inspection.vue Parādīt failu

40
         </el-col>
40
         </el-col>
41
         <el-col :span="17" v-loading="itemLoading">
41
         <el-col :span="17" v-loading="itemLoading">
42
           <div class="filter-container" style="float:right">
42
           <div class="filter-container" style="float:right">
43
+            <el-button
44
+              size="small"
45
+              class="filter-item"
46
+              type="primary"
47
+              @click="openPic()"
48
+              icon="el-icon-circle-plus-outline"
49
+              :disabled="project ? false : true"
50
+            >上传图片
51
+            </el-button>
43
             <el-button
52
             <el-button
44
               size="small"
53
               size="small"
45
               class="filter-item"
54
               class="filter-item"
47
               @click="openNew()"
56
               @click="openNew()"
48
               icon="el-icon-circle-plus-outline"
57
               icon="el-icon-circle-plus-outline"
49
               :disabled="project ? false : true"
58
               :disabled="project ? false : true"
50
-              >新增</el-button
59
+            >新增
60
+            </el-button
51
             >
61
             >
52
             <el-button
62
             <el-button
53
               size="small"
63
               size="small"
56
               icon="el-icon-edit-outline"
66
               icon="el-icon-edit-outline"
57
               @click="openEdit()"
67
               @click="openEdit()"
58
               :disabled="itemDate ? false : true"
68
               :disabled="itemDate ? false : true"
59
-              >修改</el-button
69
+            >修改
70
+            </el-button
60
             >
71
             >
61
             <el-button
72
             <el-button
62
               size="small"
73
               size="small"
65
               icon="el-icon-delete"
76
               icon="el-icon-delete"
66
               @click="deleteInspection()"
77
               @click="deleteInspection()"
67
               :disabled="itemDate ? false : true"
78
               :disabled="itemDate ? false : true"
68
-              >删除</el-button
79
+            >删除
80
+            </el-button
69
             >
81
             >
70
           </div>
82
           </div>
71
           <div class="filter-container">
83
           <div class="filter-container">
72
             <el-button class="filter-item" type="text" style="color:#000"
84
             <el-button class="filter-item" type="text" style="color:#000"
73
-              >{{ itemName }}
85
+            >{{ itemName }}
74
               <span v-if="itemDate"
86
               <span v-if="itemDate"
75
-                >(检查日期:{{ itemDate }})</span
87
+              >(检查日期:{{ itemDate }})</span
76
               ></el-button
88
               ></el-button
77
             >
89
             >
78
           </div>
90
           </div>
79
-          <el-table
80
-            :header-cell-style="{
91
+          <div v-if="!isPic">
92
+            <el-table
93
+              :header-cell-style="{
81
               backgroundColor: 'rgb(245, 247, 250)',
94
               backgroundColor: 'rgb(245, 247, 250)',
82
               color: '#606266'
95
               color: '#606266'
83
             }"
96
             }"
84
-            :row-style="{ color: '#303133' }"
85
-            :data="items"
86
-            border
87
-            style="width: 100%"
88
-            id="user-inspection-order"
89
-          >
90
-            <el-table-column
91
-              prop="item_name"
92
-              label="检验项目"
93
-              align="center"
94
-              min-width="180"
95
-            >
96
-              <template slot-scope="scope">
97
-                {{ scope.row.item_name }} {{ scope.row.item_name_addition }}
98
-              </template>
99
-            </el-table-column>
100
-            <el-table-column
101
-              prop="name"
102
-              label="结果"
103
-              align="center"
104
-              min-width="80"
97
+              :row-style="{ color: '#303133' }"
98
+              :data="items"
99
+              border
100
+              style="width: 100%"
101
+              id="user-inspection-order"
102
+
105
             >
103
             >
106
-              <template slot-scope="scope">
107
-                <span v-if="scope.row.value =='阳性'" style="color:red">{{ scope.row.value }}</span>
108
-                <span v-else>{{ scope.row.value }}</span>
109
-                <span v-if="scope.row.range_type == 1">
110
-                  {{scope.row.value_direction}}
104
+              <el-table-column
105
+                prop="item_name"
106
+                label="检验项目"
107
+                align="center"
108
+                min-width="180"
109
+              >
110
+                <template slot-scope="scope">
111
+                  {{ scope.row.item_name }} {{ scope.row.item_name_addition }}
112
+                </template>
113
+              </el-table-column>
114
+
115
+              <el-table-column
116
+                prop="name"
117
+                label="结果"
118
+                align="center"
119
+                min-width="80"
120
+              >
121
+                <template slot-scope="scope">
122
+                  <div v-if="items[0].value.indexOf('http') < 0">
123
+                    <span v-if="scope.row.value =='阳性'" style="color:red">{{ scope.row.value }}</span>
124
+                    <span v-else>{{ scope.row.value }}</span>
125
+                    <span v-if="scope.row.range_type == 1">
126
+                  {{ scope.row.value_direction }}
111
                 </span>
127
                 </span>
128
+                  </div>
129
+                  <div v-else>
130
+                    <img :src="scope.row.value">
131
+                  </div>
132
+                </template>
133
+              </el-table-column>
134
+
135
+              <el-table-column
136
+                prop="address"
137
+                label="参考值"
138
+                align="center"
139
+                min-width="120"
140
+              >
141
+                <template slot-scope="scope">
142
+                  <div   v-if="items[0].value.indexOf('http')  < 0">
143
+                     <span v-if="scope.row.range_type == 1"
144
+                     >{{ scope.row.range_min }}~{{ scope.row.range_max }}</span
145
+                     >
146
+                    <span v-else>{{ scope.row.range_value }}</span>
147
+                  </div>
148
+                </template>
149
+
150
+              </el-table-column>
151
+
152
+              <el-table-column
153
+                prop="111"
154
+                label="单位"
155
+                align="center"
156
+                min-width="80"
157
+              >
158
+                <template slot-scope="scope">
159
+                  <div  v-if="items[0].value.indexOf('http') < 0">
160
+                    <span>{{ scope.row.unit }}</span>
161
+                  </div>
162
+                </template>
163
+              </el-table-column>
164
+            </el-table>
165
+          </div>
166
+          <div v-else>
167
+            <el-row>
168
+              <template v-for="(item, index) in items">
169
+                <el-col :span="7" :key="index">
170
+                  <div style="width: 400px">
171
+                    <el-row>
172
+                      <img  :src="item.value" alt="">
173
+                    </el-row>
174
+                    <el-row>
175
+                      <div>{{item.item_name}}</div>
176
+                    </el-row>
177
+                  </div>
178
+                </el-col>
112
               </template>
179
               </template>
113
-            </el-table-column>
114
-            <el-table-column
115
-              prop="address"
116
-              label="参考值"
117
-              align="center"
118
-              min-width="120"
119
-            >
120
-              <template slot-scope="scope">
121
-                <span v-if="scope.row.range_type == 1"
122
-                  >{{ scope.row.range_min }}~{{ scope.row.range_max }}</span
123
-                >
124
-                <span v-else>{{ scope.row.range_value }}</span>
125
-              </template>
126
-            </el-table-column>
127
-            <el-table-column
128
-              prop="unit"
129
-              label="单位"
130
-              align="center"
131
-              min-width="80"
132
-            >
133
-            </el-table-column>
134
-          </el-table>
180
+            </el-row>
181
+
182
+          </div>
183
+
135
           <el-pagination
184
           <el-pagination
136
             align="right"
185
             align="right"
137
             @current-change="handleCurrentChangePage"
186
             @current-change="handleCurrentChangePage"
238
           type="primary"
287
           type="primary"
239
           v-if="form.method == 'add'"
288
           v-if="form.method == 'add'"
240
           @click="submitNew('form')"
289
           @click="submitNew('form')"
241
-          >保 存</el-button
290
+        >保 存
291
+        </el-button
242
         >
292
         >
243
         <el-button type="primary" v-else @click="submitEdit('form')"
293
         <el-button type="primary" v-else @click="submitEdit('form')"
244
-          >保 存</el-button
294
+        >保 存
295
+        </el-button
245
         >
296
         >
246
       </div>
297
       </div>
247
     </el-dialog>
298
     </el-dialog>
299
+
300
+    <el-dialog
301
+      :title="formTitle"
302
+      :visible.sync="dialogPicFormVisible"
303
+      width="1000px"
304
+      id="user-inspection-form"
305
+    >
306
+      <el-form :model="form" ref="form" label-position="top">
307
+        <el-row>
308
+          <el-col :span="7">
309
+            <el-form-item
310
+              label="检验日期"
311
+              prop="inspect_date"
312
+              :rules="[
313
+                { required: true, message: '请输入检验日期', trigger: 'blur' }
314
+              ]"
315
+            >
316
+              <el-date-picker
317
+                style="width:95%"
318
+                v-model="form.inspect_date"
319
+                type="datetime"
320
+                value-format="yyyy-MM-dd HH:mm"
321
+                format="yyyy-MM-dd HH:mm"
322
+                placeholder="选择日期"
323
+              >
324
+              </el-date-picker>
325
+            </el-form-item>
326
+          </el-col>
327
+        </el-row>
328
+        <el-row>
329
+          <template v-for="(item, index) in form.imgs">
330
+            <el-col :span="5" :key="index">
331
+              <div>
332
+                <el-row>
333
+                  <img width="100px" :src="item.img_url" alt="">
334
+                </el-row>
335
+                <el-row>
336
+                  <el-input v-model="item.desc" style="width: 100px"></el-input>
337
+                </el-row>
338
+                <el-row>
339
+                  <el-button
340
+                    type="danger"
341
+                    @click="deletePic(item,index)"
342
+                  >删除
343
+                  </el-button>
344
+                </el-row>
345
+              </div>
346
+            </el-col>
347
+            <el-col :span="1" :key="'form-col' + index">&nbsp;</el-col>
348
+          </template>
349
+        </el-row>
350
+      </el-form>
351
+      <div slot="footer" class="dialog-footer">
352
+        <el-upload
353
+          :data="uploadData"
354
+          :multiple="false"
355
+          action="https://upload.qiniup.com"
356
+          :show-file-list="false"
357
+          :on-error="handleAvatarError"
358
+          :on-success="handleAvatarSuccess"
359
+          :before-upload="beforeAvatarUpload">
360
+          <el-button type="primary">选择文件</el-button>
361
+        </el-upload>
362
+        <el-button @click="dialogPicFormVisible = false">取 消</el-button>
363
+        <el-button
364
+          type="primary"
365
+          v-if="this.form.pic_method== 'add'"
366
+          @click="submitPicNew()"
367
+        >保 存
368
+        </el-button>
369
+
370
+        <el-button
371
+          type="primary"
372
+          v-if="this.form.pic_method == 'edit'"
373
+          @click="submitEditPicNew()"
374
+        >修 改
375
+        </el-button>
376
+      </div>
377
+    </el-dialog>
248
   </div>
378
   </div>
379
+
249
 </template>
380
 </template>
250
 
381
 
251
 <script>
382
 <script>
252
 import PatientSidebar from './components/PatientSidebar'
383
 import PatientSidebar from './components/PatientSidebar'
384
+import { getToken } from '@/api/qiniu'
385
+
253
 import {
386
 import {
254
-  fetchInspectionReference,
255
   CreatePatientInspection,
387
   CreatePatientInspection,
256
-  fetchPatientInspections,
388
+  CreatePatientPICInspection,
389
+  editPatientPICInspection,
390
+  DeletePatientInspection,
257
   EditPatientInspection,
391
   EditPatientInspection,
258
-  DeletePatientInspection
392
+  fetchInspectionReference,
393
+  fetchPatientInspections
259
 } from '@/api/inspection'
394
 } from '@/api/inspection'
260
-import { uParseTime, isPositiveNumber } from '@/utils/tools'
395
+import { getFileExtension, uParseTime } from '@/utils/tools'
261
 
396
 
262
 export default {
397
 export default {
263
   name: 'Inspection',
398
   name: 'Inspection',
265
   data() {
400
   data() {
266
     return {
401
     return {
267
       total: 0,
402
       total: 0,
403
+      qiniuDomain: 'https://images.shengws.com/',
404
+      isPic:false,
405
+      uploadData: { token: '', key: '' },
268
       pageLoading: true,
406
       pageLoading: true,
269
       itemLoading: false,
407
       itemLoading: false,
270
       formLoading: false,
408
       formLoading: false,
276
       },
414
       },
277
       itemName: '请选择项目',
415
       itemName: '请选择项目',
278
       formTitle: '',
416
       formTitle: '',
417
+      dialogPicFormVisible: false,
279
       dialogFormVisible: false,
418
       dialogFormVisible: false,
280
       patient_info: null,
419
       patient_info: null,
420
+
281
       form: {
421
       form: {
282
         remind_cycle: '',
422
         remind_cycle: '',
283
         method: 'add',
423
         method: 'add',
424
+        pic_method:'add',
284
         project_id: 0,
425
         project_id: 0,
285
         inspect_date: '',
426
         inspect_date: '',
286
         old_inspect_date: '',
427
         old_inspect_date: '',
287
-        formItem: [{ id: 0, value: '' }]
428
+        formItem: [{ id: 0, value: '' }],
429
+        imgs: [],
430
+        delete_imgs:[],
288
       },
431
       },
289
       formItem: [],
432
       formItem: [],
290
       items: [],
433
       items: [],
300
     }
443
     }
301
   },
444
   },
302
   methods: {
445
   methods: {
303
-    changeInput(item){
304
-      
305
-      if(item.item_name == '血清铁' || item.item_name == '总铁结合力'){
446
+    beforeAvatarUpload(file) {
447
+      // const isJPG = file.type === "image/jpeg";
448
+      var fileType = file.type
449
+      const isJPG = fileType.indexOf('image') > -1
450
+      const isLt2M = file.size / 1024 / 1024 < 5
451
+
452
+      if (!isJPG) {
453
+        this.$message.error('只能上传图片')
454
+        return false
455
+      }
456
+      if (!isLt2M) {
457
+        this.$message.error('上传头像图片大小不能超过 5MB!')
458
+        return false
459
+      }
460
+
461
+      var date = new Date()
462
+      var ext = getFileExtension(file.name)
463
+      var key =
464
+        date.getFullYear() +
465
+        '/' +
466
+        (date.getMonth() + 1) +
467
+        '/' +
468
+        date.getDate() +
469
+        '/' +
470
+        date.getHours() +
471
+        '/' +
472
+        date.getMinutes() +
473
+        '/' +
474
+        date.getSeconds() +
475
+        '/' +
476
+        '_s_' +
477
+        file.uid +
478
+        '.' +
479
+        ext
480
+      this.loading = this.$loading({
481
+        lock: true,
482
+        text: '上传中...',
483
+        spinner: 'el-icon-loading',
484
+        background: 'rgba(0, 0, 0, 0.7)'
485
+      })
486
+
487
+      const _self = this
488
+      return new Promise((resolve, reject) => {
489
+        getToken()
490
+          .then(response => {
491
+            const token = response.data.data.uptoken
492
+            _self._data.uploadData.token = token
493
+            _self._data.uploadData.key = key
494
+            resolve(true)
495
+          })
496
+          .catch(err => {
497
+            console.log(err)
498
+            reject(false)
499
+            this.loading.close()
500
+          })
501
+      })
502
+    },
503
+
504
+    handleAvatarError(err, file, fileList) {
505
+      this.$message.error(err)
506
+      this.loading.close()
507
+      return false
508
+    },
509
+    handleAvatarSuccess(res, file) {
510
+      this.form.imgs.push({
511
+        img_url: this.qiniuDomain + res.url + '?imageView2/2/w/500/h/500/q/90',
512
+        desc: '',
513
+        id: 0
514
+      })
515
+      this.loading.close()
516
+    },
517
+    changeInput(item) {
518
+
519
+      if (item.item_name == '血清铁' || item.item_name == '总铁结合力') {
306
         let index1 = ''
520
         let index1 = ''
307
         let index2 = ''
521
         let index2 = ''
308
-        this.form.formItem.map((it,index) => {
309
-          if(this.form.formItem[index].item_name == '血清铁'){
522
+        this.form.formItem.map((it, index) => {
523
+          if (this.form.formItem[index].item_name == '血清铁') {
310
             index1 = index
524
             index1 = index
311
           }
525
           }
312
-          if(this.form.formItem[index].item_name == '总铁结合力'){
526
+          if (this.form.formItem[index].item_name == '总铁结合力') {
313
             index2 = index
527
             index2 = index
314
           }
528
           }
315
-          if(it.item_name == '转铁蛋白饱和度(计算)'){
529
+          if (it.item_name == '转铁蛋白饱和度(计算)') {
316
             it.value = (parseFloat(this.form.formItem[index1].value) / parseFloat(this.form.formItem[index2].value)) * 100
530
             it.value = (parseFloat(this.form.formItem[index1].value) / parseFloat(this.form.formItem[index2].value)) * 100
317
           }
531
           }
318
         })
532
         })
363
             }
577
             }
364
           })
578
           })
365
         })
579
         })
366
-        .catch(() => {})
580
+        .catch(() => {
581
+        })
367
     },
582
     },
368
     openEdit() {
583
     openEdit() {
584
+
585
+      if (this.project == null) {
586
+        this.$message.error('请先选择项目')
587
+        return false
588
+      }
589
+      if(this.isPic){
590
+        this.form.pic_method = 'edit'
591
+        this.formTitle = '修改' + this.project.project_name
592
+        this.form.project_id = this.project.project_id
593
+        this.form.inspect_date = this.itemDate
594
+        this.form.old_inspect_date = this.itemDate
595
+        this.form.imgs = []
596
+        this.form.delete_imgs = []
597
+        for(var index in this.inspections){
598
+          this.form.imgs.push({
599
+            id: this.inspections[index].id,
600
+            img_url: this.inspections[index].inspect_value,
601
+            desc: this.inspections[index].item_name
602
+          })
603
+        }
604
+        console.log(this.form.imgs)
605
+        this.dialogPicFormVisible = true
606
+      }else{
607
+        console.log("22222")
608
+        this.form.method = 'edit'
609
+        this.formTitle = '修改' + this.project.project_name
610
+        this.form.project_id = this.project.project_id
611
+        this.form.inspect_date = this.itemDate
612
+        this.form.old_inspect_date = this.itemDate
613
+        this.form.remind_cycle = this.patient_info.remind_cycle
614
+        console.log(this.form.remind_cycle)
615
+
616
+        this.form.formItem = []
617
+        for (var index in this.project.inspection_reference) {
618
+          this.form.formItem.push({
619
+            id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
620
+            project_id: this.project.inspection_reference[index].project_id,
621
+            project_name: this.project.inspection_reference[index].project_name,
622
+            item_id: this.project.inspection_reference[index].id,
623
+            item: this.project.inspection_reference[index].item,
624
+            item_name: this.project.inspection_reference[index].item_name,
625
+            range_type: this.project.inspection_reference[index].range_type,
626
+            value: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].inspect_value : '',
627
+            select_options: this.project.inspection_reference[index].range_options.split(','),
628
+            unit: this.project.inspection_reference[index].unit
629
+          })
630
+        }
631
+        console.log(this.form.formItem)
632
+        this.dialogFormVisible = true
633
+
634
+      }
635
+
636
+    }, openPic() {
369
       if (this.project == null) {
637
       if (this.project == null) {
370
         this.$message.error('请先选择项目')
638
         this.$message.error('请先选择项目')
371
         return false
639
         return false
372
       }
640
       }
373
 
641
 
374
-      this.form.method = 'edit'
375
-      this.formTitle = '修改' + this.project.project_name
642
+      this.form.pic_method = 'add'
643
+      this.formTitle = '新增' + this.project.project_name
376
       this.form.project_id = this.project.project_id
644
       this.form.project_id = this.project.project_id
377
-      this.form.inspect_date = this.itemDate
378
-      this.form.old_inspect_date = this.itemDate
645
+      this.form.imgs=[]
646
+      this.form.delete_imgs=[]
379
       this.form.remind_cycle = this.patient_info.remind_cycle
647
       this.form.remind_cycle = this.patient_info.remind_cycle
380
-      console.log(this.form.remind_cycle)
381
-
648
+      var today = new Date()
649
+      this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
382
       this.form.formItem = []
650
       this.form.formItem = []
383
       for (var index in this.project.inspection_reference) {
651
       for (var index in this.project.inspection_reference) {
652
+        // var formItem = this.project.inspection_reference[index];
653
+        // formItem["value"] = '';
654
+        // if (formItem.range_type==2) {
655
+        //   formItem["select_options"] = formItem.range_options.split(",");
656
+        // }
384
         this.form.formItem.push({
657
         this.form.formItem.push({
385
-          id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
658
+          id: 0,
386
           project_id: this.project.inspection_reference[index].project_id,
659
           project_id: this.project.inspection_reference[index].project_id,
387
           project_name: this.project.inspection_reference[index].project_name,
660
           project_name: this.project.inspection_reference[index].project_name,
388
           item_id: this.project.inspection_reference[index].id,
661
           item_id: this.project.inspection_reference[index].id,
389
           item: this.project.inspection_reference[index].item,
662
           item: this.project.inspection_reference[index].item,
390
           item_name: this.project.inspection_reference[index].item_name,
663
           item_name: this.project.inspection_reference[index].item_name,
391
           range_type: this.project.inspection_reference[index].range_type,
664
           range_type: this.project.inspection_reference[index].range_type,
392
-          value: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].inspect_value : '',
393
-          select_options: this.project.inspection_reference[index].range_options.split(','),
665
+          value: '',
666
+          select_options: this.project.inspection_reference[
667
+            index
668
+            ].range_options.split(','),
394
           unit: this.project.inspection_reference[index].unit
669
           unit: this.project.inspection_reference[index].unit
395
         })
670
         })
396
       }
671
       }
397
-      console.log(this.form.formItem)
398
-      this.dialogFormVisible = true
672
+      console.log('form.formItem', this.form.formItem)
673
+      this.dialogPicFormVisible = true
674
+
399
     },
675
     },
400
     openNew() {
676
     openNew() {
401
       if (this.project == null) {
677
       if (this.project == null) {
426
           value: '',
702
           value: '',
427
           select_options: this.project.inspection_reference[
703
           select_options: this.project.inspection_reference[
428
             index
704
             index
429
-          ].range_options.split(','),
705
+            ].range_options.split(','),
430
           unit: this.project.inspection_reference[index].unit
706
           unit: this.project.inspection_reference[index].unit
431
         })
707
         })
432
       }
708
       }
433
-      console.log('form.formItem',this.form.formItem)
709
+      console.log('form.formItem', this.form.formItem)
434
       this.dialogFormVisible = true
710
       this.dialogFormVisible = true
435
     },
711
     },
436
     submitEdit(formName) {
712
     submitEdit(formName) {
454
                 duration: 2000
730
                 duration: 2000
455
               })
731
               })
456
               this.patient_info.remind_cycle =
732
               this.patient_info.remind_cycle =
457
-                  response.data.data.remind_cycle
733
+                response.data.data.remind_cycle
458
               this.itemDate = this.form.inspect_date
734
               this.itemDate = this.form.inspect_date
459
               this.items = []
735
               this.items = []
460
               var inspections = response.data.data.inspections
736
               var inspections = response.data.data.inspections
467
               this.inspectionsMap = {}
743
               this.inspectionsMap = {}
468
               for (var index in inspections) {
744
               for (var index in inspections) {
469
                 inspectionsMap[inspections[index].item_id] =
745
                 inspectionsMap[inspections[index].item_id] =
470
-                    inspections[index]
746
+                  inspections[index]
471
                 this.inspectionsMap[inspections[index].item_id] =
747
                 this.inspectionsMap[inspections[index].item_id] =
472
-                    inspections[index]
748
+                  inspections[index]
473
               }
749
               }
474
               var items = this.project.inspection_reference
750
               var items = this.project.inspection_reference
475
-              console.log("itmes",items)
751
+              console.log('itmes', items)
476
               for (var index in items) {
752
               for (var index in items) {
477
                 if (items[index].id in inspectionsMap) {
753
                 if (items[index].id in inspectionsMap) {
478
                   var item = {}
754
                   var item = {}
612
           return false
888
           return false
613
         }
889
         }
614
       })
890
       })
891
+    }, submitEditPicNew() {
892
+      if (this.form.imgs.length == 0) {
893
+        this.$message.error('未上传图片')
894
+        return false
895
+      }
896
+      this.formLoading = true
897
+      editPatientPICInspection(
898
+        this.patientID,
899
+        this.form
900
+      )
901
+        .then(response => {
902
+          if (response.data.state === 1) {
903
+            this.$notify({
904
+              title: '成功',
905
+              message: '修改成功',
906
+              type: 'success',
907
+              duration: 2000
908
+            })
909
+            this.itemDate = this.form.inspect_date
910
+            this.items = []
911
+            this.dialogPicFormVisible = false
912
+            this.queryParams.patient = this.patientID
913
+            this.queryParams.project_id = this.project.project_id
914
+            this.queryParams.page = 1
915
+            this.total = 0
916
+            this.fetchPatientInspections(this.queryParams)
917
+          } else {
918
+            this.$message.error(response.data.msg)
919
+            return false
920
+          }
921
+        })
922
+        .catch(v => {
923
+          this.$message.error(v)
924
+          return false
925
+        })
926
+      this.formLoading = false
927
+
928
+    },deletePic(item,index){
929
+      if(item.id == 0){
930
+        this.form.imgs.splice(index,1)
931
+      }else{
932
+        for(let index in this.form.imgs){
933
+          if(item.id == this.form.imgs[index].id){
934
+            this.form.imgs.splice(index,1)
935
+            this.form.delete_imgs.push({
936
+              id:item.id,
937
+            })
938
+          }
939
+        }
940
+
941
+      }
942
+    },
943
+    submitPicNew() {
944
+      this.formLoading = true
945
+      if (this.form.imgs.length == 0) {
946
+        this.$message.error('未上传图片')
947
+        return false
948
+      }
949
+      CreatePatientPICInspection(
950
+        this.patientID,
951
+        this.form
952
+      )
953
+        .then(response => {
954
+          if (response.data.state === 1) {
955
+            this.$notify({
956
+              title: '成功',
957
+              message: '新增成功',
958
+              type: 'success',
959
+              duration: 2000
960
+            })
961
+            this.itemDate = this.form.inspect_date
962
+            this.items = []
963
+            for (var index in this.projects) {
964
+              if (this.projects[index].project_id == this.form.project_id) {
965
+                this.projects[index].count++
966
+                break
967
+              }
968
+            }
969
+            this.total += 1
970
+            // var inspections = response.data.data.inspections
971
+            // this.inspections = response.data.data.inspections
972
+            // if (inspections == null) {
973
+            //   this.inspections = []
974
+            //   return false
975
+            // }
976
+            // var inspectionsMap = {}
977
+            // this.inspectionsMap = {}
978
+            //
979
+            // var items = this.project.inspection_reference
980
+            // for (var index in items) {
981
+            //   if (items[index].id in inspectionsMap) {
982
+            //     var item = {}
983
+            //     for (var key in items[index]) {
984
+            //       item[key] = items[index][key]
985
+            //     }
986
+            //     item.value = inspectionsMap[items[index].id].inspect_value
987
+            //     item.value_direction = ''
988
+            //     this.items.push(item)
989
+            //   }
990
+            // }
991
+            this.dialogPicFormVisible = false
992
+            this.queryParams.patient = this.patientID
993
+            this.queryParams.project_id = this.project.project_id
994
+            this.queryParams.page = 1
995
+            this.total = 0
996
+            this.fetchPatientInspections(this.queryParams)
997
+          } else {
998
+            this.$message.error(response.data.msg)
999
+            return false
1000
+          }
1001
+        })
1002
+        .catch(v => {
1003
+          this.$message.error(v)
1004
+          return false
1005
+        })
1006
+      this.formLoading = false
1007
+
615
     },
1008
     },
616
     fetchInspectionReference() {
1009
     fetchInspectionReference() {
617
       fetchInspectionReference(this.patientID)
1010
       fetchInspectionReference(this.patientID)
628
             return false
1021
             return false
629
           }
1022
           }
630
         })
1023
         })
631
-        .catch(v => {})
1024
+        .catch(v => {
1025
+        })
632
     },
1026
     },
633
     setCurrent(row) {
1027
     setCurrent(row) {
634
       this.$refs.singleTable.setCurrentRow(row)
1028
       this.$refs.singleTable.setCurrentRow(row)
664
     },
1058
     },
665
     fetchPatientInspections(params) {
1059
     fetchPatientInspections(params) {
666
       this.items = []
1060
       this.items = []
1061
+      this.isPic = false
667
       fetchPatientInspections(params)
1062
       fetchPatientInspections(params)
668
         .then(response => {
1063
         .then(response => {
669
           if (response.data.state == 1) {
1064
           if (response.data.state == 1) {
681
               inspectionsMap[inspections[index].item_id] = inspections[index]
1076
               inspectionsMap[inspections[index].item_id] = inspections[index]
682
               this.inspectionsMap[inspections[index].item_id] = inspections[index]
1077
               this.inspectionsMap[inspections[index].item_id] = inspections[index]
683
             }
1078
             }
1079
+
684
             var items = this.project.inspection_reference
1080
             var items = this.project.inspection_reference
685
             for (var index in items) {
1081
             for (var index in items) {
686
-              if (items[index].id in inspectionsMap || items[index].item_id in inspectionsMap) {
687
-                var item = {}
688
-                for (var key in items[index]) {
689
-                  item[key] = items[index][key]
690
-                }
691
-                if (item.item_id > 0) {
692
-                  if (inspectionsMap[items[index].item_id] == undefined) {
693
-                    item.value = inspectionsMap[items[index].id].inspect_value
694
-                  } else {
695
-                    item.value = inspectionsMap[items[index].item_id].inspect_value
696
-                  }
697
-                } else {
1082
+              var item = {}
1083
+              for (var key in items[index]) {
1084
+                item[key] = items[index][key]
1085
+              }
1086
+              if (item.item_id > 0) {
1087
+                if (inspectionsMap[items[index].item_id] == undefined) {
698
                   item.value = inspectionsMap[items[index].id].inspect_value
1088
                   item.value = inspectionsMap[items[index].id].inspect_value
1089
+                  item.item_name = inspectionsMap[items[index].id].item_name
1090
+
1091
+                } else {
1092
+                  item.value = inspectionsMap[items[index].item_id].inspect_value
1093
+                  item.item_name = inspectionsMap[items[index].item_id].item_name
1094
+
699
                 }
1095
                 }
700
-                item.value_direction = ''
701
-                if (item.range_type == 1) {
702
-                  var value = parseFloat(item.value)
703
-                  var range_min = parseFloat(item.range_min)
704
-                  var range_max = parseFloat(item.range_max)
705
-                  if (value < range_min) {
706
-                    item.value_direction = '↓'
707
-                  } else if (value > range_max) {
708
-                    item.value_direction = '↑'
709
-                  }
1096
+              } else {
1097
+                item.value = inspectionsMap[items[index].id].inspect_value
1098
+                item.item_name = inspectionsMap[items[index].id].item_name
1099
+
1100
+              }
1101
+              // item["inspect_desc"] = inspectionsMap[items[index].id].inspect_desc
1102
+              // item["inspect_type"] = inspectionsMap[items[index].id].inspect_type
1103
+              item.value_direction = ''
1104
+              if (item.range_type == 1) {
1105
+                var value = parseFloat(item.value)
1106
+                var range_min = parseFloat(item.range_min)
1107
+                var range_max = parseFloat(item.range_max)
1108
+                if (value < range_min) {
1109
+                  item.value_direction = '↓'
1110
+                } else if (value > range_max) {
1111
+                  item.value_direction = '↑'
710
                 }
1112
                 }
711
-                this.items.push(item)
1113
+              }
1114
+              this.items.push(item)
1115
+
1116
+
1117
+              if(item.value.indexOf("http") >= 0){
1118
+                this.isPic = true
712
               }
1119
               }
713
             }
1120
             }
714
-            console.log(this.items)
715
           }
1121
           }
716
         })
1122
         })
717
-        .catch(v => {})
1123
+        .catch(v => {
1124
+        })
718
       setTimeout(() => {
1125
       setTimeout(() => {
719
         this.itemLoading = false
1126
         this.itemLoading = false
720
       }, 1000)
1127
       }, 1000)
747
   border-bottom: 0px !important;
1154
   border-bottom: 0px !important;
748
   border-right: 0px !important;
1155
   border-right: 0px !important;
749
 }
1156
 }
1157
+
750
 #user-inspection-order th {
1158
 #user-inspection-order th {
751
   border-right: 0px !important;
1159
   border-right: 0px !important;
752
 }
1160
 }
1161
+
753
 #user-inspection-form .el-form-item__content {
1162
 #user-inspection-form .el-form-item__content {
754
   line-height: 0 !important;
1163
   line-height: 0 !important;
755
 }
1164
 }
1165
+
756
 .el-table td,
1166
 .el-table td,
757
 .el-table th.is-leaf,
1167
 .el-table th.is-leaf,
758
 .el-table--border,
1168
 .el-table--border,
759
 .el-table--group {
1169
 .el-table--group {
760
   border-color: #d0d3da;
1170
   border-color: #d0d3da;
761
 }
1171
 }
1172
+
762
 .el-table--border::after,
1173
 .el-table--border::after,
763
 .el-table--group::after,
1174
 .el-table--group::after,
764
 .el-table::before {
1175
 .el-table::before {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1090 - 0
src/xt_pages/user/inspectionCheck.vue


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1171 - 0
src/xt_pages/user/ktv.vue


+ 121 - 47
src/xt_pages/user/sickHistory.vue Parādīt failu

61
                 </el-table-column>
61
                 </el-table-column>
62
                 <el-table-column label="记录医生" align="center">
62
                 <el-table-column label="记录医生" align="center">
63
                   <template slot-scope="scope">
63
                   <template slot-scope="scope">
64
-                    {{ doctorName(scope.row.recorder) }}
64
+                    {{ doctorName(scope.row.doctor_id) }}
65
                   </template>
65
                   </template>
66
                 </el-table-column>
66
                 </el-table-column>
67
               </el-table>
67
               </el-table>
94
 
94
 
95
 
95
 
96
               <label class="title"><span class="name">肾移植史</span> : </label>
96
               <label class="title"><span class="name">肾移植史</span> : </label>
97
-              <el-select style="width: 150px;" v-model="is_shenyizhishi" placeholder="选择肾移植史" @change="didSelectTemplate">
97
+              <el-select style="width: 150px;" v-model="is_shenyizhishi" placeholder="选择肾移植史" >
98
                 <el-option label="无" value="0"></el-option>
98
                 <el-option label="无" value="0"></el-option>
99
                 <el-option label="有" value="1"></el-option>
99
                 <el-option label="有" value="1"></el-option>
100
               </el-select>
100
               </el-select>
103
             <div class="cell clearfix">
103
             <div class="cell clearfix">
104
 
104
 
105
               <label class="title"><span class="name">腹膜透析史</span> : </label>
105
               <label class="title"><span class="name">腹膜透析史</span> : </label>
106
-              <el-select style="width: 150px;" v-model="is_fumotouxishi" placeholder="选择腹膜透析史" @change="didSelectTemplate">
106
+              <el-select style="width: 150px;" v-model="is_fumotouxishi" placeholder="选择腹膜透析史" >
107
                 <el-option label="无" value="0"></el-option>
107
                 <el-option label="无" value="0"></el-option>
108
                 <el-option label="有" value="1"></el-option>
108
                 <el-option label="有" value="1"></el-option>
109
               </el-select>
109
               </el-select>
114
               </el-select>
114
               </el-select>
115
 
115
 
116
               <label class="title"><span class="name">过敏药物</span> : </label>
116
               <label class="title"><span class="name">过敏药物</span> : </label>
117
-              <el-select style="width: 100px;" v-model="is_guominyaowu" placeholder="选择过敏药物" @change="didSelectTemplate">
117
+              <el-select style="width: 100px;" v-model="is_guominyaowu" placeholder="选择过敏药物">
118
                 <el-option label="无" value="0"></el-option>
118
                 <el-option label="无" value="0"></el-option>
119
                 <el-option label="有" value="1"></el-option>
119
                 <el-option label="有" value="1"></el-option>
120
               </el-select>
120
               </el-select>
156
         <div>
156
         <div>
157
           <div class="new_record_form">
157
           <div class="new_record_form">
158
             <div class="cell clearfix">
158
             <div class="cell clearfix">
159
-              <label class="title"><span class="name">病程日期</span> : </label>
160
-              <el-date-picker v-model="edit_course_of_disease_time" prefix-icon="el-icon-date" :editable="false"
161
-                              style="width: 200px;"
162
-                              type="datetime"
163
-                              placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm:ss"
159
+              <label class="title"><span class="name">病程标题</span> : </label>
160
+              <el-input v-model="edit_title" style="width: 150px"></el-input>
161
+
162
+              <label class="title"><span class="name">日期</span> : </label>
163
+              <el-date-picker v-model="edit_sick_history_time" prefix-icon="el-icon-date" :editable="false"
164
+                              style="width: 150px;"
165
+                              type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm:ss"
164
                               value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
166
                               value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
165
 
167
 
166
-              <label class="title"><span class="name">日常病程</span> : </label>
167
-              <el-select v-model="select_template" placeholder="可选择病程模板" @change="didEditSelectTemplate">
168
-                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
169
-                           :value="option.content"></el-option>
168
+
169
+              <label class="title"><span class="name">肾移植史</span> : </label>
170
+              <el-select style="width: 150px;" v-model="edit_is_shenyizhishi" placeholder="选择肾移植史" >
171
+                <el-option label="无" value="0"></el-option>
172
+                <el-option label="有" value="1"></el-option>
170
               </el-select>
173
               </el-select>
171
             </div>
174
             </div>
172
 
175
 
176
+            <div class="cell clearfix">
177
+
178
+              <label class="title"><span class="name">腹膜透析史</span> : </label>
179
+              <el-select style="width: 150px;" v-model="edit_is_fumotouxishi" placeholder="选择腹膜透析史" >
180
+                <el-option label="无" value="0"></el-option>
181
+                <el-option label="有" value="1"></el-option>
182
+              </el-select>
183
+
184
+              <label class="title"><span class="name">医生</span> : </label>
185
+              <el-select style="width: 100px;" v-model="edit_doctor_id" placeholder="请选择医生">
186
+                <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
187
+              </el-select>
188
+
189
+              <label class="title"><span class="name">过敏药物</span> : </label>
190
+              <el-select style="width: 100px;" v-model="edit_is_guominyaowu" placeholder="选择过敏药物">
191
+                <el-option label="无" value="0"></el-option>
192
+                <el-option label="有" value="1"></el-option>
193
+              </el-select>
194
+              <el-input v-if="edit_is_guominyaowu == 1" v-model="edit_guominyaowu_desc"></el-input>
173
 
195
 
174
-            <div class="cell clearfix" style="margin-top: 10px">
175
-              <label class="title"><span class="name">病程标题</span> : </label>
176
-              <el-input v-model="edit_title" style="width: 420px"></el-input>
196
+            </div>
197
+
198
+            <div class="cell clearfix">
199
+              <label class="title"><span class="name">病史模版</span> : </label>
200
+              <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
201
+                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
202
+                           :value="option.content"></el-option>
203
+              </el-select>
177
             </div>
204
             </div>
178
 
205
 
179
             <div class="textarea_panel">
206
             <div class="textarea_panel">
180
-              <!--<el-input v-model="edit_new_content" type="textarea" rows="6" resize="none"></el-input>-->
181
               <keep-alive>
207
               <keep-alive>
182
                 <editor ref="edit_neditor"
208
                 <editor ref="edit_neditor"
183
-                        id="edit_editor"
209
+                        id="editors"
184
                         style="width: 600px"
210
                         style="width: 600px"
185
-                        v-bind:r_content="edit_new_content">
211
+                        v-bind:r_content="edit_new_content"
212
+                >
186
                 </editor>
213
                 </editor>
187
               </keep-alive>
214
               </keep-alive>
188
             </div>
215
             </div>
189
 
216
 
217
+
190
             <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
218
             <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
191
               <el-button @click="show_edit_dialog = false">取消</el-button>
219
               <el-button @click="show_edit_dialog = false">取消</el-button>
192
-              <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
220
+              <el-button type="primary"
193
                          @click="modifyAction" :loading="uploading_new_record">保存
221
                          @click="modifyAction" :loading="uploading_new_record">保存
194
               </el-button>
222
               </el-button>
195
             </div>
223
             </div>
208
 import { fetchAllDoctorAndNurse } from "@/api/doctor";
236
 import { fetchAllDoctorAndNurse } from "@/api/doctor";
209
 
237
 
210
 import {
238
 import {
211
-  createCourseOfDiseaseRecord,
212
-  deleteCourseOfDiseaseRecords,
213
-  getCourseOfDiseaseRecords,
214
-  modifyCourseOfDiseaseRecord,
215
-  GetCoursePrintData
239
+  createSickHistoryRecord,
240
+  deleteSickHistoryRecords,
241
+  GetSickHistoryRecords,
242
+  ModifySickHistoryRecord,
216
 } from '@/api/patient'
243
 } from '@/api/patient'
217
 import { parseTime } from '@/utils'
244
 import { parseTime } from '@/utils'
218
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
245
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
237
       is_fumotouxishi:'',
264
       is_fumotouxishi:'',
238
       is_guominyaowu:'',
265
       is_guominyaowu:'',
239
       guominyaowu_desc:"",
266
       guominyaowu_desc:"",
267
+
268
+      edit_is_shenyizhishi:'',
269
+      edit_is_fumotouxishi:'',
270
+      edit_is_guominyaowu:'',
271
+      edit_guominyaowu_desc:"",
272
+
240
       doctor_id:"",
273
       doctor_id:"",
241
       doctorOptions:null,
274
       doctorOptions:null,
242
       records: [],
275
       records: [],
246
       show_edit_dialog: false,
279
       show_edit_dialog: false,
247
       uploading_new_record: false,
280
       uploading_new_record: false,
248
       templates: this.$store.getters.configlist.sick_history,
281
       templates: this.$store.getters.configlist.sick_history,
282
+      select_template:"",
249
       new_content: '',
283
       new_content: '',
250
       edit_new_content: '',
284
       edit_new_content: '',
251
-      edit_course_of_disease_time: '',
285
+      edit_sick_history_time: '',
252
       selectingRows: [],
286
       selectingRows: [],
253
       table_current_index: -1,
287
       table_current_index: -1,
254
       edit_current_id: 0,
288
       edit_current_id: 0,
289
+      edit_doctor_id:0,
255
       edit_title: '',
290
       edit_title: '',
256
       ids:"",
291
       ids:"",
257
       idArr:[],
292
       idArr:[],
291
       '-' +
326
       '-' +
292
       (nowDay < 10 ? '0' + nowDay : nowDay)
327
       (nowDay < 10 ? '0' + nowDay : nowDay)
293
 
328
 
294
-    this.requestCourseRecords()
329
+    this.requestSickHistory()
295
     this.fetchAllDoctorAndNurse()
330
     this.fetchAllDoctorAndNurse()
296
 
331
 
297
   },
332
   },
303
         }
338
         }
304
       });
339
       });
305
     },
340
     },
306
-    requestCourseRecords: function() {
341
+    requestSickHistory: function() {
307
       this.loading = true
342
       this.loading = true
308
-      getCourseOfDiseaseRecords(this.patient_id, this.start_time, this.end_time).then(rs => {
343
+      let params = {
344
+        patient_id:this.patient_id,
345
+        start_time:this.start_time,
346
+        end_time:this.end_time,
347
+      }
348
+      GetSickHistoryRecords(params).then(rs => {
309
         this.loading = false
349
         this.loading = false
310
         var resp = rs.data
350
         var resp = rs.data
311
         if (resp.state == 1) {
351
         if (resp.state == 1) {
331
       return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
371
       return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
332
     },
372
     },
333
     doctorName: function(doctor_id) {
373
     doctorName: function(doctor_id) {
334
-      for (let index = 0; index < this.doctors.length; index++) {
335
-        const doctor = this.doctors[index]
374
+      for (let index = 0; index < this.doctorOptions.length; index++) {
375
+        const doctor = this.doctorOptions[index]
336
         if (doctor.id == doctor_id) {
376
         if (doctor.id == doctor_id) {
337
           return doctor.name
377
           return doctor.name
338
         }
378
         }
340
       return ''
380
       return ''
341
     },
381
     },
342
     modifyAction: function() {
382
     modifyAction: function() {
343
-
344
       this.edit_new_content = this.$refs.edit_neditor.content
383
       this.edit_new_content = this.$refs.edit_neditor.content
345
       if (this.edit_new_content.length == 0) {
384
       if (this.edit_new_content.length == 0) {
346
         this.$message.error('请填写病程内容')
385
         this.$message.error('请填写病程内容')
347
         return
386
         return
348
       }
387
       }
349
       this.uploading_new_record = true
388
       this.uploading_new_record = true
350
-      modifyCourseOfDiseaseRecord(this.patient_id, this.edit_new_content, this.edit_course_of_disease_time, this.edit_current_id, this.edit_title).then(rs => {
389
+      let params = {
390
+        id:this.edit_current_id,
391
+        patient_id: this.patient_id,
392
+        content: this.edit_new_content,
393
+        record_time: this.edit_sick_history_time,
394
+        title: this.edit_title,
395
+        is_shenyizhishi:this.edit_is_shenyizhishi,
396
+        is_fumotouxishi:this.edit_is_fumotouxishi,
397
+        is_guominyaowu:this.edit_is_guominyaowu,
398
+        guominyaowu_desc:this.edit_guominyaowu_desc,
399
+        doctor_id: this.edit_doctor_id
400
+      }
401
+
402
+      ModifySickHistoryRecord(params).then(rs => {
351
         this.uploading_new_record = false
403
         this.uploading_new_record = false
352
         var resp = rs.data
404
         var resp = rs.data
353
         if (resp.state == 1) {
405
         if (resp.state == 1) {
355
           this.records[this.table_current_index].record_time = resp.data.record.record_time
407
           this.records[this.table_current_index].record_time = resp.data.record.record_time
356
           this.records[this.table_current_index].recorder = resp.data.record.recorder
408
           this.records[this.table_current_index].recorder = resp.data.record.recorder
357
           this.records[this.table_current_index].title = resp.data.record.title
409
           this.records[this.table_current_index].title = resp.data.record.title
358
-
410
+          this.records[this.table_current_index].doctor_id = resp.data.record.doctor_id
411
+          this.records[this.table_current_index].is_shenyizhi_history = resp.data.record.is_shenyizhi_history
412
+          this.records[this.table_current_index].is_fumo_dialysis_history = resp.data.record.is_fumo_dialysis_history
413
+          this.records[this.table_current_index].is_hypersusceptibility = resp.data.record.is_hypersusceptibility
414
+          this.records[this.table_current_index].hypersusceptibility_desc = resp.data.record.hypersusceptibility_desc
359
           this.show_edit_dialog = false
415
           this.show_edit_dialog = false
360
           this.edit_new_content = ''
416
           this.edit_new_content = ''
361
           this.table_current_index = -1
417
           this.table_current_index = -1
362
-
363
         } else {
418
         } else {
364
           this.table_current_index = -1
419
           this.table_current_index = -1
365
           this.$message.error(resp.msg)
420
           this.$message.error(resp.msg)
375
 
430
 
376
     createAction: function() {
431
     createAction: function() {
377
       this.new_content = this.$refs.editor.content
432
       this.new_content = this.$refs.editor.content
378
-      console.log("hhhhh2h3h232323232",this.new_content)
379
       if (this.new_content.length == 0) {
433
       if (this.new_content.length == 0) {
380
         this.$message.error('请填写病程内容')
434
         this.$message.error('请填写病程内容')
381
         return
435
         return
382
       }
436
       }
383
       this.uploading_new_record = true
437
       this.uploading_new_record = true
384
-
385
-      createCourseOfDiseaseRecord(this.patient_id, this.new_content, this.course_of_disease_time, this.title).then(rs => {
438
+      let params = {
439
+        patient_id: this.patient_id,
440
+        content: this.new_content,
441
+        record_time: this.sick_history_time,
442
+        title: this.title,
443
+        is_shenyizhishi:this.is_shenyizhishi,
444
+        is_fumotouxishi:this.is_fumotouxishi,
445
+        is_guominyaowu:this.is_guominyaowu,
446
+        guominyaowu_desc:this.guominyaowu_desc,
447
+        doctor_id: this.doctor_id
448
+      }
449
+      createSickHistoryRecord(params).then(rs => {
386
         this.uploading_new_record = false
450
         this.uploading_new_record = false
387
         var resp = rs.data
451
         var resp = rs.data
388
         if (resp.state == 1) {
452
         if (resp.state == 1) {
389
           this.records.unshift(resp.data.record)
453
           this.records.unshift(resp.data.record)
390
-          // this.$refs.record_table.setCurrentRow()
391
-          // this.$refs.record_table.setCurrentRow(this.records[0])
392
-          // this.current_select_record = this.records[0]
393
           this.show_dialog = false
454
           this.show_dialog = false
394
           this.new_content = ''
455
           this.new_content = ''
395
           this.title = ''
456
           this.title = ''
432
       }
493
       }
433
       var ids_str = ids.join(',')
494
       var ids_str = ids.join(',')
434
       this.loading = true
495
       this.loading = true
435
-      deleteCourseOfDiseaseRecords(this.patient_id, ids_str).then(rs => {
496
+
497
+      let params={
498
+        patient_id:this.patient_id,
499
+        ids:ids_str,
500
+      }
501
+
502
+      deleteSickHistoryRecords(params).then(rs => {
436
         var resp = rs.data
503
         var resp = rs.data
437
         if (resp.state == 1) {
504
         if (resp.state == 1) {
438
           for (let id_index = 0; id_index < ids.length; id_index++) {
505
           for (let id_index = 0; id_index < ids.length; id_index++) {
455
         this.$message.error(err)
522
         this.$message.error(err)
456
       })
523
       })
457
     }, startTimeChange(val) {
524
     }, startTimeChange(val) {
458
-      this.requestCourseRecords()
525
+      this.requestSickHistory()
459
     }, endTimeChange(val) {
526
     }, endTimeChange(val) {
460
-      this.requestCourseRecords()
527
+      this.requestSickHistory()
461
     }, showEdit() {
528
     }, showEdit() {
462
       if (this.table_current_index == -1) {
529
       if (this.table_current_index == -1) {
463
         this.$message.error('请选择要修改的病程内容')
530
         this.$message.error('请选择要修改的病程内容')
464
         return
531
         return
465
       }
532
       }
466
-      this.show_edit_dialog = true
467
-      this.edit_course_of_disease_time = this.recordTime(this.records[this.table_current_index].record_time)
533
+      this.edit_is_shenyizhishi = this.records[this.table_current_index].is_shenyizhi_history.toString()
534
+      this.edit_is_fumotouxishi = this.records[this.table_current_index].is_fumo_dialysis_history.toString()
535
+      this.edit_is_guominyaowu = this.records[this.table_current_index].is_hypersusceptibility.toString()
536
+      this.edit_guominyaowu_desc = this.records[this.table_current_index].hypersusceptibility_desc
537
+      this.edit_sick_history_time = this.recordTime(this.records[this.table_current_index].record_time)
468
       this.edit_new_content = this.records[this.table_current_index].content
538
       this.edit_new_content = this.records[this.table_current_index].content
469
       this.edit_current_id = this.records[this.table_current_index].id
539
       this.edit_current_id = this.records[this.table_current_index].id
470
-      this.edit_title = this.records[this.table_current_index].title
540
+      this.edit_doctor_id = this.records[this.table_current_index].doctor_id
541
+      console.log(this.edit_new_content )
542
+      this.edit_title = this.records[this.table_current_index].title//
543
+      this.show_edit_dialog = true
544
+
471
       this.$refs.record_table.setCurrentRow(null)
545
       this.$refs.record_table.setCurrentRow(null)
472
 
546
 
473
     }, tableRow({ row, rowIndex }) {
547
     }, tableRow({ row, rowIndex }) {