فهرست منبع

基础配置添加手机号码

zhaoke 1 سال پیش
والد
کامیت
37dce8ac66
1فایلهای تغییر یافته به همراه19 افزوده شده و 2 حذف شده
  1. 19 2
      src/views/systemSettings/securityPolicy/securityPolicyedit.vue

+ 19 - 2
src/views/systemSettings/securityPolicy/securityPolicyedit.vue

@@ -97,7 +97,7 @@
               </template>
             </Minheader>
             <el-row :gutter="24">
-              <el-col :span="12">
+              <el-col :span="24">
                 <el-form-item label="是否开启" prop="user_officer_multi">
                   <el-radio-group v-model="formData.user_officer_multi">
                     <el-radio :label="true">是</el-radio>
@@ -105,6 +105,11 @@
                   </el-radio-group>
                 </el-form-item>
               </el-col>
+              <el-col :span="16">
+                <el-form-item label="手机号码" prop="tel">
+                  <el-input maxlength="11" v-model="formData.tel" placeholder="请输入手机号码" clearable />
+                </el-form-item>
+              </el-col>
             </el-row>
           </div>
         </el-col>
@@ -128,6 +133,7 @@ const formData = reactive({
   pwd_type: "",
   pwd_case: "",
   user_officer_multi: true,
+  tel: "",
 });
 const verificationCodeEnable = computed(() =>
   Boolean(formData.verification_code)
@@ -166,7 +172,18 @@ const formRule = {
   verification_code: [
     { required: true, message: "请选择是否开启验证码", trigger: "blur" },
   ],
-  // pwd_cons: [{ required: true, message: '请输入密码规则(正则表达式)', trigger: 'blur' }],
+  tel: [
+    {
+      required: true,
+      message: "请输入手机号码",
+      trigger: "blur",
+    },
+    {
+      pattern: /^[1-9][0-9]*$/,
+      message: "请输入合法的手机号码",
+      trigger: "blur",
+    },
+  ],
   user_officer_multi: [
     { required: true, message: "请选择是否开启多点登录", trigger: "blur" },
   ],