Browse Source

refactor(eam): 重构设备列表页面结构并启用故障现象功能

- 注释掉故障现象标签页的相关代码
- 将故障现象表格的列宽从80调整为250
- 启用被注释的检查项目、点检计划、保养项目等功能模块的数据获取逻辑
- 恢复故障行为数据获取功能
- 重新激活历史工单和维护计划等模块的调用逻辑
master
qiankanghui 2 weeks ago
parent
commit
5f2e78a86d
  1. 108
      src/views/modules/eam/eam_device_list.vue

108
src/views/modules/eam/eam_device_list.vue

@ -286,45 +286,45 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<!-- 故障现象 -->
<el-tab-pane label="故障现象" name="fault_behavior">
<el-form :inline="true" label-position="top" style="margin-top: 5px">
<el-button type="primary" @click="addDefectModal()">新增设备故障</el-button>
<el-button type="primary" @click="copyObject('defect')">复制到其他设备</el-button>
</el-form>
<el-table
:height="330"
:data="faultBehaviorList"
border
highlight-current-row
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnFaultBehaviorArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="80"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="deleteDefect(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<!-- &lt;!&ndash; 故障现象 &ndash;&gt;-->
<!-- <el-tab-pane label="故障现象" name="fault_behavior">-->
<!-- <el-form :inline="true" label-position="top" style="margin-top: 5px">-->
<!-- <el-button type="primary" @click="addDefectModal()">新增设备故障</el-button>-->
<!-- <el-button type="primary" @click="copyObject('defect')">复制到其他设备</el-button>-->
<!-- </el-form>-->
<!-- <el-table-->
<!-- :height="330"-->
<!-- :data="faultBehaviorList"-->
<!-- border-->
<!-- highlight-current-row-->
<!-- style="width: 100%;">-->
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnFaultBehaviorArray" :key="index"-->
<!-- :sortable="item.columnSortable"-->
<!-- :prop="item.columnProp"-->
<!-- :header-align="item.headerAlign"-->
<!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
<!-- :align="item.align"-->
<!-- :fixed="item.fixed==''?false:item.fixed"-->
<!-- :min-width="item.columnWidth"-->
<!-- :label="item.columnLabel">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="80"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="deleteDefect(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-tab-pane>-->
<el-tab-pane label="点检计划" name="check_plan"> <el-tab-pane label="点检计划" name="check_plan">
<el-form :inline="true" label-position="top" style="margin-top: 5px"> <el-form :inline="true" label-position="top" style="margin-top: 5px">
<el-button type="primary" @click="addPlanModal('B')">新增点检计划</el-button> <el-button type="primary" @click="addPlanModal('B')">新增点检计划</el-button>
@ -3374,7 +3374,7 @@
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80,
columnWidth: 250,
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -4314,19 +4314,21 @@
} else if (this.activeTable === 'calibration_record') { } else if (this.activeTable === 'calibration_record') {
this.getCalibrationRecordData() this.getCalibrationRecordData()
} }
// else if (this.activeTable === 'check_item') {
// this.getCheckItemData()
// } else if (this.activeTable === 'check_plan') {
// this.getCheckPlanData()
// } else if (this.activeTable === 'maintenance_item') {
// this.getMaintenanceItemData()
// } else if (this.activeTable === 'maintenance_plan') {
// this.getMaintenancePlanData()
// } else if (this.activeTable === 'history_order') {
// this.getHistoryOrderData()
// } else if (this.activeTable === 'fault_behavior') {
// this.getFaultBehaviorData()
// }
else if (this.activeTable === 'check_item') {
this.getCheckItemData()
}
else if (this.activeTable === 'check_plan') {
this.getCheckPlanData()
} else if (this.activeTable === 'maintenance_item') {
this.getMaintenanceItemData()
} else if (this.activeTable === 'maintenance_plan') {
this.getMaintenancePlanData()
} else if (this.activeTable === 'history_order') {
this.getHistoryOrderData()
}
else if (this.activeTable === 'fault_behavior') {
this.getFaultBehaviorData()
}
}, },
// //

Loading…
Cancel
Save