gongchunyi
6 天以前 2e823e5a10496cd7721dd9861fae89d32dc911d8
fix: 日期展示格式化
已修改3个文件
26 ■■■■■ 文件已修改
src/views/equipmentManagement/inspectionManagement/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipmentManagement/upkeep/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/thePaymentLedger/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipmentManagement/inspectionManagement/index.vue
@@ -92,6 +92,7 @@
  import { Delete, Plus } from "@element-plus/icons-vue";
  import { onMounted, ref, reactive, getCurrentInstance, nextTick } from "vue";
  import { ElMessageBox } from "element-plus";
  import dayjs from "dayjs";
  // 组件引入
  import PIMTable from "@/components/PIMTable/PIMTable.vue";
@@ -194,7 +195,19 @@
      },
    },
    { prop: "registrant", label: "登记人", minWidth: 100 },
    { prop: "createTime", label: "登记日期", minWidth: 100 },
    {
      prop: "createTime",
      label: "登记日期",
      minWidth: 100,
      formatData: cell => {
        if (!cell) return "-";
        try {
          return dayjs(cell).format("YYYY-MM-DD HH:mm:ss");
        } catch {
          return cell;
        }
      },
    },
    {
      prop: "inspectionResult",
      label: "巡检结果",
src/views/equipmentManagement/upkeep/index.vue
@@ -344,7 +344,13 @@
    },
    { prop: "maintenancePerson", label: "保养人", minWidth: 100 },
    { prop: "registrant", label: "登记人", minWidth: 100 },
    { prop: "registrationDate", label: "登记日期", minWidth: 100 },
    {
      prop: "registrationDate",
      label: "登记日期",
      minWidth: 100,
      formatData: cell =>
        cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
    },
    {
      fixed: "right",
      label: "操作",
src/views/procurementManagement/thePaymentLedger/index.vue
@@ -33,6 +33,7 @@
<script setup>
import { ref } from "vue";
import { Search } from "@element-plus/icons-vue";
import dayjs from "dayjs";
// import { registrationList } from "@/api/procurementManagement/paymentLedger.js";
const tableColumn = ref([
  {
@@ -54,6 +55,8 @@
  {
    label: "登记日期",
    prop: "registrationtDate",
    formatData: cell =>
      cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
  },
]);
const tableData = ref([]);