|
@@ -0,0 +1,373 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="patient-container">
|
|
3
|
+ <patient-sidebar :id="patientID" defaultActive="1-6" v-on:tran-patient="onTranPatient"></patient-sidebar>
|
|
4
|
+ <div class="patient-app-container advice-container app-container">
|
|
5
|
+ <div class="cell clearfix">
|
|
6
|
+ <span>血管通路列表</span>
|
|
7
|
+ <el-button size="medium" type="primary" @click="dialogVisible =true" style="margin-left:800px" >新增</el-button>
|
|
8
|
+ </div>
|
|
9
|
+ <el-table :data="tableData" border style="width:100%">
|
|
10
|
+ <el-table-column prop="start_time" label="建立日期" width="150" align="center">
|
|
11
|
+ <template slot-scope="scope">
|
|
12
|
+ <span>{{ getTime(scope.row.start_time, "{y}-{m}-{d}")}}</span>
|
|
13
|
+ </template>
|
|
14
|
+ </el-table-column>
|
|
15
|
+ <el-table-column prop="blood_access_part_opera_id" label="血管通路" align="center">
|
|
16
|
+ <template slot-scope="scope">
|
|
17
|
+ <span>{{scope.row.blood_access_part_opera_id}}</span>
|
|
18
|
+ </template>
|
|
19
|
+ </el-table-column>
|
|
20
|
+ <el-table-column prop="inflow_pass" label="流入-流出道" align="center">
|
|
21
|
+ <template slot-scope="scope">
|
|
22
|
+ <span>{{scope.row.inflow_pass}}</span>
|
|
23
|
+ </template>
|
|
24
|
+ </el-table-column>
|
|
25
|
+ <el-table-column prop="date" label="首次启用日期" width="200" align="center">
|
|
26
|
+ <template slot-scope="scope">
|
|
27
|
+ <span>{{ getTime(scope.row.first_start_time, "{y}-{m}-{d}")}}</span>
|
|
28
|
+ </template>
|
|
29
|
+ </el-table-column>
|
|
30
|
+ <el-table-column prop="date" label="默认到处方" align="center">
|
|
31
|
+ <template slot-scope="scope">
|
|
32
|
+ <span v-if="scope.row.user_status == 1">启用</span>
|
|
33
|
+ <span v-if="scope.row.user_status == 2">停用</span>
|
|
34
|
+ </template>
|
|
35
|
+ </el-table-column>
|
|
36
|
+ <el-table-column prop="date" label="停用日期" align="center">
|
|
37
|
+ <template slot-scope="scope">
|
|
38
|
+
|
|
39
|
+ </template>
|
|
40
|
+ </el-table-column>
|
|
41
|
+ <el-table-column prop="date" label="停用原因" align="center">
|
|
42
|
+ <template slot-scope="scope">
|
|
43
|
+
|
|
44
|
+ </template>
|
|
45
|
+ </el-table-column>
|
|
46
|
+ <el-table-column prop="date" label="使用寿命(天)" align="center">
|
|
47
|
+ <template slot-scope="scope">
|
|
48
|
+
|
|
49
|
+ </template>
|
|
50
|
+ </el-table-column>
|
|
51
|
+ <el-table-column prop="date" label="备注" align="center">
|
|
52
|
+ <template slot-scope="scope">
|
|
53
|
+
|
|
54
|
+ </template>
|
|
55
|
+ </el-table-column>
|
|
56
|
+ <el-table-column prop="date" label="创始人" align="center">
|
|
57
|
+ <template slot-scope="scope">
|
|
58
|
+
|
|
59
|
+ </template>
|
|
60
|
+ </el-table-column>
|
|
61
|
+ <el-table-column prop="date" label="操作" align="center">
|
|
62
|
+ <template slot-scope="scope">
|
|
63
|
+
|
|
64
|
+ </template>
|
|
65
|
+ </el-table-column>
|
|
66
|
+ </el-table>
|
|
67
|
+ <el-pagination
|
|
68
|
+ @size-change="handleSizeChange"
|
|
69
|
+ @current-change="handleCurrentChange"
|
|
70
|
+ :page-sizes="[10,20,50,100]"
|
|
71
|
+ :page-size="10"
|
|
72
|
+ background
|
|
73
|
+ style="margin-top:20px;"
|
|
74
|
+ align="right"
|
|
75
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
76
|
+ :total="total"></el-pagination>
|
|
77
|
+
|
|
78
|
+ <el-dialog
|
|
79
|
+ title="新增通路"
|
|
80
|
+ :visible.sync="dialogVisible"
|
|
81
|
+ width="60%"
|
|
82
|
+ center>
|
|
83
|
+ <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
|
|
84
|
+ <el-row :gutter="24">
|
|
85
|
+ <el-col :span="24">
|
|
86
|
+ <el-form-item label="通路项目:" :required="true" prop="access_project">
|
|
87
|
+ <el-radio v-model="form.access_project" label="1">内瘘</el-radio>
|
|
88
|
+ <el-radio v-model="form.access_project" label="2">导管</el-radio>
|
|
89
|
+ </el-form-item>
|
|
90
|
+ </el-col>
|
|
91
|
+ </el-row>
|
|
92
|
+ <el-row :gutter="24">
|
|
93
|
+ <el-col :span="8">
|
|
94
|
+ <el-form-item label="建立日期:" :required="true" prop="start_time">
|
|
95
|
+ <el-date-picker
|
|
96
|
+ type="datetime"
|
|
97
|
+ format="yyyy-MM-dd"
|
|
98
|
+ value-format="yyyy-MM-dd"
|
|
99
|
+ placeholder="选择时间"
|
|
100
|
+ v-model="form.start_time"
|
|
101
|
+ style="width:150px">
|
|
102
|
+ </el-date-picker>
|
|
103
|
+ </el-form-item>
|
|
104
|
+ </el-col>
|
|
105
|
+ <el-col :span="8">
|
|
106
|
+ <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
|
|
107
|
+ <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择" style="width:150px">
|
|
108
|
+ <el-option
|
|
109
|
+ v-for="item in blood_access_part_opera"
|
|
110
|
+ :key="item.id"
|
|
111
|
+ :label="item.name"
|
|
112
|
+ :value="item.id"
|
|
113
|
+ >
|
|
114
|
+ </el-option>
|
|
115
|
+ </el-select>
|
|
116
|
+ </el-form-item>
|
|
117
|
+ </el-col>
|
|
118
|
+ <el-col :span="8">
|
|
119
|
+ <el-form-item label="血管通路部位:" :required="true" prop="blood_access_part_id">
|
|
120
|
+ <el-select v-model="form.blood_access_part_id" placeholder="请选择" style="width:150px">
|
|
121
|
+ <el-option
|
|
122
|
+ v-for="item in blood_access_part"
|
|
123
|
+ :key="item.id"
|
|
124
|
+ :label="item.name"
|
|
125
|
+ :value="item.id">
|
|
126
|
+ </el-option>
|
|
127
|
+ </el-select>
|
|
128
|
+ </el-form-item>
|
|
129
|
+ </el-col>
|
|
130
|
+ </el-row>
|
|
131
|
+ <el-row :gutter="24">
|
|
132
|
+ <el-col :span="8">
|
|
133
|
+ <el-form-item label="流入-流出道:" :required="true" prop="inflow_pass">
|
|
134
|
+ <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
|
|
135
|
+ <el-option
|
|
136
|
+ v-for="item in optionsPass"
|
|
137
|
+ :key="item.id"
|
|
138
|
+ :label="item.name"
|
|
139
|
+ :value="item.id">
|
|
140
|
+ </el-option>
|
|
141
|
+ </el-select>
|
|
142
|
+ </el-form-item>
|
|
143
|
+ </el-col>
|
|
144
|
+ <el-col :span="8">
|
|
145
|
+ <el-form-item label="首次启用日期:" :required="true" prop="first_start_time">
|
|
146
|
+ <el-date-picker
|
|
147
|
+ type="datetime"
|
|
148
|
+ format="yyyy-MM-dd"
|
|
149
|
+ value-format="yyyy-MM-dd"
|
|
150
|
+ placeholder="选择时间"
|
|
151
|
+ v-model="form.first_start_time"
|
|
152
|
+ style="width:150px">
|
|
153
|
+ </el-date-picker>
|
|
154
|
+ </el-form-item>
|
|
155
|
+ </el-col>
|
|
156
|
+ <el-col :span="8">
|
|
157
|
+ <el-form-item label="使用状态:" :required="true" prop="user_status">
|
|
158
|
+ <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus">
|
|
159
|
+ <el-option
|
|
160
|
+ v-for="item in options"
|
|
161
|
+ :key="item.id"
|
|
162
|
+ :label="item.name"
|
|
163
|
+ :value="item.id">
|
|
164
|
+ </el-option>
|
|
165
|
+ </el-select>
|
|
166
|
+ </el-form-item>
|
|
167
|
+ </el-col>
|
|
168
|
+ </el-row>
|
|
169
|
+ <el-row v-show="show">
|
|
170
|
+ <el-col>
|
|
171
|
+ <el-form-item label="停用原因:">
|
|
172
|
+ <el-input v-model="form.stop_reason"></el-input>
|
|
173
|
+ </el-form-item>
|
|
174
|
+ </el-col>
|
|
175
|
+ </el-row>
|
|
176
|
+ <el-row>
|
|
177
|
+ <el-col>
|
|
178
|
+ <el-form-item label="备注:">
|
|
179
|
+ <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
|
|
180
|
+ </el-form-item>
|
|
181
|
+ </el-col>
|
|
182
|
+ </el-row>
|
|
183
|
+ </el-form>
|
|
184
|
+
|
|
185
|
+ <span slot="footer" class="dialog-footer">
|
|
186
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
187
|
+ <el-button type="primary" @click="saveVasularAccess('form')">保存</el-button>
|
|
188
|
+ </span>
|
|
189
|
+ </el-dialog>
|
|
190
|
+
|
|
191
|
+ </div>
|
|
192
|
+ </div>
|
|
193
|
+</template>
|
|
194
|
+<script>
|
|
195
|
+ const moment = require('moment')
|
|
196
|
+ import PatientSidebar from './components/PatientSidebar'
|
|
197
|
+ import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
|
|
198
|
+ import { saveVasularAccess,getAllVascularAccessList } from '@/api/patient'
|
|
199
|
+
|
|
200
|
+ import { jsGetAge, uParseTime } from '@/utils/tools'
|
|
201
|
+ import { getDataConfig } from '@/utils/data'
|
|
202
|
+ export default {
|
|
203
|
+ name: 'doctorAdvice',
|
|
204
|
+ components: {
|
|
205
|
+ PatientSidebar,
|
|
206
|
+ },
|
|
207
|
+ data() {
|
|
208
|
+ return {
|
|
209
|
+ tableData: [],
|
|
210
|
+ nowtime: moment(new Date()).format('YYYY-MM-DD'),
|
|
211
|
+ page: 1,
|
|
212
|
+ limit: 10,
|
|
213
|
+ total: 0,
|
|
214
|
+ rules: {
|
|
215
|
+ start_time: [{ required: true, message: '请输入建立日期' }],
|
|
216
|
+ access_project: [{ required: true, message: '请选择通路项目' }],
|
|
217
|
+ blood_access_part_opera_id:[{required:true,message:'请选择血管通路类型'}],
|
|
218
|
+ blood_access_part_id:[{required:true,message:"请选择血管通路"}],
|
|
219
|
+ inflow_pass:[{required:true,message:"请选择流入-流出道"}],
|
|
220
|
+ first_start_time:[{required:true,message:"请选择首次启用日期"}],
|
|
221
|
+ user_status:[{required:true,message:"请选择使用状态"}]
|
|
222
|
+ },
|
|
223
|
+ dialogVisible:false,
|
|
224
|
+ form:{
|
|
225
|
+ access_project:"1",
|
|
226
|
+ blood_access_part_id:"",
|
|
227
|
+ blood_access_part_opera_id:"",
|
|
228
|
+ inflow_pass:"",
|
|
229
|
+ start_time:"",
|
|
230
|
+ first_start_time:"",
|
|
231
|
+ stop_reason:"",
|
|
232
|
+ user_status:"",
|
|
233
|
+ remark:""
|
|
234
|
+ },
|
|
235
|
+ options:[
|
|
236
|
+ {id:1,name:"启用"},
|
|
237
|
+ {id:2,name:"停用"}
|
|
238
|
+ ],
|
|
239
|
+ optionsPass:[
|
|
240
|
+ {id:1,name:"流入-动脉"},
|
|
241
|
+ {id:2,name:"流出-静脉"},
|
|
242
|
+ ],
|
|
243
|
+ blood_access_part_opera:[],
|
|
244
|
+ blood_access_part:[],
|
|
245
|
+ show:false
|
|
246
|
+ }
|
|
247
|
+ },
|
|
248
|
+ methods: {
|
|
249
|
+ clickuseradvicecell(row, column, cell, event) {
|
|
250
|
+ },
|
|
251
|
+ onTranPatient: function(tranPatient) {
|
|
252
|
+ this.currentPatient = tranPatient
|
|
253
|
+ },
|
|
254
|
+ CreateTime(time) {
|
|
255
|
+ return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
|
|
256
|
+ },
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+ handleSizeChange(limit) {
|
|
262
|
+ this.limit = limit
|
|
263
|
+ const id = this.$route.params && this.$route.params.id
|
|
264
|
+
|
|
265
|
+ },
|
|
266
|
+ handleCurrentChange(page) {
|
|
267
|
+ this.page = page
|
|
268
|
+ const id = this.$route.params && this.$route.params.id
|
|
269
|
+
|
|
270
|
+ },
|
|
271
|
+ changeStatus(val){
|
|
272
|
+ if(val == 1 ){
|
|
273
|
+ this.show = false
|
|
274
|
+ }
|
|
275
|
+ if(val == 2){
|
|
276
|
+ this.show = true
|
|
277
|
+ }
|
|
278
|
+ },
|
|
279
|
+ saveVasularAccess(formName){
|
|
280
|
+ this.$refs[formName].validate((valid)=>{
|
|
281
|
+ if(valid){
|
|
282
|
+ var blood_name = ""
|
|
283
|
+ for(let i=0;i<this.blood_access_part_opera.length;i++){
|
|
284
|
+ if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
|
|
285
|
+ blood_name = this.blood_access_part_opera[i].name
|
|
286
|
+ }
|
|
287
|
+ }
|
|
288
|
+ var blood_part = ""
|
|
289
|
+ for(let i=0;i<this.blood_access_part.length;i++){
|
|
290
|
+ if(this.form.blood_access_part_id == this.blood_access_part[i].id){
|
|
291
|
+ blood_part = this.blood_access_part[i].name
|
|
292
|
+ }
|
|
293
|
+ }
|
|
294
|
+ var inflow_pass = ""
|
|
295
|
+ for(let i=0;i<this.optionsPass.length;i++){
|
|
296
|
+ if(this.optionsPass[i].id == this.form.inflow_pass){
|
|
297
|
+ inflow_pass = this.optionsPass[i].name
|
|
298
|
+ }
|
|
299
|
+ }
|
|
300
|
+ var params = {
|
|
301
|
+ access_project:parseInt(this.form.access_project),
|
|
302
|
+ start_time:this.form.start_time,
|
|
303
|
+ blood_access_part_opera_id:blood_name,
|
|
304
|
+ blood_access_part_id:blood_part,
|
|
305
|
+ inflow_pass:inflow_pass,
|
|
306
|
+ first_start_time:this.form.first_start_time,
|
|
307
|
+ user_status:this.form.user_status,
|
|
308
|
+ stop_reason:this.form.stop_reason,
|
|
309
|
+ remark:this.form.remark,
|
|
310
|
+ }
|
|
311
|
+ console.log("params",params)
|
|
312
|
+ saveVasularAccess(params).then(response=>{
|
|
313
|
+ if(response.data.state == 1){
|
|
314
|
+ var access = response.data.data.access
|
|
315
|
+ console.log("access",access)
|
|
316
|
+ this.$message.success("保存成功")
|
|
317
|
+ this.dialogVisible = false
|
|
318
|
+
|
|
319
|
+ }
|
|
320
|
+ })
|
|
321
|
+ }
|
|
322
|
+ })
|
|
323
|
+ },
|
|
324
|
+ getlist(){
|
|
325
|
+ var params = {
|
|
326
|
+ page:this.page,
|
|
327
|
+ limit:this.limit,
|
|
328
|
+ }
|
|
329
|
+ getAllVascularAccessList(params).then(response=>{
|
|
330
|
+ if(response.data.state == 1){
|
|
331
|
+ var list = response.data.data.list
|
|
332
|
+ console.log("list",list)
|
|
333
|
+ this.tableData = list
|
|
334
|
+ var total = response.data.data.total
|
|
335
|
+ console.log("total",total)
|
|
336
|
+ this.total = total
|
|
337
|
+ }
|
|
338
|
+ })
|
|
339
|
+ },
|
|
340
|
+ getTime(value, temp) {
|
|
341
|
+ if (value != undefined) {
|
|
342
|
+ return uParseTime(value, temp);
|
|
343
|
+ }
|
|
344
|
+ return "";
|
|
345
|
+ },
|
|
346
|
+ },
|
|
347
|
+ created() {
|
|
348
|
+ const id = this.$route.params && this.$route.params.id
|
|
349
|
+ console.log('id是设么', id)
|
|
350
|
+ this.patientID = parseInt(id)
|
|
351
|
+
|
|
352
|
+ //血管通路
|
|
353
|
+ this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
|
|
354
|
+ console.log("血管通路",this.blood_access_part_opera)
|
|
355
|
+ //血管通路部位
|
|
356
|
+ this.blood_access_part = getDataConfig('hemodialysis', 'vascular_access')
|
|
357
|
+ console.log("血管通路部位",this.blood_access_part)
|
|
358
|
+ this.getlist()
|
|
359
|
+ }
|
|
360
|
+ }
|
|
361
|
+</script>
|
|
362
|
+
|
|
363
|
+<style>
|
|
364
|
+ #oictable ::-webkit-scrollbar {
|
|
365
|
+ height: 15px;
|
|
366
|
+ }
|
|
367
|
+</style>
|
|
368
|
+
|
|
369
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+</style>
|
|
373
|
+
|