|
@@ -1,10 +1,13 @@
|
1
|
1
|
<template>
|
2
|
2
|
<el-dialog
|
3
|
3
|
width="40%"
|
|
4
|
+ :close-on-click-modal="isClose"
|
|
5
|
+ :close-on-press-escape="isClose"
|
|
6
|
+ :show-close="isClose"
|
4
|
7
|
:visible.sync="visible"
|
5
|
8
|
:before-close="_close"
|
6
|
9
|
>
|
7
|
|
- <el-form :model="form" label-width="80px" :rules="rules">
|
|
10
|
+ <el-form :model="form" label-width="80px" :rules="rules" ref="formValue" >
|
8
|
11
|
<el-form-item label="患者" required prop="patient_id">
|
9
|
12
|
<el-select
|
10
|
13
|
v-model="form.patient_id"
|
|
@@ -21,7 +24,7 @@
|
21
|
24
|
</el-option>
|
22
|
25
|
</el-select>
|
23
|
26
|
</el-form-item>
|
24
|
|
- <el-form-item label="透析模式" required prop="treat_mode">
|
|
27
|
+ <el-form-item label="透析模式" required prop="treat_mode">
|
25
|
28
|
<el-select
|
26
|
29
|
v-model="form.treat_mode"
|
27
|
30
|
placeholder="选择透析模式"
|
|
@@ -38,8 +41,8 @@
|
38
|
41
|
</el-form-item>
|
39
|
42
|
</el-form>
|
40
|
43
|
<div slot="footer" class="dialog-footer">
|
41
|
|
- <el-button @click="visible=false">取消</el-button>
|
42
|
|
- <el-button type="primary" @click="saveAction">保 存</el-button>
|
|
44
|
+ <el-button @click="clearAction('formValue')">取消</el-button>
|
|
45
|
+ <el-button type="primary" @click="saveAction()">保 存</el-button>
|
43
|
46
|
</div>
|
44
|
47
|
</el-dialog>
|
45
|
48
|
</template>
|
|
@@ -51,6 +54,7 @@ export default {
|
51
|
54
|
return {
|
52
|
55
|
patients:[],
|
53
|
56
|
visible: false,
|
|
57
|
+ isClose:false,
|
54
|
58
|
form: {
|
55
|
59
|
patient_id: "",
|
56
|
60
|
treat_mode: "",
|
|
@@ -84,7 +88,6 @@ export default {
|
84
|
88
|
show(weekday, time_type, device_number_id,patients) {
|
85
|
89
|
this.clear();
|
86
|
90
|
this.patients = patients
|
87
|
|
- console.log(this.patients)
|
88
|
91
|
this.form.weekday = weekday;
|
89
|
92
|
this.form.time_type = time_type;
|
90
|
93
|
this.form.device_number_id = device_number_id;
|
|
@@ -93,7 +96,6 @@ export default {
|
93
|
96
|
showWith(patient_id, treat_mode, weekday, time_type, device_number_id,patients) {
|
94
|
97
|
this.clear();
|
95
|
98
|
this.patients = patients
|
96
|
|
- console.log(this.patients)
|
97
|
99
|
this.form.patient_id = patient_id;
|
98
|
100
|
this.form.treat_mode = treat_mode;
|
99
|
101
|
this.form.weekday = weekday;
|
|
@@ -104,9 +106,14 @@ export default {
|
104
|
106
|
hide() {
|
105
|
107
|
this.clear();
|
106
|
108
|
this.visible = false;
|
|
109
|
+ },clearAction(){
|
|
110
|
+ this.form.patient_id = "";
|
|
111
|
+ this.form.treat_mode = "";
|
|
112
|
+ this.$refs.formValue.resetFields()
|
|
113
|
+ this.visible = false;
|
107
|
114
|
},
|
108
|
115
|
saveAction: function() {
|
109
|
|
-
|
|
116
|
+
|
110
|
117
|
if (this.form.patient_id <= 0) {
|
111
|
118
|
this.$message.error("请选择患者", 1500);
|
112
|
119
|
return;
|
|
@@ -123,7 +130,8 @@ export default {
|
123
|
130
|
this.form.time_type,
|
124
|
131
|
this.form.device_number_id
|
125
|
132
|
);
|
126
|
|
-
|
|
133
|
+ this.$refs.formValue.resetFields()
|
|
134
|
+
|
127
|
135
|
},
|
128
|
136
|
cancelScheduleAction: function() {
|
129
|
137
|
this.$emit(
|