|
|
|
@ -1,6 +1,6 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="app-container">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
|
|
|
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="90px">
|
|
|
|
<el-form-item label="设备编码">
|
|
|
|
<el-form-item label="设备编码">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.deviceCode"
|
|
|
|
v-model="queryParams.deviceCode"
|
|
|
|
@ -9,6 +9,13 @@
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="班次">
|
|
|
|
|
|
|
|
<el-select v-model="queryParams.shiftType" placeholder="请选择班次" style="width: 120px">
|
|
|
|
|
|
|
|
<el-option label="全部班次" value="ALL" />
|
|
|
|
|
|
|
|
<el-option label="白班" value="DAY" />
|
|
|
|
|
|
|
|
<el-option label="夜班" value="NIGHT" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="时间范围">
|
|
|
|
<el-form-item label="时间范围">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker
|
|
|
|
v-model="daterangeBeginTime"
|
|
|
|
v-model="daterangeBeginTime"
|
|
|
|
@ -28,36 +35,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div class="charts-container">
|
|
|
|
<div class="charts-container">
|
|
|
|
<el-card class="chart-card">
|
|
|
|
<el-card class="chart-card">
|
|
|
|
<div slot="header" class="chart-title">设备 OEE 对比</div>
|
|
|
|
<div slot="header" class="chart-title">设备 OEE 对比 (注塑车间班次计算版)</div>
|
|
|
|
<div ref="barChart" class="chart-content"></div>
|
|
|
|
<div ref="barChart" class="chart-content" />
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="reportList" style="margin-top: 10px">
|
|
|
|
<el-table v-loading="loading" :data="reportList" style="margin-top: 10px; width: 100%" border>
|
|
|
|
<el-table-column label="设备编码" align="center" prop="DEVICE_CODE" width="140" />
|
|
|
|
<el-table-column label="班次日期" align="center" prop="SHIFT_DATE" width="105" />
|
|
|
|
<el-table-column label="设备名称" align="center" prop="DEVICE_NAME" show-overflow-tooltip />
|
|
|
|
<el-table-column label="班次" align="center" prop="SHIFT_NAME" width="80" />
|
|
|
|
<el-table-column label="可用率" align="center" prop="AVAILABILITY" width="100">
|
|
|
|
<el-table-column label="设备编码" align="center" prop="DEVICE_CODE" width="120" />
|
|
|
|
|
|
|
|
<el-table-column label="设备名称" align="center" prop="DEVICE_NAME" min-width="120" show-overflow-tooltip />
|
|
|
|
|
|
|
|
<el-table-column label="利用率(A)" align="center" prop="AVAILABILITY" width="90">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ formatPercent(scope.row.AVAILABILITY) }}</span>
|
|
|
|
<span>{{ formatPercent(scope.row.AVAILABILITY) }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="性能" align="center" prop="PERFORMANCE" width="100">
|
|
|
|
<el-table-column label="性能(P)" align="center" prop="PERFORMANCE" width="90">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ formatPercent(scope.row.PERFORMANCE) }}</span>
|
|
|
|
<span :title="'诊断值: ' + formatPercent(scope.row.DIAGNOSTIC_PERFORMANCE)">{{ formatPercent(scope.row.PERFORMANCE) }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="良品率" align="center" prop="QUALITY" width="100">
|
|
|
|
<el-table-column label="良品率(Q)" align="center" prop="QUALITY" width="90">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ formatPercent(scope.row.QUALITY) }}</span>
|
|
|
|
<span>{{ formatPercent(scope.row.QUALITY) }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="OEE" align="center" prop="OEE" width="100">
|
|
|
|
<el-table-column label="OEE" align="center" prop="OEE" width="90">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ formatPercent(scope.row.OEE) }}</span>
|
|
|
|
<span style="font-weight: bold; color: #409EFF;">{{ formatPercent(scope.row.OEE) }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="计划时间(分钟)" align="center" prop="PLANNED_TIME_MINUTES" width="140" />
|
|
|
|
<el-table-column label="运行时间" align="center" width="100">
|
|
|
|
<el-table-column label="停机时间(分钟)" align="center" prop="DOWNTIME_MINUTES" width="140" />
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<span>{{ (scope.row.ACTUAL_RUN_SECONDS / 60).toFixed(1) }} 分钟</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="计划时间" align="center" width="90">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<span>{{ scope.row.PLANNED_TIME_MINUTES }} 分钟</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="开模数" align="center" prop="SHOTS" width="80" />
|
|
|
|
|
|
|
|
<el-table-column label="模腔数" align="center" prop="CAVITIES" width="70" />
|
|
|
|
|
|
|
|
<el-table-column label="产出数" align="center" prop="OUTPUT_QTY" width="90" />
|
|
|
|
|
|
|
|
<el-table-column label="标准周期" align="center" width="100">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<span :title="scope.row.CYCLE_SOURCE">{{ scope.row.STANDARD_CYCLE.toFixed(2) }} 秒</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="降级说明" align="center" prop="DOWNGRADE_REASON" min-width="150" show-overflow-tooltip />
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -78,7 +104,8 @@ export default {
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
deviceCode: null,
|
|
|
|
deviceCode: null,
|
|
|
|
beginTime: null,
|
|
|
|
beginTime: null,
|
|
|
|
endTime: null
|
|
|
|
endTime: null,
|
|
|
|
|
|
|
|
shiftType: 'ALL'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
barChart: null
|
|
|
|
barChart: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -119,6 +146,7 @@ export default {
|
|
|
|
/** 重置按钮 */
|
|
|
|
/** 重置按钮 */
|
|
|
|
resetQuery() {
|
|
|
|
resetQuery() {
|
|
|
|
this.queryParams.deviceCode = null
|
|
|
|
this.queryParams.deviceCode = null
|
|
|
|
|
|
|
|
this.queryParams.shiftType = 'ALL'
|
|
|
|
const today = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
|
const today = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
|
this.daterangeBeginTime = [today, today]
|
|
|
|
this.daterangeBeginTime = [today, today]
|
|
|
|
this.handleQuery()
|
|
|
|
this.handleQuery()
|
|
|
|
@ -126,7 +154,11 @@ export default {
|
|
|
|
/** 初始化柱状图 */
|
|
|
|
/** 初始化柱状图 */
|
|
|
|
initBarChart() {
|
|
|
|
initBarChart() {
|
|
|
|
if (!this.barChart) return
|
|
|
|
if (!this.barChart) return
|
|
|
|
const xData = (this.reportList || []).map(item => item.DEVICE_NAME || item.DEVICE_CODE)
|
|
|
|
// X轴标签包含设备名与班次
|
|
|
|
|
|
|
|
const xData = (this.reportList || []).map(item => {
|
|
|
|
|
|
|
|
const devName = item.DEVICE_NAME || item.DEVICE_CODE
|
|
|
|
|
|
|
|
return `${devName}\n(${item.SHIFT_NAME})`
|
|
|
|
|
|
|
|
})
|
|
|
|
const yData = (this.reportList || []).map(item => item.OEE || 0)
|
|
|
|
const yData = (this.reportList || []).map(item => item.OEE || 0)
|
|
|
|
const option = {
|
|
|
|
const option = {
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
|
@ -134,13 +166,19 @@ export default {
|
|
|
|
formatter: params => {
|
|
|
|
formatter: params => {
|
|
|
|
if (!params || !params.length) return ''
|
|
|
|
if (!params || !params.length) return ''
|
|
|
|
const p = params[0]
|
|
|
|
const p = params[0]
|
|
|
|
return `${p.name}<br/>OEE:${this.formatPercent(p.data)}`
|
|
|
|
const item = this.reportList[p.dataIndex]
|
|
|
|
|
|
|
|
if (!item) return `${p.name}<br/>OEE:${this.formatPercent(p.data)}`
|
|
|
|
|
|
|
|
return `${item.DEVICE_NAME || item.DEVICE_CODE} (${item.SHIFT_DATE} ${item.SHIFT_NAME})<br/>` +
|
|
|
|
|
|
|
|
`OEE:${this.formatPercent(item.OEE)}<br/>` +
|
|
|
|
|
|
|
|
`└ 利用率(A):${this.formatPercent(item.AVAILABILITY)}<br/>` +
|
|
|
|
|
|
|
|
`└ 性能(P):${this.formatPercent(item.PERFORMANCE)} (诊断值: ${this.formatPercent(item.DIAGNOSTIC_PERFORMANCE)})<br/>` +
|
|
|
|
|
|
|
|
`└ 良品率(Q):${this.formatPercent(item.QUALITY)}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
grid: {
|
|
|
|
grid: {
|
|
|
|
left: '3%',
|
|
|
|
left: '3%',
|
|
|
|
right: '4%',
|
|
|
|
right: '4%',
|
|
|
|
bottom: '3%',
|
|
|
|
bottom: '10%',
|
|
|
|
containLabel: true
|
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
@ -148,7 +186,7 @@ export default {
|
|
|
|
data: xData,
|
|
|
|
data: xData,
|
|
|
|
axisLabel: {
|
|
|
|
axisLabel: {
|
|
|
|
interval: 0,
|
|
|
|
interval: 0,
|
|
|
|
rotate: 30
|
|
|
|
rotate: 20
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
yAxis: {
|
|
|
|
|