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