From e87a818706621dbfd633371aaed96898c7cc8e88 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 29 Aug 2021 17:38:36 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E6=94=AF=E6=8C=81=E9=87=8D=E5=A4=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=A4=9A=E7=BB=84=E6=97=A5=E6=9C=9F=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/ruoyi.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 67a31183..ce7253a2 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -55,16 +55,15 @@ export function resetForm(refName) { // 添加日期范围 export function addDateRange(params, dateRange, propName) { - var search = params; - search.params = {}; - if (null != dateRange && '' != dateRange) { - if (typeof (propName) === "undefined") { - search.params["beginTime"] = dateRange[0]; - search.params["endTime"] = dateRange[1]; - } else { - search.params["begin" + propName] = dateRange[0]; - search.params["end" + propName] = dateRange[1]; - } + let search = params; + search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {}; + dateRange = Array.isArray(dateRange) ? dateRange : []; + if (typeof (propName) === 'undefined') { + search.params['beginTime'] = dateRange[0]; + search.params['endTime'] = dateRange[1]; + } else { + search.params['begin' + propName] = dateRange[0]; + search.params['end' + propName] = dateRange[1]; } return search; } From dcc5dc0d16a657eff0b24b2a0b1ca9ff7aabe7bc Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 29 Aug 2021 17:39:10 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B8=A6utc=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=A0=BC=E5=BC=8F=20yyyy-MM-dd'T'HH:mm:ss.SSS=20?= =?UTF-8?q?=E5=9C=A8safari=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=AD=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=AD=A3=E7=A1=AE=E6=A0=BC=E5=BC=8F=E5=8C=96=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/ruoyi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index ce7253a2..de41e5e9 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -18,7 +18,7 @@ export function parseTime(time, pattern) { if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { time = parseInt(time) } else if (typeof time === 'string') { - time = time.replace(new RegExp(/-/gm), '/'); + time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm),''); } if ((typeof time === 'number') && (time.toString().length === 10)) { time = time * 1000 From 57f51249b61fa5562021883a6cf8e5cb8a7b9aa3 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 29 Aug 2021 17:39:25 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E9=BB=98?= =?UTF-8?q?=E8=AE=A420s=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/login.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/api/login.js b/ruoyi-ui/src/api/login.js index f3c721a0..74ed95ed 100644 --- a/ruoyi-ui/src/api/login.js +++ b/ruoyi-ui/src/api/login.js @@ -49,6 +49,7 @@ export function logout() { export function getCodeImg() { return request({ url: '/code', - method: 'get' + method: 'get', + timeout: 20000 }) } \ No newline at end of file From 40bdf7b10070e7e148852c099fd6676f4b13fc61 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 29 Aug 2021 17:39:43 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=80=BC=E4=B8=BA=E6=95=B4=E5=BD=A2=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/DictTag/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/components/DictTag/index.vue b/ruoyi-ui/src/components/DictTag/index.vue index 47794150..542c6edd 100644 --- a/ruoyi-ui/src/components/DictTag/index.vue +++ b/ruoyi-ui/src/components/DictTag/index.vue @@ -31,12 +31,12 @@ export default { type: Array, default: null, }, - value: [String, Array], + value: [Number, String, Array], }, computed: { values() { - if (this.value) { - return Array.isArray(this.value) ? this.value : [this.value]; + if (this.value !== null && typeof this.value !== 'undefined') { + return Array.isArray(this.value) ? this.value : [String(this.value)]; } else { return []; } From 0e51d1e7b1e357260d682aa97bad41ee4fcb3cd1 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 30 Aug 2021 17:08:55 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=94=A8=E6=88=B7ID?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=8F=9C=E5=8D=95=E6=9D=A1=E4=BB=B6=E5=8A=A0?= =?UTF-8?q?=E5=88=AB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/system/SysMenuMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index 9d2cd0ad..afd7e0e9 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -61,13 +61,13 @@ left join sys_role ro on ur.role_id = ro.role_id where ur.user_id = #{params.userId} - AND menu_name like concat('%', #{menuName}, '%') + AND m.menu_name like concat('%', #{menuName}, '%') - AND visible = #{visible} + AND m.visible = #{visible} - AND status = #{status} + AND m.status = #{status} order by m.parent_id, m.order_num