diff --git a/src/views/AddRecord.vue b/src/views/AddRecord.vue index 962f1cf734e528a1ba42ad5ac0922d03bc2f5346..4d329432038c9ef907962d4fb37935143e8a93f3 100644 --- a/src/views/AddRecord.vue +++ b/src/views/AddRecord.vue @@ -28,15 +28,8 @@ - - - - - + + @@ -118,7 +111,7 @@ { required: true, message: '请输入健康状况', trigger: 'blur' } ], depart: [ - { required: true, message: '请选择部门', trigger: 'blur' } + { required: true, message: '请输入你现在居住的地址', trigger: 'blur' } ] } diff --git a/src/views/IdenManage.vue b/src/views/IdenManage.vue index a14418a9265402f144b4ec0f40d8ddabf94397f0..60b37c808241960860a0ed41f9fe0282b6b96f05 100644 --- a/src/views/IdenManage.vue +++ b/src/views/IdenManage.vue @@ -18,7 +18,7 @@ > - + - + @@ -76,18 +76,18 @@ :visible.sync="dialogFormVisible" slot > - - + + - + - + - + - + - + - - - - - + + - + @@ -150,18 +138,18 @@ :visible.sync="addDialogFormVisible" slot > - - + + - + - + - + - + - - - - - + + - + - + { @@ -269,9 +245,15 @@ export default { window.location.reload(); }, }); + }else{ + return false; } }); }, + resetForm(formName) { + this.$refs[formName].resetFields(); + }, + deleteRecord(row) { this.$confirm("是否确定要删除" + row.name + "的病例记录?", "删除数据", { confirmButtonText: "确定", @@ -439,9 +421,41 @@ export default { status: "", phonenum: "", }, + rules: { + name: [ + { required: true, message: '请输入姓名', trigger: 'blur' }, + { min: 3, max: 20, message: '长度在 3 到 20 个字符', trigger: 'blur' } + ], + idcard: [ + { required: true, message: '请输入身份证号', trigger: 'blur' }, + { min: 18, max: 18, message: '身份证号不合法', trigger: 'blur' } + ], + idate: [ + { required: true, message: '请选择就诊日期', trigger: 'blur' } + ], + place: [ + { required: true, message: '请输入就诊医院', trigger: 'blur' } + ], + depart: [ + { required: true, message: '请输入现居地址', trigger: 'blur' } + ], + status:[ + { required: true, message: '请输入目前的状态', trigger: 'blur' } + ], + phonenum: [ + { required: true, message: '请输入手机号码', trigger: 'blur' }, + { min: 8, max: 20, message: '长度在 8 到 20 个字符', trigger: 'blur' } + ], + sex: [ + { required: true, message: '请输入性别', trigger: 'blur' } + ] + } }; }, -}; +} + + +