|
@@ -30,10 +30,9 @@ import { Form, FormSchema, RadioOption } from '@/components/Form'
|
30
|
30
|
import { useForm } from '@/hooks/web/useForm'
|
31
|
31
|
import { useValidator } from '@/hooks/web/useValidator'
|
32
|
32
|
import { BaseButton } from '@/components/Button'
|
33
|
|
-import { Search, Edit, Delete } from '@element-plus/icons-vue'
|
34
|
33
|
import { getRsaKey } from '@/api/login'
|
35
|
34
|
import { cloneDeep } from 'lodash-es'
|
36
|
|
-const { required, noSpaceOrSpecialChars } = useValidator()
|
|
35
|
+const { required, noSpaceOrSpecialChars, validateMobile } = useValidator()
|
37
|
36
|
|
38
|
37
|
defineOptions({
|
39
|
38
|
name: 'TemplateManage'
|
|
@@ -47,6 +46,11 @@ const rules = reactive<{
|
47
|
46
|
validator: (rule, value, callback) =>
|
48
|
47
|
noSpaceOrSpecialChars(value, callback, '不包含中文、空格、特殊字符')
|
49
|
48
|
}
|
|
49
|
+ ],
|
|
50
|
+ userCode: [
|
|
51
|
+ {
|
|
52
|
+ validator: (rule, value, callback) => validateMobile(value, callback, '请输入正确手机号')
|
|
53
|
+ }
|
50
|
54
|
]
|
51
|
55
|
})
|
52
|
56
|
|
|
@@ -317,7 +321,7 @@ const editUser = async (data) => {
|
317
|
321
|
style: {
|
318
|
322
|
width: '100%'
|
319
|
323
|
},
|
320
|
|
- placeholder: '请输入8位数字',
|
|
324
|
+ placeholder: '请输入电话号码',
|
321
|
325
|
disabled: isedit.value === '添加用户' ? false : true
|
322
|
326
|
},
|
323
|
327
|
formItemProps: {
|
|
@@ -517,7 +521,7 @@ const tianjia = async () => {
|
517
|
521
|
style: {
|
518
|
522
|
width: '100%'
|
519
|
523
|
},
|
520
|
|
- placeholder: '请输入8位数字',
|
|
524
|
+ placeholder: '请输入电话号码',
|
521
|
525
|
disabled: isedit.value === '添加用户' ? false : true
|
522
|
526
|
},
|
523
|
527
|
formItemProps: {
|