|
@@ -53,6 +53,30 @@
|
53
|
53
|
:rows="5"
|
54
|
54
|
></el-input>
|
55
|
55
|
</el-form-item>
|
|
56
|
+ <div v-if="isShow('透析护理记录')">
|
|
57
|
+ <el-form-item label="透析护理记录:">
|
|
58
|
+ <el-input
|
|
59
|
+ class="newTextarea treatmentInput"
|
|
60
|
+ @focus="lastInputFocus"
|
|
61
|
+ @blur="lastInputBlur"
|
|
62
|
+ type="textarea"
|
|
63
|
+ v-model="dialysisSummary.nursing_record"
|
|
64
|
+ :rows="5"
|
|
65
|
+ ></el-input>
|
|
66
|
+ </el-form-item>
|
|
67
|
+ </div>
|
|
68
|
+ <div v-if="isShow('特殊记录')">
|
|
69
|
+ <el-form-item label="特殊记录:">
|
|
70
|
+ <el-input
|
|
71
|
+ class="newTextarea treatmentInput"
|
|
72
|
+ @focus="lastInputFocus"
|
|
73
|
+ @blur="lastInputBlur"
|
|
74
|
+ type="textarea"
|
|
75
|
+ v-model="dialysisSummary.special_record"
|
|
76
|
+ :rows="5"
|
|
77
|
+ ></el-input>
|
|
78
|
+ </el-form-item>
|
|
79
|
+ </div>
|
56
|
80
|
</el-form>
|
57
|
81
|
<!-- <div class="button">
|
58
|
82
|
<button @click="commitInfo" class="submitButton">提交</button>
|
|
@@ -75,14 +99,14 @@ import { Toast } from "vant";
|
75
|
99
|
import CheckBoxSubMenu from "./subMenu/checkBoxSubMenu";
|
76
|
100
|
import { getDataConfig } from "@/utils/data";
|
77
|
101
|
|
78
|
|
-import request from '@/utils/request'
|
|
102
|
+import request from "@/utils/request";
|
79
|
103
|
|
80
|
104
|
export default {
|
81
|
105
|
name: "TreatmentDialog",
|
82
|
106
|
data() {
|
83
|
107
|
return {
|
84
|
|
- showTxt:'',
|
85
|
|
- hasPermission:true,
|
|
108
|
+ showTxt: "",
|
|
109
|
+ hasPermission: true,
|
86
|
110
|
isShowDialog: true,
|
87
|
111
|
|
88
|
112
|
visibility: false,
|
|
@@ -91,8 +115,8 @@ export default {
|
91
|
115
|
list: [],
|
92
|
116
|
optionList: [],
|
93
|
117
|
isMultiple: 2,
|
94
|
|
- result: [], //选中的值
|
95
|
|
- type: 1, //用来区分不同子菜单,方便对返回值进行赋值
|
|
118
|
+ result: [], // 选中的值
|
|
119
|
+ type: 1, // 用来区分不同子菜单,方便对返回值进行赋值
|
96
|
120
|
selectId: 0
|
97
|
121
|
},
|
98
|
122
|
|
|
@@ -107,7 +131,9 @@ export default {
|
107
|
131
|
treatNurse: "",
|
108
|
132
|
checkStaff: "",
|
109
|
133
|
deboardNurse: "",
|
110
|
|
- treatDoctor: ""
|
|
134
|
+ treatDoctor: "",
|
|
135
|
+ nursing_record: "",
|
|
136
|
+ special_record: ""
|
111
|
137
|
},
|
112
|
138
|
summary: [],
|
113
|
139
|
summaryObj: {},
|
|
@@ -129,7 +155,7 @@ export default {
|
129
|
155
|
}
|
130
|
156
|
},
|
131
|
157
|
created() {
|
132
|
|
- this.getPermission()
|
|
158
|
+ this.getPermission();
|
133
|
159
|
// this.summary = this.$store.getters.summary;
|
134
|
160
|
this.summary = getDataConfig("summary", "summary");
|
135
|
161
|
// console.log("this.summary",this.summary)
|
|
@@ -250,8 +276,8 @@ export default {
|
250
|
276
|
},
|
251
|
277
|
|
252
|
278
|
dialysisSummarySelectChange: function(values) {
|
253
|
|
- if(this.dialysisSummary.summaryContent == null){
|
254
|
|
- this.dialysisSummary.summaryContent == ""
|
|
279
|
+ if (this.dialysisSummary.summaryContent == null) {
|
|
280
|
+ this.dialysisSummary.summaryContent == "";
|
255
|
281
|
}
|
256
|
282
|
|
257
|
283
|
if (this.dialysisSummary.summaryContent == "") {
|
|
@@ -267,21 +293,29 @@ export default {
|
267
|
293
|
this.dialysisSummary.summaryContent + "," + values;
|
268
|
294
|
} else {
|
269
|
295
|
this.dialysisSummary.summaryContent =
|
270
|
|
- this.dialysisSummary.summaryContent + values;
|
|
296
|
+ this.dialysisSummary.summaryContent + values;
|
271
|
297
|
}
|
272
|
298
|
}
|
273
|
299
|
}
|
274
|
300
|
},
|
275
|
301
|
dialysisAfterTeachSelectChange: function(values) {
|
276
|
|
- if(this.dialysisSummary.propagandaAndEducationContent == null){
|
277
|
|
- this.dialysisSummary.propagandaAndEducationContent == ""
|
|
302
|
+ if (this.dialysisSummary.propagandaAndEducationContent == null) {
|
|
303
|
+ this.dialysisSummary.propagandaAndEducationContent == "";
|
278
|
304
|
}
|
279
|
305
|
if (this.dialysisSummary.propagandaAndEducationContent == "") {
|
280
|
306
|
this.dialysisSummary.propagandaAndEducationContent = values;
|
281
|
307
|
} else {
|
282
|
|
- if (this.dialysisSummary.propagandaAndEducationContent.indexOf(values) == -1) {
|
|
308
|
+ if (
|
|
309
|
+ this.dialysisSummary.propagandaAndEducationContent.indexOf(values) ==
|
|
310
|
+ -1
|
|
311
|
+ ) {
|
283
|
312
|
if (
|
284
|
|
- this.dialysisSummary.propagandaAndEducationContent.charAt(this.dialysisSummary.propagandaAndEducationContent.length - 1).indexOf("。") == -1) {
|
|
313
|
+ this.dialysisSummary.propagandaAndEducationContent
|
|
314
|
+ .charAt(
|
|
315
|
+ this.dialysisSummary.propagandaAndEducationContent.length - 1
|
|
316
|
+ )
|
|
317
|
+ .indexOf("。") == -1
|
|
318
|
+ ) {
|
285
|
319
|
this.dialysisSummary.propagandaAndEducationContent =
|
286
|
320
|
this.dialysisSummary.propagandaAndEducationContent + "," + values;
|
287
|
321
|
} else {
|
|
@@ -298,28 +332,30 @@ export default {
|
298
|
332
|
ParamsQuery["record_date"] = this.record_date;
|
299
|
333
|
ParamsQuery["mode"] = "1";
|
300
|
334
|
|
301
|
|
- if (this.record.id > 0){
|
|
335
|
+ if (this.record.id > 0) {
|
302
|
336
|
ParamsQuery["mode"] = "2";
|
303
|
|
- if(this.record.creater != this.$store.getters.user.admin.id){
|
|
337
|
+ if (this.record.creater != this.$store.getters.user.admin.id) {
|
304
|
338
|
ParamsQuery["mode"] = "3";
|
305
|
339
|
}
|
306
|
340
|
}
|
307
|
341
|
|
308
|
|
- commitTreatmentSummary(ParamsQuery).then(response => {
|
309
|
|
- if (response.data.state == 0) {
|
310
|
|
- Toast.fail(response.data.msg);
|
311
|
|
- return false;
|
312
|
|
- } else {
|
313
|
|
- Toast.success("提交成功");
|
|
342
|
+ commitTreatmentSummary(ParamsQuery)
|
|
343
|
+ .then(response => {
|
|
344
|
+ if (response.data.state == 0) {
|
|
345
|
+ Toast.fail(response.data.msg);
|
|
346
|
+ return false;
|
|
347
|
+ } else {
|
|
348
|
+ Toast.success("提交成功");
|
314
|
349
|
|
315
|
|
- this.$emit("did_update", response.data.data.summary);
|
316
|
|
- for (const key in response.data.data.summary) {
|
317
|
|
- this.record[key] = response.data.data.summary[key];
|
|
350
|
+ this.$emit("did_update", response.data.data.summary);
|
|
351
|
+ for (const key in response.data.data.summary) {
|
|
352
|
+ this.record[key] = response.data.data.summary[key];
|
|
353
|
+ }
|
318
|
354
|
}
|
319
|
|
- }
|
320
|
|
- }).catch(err => {
|
321
|
|
- Toast.fail(err)
|
322
|
|
- });
|
|
355
|
+ })
|
|
356
|
+ .catch(err => {
|
|
357
|
+ Toast.fail(err);
|
|
358
|
+ });
|
323
|
359
|
},
|
324
|
360
|
close: function() {
|
325
|
361
|
this.$emit("close");
|
|
@@ -334,40 +370,59 @@ export default {
|
334
|
370
|
});
|
335
|
371
|
}
|
336
|
372
|
},
|
337
|
|
- getPermission(){
|
338
|
|
- request.get("/m/api/permission/get",{
|
339
|
|
- params:{
|
340
|
|
- create_url:"/m/api/dialysis/treatmentSummary?mode=1",
|
341
|
|
- modify_url:"/m/api/dialysis/treatmentSummary?mode=2",
|
342
|
|
- modify_other_url:"/m/api/dialysis/treatmentSummary?mode=3",
|
343
|
|
- module:9
|
344
|
|
- }
|
345
|
|
- }).then(res => {
|
346
|
|
- console.log(res)
|
347
|
|
- console.log("小结",this.record)
|
348
|
|
- if(res.data.state == 0){
|
349
|
|
- this.hasPermission = false
|
350
|
|
- }else if(res.data.state == 1){
|
351
|
|
- if(this.record.id != "" && this.record.creater != 0){//有数据
|
352
|
|
- if(this.record.creater == this.$store.getters.user.admin.id){//创建人是自己
|
353
|
|
- if(res.data.data.is_has_modify == false){
|
354
|
|
- this.hasPermission = false
|
355
|
|
- this.showTxt = "你没有修改治疗小结权限"
|
|
373
|
+ getPermission() {
|
|
374
|
+ request
|
|
375
|
+ .get("/m/api/permission/get", {
|
|
376
|
+ params: {
|
|
377
|
+ create_url: "/m/api/dialysis/treatmentSummary?mode=1",
|
|
378
|
+ modify_url: "/m/api/dialysis/treatmentSummary?mode=2",
|
|
379
|
+ modify_other_url: "/m/api/dialysis/treatmentSummary?mode=3",
|
|
380
|
+ module: 9
|
|
381
|
+ }
|
|
382
|
+ })
|
|
383
|
+ .then(res => {
|
|
384
|
+ console.log(res);
|
|
385
|
+ console.log("小结", this.record);
|
|
386
|
+ if (res.data.state == 0) {
|
|
387
|
+ this.hasPermission = false;
|
|
388
|
+ } else if (res.data.state == 1) {
|
|
389
|
+ if (this.record.id != "" && this.record.creater != 0) {
|
|
390
|
+ // 有数据
|
|
391
|
+ if (this.record.creater == this.$store.getters.user.admin.id) {
|
|
392
|
+ // 创建人是自己
|
|
393
|
+ if (res.data.data.is_has_modify == false) {
|
|
394
|
+ this.hasPermission = false;
|
|
395
|
+ this.showTxt = "你没有修改治疗小结权限";
|
|
396
|
+ }
|
|
397
|
+ } else {
|
|
398
|
+ // 创建人不是自己
|
|
399
|
+ if (res.data.data.is_has_modify_other == false) {
|
|
400
|
+ this.hasPermission = false;
|
|
401
|
+ this.showTxt = "你没有修改他人治疗小结权限";
|
|
402
|
+ }
|
356
|
403
|
}
|
357
|
|
- }else{//创建人不是自己
|
358
|
|
- if(res.data.data.is_has_modify_other == false){
|
359
|
|
- this.hasPermission = false
|
360
|
|
- this.showTxt = "你没有修改他人治疗小结权限"
|
|
404
|
+ } else if (this.record.id == "" || this.record.creater == 0) {
|
|
405
|
+ if (res.data.data.is_has_create == false) {
|
|
406
|
+ this.hasPermission = false;
|
|
407
|
+ this.showTxt = "你没有新增治疗小结权限";
|
361
|
408
|
}
|
362
|
409
|
}
|
363
|
|
- }else if(this.record.id == "" || this.record.creater == 0){
|
364
|
|
- if(res.data.data.is_has_create == false){
|
365
|
|
- this.hasPermission = false
|
366
|
|
- this.showTxt = "你没有新增治疗小结权限"
|
367
|
|
- }
|
368
|
410
|
}
|
|
411
|
+ });
|
|
412
|
+ },
|
|
413
|
+ isShow(name) {
|
|
414
|
+ var filedList = this.$store.getters.user.fileds;
|
|
415
|
+
|
|
416
|
+ for (let i = 0; i < filedList.length; i++) {
|
|
417
|
+ if (
|
|
418
|
+ filedList[i].module == 6 &&
|
|
419
|
+ filedList[i].filed_name_cn == name &&
|
|
420
|
+ filedList[i].is_show == 1
|
|
421
|
+ ) {
|
|
422
|
+ return true;
|
369
|
423
|
}
|
370
|
|
- })
|
|
424
|
+ }
|
|
425
|
+ return false;
|
371
|
426
|
}
|
372
|
427
|
},
|
373
|
428
|
|
|
@@ -394,7 +449,7 @@ export default {
|
394
|
449
|
}
|
395
|
450
|
}
|
396
|
451
|
}
|
397
|
|
-.warnTxt{
|
|
452
|
+.warnTxt {
|
398
|
453
|
font-size: 0.5rem;
|
399
|
454
|
height: 1rem;
|
400
|
455
|
line-height: 1rem;
|