Merge branch 'master' into deploy
This commit is contained in:
@@ -16,7 +16,7 @@ export function getMenus(params) {
|
||||
}
|
||||
|
||||
export function getMenuSuperior(ids) {
|
||||
const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
|
||||
const data = Array.isArray(ids) || ids.length === 0 ? ids : Array.of(ids)
|
||||
return request({
|
||||
url: 'api/menus/superior',
|
||||
method: 'post',
|
||||
|
||||
@@ -65,7 +65,7 @@ export function validEmail(email) {
|
||||
}
|
||||
|
||||
export function isvalidPhone(phone) {
|
||||
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
|
||||
const reg = /^1([38][0-9]|4[014-9]|[59][0-35-9]|6[2567]|7[0-8])\d{8}$/
|
||||
return reg.test(phone)
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ export function validateIP(rule, value, callback) {
|
||||
|
||||
/* 是否手机号码或者固话*/
|
||||
export function validatePhoneTwo(rule, value, callback) {
|
||||
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/
|
||||
const reg = /^((0\d{2,3}-\d{7,8})|(1([38][0-9]|4[014-9]|[59][0-35-9]|6[2567]|7[0-8])\d{8}))$/
|
||||
if (value === '' || value === undefined || value == null) {
|
||||
callback()
|
||||
} else {
|
||||
@@ -140,7 +140,7 @@ export function validateTelephone(rule, value, callback) {
|
||||
|
||||
/* 是否手机号码*/
|
||||
export function validatePhone(rule, value, callback) {
|
||||
const reg = /^[1][3,4,5,7,8][0-9]{9}$/
|
||||
const reg = /^1([38][0-9]|4[014-9]|[59][0-35-9]|6[2567]|7[0-8])\d{8}$/
|
||||
if (value === '' || value === undefined || value == null) {
|
||||
callback()
|
||||
} else {
|
||||
@@ -165,4 +165,3 @@ export function validateIdNo(rule, value, callback) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +121,11 @@ export default {
|
||||
this.$refs.dictDetail.dictId = val.id
|
||||
this.$refs.dictDetail.crud.toQuery()
|
||||
}
|
||||
},
|
||||
// 编辑前将字典明细临时清空,避免日志入库数据过长
|
||||
[CRUD.HOOK.beforeToEdit](crud, form) {
|
||||
// 将角色的菜单清空,避免日志入库数据过长
|
||||
form.dictDetails = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,6 +187,8 @@ export default {
|
||||
form.depts.forEach(function(dept) {
|
||||
_this.deptDatas.push(dept.id)
|
||||
})
|
||||
// 将角色的菜单清空,避免日志入库数据过长
|
||||
form.menus = null
|
||||
},
|
||||
// 提交前做的操作
|
||||
[CRUD.HOOK.afterValidateCU](crud) {
|
||||
|
||||
Reference in New Issue
Block a user