From 8a4d90d80c6ae8472bf11a1c1f148ca49c90f0a7 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 29 五月 2025 15:42:59 +0800 Subject: [PATCH] 1、设备TEEP、设备开动率以及班次利用率页面时间选择器新增用户选择时对时间范围的限制功能并测试大数据导出功能 2、生产设备自主维护点检表设备编号的输入方式由手动输入调整为弹窗选择输入 3、生产设备自主维护点检表页面调整周保执行记录渲染逻辑(日期对应到周) --- src/views/eam/SelfMaintenanceAndInspectionList.vue | 51 +++++++++++++++++++++++++++++---------------------- 1 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/views/eam/SelfMaintenanceAndInspectionList.vue b/src/views/eam/SelfMaintenanceAndInspectionList.vue index dfc9a75..a47ab74 100644 --- a/src/views/eam/SelfMaintenanceAndInspectionList.vue +++ b/src/views/eam/SelfMaintenanceAndInspectionList.vue @@ -7,7 +7,8 @@ <a-col :md="4" :sm="4"> <a-form-item label="璁惧缂栧彿"> - <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.num" :allow-clear="false"/> + <a-input-search :readOnly="true" v-model="queryParam.num" @search="handleOpenEamEquipmentListModal" + enter-button placeholder='璇烽�夋嫨璁惧缂栧彿'/> </a-form-item> </a-col> @@ -43,7 +44,9 @@ <th colspan="3"></th> <th colspan="6">缁熶竴缂栧彿锛歿{dataSource.equipentNum}}</th> <th colspan="3"></th> - <th colspan="6">{{queryParam.dataTime.split('-')[0]}} 骞� {{queryParam.dataTime.split('-')[1]}} 鏈�</th> + <th colspan="6"> + {{queryParam.dataTime.split('-')[0]}} 骞� {{queryParam.dataTime.split('-')[1]}} 鏈� + </th> <th colspan="6">鍗曚綅锛歿{dataSource.workCenterName}}</th> <th colspan="3"></th> </tr> @@ -88,7 +91,7 @@ <td>搴忓彿</td> <td colspan="5">鍛ㄤ繚鍏婚」鐩�</td> <td colspan="5">妫�鏌ユ爣鍑�</td> - <td colspan="31">鍛ㄦ姤鎵ц璁板綍</td> + <td colspan="31">鍛ㄤ繚鎵ц璁板綍</td> </tr> <tr v-for="(item,index) in dataSource.list4"> @@ -96,36 +99,37 @@ <td colspan="5">{{item.name}}</td> <td colspan="5">{{item.detectionStandard}}</td> <td v-for="childItem in 4" colspan="6"> - {{item.dataList&&item.dataList[childItem-1]?item.dataList[childItem-1].insResult:''}} + {{item.dataList&&item.dataList.find(item=>item.weekOfMonth===childItem)?item.dataList.find(item=>item.weekOfMonth===childItem).insResult:''}} </td> <td colspan="7"> - {{item.dataList&&item.dataList[4]?item.dataList[4].insResult:''}} + {{item.dataList&&item.dataList.find(item=>item.weekOfMonth===5)?item.dataList.find(item=>item.weekOfMonth===5).insResult:''}} </td> </tr> <tr> <td colspan="11">鍛ㄤ繚鍏绘搷浣滆�呮墽琛岋紙鎿嶄綔鑰呯瀛楋級</td> <td v-for="childItem in 4" colspan="6"> - {{dataSource.list5&&dataSource.list5[0]&&dataSource.list5[0].dataList&&dataSource.list5[0].dataList[childItem-1]?dataSource.list5[0].dataList[childItem-1].inspectionUserName:''}} + {{dataSource.list5&&dataSource.list5[0]&&dataSource.list5[0].dataList&&dataSource.list5[0].dataList.find(item=>item.weekOfMonth===childItem)?dataSource.list5[0].dataList.find(item=>item.weekOfMonth===childItem).inspectionUserName:''}} </td> <td colspan="7"> - {{dataSource.list5&&dataSource.list5[0]&&dataSource.list5[0].dataList&&dataSource.list5[0].dataList[4]?dataSource.list5[0].dataList[4].inspectionUserName:''}} + {{dataSource.list5&&dataSource.list5[0]&&dataSource.list5[0].dataList&&dataSource.list5[0].dataList.find(item=>item.weekOfMonth===5)?dataSource.list5[0].dataList.find(item=>item.weekOfMonth===5).inspectionUserName:''}} </td> </tr> <tr> - <td colspan="11">闂翠繚鍏绘鏌ヤ汉纭锛堢淮淇汉鍛樼瀛楋級</td> + <td colspan="11">鍛ㄤ繚鍏绘鏌ヤ汉纭锛堢淮淇汉鍛樼瀛楋級</td> <td v-for="childItem in 4" colspan="6"> - {{dataSource.list6&&dataSource.list6[0]&&dataSource.list6[0].dataList&&dataSource.list6[0].dataList[childItem-1]?dataSource.list6[0].dataList[childItem-1].repairConfirmPerson:''}} + {{dataSource.list5&&dataSource.list6[0]&&dataSource.list6[0].dataList&&dataSource.list6[0].dataList.find(item=>item.weekOfMonth===childItem)?dataSource.list6[0].dataList.find(item=>item.weekOfMonth===childItem).repairConfirmPerson:''}} + </td> <td colspan="7"> - {{dataSource.list6&&dataSource.list6[0]&&dataSource.list6[0].dataList&&dataSource.list6[0].dataList[4]?dataSource.list6[0].dataList[4].repairConfirmPerson:''}} + {{dataSource.list5&&dataSource.list6[0]&&dataSource.list6[0].dataList&&dataSource.list6[0].dataList.find(item=>item.weekOfMonth===5)?dataSource.list6[0].dataList.find(item=>item.weekOfMonth===5).repairConfirmPerson:''}} </td> </tr> <tr> <td colspan="42" style="text-align: left"> - 濉啓瑕佹眰锛氭甯革紳/锛屽紓甯革紳x锛屾晠闅滃仠鏈猴紳鈻筹紝娌″紑鏈猴紳T锛氳澶囨棩甯哥偣妫�璁板綍鐢辨搷浣滀汉鍛樻墽琛屽苟璁板綍銆傛墽琛屾儏鍐垫鏌ョ敱缁翠慨浜哄憳璐熻矗鎵ц骞惰褰曪紝瀵瑰彂鐜伴棶棰樿褰曡嚦鐐规琛ㄨ儗闈㈠悇娉ㄦ爮锛屽鍙戠幇闂杩涜鍏ㄧ▼闂幆璁板綍銆� + 濉啓瑕佹眰锛氭甯革紳鈭氾紝寮傚父锛澝楋紝鏁呴殰鍋滄満锛濃柍锛屾病寮�鏈猴紳T锛氳澶囨棩甯哥偣妫�璁板綍鐢辨搷浣滀汉鍛樻墽琛屽苟璁板綍銆傛墽琛屾儏鍐垫鏌ョ敱缁翠慨浜哄憳璐熻矗鎵ц骞惰褰曪紝瀵瑰彂鐜伴棶棰樿褰曡嚦鐐规琛ㄨ儗闈㈠娉ㄦ爮锛屽鍙戠幇闂杩涜鍏ㄧ▼闂幆璁板綍銆� </td> </tr> @@ -144,6 +148,8 @@ </tbody> </table> </a-spin> + + <eam-equipment-list-modal ref="eamEquipmentListModal" @sendSelectionRows="setSelectedEquipmentId"/> </a-card> </template> @@ -152,9 +158,11 @@ import { getAction } from '@/api/manage' import $ from 'jquery' import '@/components/table2excel/table2excel' + import EamEquipmentListModal from './modules/SelfMaintenanceAndInspectionList/EamEquipmentListModal' export default { name: 'SelfMaintenanceAndInspectionList', + components: { EamEquipmentListModal }, mixins: [JeecgListMixin], data() { return { @@ -189,18 +197,7 @@ that.$message.warning(`${dataTime.split('-')[0]}骞�${dataTime.split('-')[1]}鏈� 璁惧缂栧彿涓�${num}璁惧 鏃犵偣妫�璁板綍`) return } - that.dataSource = res.result - - for (let index = 4; index <= 6; index++) { - that.dataSource[`list${index}`] = that.dataSource[`list${index}`].map(item => { - return { - ...item, - dataList: item.dataList.sort((x, y) => x.dayTime - y.dayTime) - } - }) - } - this.$nextTick(() => this.tableElement = document.getElementById('dataTable')) } else that.$message.warning(res.message) @@ -210,6 +207,16 @@ }) }, + // 鎺у埗閫夋嫨璁惧寮圭獥寮瑰嚭 + handleOpenEamEquipmentListModal() { + this.$refs.eamEquipmentListModal.visible = true + this.$refs.eamEquipmentListModal.openPage() + }, + + setSelectedEquipmentId(record) { + this.$set(this.queryParam, 'num', record.num) + }, + exportExcel() { if (!this.tableElement) this.$message.warning('璇锋煡璇㈠悗鍐嶈繘琛屽鍑�') -- Gitblit v1.9.3