|
@@ -11,29 +11,29 @@ import PatientDetail from './components/PatientDetail'
|
11
|
11
|
import PatientSidebar from './components/PatientSidebar'
|
12
|
12
|
|
13
|
13
|
export default {
|
14
|
|
- name: 'editForm',
|
15
|
|
- components: { PatientDetail,PatientSidebar },
|
|
14
|
+ name: 'editForm',
|
|
15
|
+ components: { PatientDetail, PatientSidebar },
|
16
|
16
|
|
17
|
|
- data(){
|
18
|
|
- return{
|
19
|
|
- patientID:0,
|
20
|
|
- panelClass:"patient-app-container",
|
21
|
|
- patientInfo:{
|
22
|
|
- id:0
|
23
|
|
- },
|
|
17
|
+ data() {
|
|
18
|
+ return {
|
|
19
|
+ patientID: 0,
|
|
20
|
+ panelClass: 'patient-app-container',
|
|
21
|
+ patientInfo: {
|
|
22
|
+ id: 0
|
|
23
|
+ }
|
24
|
24
|
}
|
25
|
25
|
},
|
26
|
|
- created(){
|
27
|
|
- const id = this.$route.params && this.$route.params.id;
|
28
|
|
- this.patientID = parseInt(id);
|
29
|
|
- if (isNaN(this.patientID) || this.patientID <= 0) {
|
30
|
|
- console.log("patient info not had id");
|
31
|
|
- this.$notify.error({
|
32
|
|
- title: "错误",
|
33
|
|
- message: "无效的id"
|
34
|
|
- });
|
35
|
|
- this.$router.push('/patients/patients');
|
36
|
|
- }
|
|
26
|
+ created() {
|
|
27
|
+ const id = this.$route.params && this.$route.params.id
|
|
28
|
+ this.patientID = parseInt(id)
|
|
29
|
+ if (isNaN(this.patientID) || this.patientID <= 0) {
|
|
30
|
+ console.log('patient info not had id')
|
|
31
|
+ this.$notify.error({
|
|
32
|
+ title: '错误',
|
|
33
|
+ message: '无效的id'
|
|
34
|
+ })
|
|
35
|
+ this.$router.push('/patients/patients')
|
|
36
|
+ }
|
37
|
37
|
}
|
38
|
38
|
|
39
|
39
|
}
|