zhangherong
2025-04-17 e7dfcbaf4353da26a46566381e304c9d29390c5a
src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue
@@ -2,7 +2,7 @@
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
    <div class="table-page-search-wrapper" v-if="isDisplayOperation">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
@@ -37,7 +37,7 @@
    </div>
    <!-- 操作按钮区域 -->
    <div class="table-operator">
    <div class="table-operator" v-if="isDisplayOperation">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
@@ -45,8 +45,8 @@
            <a-icon type="delete" />
            作废
          </a-menu-item>
          <a-menu-item key="1" @click="handlerBatchCollect">
            <a-icon type="delete" />
          <a-menu-item key="2" @click="handlerBatchCollect">
            <a-icon type="form" />
            领取
          </a-menu-item>
        </a-menu>
@@ -58,7 +58,7 @@
    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
        style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
@@ -106,6 +106,7 @@
    <!-- 表单区域 -->
    <eamWeekMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamWeekMaintenanceOrder-modal>
    <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal"></week-maintenance-approval-modal>
  </a-card>
</template>
@@ -115,17 +116,26 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
import { deleteAction, getAction } from '@api/manage'
import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal'
export default {
  name: 'EamWeekMaintenanceOrderList',
  mixins: [JeecgListMixin],
  components: {
    LxSearchEquipmentSelect,
    EamWeekMaintenanceOrderModal
    EamWeekMaintenanceOrderModal,
    WeekMaintenanceApprovalModal
  },
  props: {
    isDisplayOperation: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
      description: '周保工单管理页面',
      disableMixinCreated: true,
      // 表头
      columns: [
        {
@@ -134,6 +144,7 @@
          key: 'rowIndex',
          width: 60,
          align: 'center',
          fixed: 'left',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
@@ -141,80 +152,134 @@
        {
          title: '工单号',
          align: 'center',
          dataIndex: 'orderNum'
          dataIndex: 'orderNum',
          fixed: 'left',
          width: 60,
        },
        {
          title: '设备编号',
          align: 'center',
          dataIndex: 'equipmentCode'
          dataIndex: 'equipmentCode',
          fixed: 'left',
          width: 60,
        },
        {
          title: '设备名称',
          align: 'center',
          dataIndex: 'equipmentName'
          dataIndex: 'equipmentName',
          fixed: 'left',
          width: 60,
        },
        {
          title: '标准名称',
          align: 'center',
          dataIndex: 'standardId_dictText'
          dataIndex: 'standardId_dictText',
          width: 100,
        },
        {
          title: '计划保养日期',
          align: 'center',
          dataIndex: 'maintenanceDate'
          dataIndex: 'maintenanceDate',
          width: 60,
        },
        {
          title: '实际开始时间',
          align: 'center',
          dataIndex: 'actualStartTime'
          dataIndex: 'actualStartTime',
          width: 60,
        },
        {
          title: '实际结束时间',
          align: 'center',
          dataIndex: 'actualEndTime'
          dataIndex: 'actualEndTime',
          width: 60,
        },
        {
          title: '保养人',
          align: 'center',
          dataIndex: 'operator_dictText'
          dataIndex: 'operator_dictText',
          width: 60,
        },
        {
          title: '保养状态',
          align: 'center',
          dataIndex: 'maintenanceStatus_dictText'
          dataIndex: 'maintenanceStatus_dictText',
          width: 60,
        },
        {
          title: '创建方式',
          align: 'center',
          dataIndex: 'creationMethod_dictText'
          dataIndex: 'creationMethod_dictText',
          width: 60,
        },
        {
          title: '确认人',
          align: 'center',
          dataIndex: 'confirmUser_dictText'
          dataIndex: 'confirmUser_dictText',
          width: 60,
        },
        {
          title: '确认时间',
          align: 'center',
          dataIndex: 'confirmTime'
          dataIndex: 'confirmTime',
          width: 60,
        },
        {
          title: '保养图片',
          title: '确认意见',
          align: 'center',
          dataIndex: 'imageFiles'
          dataIndex: 'confirmComment',
          width: 60,
        },
        {
          title: '初验收人',
          align: 'center',
          dataIndex: 'initialAcceptanceUser_dictText',
          width: 60,
        },
        {
          title: '初验收时间',
          align: 'center',
          dataIndex: 'initialAcceptanceTime',
          width: 60,
        },
        {
          title: '初验收意见',
          align: 'center',
          dataIndex: 'initialAcceptanceComment',
          width: 60,
        },
        {
          title: '终验收人',
          align: 'center',
          dataIndex: 'finalAcceptanceUser_dictText',
          width: 60,
        },
        {
          title: '终验收时间',
          align: 'center',
          dataIndex: 'finalAcceptanceTime',
          width: 60,
        },
        {
          title: '终验收意见',
          align: 'center',
          dataIndex: 'finalAcceptanceComment',
          width: 60,
        },
        {
          title: '备注',
          align: 'center',
          dataIndex: 'remark',
          editable: true,
          width: 60,
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' }
        }
        // {
        //   title: '操作',
        //   dataIndex: 'action',
        //   align: 'center',
        //   fixed: 'right',
        //   width: 100,
        //   scopedSlots: { customRender: 'action' }
        // }
      ],
      url: {
        list: '/eam/weekMaintenanceOrder/list',
@@ -223,6 +288,21 @@
        collect: '/eam/weekMaintenanceOrder/collect',
      }
    }
  },
  created() {
    if (!this.isDisplayOperation) {
      return
    }
    const operationColumn = {
      title: '操作',
      dataIndex: 'action',
      align: 'center',
      fixed: 'right',
      width: 147,
      scopedSlots: { customRender: 'action' }
    }
    this.columns = [...this.columns, operationColumn]
    this.loadData(1)
  },
  computed: {},
  methods: {
@@ -309,7 +389,7 @@
        this.$message.error("请设置url.collect属性!")
        return
      }
      var that = this;
      let that = this;
      getAction(that.url.collect, {id: id}).then((res) => {
        if (res.success) {
          //重新计算分页问题
@@ -332,6 +412,11 @@
    //批量领取
    handlerBatchCollect(){
    },
    handleDetail(record) {
      this.$refs.weekMaintenanceApprovalModal.recordDetail(record)
      this.$refs.weekMaintenanceApprovalModal.title = '详情';
      this.$refs.weekMaintenanceApprovalModal.disableSubmit = true
    }
  }
}