diff --git a/ruoyi-fastapi-frontend/src/views/monitor/operlog/index.vue b/ruoyi-fastapi-frontend/src/views/monitor/operlog/index.vue
index 1743d1eca..ec4059347 100644
--- a/ruoyi-fastapi-frontend/src/views/monitor/operlog/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/monitor/operlog/index.vue
@@ -61,12 +61,12 @@
@@ -153,6 +153,7 @@
diff --git a/ruoyi-fastapi-frontend/src/views/monitor/server/index.vue b/ruoyi-fastapi-frontend/src/views/monitor/server/index.vue
index ad9d42d29..71e170c08 100644
--- a/ruoyi-fastapi-frontend/src/views/monitor/server/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/monitor/server/index.vue
@@ -112,7 +112,7 @@
启动时间 |
- {{ server.py.startTime }} |
+ {{ parseTime(server.py.startTime) }} |
运行时长 |
{{ server.py.runTime }} |
diff --git a/ruoyi-fastapi-frontend/src/views/monitor/transportCrypto/index.vue b/ruoyi-fastapi-frontend/src/views/monitor/transportCrypto/index.vue
index 95e5d9934..5e8f5088b 100644
--- a/ruoyi-fastapi-frontend/src/views/monitor/transportCrypto/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/monitor/transportCrypto/index.vue
@@ -500,29 +500,6 @@ const healthMessage = computed(() => {
})
function formatMonitorTime(value, pattern = '{y}-{m}-{d} {h}:{i}:{s}') {
- if (!value) {
- return null
- }
- if (typeof value === 'string') {
- const normalizedValue = value.trim()
- const microsecondIsoMatch = normalizedValue.match(
- /^(\d{4})-(\d{2})-(\d{2})[T\s](\d{2}):(\d{2}):(\d{2})(?:\.\d+)?$/
- )
- if (microsecondIsoMatch) {
- const [, year, month, day, hour, minute, second] = microsecondIsoMatch
- return parseTime(
- new Date(
- Number(year),
- Number(month) - 1,
- Number(day),
- Number(hour),
- Number(minute),
- Number(second)
- ),
- pattern
- )
- }
- }
return parseTime(value, pattern)
}
diff --git a/ruoyi-fastapi-frontend/src/views/system/config/index.vue b/ruoyi-fastapi-frontend/src/views/system/config/index.vue
index f904e0892..031f55046 100644
--- a/ruoyi-fastapi-frontend/src/views/system/config/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/config/index.vue
@@ -39,6 +39,7 @@
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
+ :aria-label="`日期范围(${getDisplayTimezone()})`"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@@ -170,6 +171,7 @@
diff --git a/ruoyi-fastapi-frontend/src/views/system/dict/index.vue b/ruoyi-fastapi-frontend/src/views/system/dict/index.vue
index 70289a2b4..2d8539eb5 100644
--- a/ruoyi-fastapi-frontend/src/views/system/dict/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/dict/index.vue
@@ -39,6 +39,7 @@
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
+ :aria-label="`日期范围(${getDisplayTimezone()})`"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@@ -181,6 +182,7 @@
diff --git a/ruoyi-fastapi-frontend/src/views/system/file/components/FileAclDrawer.vue b/ruoyi-fastapi-frontend/src/views/system/file/components/FileAclDrawer.vue
index 930ed07c9..ce81aaefd 100644
--- a/ruoyi-fastapi-frontend/src/views/system/file/components/FileAclDrawer.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/file/components/FileAclDrawer.vue
@@ -137,14 +137,11 @@
-
-
+
-
@@ -180,6 +177,8 @@ import {
saveFileAcl,
searchFileAclSubjects
} from "@/api/system/file";
+import { prepareTimeFields, serializeTimeFieldsForSubmit } from "@/utils/time";
+import BusinessDateTimePicker from "@/components/BusinessDateTimePicker";
const emit = defineEmits(["refresh"]);
const { proxy } = getCurrentInstance();
@@ -238,7 +237,7 @@ function open(row, selectedIds, selectedPrivateIds) {
deptOptions.value = deptResponse.data;
aclVersion.value = aclResponse.data.aclVersion;
builtinPermissions.value = aclResponse.data.builtinPermissions || [];
- entries.value = aclResponse.data.entries.map(item => ({
+ entries.value = aclResponse.data.entries.map(item => prepareTimeFields({
subjectType: item.subjectType,
subjectId: item.subjectId,
effect: item.effect,
@@ -248,7 +247,7 @@ function open(row, selectedIds, selectedPrivateIds) {
subjectOptions: [
{ subjectId: item.subjectId, subjectName: item.subjectName }
]
- }));
+ }, ['expireTime']));
})
.finally(() => {
loading.value = false;
@@ -318,17 +317,23 @@ function searchSubjectOptions(row, keyword) {
});
}
-function submit() {
+async function submit() {
if (entries.value.some(item => !item.subjectId)) {
proxy.$modal.msgError("请选择完整的授权主体");
return;
}
- const aclEntries = entries.value.map(item => ({
+ const convertedEntries = [];
+ for (const item of entries.value) {
+ const converted = await serializeTimeFieldsForSubmit(item, ['expireTime']);
+ if (!converted) return;
+ convertedEntries.push(converted);
+ }
+ const aclEntries = convertedEntries.map(item => ({
subjectType: item.subjectType,
subjectId: item.subjectId,
effect: item.effect,
includeChildren: item.subjectType === "dept" && item.includeChildren,
- expireTime: item.expireTime || undefined
+ expireTime: item.expireTime
}));
const saveAcl = () => {
saving.value = true;
diff --git a/ruoyi-fastapi-frontend/src/views/system/file/components/FileRetentionReminderDrawer.vue b/ruoyi-fastapi-frontend/src/views/system/file/components/FileRetentionReminderDrawer.vue
index bda29898b..e6811b2f2 100644
--- a/ruoyi-fastapi-frontend/src/views/system/file/components/FileRetentionReminderDrawer.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/file/components/FileRetentionReminderDrawer.vue
@@ -234,11 +234,9 @@
{{ parseTime(currentRow.expireTime) }}
-
@@ -272,6 +270,8 @@ import {
readFileRetentionReminder,
scanFileRetentionReminder
} from "@/api/system/file";
+import { toBusinessDateTimeInput, serializeTimeFieldsForSubmit } from "@/utils/time";
+import BusinessDateTimePicker from "@/components/BusinessDateTimePicker";
const emit = defineEmits(["refresh"]);
const { proxy } = getCurrentInstance();
@@ -377,10 +377,12 @@ function handleExtend(row) {
}
function submitExtend() {
- extendRef.value.validate(valid => {
+ extendRef.value.validate(async valid => {
if (!valid) return;
+ const submitData = await serializeTimeFieldsForSubmit(extendForm, ['expireTime']);
+ if (!submitData) return;
submitting.value = true;
- extendFileRetention(currentRow.value.noticeId, extendForm)
+ extendFileRetention(currentRow.value.noticeId, submitData)
.then(() => {
proxy.$modal.msgSuccess("文件保留期限已延长");
extendOpen.value = false;
@@ -425,12 +427,7 @@ function handleDispose(row) {
function defaultExtendTime(expireTime) {
const baseTime = Math.max(Date.now(), new Date(expireTime).getTime());
const target = new Date(baseTime + 30 * 24 * 60 * 60 * 1000);
- const pad = value => String(value).padStart(2, "0");
- return `${target.getFullYear()}-${pad(target.getMonth() + 1)}-${pad(
- target.getDate()
- )} ${pad(target.getHours())}:${pad(target.getMinutes())}:${pad(
- target.getSeconds()
- )}`;
+ return toBusinessDateTimeInput(target);
}
defineExpose({ open });
diff --git a/ruoyi-fastapi-frontend/src/views/system/plugin/index.vue b/ruoyi-fastapi-frontend/src/views/system/plugin/index.vue
index 24d752ddf..251fe0e7a 100644
--- a/ruoyi-fastapi-frontend/src/views/system/plugin/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/plugin/index.vue
@@ -657,7 +657,6 @@ const { proxy } = getCurrentInstance();
const { plugin_operation_type } = proxy.useDict("plugin_operation_type");
const parseTime = proxy.parseTime;
const INVALID_PLUGIN_TIME_VALUES = new Set(["", "-", "0", "0-0-0 0:0:0", "0000-00-00 00:00:00"]);
-const PLUGIN_TIME_PATTERN = /^(\d{4})-(\d{2})-(\d{2})[T\s](\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})?$/;
const OPERATION_LOG_RETENTION_CONFIG_KEY = "sys.plugin.operationLogRetentionDays";
const pluginTableRef = ref(null);
@@ -719,7 +718,7 @@ function formatPluginTime(value) {
return "-";
}
- const formatted = formatPluginIsoTime(value) || parseTime(value);
+ const formatted = parseTime(value);
if (!formatted || INVALID_PLUGIN_TIME_VALUES.has(String(formatted).trim())) {
return "-";
}
@@ -727,17 +726,6 @@ function formatPluginTime(value) {
return formatted;
}
-function formatPluginIsoTime(value) {
- if (typeof value !== "string") {
- return "";
- }
- const matched = value.trim().match(PLUGIN_TIME_PATTERN);
- if (!matched) {
- return "";
- }
-
- return `${matched[1]}-${matched[2]}-${matched[3]} ${matched[4]}:${matched[5]}:${matched[6]}`;
-}
const pluginStatusOptions = [
{ label: "已发现", value: "discovered", tagType: "info" },
{ label: "已安装", value: "installed", tagType: "success" },
diff --git a/ruoyi-fastapi-frontend/src/views/system/role/index.vue b/ruoyi-fastapi-frontend/src/views/system/role/index.vue
index bc1472c4e..3a6f42705 100644
--- a/ruoyi-fastapi-frontend/src/views/system/role/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/role/index.vue
@@ -39,6 +39,7 @@
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
+ :aria-label="`日期范围(${getDisplayTimezone()})`"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@@ -242,6 +243,7 @@
diff --git a/ruoyi-fastapi-frontend/src/views/system/user/index.vue b/ruoyi-fastapi-frontend/src/views/system/user/index.vue
index 033ba002f..d67e9937a 100644
--- a/ruoyi-fastapi-frontend/src/views/system/user/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/user/index.vue
@@ -57,6 +57,7 @@
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
+ :aria-label="`日期范围(${getDisplayTimezone()})`"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@@ -450,6 +451,7 @@
diff --git a/ruoyi-fastapi-frontend/src/views/system/user/profile/index.vue b/ruoyi-fastapi-frontend/src/views/system/user/profile/index.vue
index 26f4bd480..cc5355a95 100644
--- a/ruoyi-fastapi-frontend/src/views/system/user/profile/index.vue
+++ b/ruoyi-fastapi-frontend/src/views/system/user/profile/index.vue
@@ -35,7 +35,7 @@
创建日期
- {{ state.user.createTime }}
+ {{ parseTime(state.user.createTime) || '-' }}
@@ -55,6 +55,9 @@