fix: 时间
1.设备维修单,库存流水,报工时间,BI大屏数据(还有配置管理),用户,角色,部门,岗位,字典,日志列表展示时间修改
已修改14个文件
58 ■■■■■ 文件已修改
src/views/bi/config/chart/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/bi/config/data-source/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/bi/dashboard/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/dv/repair/data.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/pro/feedback/data.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/workbench/components/tabs/FeedbackHistoryTab.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/dept/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/dict/data.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/loginlog/data.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/operatelog/data.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/post/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/role/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wls/transaction/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/bi/config/chart/data.ts
@@ -201,7 +201,7 @@
      field: 'createTime',
      title: '创建时间',
      width: 170,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/bi/config/data-source/data.ts
@@ -127,7 +127,7 @@
      field: 'createTime',
      title: '创建时间',
      width: 170,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/bi/dashboard/index.vue
@@ -134,8 +134,16 @@
  return formatNumber(v);
}
// 大屏表格里的日期列只展示到天(形如 2026-09-01 10:23:45 的值切成 2026-09-01),
// 图表 SQL 里的 order_time / receipt_date / create_time / hire_date 都是带时分秒的
const DATE_TIME_RE = /^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?$/;
function getCellValue(row: unknown, col: string): unknown {
  return (row as Record<string, unknown>)[col];
  const val = (row as Record<string, unknown>)[col];
  if (typeof val === 'string' && DATE_TIME_RE.test(val)) {
    return val.slice(0, 10);
  }
  return val;
}
// ======== 看板主题色 ========
src/views/mes/dv/repair/data.ts
@@ -300,13 +300,13 @@
      field: 'requireDate',
      title: '报修日期',
      width: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      field: 'finishDate',
      title: '完成日期',
      width: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      field: 'result',
@@ -330,7 +330,7 @@
      field: 'createTime',
      title: '创建时间',
      width: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/mes/pro/feedback/data.ts
@@ -13,6 +13,7 @@
  MesProWorkOrderStatusEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { formatDate } from '@vben/utils';
import { Button } from 'ant-design-vue';
@@ -20,6 +21,7 @@
import { getRouteProcessByRouteAndProcess } from '#/api/mes/pro/route/process';
import { getSimpleUserList } from '#/api/system/user';
import { loadParamDetails } from './param-state';
import { getRangePickerDefaultProps } from '#/utils';
import { MdItemSelect } from '#/views/mes/md/item/components';
import { MdWorkstationSelect } from '#/views/mes/md/workstation/components';
@@ -147,7 +149,7 @@
      field: 'feedbackTime',
      title: '报工时间',
      width: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    { field: 'approveUserNickname', title: '审核人', width: 100 },
    {
@@ -488,7 +490,11 @@
    { field: 'materialScrapQuantity', label: '料废数量' },
    { field: 'otherScrapQuantity', label: '其他废品' },
    { field: 'feedbackUserNickname', label: '报工人' },
    { field: 'feedbackTime', label: '报工时间' },
    {
      field: 'feedbackTime',
      label: '报工时间',
      render: (val) => formatDate(val) as string,
    },
    { field: 'approveUserNickname', label: '审核人' },
    { field: 'remark', label: '备注' },
  ];
src/views/mes/workbench/components/tabs/FeedbackHistoryTab.vue
@@ -191,7 +191,7 @@
        field: 'feedbackTime',
        title: '报工时间',
        width: 170,
        formatter: 'formatDateTime',
        formatter: 'formatDate',
      },
      {
        title: '操作',
src/views/system/dept/data.ts
@@ -175,7 +175,7 @@
      field: 'createTime',
      title: '创建时间',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/system/dict/data.ts
@@ -137,7 +137,7 @@
      field: 'createTime',
      title: '创建时间',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
@@ -342,7 +342,7 @@
      title: '创建时间',
      field: 'createTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/system/loginlog/data.ts
@@ -5,7 +5,7 @@
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { formatDateTime } from '@vben/utils';
import { formatDate } from '@vben/utils';
import { DictTag } from '#/components/dict-tag';
import { getRangePickerDefaultProps } from '#/utils';
@@ -88,7 +88,7 @@
      field: 'createTime',
      title: '登录日期',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
@@ -141,7 +141,7 @@
    {
      field: 'createTime',
      label: '登录日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
src/views/system/operatelog/data.ts
@@ -5,7 +5,7 @@
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { formatDateTime } from '@vben/utils';
import { formatDate } from '@vben/utils';
import { getSimpleUserList } from '#/api/system/user';
import { DictTag } from '#/components/dict-tag';
@@ -106,7 +106,7 @@
      field: 'createTime',
      title: '操作时间',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      field: 'bizId',
@@ -190,7 +190,7 @@
    {
      field: 'createTime',
      label: '操作时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'bizId',
src/views/system/post/data.ts
@@ -168,7 +168,7 @@
      field: 'createTime',
      title: '创建时间',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/system/role/data.ts
@@ -253,7 +253,7 @@
      field: 'createTime',
      title: '创建时间',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/system/user/data.ts
@@ -342,7 +342,7 @@
      field: 'createTime',
      title: '创建时间',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/wls/transaction/data.ts
@@ -203,7 +203,7 @@
      field: 'transactionTime',
      title: '事务时间',
      width: 160,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
  ];
}