gongchunyi
6 小时以前 6a0907fce051418977f2d02ac408d890c28ee273
src/views/safeProduction/lineInspection/index.vue
@@ -343,10 +343,10 @@
          {{ inspectionDetail.lineName || "--" }}
        </el-descriptions-item>
        <el-descriptions-item label="计划巡检时间">
          {{ inspectionDetail.planTime || "--" }}
          {{ formatDateOnly(inspectionDetail.planTime) }}
        </el-descriptions-item>
        <el-descriptions-item label="实际巡检时间">
          {{ inspectionDetail.actualInspectionTime || "--" }}
          {{ formatDateOnly(inspectionDetail.actualInspectionTime) }}
        </el-descriptions-item>
        <el-descriptions-item label="巡检结果">
          <el-tag :type="getInspectionResultType(inspectionDetail.inspectionResult)" size="small">
@@ -476,7 +476,7 @@
          {{ currentInspection.lineName || "--" }}
        </el-descriptions-item>
        <el-descriptions-item label="计划时间">
          {{ currentInspection.planTime || "--" }}
          {{ formatDateOnly(currentInspection.planTime) }}
        </el-descriptions-item>
        <el-descriptions-item label="巡检项目" :span="2">
          {{ currentInspection.inspectionProject || "--" }}
@@ -1051,6 +1051,7 @@
import { computed, getCurrentInstance, onMounted, reactive, ref } from "vue";
import { Delete, Plus, Search } from "@element-plus/icons-vue";
import { ElMessage, ElMessageBox } from "element-plus";
import dayjs from "dayjs";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
import ImageUpload from "@/components/AttachmentUpload/image/index.vue";
import { userListNoPage } from "@/api/system/user.js";
@@ -1080,6 +1081,13 @@
const { hidden_danger_type } = proxy.useDict("hidden_danger_type");
const userStore = useUserStore();
const currentUserId = computed(() => Number(userStore.id));
const formatDateOnly = value => {
  if (!value) {
    return "--";
  }
  const date = dayjs(value);
  return date.isValid() ? date.format("YYYY-MM-DD") : "--";
};
const activeTab = ref("task");
const tableLoading = ref(false);
@@ -1402,9 +1410,9 @@
  { label: "巡检名称", prop: "inspectionName", minWidth: 135, showOverflowTooltip: true, align: "left" },
  { label: "线路名称", prop: "lineName", minWidth: 130, showOverflowTooltip: true, align: "left" },
  { label: "巡检项目", prop: "inspectionProject", minWidth: 150, showOverflowTooltip: true, align: "left" },
  { label: "计划巡检时间", prop: "planTime", width: 165, showOverflowTooltip: true, align: "center" },
  { label: "计划巡检时间", prop: "planTime", width: 165, showOverflowTooltip: true, align: "center", formatData: formatDateOnly },
  { label: "巡检结果", prop: "inspectionResult", width: 90, dataType: "slot", slot: "inspectionResult", align: "center" },
  { label: "实际巡检时间", prop: "actualInspectionTime", width: 165, showOverflowTooltip: true, align: "center" },
  { label: "实际巡检时间", prop: "actualInspectionTime", width: 165, showOverflowTooltip: true, align: "center", formatData: formatDateOnly },
  { label: "巡检人", prop: "inspectorName", minWidth: 105, dataType: "slot", slot: "inspectorName", align: "center" },
  { label: "状态", prop: "status", width: 90, dataType: "slot", slot: "status", align: "center" }
];
@@ -1414,9 +1422,9 @@
  { label: "巡检名称", prop: "inspectionName", minWidth: 135, showOverflowTooltip: true, align: "left" },
  { label: "线路名称", prop: "lineName", minWidth: 130, showOverflowTooltip: true, align: "left" },
  { label: "巡检项目", prop: "inspectionProject", minWidth: 145, showOverflowTooltip: true, align: "left" },
  { label: "计划巡检时间", prop: "planTime", width: 165, showOverflowTooltip: true, align: "center" },
  { label: "计划巡检时间", prop: "planTime", width: 165, showOverflowTooltip: true, align: "center", formatData: formatDateOnly },
  { label: "巡检结果", prop: "inspectionResult", width: 90, dataType: "slot", slot: "inspectionResult", align: "center" },
  { label: "实际巡检时间", prop: "actualInspectionTime", width: 165, showOverflowTooltip: true, align: "center" },
  { label: "实际巡检时间", prop: "actualInspectionTime", width: 165, showOverflowTooltip: true, align: "center", formatData: formatDateOnly },
  { label: "巡检人", prop: "inspectorName", minWidth: 105, dataType: "slot", slot: "inspectorName", align: "center" },
  { label: "状态", prop: "status", width: 90, dataType: "slot", slot: "status", align: "center" },
  {