| | |
| | | /** |
| | | /** |
| | | * 通用js方法封装处理 |
| | | * Copyright (c) 2019 ruoyi |
| | | */ |
| | |
| | | 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 |
| | |
| | | }) |
| | | }) |
| | | 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 ) |