<!--
|
* @Date: 2024-04-17 22:17:37
|
* @LastEditors: Sneed
|
* @LastEditTime: 2024-04-22 19:07:49
|
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/configComp/Efficiency.vue
|
-->
|
<template>
|
<el-main>
|
<el-row>
|
<el-col>
|
<el-card style="max-width: 480px">
|
<template #header>
|
<div class="card-header">
|
用时分析(用时分布)
|
</div>
|
</template>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次内休息时间
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save()" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_type.TIME_USED_ANALYSIS" />
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次对外时间(包括班次内未定义时间)
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save(true)" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_shift.TIME_USED_ANALYSIS" />
|
</el-col>
|
</el-row>
|
</el-card>
|
<el-card style="max-width: 480px">
|
<template #header>
|
<div class="card-header">
|
效率分析
|
</div>
|
</template>
|
<el-row>
|
<el-col style="font-weight: blod;font-size: 14px">运行率</el-col>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次内休息时间
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save()" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_type.RUNNING" />
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次对外时间(包括班次内未定义时间)
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save(true)" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_shift.RUNNING" />
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col style="font-weight: blod;font-size: 14px">报警率</el-col>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次内休息时间
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save()" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_type.ALARM" />
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次对外时间(包括班次内未定义时间)
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save(true)" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_shift.ALARM" />
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col style="font-weight: blod;font-size: 14px">稼动率</el-col>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次内休息时间
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save()" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_type.OEE" />
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次对外时间(包括班次内未定义时间)
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save(true)" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_shift.OEE" />
|
</el-col>
|
</el-row>
|
</el-card>
|
<el-card style="max-width: 480px">
|
<template #header>
|
<div class="card-header">
|
产量统计
|
</div>
|
</template>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次内休息时间
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save()" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_type.OUT_PUT" />
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次对外时间(包括班次内未定义时间)
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save(true)" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_shift.OUT_PUT" />
|
</el-col>
|
</el-row>
|
</el-card>
|
<el-card style="max-width: 480px">
|
<template #header>
|
<div class="card-header">
|
报警统计
|
</div>
|
</template>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次内休息时间
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save()" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_type.ALARM_ANALYSIS" />
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="18" style="display: flex;align-items: center">
|
排除班次对外时间(包括班次内未定义时间)
|
</el-col>
|
<el-col :span="4">
|
<el-switch @change="save(true)" :active-value="1" :inactive-value="0"
|
v-model="mdc_open_shift.ALARM_ANALYSIS" />
|
</el-col>
|
</el-row>
|
</el-card>
|
</el-col>
|
</el-row>
|
</el-main>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
mdc_open_typeId: '',
|
mdc_open_type: {
|
TIME_USED_ANALYSIS: 0,
|
RUNNING: 0,
|
ALARM: 0,
|
OEE: 0,
|
OUT_PUT: 0,
|
ALARM_ANALYSIS: 0,
|
},
|
mdc_open_shiftId: '',
|
mdc_open_shift: {
|
TIME_USED_ANALYSIS: 0,
|
RUNNING: 0,
|
ALARM: 0,
|
OEE: 0,
|
OUT_PUT: 0,
|
ALARM_ANALYSIS: 0,
|
}
|
}
|
},
|
created() {
|
this.init()
|
},
|
methods: {
|
init() {
|
this.$HTTP.get('/api/blade-system/param/detail?paramKey=mdc_open_shift').then(res => {
|
if (res.code === 200) {
|
this.mdc_open_shiftId = res.data.id
|
JSON.parse(res.data.paramValue).forEach(v => {
|
this.mdc_open_shift[v.type] = v.open
|
})
|
}
|
})
|
this.$HTTP.get('/api/blade-system/param/detail?paramKey=mdc_open_type').then(res => {
|
if (res.code === 200) {
|
this.mdc_open_typeId = res.data.id
|
JSON.parse(res.data.paramValue).forEach(v => {
|
this.mdc_open_type[v.type] = v.open
|
})
|
}
|
})
|
},
|
save(flag) {
|
let data = {
|
|
}
|
if (flag) {
|
data.paramKey = 'mdc_open_shift'
|
data.id = this.mdc_open_shiftId
|
let paramValue = Object.keys(this.mdc_open_shift).map(v => {
|
return {
|
type: v,
|
open: this.mdc_open_shift[v]
|
}
|
})
|
data.paramValue = JSON.stringify(paramValue)
|
} else {
|
data.paramKey = 'mdc_open_type'
|
data.id = this.mdc_open_typeId
|
let paramValue = Object.keys(this.mdc_open_type).map(v => {
|
return {
|
type: v,
|
open: this.mdc_open_type[v]
|
}
|
})
|
data.paramValue = JSON.stringify(paramValue)
|
}
|
this.$HTTP.post('/api/blade-system/param/submit', data).then(res => {
|
if (res.code == 200) {
|
this.$message.success(`操作成功`)
|
this.init()
|
}
|
})
|
},
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped></style>
|