<template>
|
<a-card :bordered="false">
|
|
<!-- 查询区域 -->
|
<div class="table-page-search-wrapper" v-if="isDisplayOperation">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-row :gutter="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="统一编码">
|
<lx-search-equipment-select placeholder="请输入统一编码或名称搜索" v-model="queryParam.equipmentId"/>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="工单号">
|
<a-input placeholder="请输入工单号" v-model="queryParam.repairCode"></a-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="维修状态">
|
<j-dict-select-tag placeholder="请选择维修状态" v-model="queryParam.repairStatus"
|
dict-code="repair_status"/>
|
</a-form-item>
|
</a-col>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
</span>
|
</a-col>
|
|
</a-row>
|
</a-form>
|
</div>
|
|
<!-- 操作按钮区域 -->
|
<div class="table-operator" v-if="isDisplayOperation">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-menu slot="overlay">
|
<a-menu-item key="1" @click="batchDel">
|
<a-icon type="delete"/>
|
删除
|
</a-menu-item>
|
</a-menu>
|
<a-button style="margin-left: 8px"> 批量操作
|
<a-icon type="down"/>
|
</a-button>
|
</a-dropdown>
|
</div>
|
|
<!-- table区域-begin -->
|
<div>
|
<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>
|
</div>
|
|
<a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
|
:pagination="ipagination" :loading="loading"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"
|
:scroll="{x:'max-content'}">
|
<span slot="action" slot-scope="text, record">
|
<a @click="handleFillIn(record)">填报</a>
|
<a-divider type="vertical"/>
|
<a-popconfirm title="确定提交吗?" @confirm="() => handleSubmit(record.id)">
|
<a>提交</a>
|
</a-popconfirm>
|
<a-divider type="vertical"/>
|
<a @click="handleDetail(record)">详情</a>
|
</span>
|
</a-table>
|
</div>
|
<!-- table区域-end -->
|
|
<!--维修工单填报窗口-->
|
<eam-repair-order-modal ref="modalForm" @ok="modalFormOk"/>
|
|
<!--维修工单审批窗口-->
|
<repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/>
|
</a-card>
|
</template>
|
|
<script>
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect'
|
import RepairOrderApprovalModal from '../../flowable/workflow/repairOrder/RepairOrderApprovalModal'
|
import EamRepairOrderModal from './modules/EamRepairOrderList/EamRepairOrderModal'
|
import { getAction } from '@/api/manage'
|
|
export default {
|
name: 'EamRepairOrderList',
|
mixins: [JeecgListMixin],
|
components: {
|
EamRepairOrderModal,
|
RepairOrderApprovalModal,
|
LxSearchEquipmentSelect
|
},
|
props: {
|
isDisplayOperation: {
|
type: Boolean,
|
default: true
|
}
|
},
|
data() {
|
return {
|
description: '维修工单管理页面',
|
disableMixinCreated: true,
|
// 表头
|
columns: [
|
{
|
title: '#',
|
dataIndex: '',
|
key: 'rowIndex',
|
width: 60,
|
align: 'center',
|
customRender: function(t, r, index) {
|
return parseInt(index) + 1
|
},
|
fixed: 'left'
|
},
|
{
|
title: '统一编码',
|
align: 'center',
|
dataIndex: 'equipmentCode',
|
fixed: 'left'
|
},
|
{
|
title: '设备名称',
|
align: 'center',
|
dataIndex: 'equipmentName',
|
fixed: 'left'
|
},
|
{
|
title: '设备型号',
|
align: 'center',
|
dataIndex: 'equipmentModel',
|
fixed: 'left'
|
},
|
{
|
title: '维修状态',
|
align: 'center',
|
dataIndex: 'repairStatus_dictText',
|
fixed: 'left'
|
},
|
{
|
title: '工单号',
|
align: 'center',
|
dataIndex: 'repairCode'
|
},
|
{
|
title: '维修开始时间',
|
align: 'center',
|
dataIndex: 'actualStartTime',
|
width: 200
|
},
|
{
|
title: '维修结束时间',
|
align: 'center',
|
dataIndex: 'actualEndTime',
|
width: 200
|
},
|
{
|
title: '维修确认',
|
align: 'center',
|
dataIndex: 'repairConfirm_dictText'
|
},
|
{
|
title: '维修确认时间',
|
align: 'center',
|
dataIndex: 'repairConfirmTime',
|
width: 200
|
},
|
{
|
title: '故障原因',
|
align: 'center',
|
dataIndex: 'faultReason'
|
},
|
{
|
title: '故障分析',
|
align: 'center',
|
dataIndex: 'faultAnalysis'
|
},
|
{
|
title: '排故过程',
|
align: 'center',
|
dataIndex: 'faultProcess'
|
},
|
{
|
title: '预防措施',
|
align: 'center',
|
dataIndex: 'faultPrevent'
|
},
|
{
|
title: '操作工',
|
align: 'center',
|
dataIndex: 'confirmer_dictText'
|
},
|
{
|
title: '操作工确认时间',
|
align: 'center',
|
dataIndex: 'confirmTime',
|
width: 200
|
}
|
],
|
selectRepairOrderData: {},
|
url: {
|
list: '/eam/eamRepairOrder/list',
|
submit: '/eam/eamRepairOrder/submit',
|
delete: '/eam/eamRepairOrder/delete',
|
deleteBatch: '/eam/eamRepairOrder/deleteBatch'
|
}
|
}
|
},
|
created() {
|
if (!this.isDisplayOperation) {
|
return
|
}
|
const operationColumn = {
|
title: '操作',
|
dataIndex: 'action',
|
align: 'center',
|
width: 200,
|
scopedSlots: { customRender: 'action' },
|
fixed: 'right'
|
}
|
this.columns = [...this.columns, operationColumn]
|
this.loadData(1)
|
},
|
methods: {
|
/**
|
* 点击填报时触发
|
* @param record
|
*/
|
handleFillIn(record) {
|
this.$refs.modalForm.title = '填报'
|
this.$refs.modalForm.handleFillIn(record)
|
},
|
|
/**
|
* 点击提交时触发
|
* @param id
|
*/
|
handleSubmit(id) {
|
this.loading = true
|
getAction(this.url.submit, { id })
|
.then(res => {
|
if (res.success) {
|
this.$notification.success({
|
message: '消息',
|
description: res.message
|
})
|
this.loadData()
|
} else {
|
this.$notification.warning({
|
message: '消息',
|
description: res.message
|
})
|
this.loading = false
|
}
|
})
|
},
|
|
/**
|
* 点击详情触发
|
* @param record 表格行信息
|
*/
|
handleDetail(record) {
|
this.selectRepairOrderData = Object.assign({}, record)
|
this.$refs.repairOrderApprovalModal.visible = true
|
this.$refs.repairOrderApprovalModal.title = '详情'
|
this.$refs.repairOrderApprovalModal.disableSubmit = true
|
this.$refs.repairOrderApprovalModal.getAllApproveData(record)
|
this.$refs.repairOrderApprovalModal.getBasicInformation({ ...record, dataId: record.id })
|
}
|
}
|
}
|
</script>
|