WXL
2024-09-12 2c4c416bf7950c72ffa2543a218e4fd993ee2af2
src/utils/ruoyi.js
@@ -49,6 +49,20 @@
  });
  return time_str;
}
// 出院/入院天数计算
export function Daycount(dateString1, dateString2){
// 将日期字符串转换为日期对象
var date1 = new Date(dateString1);
var date2 = new Date(dateString2);
// 计算时间差(毫秒)
var timeDifference = date2 - date1;
// 将时间差转换为天数
var daysDifference = Math.ceil(timeDifference / (1000 * 3600 * 24));
return daysDifference;
}
// 过滤器
export function formatTime(val) {
  if (val) {