Compare commits
No commits in common. "8447b8f7abf4d08e8e37014e8a2715285c3c71a3" and "762861a922611c87936bf1c8b24df79cec4e6dcb" have entirely different histories.
8447b8f7ab
...
762861a922
@ -162,10 +162,6 @@ t.all = 'All'
|
|||||||
t.reset = 'Reset'
|
t.reset = 'Reset'
|
||||||
t.preview = 'Preview'
|
t.preview = 'Preview'
|
||||||
t.design = 'Design'
|
t.design = 'Design'
|
||||||
t.timetype = 'Time Type'
|
|
||||||
t.reftimerange = 'By time range'
|
|
||||||
t.refdate = 'By date'
|
|
||||||
t.hour = 'Hour(s)'
|
|
||||||
|
|
||||||
t.errors = {}
|
t.errors = {}
|
||||||
t.errors.nosection = 'There is no sections on this product line.'
|
t.errors.nosection = 'There is no sections on this product line.'
|
||||||
@ -320,40 +316,6 @@ t.eq.port = 'Port'
|
|||||||
t.eq.type = 'Type'
|
t.eq.type = 'Type'
|
||||||
t.eq.typecode = 'Type Code'
|
t.eq.typecode = 'Type Code'
|
||||||
t.eq.parent = 'Parent'
|
t.eq.parent = 'Parent'
|
||||||
t.eq.mtbf = '平均故障间隔时间[MTBF] (h)'
|
|
||||||
t.eq.mttr = '平均维修时间[MTTR] (h)'
|
|
||||||
t.eq.efficienttimeh = '有效时间(h)'
|
|
||||||
t.eq.shutdowntimeh = '关机时间(h)'
|
|
||||||
t.eq.worktimeh = '工作时长(h)'
|
|
||||||
t.eq.downtimeh = '故障时长(h)'
|
|
||||||
t.eq.stoptimeh = '停机时长(h)'
|
|
||||||
t.eq.worktime = '工作时长'
|
|
||||||
t.eq.stoptime = '停机时长'
|
|
||||||
t.eq.downtime = '故障时长'
|
|
||||||
t.eq.downcount = '故障次数'
|
|
||||||
t.eq.downrate = '故障比率'
|
|
||||||
t.eq.stoplost = '中断损失'
|
|
||||||
t.eq.ratio = '百分比'
|
|
||||||
t.eq.time = '时间'
|
|
||||||
t.eq.timetrend = '时间区间走势'
|
|
||||||
t.eq.nogap = '无间隔'
|
|
||||||
t.eq.monthgap = '按月'
|
|
||||||
t.eq.daygap = '按天'
|
|
||||||
t.eq.weekgap = '按周'
|
|
||||||
t.eq.hourgap = '按小时'
|
|
||||||
t.eq.workdurationratio = '工作时长比率'
|
|
||||||
t.eq.stopdurationratio = '停机时长比率'
|
|
||||||
t.eq.stopratio = '停机比率'
|
|
||||||
t.eq.downdurationratio = '故障时长比率'
|
|
||||||
t.eq.speedefficiency = '速度开动率'
|
|
||||||
t.eq.speedlost = '速度损失'
|
|
||||||
t.eq.timeefficiency = '时间开动率'
|
|
||||||
t.eq.year='年'
|
|
||||||
t.eq.month='月'
|
|
||||||
t.eq.realyield = '实际加工速度'
|
|
||||||
t.eq.designyield = '理论加工速度'
|
|
||||||
t.eq.viewtrend = '查看趋势'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
t.pl = {}
|
t.pl = {}
|
||||||
@ -366,7 +328,6 @@ t.pl.belong = 'Product Line'
|
|||||||
t.pl.tvalue = 'TT Value'
|
t.pl.tvalue = 'TT Value'
|
||||||
t.pl.factoryHints = 'Please select a factory'
|
t.pl.factoryHints = 'Please select a factory'
|
||||||
|
|
||||||
|
|
||||||
t.prompt = {}
|
t.prompt = {}
|
||||||
t.prompt.title = 'Prompt'
|
t.prompt.title = 'Prompt'
|
||||||
t.prompt.info = 'Are you sure to {handle}?'
|
t.prompt.info = 'Are you sure to {handle}?'
|
||||||
@ -374,7 +335,6 @@ t.prompt.sure = 'Are you sure to delete this record?'
|
|||||||
t.prompt.success = 'success'
|
t.prompt.success = 'success'
|
||||||
t.prompt.failed = 'failed'
|
t.prompt.failed = 'failed'
|
||||||
t.prompt.deleteBatch = 'Please choose items to delete.'
|
t.prompt.deleteBatch = 'Please choose items to delete.'
|
||||||
t.prompt.month = 'Please choose month'
|
|
||||||
|
|
||||||
t.validate = {}
|
t.validate = {}
|
||||||
t.validate.required = 'This is required.'
|
t.validate.required = 'This is required.'
|
||||||
@ -390,8 +350,6 @@ t.datePicker = {}
|
|||||||
t.datePicker.range = 'to'
|
t.datePicker.range = 'to'
|
||||||
t.datePicker.start = 'Start Time'
|
t.datePicker.start = 'Start Time'
|
||||||
t.datePicker.end = 'End Time'
|
t.datePicker.end = 'End Time'
|
||||||
t.datePicker.starttime = 'Start Time'
|
|
||||||
t.datePicker.endtime = 'End Time'
|
|
||||||
|
|
||||||
t.fullscreen = {}
|
t.fullscreen = {}
|
||||||
t.fullscreen.prompt = 'This operation is not supported by your browser.'
|
t.fullscreen.prompt = 'This operation is not supported by your browser.'
|
||||||
|
@ -163,10 +163,6 @@ t.all = '全部'
|
|||||||
t.reset = '重置'
|
t.reset = '重置'
|
||||||
t.preview = '预览'
|
t.preview = '预览'
|
||||||
t.design = '设计'
|
t.design = '设计'
|
||||||
t.timetype = '时间类型'
|
|
||||||
t.reftimerange = '按时间段'
|
|
||||||
t.refdate = '按日期'
|
|
||||||
t.hour = '小时'
|
|
||||||
|
|
||||||
t.errors = {}
|
t.errors = {}
|
||||||
t.errors.nosection = '该产线没有工段'
|
t.errors.nosection = '该产线没有工段'
|
||||||
@ -322,39 +318,6 @@ t.eq.port = '端口'
|
|||||||
t.eq.type = '类型名称'
|
t.eq.type = '类型名称'
|
||||||
t.eq.typecode = '类型编码'
|
t.eq.typecode = '类型编码'
|
||||||
t.eq.parent = '父类'
|
t.eq.parent = '父类'
|
||||||
t.eq.mtbf = '平均故障间隔时间[MTBF] (h)'
|
|
||||||
t.eq.mttr = '平均维修时间[MTTR] (h)'
|
|
||||||
t.eq.efficienttimeh = '有效时间(h)'
|
|
||||||
t.eq.shutdowntimeh = '关机时间(h)'
|
|
||||||
t.eq.worktimeh = '工作时长(h)'
|
|
||||||
t.eq.downtimeh = '故障时长(h)'
|
|
||||||
t.eq.stoptimeh = '停机时长(h)'
|
|
||||||
t.eq.worktime = '工作时长'
|
|
||||||
t.eq.stoptime = '停机时长'
|
|
||||||
t.eq.downtime = '故障时长'
|
|
||||||
t.eq.downcount = '故障次数'
|
|
||||||
t.eq.downrate = '故障比率'
|
|
||||||
t.eq.stoplost = '中断损失'
|
|
||||||
t.eq.ratio = '百分比'
|
|
||||||
t.eq.time = '时间'
|
|
||||||
t.eq.timetrend = '时间区间走势'
|
|
||||||
t.eq.nogap = '无间隔'
|
|
||||||
t.eq.monthgap = '按月'
|
|
||||||
t.eq.daygap = '按天'
|
|
||||||
t.eq.weekgap = '按周'
|
|
||||||
t.eq.hourgap = '按小时'
|
|
||||||
t.eq.workdurationratio = '工作时长比率'
|
|
||||||
t.eq.stopdurationratio = '停机时长比率'
|
|
||||||
t.eq.stopratio = '停机比率'
|
|
||||||
t.eq.downdurationratio = '故障时长比率'
|
|
||||||
t.eq.speedefficiency = '速度开动率'
|
|
||||||
t.eq.speedlost = '速度损失'
|
|
||||||
t.eq.timeefficiency = '时间开动率'
|
|
||||||
t.eq.year='年'
|
|
||||||
t.eq.month='月'
|
|
||||||
t.eq.realyield = '实际加工速度'
|
|
||||||
t.eq.designyield = '理论加工速度'
|
|
||||||
t.eq.viewtrend = '查看趋势'
|
|
||||||
|
|
||||||
|
|
||||||
t.pl = {}
|
t.pl = {}
|
||||||
@ -374,7 +337,6 @@ t.prompt.sure = '确定删除这条记录吗?'
|
|||||||
t.prompt.success = '操作成功'
|
t.prompt.success = '操作成功'
|
||||||
t.prompt.failed = '操作失败'
|
t.prompt.failed = '操作失败'
|
||||||
t.prompt.deleteBatch = '请选择删除项'
|
t.prompt.deleteBatch = '请选择删除项'
|
||||||
t.prompt.month = '请选择月份'
|
|
||||||
|
|
||||||
t.validate = {}
|
t.validate = {}
|
||||||
t.validate.required = '必填项不能为空'
|
t.validate.required = '必填项不能为空'
|
||||||
@ -390,8 +352,6 @@ t.datePicker = {}
|
|||||||
t.datePicker.range = '至'
|
t.datePicker.range = '至'
|
||||||
t.datePicker.start = '开始日期'
|
t.datePicker.start = '开始日期'
|
||||||
t.datePicker.end = '结束日期'
|
t.datePicker.end = '结束日期'
|
||||||
t.datePicker.starttime = '开始时间'
|
|
||||||
t.datePicker.endtime = '结束时间'
|
|
||||||
|
|
||||||
t.fullscreen = {}
|
t.fullscreen = {}
|
||||||
t.fullscreen.prompt = '您的浏览器不支持此操作'
|
t.fullscreen.prompt = '您的浏览器不支持此操作'
|
||||||
|
@ -5,39 +5,33 @@
|
|||||||
<!-- 工厂 -->
|
<!-- 工厂 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
|
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
|
||||||
<el-select v-model="dataForm.ftId" :placeholder="$t('factory.title')" clearable>
|
<el-select v-model="dataForm.ftId" :placeholder="'工厂'" clearable @change="handleFactoryChange">
|
||||||
<el-option v-for="factory in factoryList" :key="factory.id" :value="factory.id" :label="factory.name" />
|
<el-option v-for="factory in factoryList" :key="factory.id" :value="factory.id" :label="factory.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 产线 -->
|
<!-- 产线 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
|
<el-select v-model="dataForm.productlines" :placeholder="'产线'" multiple clearable>
|
||||||
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id"
|
||||||
|
:label="productLine.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 时间类型 -->
|
<!-- 时间类型 -->
|
||||||
<!-- 按时间段 -->
|
<!-- 按时间段 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="timeType" :placeholder="$t('timetype')" clearable>
|
<el-select v-model="timeType" :placeholder="'时间类型'" clearable>
|
||||||
<el-option value="range" :label="$t('reftimerange')" />
|
<el-option value="range" label="按时间段" />
|
||||||
<el-option value="date" :label="$t('refdate')" />
|
<el-option value="date" label="按日期" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 日期选择 -->
|
<!-- 日期选择 -->
|
||||||
<el-form-item v-if="timeType === 'date'">
|
<el-form-item v-if="timeType === 'date'">
|
||||||
<el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="$t('hints.date')" format="yyyy-MM-dd" />
|
<el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="'请选择日期'" format="yyyy-MM-dd" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 时间段选择 -->
|
<!-- 时间段选择 -->
|
||||||
<el-form-item v-else>
|
<el-form-item v-else>
|
||||||
<el-date-picker
|
<el-date-picker key="time-picker" v-model="rawTime" type="daterange" :range-separator="'至'"
|
||||||
key="time-picker"
|
:start-placeholder="'开始时间'" :end-placeholder="'结束时间'" format="yyyy-MM-dd" />
|
||||||
v-model="rawTime"
|
|
||||||
type="daterange"
|
|
||||||
:range-separator="$t('datePicker.range')"
|
|
||||||
:start-placeholder="$t('datePicker.starttime')"
|
|
||||||
:end-placeholder="$t('datePicker.endtime')"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -82,39 +76,39 @@ const tableConfigs = [
|
|||||||
{
|
{
|
||||||
// name: i18n.t('createTime'),
|
// name: i18n.t('createTime'),
|
||||||
prop: 'factoryName',
|
prop: 'factoryName',
|
||||||
name: i18n.t('factory.title')
|
name: '工厂'
|
||||||
},
|
},
|
||||||
{ prop: 'pdName', name: i18n.t('pl.title') },
|
{ prop: 'pdName', name: '产线' },
|
||||||
{ prop: 'wsName', name: i18n.t('ws.title') },
|
{ prop: 'wsName', name: '工段' },
|
||||||
{ prop: 'eqName', name: i18n.t('eq.title') },
|
{ prop: 'eqName', name: '设备' },
|
||||||
{
|
{
|
||||||
name: i18n.t('eq.efficienttimeh'),
|
name: '有效时间(h)',
|
||||||
children: [
|
children: [
|
||||||
{ prop: 'workTime', name: i18n.t('eq.worktimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
|
{ prop: 'workTime', name: '工作时长(h)', width: 120, filter: val => `${val} 小时` },
|
||||||
{ prop: 'workRate', name: i18n.t('eq.workdurationratio'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
|
{ prop: 'workRate', name: '工作时长比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: i18n.t('eq.shutdowntimeh'),
|
name: '关机时间(h)',
|
||||||
children: [
|
children: [
|
||||||
{ prop: 'stopTime', name: i18n.t('eq.stoptimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
|
{ prop: 'stopTime', name: '停机时长(h)', width: 120, filter: val => `${val} 小时` },
|
||||||
{ prop: 'stopRate', name: i18n.t('eq.stopratio'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
|
{ prop: 'stopRate', name: '停机比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: i18n.t('eq.stoplost'),
|
name: '中断损失',
|
||||||
children: [
|
children: [
|
||||||
{ prop: 'downTime', name: i18n.t('eq.downtimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
|
{ prop: 'downTime', name: '故障时长(h)', width: 120, filter: val => `${val} 小时` },
|
||||||
{ prop: 'downRate', name: i18n.t('eq.downrate'), width: 120, filter: val => (val * 100).toFixed(2) + '%' },
|
{ prop: 'downRate', name: '故障比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' },
|
||||||
{ prop: 'timeEfficiency', name: i18n.t('eq.timeefficiency'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
|
{ prop: 'timeEfficiency', name: '时间开动率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: i18n.t('eq.speedlost'),
|
name: '速度损失',
|
||||||
children: [
|
children: [
|
||||||
{ prop: 'realYield', name: i18n.t('eq.realyield'), width: 120, filter: val => `${val} `+i18n.t('hour') },
|
{ prop: 'realYield', name: '实际加工速度', width: 120, filter: val => `${val} 小时` },
|
||||||
{ prop: 'designYield', name: i18n.t('eq.designyield'), width: 120, filter: val => `${val} `+i18n.t('hour') },
|
{ prop: 'designYield', name: '理论加工速度', width: 120, filter: val => `${val} 小时` },
|
||||||
{ prop: 'peEfficiency', name: i18n.t('eq.speedefficiency'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
|
{ prop: 'peEfficiency', name: '速度开动率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -135,7 +129,7 @@ const tableConfigs = [
|
|||||||
subcomponent: TableTextComponent,
|
subcomponent: TableTextComponent,
|
||||||
// options: ['edit', 'delete']
|
// options: ['edit', 'delete']
|
||||||
// options: ['view-trend'] // 查看趋势
|
// options: ['view-trend'] // 查看趋势
|
||||||
buttonContent: i18n.t('eq.viewtrend'),
|
buttonContent: '查看趋势',
|
||||||
actionName: 'view-trend',
|
actionName: 'view-trend',
|
||||||
emitFullData: true
|
emitFullData: true
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<div class="close-row">
|
<div class="close-row">
|
||||||
<el-radio-group v-model="dataType" class="head-radio-group" size="small" @change="setLegend">
|
<el-radio-group v-model="dataType" class="head-radio-group" size="small" @change="setLegend">
|
||||||
<el-radio-button :label="$t('eq.ratio')" />
|
<el-radio-button label="百分比" />
|
||||||
<el-radio-button :label="$t('eq.time')" />
|
<el-radio-button label="时间" />
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
||||||
<el-radio-group v-if="1" v-model="searchType" class="head-radio-group" style="margin-left: 8px;" size="small" @change="handleRadioGroupChanged">
|
<el-radio-group v-if="1" v-model="searchType" class="head-radio-group" style="margin-left: 8px;" size="small" @change="handleRadioGroupChanged">
|
||||||
@ -34,13 +34,12 @@
|
|||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { pick } from 'lodash/object'
|
import { pick } from 'lodash/object'
|
||||||
import i18n from '../../../i18n'
|
|
||||||
|
|
||||||
class EchartConfigs {
|
class EchartConfigs {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.color = ['#e91e63', '#4caf50', '#3f51b5', '#ffc107', '#607d8b']
|
this.color = ['#e91e63', '#4caf50', '#3f51b5', '#ffc107', '#607d8b']
|
||||||
this.title = {
|
this.title = {
|
||||||
text: i18n.t('eq.timetrend'),
|
text: '时间区间走势',
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 'center',
|
left: 'center',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
@ -114,10 +113,10 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchType: i18n.t('eq.nogap'),
|
searchType: '无间隔',
|
||||||
searchRadioOptions: [i18n.t('eq.nogap'), i18n.t('eq.monthgap'), i18n.t('eq.weekgap'), i18n.t('eq.daygap')],
|
searchRadioOptions: ['无间隔', '按月', '按周', '按天'],
|
||||||
dataType: i18n.t('eq.time'),
|
dataType: '时间',
|
||||||
dataRadioOptions: [i18n.t('eq.time'), i18n.t('eq.ratio')],
|
dataRadioOptions: ['时间', '百分比'],
|
||||||
config: new EchartConfigs(),
|
config: new EchartConfigs(),
|
||||||
chart: null,
|
chart: null,
|
||||||
rateList: [], // 对请求来的数据分流
|
rateList: [], // 对请求来的数据分流
|
||||||
@ -128,7 +127,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initChart() {
|
async initChart() {
|
||||||
this.config.setTitle(this.injectData.equipmentName + i18n.t('eq.timetrend'))
|
this.config.setTitle(this.injectData.equipmentName + '时间区间走势')
|
||||||
await this.getList()
|
await this.getList()
|
||||||
this.setLegend()
|
this.setLegend()
|
||||||
},
|
},
|
||||||
@ -147,11 +146,11 @@ export default {
|
|||||||
|
|
||||||
makeQuerys() {
|
makeQuerys() {
|
||||||
const searchTypeMap = {
|
const searchTypeMap = {
|
||||||
[i18n.t('eq.nogap')]: 1,
|
无间隔: 1,
|
||||||
[i18n.t('eq.monthgap')]: 2,
|
按月: 2,
|
||||||
[i18n.t('eq.weekgap')]: 3,
|
按周: 3,
|
||||||
[i18n.t('eq.daygap')]: 4,
|
按天: 4,
|
||||||
[i18n.t('eq.hourgap')]: 5
|
按小时: 5
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -190,11 +189,11 @@ export default {
|
|||||||
// 分流
|
// 分流
|
||||||
datalist.map(item => {
|
datalist.map(item => {
|
||||||
const time = moment(item.time)
|
const time = moment(item.time)
|
||||||
if (this.searchType === i18n.t('eq.monthgap')) {
|
if (this.searchType === '按月') {
|
||||||
this.xAxis.push(`${time.year()}${i18n.t('eq.year')}${time.month() + 1}${i18n.t('eq.month')}`)
|
this.xAxis.push(`${time.year()}年${time.month() + 1}月`)
|
||||||
} else if (this.searchType === i18n.t('eq.weekgap')) {
|
} else if (this.searchType === '按周') {
|
||||||
this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
|
this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
|
||||||
} else if (this.searchType === i18n.t('eq.daygap')) {
|
} else if (this.searchType === '按天') {
|
||||||
this.xAxis.push(`${time.format('YY-M-D')}`)
|
this.xAxis.push(`${time.format('YY-M-D')}`)
|
||||||
} else {
|
} else {
|
||||||
this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
|
this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
|
||||||
@ -219,16 +218,8 @@ export default {
|
|||||||
setLegend() {
|
setLegend() {
|
||||||
// 设置legend
|
// 设置legend
|
||||||
const legendMap = {
|
const legendMap = {
|
||||||
[i18n.t('eq.ratio')]: [
|
百分比: ['工作时长比率', '停机时长比率', '故障时长比率', '速度开动率', '时间开动率', 'OEE', 'TEEP'],
|
||||||
i18n.t('eq.workdurationratio'),
|
时间: ['工作时长', '停机时长', '故障时长']
|
||||||
i18n.t('eq.stopdurationratio'),
|
|
||||||
i18n.t('eq.downdurationratio'),
|
|
||||||
i18n.t('eq.speedefficiency'),
|
|
||||||
i18n.t('eq.timeefficiency'),
|
|
||||||
'OEE',
|
|
||||||
'TEEP'
|
|
||||||
],
|
|
||||||
[i18n.t('eq.time')]: [i18n.t('eq.worktime'), i18n.t('eq.stoptime'), i18n.t('eq.downtime')]
|
|
||||||
}
|
}
|
||||||
this.config.setLegend(legendMap[this.dataType])
|
this.config.setLegend(legendMap[this.dataType])
|
||||||
this.setData()
|
this.setData()
|
||||||
@ -237,7 +228,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setData() {
|
setData() {
|
||||||
if (this.dataType === i18n.t('eq.time')) {
|
if (this.dataType === '时间') {
|
||||||
const workTimeList = []
|
const workTimeList = []
|
||||||
const stopTimeList = []
|
const stopTimeList = []
|
||||||
const downTimeList = []
|
const downTimeList = []
|
||||||
@ -247,9 +238,9 @@ export default {
|
|||||||
downTimeList.push(item.downTime)
|
downTimeList.push(item.downTime)
|
||||||
})
|
})
|
||||||
this.config.setSeries([
|
this.config.setSeries([
|
||||||
{ name: i18n.t('eq.worktime'), type: 'bar', data: workTimeList },
|
{ name: '工作时长', type: 'bar', data: workTimeList },
|
||||||
{ name: i18n.t('eq.stoptime'), type: 'bar', data: stopTimeList },
|
{ name: '停机时长', type: 'bar', data: stopTimeList },
|
||||||
{ name: i18n.t('eq.downtime'), type: 'bar', data: downTimeList }
|
{ name: '故障时长', type: 'bar', data: downTimeList }
|
||||||
])
|
])
|
||||||
} else {
|
} else {
|
||||||
// 百分比
|
// 百分比
|
||||||
@ -270,11 +261,11 @@ export default {
|
|||||||
teepList.push(item.teep)
|
teepList.push(item.teep)
|
||||||
})
|
})
|
||||||
this.config.setSeries([
|
this.config.setSeries([
|
||||||
{ name: i18n.t('eq.workdurationratio'), type: 'bar', data: workRateList },
|
{ name: '工作时长比率', type: 'bar', data: workRateList },
|
||||||
{ name: i18n.t('eq.stopdurationratio'), type: 'bar', data: stopRateList },
|
{ name: '停机时长比率', type: 'bar', data: stopRateList },
|
||||||
{ name: i18n.t('eq.downdurationratio'), type: 'bar', data: downRateList },
|
{ name: '故障时长比率', type: 'bar', data: downRateList },
|
||||||
{ name: i18n.t('eq.speedefficiency'), type: 'bar', data: peEfficiencyList },
|
{ name: '速度开动率', type: 'bar', data: peEfficiencyList },
|
||||||
{ name: i18n.t('eq.timeefficiency'), type: 'bar', data: timeEfficiencyList },
|
{ name: '时间开动率', type: 'bar', data: timeEfficiencyList },
|
||||||
{ name: 'OEE', type: 'bar', data: oeeList },
|
{ name: 'OEE', type: 'bar', data: oeeList },
|
||||||
{ name: 'TEEP', type: 'bar', data: teepList }
|
{ name: 'TEEP', type: 'bar', data: teepList }
|
||||||
])
|
])
|
||||||
@ -287,8 +278,8 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// this.chart.setOption(this.config)
|
// this.chart.setOption(this.config)
|
||||||
this.chart.setOption(this.config, {
|
this.chart.setOption(this.config, {
|
||||||
notMerge: true
|
notMerge: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<!-- 月份 -->
|
<!-- 月份 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="$t('prompt.month')" format="yyyy-MM" />
|
<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="'请选择月份'" format="yyyy-MM" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 产线 -->
|
<!-- 产线 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
|
<el-select v-model="dataForm.productlines" :placeholder="'产线'" multiple clearable>
|
||||||
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -49,14 +49,14 @@ const tableConfigs = [
|
|||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
// { prop: 'time', name: '时间', filter: timeFilter },
|
// { prop: 'time', name: '时间', filter: timeFilter },
|
||||||
{ prop: 'pdName', name: i18n.t('pl.name') },
|
{ prop: 'pdName', name: '产线名称' },
|
||||||
{ prop: 'wsName', name: i18n.t('ws.title') },
|
{ prop: 'wsName', name: '工序' },
|
||||||
{ prop: 'eqName', name: i18n.t('eq.title') },
|
{ prop: 'eqName', name: '设备' },
|
||||||
{ prop: 'mtbf', name: i18n.t('eq.mtbf'), width: 220 },
|
{ prop: 'mtbf', name: '平均故障间隔时间[MTBF] (h)', width: 220 },
|
||||||
{ prop: 'mttr', name: i18n.t('eq.mttr'), width: 190 },
|
{ prop: 'mttr', name: '平均维修时间[MTTR] (h)', width: 190 },
|
||||||
{ prop: 'workTime', name: i18n.t('eq.worktimeh') },
|
{ prop: 'workTime', name: '工作时长 (h)' },
|
||||||
{ prop: 'downTime', name: i18n.t('eq.downtimeh') },
|
{ prop: 'downTime', name: '故障时长 (h)' },
|
||||||
{ prop: 'downCount', name: i18n.t('eq.downcount') }
|
{ prop: 'downCount', name: '故障次数' },
|
||||||
// {
|
// {
|
||||||
// prop: 'operations',
|
// prop: 'operations',
|
||||||
// name: i18n.t('handle'),
|
// name: i18n.t('handle'),
|
||||||
|
Loading…
Reference in New Issue
Block a user