|
@@ -5,7 +5,7 @@
|
5
|
5
|
</div> -->
|
6
|
6
|
<div class="patient-container">
|
7
|
7
|
<PatientSidebar :id="patient_id" defaultActive="3-5"></PatientSidebar>
|
8
|
|
- <!-- <div class="app-container"> -->
|
|
8
|
+
|
9
|
9
|
<div v-loading="loading">
|
10
|
10
|
<div class="patient-app-container advice-container app-container" style="">
|
11
|
11
|
<div style="display: flex;">
|
|
@@ -23,25 +23,23 @@
|
23
|
23
|
ref="phy_table"
|
24
|
24
|
:data="tableData"
|
25
|
25
|
:highlight-current-row="true"
|
26
|
|
- @row-click="rowclick"
|
|
26
|
+ @current-change="getCurrentChangeOne"
|
27
|
27
|
style="width: 100%">
|
28
|
|
- <el-table-column
|
29
|
|
- type="selection"
|
30
|
|
- width="55">
|
31
|
|
- </el-table-column>
|
32
|
|
- <el-table-column
|
33
|
|
- prop="index"
|
34
|
|
- label="序号"
|
35
|
|
- width="50">
|
|
28
|
+
|
|
29
|
+ <el-table-column prop="index" label="序号" width="50">
|
|
30
|
+ <template slot-scope="scope">
|
|
31
|
+ {{ scope.$index + 1 }}
|
|
32
|
+ </template>
|
36
|
33
|
</el-table-column>
|
37
|
|
- <el-table-column
|
38
|
|
- prop="date"
|
39
|
|
- label="时间"
|
40
|
|
- width="">
|
|
34
|
+ <el-table-column prop="date" label="时间" width="">
|
|
35
|
+ <template slot-scope="scope">
|
|
36
|
+ {{ getTime(scope.row.record_time) }}
|
|
37
|
+ </template>
|
41
|
38
|
</el-table-column>
|
42
|
|
- <el-table-column
|
43
|
|
- prop="doctor"
|
44
|
|
- label="医生">
|
|
39
|
+ <el-table-column prop="doctor" label="医生">
|
|
40
|
+ <template slot-scope="scope">
|
|
41
|
+ {{ getDocName(scope.row.recorder) }}
|
|
42
|
+ </template>
|
45
|
43
|
</el-table-column>
|
46
|
44
|
</el-table>
|
47
|
45
|
</div>
|
|
@@ -58,7 +56,7 @@
|
58
|
56
|
<el-button type="primary" size="small" @click="prints">打印</el-button>
|
59
|
57
|
</div>
|
60
|
58
|
<div v-if="add_index == 1">
|
61
|
|
- <el-button type="primary" size="small" @click="showSave">保存</el-button>
|
|
59
|
+ <el-button type="primary" size="small" @click="showSave">保存2</el-button>
|
62
|
60
|
<el-button size="small" @click="showCancel">取消</el-button>
|
63
|
61
|
</div>
|
64
|
62
|
</div>
|
|
@@ -66,21 +64,19 @@
|
66
|
64
|
<div style="display: flex;margin: 10px 0;">
|
67
|
65
|
<div style="flex: 1;">
|
68
|
66
|
记录时间:
|
69
|
|
- <el-date-picker
|
70
|
|
- v-model="value1"
|
71
|
|
- :disabled="disabled"
|
72
|
|
- type="datetime"
|
73
|
|
- placeholder="选择日期时间">
|
74
|
|
- </el-date-picker>
|
|
67
|
+ <el-date-picker v-model="record_date" prefix-icon="el-icon-date" :editable="false"
|
|
68
|
+ style="width: 250px;"
|
|
69
|
+ type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm:ss"
|
|
70
|
+ value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
75
|
71
|
</div>
|
76
|
72
|
<div style="flex: 1;">
|
77
|
73
|
病程医生:
|
78
|
|
- <el-select v-model="value" placeholder="请选择" :disabled="disabled">
|
|
74
|
+ <el-select v-model="admin_user_id" placeholder="请选择" :disabled="disabled">
|
79
|
75
|
<el-option
|
80
|
|
- v-for="item in options"
|
81
|
|
- :key="item.value"
|
82
|
|
- :label="item.label"
|
83
|
|
- :value="item.value">
|
|
76
|
+ v-for="item in doctorOptions"
|
|
77
|
+ :key="item.id"
|
|
78
|
+ :label="item.name"
|
|
79
|
+ :value="item.id">
|
84
|
80
|
</el-option>
|
85
|
81
|
</el-select>
|
86
|
82
|
</div>
|
|
@@ -97,11 +93,14 @@
|
97
|
93
|
自动生成
|
98
|
94
|
</el-button>
|
99
|
95
|
</div>
|
100
|
|
- <ueditor ref="ue" :content="new_content" id="editor"></ueditor>
|
|
96
|
+
|
|
97
|
+ <ueditor ref="editor" id="editors" :content="new_content"></ueditor>
|
101
|
98
|
</div>
|
102
|
99
|
</div>
|
103
|
100
|
</div>
|
104
|
101
|
</div>
|
|
102
|
+
|
|
103
|
+
|
105
|
104
|
<el-dialog
|
106
|
105
|
title="设置模板"
|
107
|
106
|
:visible.sync="template_dialog"
|
|
@@ -109,36 +108,38 @@
|
109
|
108
|
center>
|
110
|
109
|
<div>
|
111
|
110
|
模板名称:
|
112
|
|
- <el-input v-model="template_name" placeholder="请输入内容" style="width: 160px;"></el-input>
|
|
111
|
+ <el-input v-model="title" placeholder="请输入内容" style="width: 160px;"></el-input>
|
113
|
112
|
</div>
|
114
|
113
|
<span slot="footer" class="dialog-footer">
|
115
|
114
|
<el-button @click="template_dialog = false">取 消</el-button>
|
116
|
|
- <el-button type="primary" @click="template_save">确 定</el-button>
|
|
115
|
+ <el-button type="primary" @click="saveTemplate">确 定</el-button>
|
117
|
116
|
</span>
|
118
|
117
|
</el-dialog>
|
119
|
118
|
<el-dialog
|
120
|
119
|
title="模板库"
|
121
|
120
|
:visible.sync="library_dialog"
|
122
|
121
|
width="70%"
|
123
|
|
- class="lirary "
|
|
122
|
+ class="lirary"
|
124
|
123
|
>
|
125
|
124
|
<div>
|
126
|
125
|
<div style="display: flex;">
|
127
|
126
|
<div style="width: 27%;">
|
128
|
127
|
<el-table
|
129
|
|
- :data="tableData"
|
|
128
|
+ :data="templateList"
|
130
|
129
|
:highlight-current-row="true"
|
131
|
130
|
@row-click="rowclick"
|
|
131
|
+ ref="record_table_one"
|
|
132
|
+ @current-change="getCurrentChangeTwo"
|
132
|
133
|
style="width: 100%">
|
133
|
|
- <el-table-column
|
134
|
|
- prop="index"
|
135
|
|
- label="序号"
|
136
|
|
- width="">
|
|
134
|
+ <el-table-column prop="index" label="序号" width="">
|
|
135
|
+ <template slot-scope="scope">
|
|
136
|
+ {{ scope.$index + 1 }}
|
|
137
|
+ </template>
|
137
|
138
|
</el-table-column>
|
138
|
|
- <el-table-column
|
139
|
|
- prop="name"
|
140
|
|
- label="模板名称"
|
141
|
|
- width="">
|
|
139
|
+ <el-table-column prop="name" label="模板名称" width="">
|
|
140
|
+ <template slot-scope="scope">
|
|
141
|
+ {{ scope.row.title }}
|
|
142
|
+ </template>
|
142
|
143
|
</el-table-column>
|
143
|
144
|
</el-table>
|
144
|
145
|
</div>
|
|
@@ -146,7 +147,7 @@
|
146
|
147
|
<div class="Second_title">模板内容</div>
|
147
|
148
|
<div style="">
|
148
|
149
|
<keep-alive>
|
149
|
|
- <ueditor ref="ue" :content="new_content" id="editor"></ueditor>
|
|
150
|
+ <ueditor ref="editorOne" id="editors" :content="new_content"></ueditor>
|
150
|
151
|
</keep-alive>
|
151
|
152
|
</div>
|
152
|
153
|
</div>
|
|
@@ -155,19 +156,16 @@
|
155
|
156
|
<span slot="footer" class="dialog-footer" style="text-align: center;">
|
156
|
157
|
<el-button type="danger" @click="template_dele">删除模板</el-button>
|
157
|
158
|
<el-button type="primary" @click="template_save">保存模板</el-button>
|
158
|
|
- <el-button type="primary" @click="template_save">应用</el-button>
|
|
159
|
+ <el-button type="primary" @click="toContentPint">应用</el-button>
|
159
|
160
|
<el-button @click="library_dialog = false">取消</el-button>
|
160
|
161
|
</span>
|
161
|
162
|
</el-dialog>
|
162
|
|
-
|
163
|
163
|
<el-dialog
|
164
|
164
|
title="提示"
|
165
|
165
|
:visible.sync="auto_dialog"
|
166
|
166
|
width="70%"
|
167
|
167
|
top="0"
|
168
|
|
- class="course"
|
169
|
|
-
|
170
|
|
- >
|
|
168
|
+ >
|
171
|
169
|
<div>
|
172
|
170
|
<div style="display:flex;position: absolute;top: 20px;left: 20%;">
|
173
|
171
|
<div>
|
|
@@ -207,18 +205,19 @@
|
207
|
205
|
</el-button>
|
208
|
206
|
</div>
|
209
|
207
|
</div>
|
210
|
|
- <div v-html="table"></div>
|
211
|
208
|
</div>
|
212
|
|
- <!-- <span slot="footer" class="dialog-footer">
|
213
|
|
- <el-button @click="auto_dialog = false">取 消</el-button>
|
214
|
|
- <el-button type="primary" @click="auto_dialog = false">确 定</el-button>
|
215
|
|
- </span> -->
|
|
209
|
+
|
216
|
210
|
</el-dialog>
|
217
|
211
|
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
218
|
217
|
</div>
|
219
|
218
|
</div>
|
220
|
219
|
|
221
|
|
- <!-- </div> -->
|
|
220
|
+
|
222
|
221
|
</template>
|
223
|
222
|
|
224
|
223
|
<script>
|
|
@@ -229,17 +228,20 @@
|
229
|
228
|
const moment = require('moment')
|
230
|
229
|
import { getDataConfig } from "@/utils/data";
|
231
|
230
|
import {
|
232
|
|
- createCourseOfDiseaseRecord,
|
233
|
|
- deleteCourseOfDiseaseRecords,
|
234
|
|
- getCourseOfDiseaseRecords,
|
|
231
|
+ createNewCourseOfDiseaseRecord,
|
|
232
|
+ deleteNewCouseOfDisease,
|
235
|
233
|
modifyCourseOfDiseaseRecord,
|
236
|
|
- GetCoursePrintData,
|
237
|
|
- getPatientDialysisInfor
|
|
234
|
+ getPatientCourseOfDiseaseList,
|
|
235
|
+ saveCoureseTemplateTitle,
|
|
236
|
+ getPatientCoureOfTempalate,
|
|
237
|
+ saveCourseOfNewTemplate,
|
|
238
|
+ deleteCourseTempalte,
|
|
239
|
+ getAutoPatientContent
|
238
|
240
|
} from '@/api/patient'
|
|
241
|
+ import { fetchAllDoctorAndNurse } from "@/api/doctor";
|
239
|
242
|
import { parseTime } from '@/utils'
|
240
|
243
|
import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
241
|
244
|
import { uParseTime } from '@/utils/tools'
|
242
|
|
- var ceshi = `asdfsafsfddf${ceshi}`
|
243
|
245
|
export default {
|
244
|
246
|
name: 'CourseOfDisease',
|
245
|
247
|
components: {
|
|
@@ -251,7 +253,6 @@
|
251
|
253
|
},
|
252
|
254
|
data() {
|
253
|
255
|
return {
|
254
|
|
- ceshi:2345,
|
255
|
256
|
loading: false,
|
256
|
257
|
title: '',
|
257
|
258
|
patient_id: 0,
|
|
@@ -277,8 +278,6 @@
|
277
|
278
|
ids:"",
|
278
|
279
|
idArr:[],
|
279
|
280
|
org_id:0,
|
280
|
|
-
|
281
|
|
-
|
282
|
281
|
add_index:0,
|
283
|
282
|
disabled:true,
|
284
|
283
|
template_dialog:false,
|
|
@@ -287,16 +286,22 @@
|
287
|
286
|
quzhi_date:1,
|
288
|
287
|
start_date:'',
|
289
|
288
|
end_date:'',
|
290
|
|
- quzhi_options:[{value:1,label:'本周'},{value:2,label:'上周'},{value:3,label:'本月'},{value:4,label:'上月'},],
|
291
|
|
- tableData:[{index:1,date:'2024-11-12',doctor:'王启年'}],
|
292
|
|
- table:'',
|
293
|
|
- cesh:'',
|
|
289
|
+ quzhi_options:[{value:1,label:'本周'},{value:2,label:'上周'},{value:3,label:'本月'},{value:4,label:'上周'},],
|
|
290
|
+ tableData:[],
|
|
291
|
+ admin_user_id:0,
|
|
292
|
+ record_date:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
|
|
293
|
+ template_name:"",
|
|
294
|
+ id:0,
|
|
295
|
+ doctorOptions:[],
|
|
296
|
+ template_content:"",
|
|
297
|
+ template_id:0,
|
|
298
|
+ title:"",
|
|
299
|
+ templateList:[]
|
294
|
300
|
}
|
295
|
301
|
},
|
296
|
|
- beforeCreate(){
|
297
|
|
- // this.cesh =`asdfffgfdgadas${this.ceshi}`
|
298
|
|
- },
|
299
|
302
|
created() {
|
|
303
|
+ this.admin_user_id = this.$store.getters.xt_user.user.id
|
|
304
|
+
|
300
|
305
|
this.patient_id = parseInt(this.$route.query.id)
|
301
|
306
|
this.org_id = this.$store.getters.xt_user.template_info.org_id;
|
302
|
307
|
if (isNaN(this.patient_id) || this.patient_id <= 0) {
|
|
@@ -307,30 +312,128 @@
|
307
|
312
|
this.$router.push('/patients/patients')
|
308
|
313
|
return
|
309
|
314
|
}
|
310
|
|
- this.table = ceshi
|
311
|
|
- // var now = new Date()
|
312
|
|
- // this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
|
313
|
|
- // var nowDate = new Date()
|
314
|
|
- // var nowYear = nowDate.getFullYear()
|
315
|
|
- // var nowMonth = nowDate.getMonth() + 1
|
316
|
|
- // var nowDay = nowDate.getDate()
|
317
|
|
- // this.end_time =nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' +(nowDay < 10 ? '0' + nowDay : nowDay)
|
318
|
|
- // nowDate.setMonth(nowDate.getMonth() - 1)
|
319
|
|
- // nowYear = nowDate.getFullYear() -1
|
320
|
|
- // nowMonth = nowDate.getMonth() + 1
|
321
|
|
- // nowDay = nowDate.getDate()
|
322
|
|
- // this.start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' +(nowDay < 10 ? '0' + nowDay : nowDay)
|
323
|
|
- this.start_time = moment().month(moment().month() - 6).startOf('month').format('YYYY-MM-DD');
|
324
|
|
- console.log("start_time",this.start_time)
|
325
|
|
- this.end_time = moment().endOf('month').format('YYYY-MM-DD');
|
326
|
|
- console.log("end_time",this.end_time)
|
327
|
|
- this.requestCourseRecords()
|
|
315
|
+
|
|
316
|
+ this.fetchAllDoctorAndNurse()
|
|
317
|
+ this.getlist()
|
|
318
|
+
|
328
|
319
|
|
329
|
320
|
},
|
330
|
321
|
methods: {
|
|
322
|
+ datachange(val){
|
|
323
|
+ if(val ==1){
|
|
324
|
+ this.start_date = this.getFirstDayOfWeek(new Date())
|
|
325
|
+ this.end_date = this.getTime(new Date())
|
|
326
|
+ }else if(val ==2){
|
|
327
|
+ this.getlastweek(new Date())
|
|
328
|
+ }else if(val ==3){
|
|
329
|
+ this.start_date = this.getFirstDayOfMonth(new Date())
|
|
330
|
+ this.end_date = this.getTime(new Date())
|
|
331
|
+ }else if(val ==4){
|
|
332
|
+ this.getLastMonthFirstDay()
|
|
333
|
+ this.getLastMonthLastDay()
|
|
334
|
+ }
|
|
335
|
+ },
|
|
336
|
+ toContentPint(){
|
|
337
|
+ this.$refs.editor.contents = this.template_content
|
|
338
|
+ this.library_dialog = false
|
|
339
|
+ },
|
|
340
|
+ getCurrentChangeOne(val){
|
|
341
|
+ this.$refs.editor.contents = val.content
|
|
342
|
+ this.record_date = this.getTime(val.record_time)
|
|
343
|
+ this.id = val.id
|
|
344
|
+ },
|
|
345
|
+ getCurrentChangeTwo(val){
|
|
346
|
+
|
|
347
|
+ this.$refs.editorOne.contents = val.content
|
|
348
|
+ this.template_content = ""
|
|
349
|
+ this.template_content = val.content
|
|
350
|
+ this.template_id = val.id
|
|
351
|
+ },
|
|
352
|
+ template_dele(){
|
|
353
|
+ deleteCourseTempalte(this.template_id).then(response=>{
|
|
354
|
+ if(response.data.state == 1){
|
|
355
|
+ var msg = response.data.data.msg
|
|
356
|
+ this.$message.success("删除成功!")
|
|
357
|
+ this.library_dialog = false
|
|
358
|
+ this.getPatientCoureOfTempalateOne()
|
|
359
|
+ }
|
|
360
|
+ })
|
|
361
|
+ },
|
|
362
|
+ getPatientCoureOfTempalateOne(){
|
|
363
|
+
|
|
364
|
+ },
|
|
365
|
+ rowclick(){
|
|
366
|
+
|
|
367
|
+ },
|
|
368
|
+ prints(){
|
|
369
|
+
|
|
370
|
+ },
|
|
371
|
+ saveTemplate(){
|
|
372
|
+
|
|
373
|
+ var params = {
|
|
374
|
+ title:this.title,
|
|
375
|
+ content: this.$refs.editor.contents,
|
|
376
|
+ }
|
|
377
|
+ saveCoureseTemplateTitle(params).then(response=>{
|
|
378
|
+ if(response.data.state == 1){
|
|
379
|
+ var courseTemplate = response.data.data.courseTemplate
|
|
380
|
+ this.$message.success("保存成功!")
|
|
381
|
+ this.template_dialog = false
|
|
382
|
+ }
|
|
383
|
+ })
|
|
384
|
+ },
|
|
385
|
+ template_save(){
|
|
386
|
+ var params = {
|
|
387
|
+ template_id:this.template_id,
|
|
388
|
+ content:this.$refs.editorOne.contents
|
|
389
|
+ }
|
|
390
|
+
|
|
391
|
+ saveCourseOfNewTemplate(params).then(response=>{
|
|
392
|
+ if(response.data.state == 1){
|
|
393
|
+ var msg = response.data.data.msg
|
|
394
|
+ this.$message.success("保存成功")
|
|
395
|
+ this.library_dialog = false
|
|
396
|
+ }
|
|
397
|
+ })
|
|
398
|
+ },
|
|
399
|
+ getDocName(admin_user_id){
|
|
400
|
+ var user_name = ""
|
|
401
|
+ for(let i=0;i<this.doctorOptions.length;i++){
|
|
402
|
+ if(admin_user_id == this.doctorOptions[i].id){
|
|
403
|
+ user_name = this.doctorOptions[i].name
|
|
404
|
+ }
|
|
405
|
+ }
|
|
406
|
+ return user_name
|
|
407
|
+ },
|
|
408
|
+ getlist(){
|
|
409
|
+ var params = {
|
|
410
|
+ patient_id:this.patient_id
|
|
411
|
+ }
|
|
412
|
+ getPatientCourseOfDiseaseList(params).then(response=>{
|
|
413
|
+ if(response.data.state == 1){
|
|
414
|
+ var list = response.data.data.list
|
|
415
|
+ this.tableData = []
|
|
416
|
+ this.tableData = list
|
|
417
|
+
|
|
418
|
+ }
|
|
419
|
+ })
|
|
420
|
+ },
|
|
421
|
+ fetchAllDoctorAndNurse() {
|
|
422
|
+ fetchAllDoctorAndNurse().then(response => {
|
|
423
|
+ if (response.data.state == 1) {
|
|
424
|
+ this.doctorOptions= []
|
|
425
|
+ this.doctorOptions = response.data.data.doctors;
|
|
426
|
+ }
|
|
427
|
+ });
|
|
428
|
+ },
|
331
|
429
|
add_click(){
|
332
|
|
- this.add_index = 1
|
|
430
|
+ this.admin_user_id = ""
|
|
431
|
+ this.admin_user_id = this.$store.getters.xt_user.user.id
|
|
432
|
+ this.fetchAllDoctorAndNurse()
|
|
433
|
+ this.$refs.editor.contents = ""
|
|
434
|
+ this.id = 0
|
333
|
435
|
this.disabled = false
|
|
436
|
+ this.add_index = 1
|
334
|
437
|
},
|
335
|
438
|
showCancel(){
|
336
|
439
|
this.add_index = 0
|
|
@@ -339,6 +442,30 @@
|
339
|
442
|
showSave(){
|
340
|
443
|
this.add_index = 0
|
341
|
444
|
this.disabled = true
|
|
445
|
+ console.log("haaaaaaaaaaaaaaa",this.$refs)
|
|
446
|
+ this.new_content = this.$refs.editor.contents
|
|
447
|
+ if (this.new_content.length == 0) {
|
|
448
|
+ this.$message.error('请填写病程内容')
|
|
449
|
+ return
|
|
450
|
+ }
|
|
451
|
+ var params = {
|
|
452
|
+ id:this.id,
|
|
453
|
+ patient_id:this.patient_id,
|
|
454
|
+ record_date:this.record_date,
|
|
455
|
+ content:this.new_content,
|
|
456
|
+ admin_user_id:this.admin_user_id,
|
|
457
|
+ }
|
|
458
|
+ console.log("params",params)
|
|
459
|
+ createNewCourseOfDiseaseRecord(params).then(response => {
|
|
460
|
+ if(response.data.state == 1){
|
|
461
|
+ var msg = response.data.data.msg
|
|
462
|
+ this.$message.success("保存成功!")
|
|
463
|
+ this.getlist()
|
|
464
|
+ }
|
|
465
|
+
|
|
466
|
+ }).catch(error => {
|
|
467
|
+
|
|
468
|
+ })
|
342
|
469
|
},
|
343
|
470
|
template_click(){
|
344
|
471
|
console.log('this.add_index',this.add_index);
|
|
@@ -346,33 +473,27 @@
|
346
|
473
|
if(this.add_index ==0){
|
347
|
474
|
this.template_dialog = true
|
348
|
475
|
}else{
|
349
|
|
- this.library_dialog = true
|
350
|
|
- }
|
|
476
|
+ getPatientCoureOfTempalate().then(response=>{
|
|
477
|
+ if(response.data.state == 1){
|
|
478
|
+ this.library_dialog = true
|
|
479
|
+ this.templateList = response.data.data.templateList
|
|
480
|
+ console.log("hahhahahaha",this.$refs)
|
|
481
|
+ if(this.templateList!=null && this.templateList.length>0){
|
|
482
|
+ this.$refs.record_table_one.setCurrentRow(this.templateList[0])
|
|
483
|
+ }
|
|
484
|
+ console.log("haaaaaaaaaaaaa",this.templateList)
|
|
485
|
+
|
|
486
|
+ }
|
|
487
|
+ })
|
|
488
|
+
|
|
489
|
+ }
|
351
|
490
|
},
|
352
|
491
|
auto_click(){
|
353
|
|
- this.start_date = this.getFirstDayOfWeek(new Date())
|
354
|
|
- this.end_date = this.getTime(new Date())
|
355
|
492
|
this.auto_dialog = true
|
356
|
493
|
},
|
357
|
494
|
autotext_click(){
|
358
|
495
|
this.auto_dialog = false
|
359
|
496
|
},
|
360
|
|
- datachange(val){
|
361
|
|
- if(val ==1){
|
362
|
|
- this.start_date = this.getFirstDayOfWeek(new Date())
|
363
|
|
- this.end_date = this.getTime(new Date())
|
364
|
|
- }else if(val ==2){
|
365
|
|
- this.getlastweek(new Date())
|
366
|
|
- }else if(val ==3){
|
367
|
|
- this.start_date = this.getFirstDayOfMonth(new Date())
|
368
|
|
- this.end_date = this.getTime(new Date())
|
369
|
|
- }else if(val ==4){
|
370
|
|
- this.getLastMonthFirstDay()
|
371
|
|
- this.getLastMonthLastDay()
|
372
|
|
- }
|
373
|
|
- },
|
374
|
|
-
|
375
|
|
-
|
376
|
497
|
// 本周
|
377
|
498
|
getFirstDayOfWeek(date){
|
378
|
499
|
var weekday = date.getDay()
|
|
@@ -533,34 +654,30 @@
|
533
|
654
|
|
534
|
655
|
},
|
535
|
656
|
|
536
|
|
- createAction: function() {
|
537
|
|
- this.new_content = this.$refs.editor.content
|
538
|
|
- console.log("hhhhh2h3h232323232",this.new_content)
|
|
657
|
+ createAction() {
|
|
658
|
+ console.log("haaaaaaaaaaaaaaa",this.$refs)
|
|
659
|
+ this.new_content = this.$refs.editor.contents
|
|
660
|
+
|
539
|
661
|
if (this.new_content.length == 0) {
|
540
|
662
|
this.$message.error('请填写病程内容')
|
541
|
663
|
return
|
542
|
664
|
}
|
543
|
|
- this.uploading_new_record = true
|
544
|
|
-
|
545
|
|
- createCourseOfDiseaseRecord(this.patient_id, this.new_content, this.course_of_disease_time, this.title).then(rs => {
|
546
|
|
- this.uploading_new_record = false
|
547
|
|
- var resp = rs.data
|
548
|
|
- if (resp.state == 1) {
|
549
|
|
- this.records.unshift(resp.data.record)
|
550
|
|
- // this.$refs.record_table.setCurrentRow()
|
551
|
|
- // this.$refs.record_table.setCurrentRow(this.records[0])
|
552
|
|
- // this.current_select_record = this.records[0]
|
553
|
|
- this.show_dialog = false
|
554
|
|
- this.new_content = ''
|
555
|
|
- this.title = ''
|
556
|
|
-
|
557
|
|
- } else {
|
558
|
|
- this.$message.error(resp.msg)
|
559
|
|
- }
|
|
665
|
+ var params = {
|
|
666
|
+ id:this.id,
|
|
667
|
+ patient_id:this.patient_id,
|
|
668
|
+ record_date:this.record_date,
|
|
669
|
+ content:this.new_content,
|
|
670
|
+ admin_user_id:this.admin_user_id,
|
|
671
|
+ }
|
|
672
|
+ console.log("params",params)
|
|
673
|
+ createNewCourseOfDiseaseRecord(params).then(response => {
|
|
674
|
+ if(response.data.state == 1){
|
|
675
|
+ var msg = response.data.data.msg
|
|
676
|
+ this.$message.success("保存成功!")
|
|
677
|
+ }
|
560
|
678
|
|
561
|
679
|
}).catch(error => {
|
562
|
|
- this.uploading_new_record = false
|
563
|
|
- this.$message.error(error)
|
|
680
|
+
|
564
|
681
|
})
|
565
|
682
|
},
|
566
|
683
|
didSelectTemplate: function(templateContent) {
|
|
@@ -581,54 +698,33 @@
|
581
|
698
|
console.log("select23322332",this.ids)
|
582
|
699
|
this.selectingRows = selectRows
|
583
|
700
|
},
|
584
|
|
- deleteAction: function() {
|
585
|
|
- if (this.selectingRows.length == 0) {
|
586
|
|
- return
|
587
|
|
- }
|
588
|
|
- var ids = []
|
589
|
|
- for (let index = 0; index < this.selectingRows.length; index++) {
|
590
|
|
- const row = this.selectingRows[index]
|
591
|
|
- ids.push(row.id)
|
592
|
|
- }
|
593
|
|
- var ids_str = ids.join(',')
|
594
|
|
- this.loading = true
|
595
|
|
- deleteCourseOfDiseaseRecords(this.patient_id, ids_str).then(rs => {
|
596
|
|
- var resp = rs.data
|
597
|
|
- if (resp.state == 1) {
|
598
|
|
- for (let id_index = 0; id_index < ids.length; id_index++) {
|
599
|
|
- for (let record_index = 0; record_index < this.records.length; record_index++) {
|
600
|
|
- if (ids[id_index] == this.records[record_index].id) {
|
601
|
|
- this.records.splice(record_index, 1)
|
602
|
|
- break
|
603
|
|
- }
|
604
|
|
- }
|
|
701
|
+ deleteAction(){
|
|
702
|
+ if(this.id == 0){
|
|
703
|
+ this.$message.error("请选择要删除的信息!")
|
|
704
|
+ return false
|
|
705
|
+ }
|
|
706
|
+ this.$confirm('确定要取消吗?', '提示', {
|
|
707
|
+ confirmButtonText: '确定',
|
|
708
|
+ cancelButtonText: '取消',
|
|
709
|
+ type: 'warning'
|
|
710
|
+ }).then(() => {
|
|
711
|
+ deleteNewCouseOfDisease(this.id).then(response=>{
|
|
712
|
+ if (response.data.state==1) {
|
|
713
|
+ var msg = response.data.data.msg
|
|
714
|
+ this.$message.success("删除成功!")
|
|
715
|
+ this.getlist()
|
605
|
716
|
}
|
606
|
|
- this.selectingRows = []
|
607
|
|
- this.$message.success('已删除')
|
|
717
|
+ });
|
|
718
|
+ }).catch(() => {
|
608
|
719
|
|
609
|
|
- } else {
|
610
|
|
- this.$message.error(resp.msg)
|
611
|
|
- }
|
612
|
|
- this.loading = false
|
613
|
|
- }).catch(err => {
|
614
|
|
- this.loading = false
|
615
|
|
- this.$message.error(err)
|
616
|
|
- })
|
617
|
|
- }, startTimeChange(val) {
|
618
|
|
- this.requestCourseRecords()
|
619
|
|
- }, endTimeChange(val) {
|
620
|
|
- this.requestCourseRecords()
|
621
|
|
- }, showEdit() {
|
622
|
|
- if (this.table_current_index == -1) {
|
623
|
|
- this.$message.error('请选择要修改的病程内容')
|
624
|
|
- return
|
625
|
|
- }
|
626
|
|
- this.show_edit_dialog = true
|
627
|
|
- this.edit_course_of_disease_time = this.recordTime(this.records[this.table_current_index].record_time)
|
628
|
|
- this.edit_new_content = this.records[this.table_current_index].content
|
629
|
|
- this.edit_current_id = this.records[this.table_current_index].id
|
630
|
|
- this.edit_title = this.records[this.table_current_index].title
|
631
|
|
- this.$refs.record_table.setCurrentRow(null)
|
|
720
|
+ });
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+ },
|
|
724
|
+ showEdit() {
|
|
725
|
+
|
|
726
|
+ this.add_index =1
|
|
727
|
+ this.disabled = false
|
632
|
728
|
|
633
|
729
|
}, tableRow({ row, rowIndex }) {
|
634
|
730
|
// 把每一行的索引放进row
|
|
@@ -644,92 +740,6 @@
|
644
|
740
|
this.$router.push({ path: "/course/print?ids="+this.ids+"&patient_id="+this.patient_id});
|
645
|
741
|
|
646
|
742
|
},
|
647
|
|
- toAuto(){
|
648
|
|
-
|
649
|
|
- var params= {
|
650
|
|
- patient_id:parseInt(this.$route.query.id),
|
651
|
|
- record_date:this.course_of_disease_time.slice(0,10),
|
652
|
|
- }
|
653
|
|
- console.log("param2222owoowwow",params)
|
654
|
|
- getPatientDialysisInfor(params).then(response=>{
|
655
|
|
- if(response.data.state== 1){
|
656
|
|
- var patient = response.data.data.patient
|
657
|
|
- var prescription = response.data.data.prescription
|
658
|
|
- var predialysis_evaluation = response.data.data.assessmentBefor
|
659
|
|
- var dialysis_order = response.data.data.order
|
660
|
|
- var monitors = response.data.data.monitor
|
661
|
|
- var doctor_advices = response.data.data.advice
|
662
|
|
- var assessment_after_dislysis = response.data.data.afterDislysis
|
663
|
|
-
|
664
|
|
- var str_one = ""
|
665
|
|
- if(dialysis_order!=null){
|
666
|
|
- if(dialysis_order.puncture_nurse_id >0){
|
667
|
|
- str_one = "护士穿刺成功!"
|
668
|
|
- }
|
669
|
|
- }
|
670
|
|
-
|
671
|
|
- var total =0
|
672
|
|
- if(predialysis_evaluation!=null){
|
673
|
|
- total = (predialysis_evaluation.weight_before - predialysis_evaluation.dry_weight).toFixed(1)
|
674
|
|
- }
|
675
|
|
-
|
676
|
|
-
|
677
|
|
- var monitor_one =[]
|
678
|
|
- var monitor_two = []
|
679
|
|
- var monitor_three = []
|
680
|
|
-
|
681
|
|
- if(monitors!=null && monitors.length > 0){
|
682
|
|
- var monitor_one = monitors.sort(function (a,b) {
|
683
|
|
- return b.systolic_bp - a.systolic_bp
|
684
|
|
- })
|
685
|
|
- var monitor_two = monitors.sort(function (a,b) {
|
686
|
|
- return b.diastolic_bp - a.diastolic_bp
|
687
|
|
- })
|
688
|
|
-
|
689
|
|
- var monitor_three = monitors.sort(function (a,b) {
|
690
|
|
- return b.pulse_frequency - a.pulse_frequency
|
691
|
|
- })
|
692
|
|
-
|
693
|
|
- }
|
694
|
|
-
|
695
|
|
- var doc_str = ""
|
696
|
|
-
|
697
|
|
- if(doctor_advices!=null && doctor_advices.length > 0){
|
698
|
|
-
|
699
|
|
-
|
700
|
|
- for(let i=0;i<doctor_advices.length;i++){
|
701
|
|
- doc_str +=doctor_advices[i].advice_name +" "+doctor_advices[i].prescribing_number+doctor_advices[i].prescribing_number_unit+" "+doctor_advices[i].delivery_way
|
702
|
|
- }
|
703
|
|
- }
|
704
|
|
-
|
705
|
|
- if(predialysis_evaluation.blood_access_part_id == -2){
|
706
|
|
- predialysis_evaluation.blood_access_part_id = ""
|
707
|
|
- }
|
708
|
|
-
|
709
|
|
- var str = " 患者今日来我科行血液透析治疗,血管通路选择:"+predialysis_evaluation.blood_access_part_id+ " "+this.QueryOperaById(predialysis_evaluation.blood_access_part_opera_id) +",透析模式:"+this.getModeId(prescription.mode_id)+
|
710
|
|
- ",透前检查:"+predialysis_evaluation.internal_fistula +predialysis_evaluation.catheter + str_one +" "+ ",透析器:"+prescription.dialyzer_perfusion_apparatus + ",抗凝剂:"+this.GetAnticoagulant(prescription.anticoagulant) +",总量:"+prescription.anticoagulant_zongliang+"iu"+
|
711
|
|
- ",透前体重:"+predialysis_evaluation.weight_before+"kg"+",间期体重增长:"+total +"kg"+",目标脱水量:"+prescription.target_ultrafiltration +"ml" +",血流量:"+prescription.blood_flow_volume+"ml/min" + ",透析开始时间:"+this.getTime(dialysis_order.start_time) +",透析过程中血压波动,"+"最大收缩压:"+monitor_one[0].systolic_blood_pressure+"mmHg"+",最小收缩压:"+monitor_one[monitor_one.length-1].systolic_blood_pressure
|
712
|
|
- +"mmHg" +",最小舒张压:" +monitor_two[0].diastolic_blood_pressure+"mmHg" + ",最大舒张压:" + monitor_two[monitor_two.length-1].diastolic_blood_pressure +"mmHg" + ",最大脉搏:"+monitor_three[0].pulse_frequency+"次/分"+",最小脉搏:"+monitor_three[monitor_three.length-1].pulse_frequency+"次/分"+",透析结束时间:"+this.getTime(dialysis_order.end_time) +
|
713
|
|
- ",实际治疗时长:"+ assessment_after_dislysis.actual_treatment_hour +"时"+assessment_after_dislysis.actual_treatment_minute+"分" +",实际超滤量:"+assessment_after_dislysis.actual_ultrafiltration+"ml"+",透后体重:"+assessment_after_dislysis.weight_after+"kg"+",透析过程顺利,安全下机" + " "
|
714
|
|
- +",今日使用药品:"+doc_str +",患者下机后测血压,"+"收缩压:"+assessment_after_dislysis.systolic_blood_pressure+"mmHg"+",舒张压:"+assessment_after_dislysis.diastolic_blood_pressure+"mmHg"+",脉搏:"+assessment_after_dislysis.pulse_frequency +"次/分"
|
715
|
|
-
|
716
|
|
- console.log("str000000000000000000222o2o2",str)
|
717
|
|
- this.new_content =str
|
718
|
|
- }
|
719
|
|
- })
|
720
|
|
-
|
721
|
|
- },
|
722
|
|
-
|
723
|
|
- QueryOperaById(val){
|
724
|
|
- var blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
|
725
|
|
- var name = ""
|
726
|
|
- for(let i=0;i<blood_access_part_opera.length;i++){
|
727
|
|
- if(val == blood_access_part_opera[i].id){
|
728
|
|
- name = blood_access_part_opera[i].name
|
729
|
|
- }
|
730
|
|
- }
|
731
|
|
- return name
|
732
|
|
- },
|
733
|
743
|
getModeId(mode_id){
|
734
|
744
|
var mode_name = ""
|
735
|
745
|
if(mode_id == 1){
|
|
@@ -873,8 +883,28 @@
|
873
|
883
|
return anticoagulant_name
|
874
|
884
|
},
|
875
|
885
|
getTime (time) {
|
876
|
|
- return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
|
|
886
|
+ return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
|
877
|
887
|
},
|
|
888
|
+ getTimeOne (time) {
|
|
889
|
+ return uParseTime(time, '{y}-{m}-{d}')
|
|
890
|
+ },
|
|
891
|
+ getAutoPatientContent(){
|
|
892
|
+ if(this.start_date == ""){
|
|
893
|
+ this.$message.error("")
|
|
894
|
+ }
|
|
895
|
+ if(this.end_date == ""){
|
|
896
|
+ this.$message.error("")
|
|
897
|
+ }
|
|
898
|
+ var params = {
|
|
899
|
+ start_date:this.start_date,
|
|
900
|
+ end_date:this.end_date,
|
|
901
|
+ patient_id:this.patient_id,
|
|
902
|
+ }
|
|
903
|
+ getAutoPatientContent(params).then(response=>{
|
|
904
|
+
|
|
905
|
+ })
|
|
906
|
+
|
|
907
|
+ }
|
878
|
908
|
}
|
879
|
909
|
}
|
880
|
910
|
</script>
|