Browse Source

修改时间统计中 时间的显示形式

Reiskuchen 5 years ago
parent
commit
66685622e3

+ 4 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TimeCalculationServiceImpl.java

@@ -202,8 +202,8 @@ public class TimeCalculationServiceImpl extends ServiceImpl<TimeCalculationMappe
         hour = time / 3600;
         hour = time / 3600;
         time = time % 3600;
         time = time % 3600;
         minute = time / 60;
         minute = time / 60;
-        second = minute % 60;
-        return hour + "小时" + minute + "分" + second + "秒";
+//        second = minute % 60;
+        return minute < 10 ? hour + ":0" + minute : hour + ":" + minute;
     }
     }
 
 
     //秒数转化为时间字符串 Long参数豪华限定版
     //秒数转化为时间字符串 Long参数豪华限定版
@@ -212,7 +212,7 @@ public class TimeCalculationServiceImpl extends ServiceImpl<TimeCalculationMappe
         hour = time / 3600;
         hour = time / 3600;
         time = time % 3600;
         time = time % 3600;
         minute = time / 60;
         minute = time / 60;
-        second = minute % 60;
-        return hour + "小时" + minute + "分" + second + "秒";
+//        second = minute % 60;
+        return minute < 10 ? hour + ":0" + minute : hour + ":" + minute;
     }
     }
 }
 }

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/desktop/index.vue

@@ -26,7 +26,7 @@
             </div>
             </div>
           </div>
           </div>
           <div class="one_card_txt">
           <div class="one_card_txt">
-            <!-- null 0-编程,1-查资料,2-看文档,3-做设计,4-美工,5-运营,6-看小说,7-打游戏,8-听音乐 后续需要重新约定 -->
+            <!-- null 0-编程,1-查资料,2-看文档,3-做设计,4-美工,5-运营,6-看小说,7-打游戏,8-听音乐 -->
             <span>{{converType(item.pic_type == null ? 0 : item.pic_type+1)}}</span>
             <span>{{converType(item.pic_type == null ? 0 : item.pic_type+1)}}</span>
             <div class="bottom clearfix">
             <div class="bottom clearfix">
               <el-link>
               <el-link>