|
@@ -54,18 +54,18 @@
|
54
|
54
|
</div>
|
55
|
55
|
</template>
|
56
|
56
|
<script>
|
57
|
|
-import { fetchAllList, PostSearch } from "@/api/patient";
|
58
|
|
-import { jsGetAge, uParseTime } from "@/utils/tools";
|
|
57
|
+import { fetchAllList, PostSearch } from '@/api/patient'
|
|
58
|
+import { jsGetAge, uParseTime } from '@/utils/tools'
|
59
|
59
|
|
60
|
60
|
export default {
|
61
|
|
- name: "patientSidebar",
|
62
|
|
- value: "",
|
|
61
|
+ name: 'patientSidebar',
|
|
62
|
+ value: '',
|
63
|
63
|
searchArray: [],
|
64
|
64
|
props: {
|
65
|
65
|
id: 0,
|
66
|
66
|
defaultActive: {
|
67
|
67
|
type: String,
|
68
|
|
- default: "1-1"
|
|
68
|
+ default: '1-1'
|
69
|
69
|
}
|
70
|
70
|
},
|
71
|
71
|
data() {
|
|
@@ -74,186 +74,189 @@ export default {
|
74
|
74
|
patientsList: null,
|
75
|
75
|
currentPatient: {},
|
76
|
76
|
selectID: 0,
|
77
|
|
- keyword: "",
|
78
|
|
- value: "",
|
79
|
|
- treeKey: "",
|
|
77
|
+ keyword: '',
|
|
78
|
+ value: '',
|
|
79
|
+ treeKey: '',
|
80
|
80
|
treeData: [
|
81
|
81
|
{
|
82
|
|
- name: "1",
|
83
|
|
- label: "电子病历",
|
|
82
|
+ name: '1',
|
|
83
|
+ label: '电子病历',
|
84
|
84
|
children: [
|
85
|
85
|
{
|
86
|
|
- name: "1-1",
|
87
|
|
- label: "基本信息"
|
|
86
|
+ name: '1-1',
|
|
87
|
+ label: '基本信息'
|
88
|
88
|
},
|
89
|
89
|
{
|
90
|
|
- name: "1-4",
|
91
|
|
- label: "医嘱管理"
|
|
90
|
+ name: '1-4',
|
|
91
|
+ label: '医嘱管理'
|
92
|
92
|
},
|
93
|
93
|
{
|
94
|
|
- name: "1-6",
|
95
|
|
- label: "干体重"
|
|
94
|
+ name: '1-6',
|
|
95
|
+ label: '干体重'
|
96
|
96
|
},
|
97
|
97
|
{
|
98
|
|
- name: "1-2",
|
99
|
|
- label: "病程管理"
|
|
98
|
+ name: '1-2',
|
|
99
|
+ label: '病程管理'
|
100
|
100
|
},
|
101
|
101
|
{
|
102
|
|
- name: "1-3",
|
103
|
|
- label: "检验检查"
|
|
102
|
+ name: '1-3',
|
|
103
|
+ label: '检验检查'
|
104
|
104
|
},
|
105
|
105
|
{
|
106
|
|
- name: "1-5",
|
107
|
|
- label: "抢救记录"
|
|
106
|
+ name: '1-5',
|
|
107
|
+ label: '抢救记录'
|
108
|
108
|
}
|
109
|
109
|
]
|
110
|
110
|
},
|
111
|
111
|
{
|
112
|
|
- name: "2",
|
113
|
|
- label: "透析管理",
|
|
112
|
+ name: '2',
|
|
113
|
+ label: '透析管理',
|
114
|
114
|
children: [
|
115
|
115
|
{
|
116
|
|
- name: "2-1",
|
117
|
|
- label: "长期透析处方"
|
|
116
|
+ name: '2-1',
|
|
117
|
+ label: '长期透析处方'
|
118
|
118
|
},
|
119
|
119
|
{
|
120
|
|
- name: "2-2",
|
121
|
|
- label: "透析记录"
|
|
120
|
+ name: '2-2',
|
|
121
|
+ label: '透析记录'
|
122
|
122
|
},
|
123
|
123
|
{
|
124
|
|
- name: "2-4",
|
125
|
|
- label: "排班信息"
|
|
124
|
+ name: '2-4',
|
|
125
|
+ label: '排班信息'
|
126
|
126
|
},
|
127
|
127
|
{
|
128
|
|
- name: "2-5",
|
129
|
|
- label: "宣教信息"
|
|
128
|
+ name: '2-5',
|
|
129
|
+ label: '宣教信息'
|
130
|
130
|
}
|
131
|
131
|
]
|
132
|
132
|
}
|
133
|
133
|
]
|
134
|
|
- };
|
|
134
|
+ }
|
135
|
135
|
},
|
136
|
136
|
methods: {
|
137
|
137
|
handleNodeClick(data) {
|
138
|
|
- var name = data.name;
|
139
|
|
- if (name == "1-1") {
|
140
|
|
- this.$router.push({ path: "/patients/patient/" + this.id });
|
141
|
|
- } else if (name == "1-2") {
|
142
|
|
- this.$router.push({ path: "/patients/course?id=" + this.id });
|
143
|
|
- } else if (name == "1-3") {
|
144
|
|
- this.$router.push({ path: "/patients/inspection?id=" + this.id });
|
145
|
|
- } else if (name == "1-4") {
|
|
138
|
+ var name = data.name
|
|
139
|
+ if (name == '1-1') {
|
|
140
|
+ this.$router.push({ path: '/patients/patient/' + this.id })
|
|
141
|
+ } else if (name == '1-2') {
|
|
142
|
+ this.$router.push({ path: '/patients/course?id=' + this.id })
|
|
143
|
+ } else if (name == '1-3') {
|
|
144
|
+ this.$router.push({ path: '/patients/inspection?id=' + this.id })
|
|
145
|
+ } else if (name == '1-4') {
|
146
|
146
|
this.$router.push({
|
147
|
|
- path: "/patients/patient/" + this.id + "/doctorAdvice"
|
148
|
|
- });
|
149
|
|
- } else if (name == "1-6") {
|
|
147
|
+ path: '/patients/patient/' + this.id + '/doctorAdvice'
|
|
148
|
+ })
|
|
149
|
+ } else if (name == '1-6') {
|
150
|
150
|
this.$router.push({
|
151
|
|
- path: "/patients/patient/" + this.id + "/dryWeight"
|
152
|
|
- });
|
153
|
|
- } else if (name == "1-5") {
|
154
|
|
- this.$router.push({ path: "/patients/rescue?id=" + this.id });
|
155
|
|
- } else if (name == "2-1") {
|
|
151
|
+ path: '/patients/patient/' + this.id + '/dryWeight'
|
|
152
|
+ })
|
|
153
|
+ } else if (name == '1-5') {
|
|
154
|
+ this.$router.push({ path: '/patients/rescue?id=' + this.id })
|
|
155
|
+ } else if (name == '2-1') {
|
156
|
156
|
this.$router.push({
|
157
|
|
- path: "/patients/patient/" + this.id + "/dialysisSolution"
|
158
|
|
- });
|
159
|
|
- } else if (name == "2-2") {
|
|
157
|
+ path: '/patients/patient/' + this.id + '/dialysisSolution'
|
|
158
|
+ })
|
|
159
|
+ } else if (name == '2-2') {
|
160
|
160
|
this.$router.push({
|
161
|
|
- path: "/patients/patient/" + this.id + "/dialysisRecord"
|
162
|
|
- });
|
163
|
|
- } else if (name == "2-4") {
|
|
161
|
+ path: '/patients/patient/' + this.id + '/dialysisRecord'
|
|
162
|
+ })
|
|
163
|
+ } else if (name == '2-4') {
|
164
|
164
|
this.$router.push({
|
165
|
|
- path: "/patients/patient/" + this.id + "/scheduling"
|
166
|
|
- });
|
167
|
|
- } else if (name == "2-5") {
|
|
165
|
+ path: '/patients/patient/' + this.id + '/scheduling'
|
|
166
|
+ })
|
|
167
|
+ } else if (name == '2-5') {
|
168
|
168
|
this.$router.push({
|
169
|
|
- path: "/patients/patient/" + this.id + "/proeducation"
|
170
|
|
- });
|
|
169
|
+ path: '/patients/patient/' + this.id + '/proeducation'
|
|
170
|
+ })
|
171
|
171
|
}
|
172
|
172
|
},
|
173
|
173
|
changePatient(value) {
|
174
|
|
- console.log(value);
|
175
|
|
- this.$router.push("/patients/patient/" + value);
|
|
174
|
+ console.log(value)
|
|
175
|
+ this.$router.push('/patients/patient/' + value)
|
176
|
176
|
},
|
177
|
177
|
getList() {
|
178
|
178
|
fetchAllList().then(response => {
|
179
|
179
|
if (response.data.state == 1) {
|
180
|
|
- this.patientsList = response.data.data.patients;
|
181
|
|
- var len = this.patientsList.length;
|
|
180
|
+ this.patientsList = response.data.data.patients
|
|
181
|
+ var len = this.patientsList.length
|
182
|
182
|
if (len > 0) {
|
183
|
183
|
for (let index = 0; index < len; index++) {
|
184
|
184
|
if (this.patientsList[index].id == this.id) {
|
185
|
|
- this.currentPatient = this.patientsList[index];
|
186
|
|
- //console.log("curr", this.currentPatient);
|
187
|
|
- this.selectID = this.patientsList[index].id;
|
188
|
|
- this.$emit("tran-patient", this.currentPatient);
|
189
|
|
- break;
|
|
185
|
+ this.currentPatient = this.patientsList[index]
|
|
186
|
+ // console.log("curr", this.currentPatient);
|
|
187
|
+ this.selectID = this.patientsList[index].id
|
|
188
|
+ this.$emit('tran-patient', this.currentPatient)
|
|
189
|
+ break
|
190
|
190
|
}
|
191
|
191
|
}
|
192
|
192
|
}
|
193
|
193
|
}
|
194
|
|
- });
|
|
194
|
+ })
|
195
|
195
|
},
|
196
|
196
|
tranAge(birthday) {
|
197
|
|
- var birth = uParseTime(birthday, "{y}-{m}-{d}");
|
198
|
|
- return jsGetAge(birth, "-");
|
|
197
|
+ var birth = uParseTime(birthday, '{y}-{m}-{d}')
|
|
198
|
+ return jsGetAge(birth, '-')
|
199
|
199
|
},
|
200
|
200
|
tranSex(gender) {
|
201
|
|
- var sex = "未知";
|
|
201
|
+ var sex = '未知'
|
202
|
202
|
switch (gender) {
|
203
|
203
|
case 1:
|
204
|
|
- sex = "男";
|
205
|
|
- break;
|
|
204
|
+ sex = '男'
|
|
205
|
+ break
|
206
|
206
|
case 2:
|
207
|
|
- sex = "女";
|
208
|
|
- break;
|
|
207
|
+ sex = '女'
|
|
208
|
+ break
|
209
|
209
|
default:
|
210
|
|
- break;
|
|
210
|
+ break
|
211
|
211
|
}
|
212
|
|
- return sex;
|
|
212
|
+ return sex
|
213
|
213
|
},
|
214
|
214
|
querySearchAsync(keyword, cb) {
|
215
|
|
- let key = "";
|
|
215
|
+ let key = ''
|
216
|
216
|
if (keyword != undefined) {
|
217
|
|
- key = keyword;
|
|
217
|
+ key = keyword
|
218
|
218
|
}
|
219
|
|
- let searchArray = [];
|
|
219
|
+ let searchArray = []
|
220
|
220
|
PostSearch(key).then(response => {
|
221
|
221
|
if (response.data.state == 1) {
|
222
|
|
- searchArray = response.data.data.patient;
|
223
|
|
- cb(searchArray);
|
|
222
|
+ searchArray = response.data.data.patient
|
|
223
|
+ cb(searchArray)
|
224
|
224
|
} else {
|
225
|
|
- this.$message.error(response.data.msg);
|
226
|
|
- cb([]);
|
|
225
|
+ this.$message.error(response.data.msg)
|
|
226
|
+ cb([])
|
227
|
227
|
}
|
228
|
|
- });
|
|
228
|
+ })
|
229
|
229
|
},
|
230
|
230
|
handleSelect(val) {
|
231
|
|
- this.$router.push("/patients/patient/" + val.id);
|
|
231
|
+ this.$router.push('/patients/patient/' + val.id)
|
232
|
232
|
},
|
233
|
233
|
getAge: function(val) {
|
234
|
|
- var thisLen = val.id_card_no.length;
|
235
|
|
- var birth = "";
|
|
234
|
+ if (val.id_card_no == undefined) {
|
|
235
|
+ return false
|
|
236
|
+ }
|
|
237
|
+ var thisLen = val.id_card_no.length
|
|
238
|
+ var birth = ''
|
236
|
239
|
if (thisLen == 15) {
|
237
|
|
- birth = "19" + val.id_card_no.substr(6, 6);
|
|
240
|
+ birth = '19' + val.id_card_no.substr(6, 6)
|
238
|
241
|
} else {
|
239
|
|
- birth = val.id_card_no.substr(6, 8);
|
|
242
|
+ birth = val.id_card_no.substr(6, 8)
|
240
|
243
|
}
|
241
|
244
|
var birthtwo =
|
242
|
245
|
birth.substr(0, 4) +
|
243
|
|
- "-" +
|
|
246
|
+ '-' +
|
244
|
247
|
birth.substr(4, 2) +
|
245
|
|
- "-" +
|
246
|
|
- birth.substr(6, 2);
|
|
248
|
+ '-' +
|
|
249
|
+ birth.substr(6, 2)
|
247
|
250
|
|
248
|
|
- var age = jsGetAge(birthtwo, "-");
|
249
|
|
- return age;
|
|
251
|
+ var age = jsGetAge(birthtwo, '-')
|
|
252
|
+ return age
|
250
|
253
|
}
|
251
|
254
|
},
|
252
|
255
|
created() {
|
253
|
|
- this.treeKey = this.defaultActive;
|
254
|
|
- this.getList();
|
|
256
|
+ this.treeKey = this.defaultActive
|
|
257
|
+ this.getList()
|
255
|
258
|
}
|
256
|
|
-};
|
|
259
|
+}
|
257
|
260
|
</script>
|
258
|
261
|
|
259
|
262
|
<style>
|