From 5b0525d05c5db8d9732d7acb3741935d3bc9a615 Mon Sep 17 00:00:00 2001 From: shizhenwei Date: Sun, 27 Sep 2020 13:22:23 +0800 Subject: [PATCH 1/5] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E6=AD=A4=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB=E5=BA=94=E4=BD=BF=E7=94=A8=E5=8F=82=E6=95=B0?= =?UTF-8?q?dateRange=E8=80=8C=E9=9D=9Ebind=E5=9C=A8model=E4=B8=8A=E7=9A=84?= =?UTF-8?q?dateRange?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/ruoyi.js | 296 ++++++++++++++++++------------------ 1 file changed, 148 insertions(+), 148 deletions(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index b79f44c6..994c0ccf 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -1,148 +1,148 @@ -/** - * 通用js方法封装处理 - * Copyright (c) 2019 ruoyi - */ - -const baseURL = process.env.VUE_APP_BASE_API - -// 日期格式化 -export function parseTime(time, pattern) { - if (arguments.length === 0 || !time) { - return null - } - const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' - let date - if (typeof time === 'object') { - date = time - } else { - if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { - time = parseInt(time) - } else if (typeof time === 'string') { - time = time.replace(new RegExp(/-/gm), '/'); - } - if ((typeof time === 'number') && (time.toString().length === 10)) { - time = time * 1000 - } - date = new Date(time) - } - const formatObj = { - y: date.getFullYear(), - m: date.getMonth() + 1, - d: date.getDate(), - h: date.getHours(), - i: date.getMinutes(), - s: date.getSeconds(), - a: date.getDay() - } - const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { - let value = formatObj[key] - // Note: getDay() returns 0 on Sunday - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } - if (result.length > 0 && value < 10) { - value = '0' + value - } - return value || 0 - }) - return time_str -} - -// 表单重置 -export function resetForm(refName) { - if (this.$refs[refName]) { - this.$refs[refName].resetFields(); - } -} - -// 添加日期范围 -export function addDateRange(params, dateRange) { - var search = params; - search.beginTime = ""; - search.endTime = ""; - if (null != dateRange && '' != dateRange) { - search.beginTime = this.dateRange[0]; - search.endTime = this.dateRange[1]; - } - return search; -} - -// 回显数据字典 -export function selectDictLabel(datas, value) { - var actions = []; - Object.keys(datas).some((key) => { - if (datas[key].dictValue == ('' + value)) { - actions.push(datas[key].dictLabel); - return true; - } - }) - return actions.join(''); -} - -// 回显数据字典(字符串数组) -export function selectDictLabels(datas, value, separator) { - var actions = []; - var currentSeparator = undefined === separator ? "," : separator; - var temp = value.split(currentSeparator); - Object.keys(value.split(currentSeparator)).some((val) => { - Object.keys(datas).some((key) => { - if (datas[key].dictValue == ('' + temp[val])) { - actions.push(datas[key].dictLabel + currentSeparator); - } - }) - }) - return actions.join('').substring(0, actions.join('').length - 1); -} - -// 通用下载方法 -export function download(fileName) { - window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; -} - -// 字符串格式化(%s ) -export function sprintf(str) { - var args = arguments, flag = true, i = 1; - str = str.replace(/%s/g, function () { - var arg = args[i++]; - if (typeof arg === 'undefined') { - flag = false; - return ''; - } - return arg; - }); - return flag ? str : ''; -} - -// 转换字符串,undefined,null等转化为"" -export function praseStrEmpty(str) { - if (!str || str == "undefined" || str == "null") { - return ""; - } - return str; -} - -/** - * 构造树型结构数据 - * @param {*} data 数据源 - * @param {*} id id字段 默认 'id' - * @param {*} parentId 父节点字段 默认 'parentId' - * @param {*} children 孩子节点字段 默认 'children' - * @param {*} rootId 根Id 默认 0 - */ -export function handleTree(data, id, parentId, children, rootId) { - id = id || 'id' - parentId = parentId || 'parentId' - children = children || 'children' - rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0 - //对源数据深度克隆 - const cloneData = JSON.parse(JSON.stringify(data)) - //循环所有项 - const treeData = cloneData.filter(father => { - let branchArr = cloneData.filter(child => { - //返回每一项的子级数组 - return father[id] === child[parentId] - }); - branchArr.length > 0 ? father.children = branchArr : ''; - //返回第一层 - return father[parentId] === rootId; - }); - return treeData != '' ? treeData : data; -} +/** + * 通用js方法封装处理 + * Copyright (c) 2019 ruoyi + */ + +const baseURL = process.env.VUE_APP_BASE_API + +// 日期格式化 +export function parseTime(time, pattern) { + if (arguments.length === 0 || !time) { + return null + } + const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { + time = parseInt(time) + } else if (typeof time === 'string') { + time = time.replace(new RegExp(/-/gm), '/'); + } + if ((typeof time === 'number') && (time.toString().length === 10)) { + time = time * 1000 + } + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { + let value = formatObj[key] + // Note: getDay() returns 0 on Sunday + if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) + return time_str +} + +// 表单重置 +export function resetForm(refName) { + if (this.$refs[refName]) { + this.$refs[refName].resetFields(); + } +} + +// 添加日期范围 +export function addDateRange(params, dateRange) { + var search = params; + search.beginTime = ""; + search.endTime = ""; + if (null != dateRange && '' != dateRange) { + search.beginTime = dateRange[0]; + search.endTime = dateRange[1]; + } + return search; +} + +// 回显数据字典 +export function selectDictLabel(datas, value) { + var actions = []; + Object.keys(datas).some((key) => { + if (datas[key].dictValue == ('' + value)) { + actions.push(datas[key].dictLabel); + return true; + } + }) + return actions.join(''); +} + +// 回显数据字典(字符串数组) +export function selectDictLabels(datas, value, separator) { + var actions = []; + var currentSeparator = undefined === separator ? "," : separator; + var temp = value.split(currentSeparator); + Object.keys(value.split(currentSeparator)).some((val) => { + Object.keys(datas).some((key) => { + if (datas[key].dictValue == ('' + temp[val])) { + actions.push(datas[key].dictLabel + currentSeparator); + } + }) + }) + return actions.join('').substring(0, actions.join('').length - 1); +} + +// 通用下载方法 +export function download(fileName) { + window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; +} + +// 字符串格式化(%s ) +export function sprintf(str) { + var args = arguments, flag = true, i = 1; + str = str.replace(/%s/g, function () { + var arg = args[i++]; + if (typeof arg === 'undefined') { + flag = false; + return ''; + } + return arg; + }); + return flag ? str : ''; +} + +// 转换字符串,undefined,null等转化为"" +export function praseStrEmpty(str) { + if (!str || str == "undefined" || str == "null") { + return ""; + } + return str; +} + +/** + * 构造树型结构数据 + * @param {*} data 数据源 + * @param {*} id id字段 默认 'id' + * @param {*} parentId 父节点字段 默认 'parentId' + * @param {*} children 孩子节点字段 默认 'children' + * @param {*} rootId 根Id 默认 0 + */ +export function handleTree(data, id, parentId, children, rootId) { + id = id || 'id' + parentId = parentId || 'parentId' + children = children || 'children' + rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0 + //对源数据深度克隆 + const cloneData = JSON.parse(JSON.stringify(data)) + //循环所有项 + const treeData = cloneData.filter(father => { + let branchArr = cloneData.filter(child => { + //返回每一项的子级数组 + return father[id] === child[parentId] + }); + branchArr.length > 0 ? father.children = branchArr : ''; + //返回第一层 + return father[parentId] === rootId; + }); + return treeData != '' ? treeData : data; +} From dd721ff89489356860be5ba8f03f17a81c67501f Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 7 Oct 2020 13:36:55 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=89=A7=E8=A1=8C=E4=B8=80=E6=AC=A1=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/monitor/job/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index be92199d..ed3bbfa5 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -111,7 +111,7 @@ type="text" icon="el-icon-caret-right" @click="handleRun(scope.row)" - v-hasPermi="['monitor:job:edit']" + v-hasPermi="['monitor:job:changeStatus']" >执行一次 Date: Fri, 9 Oct 2020 11:45:06 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8D=87=E7=BA=A7fastjson=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=881.2.74?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 58183913..069f2b52 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ 2.9.2 2.3.2 1.2.5 - 1.2.73 + 1.2.74 5.2.5 5.5.0 2.5 From b9f686be5393ecb311212c8b0ff23da63a93a562 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 9 Oct 2020 11:45:33 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=8D=87=E7=BA=A7druid=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=ACv1.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 069f2b52..ccc863ad 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 1.8 3.1.1 1.3.2 - 1.1.22 + 1.2.1 1.19 2.9.2 2.3.2 From 69256940df55f2236ab4c63fe90787c774651f51 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 10 Oct 2020 09:38:21 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=8B=A5=E4=BE=9D=203.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ++-- ruoyi-admin/pom.xml | 2 +- ruoyi-admin/src/main/resources/application.yml | 4 ++-- ruoyi-common/pom.xml | 2 +- ruoyi-framework/pom.xml | 2 +- ruoyi-generator/pom.xml | 2 +- ruoyi-quartz/pom.xml | 2 +- ruoyi-system/pom.xml | 2 +- ruoyi-ui/package.json | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index ccc863ad..b9cadb77 100644 --- a/pom.xml +++ b/pom.xml @@ -6,14 +6,14 @@ com.ruoyi ruoyi - 3.1.0 + 3.2.0 ruoyi http://www.ruoyi.vip 若依管理系统 - 3.1.0 + 3.2.0 UTF-8 UTF-8 1.8 diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 2359bfea..da3aa62b 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.1.0 + 3.2.0 4.0.0 jar diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index f075b6b9..a05fb7a1 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -3,9 +3,9 @@ ruoyi: # 名称 name: RuoYi # 版本 - version: 3.1.0 + version: 3.2.0 # 版权年份 - copyrightYear: 2019 + copyrightYear: 2020 # 实例演示开关 demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index b7f275b8..bcc3eb55 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 6cb3c707..78fb0620 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml index baaefe1e..43d1245e 100644 --- a/ruoyi-generator/pom.xml +++ b/ruoyi-generator/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml index bf6b9db9..ae6abe8a 100644 --- a/ruoyi-quartz/pom.xml +++ b/ruoyi-quartz/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index 123b8b30..95717f7b 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index f81c0633..c5a6b9b2 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "3.1.0", + "version": "3.2.0", "description": "若依管理系统", "author": "若依", "license": "MIT",