|
|
@@ -48,6 +48,13 @@
|
|
|
<el-table-column prop="realStartTime" label="停机时间"></el-table-column>
|
|
|
<el-table-column prop="restartTime" label="恢复运行时间"></el-table-column>
|
|
|
</el-table>
|
|
|
+ <pagination style="margin-top: 20px;"
|
|
|
+ v-show="wbtotal>0"
|
|
|
+ :total="wbtotal"
|
|
|
+ v-model:page="wbqueryParams.pageNum"
|
|
|
+ v-model:limit="wbqueryParams.pageSize"
|
|
|
+ @pagination="handlePaginationwb"
|
|
|
+ />
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
@@ -87,6 +94,13 @@
|
|
|
<el-table-column prop="occurTime" label="停机时间"></el-table-column>
|
|
|
<el-table-column prop="restartTime" label="恢复运行时间"></el-table-column>
|
|
|
</el-table>
|
|
|
+ <pagination style="margin-top: 20px;"
|
|
|
+ v-show="wxtotal>0"
|
|
|
+ :total="wxtotal"
|
|
|
+ v-model:page="wxqueryParams.pageNum"
|
|
|
+ v-model:limit="wxqueryParams.pageSize"
|
|
|
+ @pagination="handlePaginationwx"
|
|
|
+ />
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
@@ -178,7 +192,24 @@ export default {
|
|
|
repairOrderList: [],
|
|
|
// 用户筛选相关
|
|
|
userFilterText: '',
|
|
|
- originalUserScoreList: []
|
|
|
+ originalUserScoreList: [],
|
|
|
+ wbtotal: 0,
|
|
|
+ wbqueryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 5,
|
|
|
+ model: null,
|
|
|
+ inspectionType: null,
|
|
|
+ pcsStationPid: null,
|
|
|
+ monthPeriod: null
|
|
|
+ },
|
|
|
+ wxtotal: 0,
|
|
|
+ wxqueryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 5,
|
|
|
+ maintenanceType: null,
|
|
|
+ pcsStationPid: null,
|
|
|
+ monthPeriod: null
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -286,10 +317,22 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (monthScoreGet.workOrderList) {
|
|
|
- this.workOrderList = monthScoreGet.workOrderList;
|
|
|
+ const wbSize = monthScoreGet.workOrderList.length;
|
|
|
+ this.wbtotal = wbSize;
|
|
|
+ if (this.wbqueryParams.pageSize>=wbSize) {
|
|
|
+ this.workOrderList = monthScoreGet.workOrderList;
|
|
|
+ }else{
|
|
|
+ this.workOrderList = monthScoreGet.workOrderList.slice(0, this.wbqueryParams.pageSize);
|
|
|
+ }
|
|
|
if (monthScoreGet.monthFanInspections && monthScoreGet.monthFanInspections.length>0) {
|
|
|
- this.currentSelectedModel = monthScoreGet.monthFanInspections[0].model;
|
|
|
- this.currentSelectedInspectionType = this.getInspectionTypeLabel(monthScoreGet.monthFanInspections[0].inspectionTypeId);
|
|
|
+ const firstItem = monthScoreGet.monthFanInspections[0];
|
|
|
+ this.wbqueryParams.pageNum = 1;
|
|
|
+ this.wbqueryParams.model = firstItem.model;
|
|
|
+ this.wbqueryParams.inspectionType = firstItem.inspectionType;
|
|
|
+ this.wbqueryParams.pcsStationPid = this.monthScore.deptId;
|
|
|
+ this.wbqueryParams.monthPeriod = this.selectedMonth;
|
|
|
+ this.currentSelectedModel = firstItem.model;
|
|
|
+ this.currentSelectedInspectionType = this.getInspectionTypeLabel(firstItem.inspectionTypeId);
|
|
|
// 默认选中第一行
|
|
|
this.currentRowIndex = 0;
|
|
|
}else{
|
|
|
@@ -310,9 +353,20 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (monthScoreGet.repairOrderList) {
|
|
|
- this.repairOrderList = monthScoreGet.repairOrderList;
|
|
|
+ const wxSize = monthScoreGet.repairOrderList.length;
|
|
|
+ this.wxtotal = wxSize;
|
|
|
+ if (this.wxqueryParams.pageSize>=wxSize) {
|
|
|
+ this.repairOrderList = monthScoreGet.repairOrderList;
|
|
|
+ }else{
|
|
|
+ this.repairOrderList = monthScoreGet.repairOrderList.slice(0, this.wxqueryParams.pageSize);
|
|
|
+ }
|
|
|
if (monthScoreGet.monthRepairProjects && monthScoreGet.monthRepairProjects.length>0) {
|
|
|
- this.currentSelectedRepairType = this.getMaintenanceTypeLabel(monthScoreGet.monthRepairProjects[0].maintenanceType);
|
|
|
+ const firstItem = monthScoreGet.monthRepairProjects[0];
|
|
|
+ this.wxqueryParams.pageNum = 1;
|
|
|
+ this.wxqueryParams.maintenanceType = firstItem.maintenanceType;
|
|
|
+ this.wxqueryParams.pcsStationPid = this.monthScore.deptId;
|
|
|
+ this.wxqueryParams.monthPeriod = this.selectedMonth;
|
|
|
+ this.currentSelectedRepairType = this.getMaintenanceTypeLabel(firstItem.maintenanceType);
|
|
|
// 默认选中维修工单统计表格的第一行
|
|
|
this.currentRepairRowIndex = 0;
|
|
|
}else{
|
|
|
@@ -406,25 +460,14 @@ export default {
|
|
|
this.currentSelectedInspectionType = row.inspectionType;
|
|
|
|
|
|
// 构造请求参数
|
|
|
- const params = {
|
|
|
- model: row.model,
|
|
|
- inspectionType: this.getInspectionTypeValue(row.inspectionType), // 需要将显示文本转换为实际值
|
|
|
- pcsStationPid: this.monthScore.deptId, // 使用当前页面的部门ID
|
|
|
- monthPeriod: this.selectedMonth // 使用当前选中的月份
|
|
|
- };
|
|
|
+ this.wbqueryParams.pageNum = 1;
|
|
|
+ this.wbqueryParams.model = row.model;
|
|
|
+ this.wbqueryParams.inspectionType = this.getInspectionTypeValue(row.inspectionType);
|
|
|
+ this.wbqueryParams.pcsStationPid = this.monthScore.deptId;
|
|
|
+ this.wbqueryParams.monthPeriod = this.selectedMonth;
|
|
|
|
|
|
// 调用后端接口
|
|
|
- getWorkOrderByMonth(params).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- // 将返回结果赋值给workOrderList
|
|
|
- this.workOrderList = response.data || [];
|
|
|
- } else {
|
|
|
- this.$message.error('获取维保工单数据失败:' + response.msg);
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- console.error('获取维保工单数据异常:', error);
|
|
|
- this.$message.error('获取维保工单数据异常');
|
|
|
- });
|
|
|
+ this.queryWbList();
|
|
|
},
|
|
|
|
|
|
// 根据显示标签获取字典值
|
|
|
@@ -463,24 +506,13 @@ export default {
|
|
|
this.currentSelectedRepairType = row.repairType;
|
|
|
|
|
|
// 构造请求参数
|
|
|
- const params = {
|
|
|
- maintenanceType: this.getMaintenanceTypeValue(row.repairType), // 需要将显示文本转换为实际值
|
|
|
- pcsStationPid: this.monthScore.deptId, // 使用当前页面的部门ID
|
|
|
- monthPeriod: this.selectedMonth // 使用当前选中的月份
|
|
|
- };
|
|
|
+ this.wxqueryParams.pageNum = 1;
|
|
|
+ this.wxqueryParams.maintenanceType = this.getMaintenanceTypeValue(row.repairType);
|
|
|
+ this.wxqueryParams.pcsStationPid = this.monthScore.deptId;
|
|
|
+ this.wxqueryParams.monthPeriod = this.selectedMonth;
|
|
|
|
|
|
// 调用后端接口
|
|
|
- getRepairOrderByMonth(params).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- // 将返回结果赋值给repairOrderList
|
|
|
- this.repairOrderList = response.data || [];
|
|
|
- } else {
|
|
|
- this.$message.error('获取维修工单数据失败:' + response.msg);
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- console.error('获取维修工单数据异常:', error);
|
|
|
- this.$message.error('获取维修工单数据异常');
|
|
|
- });
|
|
|
+ this.queryWxList();
|
|
|
},
|
|
|
|
|
|
// 处理工单编号点击事件
|
|
|
@@ -527,7 +559,45 @@ export default {
|
|
|
} else {
|
|
|
return '#000000'; // 黑色
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ queryWbList() {
|
|
|
+ getWorkOrderByMonth(this.wbqueryParams).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ // 将返回结果赋值给workOrderList
|
|
|
+ this.workOrderList = response.rows || [];
|
|
|
+ this.wbtotal = response.total;
|
|
|
+ } else {
|
|
|
+ this.$message.error('获取维保工单数据失败:' + response.msg);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.error('获取维保工单数据异常:', error);
|
|
|
+ this.$message.error('获取维保工单数据异常');
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ queryWxList() {
|
|
|
+ getRepairOrderByMonth(this.wxqueryParams).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ // 将返回结果赋值给repairOrderList
|
|
|
+ this.repairOrderList = response.rows || [];
|
|
|
+ this.wxtotal = response.total;
|
|
|
+ } else {
|
|
|
+ this.$message.error('获取维修工单数据失败:' + response.msg);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.error('获取维修工单数据异常:', error);
|
|
|
+ this.$message.error('获取维修工单数据异常');
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ handlePaginationwb() {
|
|
|
+ this.queryWbList();
|
|
|
+ },
|
|
|
+ handlePaginationwx() {
|
|
|
+ this.queryWxList();
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|