- 重命名目录: openhis-server-new → healthlink-his-server - 重命名目录: openhis-ui-vue3 → healthlink-his-ui - 重命名Java类: OpenHisApplication → HealthLinkHisApplication - 重命名Java类: OpenHisMiniApp → HealthLinkHisMiniApp - 重命名组件目录: OpenHis → HealthLinkHis - 重命名样式文件: openhis.scss → healthlink-his.scss - 重命名配置: nginx-openhis.conf → nginx-healthlink-his.conf - 更新所有源码引用 (0个残留) - 更新所有文档/脚本/配置中的引用
21 lines
729 B
JavaScript
Executable File
21 lines
729 B
JavaScript
Executable File
// 类型判断
|
|
exports.type = function (o){
|
|
var s = Object.prototype.toString.call(o)
|
|
return s.match(/\[object (.*?)\]/)[1].toLowerCase()
|
|
}
|
|
|
|
// 修复date时区格式的问题
|
|
exports.repairDate = function (date) {
|
|
date = new Date(date);
|
|
return `${date.getUTCFullYear()}-${zero(date.getUTCMonth()+1)}-${zero(date.getUTCDate())} ${zero(date.getUTCHours())}:${zero(date.getUTCMinutes())}:${zero(date.getUTCSeconds())}`;
|
|
}
|
|
|
|
// 日期的格式
|
|
exports.dateFormat = function (date) {
|
|
return `${date.getFullYear()}-${zero(date.getMonth()+1)}-${zero(date.getDate())} ${zero(date.getHours())}:${zero(date.getMinutes())}:${zero(date.getSeconds())}`
|
|
}
|
|
|
|
// 小于10补0
|
|
function zero(d){
|
|
return d.toString().padStart(2,'0')
|
|
} |