完好率统计报表、设备运行记录定时任务

master
wws 12 months ago
parent 5816985501
commit 946e15378c

@ -33,7 +33,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障时间" prop="faultTime">
<el-form-item v-if="false" label="故障时间" prop="faultTime">
<el-input
v-model="queryParams.faultTime"
placeholder="请输入故障时间"
@ -41,7 +41,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="实际运行时间;运行时间-故障时间" prop="actualOperationTime">
<el-form-item v-if="false" label="实际运行时间;运行时间-故障时间" prop="actualOperationTime">
<el-input
v-model="queryParams.actualOperationTime"
placeholder="请输入实际运行时间;运行时间-故障时间"
@ -49,7 +49,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="运行时间" prop="operationTime">
<el-form-item v-if="false" label="运行时间" prop="operationTime">
<el-input
v-model="queryParams.operationTime"
placeholder="请输入运行时间"
@ -57,7 +57,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障率" prop="failureRate">
<el-form-item v-if="false" label="故障率" prop="failureRate">
<el-input
v-model="queryParams.failureRate"
placeholder="请输入故障率"
@ -65,7 +65,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障描述" prop="failureDescription">
<el-form-item v-if="false" label="故障描述" prop="failureDescription">
<el-input
v-model="queryParams.failureDescription"
placeholder="请输入故障描述"
@ -73,7 +73,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="原因分析" prop="reasonAnalyze">
<el-form-item v-if="false" label="原因分析" prop="reasonAnalyze">
<el-input
v-model="queryParams.reasonAnalyze"
placeholder="请输入原因分析"
@ -81,7 +81,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="处理方式" prop="handlingMethod">
<el-form-item v-if="false" label="处理方式" prop="handlingMethod">
<el-input
v-model="queryParams.handlingMethod"
placeholder="请输入处理方式"
@ -97,7 +97,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备状态描述" prop="equStatusDes">
<el-form-item v-if="false" label="设备状态描述" prop="equStatusDes">
<el-input
v-model="queryParams.equStatusDes"
placeholder="请输入设备状态描述"
@ -105,7 +105,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更换备件" prop="replaceSpare">
<el-form-item v-if="false" label="更换备件" prop="replaceSpare">
<el-input
v-model="queryParams.replaceSpare"
placeholder="请输入更换备件"
@ -113,7 +113,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工厂" prop="factoryCode">
<el-form-item v-if="false" label="工厂" prop="factoryCode">
<el-input
v-model="queryParams.factoryCode"
placeholder="请输入工厂"
@ -121,7 +121,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备用字段1" prop="attr1">
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input
v-model="queryParams.attr1"
placeholder="请输入备用字段1"
@ -129,7 +129,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备用字段2" prop="attr2">
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input
v-model="queryParams.attr2"
placeholder="请输入备用字段2"
@ -137,7 +137,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备用字段3" prop="attr3">
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input
v-model="queryParams.attr3"
placeholder="请输入备用字段3"
@ -145,13 +145,26 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="日期" prop="createTime">
<el-date-picker
v-model="queryParams.createTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-row v-if="false" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
@ -199,26 +212,32 @@
<el-table v-loading="loading" :data="operationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="车间" align="center" prop="workshop" />
<el-table-column label="组线" align="center" prop="groupLine" />
<el-table-column label="设备" align="center" prop="equipmentName" />
<el-table-column label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="故障时间" align="center" prop="faultTime" />
<el-table-column label="实际运行时间;运行时间-故障时间" align="center" prop="actualOperationTime" />
<el-table-column label="运行时间" align="center" prop="operationTime" />
<el-table-column label="故障率" align="center" prop="failureRate" />
<el-table-column label="故障描述" align="center" prop="failureDescription" />
<el-table-column label="原因分析" align="center" prop="reasonAnalyze" />
<el-table-column label="处理方式" align="center" prop="handlingMethod" />
<el-table-column label="维修人" align="center" prop="repairPerson" />
<el-table-column label="设备状态描述" align="center" prop="equStatusDes" />
<el-table-column label="更换备件" align="center" prop="replaceSpare" />
<el-table-column label="工厂" align="center" prop="factoryCode" />
<el-table-column label="备用字段1" align="center" prop="attr1" />
<el-table-column label="备用字段2" align="center" prop="attr2" />
<el-table-column label="备用字段3" align="center" prop="attr3" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column v-if="false" label="主键" align="center" prop="id" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column width="100" label="工厂" align="center" prop="factoryCode" />
<el-table-column width="120" label="日期" align="center" prop="createTime" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="120" label="车间" align="center" prop="workshop" />
<el-table-column width="120" label="组线" align="center" prop="groupLine" />
<el-table-column width="120" label="设备" align="center" prop="equipmentName" />
<el-table-column width="120" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="100" label="故障时间" align="center" prop="faultTime" />
<el-table-column width="100" label="实际运行时间" align="center" prop="actualOperationTime" />
<el-table-column width="100" label="运行时间" align="center" prop="operationTime" />
<el-table-column width="100" label="故障率" align="center" prop="failureRate" />
<el-table-column width="200" label="故障描述" align="center" prop="failureDescription" />
<el-table-column width="200" label="原因分析" align="center" prop="reasonAnalyze" />
<el-table-column width="200" label="设备状态描述" align="center" prop="equStatusDes" />
<el-table-column width="200" label="处理方式" align="center" prop="handlingMethod" />
<el-table-column width="200" label="更换备件" align="center" prop="replaceSpare" />
<el-table-column width="100" label="维修人" align="center" prop="repairPerson" />
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1" />
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2" />
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
<el-table-column width="120" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@ -228,6 +247,7 @@
v-hasPermi="['device:operation:edit']"
>修改</el-button>
<el-button
v-if="false"
size="mini"
type="text"
icon="el-icon-delete"
@ -248,62 +268,62 @@
<!-- 添加或修改设备运行记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="车间" prop="workshop">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item v-if="false" label="车间" prop="workshop">
<el-input v-model="form.workshop" placeholder="请输入车间" />
</el-form-item>
<el-form-item label="组线" prop="groupLine">
<el-form-item v-if="false" label="组线" prop="groupLine">
<el-input v-model="form.groupLine" placeholder="请输入组线" />
</el-form-item>
<el-form-item label="设备" prop="equipmentName">
<el-input v-model="form.equipmentName" placeholder="请输入设备" />
<el-input v-model="form.equipmentName" placeholder="请输入设备" :disabled="true"/>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode">
<el-form-item v-if="false" label="设备编码" prop="equipmentCode">
<el-input v-model="form.equipmentCode" placeholder="请输入设备编码" />
</el-form-item>
<el-form-item label="故障时间" prop="faultTime">
<el-input v-model="form.faultTime" placeholder="请输入故障时间" />
</el-form-item>
<el-form-item label="实际运行时间;运行时间-故障时间" prop="actualOperationTime">
<el-form-item label="实际运行时间" prop="actualOperationTime">
<el-input v-model="form.actualOperationTime" placeholder="请输入实际运行时间;运行时间-故障时间" />
</el-form-item>
<el-form-item label="运行时间" prop="operationTime">
<el-input v-model="form.operationTime" placeholder="请输入运行时间" />
</el-form-item>
<el-form-item label="故障率" prop="failureRate">
<el-input v-model="form.failureRate" placeholder="请输入故障率" />
<el-form-item v-if="false" label="故障率" prop="failureRate">
<el-input v-model="form.failureRate" placeholder="请输入故障率" :disabled="true"/>
</el-form-item>
<el-form-item label="故障描述" prop="failureDescription">
<el-input v-model="form.failureDescription" placeholder="请输入故障描述" />
<el-input v-model="form.failureDescription" placeholder="请输入故障描述" :disabled="true"/>
</el-form-item>
<el-form-item label="原因分析" prop="reasonAnalyze">
<el-input v-model="form.reasonAnalyze" placeholder="请输入原因分析" />
<el-input v-model="form.reasonAnalyze" placeholder="请输入原因分析" :disabled="true"/>
</el-form-item>
<el-form-item label="处理方式" prop="handlingMethod">
<el-input v-model="form.handlingMethod" placeholder="请输入处理方式" />
<el-input v-model="form.handlingMethod" placeholder="请输入处理方式" :disabled="true"/>
</el-form-item>
<el-form-item label="维修人" prop="repairPerson">
<el-input v-model="form.repairPerson" placeholder="请输入维修人" />
<el-input v-model="form.repairPerson" placeholder="请输入维修人" :disabled="true"/>
</el-form-item>
<el-form-item label="设备状态描述" prop="equStatusDes">
<el-input v-model="form.equStatusDes" placeholder="请输入设备状态描述" />
<el-input v-model="form.equStatusDes" placeholder="请输入设备状态描述" :disabled="true"/>
</el-form-item>
<el-form-item label="更换备件" prop="replaceSpare">
<el-input v-model="form.replaceSpare" placeholder="请输入更换备件" />
<el-input v-model="form.replaceSpare" placeholder="请输入更换备件" :disabled="true"/>
</el-form-item>
<el-form-item label="工厂" prop="factoryCode">
<el-form-item v-if="false" label="工厂" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂" />
</el-form-item>
<el-form-item label="备用字段1" prop="attr1">
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item label="备用字段2" prop="attr2">
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item label="备用字段3" prop="attr3">
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-form-item v-if="false" label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</el-form-item>
</el-form>
@ -317,11 +337,40 @@
<script>
import { listOperation, getOperation, delOperation, addOperation, updateOperation } from "@/api/device/operation";
import {parseTime} from "../../../utils/ruoyi";
export default {
name: "Operation",
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
//
loading: true,
//
@ -362,6 +411,7 @@ export default {
attr1: null,
attr2: null,
attr3: null,
createTimeArray: [],
},
//
form: {},
@ -377,6 +427,7 @@ export default {
this.getList();
},
methods: {
parseTime,
/** 查询设备运行记录列表 */
getList() {
this.loading = true;
@ -417,7 +468,7 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
};
this.resetForm("form");
},
@ -429,6 +480,8 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.handleQuery();
},
//

Loading…
Cancel
Save