zhuliu 9 mesi fa
parent
commit
6659c8265e
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      src/views/report/components/dialog/handlePerson.vue

+ 13 - 0
src/views/report/components/dialog/handlePerson.vue

@@ -176,6 +176,19 @@ export default {
     },
     //保存
     save(row){
+      if(!row.name){
+        this.$message.warning('姓名不能为空')
+        return
+      }
+      if(!row.email){
+        this.$message.warning('邮箱不能为空')
+        return
+      }
+      var regx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9_\.\-])+\.)+([a-zA-Z0-9]{2,4})+$/
+      if(!regx.test(row.email)){
+        this.$message.warning('邮箱格式不正确')
+        return
+      }
       var a = '添加'
       if(this.model == 'edit'){
         a = '修改'