Conflicts:
	ruoyi-ui/package.json
	ruoyi-ui/src/components/RuoYi/Git/index.vue
	ruoyi-ui/src/layout/components/Navbar.vue
	ruoyi-ui/src/main.js
	ruoyi-ui/src/utils/index.js
	ruoyi-ui/src/utils/permission.js
	ruoyi-ui/src/utils/ruoyi.js
	ruoyi-ui/src/views/system/dept/index.vue
	ruoyi-ui/src/views/system/menu/index.vue
	ruoyi-ui/src/views/tool/build/index.vue
	ruoyi-ui/src/views/tool/gen/genInfoForm.vue
	ruoyi/pom.xml
	ruoyi/src/main/java/com/ruoyi/common/constant/GenConstants.java
	ruoyi/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java
	ruoyi/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java
	ruoyi/src/main/java/com/ruoyi/project/system/controller/SysMenuController.java
	ruoyi/src/main/java/com/ruoyi/project/tool/gen/controller/GenController.java
	ruoyi/src/main/java/com/ruoyi/project/tool/gen/domain/GenTable.java
	ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
	ruoyi/src/main/resources/application.yml
	ruoyi/src/main/resources/mybatis/monitor/SysLogininforMapper.xml
	ruoyi/src/main/resources/mybatis/monitor/SysOperLogMapper.xml
	ruoyi/src/main/resources/vm/java/controller.java.vm
	ruoyi/src/main/resources/vm/java/domain.java.vm
	ruoyi/src/main/resources/vm/vue/index.vue.vm
This commit is contained in:
疯狂的狮子li
2020-02-24 09:56:22 +08:00
61 changed files with 4178 additions and 76 deletions

View File

@ -3,12 +3,12 @@
*/
export function formatDate(cellValue) {
if (cellValue == null || cellValue == "") return "";
var date = new Date(cellValue)
var date = new Date(cellValue)
var year = date.getFullYear()
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
}
@ -315,3 +315,71 @@ export function removeClass(ele, cls) {
ele.className = ele.className.replace(reg, ' ')
}
}
export function makeMap(str, expectsLowerCase) {
const map = Object.create(null)
const list = str.split(',')
for (let i = 0; i < list.length; i++) {
map[list[i]] = true
}
return expectsLowerCase
? val => map[val.toLowerCase()]
: val => map[val]
}
export const exportDefault = 'export default '
export const beautifierConf = {
html: {
indent_size: '2',
indent_char: ' ',
max_preserve_newlines: '-1',
preserve_newlines: false,
keep_array_indentation: false,
break_chained_methods: false,
indent_scripts: 'separate',
brace_style: 'end-expand',
space_before_conditional: true,
unescape_strings: false,
jslint_happy: false,
end_with_newline: true,
wrap_line_length: '110',
indent_inner_html: true,
comma_first: false,
e4x: true,
indent_empty_lines: true
},
js: {
indent_size: '2',
indent_char: ' ',
max_preserve_newlines: '-1',
preserve_newlines: false,
keep_array_indentation: false,
break_chained_methods: false,
indent_scripts: 'normal',
brace_style: 'end-expand',
space_before_conditional: true,
unescape_strings: false,
jslint_happy: true,
end_with_newline: true,
wrap_line_length: '110',
indent_inner_html: true,
comma_first: false,
e4x: true,
indent_empty_lines: true
}
}
// 首字母大小
export function titleCase(str) {
return str.replace(/( |^)[a-z]/g, L => L.toUpperCase())
}
// 下划转驼峰
export function camelCase(str) {
return str.replace(/-[a-z]/g, str1 => str1.substr(-1).toUpperCase())
}
export function isNumberStr(str) {
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
}