假期天改为小时
This commit is contained in:
1 parent
42908b42f1
commit
71e09d0857
2 files changed
+4
-4
No files matched your search
@@ -195,11 +195,11 @@ WHERE c002001 = ?
|
|||||||
return str(value)
|
return str(value)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _format_quota(cls, value) -> str:
|
def _format_quota(cls, value, unit: str = "天") -> str:
|
||||||
formatted = cls._format_number(value)
|
formatted = cls._format_number(value)
|
||||||
if formatted == "暂无数据":
|
if formatted == "暂无数据":
|
||||||
return formatted
|
return formatted
|
||||||
return f"{formatted}天"
|
return f"{formatted}{unit}"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _resolve_response_year(record: dict | None, requested_year: int | None) -> str:
|
def _resolve_response_year(record: dict | None, requested_year: int | None) -> str:
|
||||||
@@ -216,7 +216,7 @@ WHERE c002001 = ?
|
|||||||
return f"| {index} | {title} | {response_year} | 暂无数据 | 暂无数据 | 暂无数据 |"
|
return f"| {index} | {title} | {response_year} | 暂无数据 | 暂无数据 | 暂无数据 |"
|
||||||
total = cls._format_quota(record.get('total_hours'))
|
total = cls._format_quota(record.get('total_hours'))
|
||||||
used = cls._format_quota(record.get('used_hours'))
|
used = cls._format_quota(record.get('used_hours'))
|
||||||
remaining = cls._format_quota(record.get('remaining_hours'))
|
remaining = cls._format_quota(record.get('remaining_hours'), "小时")
|
||||||
return f"| {index} | {title} | {response_year} | {total} | {used} | {remaining} |"
|
return f"| {index} | {title} | {response_year} | {total} | {used} | {remaining} |"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createI18n } from 'vue-i18n';
|
import { createI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const messages = {
|
const messages = {
|
||||||
'en': {
|
'en': {
|
||||||
|
|||||||
Reference in new issue
Block a user