|
@@ -51,7 +51,7 @@
|
51
|
51
|
<el-button type="primary" size="small" @click="prints">打印</el-button>
|
52
|
52
|
</div>
|
53
|
53
|
<div v-if="add_index == 1">
|
54
|
|
- <el-button type="primary" size="small" @click="showSave">保存</el-button>
|
|
54
|
+ <el-button type="primary" size="small" @click="createAction">保存2</el-button>
|
55
|
55
|
<el-button size="small" @click="showCancel">取消</el-button>
|
56
|
56
|
</div>
|
57
|
57
|
</div>
|
|
@@ -60,7 +60,7 @@
|
60
|
60
|
<div style="flex: 1;">
|
61
|
61
|
日期:
|
62
|
62
|
<el-date-picker
|
63
|
|
- v-model="history_date"
|
|
63
|
+ v-model="start_time"
|
64
|
64
|
type="date"
|
65
|
65
|
:disabled="disabled"
|
66
|
66
|
style="width: 150px;"
|
|
@@ -93,12 +93,12 @@
|
93
|
93
|
<div style="display: flex;">
|
94
|
94
|
<div style="width: 30%;">
|
95
|
95
|
医生:
|
96
|
|
- <el-select v-model="shen_yishen" placeholder="请选择" style="width: 120px;" :disabled="disabled">
|
|
96
|
+ <el-select v-model="admin_user_id" placeholder="请选择" style="width: 120px;" :disabled="disabled">
|
97
|
97
|
<el-option
|
98
|
|
- v-for="item in yishen_options"
|
99
|
|
- :key="item.value"
|
100
|
|
- :label="item.label"
|
101
|
|
- :value="item.value">
|
|
98
|
+ v-for="item in doctorOptions"
|
|
99
|
+ :key="item.id"
|
|
100
|
+ :label="item.name"
|
|
101
|
+ :value="item.id">
|
102
|
102
|
</el-option>
|
103
|
103
|
</el-select>
|
104
|
104
|
</div>
|
|
@@ -112,13 +112,14 @@
|
112
|
112
|
:value="item.value">
|
113
|
113
|
</el-option>
|
114
|
114
|
</el-select>
|
|
115
|
+ <el-input v-if="shen_guomi == 2" v-model="guominyaowu_desc"></el-input>
|
115
|
116
|
</div>
|
116
|
117
|
</div>
|
117
|
118
|
|
118
|
119
|
<div style="margin-top: 15px;">
|
119
|
120
|
<span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">详情</span>
|
120
|
121
|
<keep-alive>
|
121
|
|
- <ueditor ref="ue" :content="new_content" id="editor"></ueditor>
|
|
122
|
+ <ueditor ref="edit" :content="new_content" id="editor"></ueditor>
|
122
|
123
|
</keep-alive>
|
123
|
124
|
</div>
|
124
|
125
|
<div style="text-align: right;margin-top:10px ;">
|
|
@@ -174,7 +175,7 @@
|
174
|
175
|
<div class="Second_title">模板内容</div>
|
175
|
176
|
<div style="">
|
176
|
177
|
<keep-alive>
|
177
|
|
- <ueditor ref="ue" :content="new_content" id="editor"></ueditor>
|
|
178
|
+ <ueditor ref="editor" id="editors" v-bind:r_content="new_content"></ueditor>
|
178
|
179
|
</keep-alive>
|
179
|
180
|
</div>
|
180
|
181
|
</div>
|
|
@@ -196,156 +197,11 @@
|
196
|
197
|
|
197
|
198
|
|
198
|
199
|
|
199
|
|
- <!-- </div> -->
|
200
|
|
- <el-dialog title="新增病史记录" width="70%" top="5vh" :visible.sync="show_dialog">
|
201
|
|
- <div>
|
202
|
|
- <div class="new_record_form">
|
203
|
|
- <div class="cell clearfix" style="margin-bottom: 20px;">
|
204
|
|
- <label class="title"><span class="name">病程标题</span> : </label>
|
205
|
|
- <el-input v-model="title" style="width: 150px"></el-input>
|
206
|
|
-
|
207
|
|
- <label class="title" style="margin-left: 20px;"><span class="name">日期</span> : </label>
|
208
|
|
- <el-date-picker v-model="sick_history_time" prefix-icon="el-icon-date" :editable="false"
|
209
|
|
- style="width: 150px;"
|
210
|
|
- type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
|
211
|
|
- value-format="yyyy-MM-dd "></el-date-picker>
|
212
|
|
-
|
213
|
|
-
|
214
|
|
- <label class="title" style="margin-left: 20px;"><span class="name">肾移植史</span> : </label>
|
215
|
|
- <el-select style="width: 150px;" v-model="is_shenyizhishi" placeholder="选择肾移植史" >
|
216
|
|
- <el-option label="无" value="0"></el-option>
|
217
|
|
- <el-option label="有" value="1"></el-option>
|
218
|
|
- </el-select>
|
219
|
|
- </div>
|
220
|
|
-
|
221
|
|
- <div class="cell clearfix" style="margin-bottom: 20px;">
|
222
|
|
-
|
223
|
|
- <label class="title" ><span class="name">腹膜透析史</span> : </label>
|
224
|
|
- <el-select style="width: 150px;" v-model="is_fumotouxishi" placeholder="选择腹膜透析史" >
|
225
|
|
- <el-option label="无" value="0"></el-option>
|
226
|
|
- <el-option label="有" value="1"></el-option>
|
227
|
|
- </el-select>
|
228
|
|
-
|
229
|
|
- <label class="title" style="margin-left: 20px;"><span class="name">医生</span> : </label>
|
230
|
|
- <el-select style="width: 100px;" v-model="doctor_id" placeholder="请选择医生">
|
231
|
|
- <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
|
232
|
|
- </el-select>
|
233
|
|
-
|
234
|
|
- <label class="title" style="margin-left: 20px;"><span class="name">过敏药物</span> : </label>
|
235
|
|
- <el-select style="width: 100px;" v-model="is_guominyaowu" placeholder="选择过敏药物">
|
236
|
|
- <el-option label="无" value="0"></el-option>
|
237
|
|
- <el-option label="有" value="1"></el-option>
|
238
|
|
- <el-option label="不详" value="2"></el-option>
|
239
|
|
-
|
240
|
|
- </el-select>
|
241
|
|
- <el-input v-if="is_guominyaowu == 1" v-model="guominyaowu_desc"></el-input>
|
242
|
|
-
|
243
|
|
- </div>
|
244
|
|
-
|
245
|
|
- <div class="cell clearfix" >
|
246
|
|
- <label class="title"><span class="name">病史模版</span> : </label>
|
247
|
|
- <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
|
248
|
|
- <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
|
249
|
|
- :value="option.content"></el-option>
|
250
|
|
- </el-select>
|
251
|
|
- </div>
|
252
|
|
-
|
253
|
|
- <div class="textarea_panel">
|
254
|
|
- <keep-alive>
|
255
|
|
- <editor ref="editor"
|
256
|
|
- id="editors"
|
257
|
|
- style="width: 100%"
|
258
|
|
- v-bind:r_content="new_content"
|
259
|
|
- >
|
260
|
|
- </editor>
|
261
|
|
- </keep-alive>
|
262
|
|
- </div>
|
263
|
|
-
|
264
|
|
- <div style="text-align: right; padding-right: 0px; padding-top: 20px; padding-bottom: 10px;">
|
265
|
|
- <el-button @click="show_dialog = false">取消</el-button>
|
266
|
|
- <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
|
267
|
|
- @click="createAction" :loading="uploading_new_record">保存
|
268
|
|
- </el-button>
|
269
|
|
- </div>
|
270
|
|
- </div>
|
271
|
|
- </div>
|
272
|
|
- </el-dialog>
|
273
|
|
-
|
274
|
|
- <el-dialog title="修改病史记录" width="50%" top="5vh" :visible.sync="show_edit_dialog">
|
275
|
|
- <div>
|
276
|
|
- <div class="new_record_form">
|
277
|
|
- <div class="cell clearfix" style="margin-bottom: 20px;">
|
278
|
|
- <label class="title"><span class="name">病程标题</span> : </label>
|
279
|
|
- <el-input v-model="edit_title" style="width: 150px"></el-input>
|
280
|
|
-
|
281
|
|
- <label class="title" style="margin-left: 20px;"><span class="name">日期</span> : </label>
|
282
|
|
- <el-date-picker v-model="edit_sick_history_time" prefix-icon="el-icon-date" :editable="false"
|
283
|
|
- style="width: 150px;"
|
284
|
|
- type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd "
|
285
|
|
- value-format="yyyy-MM-dd "></el-date-picker>
|
286
|
|
-
|
287
|
|
-
|
288
|
|
- <label class="title" style="margin-left: 20px;"><span class="name">肾移植史</span> : </label>
|
289
|
|
- <el-select style="width: 150px;" v-model="edit_is_shenyizhishi" placeholder="选择肾移植史" >
|
290
|
|
- <el-option label="无" value="0"></el-option>
|
291
|
|
- <el-option label="有" value="1"></el-option>
|
292
|
|
- </el-select>
|
293
|
|
- </div>
|
294
|
|
-
|
295
|
|
- <div class="cell clearfix" style="margin-bottom: 20px;">
|
296
|
|
-
|
297
|
|
- <label class="title" ><span class="name">腹膜透析史</span> : </label>
|
298
|
|
- <el-select style="width: 150px;" v-model="edit_is_fumotouxishi" placeholder="选择腹膜透析史" >
|
299
|
|
- <el-option label="无" value="0"></el-option>
|
300
|
|
- <el-option label="有" value="1"></el-option>
|
301
|
|
- </el-select>
|
302
|
|
-
|
303
|
|
- <label class="title" style="margin-left: 20px;"><span class="name">医生</span> : </label>
|
304
|
|
- <el-select style="width: 100px;" v-model="edit_doctor_id" placeholder="请选择医生">
|
305
|
|
- <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
|
306
|
|
- </el-select>
|
307
|
|
-
|
308
|
|
- <label class="title" style="margin-left: 20px;"><span class="name">过敏药物</span> : </label>
|
309
|
|
- <el-select style="width: 100px;" v-model="edit_is_guominyaowu" placeholder="选择过敏药物">
|
310
|
|
- <el-option label="无" value="0"></el-option>
|
311
|
|
- <el-option label="有" value="1"></el-option>
|
312
|
|
- </el-select>
|
313
|
|
- <el-input v-if="edit_is_guominyaowu == 1" v-model="edit_guominyaowu_desc"></el-input>
|
314
|
|
-
|
315
|
|
- </div>
|
316
|
|
-
|
317
|
|
- <div class="cell clearfix">
|
318
|
|
- <label class="title"><span class="name">病史模版</span> : </label>
|
319
|
|
- <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
|
320
|
|
- <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
|
321
|
|
- :value="option.content"></el-option>
|
322
|
|
- </el-select>
|
323
|
|
- </div>
|
324
|
|
-
|
325
|
|
- <div class="textarea_panel">
|
326
|
|
- <keep-alive>
|
327
|
|
- <editor ref="edit_neditor"
|
328
|
|
- id="editors"
|
329
|
|
- style="width: 100%"
|
330
|
|
- v-bind:r_content="edit_new_content"
|
331
|
|
- >
|
332
|
|
- </editor>
|
333
|
|
- </keep-alive>
|
334
|
|
- </div>
|
335
|
|
-
|
336
|
|
-
|
337
|
|
- <div style="text-align: right; padding-right: 0px; padding-top: 20px; padding-bottom: 10px;">
|
338
|
|
- <el-button @click="show_edit_dialog = false">取消</el-button>
|
339
|
|
- <el-button type="primary"
|
340
|
|
- @click="modifyAction" :loading="uploading_new_record">保存
|
341
|
|
- </el-button>
|
342
|
|
- </div>
|
343
|
|
- </div>
|
344
|
|
- </div>
|
345
|
|
- </el-dialog>
|
|
200
|
+
|
|
201
|
+
|
346
|
202
|
</div>
|
347
|
203
|
</div>
|
348
|
|
- <!-- </div> -->
|
|
204
|
+
|
349
|
205
|
</template>
|
350
|
206
|
|
351
|
207
|
<script>
|
|
@@ -356,9 +212,9 @@ import ueditor from '@/components/Uedtior'
|
356
|
212
|
import { fetchAllDoctorAndNurse } from "@/api/doctor";
|
357
|
213
|
import print from 'print-js'
|
358
|
214
|
import {
|
359
|
|
- createSickHistoryRecord,
|
|
215
|
+ createNewSickHistoryRecord,
|
360
|
216
|
deleteSickHistoryRecords,
|
361
|
|
- GetSickHistoryRecords,
|
|
217
|
+ getNewSickHistory,
|
362
|
218
|
ModifySickHistoryRecord,
|
363
|
219
|
} from '@/api/patient'
|
364
|
220
|
import { parseTime } from '@/utils'
|
|
@@ -402,7 +258,7 @@ export default {
|
402
|
258
|
uploading_new_record: false,
|
403
|
259
|
templates: this.$store.getters.configlist.sick_history,
|
404
|
260
|
select_template:"",
|
405
|
|
- new_content: '111111',
|
|
261
|
+ new_content: '',
|
406
|
262
|
edit_new_content: '',
|
407
|
263
|
edit_sick_history_time: '',
|
408
|
264
|
selectingRows: [],
|
|
@@ -427,11 +283,15 @@ export default {
|
427
|
283
|
yizhi_options:[{value:1,label:'无'},{value:2,label:'有'}],
|
428
|
284
|
yishen_options:[],
|
429
|
285
|
guomi_options:[{value:1,label:'无'},{value:2,label:'有'},{value:3,label:'不详'}],
|
430
|
|
- tableData:[{index:1,date:'2024-11-12',doctor:'王启年'}],
|
|
286
|
+ tableData:[],
|
|
287
|
+ admin_user_id:"",
|
431
|
288
|
}
|
432
|
289
|
},
|
433
|
290
|
created() {
|
|
291
|
+ this.admin_user_id = this.$store.getters.xt_user.user.id
|
|
292
|
+
|
434
|
293
|
this.patient_id = parseInt(this.$route.query.id)
|
|
294
|
+
|
435
|
295
|
if (isNaN(this.patient_id) || this.patient_id <= 0) {
|
436
|
296
|
this.$notify.error({
|
437
|
297
|
title: '错误',
|
|
@@ -464,7 +324,7 @@ export default {
|
464
|
324
|
'-' +
|
465
|
325
|
(nowDay < 10 ? '0' + nowDay : nowDay)
|
466
|
326
|
|
467
|
|
- this.requestSickHistory()
|
|
327
|
+ this.getlist()
|
468
|
328
|
this.fetchAllDoctorAndNurse()
|
469
|
329
|
|
470
|
330
|
},
|
|
@@ -476,6 +336,9 @@ export default {
|
476
|
336
|
// },10)
|
477
|
337
|
},
|
478
|
338
|
methods: {
|
|
339
|
+ template_dele(){
|
|
340
|
+
|
|
341
|
+ },
|
479
|
342
|
add_click(){
|
480
|
343
|
this.disabled = false
|
481
|
344
|
this.add_index = 1
|
|
@@ -529,29 +392,7 @@ export default {
|
529
|
392
|
}
|
530
|
393
|
});
|
531
|
394
|
},
|
532
|
|
- requestSickHistory: function() {
|
533
|
|
- this.loading = true
|
534
|
|
- let params = {
|
535
|
|
- patient_id:this.patient_id,
|
536
|
|
- start_time:this.start_time,
|
537
|
|
- end_time:this.end_time,
|
538
|
|
- }
|
539
|
|
- GetSickHistoryRecords(params).then(rs => {
|
540
|
|
- this.loading = false
|
541
|
|
- var resp = rs.data
|
542
|
|
- if (resp.state == 1) {
|
543
|
|
- this.current_select_record = null
|
544
|
|
- this.records = resp.data.records
|
545
|
|
- this.doctors = resp.data.doctors
|
546
|
|
- this.$refs.record_table.setCurrentRow(this.records[0])
|
547
|
|
- } else {
|
548
|
|
- this.$message.error(resp.msg)
|
549
|
|
- }
|
550
|
|
- }).catch(error => {
|
551
|
|
- this.loading = false
|
552
|
|
- this.$message.error(error)
|
553
|
|
- })
|
554
|
|
- },
|
|
395
|
+
|
555
|
396
|
|
556
|
397
|
didChangeCurrentRecord: function(record) {
|
557
|
398
|
this.current_select_record = record
|
|
@@ -577,16 +418,16 @@ export default {
|
577
|
418
|
}
|
578
|
419
|
this.uploading_new_record = true
|
579
|
420
|
let params = {
|
580
|
|
- id:this.edit_current_id,
|
|
421
|
+ id:this.id,
|
581
|
422
|
patient_id: this.patient_id,
|
582
|
|
- content: this.edit_new_content,
|
583
|
|
- record_time: this.edit_sick_history_time + " 00:00:00",
|
584
|
|
- title: this.edit_title,
|
585
|
|
- is_shenyizhishi:this.edit_is_shenyizhishi,
|
586
|
|
- is_fumotouxishi:this.edit_is_fumotouxishi,
|
587
|
|
- is_guominyaowu:this.edit_is_guominyaowu,
|
588
|
|
- guominyaowu_desc:this.edit_guominyaowu_desc,
|
589
|
|
- doctor_id: this.edit_doctor_id
|
|
423
|
+ content: this.new_content,
|
|
424
|
+ record_time: this.sick_history_time +" 00:00:00",
|
|
425
|
+ title: this.title,
|
|
426
|
+ is_shenyizhishi:this.shen_yizhi,
|
|
427
|
+ is_fumotouxishi:this.shen_fumo,
|
|
428
|
+ is_guominyaowu:this.shen_guomi,
|
|
429
|
+ guominyaowu_desc:this.guominyaowu_desc,
|
|
430
|
+ doctor_id: this.admin_user_id
|
590
|
431
|
}
|
591
|
432
|
|
592
|
433
|
ModifySickHistoryRecord(params).then(rs => {
|
|
@@ -619,36 +460,30 @@ export default {
|
619
|
460
|
},
|
620
|
461
|
|
621
|
462
|
createAction: function() {
|
622
|
|
- this.new_content = this.$refs.editor.content
|
|
463
|
+
|
|
464
|
+ this.new_content = this.$refs.edit.contents
|
623
|
465
|
if (this.new_content.length == 0) {
|
624
|
466
|
this.$message.error('请填写病程内容')
|
625
|
467
|
return
|
626
|
468
|
}
|
627
|
|
- this.uploading_new_record = true
|
628
|
469
|
let params = {
|
629
|
470
|
patient_id: this.patient_id,
|
630
|
471
|
content: this.new_content,
|
631
|
|
- record_time: this.sick_history_time +" 00:00:00",
|
|
472
|
+ record_time: this.start_time,
|
632
|
473
|
title: this.title,
|
633
|
|
- is_shenyizhishi:this.is_shenyizhishi,
|
634
|
|
- is_fumotouxishi:this.is_fumotouxishi,
|
635
|
|
- is_guominyaowu:this.is_guominyaowu,
|
|
474
|
+ is_shenyizhishi:this.shen_yizhi,
|
|
475
|
+ is_fumotouxishi:this.shen_fumo,
|
|
476
|
+ is_guominyaowu:this.shen_guomi,
|
636
|
477
|
guominyaowu_desc:this.guominyaowu_desc,
|
637
|
|
- doctor_id: this.doctor_id
|
|
478
|
+ doctor_id: this.admin_user_id
|
638
|
479
|
}
|
639
|
|
- createSickHistoryRecord(params).then(rs => {
|
640
|
|
- this.uploading_new_record = false
|
641
|
|
- this.$message.success("新增成功")
|
642
|
|
- var resp = rs.data
|
643
|
|
- if (resp.state == 1) {
|
644
|
|
- this.records.unshift(resp.data.record)
|
645
|
|
- this.show_dialog = false
|
646
|
|
- this.new_content = ''
|
647
|
|
- this.title = ''
|
648
|
|
- this.$refs.record_table.setCurrentRow(this.records[0])
|
649
|
|
- } else {
|
650
|
|
- this.$message.error(resp.msg)
|
651
|
|
- }
|
|
480
|
+ console.log("params-------------",params)
|
|
481
|
+ createNewSickHistoryRecord(params).then(response => {
|
|
482
|
+ if(response.data.state == 1){
|
|
483
|
+ var patientSickHistory = response.data.data.patientSickHistory
|
|
484
|
+ this.$message.success("保存成功!")
|
|
485
|
+
|
|
486
|
+ }
|
652
|
487
|
|
653
|
488
|
}).catch(error => {
|
654
|
489
|
this.uploading_new_record = false
|
|
@@ -712,10 +547,6 @@ export default {
|
712
|
547
|
this.loading = false
|
713
|
548
|
this.$message.error(err)
|
714
|
549
|
})
|
715
|
|
- }, startTimeChange(val) {
|
716
|
|
- this.requestSickHistory()
|
717
|
|
- }, endTimeChange(val) {
|
718
|
|
- this.requestSickHistory()
|
719
|
550
|
},
|
720
|
551
|
showDialog(){
|
721
|
552
|
for(let i = 0; i < this.doctorOptions.length; i++){
|
|
@@ -760,6 +591,19 @@ export default {
|
760
|
591
|
return
|
761
|
592
|
}
|
762
|
593
|
this.$router.push({ path: "/sickhistory/print?ids="+this.ids+"&patient_id="+this.patient_id});
|
|
594
|
+ },
|
|
595
|
+ getlist(){
|
|
596
|
+ var params = {
|
|
597
|
+ patient_id:this.patient_id
|
|
598
|
+ }
|
|
599
|
+ console.log("paraosm===============",params)
|
|
600
|
+ getNewSickHistory(params).then(response=>{
|
|
601
|
+ if(response.data.state ==1 ){
|
|
602
|
+ var list = response.data.data.list
|
|
603
|
+ console.log("类别===============",list)
|
|
604
|
+ this.tableData = list
|
|
605
|
+ }
|
|
606
|
+ })
|
763
|
607
|
}
|
764
|
608
|
}
|
765
|
609
|
}
|