|
@@ -0,0 +1,556 @@
|
|
1
|
+<template>
|
|
2
|
+ <!-- <div class="main-contain">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb></bread-crumb>
|
|
5
|
+ </div> -->
|
|
6
|
+ <div class="patient-container">
|
|
7
|
+ <patient-sidebar :id="patient_id" defaultActive="3-1"></patient-sidebar>
|
|
8
|
+ <!-- <div class="app-container"> -->
|
|
9
|
+ <div v-loading="loading">
|
|
10
|
+ <div class="patient-app-container advice-container app-container">
|
|
11
|
+
|
|
12
|
+ <div>
|
|
13
|
+ <span style="margin-left: 10px;float:right;">
|
|
14
|
+ <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
|
|
15
|
+ @click="show_dialog = true">新增</el-button>
|
|
16
|
+
|
|
17
|
+ <el-button type="primary" icon="el-icon-edit-outline" size="small"
|
|
18
|
+ @click="showEdit">修改</el-button>
|
|
19
|
+ <el-button type="primary" icon="el-icon-printer" size="small"
|
|
20
|
+ @click="print">打印</el-button>
|
|
21
|
+ <el-button size="small" v-show="selectingRows.length > 0" type="danger"
|
|
22
|
+ @click="deleteAction">删除</el-button>
|
|
23
|
+ </span>
|
|
24
|
+ <!--<span class="filter_title">日期查询</span>-->
|
|
25
|
+ <!--<el-date-picker size="small" v-model="date" type="daterange" range-separator="至" start-placeholde="开始日期" end-placeholde="结束日期" value-format="timestamp" :clearable="false" @change="requestCourseRecords()"></el-date-picker>-->
|
|
26
|
+ </div>
|
|
27
|
+ <!--<div></div>-->
|
|
28
|
+ <div class="cell clearfix">
|
|
29
|
+ <label class="title"><span class="name">日期查询</span> : </label>
|
|
30
|
+ <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
|
|
31
|
+ type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
|
|
32
|
+ value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
|
|
33
|
+ <span class="">-</span>
|
|
34
|
+ <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
|
|
35
|
+ type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
|
|
36
|
+ value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
|
|
37
|
+ </div>
|
|
38
|
+ <div class="record">
|
|
39
|
+ <el-row :gutter="15">
|
|
40
|
+ <el-col :span="10">
|
|
41
|
+ <el-table :header-cell-style="{
|
|
42
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
43
|
+ color: '#606266'
|
|
44
|
+ }"
|
|
45
|
+ :row-style="{ color: '#303133' }" ref="record_table" :data="records"
|
|
46
|
+ border highlight-current-row @current-change="didChangeCurrentRecord"
|
|
47
|
+ @selection-change="didSelectionChange"
|
|
48
|
+ :row-class-name="tableRow"
|
|
49
|
+ @row-click="onRowClick"
|
|
50
|
+ >
|
|
51
|
+ <el-table-column type="selection" width="40" align="center"></el-table-column>
|
|
52
|
+ <el-table-column label="标题" align="center">
|
|
53
|
+ <template slot-scope="scope">
|
|
54
|
+ {{ scope.row.title}}
|
|
55
|
+ </template>
|
|
56
|
+ </el-table-column>
|
|
57
|
+ <el-table-column label="记录日期" align="center">
|
|
58
|
+ <template slot-scope="scope">
|
|
59
|
+ {{ recordTime(scope.row.record_time) }}
|
|
60
|
+ </template>
|
|
61
|
+ </el-table-column>
|
|
62
|
+ <el-table-column label="记录医生" align="center">
|
|
63
|
+ <template slot-scope="scope">
|
|
64
|
+ {{ doctorName(scope.row.recorder) }}
|
|
65
|
+ </template>
|
|
66
|
+ </el-table-column>
|
|
67
|
+ </el-table>
|
|
68
|
+ </el-col>
|
|
69
|
+ <el-col :span="14">
|
|
70
|
+ <div class="record_content_panel">
|
|
71
|
+ <div style="background-color:rgb(245, 247, 250)" class="title">病史详情</div>
|
|
72
|
+ <div class="content">
|
|
73
|
+ <span v-if="current_select_record" v-html="current_select_record.content">{{current_select_record.content }}</span>
|
|
74
|
+ <span v-else></span>
|
|
75
|
+ </div>
|
|
76
|
+ </div>
|
|
77
|
+ </el-col>
|
|
78
|
+ </el-row>
|
|
79
|
+ </div>
|
|
80
|
+ </div>
|
|
81
|
+ <!-- </div> -->
|
|
82
|
+ <el-dialog title="新增病史记录" width="70%" top="5vh" :visible.sync="show_dialog">
|
|
83
|
+ <div>
|
|
84
|
+ <div class="new_record_form">
|
|
85
|
+ <div class="cell clearfix">
|
|
86
|
+ <label class="title"><span class="name">病程标题</span> : </label>
|
|
87
|
+ <el-input v-model="title" style="width: 150px"></el-input>
|
|
88
|
+
|
|
89
|
+ <label class="title"><span class="name">日期</span> : </label>
|
|
90
|
+ <el-date-picker v-model="sick_history_time" prefix-icon="el-icon-date" :editable="false"
|
|
91
|
+ style="width: 150px;"
|
|
92
|
+ type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm:ss"
|
|
93
|
+ value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+ <label class="title"><span class="name">肾移植史</span> : </label>
|
|
97
|
+ <el-select style="width: 150px;" v-model="is_shenyizhishi" placeholder="选择肾移植史" @change="didSelectTemplate">
|
|
98
|
+ <el-option label="无" value="0"></el-option>
|
|
99
|
+ <el-option label="有" value="1"></el-option>
|
|
100
|
+ </el-select>
|
|
101
|
+ </div>
|
|
102
|
+
|
|
103
|
+ <div class="cell clearfix">
|
|
104
|
+
|
|
105
|
+ <label class="title"><span class="name">腹膜透析史</span> : </label>
|
|
106
|
+ <el-select style="width: 150px;" v-model="is_fumotouxishi" placeholder="选择腹膜透析史" @change="didSelectTemplate">
|
|
107
|
+ <el-option label="无" value="0"></el-option>
|
|
108
|
+ <el-option label="有" value="1"></el-option>
|
|
109
|
+ </el-select>
|
|
110
|
+
|
|
111
|
+ <label class="title"><span class="name">医生</span> : </label>
|
|
112
|
+ <el-select style="width: 100px;" v-model="doctor_id" placeholder="请选择医生">
|
|
113
|
+ <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
|
|
114
|
+ </el-select>
|
|
115
|
+
|
|
116
|
+ <label class="title"><span class="name">过敏药物</span> : </label>
|
|
117
|
+ <el-select style="width: 100px;" v-model="is_guominyaowu" placeholder="选择过敏药物" @change="didSelectTemplate">
|
|
118
|
+ <el-option label="无" value="0"></el-option>
|
|
119
|
+ <el-option label="有" value="1"></el-option>
|
|
120
|
+ </el-select>
|
|
121
|
+ <el-input v-if="is_guominyaowu == 1" v-model="guominyaowu_desc"></el-input>
|
|
122
|
+
|
|
123
|
+ </div>
|
|
124
|
+
|
|
125
|
+ <div class="cell clearfix">
|
|
126
|
+ <label class="title"><span class="name">病史模版</span> : </label>
|
|
127
|
+ <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
|
|
128
|
+ <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
|
|
129
|
+ :value="option.content"></el-option>
|
|
130
|
+ </el-select>
|
|
131
|
+ </div>
|
|
132
|
+
|
|
133
|
+ <div class="textarea_panel">
|
|
134
|
+ <keep-alive>
|
|
135
|
+ <editor ref="editor"
|
|
136
|
+ id="editors"
|
|
137
|
+ style="width: 600px"
|
|
138
|
+ v-bind:r_content="new_content"
|
|
139
|
+ >
|
|
140
|
+ </editor>
|
|
141
|
+ </keep-alive>
|
|
142
|
+ </div>
|
|
143
|
+
|
|
144
|
+ <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
|
|
145
|
+ <el-button @click="show_dialog = false">取消</el-button>
|
|
146
|
+ <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
|
|
147
|
+ @click="createAction" :loading="uploading_new_record">保存
|
|
148
|
+ </el-button>
|
|
149
|
+ </div>
|
|
150
|
+ </div>
|
|
151
|
+ </div>
|
|
152
|
+ </el-dialog>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+ <el-dialog title="修改病程记录" width="50%" top="5vh" :visible.sync="show_edit_dialog">
|
|
156
|
+ <div>
|
|
157
|
+ <div class="new_record_form">
|
|
158
|
+ <div class="cell clearfix">
|
|
159
|
+ <label class="title"><span class="name">病程日期</span> : </label>
|
|
160
|
+ <el-date-picker v-model="edit_course_of_disease_time" prefix-icon="el-icon-date" :editable="false"
|
|
161
|
+ style="width: 200px;"
|
|
162
|
+ type="datetime"
|
|
163
|
+ placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm:ss"
|
|
164
|
+ value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
|
165
|
+
|
|
166
|
+ <label class="title"><span class="name">日常病程</span> : </label>
|
|
167
|
+ <el-select v-model="select_template" placeholder="可选择病程模板" @change="didEditSelectTemplate">
|
|
168
|
+ <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
|
|
169
|
+ :value="option.content"></el-option>
|
|
170
|
+ </el-select>
|
|
171
|
+ </div>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+ <div class="cell clearfix" style="margin-top: 10px">
|
|
175
|
+ <label class="title"><span class="name">病程标题</span> : </label>
|
|
176
|
+ <el-input v-model="edit_title" style="width: 420px"></el-input>
|
|
177
|
+ </div>
|
|
178
|
+
|
|
179
|
+ <div class="textarea_panel">
|
|
180
|
+ <!--<el-input v-model="edit_new_content" type="textarea" rows="6" resize="none"></el-input>-->
|
|
181
|
+ <keep-alive>
|
|
182
|
+ <editor ref="edit_neditor"
|
|
183
|
+ id="edit_editor"
|
|
184
|
+ style="width: 600px"
|
|
185
|
+ v-bind:r_content="edit_new_content">
|
|
186
|
+ </editor>
|
|
187
|
+ </keep-alive>
|
|
188
|
+ </div>
|
|
189
|
+
|
|
190
|
+ <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
|
|
191
|
+ <el-button @click="show_edit_dialog = false">取消</el-button>
|
|
192
|
+ <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
|
|
193
|
+ @click="modifyAction" :loading="uploading_new_record">保存
|
|
194
|
+ </el-button>
|
|
195
|
+ </div>
|
|
196
|
+ </div>
|
|
197
|
+ </div>
|
|
198
|
+ </el-dialog>
|
|
199
|
+ </div>
|
|
200
|
+ </div>
|
|
201
|
+
|
|
202
|
+ <!-- </div> -->
|
|
203
|
+</template>
|
|
204
|
+
|
|
205
|
+<script>
|
|
206
|
+import PatientSidebar from './components/PatientSidebar'
|
|
207
|
+import Editor from '@/components/Editor'
|
|
208
|
+import { fetchAllDoctorAndNurse } from "@/api/doctor";
|
|
209
|
+
|
|
210
|
+import {
|
|
211
|
+ createCourseOfDiseaseRecord,
|
|
212
|
+ deleteCourseOfDiseaseRecords,
|
|
213
|
+ getCourseOfDiseaseRecords,
|
|
214
|
+ modifyCourseOfDiseaseRecord,
|
|
215
|
+ GetCoursePrintData
|
|
216
|
+} from '@/api/patient'
|
|
217
|
+import { parseTime } from '@/utils'
|
|
218
|
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
219
|
+
|
|
220
|
+export default {
|
|
221
|
+ name: 'CourseOfDisease',
|
|
222
|
+ components: {
|
|
223
|
+ PatientSidebar,
|
|
224
|
+ BreadCrumb,
|
|
225
|
+ Editor
|
|
226
|
+ },
|
|
227
|
+ data() {
|
|
228
|
+ return {
|
|
229
|
+ loading: false,
|
|
230
|
+ title: '',
|
|
231
|
+ patient_id: 0,
|
|
232
|
+ date: [],
|
|
233
|
+ start_time: '',
|
|
234
|
+ end_time: '',
|
|
235
|
+ sick_history_time: '',
|
|
236
|
+ is_shenyizhishi:'',
|
|
237
|
+ is_fumotouxishi:'',
|
|
238
|
+ is_guominyaowu:'',
|
|
239
|
+ guominyaowu_desc:"",
|
|
240
|
+ doctor_id:"",
|
|
241
|
+ doctorOptions:null,
|
|
242
|
+ records: [],
|
|
243
|
+ doctors: [],
|
|
244
|
+ current_select_record: null,
|
|
245
|
+ show_dialog: false,
|
|
246
|
+ show_edit_dialog: false,
|
|
247
|
+ uploading_new_record: false,
|
|
248
|
+ templates: this.$store.getters.configlist.sick_history,
|
|
249
|
+ new_content: '',
|
|
250
|
+ edit_new_content: '',
|
|
251
|
+ edit_course_of_disease_time: '',
|
|
252
|
+ selectingRows: [],
|
|
253
|
+ table_current_index: -1,
|
|
254
|
+ edit_current_id: 0,
|
|
255
|
+ edit_title: '',
|
|
256
|
+ ids:"",
|
|
257
|
+ idArr:[],
|
|
258
|
+ }
|
|
259
|
+ },
|
|
260
|
+ created() {
|
|
261
|
+ this.patient_id = parseInt(this.$route.query.id)
|
|
262
|
+ if (isNaN(this.patient_id) || this.patient_id <= 0) {
|
|
263
|
+ this.$notify.error({
|
|
264
|
+ title: '错误',
|
|
265
|
+ message: '无效的id'
|
|
266
|
+ })
|
|
267
|
+ this.$router.push('/patients/patients')
|
|
268
|
+ return
|
|
269
|
+ }
|
|
270
|
+ var now = new Date()
|
|
271
|
+ this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
|
|
272
|
+
|
|
273
|
+ var nowDate = new Date()
|
|
274
|
+ var nowYear = nowDate.getFullYear()
|
|
275
|
+ var nowMonth = nowDate.getMonth() + 1
|
|
276
|
+ var nowDay = nowDate.getDate()
|
|
277
|
+ this.end_time =
|
|
278
|
+ nowYear +
|
|
279
|
+ '-' +
|
|
280
|
+ (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
|
281
|
+ '-' +
|
|
282
|
+ (nowDay < 10 ? '0' + nowDay : nowDay)
|
|
283
|
+ nowDate.setMonth(nowDate.getMonth() - 1)
|
|
284
|
+ nowYear = nowDate.getFullYear()
|
|
285
|
+ nowMonth = nowDate.getMonth() + 1
|
|
286
|
+ nowDay = nowDate.getDate()
|
|
287
|
+ this.start_time =
|
|
288
|
+ nowYear +
|
|
289
|
+ '-' +
|
|
290
|
+ (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
|
291
|
+ '-' +
|
|
292
|
+ (nowDay < 10 ? '0' + nowDay : nowDay)
|
|
293
|
+
|
|
294
|
+ this.requestCourseRecords()
|
|
295
|
+ this.fetchAllDoctorAndNurse()
|
|
296
|
+
|
|
297
|
+ },
|
|
298
|
+ methods: {
|
|
299
|
+ fetchAllDoctorAndNurse() {
|
|
300
|
+ fetchAllDoctorAndNurse().then(response => {
|
|
301
|
+ if (response.data.state == 1) {
|
|
302
|
+ this.doctorOptions = response.data.data.doctors;
|
|
303
|
+ }
|
|
304
|
+ });
|
|
305
|
+ },
|
|
306
|
+ requestCourseRecords: function() {
|
|
307
|
+ this.loading = true
|
|
308
|
+ getCourseOfDiseaseRecords(this.patient_id, this.start_time, this.end_time).then(rs => {
|
|
309
|
+ this.loading = false
|
|
310
|
+ var resp = rs.data
|
|
311
|
+ if (resp.state == 1) {
|
|
312
|
+ this.current_select_record = null
|
|
313
|
+ this.records = resp.data.records
|
|
314
|
+ console.log("records232322332323232323223",this.records)
|
|
315
|
+ this.doctors = resp.data.doctors
|
|
316
|
+
|
|
317
|
+ } else {
|
|
318
|
+ this.$message.error(resp.msg)
|
|
319
|
+ }
|
|
320
|
+ }).catch(error => {
|
|
321
|
+ this.loading = false
|
|
322
|
+ this.$message.error(error)
|
|
323
|
+ })
|
|
324
|
+ },
|
|
325
|
+
|
|
326
|
+ didChangeCurrentRecord: function(record) {
|
|
327
|
+ this.current_select_record = record
|
|
328
|
+ },
|
|
329
|
+ recordTime: function(timestamp) {
|
|
330
|
+ var time = new Date(timestamp * 1000)
|
|
331
|
+ return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
|
|
332
|
+ },
|
|
333
|
+ doctorName: function(doctor_id) {
|
|
334
|
+ for (let index = 0; index < this.doctors.length; index++) {
|
|
335
|
+ const doctor = this.doctors[index]
|
|
336
|
+ if (doctor.id == doctor_id) {
|
|
337
|
+ return doctor.name
|
|
338
|
+ }
|
|
339
|
+ }
|
|
340
|
+ return ''
|
|
341
|
+ },
|
|
342
|
+ modifyAction: function() {
|
|
343
|
+
|
|
344
|
+ this.edit_new_content = this.$refs.edit_neditor.content
|
|
345
|
+ if (this.edit_new_content.length == 0) {
|
|
346
|
+ this.$message.error('请填写病程内容')
|
|
347
|
+ return
|
|
348
|
+ }
|
|
349
|
+ this.uploading_new_record = true
|
|
350
|
+ modifyCourseOfDiseaseRecord(this.patient_id, this.edit_new_content, this.edit_course_of_disease_time, this.edit_current_id, this.edit_title).then(rs => {
|
|
351
|
+ this.uploading_new_record = false
|
|
352
|
+ var resp = rs.data
|
|
353
|
+ if (resp.state == 1) {
|
|
354
|
+ this.records[this.table_current_index].content = resp.data.record.content
|
|
355
|
+ this.records[this.table_current_index].record_time = resp.data.record.record_time
|
|
356
|
+ this.records[this.table_current_index].recorder = resp.data.record.recorder
|
|
357
|
+ this.records[this.table_current_index].title = resp.data.record.title
|
|
358
|
+
|
|
359
|
+ this.show_edit_dialog = false
|
|
360
|
+ this.edit_new_content = ''
|
|
361
|
+ this.table_current_index = -1
|
|
362
|
+
|
|
363
|
+ } else {
|
|
364
|
+ this.table_current_index = -1
|
|
365
|
+ this.$message.error(resp.msg)
|
|
366
|
+ }
|
|
367
|
+
|
|
368
|
+ }).catch(error => {
|
|
369
|
+ this.table_current_index = -1
|
|
370
|
+ this.uploading_new_record = false
|
|
371
|
+ this.$message.error(error)
|
|
372
|
+ })
|
|
373
|
+
|
|
374
|
+ },
|
|
375
|
+
|
|
376
|
+ createAction: function() {
|
|
377
|
+ this.new_content = this.$refs.editor.content
|
|
378
|
+ console.log("hhhhh2h3h232323232",this.new_content)
|
|
379
|
+ if (this.new_content.length == 0) {
|
|
380
|
+ this.$message.error('请填写病程内容')
|
|
381
|
+ return
|
|
382
|
+ }
|
|
383
|
+ this.uploading_new_record = true
|
|
384
|
+
|
|
385
|
+ createCourseOfDiseaseRecord(this.patient_id, this.new_content, this.course_of_disease_time, this.title).then(rs => {
|
|
386
|
+ this.uploading_new_record = false
|
|
387
|
+ var resp = rs.data
|
|
388
|
+ if (resp.state == 1) {
|
|
389
|
+ this.records.unshift(resp.data.record)
|
|
390
|
+ // this.$refs.record_table.setCurrentRow()
|
|
391
|
+ // this.$refs.record_table.setCurrentRow(this.records[0])
|
|
392
|
+ // this.current_select_record = this.records[0]
|
|
393
|
+ this.show_dialog = false
|
|
394
|
+ this.new_content = ''
|
|
395
|
+ this.title = ''
|
|
396
|
+
|
|
397
|
+ } else {
|
|
398
|
+ this.$message.error(resp.msg)
|
|
399
|
+ }
|
|
400
|
+
|
|
401
|
+ }).catch(error => {
|
|
402
|
+ this.uploading_new_record = false
|
|
403
|
+ this.$message.error(error)
|
|
404
|
+ })
|
|
405
|
+ },
|
|
406
|
+ didSelectTemplate: function(templateContent) {
|
|
407
|
+ this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
|
|
408
|
+
|
|
409
|
+ }, didEditSelectTemplate: function(templateContent) {
|
|
410
|
+ this.edit_new_content = this.edit_new_content.length > 0 ? (this.edit_new_content + templateContent) : templateContent
|
|
411
|
+ },
|
|
412
|
+
|
|
413
|
+ didSelectionChange: function(selectRows) {
|
|
414
|
+
|
|
415
|
+ var arr = []
|
|
416
|
+ for(let i=0;i<selectRows.length;i++){
|
|
417
|
+ arr.push(selectRows[i].id)
|
|
418
|
+ }
|
|
419
|
+ var newArr = arr.join(',')
|
|
420
|
+ this.ids = newArr
|
|
421
|
+ console.log("select23322332",this.ids)
|
|
422
|
+ this.selectingRows = selectRows
|
|
423
|
+ },
|
|
424
|
+ deleteAction: function() {
|
|
425
|
+ if (this.selectingRows.length == 0) {
|
|
426
|
+ return
|
|
427
|
+ }
|
|
428
|
+ var ids = []
|
|
429
|
+ for (let index = 0; index < this.selectingRows.length; index++) {
|
|
430
|
+ const row = this.selectingRows[index]
|
|
431
|
+ ids.push(row.id)
|
|
432
|
+ }
|
|
433
|
+ var ids_str = ids.join(',')
|
|
434
|
+ this.loading = true
|
|
435
|
+ deleteCourseOfDiseaseRecords(this.patient_id, ids_str).then(rs => {
|
|
436
|
+ var resp = rs.data
|
|
437
|
+ if (resp.state == 1) {
|
|
438
|
+ for (let id_index = 0; id_index < ids.length; id_index++) {
|
|
439
|
+ for (let record_index = 0; record_index < this.records.length; record_index++) {
|
|
440
|
+ if (ids[id_index] == this.records[record_index].id) {
|
|
441
|
+ this.records.splice(record_index, 1)
|
|
442
|
+ break
|
|
443
|
+ }
|
|
444
|
+ }
|
|
445
|
+ }
|
|
446
|
+ this.selectingRows = []
|
|
447
|
+ this.$message.success('已删除')
|
|
448
|
+
|
|
449
|
+ } else {
|
|
450
|
+ this.$message.error(resp.msg)
|
|
451
|
+ }
|
|
452
|
+ this.loading = false
|
|
453
|
+ }).catch(err => {
|
|
454
|
+ this.loading = false
|
|
455
|
+ this.$message.error(err)
|
|
456
|
+ })
|
|
457
|
+ }, startTimeChange(val) {
|
|
458
|
+ this.requestCourseRecords()
|
|
459
|
+ }, endTimeChange(val) {
|
|
460
|
+ this.requestCourseRecords()
|
|
461
|
+ }, showEdit() {
|
|
462
|
+ if (this.table_current_index == -1) {
|
|
463
|
+ this.$message.error('请选择要修改的病程内容')
|
|
464
|
+ return
|
|
465
|
+ }
|
|
466
|
+ this.show_edit_dialog = true
|
|
467
|
+ this.edit_course_of_disease_time = this.recordTime(this.records[this.table_current_index].record_time)
|
|
468
|
+ this.edit_new_content = this.records[this.table_current_index].content
|
|
469
|
+ this.edit_current_id = this.records[this.table_current_index].id
|
|
470
|
+ this.edit_title = this.records[this.table_current_index].title
|
|
471
|
+ this.$refs.record_table.setCurrentRow(null)
|
|
472
|
+
|
|
473
|
+ }, tableRow({ row, rowIndex }) {
|
|
474
|
+ // 把每一行的索引放进row
|
|
475
|
+ row.index = rowIndex
|
|
476
|
+ }, onRowClick(row, event, column) {
|
|
477
|
+ this.table_current_index = row.index
|
|
478
|
+ },
|
|
479
|
+ print(){
|
|
480
|
+ // if (this.table_current_index == -1) {
|
|
481
|
+ // this.$message.error('请选择要打印的病程')
|
|
482
|
+ // return
|
|
483
|
+ // }
|
|
484
|
+ if(this.ids.length == 0){
|
|
485
|
+ this.$message.error('请选择要打印的病程')
|
|
486
|
+ return
|
|
487
|
+ }
|
|
488
|
+ this.$router.push({ path: "/course/print?ids="+this.ids+"&patient_id="+this.patient_id});
|
|
489
|
+ }
|
|
490
|
+ }
|
|
491
|
+}
|
|
492
|
+</script>
|
|
493
|
+
|
|
494
|
+<style rel="stylesheet/css" lang="scss" scoped>
|
|
495
|
+.container {
|
|
496
|
+ margin-left: 180px;
|
|
497
|
+ padding: 20px;
|
|
498
|
+ background: #fff;
|
|
499
|
+ min-height: calc(100vh - 173px);
|
|
500
|
+ margin-bottom: 15px;
|
|
501
|
+
|
|
502
|
+.record {
|
|
503
|
+ padding-top: 20px;
|
|
504
|
+}
|
|
505
|
+
|
|
506
|
+}
|
|
507
|
+.record_content_panel {
|
|
508
|
+ border-width: 1px;
|
|
509
|
+ border-style: solid;
|
|
510
|
+ border-color: #ebeef5;
|
|
511
|
+ min-height: 200px;
|
|
512
|
+
|
|
513
|
+.title {
|
|
514
|
+ font-size: 14px;
|
|
515
|
+ font-weight: 500;
|
|
516
|
+ color: #909399;
|
|
517
|
+ line-height: 44px;
|
|
518
|
+ height: 44px;
|
|
519
|
+ text-align: center;
|
|
520
|
+ border-bottom-width: 1px;
|
|
521
|
+ border-bottom-style: solid;
|
|
522
|
+ border-bottom-color: #ebeef5;
|
|
523
|
+}
|
|
524
|
+
|
|
525
|
+.content {
|
|
526
|
+ padding: 12px 15px;
|
|
527
|
+ font-size: 15px;
|
|
528
|
+ color: gray;
|
|
529
|
+ line-height: 22px;
|
|
530
|
+}
|
|
531
|
+
|
|
532
|
+}
|
|
533
|
+
|
|
534
|
+.new_record_form {
|
|
535
|
+
|
|
536
|
+/*/ / padding: 10 px, 25 px;*/
|
|
537
|
+
|
|
538
|
+.textarea_panel {
|
|
539
|
+ margin-top: 10px;
|
|
540
|
+}
|
|
541
|
+
|
|
542
|
+}
|
|
543
|
+</style>
|
|
544
|
+<style>
|
|
545
|
+.el-table td,
|
|
546
|
+.el-table th.is-leaf,
|
|
547
|
+.el-table--border,
|
|
548
|
+.el-table--group {
|
|
549
|
+ border-color: #d0d3da;
|
|
550
|
+}
|
|
551
|
+.el-table--border::after,
|
|
552
|
+.el-table--group::after,
|
|
553
|
+.el-table::before {
|
|
554
|
+ background-color: #d0d3da;
|
|
555
|
+}
|
|
556
|
+</style>
|