|
@@ -105,11 +105,11 @@
|
105
|
105
|
center>
|
106
|
106
|
<div>
|
107
|
107
|
模板名称:
|
108
|
|
- <el-input v-model="template_name" placeholder="请输入内容" style="width: 160px;"></el-input>
|
|
108
|
+ <el-input v-model="title" placeholder="请输入内容" style="width: 160px;"></el-input>
|
109
|
109
|
</div>
|
110
|
110
|
<span slot="footer" class="dialog-footer">
|
111
|
111
|
<el-button @click="template_dialog = false">取 消</el-button>
|
112
|
|
- <el-button type="primary" @click="template_save">确 定</el-button>
|
|
112
|
+ <el-button type="primary" @click="saveTemplate">确 定</el-button>
|
113
|
113
|
</span>
|
114
|
114
|
</el-dialog>
|
115
|
115
|
<el-dialog
|
|
@@ -122,19 +122,21 @@
|
122
|
122
|
<div style="display: flex;">
|
123
|
123
|
<div style="width: 27%;">
|
124
|
124
|
<el-table
|
125
|
|
- :data="tableData"
|
|
125
|
+ :data="templateList"
|
126
|
126
|
:highlight-current-row="true"
|
127
|
127
|
@row-click="rowclick"
|
|
128
|
+ ref="record_table_one"
|
|
129
|
+ @current-change="getCurrentChangeTwo"
|
128
|
130
|
style="width: 100%">
|
129
|
|
- <el-table-column
|
130
|
|
- prop="index"
|
131
|
|
- label="序号"
|
132
|
|
- width="">
|
|
131
|
+ <el-table-column prop="index" label="序号" width="">
|
|
132
|
+ <template slot-scope="scope">
|
|
133
|
+ {{ scope.$index + 1 }}
|
|
134
|
+ </template>
|
133
|
135
|
</el-table-column>
|
134
|
|
- <el-table-column
|
135
|
|
- prop="name"
|
136
|
|
- label="模板名称"
|
137
|
|
- width="">
|
|
136
|
+ <el-table-column prop="name" label="模板名称" width="">
|
|
137
|
+ <template slot-scope="scope">
|
|
138
|
+ {{ scope.row.title }}
|
|
139
|
+ </template>
|
138
|
140
|
</el-table-column>
|
139
|
141
|
</el-table>
|
140
|
142
|
</div>
|
|
@@ -142,7 +144,7 @@
|
142
|
144
|
<div class="Second_title">模板内容</div>
|
143
|
145
|
<div style="">
|
144
|
146
|
<keep-alive>
|
145
|
|
- <ueditor ref="ue" :content="new_content" id="editor"></ueditor>
|
|
147
|
+ <ueditor ref="editorOne" id="editors" :content="new_content"></ueditor>
|
146
|
148
|
</keep-alive>
|
147
|
149
|
</div>
|
148
|
150
|
</div>
|
|
@@ -151,7 +153,7 @@
|
151
|
153
|
<span slot="footer" class="dialog-footer" style="text-align: center;">
|
152
|
154
|
<el-button type="danger" @click="template_dele">删除模板</el-button>
|
153
|
155
|
<el-button type="primary" @click="template_save">保存模板</el-button>
|
154
|
|
- <el-button type="primary" @click="template_save">应用</el-button>
|
|
156
|
+ <el-button type="primary" @click="toContentPint">应用</el-button>
|
155
|
157
|
<el-button @click="library_dialog = false">取消</el-button>
|
156
|
158
|
</span>
|
157
|
159
|
</el-dialog>
|
|
@@ -226,7 +228,11 @@
|
226
|
228
|
createNewCourseOfDiseaseRecord,
|
227
|
229
|
deleteNewCouseOfDisease,
|
228
|
230
|
modifyCourseOfDiseaseRecord,
|
229
|
|
- getPatientCourseOfDiseaseList
|
|
231
|
+ getPatientCourseOfDiseaseList,
|
|
232
|
+ saveCoureseTemplateTitle,
|
|
233
|
+ getPatientCoureOfTempalate,
|
|
234
|
+ saveCourseOfNewTemplate,
|
|
235
|
+ deleteCourseTempalte
|
230
|
236
|
} from '@/api/patient'
|
231
|
237
|
import { fetchAllDoctorAndNurse } from "@/api/doctor";
|
232
|
238
|
import { parseTime } from '@/utils'
|
|
@@ -281,7 +287,12 @@
|
281
|
287
|
admin_user_id:0,
|
282
|
288
|
record_date:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
|
283
|
289
|
template_name:"",
|
284
|
|
- id:0
|
|
290
|
+ id:0,
|
|
291
|
+ doctorOptions:[],
|
|
292
|
+ template_content:"",
|
|
293
|
+ template_id:0,
|
|
294
|
+ title:"",
|
|
295
|
+ templateList:[]
|
285
|
296
|
}
|
286
|
297
|
},
|
287
|
298
|
created() {
|
|
@@ -304,17 +315,69 @@
|
304
|
315
|
|
305
|
316
|
},
|
306
|
317
|
methods: {
|
307
|
|
- template_dele(){
|
308
|
318
|
|
|
319
|
+ toContentPint(){
|
|
320
|
+ this.$refs.editor.contents = this.template_content
|
|
321
|
+ this.library_dialog = false
|
|
322
|
+ },
|
|
323
|
+ getCurrentChangeOne(val){
|
|
324
|
+ this.$refs.editor.contents = val.content
|
|
325
|
+ this.record_date = this.getTime(val.record_time)
|
|
326
|
+ this.id = val.id
|
309
|
327
|
},
|
310
|
|
- rowclick(){
|
|
328
|
+ getCurrentChangeTwo(val){
|
|
329
|
+
|
|
330
|
+ this.$refs.editorOne.contents = val.content
|
|
331
|
+ this.template_content = ""
|
|
332
|
+ this.template_content = val.content
|
|
333
|
+ this.template_id = val.id
|
|
334
|
+ },
|
|
335
|
+ template_dele(){
|
|
336
|
+ deleteCourseTempalte(this.template_id).then(response=>{
|
|
337
|
+ if(response.data.state == 1){
|
|
338
|
+ var msg = response.data.data.msg
|
|
339
|
+ this.$message.success("删除成功!")
|
|
340
|
+ this.library_dialog = false
|
|
341
|
+ this.getPatientCoureOfTempalateOne()
|
|
342
|
+ }
|
|
343
|
+ })
|
|
344
|
+ },
|
|
345
|
+ getPatientCoureOfTempalateOne(){
|
|
346
|
+
|
|
347
|
+ },
|
|
348
|
+ rowclick(){
|
311
|
349
|
|
312
|
350
|
},
|
313
|
351
|
prints(){
|
314
|
352
|
|
|
353
|
+ },
|
|
354
|
+ saveTemplate(){
|
|
355
|
+
|
|
356
|
+ var params = {
|
|
357
|
+ title:this.title,
|
|
358
|
+ content: this.$refs.editor.contents,
|
|
359
|
+ }
|
|
360
|
+ saveCoureseTemplateTitle(params).then(response=>{
|
|
361
|
+ if(response.data.state == 1){
|
|
362
|
+ var courseTemplate = response.data.data.courseTemplate
|
|
363
|
+ this.$message.success("保存成功!")
|
|
364
|
+ this.template_dialog = false
|
|
365
|
+ }
|
|
366
|
+ })
|
315
|
367
|
},
|
316
|
368
|
template_save(){
|
317
|
|
-
|
|
369
|
+ var params = {
|
|
370
|
+ template_id:this.template_id,
|
|
371
|
+ content:this.$refs.editorOne.contents
|
|
372
|
+ }
|
|
373
|
+
|
|
374
|
+ saveCourseOfNewTemplate(params).then(response=>{
|
|
375
|
+ if(response.data.state == 1){
|
|
376
|
+ var msg = response.data.data.msg
|
|
377
|
+ this.$message.success("保存成功")
|
|
378
|
+ this.library_dialog = false
|
|
379
|
+ }
|
|
380
|
+ })
|
318
|
381
|
},
|
319
|
382
|
getDocName(admin_user_id){
|
320
|
383
|
var user_name = ""
|
|
@@ -347,8 +410,13 @@
|
347
|
410
|
});
|
348
|
411
|
},
|
349
|
412
|
add_click(){
|
350
|
|
- this.add_index = 1
|
|
413
|
+ this.admin_user_id = ""
|
|
414
|
+ this.admin_user_id = this.$store.getters.xt_user.user.id
|
|
415
|
+ this.fetchAllDoctorAndNurse()
|
|
416
|
+ this.$refs.editor.contents = ""
|
|
417
|
+ this.id = 0
|
351
|
418
|
this.disabled = false
|
|
419
|
+ this.add_index = 1
|
352
|
420
|
},
|
353
|
421
|
showCancel(){
|
354
|
422
|
this.add_index = 0
|
|
@@ -388,8 +456,20 @@
|
388
|
456
|
if(this.add_index ==0){
|
389
|
457
|
this.template_dialog = true
|
390
|
458
|
}else{
|
391
|
|
- this.library_dialog = true
|
392
|
|
- }
|
|
459
|
+ getPatientCoureOfTempalate().then(response=>{
|
|
460
|
+ if(response.data.state == 1){
|
|
461
|
+ this.library_dialog = true
|
|
462
|
+ this.templateList = response.data.data.templateList
|
|
463
|
+ console.log("hahhahahaha",this.$refs)
|
|
464
|
+ if(this.templateList!=null && this.templateList.length>0){
|
|
465
|
+ this.$refs.record_table_one.setCurrentRow(this.templateList[0])
|
|
466
|
+ }
|
|
467
|
+ console.log("haaaaaaaaaaaaa",this.templateList)
|
|
468
|
+
|
|
469
|
+ }
|
|
470
|
+ })
|
|
471
|
+
|
|
472
|
+ }
|
393
|
473
|
},
|
394
|
474
|
auto_click(){
|
395
|
475
|
this.auto_dialog = true
|
|
@@ -524,7 +604,7 @@
|
524
|
604
|
deleteNewCouseOfDisease(this.id).then(response=>{
|
525
|
605
|
if (response.data.state==1) {
|
526
|
606
|
var msg = response.data.data.msg
|
527
|
|
- this.$message.success("保存成功!")
|
|
607
|
+ this.$message.success("删除成功!")
|
528
|
608
|
this.getlist()
|
529
|
609
|
}
|
530
|
610
|
});
|
|
@@ -535,16 +615,9 @@
|
535
|
615
|
|
536
|
616
|
},
|
537
|
617
|
showEdit() {
|
538
|
|
- if (this.table_current_index == -1) {
|
539
|
|
- this.$message.error('请选择要修改的病程内容')
|
540
|
|
- return
|
541
|
|
- }
|
542
|
|
- this.show_edit_dialog = true
|
543
|
|
- this.edit_course_of_disease_time = this.recordTime(this.records[this.table_current_index].record_time)
|
544
|
|
- this.edit_new_content = this.records[this.table_current_index].content
|
545
|
|
- this.edit_current_id = this.records[this.table_current_index].id
|
546
|
|
- this.edit_title = this.records[this.table_current_index].title
|
547
|
|
- this.$refs.record_table.setCurrentRow(null)
|
|
618
|
+
|
|
619
|
+ this.add_index =1
|
|
620
|
+ this.disabled = false
|
548
|
621
|
|
549
|
622
|
}, tableRow({ row, rowIndex }) {
|
550
|
623
|
// 把每一行的索引放进row
|
|
@@ -703,7 +776,7 @@
|
703
|
776
|
return anticoagulant_name
|
704
|
777
|
},
|
705
|
778
|
getTime (time) {
|
706
|
|
- return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
|
|
779
|
+ return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
|
707
|
780
|
},
|
708
|
781
|
getTimeOne (time) {
|
709
|
782
|
return uParseTime(time, '{y}-{m}-{d}')
|