Przeglądaj źródła

deal页面增加关闭标签页的方法
注册用户修改获取验证码倒计时看不到问题,增加联系人只能输入汉字校验,输入验证码先把上次输入的清空,更改为trigger: ["blur", "change"]

xuefy 3 lat temu
rodzic
commit
234eb5f814

+ 6 - 0
front-vue/src/views/approval/approval/deal.vue

@@ -24,6 +24,12 @@ export default {
         this.wordUrl = window.location.protocol+'//'+window.location.host+'/flowablePc/#/openDeal?instId='+ instId + '&processId=' + processId + '&nodeId=' + nodeId + '&taskId=' + taskId + '&token=' + getToken();
         // this.wordUrl = 'http://localhost:8080/flowablePc/#/openDeal?instId='+ instId + '&processId=' + processId + '&nodeId=' + nodeId + '&taskId=' + taskId + '&token' + getToken();
         this.iframeShow = true
+        window.goParent = this.goParent;
     },
+    methods:{
+        goParent(){
+            this.$store.dispatch("tagsView/delView", this.$route);  
+        }
+    }
 };
 </script>

+ 18 - 8
front-vue/src/views/registerUser.vue

@@ -139,29 +139,34 @@ export default {
                 company: [
                     {
                         required: true,
-                        trigger: "blur",
+                        trigger: ["blur", "change"],
                         message: "企业名称不能为空",
                     },
                 ],
                 username: [
                     {
                         required: true,
-                        trigger: "blur",
+                        trigger:["blur", "change"],
                         message: "联系人不能为空",
                     },
+                    {
+                        pattern:/^[\u4E00-\u9FA5]+$/,
+                        trigger: ["blur", "change"],
+                        message: "联系人只能输入汉字",
+                    }
                 ],
                 phone: [
                     {
                         required: true,
                         pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
-                        trigger: "blur",
+                        trigger: ["blur", "change"],
                         message: "请输入正确的手机号",
                     },
                 ],
                 shortMessageCode: [
                     {
                         required: true,
-                        trigger: "blur",
+                        trigger:["blur", "change"],
                         message: "验证码不能为空",
                     },
                 ],
@@ -169,7 +174,7 @@ export default {
                     {
                         required: true,
                         pattern: /^(?=.*[a-zA-Z])(?=.*[0-9])[A-Za-z0-9]{6,12}$/,
-                        trigger: "blur",
+                        trigger: ["blur", "change"],
                         message: "密码必须由字母、数字组成,区分大小写",
                     },
                 ],
@@ -212,6 +217,8 @@ export default {
           this.wxSrc = require("../assets/images/wx1.png")
       },
       getCode() {
+          //先清空
+          this.$set(this.loginForm, "code","");
           getCodeImg().then((res) => {
               this.codeUrl = "data:image/gif;base64," + res.img;
               this.loginForm.uuid = res.uuid;
@@ -242,9 +249,11 @@ export default {
                   this.loginForm.type = "2";
                   registerUser(this.loginForm).then((res) => {
                     this.loading = false;
+                    this.msgSuccess("注册成功");
                     if (res.data.code == "0") {
-                        console.log("未认证!")
-                        this.$router.push({ path: "/login" });
+                         setTimeout(() => {
+                              this.$router.push({ path: "/login" });
+                        }, 5000);
                     }
                   }).catch(() => {
                     this.loading = false;
@@ -289,7 +298,8 @@ export default {
                   }
                   // 调用获取短信验证码接口
                   sendShortMessage(this.loginForm.phone, this.loginForm.code, this.loginForm.uuid).then(response => {
-                    this.sendShortMessageBtn = true;
+
+                   /*  this.sendShortMessageBtn = true; 这句话会使倒计时的按钮隐藏*/
                     this.msgSuccess("发送成功!");
 
                     // 因为下面用到了定时器,需要保存this指向