From 09f37420401da57d1e4a81a68694149221a654e9 Mon Sep 17 00:00:00 2001 From: yuyu1025 <53509788+yuyu1025@users.noreply.github.com> Date: Thu, 8 Apr 2021 17:59:36 +0800 Subject: [PATCH 1/4] Update menu.js (#111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 可能出现非数组直接上传的bug --- src/api/system/menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/system/menu.js b/src/api/system/menu.js index 3298543..282dd8d 100644 --- a/src/api/system/menu.js +++ b/src/api/system/menu.js @@ -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', From effcc156c4da3f5677a404c4913ee67fdf57f391 Mon Sep 17 00:00:00 2001 From: Tim Yuan Date: Thu, 29 Apr 2021 14:30:14 +0800 Subject: [PATCH 2/4] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8D=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E7=A0=81=E5=8C=B9=E9=85=8D=EF=BC=8C=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E5=95=86=E6=96=B0=E5=A2=9E=E5=8F=B7=E6=AE=B5=E5=A6=82166?= =?UTF-8?q?=E3=80=81191=20=E7=AD=89=E5=BC=80=E5=A4=B4=E5=8F=B7=E7=A0=81?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=80=9A=E8=BF=87=E9=AA=8C=E8=AF=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 各大运营商当前(2021年04月22日)可用手机号码段 中国电信号段 133、153、173、177、180、181、189、190、191、193、199 中国联通号段 130、131、132、145、155、156、166、167、171、175、176、185、186、196 中国移动号段 134(0-8)、135、136、137、138、139、1440、147、148、150、151、152、157、158、159、172、178、182、183、184、187、188、195、197、198 中国广电号段 192 其他号段 14号段部分为上网卡专属号段:中国联通145,中国移动147,中国电信149 虚拟运营商: 电信:1700、1701、1702、162 移动:1703、1705、1706、165 联通:1704、1707、1708、1709、171、167 卫星通信:1349、174 物联网:140、141、144、146、148 --- src/utils/validate.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/utils/validate.js b/src/utils/validate.js index d215791..751f94f 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -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) { } } } - From 14aab905e0f1818df3487c0a6b005ed7ade228ec Mon Sep 17 00:00:00 2001 From: Zheng Jie <201507802@qq.com> Date: Mon, 7 Jun 2021 15:38:07 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[=E4=BB=A3=E7=A0=81=E5=AE=8C=E5=96=84](mast?= =?UTF-8?q?er):=20=E4=BF=AE=E6=94=B9=E8=A7=92=E8=89=B2=E6=97=B6=E5=B0=86?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=9A=84=E8=8F=9C=E5=8D=95=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=EF=BC=8C=E9=81=BF=E5=85=8D=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=95=B0=E6=8D=AE=E8=BF=87=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close https://github.com/elunez/eladmin/issues/609 --- src/views/system/role/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 467a37f..242ed1a 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -187,6 +187,8 @@ export default { form.depts.forEach(function(dept) { _this.deptDatas.push(dept.id) }) + // 将角色的菜单清空,避免日志入库数据过长 + form.menus = null }, // 提交前做的操作 [CRUD.HOOK.afterValidateCU](crud) { From 226ca4954ef32e3fc6a9201ceb859288a1a27081 Mon Sep 17 00:00:00 2001 From: Zheng Jie <201507802@qq.com> Date: Mon, 7 Jun 2021 15:43:56 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[=E4=BB=A3=E7=A0=81=E5=AE=8C=E5=96=84](mast?= =?UTF-8?q?er):=20=E7=BC=96=E8=BE=91=E5=89=8D=E5=B0=86=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E4=B8=B4=E6=97=B6=E6=B8=85=E7=A9=BA=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=97=A5=E5=BF=97=E5=85=A5=E5=BA=93=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=87=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close https://github.com/elunez/eladmin/issues/612 --- src/views/system/dict/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 20c818b..f102023 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -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 } } }