From 9ceaf5ed12a1364048fc429883361099ad6bebcb Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 05 三月 2025 10:04:34 +0800 Subject: [PATCH] art: 所有设备 台账 维修工单 根据设备id查询维修工单,并过滤掉已完成的维修工单 --- src/views/eam/EquipmentCalibrationOrder.vue | 4 src/views/eam/modules/equipmentNew/RepairOrderListComponent.vue | 840 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/views/eam/RepairOrderList.vue | 2 src/views/eam/EquipmentListOfAll.vue | 13 4 files changed, 856 insertions(+), 3 deletions(-) diff --git a/src/views/eam/EquipmentCalibrationOrder.vue b/src/views/eam/EquipmentCalibrationOrder.vue index 5b7d464..473b949 100644 --- a/src/views/eam/EquipmentCalibrationOrder.vue +++ b/src/views/eam/EquipmentCalibrationOrder.vue @@ -1,7 +1,7 @@ <template> <a-card :bordered='false' - title='鎶�鏈姸鎬侀壌瀹氱鐞�' + title='' > <!-- 鏌ヨ鍖哄煙 --> <div class='table-page-search-wrapper'> @@ -46,7 +46,7 @@ icon='search' >鏌ヨ</a-button> <a-button - type='primary' + type='info' @click='searchReset' icon='reload' style='margin-left: 8px' diff --git a/src/views/eam/EquipmentListOfAll.vue b/src/views/eam/EquipmentListOfAll.vue index 490cde8..8d32312 100644 --- a/src/views/eam/EquipmentListOfAll.vue +++ b/src/views/eam/EquipmentListOfAll.vue @@ -764,6 +764,17 @@ > <daily3-maintenance-order-list-component :mainId="selectedMainId"></daily3-maintenance-order-list-component> </a-tab-pane> + <a-tab-pane + tab="缁翠慨宸ュ崟" + key="13" + > + <repair-order-list-component :mainId="selectedMainId"></repair-order-list-component> + </a-tab-pane> + <a-tab-pane + tab="鎶�鏈姸鎬侀壌瀹�" + key="14" + > + </a-tab-pane> </a-tabs> <equipment-modal ref="modalForm" @@ -823,6 +834,7 @@ import DailyInspectionOrderListComponent from './modules/equipmentNew/DailyInspectionOrderListComponent.vue' import DailyMaintenanceOrderListComponent from './modules/equipmentNew/DailyMaintenanceOrderListComponent.vue' import Daily3MaintenanceOrderListComponent from './modules/equipmentNew/Daily3MaintenanceOrderListComponent.vue' +import RepairOrderListComponent from './modules/equipmentNew/RepairOrderListComponent.vue' export default { name: "EquipmentList", @@ -852,6 +864,7 @@ DailyInspectionOrderListComponent, DailyMaintenanceOrderListComponent, Daily3MaintenanceOrderListComponent, + RepairOrderListComponent, }, data() { return { diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue index d2b0e41..de9322e 100644 --- a/src/views/eam/RepairOrderList.vue +++ b/src/views/eam/RepairOrderList.vue @@ -1,6 +1,6 @@ <template> <a-card - title="缁翠慨" + title="" :bordered="false" > <div class="table-page-search-wrapper"> diff --git a/src/views/eam/modules/equipmentNew/RepairOrderListComponent.vue b/src/views/eam/modules/equipmentNew/RepairOrderListComponent.vue new file mode 100644 index 0000000..1000165 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/RepairOrderListComponent.vue @@ -0,0 +1,840 @@ +<template> + <a-card + title="" + :bordered="false" + > + <!-- table鍖哄煙-begin --> + <div> + <div + class="ant-alert ant-alert-info" + style="margin-bottom: 16px;" + > + <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" + class="j-table-force-nowrap" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + :customRow="clickThenSelect" + :rowClassName="tableRowClass" + :scroll="{ x: 'calc(1700px + 50%)', y: 900 }" + > + <span + slot="jell" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + <span + slot="specificEquipment" + slot-scope="text" + > + <a-icon + type="check" + style="color: chartreuse;" + v-if="text==='0'" + /> + <a-icon + type="close" + v-else + style="color:red;" + /> + </span> + <span + slot="num" + slot-scope="text, record" + > + <a + v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " + class="lot" + @click="handleOrderExe(record)" + ><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" + > + <a-popconfirm + title="纭畾涓嬪彂宸ュ崟鍚�?" + @confirm="() => handleDistribute(record)" + > + <a v-if="record.status == '0'">涓嬪彂</a> + </a-popconfirm> + <a-divider + v-if="record.status == '0'" + type="vertical" + /> + <a-popconfirm + title="纭畾鎾ゅ洖宸ュ崟鍚�?" + @confirm="() => handleWithdraw(record)" + > + <a v-if="record.status == '1'">鎾ゅ洖</a> + </a-popconfirm> + <a-divider + v-if="record.status == '1'" + type="vertical" + /> + <a-popconfirm + title="纭畾棰嗗彇宸ュ崟鍚�?" + @confirm="() => handleReceive(record)" + > + <a v-if="record.status == '1' && record.dispatchMethod == '2'">棰嗗彇</a> + </a-popconfirm> + <a + v-if="record.status == '1' && record.dispatchMethod == '1' " + @click="handleAssignOrder(record)" + >娲惧伐</a> + <!-- <a + v-if="record.status == '2' && record.dispatchMethod != null " + @click="handleAssignOrder(record)" + >鏀规淳</a> --> + <a-divider + v-if="record.status == '1' || record.status == '2' " + type="vertical" + /> + <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' " + type="vertical" + /> + <a + v-if="record.status === '0'" + @click="handleEditPre(record)" + >缂栬緫</a> + <a-divider + v-if="record.status === '0'" + type="vertical" + /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > + <a v-if="record.status === '0'">鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </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> + + <a-tabs + type="card" + defaultActiveKey="1" + > + <a-tab-pane + tab="鏁呴殰鎻忚堪" + key="1" + > + <FaultDescriptionList ref="FaultDescriptionList" /> + </a-tab-pane> + <a-tab-pane + tab="缁翠慨瑕佹眰" + key="2" + v-if="false" + > + <RepairOrderDetailList + :mainId="repairOrderDetailMainId" + :addStatus="sonsAddStatus" + /> + </a-tab-pane> + <a-tab-pane + tab="璁″垝鐢ㄦ枡" + key="3" + forceRender + v-if="false" + > + <RepairOrderPlanMaterialList + :addStatus="sonsAddStatus" + :mainId="repairOrderPlanMaterialMainId" + /> + </a-tab-pane> + <a-tab-pane + tab="鍗遍櫓闃叉帶" + key="4" + forceRender + v-if="false" + > + <RepairOrderRiskPreventionList + :addStatus="sonsAddStatus" + :mainId="repairOrderRiskPreventionMainId" + /> + </a-tab-pane> + <a-tab-pane + tab="浣滀笟鎸囧涔�" + key="5" + forceRender + v-if="false" + > + <EquipmentDocumentList + :addStatus="sonsAddStatus" + :mainId="equipmentDocumentMainId" + /> + </a-tab-pane> + <a-tab-pane + tab="瀹為檯鐢ㄦ枡" + key="6" + forceRender + v-if="false" + > + <!-- v-if="!sonsAddStatus&&selectedRowKeys.length!=0" --> + <RepairOrderActualMaterialList :mainId="repairOrderActualMaterialMainId" /> + </a-tab-pane> + <a-tab-pane + tab="瀹為檯宸ユ椂" + key="7" + forceRender + v-if="!sonsAddStatus&&selectedRowKeys.length!=0" + > + <RepairOrderActualWorkHoursList :mainId="repairOrderActualWorkHoursMainId" /> + </a-tab-pane> + <a-tab-pane + tab="鏁呴殰鍒嗘瀽" + key="8" + forceRender + v-if="!sonsAddStatus&&selectedRowKeys.length!=0" + > + <RepairOrderFaultAnalysisList :mainId="repairOrderFaultAnalysisMainId" /> + </a-tab-pane> + </a-tabs> + <repairOrder-modal + ref="modalForm" + @ok="modalFormOk" + :isSelfCreate="isSelfCreate" + ></repairOrder-modal> + <repair-order-assign-task + ref="RepairOrderAssignModal" + @ok="modalFormOk" + > + </repair-order-assign-task> + <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 '@/views/eam/modules/repairorder/RepairOrderModal' +import { getAction } from '@/api/manage' +import JEllipsis from '@/components/jeecg/JEllipsis' +import RepairOrderDetailList from '@/views/eam/RepairOrderDetailList' +import RepairOrderRiskPreventionList from '@/views/eam/RepairOrderRiskPreventionList' +import RepairOrderFaultAnalysisList from '@/views/eam/RepairOrderFaultAnalysisList' +import RepairOrderPlanMaterialList from '@/views/eam/RepairOrderPlanMaterialList' +import RepairOrderActualMaterialList from '@/views/eam/RepairOrderActualMaterialList' +import RepairOrderActualWorkHoursList from '@/views/eam/RepairOrderActualWorkHoursList' +import EquipmentDocumentList from '@/views/eam/RepairOrderEquipmentDocumentList' +import '@/assets/less/TableExpand.less' +import { putAction } from '@/api/manage' +import RepairOrderAssignTask from '@/views/eam/modules/repairorder/RepairOrderAssignTask' +import RepairOrderExcuteDrawer from '@/views/eam/modules/repairorder/repairOrderExcuteDrawer' +import FaultDescriptionList from '@/views/eam/FaultDescriptionList' +import FaultReportRepair from '@/views/eam/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, + RepairOrderPlanMaterialList, + RepairOrderActualMaterialList, + RepairOrderActualWorkHoursList, + EquipmentDocumentList, + RepairOrderModal, + RepairOrderAssignTask, + RepairOrderExcuteDrawer, + FaultDescriptionList, + FaultReportRepair, + store + }, + props:{ + mainId:{ + type:String, + default:'', + required:false + } + }, + watch:{ + mainId:{ + immediate: true, + handler(val) { + if(!this.mainId){ + this.queryParam['equipmentId'] = 'NAN' + this.loadData(1); + }else{ + this.queryParam['equipmentId'] = val + this.queryParam['statusEnums'] = '4' + this.loadData(1); + } + } + }, + selectionRows() { + this.$bus.$emit('repairOrderSelectionRows', this.selectionRows); + }, + }, + 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', + scopedSlots: { customRender: 'num' } + }, + // { + // title: '涓氬姟绫诲瀷', + // align: "center", + // dataIndex: 'businessType_dictText' + // }, + { + title: '缁熶竴缂栫爜', + align: "center", + dataIndex: 'equipmentNum', + scopedSlots: { customRender: 'equipmentNum' } + }, + { + title: '璁惧鍚嶇О', + align: "center", + dataIndex: 'equipmentName' + }, + { + title: '璁惧鍨嬪彿', + align: "center", + dataIndex: 'equipmentModel' + }, + { + title: '浣跨敤閮ㄩ棬', + align: "center", + dataIndex: 'departId_dictText' + }, + // { + // title: '绱ф�ョ▼搴�', + // align: "center", + // dataIndex: 'urgency_dictText' + // }, + // { + // title: '缁翠繚鏂瑰紡', + // align: "center", + // dataIndex: 'maintenanceMethod_dictText' + // }, + // { + // title: '澶栧鍗曚綅', + // align: "center", + // dataIndex: 'outsourcingUnitName' + // }, + { + title: '缁翠慨鐝粍', + align: "center", + dataIndex: 'teamId_dictText', + scopedSlots: { + customRender: 'jell' + } + }, + { + title: '璐d换浜�', + align: "center", + dataIndex: 'responsibilityId_dictText' + }, + // { + // title: '娲惧伐鏂瑰紡', + // align: "center", + // dataIndex: 'dispatchMethod_dictText' + // }, + // { + // title: '鐗圭璁惧', + // align: "center", + // dataIndex: 'specificEquipment_dictText' + // }, + { + title: '鏁呴殰鏃堕棿', + align: "center", + dataIndex: 'faultTime' + }, + // { + // title: '鎶ヤ慨浜�', + // align: "center", + // 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: '鏁呴殰鐓х墖', + // align: "center", + // dataIndex: 'photo', + // scopedSlots: { customRender: 'imgSlot' } + // }, + // { + // title: '鏄惁鍋滄満', + // 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: 'createBy' + }, + { + title: '鍒涘缓鏃堕棿', + align: "center", + dataIndex: 'createTime' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: "center", + fixed: "right", + width: 130, + scopedSlots: { customRender: 'action' }, + } + + ], + url: { + list: "/eam/repairOrder/list", + delete: "/eam/repairOrder/delete", + deleteBatch: "/eam/repairOrder/deleteBatch", + exportXlsUrl: "/eam/repairOrder/exportXls", + importExcelUrl: "eam/repairOrder/importExcel", + orderDistribute: "eam/repairOrder/distribute", + orderWithdraw: "eam/repairOrder/withdraw", + orderDispatch: "eam/repairOrder/dispatch", + orderReceive: "eam/repairOrder/receive", + orderStart: "eam/repairOrder/start" + }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 20, + pageSizeOptions: ['5', '10', '20', '50'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + selectedMainId: '', + // superFieldList: [], + repairOrderDetailMainId: '', + repairOrderRiskPreventionMainId: '', + repairOrderFaultAnalysisMainId: '', + repairOrderPlanMaterialMainId: '', + repairOrderActualMaterialMainId: '', + repairOrderActualWorkHoursMainId: '', + equipmentDocumentMainId: '', + isSelfCreate: '1', + excuteRepairOrder: {}, + assignTaskList: [], + sonsAddStatus: false, + } + }, + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + rowSelection() { + return { + type: 'checkbox', + onChange: (selectedRowKeys, selectedRows) => { + this.onSelectChange(selectedRowKeys, selectedRows); + }, + getCheckboxProps: record => ({ + props: { + }, + }), + selectedRowKeys: this.selectedRowKeys, + }; + }, + }, + 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: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); + } + } + } + }, + onClearSelected() { + this.selectedRowKeys = []; + this.selectionRows = []; + this.selectedMainId = '' + this.repairOrderDetailMainId = '' + this.repairOrderRiskPreventionMainId = '' + this.repairOrderFaultAnalysisMainId = '' + this.repairOrderPlanMaterialMainId = '' + this.repairOrderActualMaterialMainId = '' + this.repairOrderActualWorkHoursMainId = '' + this.equipmentDocumentMainId = '' + }, + onSelectChange(selectedRowKeys, selectionRows) { + if (selectedRowKeys.length == 1) { + this.selectedMainId = selectedRowKeys[0] + this.repairOrderDetailMainId = selectionRows[0]['id'] + this.repairOrderRiskPreventionMainId = selectionRows[0]['id'] + this.repairOrderFaultAnalysisMainId = selectionRows[0]['id'] + this.repairOrderPlanMaterialMainId = selectionRows[0]['id'] + this.repairOrderActualMaterialMainId = selectionRows[0]['id'] + this.repairOrderActualWorkHoursMainId = selectionRows[0]['id'] + this.equipmentDocumentMainId = selectionRows[0]['id'] + this.sonsAddStatus = (selectionRows[0]['status'] == '0') + this.$refs.FaultDescriptionList.faultId = selectedRowKeys[0] + } else { + this.$refs.FaultDescriptionList.faultId = '-1' + this.selectedMainId = '' + this.repairOrderDetailMainId = '' + this.repairOrderRiskPreventionMainId = '' + this.repairOrderFaultAnalysisMainId = '' + this.repairOrderPlanMaterialMainId = '' + this.repairOrderActualMaterialMainId = '' + this.repairOrderActualWorkHoursMainId = '' + this.equipmentDocumentMainId = '' + } + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + this.assignTaskList = []; + for (var i = 0; i < selectionRows.length; i++) { + if (selectionRows[i].status == '1') { + this.assignTaskList.push(selectionRows[i]); + } + } + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + 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) => { + if (res.success) { + this.dataSource = res.result.records; + this.ipagination.total = res.result.total; + } + if (res.code === 510) { + this.$message.warning(res.message) + } + this.loading = false; + this.$refs.FaultDescriptionList.faultId = '-1' + this.excuteRepairOrder = {} + }) + }, + + handleAddPre(isSelfCreate) { + this.isSelfCreate = isSelfCreate; + this.handleAdd(); + }, + handleEditPre(record) { + console.log(record); + if (record.reportRepairId != null && record.reportRepairId != undefined && record.reportRepairId != '') { + this.isSelfCreate = '2'; + } + else if (record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != '') { + this.isSelfCreate = '3'; + } else { + this.isSelfCreate = '1'; + } + this.handleEdit(record); + }, + //宸ュ崟娴佺▼鎿嶄綔 + handleDistribute(record) { + putAction(this.url.orderDistribute, record).then(res => { + if (res.result) { + this.$message.success('涓嬪彂鎴愬姛'); + this.loadData(); + } else { + this.$message.error('涓嬪彂鍑虹幇寮傚父') + } + }) + + }, + handleDispatch() { + if (this.assignTaskList.length == 0) { + this.$message.warn('鎵�閫夊伐鍗曟棤闇�娲惧伐'); + } else { + this.$refs.RepairOrderAssignModal.visible = true + this.$refs.RepairOrderAssignModal.title = '缁翠慨宸ュ崟娲惧伐' + this.$refs.RepairOrderAssignModal.selectionRows + this.$refs.RepairOrderAssignModal.handleShow() + } + }, + //鏀规淳 + handleAssignOrder: function (record) { + this.$refs.RepairOrderAssignModal.edit(record) + this.$refs.RepairOrderAssignModal.title = '宸ュ崟鏀规淳' + this.$refs.RepairOrderAssignModal.disableSubmit = false + }, + handleWithdraw(record) { + putAction(this.url.orderWithdraw, record).then(res => { + if (res.result) { + this.$message.success('鎾ら攢鎴愬姛'); + this.loadData(); + } else { + this.$message.error('鎾ら攢鍑虹幇寮傚父') + } + }) + }, + handleReceive(record) { + putAction(this.url.orderReceive, record).then(res => { + if (res.result) { + this.$message.success('棰嗗彇鎴愬姛'); + this.loadData(); + } else { + this.$message.error('棰嗗彇鍑虹幇寮傚父') + } + }) + }, + handleOrderExe(record) { + this.excuteRepairOrder = record; + this.$refs.repairOrderExcuteDrawer.visible = true + this.$refs.repairOrderExcuteDrawer.title = '缁翠慨宸ュ崟鎵ц' + }, + + searchQuery() { + this.loadData(1) + this.selectedRowKeys = [] + this.selectionRows = [] + this.onClearSelected() + this.$refs.FaultDescriptionList.faultId = '-1' + }, + + searchReset() { + this.queryParam = {} + 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 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> \ No newline at end of file -- Gitblit v1.9.3