|
@@ -52,7 +52,7 @@
|
52
|
52
|
<el-button type="primary" size="small" @click="prints">打印</el-button>
|
53
|
53
|
</div>
|
54
|
54
|
<div v-if="add_index == 1">
|
55
|
|
- <el-button type="primary" size="small" @click="createAction">保存2</el-button>
|
|
55
|
+ <el-button type="primary" size="small" @click="createAction">保存</el-button>
|
56
|
56
|
<el-button size="small" @click="showCancel">取消</el-button>
|
57
|
57
|
</div>
|
58
|
58
|
</div>
|
|
@@ -63,8 +63,10 @@
|
63
|
63
|
<el-date-picker
|
64
|
64
|
v-model="start_time"
|
65
|
65
|
type="date"
|
|
66
|
+ format="yyyy-MM-dd"
|
66
|
67
|
:disabled="disabled"
|
67
|
68
|
style="width: 150px;"
|
|
69
|
+ value-format="yyyy-MM-dd"
|
68
|
70
|
placeholder="选择日期">
|
69
|
71
|
</el-date-picker>
|
70
|
72
|
</div>
|
|
@@ -120,7 +122,7 @@
|
120
|
122
|
<div style="margin-top: 15px;">
|
121
|
123
|
<span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">详情</span>
|
122
|
124
|
<keep-alive>
|
123
|
|
- <ueditor ref="edit" :content="new_content" id="editor"></ueditor>
|
|
125
|
+ <ueditor ref="editor" :content="new_content" id="editors" :disabled="disabled"></ueditor>
|
124
|
126
|
</keep-alive>
|
125
|
127
|
</div>
|
126
|
128
|
<div style="text-align: right;margin-top:10px ;">
|
|
@@ -132,6 +134,10 @@
|
132
|
134
|
</div>
|
133
|
135
|
|
134
|
136
|
</div>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
135
|
141
|
<el-dialog
|
136
|
142
|
title="设置模板"
|
137
|
143
|
:visible.sync="template_dialog"
|
|
@@ -143,7 +149,7 @@
|
143
|
149
|
</div>
|
144
|
150
|
<span slot="footer" class="dialog-footer">
|
145
|
151
|
<el-button @click="template_dialog = false">取 消</el-button>
|
146
|
|
- <el-button type="primary" @click="template_save">确 定</el-button>
|
|
152
|
+ <el-button type="primary" @click="saveTemplate">确 定</el-button>
|
147
|
153
|
</span>
|
148
|
154
|
</el-dialog>
|
149
|
155
|
<el-dialog
|
|
@@ -156,19 +162,20 @@
|
156
|
162
|
<div style="display: flex;">
|
157
|
163
|
<div style="width: 27%;">
|
158
|
164
|
<el-table
|
159
|
|
- :data="tableData"
|
|
165
|
+ ref="record_table_one"
|
|
166
|
+ :data="templateList"
|
160
|
167
|
:highlight-current-row="true"
|
161
|
|
- @row-click="rowclick"
|
|
168
|
+ @current-change="getCurrentChangeOne"
|
162
|
169
|
style="width: 100%">
|
163
|
|
- <el-table-column
|
164
|
|
- prop="index"
|
165
|
|
- label="序号"
|
166
|
|
- width="">
|
|
170
|
+ <el-table-column prop="index" label="序号" width="" align="center">
|
|
171
|
+ <template slot-scope="scope">
|
|
172
|
+ {{ scope.$index + 1 }}
|
|
173
|
+ </template>
|
167
|
174
|
</el-table-column>
|
168
|
|
- <el-table-column
|
169
|
|
- prop="name"
|
170
|
|
- label="模板名称"
|
171
|
|
- width="">
|
|
175
|
+ <el-table-column prop="name" label="模板名称" width="" align="center">
|
|
176
|
+ <template slot-scope="scope">
|
|
177
|
+ {{ scope.row.title }}
|
|
178
|
+ </template>
|
172
|
179
|
</el-table-column>
|
173
|
180
|
</el-table>
|
174
|
181
|
</div>
|
|
@@ -176,7 +183,7 @@
|
176
|
183
|
<div class="Second_title">模板内容</div>
|
177
|
184
|
<div style="">
|
178
|
185
|
<keep-alive>
|
179
|
|
- <ueditor ref="editor" id="editors" v-bind:r_content="new_content"></ueditor>
|
|
186
|
+ <ueditor ref="editorOne" id="editors" :content="new_content"></ueditor>
|
180
|
187
|
</keep-alive>
|
181
|
188
|
</div>
|
182
|
189
|
</div>
|
|
@@ -185,7 +192,7 @@
|
185
|
192
|
<span slot="footer" class="dialog-footer" style="text-align: center;">
|
186
|
193
|
<el-button type="danger" @click="template_dele">删除模板</el-button>
|
187
|
194
|
<el-button type="primary" @click="template_save">保存模板</el-button>
|
188
|
|
- <el-button type="primary" @click="template_save">应用</el-button>
|
|
195
|
+ <el-button type="primary" @click="toContentPint">应用</el-button>
|
189
|
196
|
<el-button @click="library_dialog = false">取消</el-button>
|
190
|
197
|
</span>
|
191
|
198
|
</el-dialog>
|
|
@@ -214,9 +221,13 @@ import { fetchAllDoctorAndNurse } from "@/api/doctor";
|
214
|
221
|
import print from 'print-js'
|
215
|
222
|
import {
|
216
|
223
|
createNewSickHistoryRecord,
|
217
|
|
- deleteSickHistoryRecords,
|
|
224
|
+ deleteNewSickHistory,
|
218
|
225
|
getNewSickHistory,
|
219
|
|
- ModifySickHistoryRecord
|
|
226
|
+ ModifySickHistoryRecord,
|
|
227
|
+ saveSickHistoryTemplate,
|
|
228
|
+ getSickHistoryTempalate,
|
|
229
|
+ modifySickHistoryTemplate,
|
|
230
|
+ deleteSickHistoryTempalte
|
220
|
231
|
} from '@/api/patient'
|
221
|
232
|
import { parseTime } from '@/utils'
|
222
|
233
|
import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
@@ -286,6 +297,9 @@ export default {
|
286
|
297
|
guomi_options:[{value:1,label:'无'},{value:2,label:'有'},{value:3,label:'不详'}],
|
287
|
298
|
tableData:[],
|
288
|
299
|
admin_user_id:"",
|
|
300
|
+ templateList:[],
|
|
301
|
+ template_content:"",
|
|
302
|
+ template_id:0,
|
289
|
303
|
}
|
290
|
304
|
},
|
291
|
305
|
created() {
|
|
@@ -329,18 +343,34 @@ export default {
|
329
|
343
|
this.fetchAllDoctorAndNurse()
|
330
|
344
|
|
331
|
345
|
},
|
332
|
|
- mounted(){
|
333
|
|
- // setTimeout(()=>{
|
334
|
|
- // console.log('1111222',this.new_content);
|
335
|
|
-
|
336
|
|
- // this.$refs.ue.parent.setDisabled()
|
337
|
|
- // },10)
|
338
|
|
- },
|
339
|
346
|
methods: {
|
340
|
347
|
template_dele(){
|
341
|
|
-
|
|
348
|
+ deleteSickHistoryTempalte(this.template_id).then(response=>{
|
|
349
|
+ if(response.data.state == 1){
|
|
350
|
+ var msg = response.data.data.msg
|
|
351
|
+ this.$message.success("删除成功!")
|
|
352
|
+ this.getSickHistoryTempalateOne()
|
|
353
|
+ }
|
|
354
|
+ })
|
|
355
|
+ },
|
|
356
|
+ getSickHistoryTempalateOne(){
|
|
357
|
+ getSickHistoryTempalate().then(response=>{
|
|
358
|
+ if(response.data.state == 1){
|
|
359
|
+
|
|
360
|
+ this.templateList = []
|
|
361
|
+ this.templateList = response.data.data.templateList
|
|
362
|
+ if(this.templateList!=null && this.templateList.length>0){
|
|
363
|
+ this.$refs.record_table_one.setCurrentRow(this.templateList[0])
|
|
364
|
+ }
|
|
365
|
+ }
|
|
366
|
+ })
|
342
|
367
|
},
|
343
|
368
|
add_click(){
|
|
369
|
+ this.admin_user_id = ""
|
|
370
|
+ this.admin_user_id = this.$store.getters.xt_user.user.id
|
|
371
|
+ this.fetchAllDoctorAndNurse()
|
|
372
|
+ this.$refs.editor.contents = ""
|
|
373
|
+ this.id = 0
|
344
|
374
|
this.disabled = false
|
345
|
375
|
this.add_index = 1
|
346
|
376
|
},
|
|
@@ -362,16 +392,36 @@ export default {
|
362
|
392
|
if(this.add_index ==0){
|
363
|
393
|
this.template_dialog = true
|
364
|
394
|
}else{
|
365
|
|
- this.library_dialog = true
|
|
395
|
+ getSickHistoryTempalate().then(response=>{
|
|
396
|
+ if(response.data.state == 1){
|
|
397
|
+ this.library_dialog = true
|
|
398
|
+ this.templateList = response.data.data.templateList
|
|
399
|
+ console.log("hahhahahaha",this.$refs)
|
|
400
|
+ if(this.templateList!=null && this.templateList.length>0){
|
|
401
|
+ this.$refs.record_table_one.setCurrentRow(this.templateList[0])
|
|
402
|
+ }
|
|
403
|
+ console.log("haaaaaaaaaaaaa",this.templateList)
|
|
404
|
+
|
|
405
|
+ }
|
|
406
|
+ })
|
|
407
|
+
|
366
|
408
|
}
|
367
|
409
|
|
368
|
410
|
},
|
369
|
411
|
template_save(){
|
370
|
|
- this.template_dialog = false
|
371
|
|
- this.$message({
|
372
|
|
- message: '模板设置成功',
|
373
|
|
- type: 'success'
|
|
412
|
+ var params = {
|
|
413
|
+ template_id:this.template_id,
|
|
414
|
+ content:this.$refs.editorOne.contents
|
|
415
|
+ }
|
|
416
|
+ modifySickHistoryTemplate(params).then(response=>{
|
|
417
|
+ if(response.data.state == 1){
|
|
418
|
+ var msg = response.data.data.msg
|
|
419
|
+ this.$message.success("保存成功!")
|
|
420
|
+ this.template_dialog = false
|
|
421
|
+ }
|
374
|
422
|
})
|
|
423
|
+
|
|
424
|
+
|
375
|
425
|
},
|
376
|
426
|
prints(){
|
377
|
427
|
const style ='@media print{.content{width:960px;margin:0 auto;font-size: 23px;}}'
|
|
@@ -383,18 +433,15 @@ export default {
|
383
|
433
|
})
|
384
|
434
|
},
|
385
|
435
|
|
386
|
|
-
|
387
|
|
-
|
388
|
|
-
|
389
|
436
|
fetchAllDoctorAndNurse() {
|
390
|
437
|
fetchAllDoctorAndNurse().then(response => {
|
391
|
438
|
if (response.data.state == 1) {
|
|
439
|
+ this.doctorOptions= []
|
392
|
440
|
this.doctorOptions = response.data.data.doctors;
|
393
|
441
|
}
|
394
|
442
|
});
|
395
|
443
|
},
|
396
|
444
|
|
397
|
|
-
|
398
|
445
|
didChangeCurrentRecord: function(record) {
|
399
|
446
|
this.current_select_record = record
|
400
|
447
|
},
|
|
@@ -453,12 +500,14 @@ export default {
|
453
|
500
|
|
454
|
501
|
createAction: function() {
|
455
|
502
|
|
456
|
|
- this.new_content = this.$refs.edit.contents
|
|
503
|
+ console.log("hhhhhhhhhhhhhhhhhh",this.$refs)
|
|
504
|
+ this.new_content = this.$refs.editor.contents
|
457
|
505
|
if (this.new_content.length == 0) {
|
458
|
506
|
this.$message.error('请填写病程内容')
|
459
|
507
|
return
|
460
|
508
|
}
|
461
|
509
|
let params = {
|
|
510
|
+ id:this.id,
|
462
|
511
|
patient_id: this.patient_id,
|
463
|
512
|
content: this.new_content,
|
464
|
513
|
record_time: this.start_time,
|
|
@@ -469,7 +518,7 @@ export default {
|
469
|
518
|
guominyaowu_desc:this.guominyaowu_desc,
|
470
|
519
|
doctor_id: this.admin_user_id
|
471
|
520
|
}
|
472
|
|
- console.log("params-------------",params)
|
|
521
|
+
|
473
|
522
|
createNewSickHistoryRecord(params).then(response => {
|
474
|
523
|
if(response.data.state == 1){
|
475
|
524
|
var patientSickHistory = response.data.data.patientSickHistory
|
|
@@ -500,65 +549,34 @@ export default {
|
500
|
549
|
console.log("select23322332",this.ids)
|
501
|
550
|
this.selectingRows = selectRows
|
502
|
551
|
},
|
503
|
|
- deleteAction: function() {
|
504
|
|
- if (this.selectingRows.length == 0) {
|
505
|
|
- return
|
506
|
|
- }
|
507
|
|
- var ids = []
|
508
|
|
- for (let index = 0; index < this.selectingRows.length; index++) {
|
509
|
|
- const row = this.selectingRows[index]
|
510
|
|
- ids.push(row.id)
|
511
|
|
- }
|
512
|
|
- var ids_str = ids.join(',')
|
513
|
|
- this.loading = true
|
|
552
|
+ deleteAction(){
|
|
553
|
+ if(this.id == 0){
|
|
554
|
+ this.$message.error("请选择要删除的信息!")
|
|
555
|
+ return false
|
|
556
|
+ }
|
|
557
|
+ this.$confirm('确定要取消吗?', '提示', {
|
|
558
|
+ confirmButtonText: '确定',
|
|
559
|
+ cancelButtonText: '取消',
|
|
560
|
+ type: 'warning'
|
|
561
|
+ }).then(() => {
|
|
562
|
+ deleteNewSickHistory(this.id).then(response=>{
|
|
563
|
+ if (response.data.state==1) {
|
|
564
|
+ var msg = response.data.data.msg
|
|
565
|
+ this.$message.success("保存成功!")
|
|
566
|
+ this.getlist()
|
|
567
|
+ }
|
|
568
|
+ });
|
|
569
|
+ }).catch(() => {
|
514
|
570
|
|
515
|
|
- let params={
|
516
|
|
- patient_id:this.patient_id,
|
517
|
|
- ids:ids_str,
|
518
|
|
- }
|
|
571
|
+ });
|
519
|
572
|
|
520
|
|
- deleteSickHistoryRecords(params).then(rs => {
|
521
|
|
- var resp = rs.data
|
522
|
|
- if (resp.state == 1) {
|
523
|
|
- for (let id_index = 0; id_index < ids.length; id_index++) {
|
524
|
|
- for (let record_index = 0; record_index < this.records.length; record_index++) {
|
525
|
|
- if (ids[id_index] == this.records[record_index].id) {
|
526
|
|
- this.records.splice(record_index, 1)
|
527
|
|
- break
|
528
|
|
- }
|
529
|
|
- }
|
530
|
|
- }
|
531
|
|
- this.selectingRows = []
|
532
|
|
- this.$message.success('已删除')
|
533
|
573
|
|
534
|
|
- } else {
|
535
|
|
- this.$message.error(resp.msg)
|
536
|
|
- }
|
537
|
|
- this.loading = false
|
538
|
|
- }).catch(err => {
|
539
|
|
- this.loading = false
|
540
|
|
- this.$message.error(err)
|
541
|
|
- })
|
542
|
|
- },
|
|
574
|
+ },
|
|
575
|
+
|
543
|
576
|
showEdit() {
|
544
|
|
- if (this.table_current_index == -1) {
|
545
|
|
- this.$message.error('请选择要修改的病程内容')
|
546
|
|
- return
|
547
|
|
- }
|
548
|
|
- this.edit_is_shenyizhishi = this.records[this.table_current_index].is_shenyizhi_history.toString()
|
549
|
|
- this.edit_is_fumotouxishi = this.records[this.table_current_index].is_fumo_dialysis_history.toString()
|
550
|
|
- this.edit_is_guominyaowu = this.records[this.table_current_index].is_hypersusceptibility.toString()
|
551
|
|
- this.edit_guominyaowu_desc = this.records[this.table_current_index].hypersusceptibility_desc
|
552
|
|
- this.edit_sick_history_time = this.recordTime(this.records[this.table_current_index].record_time)
|
553
|
|
- this.edit_new_content = this.records[this.table_current_index].content
|
554
|
|
- this.edit_current_id = this.records[this.table_current_index].id
|
555
|
|
- this.edit_doctor_id = this.records[this.table_current_index].doctor_id
|
556
|
|
- console.log(this.edit_new_content )
|
557
|
|
- this.edit_title = this.records[this.table_current_index].title//
|
558
|
|
- this.show_edit_dialog = true
|
559
|
|
-
|
560
|
|
- this.$refs.record_table.setCurrentRow(null)
|
561
|
|
-
|
|
577
|
+ this.add_index =1
|
|
578
|
+ this.disabled = false
|
|
579
|
+
|
562
|
580
|
}, tableRow({ row, rowIndex }) {
|
563
|
581
|
// 把每一行的索引放进row
|
564
|
582
|
row.index = rowIndex
|
|
@@ -566,10 +584,6 @@ export default {
|
566
|
584
|
this.table_current_index = row.index
|
567
|
585
|
},
|
568
|
586
|
print(){
|
569
|
|
- // if (this.table_current_index == -1) {
|
570
|
|
- // this.$message.error('请选择要打印的病程')
|
571
|
|
- // return
|
572
|
|
- // }
|
573
|
587
|
if(this.ids.length == 0){
|
574
|
588
|
this.$message.error('请选择要打印的病程')
|
575
|
589
|
return
|
|
@@ -601,24 +615,49 @@ export default {
|
601
|
615
|
return uParseTime(time, '{y}-{m}-{d}')
|
602
|
616
|
},
|
603
|
617
|
getCurrentChange(val){
|
604
|
|
-
|
605
|
|
- console.log("new_content2222222222222222222---------------",val.content)
|
606
|
|
- this.new_content = ""
|
607
|
|
- this.new_content = val.content
|
608
|
|
- // var ue = UE.getEditor('editor')
|
609
|
|
- // ue.setContent(val.content)
|
610
|
|
-
|
|
618
|
+ this.$refs.editor.contents = val.content
|
611
|
619
|
this.record_time = this.getTime(val.record_time)
|
612
|
620
|
this.id = val.id
|
613
|
621
|
this.guominyaowu_desc = val.hypersusceptibility_desc
|
614
|
|
- this.shen_fumo = val.is_fumo_dialysis_history
|
615
|
|
- this.shen_yizhi = val.is_shenyizhi_history
|
616
|
|
- this.shen_guomi = val.is_hypersusceptibility
|
617
|
|
- this.patient_id = val.patient_id
|
618
|
|
-
|
619
|
|
-
|
|
622
|
+ if(val.is_fumo_dialysis_history>0){
|
|
623
|
+ this.shen_fumo = val.is_fumo_dialysis_history
|
|
624
|
+ }
|
|
625
|
+ if(val.is_shenyizhi_history>0){
|
|
626
|
+ this.shen_yizhi = val.is_shenyizhi_history
|
|
627
|
+ }
|
|
628
|
+ if(val.is_hypersusceptibility>0){
|
|
629
|
+ this.shen_guomi = val.is_hypersusceptibility
|
|
630
|
+ }
|
620
|
631
|
|
621
|
|
- }
|
|
632
|
+ this.patient_id = val.patient_id
|
|
633
|
+ this.admin_user_id = val.admin_user_id
|
|
634
|
+
|
|
635
|
+ },
|
|
636
|
+ getCurrentChangeOne(val){
|
|
637
|
+
|
|
638
|
+ this.$refs.editorOne.contents = val.content
|
|
639
|
+ this.template_content = ""
|
|
640
|
+ this.template_content = val.content
|
|
641
|
+ this.template_id = val.id
|
|
642
|
+ },
|
|
643
|
+ saveTemplate(){
|
|
644
|
+
|
|
645
|
+ var params = {
|
|
646
|
+ title:this.template_name,
|
|
647
|
+ content: this.$refs.editor.contents,
|
|
648
|
+ }
|
|
649
|
+ saveSickHistoryTemplate(params).then(response=>{
|
|
650
|
+ if(response.data.state == 1){
|
|
651
|
+ var sickHistoryTemplate = response.data.data.sickHistoryTemplate
|
|
652
|
+ this.$message.success("保存成功!")
|
|
653
|
+ this.template_dialog = false
|
|
654
|
+ }
|
|
655
|
+ })
|
|
656
|
+ },
|
|
657
|
+ toContentPint(){
|
|
658
|
+ this.$refs.editor.contents = this.template_content
|
|
659
|
+ this.library_dialog = false
|
|
660
|
+ }
|
622
|
661
|
}
|
623
|
662
|
}
|
624
|
663
|
</script>
|