qushaowei
2025-05-30 25fee48ceca7a54bc6008eb2e2fb6d8ea801a50e
src/views/eam/RepairOrderList.vue
@@ -1,42 +1,54 @@
<template>
  <a-card
    title="维修工单"
    title=""
    :bordered="false"
  >
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
        <a-row
          :gutter="24"
          style="margin-bottom: 1%;"
        >
          <a-col
            :xl="24"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="统一编号群">
              <a-textarea
                placeholder="请输入所有统一编码,须用空格隔开,否则可能查询出错误信息"
                v-model="queryParam.nums"
                :auto-size="{ minRows: 2, maxRows:2 }"
              ></a-textarea>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col
            :md="4"
            :sm="8"
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="工单状态">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择工单状态"
                :triggerChange="true"
                dictCode="repair_order_status"
                dictCode="true_repair_status"
                v-model="queryParam.status"
              />
            </a-form-item>
          </a-col>
          <a-col
            :md="4"
            :sm="8"
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="单据号">
              <a-input
@@ -46,19 +58,37 @@
            </a-form-item>
          </a-col>
          <a-col
            :md="4"
            :sm="8"
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="设备编码">
            <a-form-item label="统一编码">
              <a-input
                placeholder="请输入设备编码"
                placeholder="请输入统一编码"
                v-model="queryParam.equipmentNum"
              ></a-input>
            </a-form-item>
          </a-col>
          <!-- <a-col :span="3">
            <span
              style="float: left;overflow: hidden;"
              class="table-page-search-submitButtons"
            >
              <a
                @click="handleToggleSearch"
                style="margin-left: 8px"
              >
                {{ toggleSearchStatus ? '查询条件收起' : '详细查询' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
              </a>
            </span>
          </a-col> -->
          <a-col
            :md="4"
            :sm="8"
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="设备名称">
              <a-input
@@ -67,27 +97,140 @@
              ></a-input>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col
            :md="4"
            :sm="8"
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-button
              type="primary"
              @click="searchQuery"
              icon="search"
              style="margin-right: 5px"
            >查询</a-button>
            <a-button
              @click="searchReset"
              icon="reload"
            >重置</a-button>
            <a-form-item label="设备所属分类">
              <j-dict-select-tag
                dictCode="mom_eam_equipment_category,name,id"
                placeholder="请输入搜索条件并选择"
                v-model="queryParam.equipmentCategoryId"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="工区">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择资工区"
                :triggerChange="true"
                dictCode="mom_base_area,name,id,del_flag!='1'"
                v-model="queryParam.factoryModelId"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="是否关键设备">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择是否关键设备"
                :triggerChange="true"
                dictCode="specific_equipment"
                v-model="queryParam.specificEquipment"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="维修状态">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择维修状态"
                :triggerChange="true"
                dictCode="repair_status"
                v-model="queryParam.repairOrderUda1"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="ABC标识">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择ABC标识"
                :triggerChange="true"
                dictCode="ABC-standard-result"
                v-model="queryParam.equipmentImportanceId"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="故障原因">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择故障原因"
                :triggerChange="true"
                dictCode="repair_order_fault_cause"
                v-model="queryParam.faultCause"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="报修时间">
              <a-range-picker
                style="width: 100%;"
                format="YYYY-MM-DD HH:mm:ss"
                v-model="faultTime"
                @change="timeChange"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="创建时间">
              <a-range-picker
                style="width: 100%;"
                format="YYYY-MM-DD HH:mm:ss"
                v-model="createTimes"
                @change="timeChangeCreate"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-dropdown>
      <!-- <a-dropdown>
        <a-menu slot="overlay">
          <a-menu-item
            key="1"
@@ -96,8 +239,8 @@
          <a-menu-item
            key="2"
            @click="handleAddPre(2)"
          ><a-icon type="copy" />参照保修故障单</a-menu-item>
        <a-menu-item
          ><a-icon type="copy" />参照故障报修单</a-menu-item>
          <a-menu-item
            key="2"
            @click="handleAddPre(3)"
          ><a-icon type="copy" />参照项目性维修</a-menu-item>
@@ -106,7 +249,23 @@
          type="primary"
          icon="plus"
        >新增</a-button>
      </a-dropdown>
      </a-dropdown> -->
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
        style="margin-right: 5px"
      >查询</a-button>
      <a-button
        @click="searchReset"
        icon="reload"
      >重置</a-button>
      <a-button
        type="primary"
        icon="download"
        @click="handleExportXls('维修履历')"
      >导出</a-button>
      <a-button
        hidden
        type="primary"
@@ -114,6 +273,12 @@
        @click="handleDispatch()"
        :disabled="selectionRows.length==0"
      >派工</a-button>
      <a-button
        type="primary"
        icon="plus"
        @click="getReports"
        v-has="'repair:accept'"
      >领取</a-button>
      <!-- <a-button type="primary" icon="download" @click="handleExportXls('维修工单')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
@@ -141,123 +306,56 @@
        bordered
        rowKey="id"
        class="j-table-force-nowrap"
        :scroll="{ x: 'calc(2700px + 50%)', y: 900 }"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="rowSelection"
        @change="handleTableChange"
        :customRow="clickThenSelect"
        :rowClassName="tableRowClass"
        :scroll="{ x: 'calc(1700px + 50%)', y: 900 }"
      >
        <template
          slot="htmlSlot"
        <span
          slot="jell"
          slot-scope="text"
        >
          <div v-html="text"></div>
        </template>
        <template
          slot="imgSlot"
          slot-scope="text,record"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无图片</span>
          <img
            v-else
            :src="getImgView(text)"
            :preview="record.id"
            height="25px"
            alt=""
            style="max-width:80px;font-size: 12px;font-style: italic;"
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </template>
        <template
          slot="fileSlot"
        </span>
        <span
          slot="specificEquipment"
          slot-scope="text"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无文件</span>
          <a-button
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)"
          >
            下载
          </a-button>
        </template>
        <!-- <span
          slot="action"
            style="color:red;"
          />
        </span>
        <span
          slot="num"
          slot-scope="text, record"
        >
          <a-popconfirm
            title="确定下发吗?"
            @confirm="() => handleDistribute(record)"
          >
            <a v-if="record.status=='0'">下发</a>
          </a-popconfirm>
          <a-divider
            type="vertical"
            v-if="record.status=='0'"
          />
          <a-popconfirm
            title="确定撤回吗?"
            @confirm="() => handleWithdraw(record)"
          >
            <a v-if="record.status=='1'">撤回</a>
          </a-popconfirm>
          <a-divider
            type="vertical"
            v-if="record.status=='1'"
          />
          <a-popconfirm
            title="确定领取吗?"
            @confirm="() => handleReceive(record)"
          >
            <a v-if="record.status=='1'">领取</a>
          </a-popconfirm>
          <a-divider
            type="vertical"
            v-if="record.status=='1'"
          />
          <a
            v-if="record.status === '2' || record.status === '3' ||record.status === '4'"
            v-if="record.status === '3' || record.status === '4' ||record.status === '5'  ||record.status === '7' "
            class="lot"
            @click="handleOrderExe(record)"
          >执行</a>
          <a-divider
            type="vertical"
            v-if="record.status === '2' || record.status === '3' ||record.status === '4'"
          />
          <a
            @click="handleEditPre(record)"
            v-if="record.status=='0'"
          >编辑</a>
          <a-divider
            type="vertical"
            v-if="record.status=='0'"
          />
          <a-dropdown v-if="record.status=='0'">
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span> -->
          ><j-ellipsis
              :value="text"
              :length="15"
            /></a>
          <span v-else> <j-ellipsis
              :value="text"
              :length="15"
            /></span>
        </span>
        <span
          slot="action"
          slot-scope="text, record"
@@ -292,10 +390,10 @@
            v-if="record.status == '1' && record.dispatchMethod == '1'  "
            @click="handleAssignOrder(record)"
          >派工</a>
          <a
          <!-- <a
            v-if="record.status == '2' && record.dispatchMethod != null "
            @click="handleAssignOrder(record)"
          >改派</a>
          >改派</a> -->
          <a-divider
            v-if="record.status == '1' || record.status == '2' "
            type="vertical"
@@ -303,6 +401,7 @@
          <a
            v-if="record.status === '2' || record.status === '3' "
            @click="handleOrderExe(record)"
            v-has="'repair:excute'"
          >执行</a>
          <a-divider
            v-if="record.status === '2' || record.status === '3' "
@@ -334,6 +433,44 @@
          </a-dropdown>
        </span>
        <template
          slot="equipmentNum"
          slot-scope="text, record"
        >
          <a-popover title="故障原因统计">
            <template slot="content">
              <p
                v-for="(faultCauseMap, index) in record.equipmentFaultCause"
                :key="index"
              >
                <span class="fontweight">{{ faultCauseMap.faultCause }}:{{ faultCauseMap.total }}</span>
              </p>
            </template>
            <span>
              {{ record.equipmentNum }}
            </span>
          </a-popover>
        </template>
        <template
          slot="faultCauseCount"
          slot-scope="text, record"
        >
          <a-popover title="故障原因统计">
            <template slot="content">
              <p
                v-for="(faultCauseMap, index) in record.allFaultCause"
                :key="index"
              >
                <span class="fontweight">{{ faultCauseMap.faultCause }}:{{ faultCauseMap.total }}</span>
              </p>
            </template>
            <span>
              {{ record.faultCauseCount }}
            </span>
          </a-popover>
        </template>
      </a-table>
    </div>
@@ -345,11 +482,12 @@
        tab="故障描述"
        key="1"
      >
        <FaultDescriptionList ref="FaultDescriptionList"/>
        <FaultDescriptionList ref="FaultDescriptionList" />
      </a-tab-pane>
      <a-tab-pane
        tab="维修要求"
        key="2"
        v-if="false"
      >
        <RepairOrderDetailList
          :mainId="repairOrderDetailMainId"
@@ -360,6 +498,7 @@
        tab="计划用料"
        key="3"
        forceRender
        v-if="false"
      >
        <RepairOrderPlanMaterialList
          :addStatus="sonsAddStatus"
@@ -370,6 +509,7 @@
        tab="危险防控"
        key="4"
        forceRender
        v-if="false"
      >
        <RepairOrderRiskPreventionList
          :addStatus="sonsAddStatus"
@@ -380,6 +520,7 @@
        tab="作业指导书"
        key="5"
        forceRender
        v-if="false"
      >
        <EquipmentDocumentList
          :addStatus="sonsAddStatus"
@@ -390,8 +531,9 @@
        tab="实际用料"
        key="6"
        forceRender
        v-if="!sonsAddStatus&&selectedRowKeys.length!=0"
        v-if="false"
      >
        <!-- v-if="!sonsAddStatus&&selectedRowKeys.length!=0" -->
        <RepairOrderActualMaterialList :mainId="repairOrderActualMaterialMainId" />
      </a-tab-pane>
      <a-tab-pane
@@ -424,15 +566,21 @@
    <repair-order-excute-drawer
      ref="repairOrderExcuteDrawer"
      @ok="modalFormOk"
      :repairOrderId="repairOrderFaultAnalysisMainId"
      :repairOrder="excuteRepairOrder"
    >
    </repair-order-excute-drawer>
    <fault-report-repair
      ref="FaultReportRepair"
      @ok="modalFormOk"
    ></fault-report-repair>
  </a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RepairOrderModal from './modules/repairorder/RepairOrderModal'
import { getAction } from '@/api/manage'
import JEllipsis from '@/components/jeecg/JEllipsis'
import RepairOrderDetailList from './RepairOrderDetailList'
import RepairOrderRiskPreventionList from './RepairOrderRiskPreventionList'
import RepairOrderFaultAnalysisList from './RepairOrderFaultAnalysisList'
@@ -442,13 +590,18 @@
import EquipmentDocumentList from './RepairOrderEquipmentDocumentList'
import '@/assets/less/TableExpand.less'
import { putAction } from '../../api/manage'
import RepairOrderAssignTask from './modules/repairorder/RepairOrderAssignTask.vue'
import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer.vue'
import RepairOrderAssignTask from './modules/repairorder/RepairOrderAssignTask'
import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer'
import FaultDescriptionList from './FaultDescriptionList'
import FaultReportRepair from './modules/repairorder/moudles/select/FaultReportRepair.vue'
import store from '@/store'
import dayjs from 'dayjs'
import moment from 'moment'
export default {
  name: "RepairOrderList",
  mixins: [JeecgListMixin],
  components: {
    JEllipsis,
    RepairOrderDetailList,
    RepairOrderRiskPreventionList,
    RepairOrderFaultAnalysisList,
@@ -459,32 +612,73 @@
    RepairOrderModal,
    RepairOrderAssignTask,
    RepairOrderExcuteDrawer,
    FaultDescriptionList
    FaultDescriptionList,
    FaultReportRepair,
    store
  },
  mounted() {
    let intervalId = setInterval(() => {
      this.loadData();
    }, 600 * 1000); // 1000毫秒,即1秒
  },
  data() {
    return {
      description: '维修工单管理页面',
      // 表头
      faultTime: [],
      createTimes: [],
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '关键设备',
          align: "center",
          dataIndex: 'specificEquipment',
          width: 90,
          scopedSlots: { customRender: 'specificEquipment' }
        },
        {
          title: 'ABC标识',
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '状态',
          align: "center",
          dataIndex: 'status_dictText'
        },
        {
          title: '维修状态',
          align: "center",
          dataIndex: 'repairOrderUda1_dictText',
          customRender: function (t, r, index) {
            return t === null || r.repairOrderUda1 === null ? '/' : t;
          }
        },
        {
          title: '单据号',
          align: "center",
          dataIndex: 'num'
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' }
        },
        // {
        //   title: '业务类型',
        //   align: "center",
        //   dataIndex: 'businessType_dictText'
        // },
        {
          title: '业务类型',
          title: '统一编码',
          align: "center",
          dataIndex: 'businessType_dictText'
        },
        {
          title: '设备编码',
          align: "center",
          dataIndex: 'equipmentNum'
          dataIndex: 'equipmentNum',
          scopedSlots: { customRender: 'equipmentNum' }
        },
        {
          title: '设备名称',
@@ -501,50 +695,82 @@
          align: "center",
          dataIndex: 'departId_dictText'
        },
        // {
        //   title: '紧急程度',
        //   align: "center",
        //   dataIndex: 'urgency_dictText'
        // },
        // {
        //   title: '维保方式',
        //   align: "center",
        //   dataIndex: 'maintenanceMethod_dictText'
        // },
        // {
        //   title: '外委单位',
        //   align: "center",
        //   dataIndex: 'outsourcingUnitName'
        // },
        {
          title: '紧急程度',
          title: '维修班组',
          align: "center",
          dataIndex: 'urgency_dictText'
        },
        {
          title: '维保方式',
          align: "center",
          dataIndex: 'maintenanceMethod_dictText'
        },
        {
          title: '委外单位',
          align: "center",
          dataIndex: 'outsourcingUnitName'
        },
        {
          title: '责任班组',
          align: "center",
          dataIndex: 'teamId_dictText'
          dataIndex: 'teamId_dictText',
          scopedSlots: {
            customRender: 'jell'
          }
        },
        {
          title: '责任人',
          align: "center",
          dataIndex: 'responsibilityId_dictText'
        },
        {
          title: '派工方式',
          align: "center",
          dataIndex: 'dispatchMethod_dictText'
        },
        // {
        //   title: '派工方式',
        //   align: "center",
        //   dataIndex: 'dispatchMethod_dictText'
        // },
        // {
        //   title: '特种设备',
        //   align: "center",
        //   dataIndex: 'specificEquipment_dictText'
        // },
        {
          title: '故障描述',
          title: '故障时间',
          align: "center",
          dataIndex: 'faultDescription'
          dataIndex: 'faultTime'
        },
        // {
        //   title: '故障时间',
        //   title: '报修人',
        //   align: "center",
        //   dataIndex: 'faultTime'
        //   dataIndex: 'errUda2',
        // },
        {
          title: '故障描述',
          align: "center",
          dataIndex: 'faultDescription',
          scopedSlots: {
            customRender: 'jell'
          }
        },
        {
          title: '故障原因',
          align: "center",
          dataIndex: 'faultCauseCount',
          scopedSlots: { customRender: 'faultCauseCount' }
        },
        // {
        //   title: '故障现象',
        //   align: "center",
        //   dataIndex: 'faultPhenomenon'
        // },
        // {
        //   title: '故障排除',
        //   align: "center",
        //   dataIndex: 'faultRemove'
        // },
        // {
        //   title: '预防措施',
        //   align: "center",
        //   dataIndex: 'preventiveMeasure'
        // },
        // {
        //   title: '故障照片',
@@ -557,36 +783,36 @@
        //   align: "center",
        //   dataIndex: 'isStop_dictText'
        // },
        {
          title: '工时定额',
          align: "center",
          dataIndex: 'workingHourQuota'
        },
        {
          title: '实际工时',
          align: "center",
          dataIndex: 'actualHour'
        },
        {
          title: '计划开始时间',
          align: "center",
          dataIndex: 'planStartTime'
        },
        {
          title: '计划结束时间',
          align: "center",
          dataIndex: 'planEndTime'
        },
        {
          title: '实际开始时间',
          align: "center",
          dataIndex: 'actualStartTime'
        },
        {
          title: '实际结束时间',
          align: "center",
          dataIndex: 'actualEndTime'
        },
        // {
        //   title: '工时定额',
        //   align: "center",
        //   dataIndex: 'workingHourQuota'
        // },
        // {
        //   title: '实际工时',
        //   align: "center",
        //   dataIndex: 'actualHour'
        // },
        // {
        //   title: '计划开始时间',
        //   align: "center",
        //   dataIndex: 'planStartTime'
        // },
        // {
        //   title: '计划结束时间',
        //   align: "center",
        //   dataIndex: 'planEndTime'
        // },
        // {
        //   title: '实际开始时间',
        //   align: "center",
        //   dataIndex: 'actualStartTime'
        // },
        // {
        //   title: '实际结束时间',
        //   align: "center",
        //   dataIndex: 'actualEndTime'
        // },
        {
          title: '创建人',
          align: "center",
@@ -602,9 +828,10 @@
          dataIndex: 'action',
          align: "center",
          fixed: "right",
          width: 230,
          width: 130,
          scopedSlots: { customRender: 'action' },
        }
      ],
      url: {
        list: "/eam/repairOrder/list",
@@ -618,13 +845,11 @@
        orderReceive: "eam/repairOrder/receive",
        orderStart: "eam/repairOrder/start"
      },
      dictOptions: {
      },
      /* 分页参数 */
      ipagination: {
        current: 1,
        pageSize: 5,
        pageSizeOptions: ['5', '10', '50'],
        pageSize: 20,
        pageSizeOptions: ['5', '10', '20', '50'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " 共" + total + "条"
        },
@@ -647,9 +872,6 @@
      sonsAddStatus: false,
    }
  },
  // created() {
  //   this.getSuperFieldList();
  // },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
@@ -676,8 +898,14 @@
  },
  methods: {
    timeChange() {
      this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
    },
    timeChangeCreate() {
      this.queryParam.createStartTime = moment(this.createTimes[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.createEndTime = moment(this.createTimes[1]).format("YYYY-MM-DD HH:mm:ss")
    },
    clickThenSelect(record) {
      return {
        on: {
@@ -742,6 +970,7 @@
      }
      this.onClearSelected()
      this.queryParam.repairOrderType = 0;
      this.queryParam.userId = store.getters.userInfo.id
      var params = this.getQueryParams();//查询条件
      this.loading = true;
      getAction(this.url.list, params).then((res) => {
@@ -754,24 +983,10 @@
        }
        this.loading = false;
        this.$refs.FaultDescriptionList.faultId = '-1'
        this.excuteRepairOrder = {}
      })
    },
    // getSuperFieldList() {
    //   let fieldList = [];
    //   fieldList.push({ type: 'string', value: 'num', text: '维修订单号', dictCode: '' })
    //   fieldList.push({ type: 'string', value: 'equipmentId', text: '设备台账ID', dictCode: '' })
    //   fieldList.push({ type: 'string', value: 'reportRepairId', text: '故障报修单ID', dictCode: '' })
    //   fieldList.push({ type: 'string', value: 'teamId', text: '班组ID', dictCode: '' })
    //   fieldList.push({ type: 'string', value: 'faultDescription', text: '故障描述', dictCode: '' })
    //   fieldList.push({ type: 'datetime', value: 'faultTime', text: '故障时间' })
    //   fieldList.push({ type: 'string', value: 'photo', text: '故障照片', dictCode: '' })
    //   fieldList.push({ type: 'string', value: 'isStop', text: '是否停机', dictCode: '' })
    //   fieldList.push({ type: 'datetime', value: 'actualEndTime', text: '实际结束时间' })
    //   fieldList.push({ type: 'string', value: 'maintenanceMethod', text: '维保方式', dictCode: '' })
    //   fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' })
    //   fieldList.push({ type: 'datetime', value: 'createTime', text: '创建时间' })
    //   this.superFieldList = fieldList
    // },
    handleAddPre(isSelfCreate) {
      this.isSelfCreate = isSelfCreate;
      this.handleAdd();
@@ -781,9 +996,9 @@
      if (record.reportRepairId != null && record.reportRepairId != undefined && record.reportRepairId != '') {
        this.isSelfCreate = '2';
      }
      else if(record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != ''){
      else if (record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != '') {
        this.isSelfCreate = '3';
      }else{
      } else {
        this.isSelfCreate = '1';
      }
      this.handleEdit(record);
@@ -841,6 +1056,12 @@
      this.$refs.repairOrderExcuteDrawer.visible = true
      this.$refs.repairOrderExcuteDrawer.title = '维修工单执行'
    },
    handleDetail(record) {
      this.excuteRepairOrder = record;
      this.excuteRepairOrder.status = '4';
      this.$refs.repairOrderExcuteDrawer.visible = true
      this.$refs.repairOrderExcuteDrawer.title = '维修详情'
    },
    searchQuery() {
      this.loadData(1)
@@ -855,11 +1076,37 @@
      this.loadData(1)
      this.onClearSelected()
      this.$refs.FaultDescriptionList.faultId = '-1'
      this.faultTime = []
      this.createTimes = []
    },
    getReports() {
      this.$refs.FaultReportRepair.title = '故障报修单';
      this.$refs.FaultReportRepair.loadData();
      this.$refs.FaultReportRepair.visible = true;
    },
    tableRowClass(record, index) {
      if ("2" === record.status) {
        if (record.specificEquipment === '0' && dayjs(record.faultTime).add(12, 'hour') < dayjs()) {
          return 'error'
        } else if (dayjs(record.faultTime).add(7, 'day') < dayjs()) {
          return 'primary'
        }
      }
    },
  },
}
</script>
<style scoped>
<style lang="less" scoped>
@import '~@assets/less/common.less';
/deep/.error {
  color: red;
  font-weight: bold;
}
/deep/.primary {
  color: rgb(255, 0, 251);
  font-weight: bold;
}
</style>