Merge branch 'develop' into fzq

This commit is contained in:
Fanzink
2022-03-03 20:49:39 +08:00
36 changed files with 3098 additions and 182 deletions

View File

@@ -0,0 +1,152 @@
<!--
* @Author: DY
* @Date: 2021-12-16 15:41:11
* @LastEditors: DY
* @LastEditTime: 2022-03-03 15:26:05
* @Description: E10
-->
<template>
<div class="app-container">
<el-form
:model="formData"
:inline="true"
size="medium"
label-width="80px"
>
<el-form-item>
<el-button type="primary" @click="toE10()">E10</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toOEE()">OEE</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toMTTR()">MTTR</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toMCBF()">MCBF</el-button>
</el-form-item>
<!-- <el-form-item :label="$t('module.equipmentManager.recipe.equipmentId')" prop="equipmentName">
<el-select v-model="formData.equipmentName" :placeholder="$t('module.equipmentManager.recipe.EQselect')" filterable clearable>
<el-option
v-for="(item, index) in eqList"
:key="index"
:label="item.name"
:value="item.name"
/>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('module.equipmentManager.equipmentVisualization.timeSlot')" label-width="100px" prop="time">
<el-date-picker
v-model="formData.timeSlot"
type="datetimerange"
:start-placeholder="$t('module.orderManage.order.StartTime')"
:end-placeholder="$t('module.orderManage.order.StartTime')"
:range-separator="$t('module.orderManage.order.To')"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.search' | i18nFilter }} </el-button>
</el-form-item>
<!-- <el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.exportBtn' | i18nFilter }} </el-button>
</el-form-item> -->
</el-form>
<e10Chart v-if="e10Visible" ref="e10Chart" :time1="startTime" :time2="endTime" :name="formData.equipmentName" @equipmentName="seeDetail" />
<e10-detail-chart v-if="e10Detail" ref="e10DetailChart" :time1="startTime" :time2="endTime" :equipment-name="equipmentName" />
</div>
</template>
<script>
import e10Chart from './components/e10-chart'
import e10DetailChart from './components/e10Detail-chart'
// import { equipmentList } from '@/api/basicData/Equipment/equipmentInfo'
export default {
name: 'E10',
components: { e10Chart, e10DetailChart },
data() {
return {
list: [],
startTime: '',
endTime: '',
formData: {
timeSlot: [],
equipmentName: undefined,
current: 1,
size: 10
},
e10Visible: false,
e10Detail: false,
equipmentName: '',
eqList: []
}
},
created() {
// this.getEqList()
this.getList()
},
methods: {
async getEqList() {
const res = await equipmentList({
current: 1,
size: 999
})
if (res.code === 0) {
this.eqList = res.data
}
},
toE10() {
this.$router.push({
name: 'E10'
})
},
toOEE() {
this.$router.push({
name: 'OEE'
})
},
toMTTR() {
this.$router.push({
name: 'MTTR'
})
},
toMCBF() {
this.$router.push({
name: 'MCBF'
})
},
seeDetail(name) {
this.equipmentName = name
this.e10Visible = false
this.e10Detail = true
setTimeout(() => {
this.$refs.e10DetailChart.getList()
}, 60)
},
getList() {
if (this.formData.timeSlot.length !== 0) {
this.startTime = this.formData.timeSlot[0]
this.endTime = this.formData.timeSlot[1]
this.$nextTick(() => {
this.e10Visible = true
setTimeout(() => {
this.$refs.e10Chart.getList()
}, 60)
})
}
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,151 @@
<!--
* @Author: DY
* @Date: 2021-12-16 15:41:11
* @LastEditors: DY
* @LastEditTime: 2022-03-03 15:26:28
* @Description: MCBF
-->
<template>
<div class="app-container">
<el-form
:model="formData"
:inline="true"
size="medium"
label-width="80px"
>
<el-form-item>
<el-button @click="toE10()">E10</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toOEE()">OEE</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toMTTR()">MTTR</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="toMCBF()">MCBF</el-button>
</el-form-item>
<!-- <el-form-item :label="$t('module.equipmentManager.recipe.equipmentId')" prop="equipmentName">
<el-select v-model="formData.equipmentName" :placeholder="$t('module.equipmentManager.recipe.EQselect')" filterable clearable>
<el-option
v-for="(item, index) in eqList"
:key="index"
:label="item.name"
:value="item.name"
/>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('module.equipmentManager.equipmentVisualization.timeSlot')" label-width="100px" prop="time">
<el-date-picker
v-model="formData.timeSlot"
type="datetimerange"
:start-placeholder="$t('module.orderManage.order.StartTime')"
:end-placeholder="$t('module.orderManage.order.StartTime')"
:range-separator="$t('module.orderManage.order.To')"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.search' | i18nFilter }} </el-button>
</el-form-item>
<!-- <el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.exportBtn' | i18nFilter }} </el-button>
</el-form-item> -->
</el-form>
<mcbfChart v-if="mcbfVisible" ref="mcbfChart" :time1="startTime" :time2="endTime" @equipmentName="seeDetail" />
<mcbf-detail-chart v-if="mcbfDetail" ref="mcbfDetailChart" :time1="startTime" :time2="endTime" :equipment-name="equipmentName" />
</div>
</template>
<script>
import mcbfChart from './components/mcbf-chart'
import mcbfDetailChart from './components/mcbfDetail-chart'
// import { equipmentList } from '@/api/basicData/Equipment/equipmentInfo'
export default {
name: 'MCBF',
components: { mcbfChart, mcbfDetailChart },
data() {
return {
list: [],
startTime: '',
endTime: '',
formData: {
timeSlot: [],
current: 1,
size: 10
},
mcbfVisible: false,
mcbfDetail: false,
equipmentName: '',
eqList: []
}
},
created() {
// this.getEqList()
this.getList()
},
methods: {
async getEqList() {
const res = await equipmentList({
current: 1,
size: 999
})
if (res.code === 0) {
this.eqList = res.data
}
},
toE10() {
this.$router.push({
name: 'E10'
})
},
toOEE() {
this.$router.push({
name: 'OEE'
})
},
toMTTR() {
this.$router.push({
name: 'MTTR'
})
},
toMCBF() {
this.$router.push({
name: 'MCBF'
})
},
seeDetail(name) {
this.equipmentName = name
this.mcbfVisible = false
this.mcbfDetail = true
setTimeout(() => {
this.$refs.mcbfDetailChart.getList()
}, 60)
},
getList() {
if (this.formData.timeSlot.length !== 0) {
this.startTime = this.formData.timeSlot[0]
this.endTime = this.formData.timeSlot[1]
this.$nextTick(() => {
this.mcbfVisible = true
setTimeout(() => {
this.$refs.mcbfChart.getList()
}, 60)
})
}
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,151 @@
<!--
* @Author: DY
* @Date: 2021-12-16 15:41:11
* @LastEditors: DY
* @LastEditTime: 2022-03-03 15:26:44
* @Description: MTTR
-->
<template>
<div class="app-container">
<el-form
:model="formData"
:inline="true"
size="medium"
label-width="80px"
>
<el-form-item>
<el-button @click="toE10()">E10</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toOEE()">OEE</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="toMTTR()">MTTR</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toMCBF()">MCBF</el-button>
</el-form-item>
<!-- <el-form-item :label="$t('module.equipmentManager.recipe.equipmentId')" prop="equipmentName">
<el-select v-model="formData.equipmentName" :placeholder="$t('module.equipmentManager.recipe.EQselect')" filterable clearable>
<el-option
v-for="(item, index) in eqList"
:key="index"
:label="item.name"
:value="item.name"
/>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('module.equipmentManager.equipmentVisualization.timeSlot')" label-width="100px" prop="time">
<el-date-picker
v-model="formData.timeSlot"
type="datetimerange"
:start-placeholder="$t('module.orderManage.order.StartTime')"
:end-placeholder="$t('module.orderManage.order.StartTime')"
:range-separator="$t('module.orderManage.order.To')"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.search' | i18nFilter }} </el-button>
</el-form-item>
<!-- <el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.exportBtn' | i18nFilter }} </el-button>
</el-form-item> -->
</el-form>
<mttrChart v-if="mttrVisible" ref="mttrChart" :time1="startTime" :time2="endTime" @equipmentName="seeDetail" />
<mttr-detail-chart v-if="mttrDetail" ref="mttrDetailChart" :time1="startTime" :time2="endTime" :equipment-name="equipmentName" />
</div>
</template>
<script>
import mttrChart from './components/mttr-chart'
import mttrDetailChart from './components/mttrDetail-chart'
// import { equipmentList } from '@/api/basicData/Equipment/equipmentInfo'
export default {
name: 'MTTR',
components: { mttrChart, mttrDetailChart },
data() {
return {
list: [],
startTime: '',
endTime: '',
formData: {
timeSlot: [],
current: 1,
size: 10
},
mttrVisible: false,
mttrDetail: false,
equipmentName: '',
eqList: []
}
},
created() {
// this.getEqList()
this.getList()
},
methods: {
async getEqList() {
const res = await equipmentList({
current: 1,
size: 999
})
if (res.code === 0) {
this.eqList = res.data
}
},
toE10() {
this.$router.push({
name: 'E10'
})
},
toOEE() {
this.$router.push({
name: 'OEE'
})
},
toMTTR() {
this.$router.push({
name: 'MTTR'
})
},
toMCBF() {
this.$router.push({
name: 'MCBF'
})
},
seeDetail(name) {
this.equipmentName = name
this.mttrVisible = false
this.mttrDetail = true
setTimeout(() => {
this.$refs.mttrDetailChart.getList()
}, 60)
},
getList() {
if (this.formData.timeSlot.length !== 0) {
this.startTime = this.formData.timeSlot[0]
this.endTime = this.formData.timeSlot[1]
this.$nextTick(() => {
this.mttrVisible = true
setTimeout(() => {
this.$refs.mttrChart.getList()
}, 60)
})
}
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,151 @@
<!--
* @Author: DY
* @Date: 2021-12-16 15:41:11
* @LastEditors: DY
* @LastEditTime: 2022-03-03 15:26:56
* @Description: OEE
-->
<template>
<div class="app-container">
<el-form
:model="formData"
:inline="true"
size="medium"
label-width="80px"
>
<el-form-item>
<el-button @click="toE10()">E10</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="toOEE()">OEE</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toMTTR()">MTTR</el-button>
</el-form-item>
<el-form-item>
<el-button @click="toMCBF()">MCBF</el-button>
</el-form-item>
<!-- <el-form-item :label="$t('module.equipmentManager.recipe.equipmentId')" prop="equipmentName">
<el-select v-model="formData.equipmentName" :placeholder="$t('module.equipmentManager.recipe.EQselect')" filterable clearable>
<el-option
v-for="(item, index) in eqList"
:key="index"
:label="item.name"
:value="item.name"
/>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('module.equipmentManager.equipmentVisualization.timeSlot')" label-width="100px" prop="time">
<el-date-picker
v-model="formData.timeSlot"
type="datetimerange"
:start-placeholder="$t('module.orderManage.order.StartTime')"
:end-placeholder="$t('module.orderManage.order.StartTime')"
:range-separator="$t('module.orderManage.order.To')"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.search' | i18nFilter }} </el-button>
</el-form-item>
<!-- <el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.exportBtn' | i18nFilter }} </el-button>
</el-form-item> -->
</el-form>
<oeeChart v-if="oeeVisible" ref="oeeChart" :time1="startTime" :time2="endTime" @equipmentName="seeDetail" />
<oee-detail-chart v-if="oeeDetail" ref="oeeDetailChart" :time1="startTime" :time2="endTime" :equipment-name="equipmentName" />
</div>
</template>
<script>
import oeeChart from './components/oee-chart'
import oeeDetailChart from './components/oeeDetail-chart'
// import { equipmentList } from '@/api/basicData/Equipment/equipmentInfo'
export default {
name: 'OEE',
components: { oeeChart, oeeDetailChart },
data() {
return {
list: [],
startTime: '',
endTime: '',
formData: {
timeSlot: [],
current: 1,
size: 10
},
oeeVisible: false,
oeeDetail: false,
equipmentName: '',
eqList: []
}
},
created() {
// this.getEqList()
this.getList()
},
methods: {
async getEqList() {
const res = await equipmentList({
current: 1,
size: 999
})
if (res.code === 0) {
this.eqList = res.data
}
},
toE10() {
this.$router.push({
name: 'E10'
})
},
toOEE() {
this.$router.push({
name: 'OEE'
})
},
toMTTR() {
this.$router.push({
name: 'MTTR'
})
},
toMCBF() {
this.$router.push({
name: 'MCBF'
})
},
seeDetail(name) {
this.equipmentName = name
this.oeeVisible = false
this.oeeDetail = true
setTimeout(() => {
this.$refs.oeeDetailChart.getList()
}, 60)
},
getList() {
if (this.formData.timeSlot.length !== 0) {
this.startTime = this.formData.timeSlot[0]
this.endTime = this.formData.timeSlot[1]
this.$nextTick(() => {
this.oeeVisible = true
setTimeout(() => {
this.$refs.oeeChart.getList()
}, 60)
})
}
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,134 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:22:24
* @Description: E10详情表格
-->
<template>
<div>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
/>
<pagination :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" @pagination="init" />
</div>
</template>
<script>
import i18n from '@/lang'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { timeFormatter } from '@/filters'
// import { getE10StackDetail } from '@/api/equipment/infoPandect'
/**
* 表格表头配置项 TypeScript接口注释
* tableConfig<ConfigItem> = []
*
* Interface ConfigItem = {
* prop: string,
* label: string,
* width: string,
* align: string,
* subcomponent: function,
* filter: function
* }
*
*
*/
const tableProps = [
{
prop: 'equipmentName',
label: i18n.t('module.equipmentManager.maintainplan.equipmentId'),
align: 'center'
}, {
prop: 'status',
label: i18n.t('module.equipmentManager.monitoringInfo.E10status'),
align: 'center'
}, {
prop: 'previousStatus',
label: i18n.t('module.equipmentManager.monitoringInfo.laterE10Status'),
align: 'center'
}, {
prop: 'endTime',
label: i18n.t('module.equipmentManager.monitoringInfo.E10endTime'),
filter: timeFormatter,
align: 'center'
}, {
prop: 'durationTime',
label: i18n.t('module.equipmentManager.monitoringInfo.duration'),
align: 'center'
}
]
export default {
name: '',
components: { BaseTable, Pagination },
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
},
equipmentName: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
total: 0,
tableProps,
list: [],
listLoading: false,
listQuery: {
current: 1,
size: 10
}
}
},
mounted() {
// this.init()
},
methods: {
init() {
this.listQuery.startTime = this.time1
this.listQuery.endTime = this.time2
this.listQuery.equipmentName = this.equipmentName
getE10StackDetail(this.listQuery).then(res => {
if (res.data !== []) {
this.list = res.data.detail.records
this.total = res.data.detail.total
this.list.forEach(item => {
item.equipmentName = this.equipmentName
})
}
})
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,94 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:47:23
* @Description: MCBF详情表格
-->
<template>
<div>
<base-table
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
/>
</div>
</template>
<script>
import i18n from '@/lang'
import BaseTable from '@/components/BaseTable'
/**
* 表格表头配置项 TypeScript接口注释
* tableConfig<ConfigItem> = []
*
* Interface ConfigItem = {
* prop: string,
* label: string,
* width: string,
* align: string,
* subcomponent: function,
* filter: function
* }
*
*
*/
const tableProps = [
{
prop: 'tmc',
label: i18n.t('module.equipmentManager.monitoringInfo.allCycles'),
align: 'center'
}, {
prop: 'emc',
label: i18n.t('module.equipmentManager.monitoringInfo.badTimes'),
align: 'center'
}, {
prop: 'time',
label: i18n.t('module.equipmentManager.monitoringInfo.time'),
align: 'center'
}, {
prop: 'mtbf',
label: i18n.t('module.equipmentManager.monitoringInfo.MCBF'),
align: 'center'
}
]
export default {
name: '',
components: { BaseTable },
props: {
tableData: {
type: Array,
default: () => { [] }
}
},
data() {
return {
total: 0,
tableProps,
list: [],
listLoading: false
}
},
mounted() {
// this.init()
},
methods: {
init() {
this.list = this.tableData
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,132 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:46:06
* @Description: Mttr详情表格
-->
<template>
<div>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
/>
<pagination :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" @pagination="init" />
</div>
</template>
<script>
import i18n from '@/lang'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { timeFormatter } from '@/filters'
// import { getMttrDetail } from '@/api/equipment/infoPandect'
/**
* 表格表头配置项 TypeScript接口注释
* tableConfig<ConfigItem> = []
*
* Interface ConfigItem = {
* prop: string,
* label: string,
* width: string,
* align: string,
* subcomponent: function,
* filter: function
* }
*
*
*/
const tableProps = [
{
prop: 'previousStatus',
label: i18n.t('module.equipmentManager.monitoringInfo.previousStatus'),
align: 'center'
}, {
prop: 'status',
label: i18n.t('module.art.status'),
align: 'center'
}, {
prop: 'startTime',
label: i18n.t('module.equipmentManager.equipmentParams.startTime'),
filter: timeFormatter,
align: 'center'
}, {
prop: 'endTime',
label: i18n.t('module.equipmentManager.equipmentParams.endTime'),
filter: timeFormatter,
align: 'center'
}, {
prop: 'durationTime',
label: i18n.t('module.equipmentManager.monitoringInfo.duration'),
align: 'center'
}
]
export default {
name: '',
components: { BaseTable, Pagination },
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
},
equipmentName: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
total: 0,
tableProps,
list: [],
listLoading: false,
listQuery: {
current: 1,
size: 10
}
}
},
mounted() {
// this.init()
},
methods: {
init() {
this.listQuery.startTime = this.time1
this.listQuery.endTime = this.time2
this.listQuery.equipmentName = this.equipmentName
getMttrDetail(this.listQuery).then(res => {
if (res.data !== []) {
this.list = res.data.detail.records
this.total = res.data.detail.total
}
})
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,100 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:38:52
* @Description: OEE详情表格
-->
<template>
<div>
<base-table
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
/>
</div>
</template>
<script>
import i18n from '@/lang'
import BaseTable from '@/components/BaseTable'
const tableProps = [
{
prop: 'equipmentName',
label: i18n.t('module.equipmentManager.maintainplan.equipmentId'),
align: 'center'
}, {
prop: 'runTime',
label: i18n.t('module.equipmentManager.monitoringInfo.runTime'),
align: 'center'
}, {
prop: 'productiveTime',
label: i18n.t('module.equipmentManager.monitoringInfo.produceTime'),
align: 'center'
}, {
prop: 'productiveCount',
label: i18n.t('module.equipmentManager.monitoringInfo.productiveCount'),
align: 'center'
}, {
prop: 'timeRate',
label: i18n.t('module.equipmentManager.monitoringInfo.timeRate'),
align: 'center'
}, {
prop: 'performanceRate',
label: i18n.t('module.equipmentManager.monitoringInfo.performanceRate'),
align: 'center'
}, {
prop: 'oee',
label: i18n.t('module.equipmentManager.monitoringInfo.oee'),
align: 'center'
}
]
export default {
name: '',
components: { BaseTable },
props: {
tableData: {
type: Array,
default: () => { [] }
},
equipmentName: {
type: String,
default: () => { '' }
}
},
data() {
return {
total: 0,
tableProps,
list: [],
listLoading: false
}
},
mounted() {
// this.init()
},
methods: {
init() {
this.list = this.tableData
if (this.list !== []) {
this.list.forEach(item => {
item.equipmentName = this.equipmentName
})
}
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,212 @@
<!--
* @Author: DY
* @Date: 2021-12-13 16:39:34
* @LastEditors: DY
* @LastEditTime: 2022-03-03 15:43:32
* @Description: E10折线柱状图
-->
<template>
<div>
<div id="monitorChart" :style="{width: '1000px', height: '800px'}" style="margin-left:10%" />
</div>
</template>
<script>
import echarts from 'echarts'
// import { getE10Stack } from '@/api/equipment/infoPandect'
export default {
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
},
name: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
chart: null,
list: [],
xDataList: [],
engineeringList: [],
nonscheduledDownList: [],
productiveList: [],
rampUpDownList: [],
scheduledDownList: [],
standByList: [],
unscheduledDownList: []
}
},
mounted() {},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
removeData() {
this.xDataList = ['ACOT1', 'ACOT2']
this.engineeringList = [20, 30]
this.nonscheduledDownList = [20, 20]
this.productiveList = [10, 2]
this.rampUpDownList = [30, 3]
this.scheduledDownList = [8, 15]
this.standByList = [2, 12]
this.unscheduledDownList = [10, 18]
},
getList() {
this.removeData()
this.init()
},
init() {
this.chart = echarts.init(document.getElementById('monitorChart'))
const that = this
that.chart.on('click', function(params) {
that.$emit('equipmentName', params.name)
})
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
saveAsImage: { show: true }
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
axisLabel: {
interval: 0,
rotate: -30
},
max: 10,
data: this.xDataList
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLabel: {
formatter: '{value}%'
}
},
series: [
{
name: 'engineering',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
barWidth: 40,
data: this.engineeringList
},
{
name: 'nonscheduledDown',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.nonscheduledDownList
},
{
name: 'productive',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.productiveList
},
{
name: 'rampUpDown',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.rampUpDownList
},
{
name: 'scheduledDown',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.scheduledDownList
},
{
name: 'standBy',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.standByList
},
{
name: 'unscheduledDown',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.unscheduledDownList
}
]
})
}
}
}
</script>

View File

@@ -0,0 +1,253 @@
<!--
* @Author: DY
* @Date: 2021-12-13 16:39:34
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:26:34
* @Description: E10详情堆积图
-->
<template>
<div>
<div>
<el-button-group>
<el-button @click="byYear"></el-button>
<el-button @click="byQuarterly">季度</el-button>
<el-button @click="byMonth"></el-button>
<el-button @click="byWeek"></el-button>
<el-button @click="byDay"></el-button>
</el-button-group>
</div>
<div id="monitorChart" :style="{width: '700px', height: '550px'}" style="margin-left:10%" />
<e10-table v-if="tableVisible" :time1="startTime" :time2="endTime" :equipment-name="name" />
</div>
</template>
<script>
import echarts from 'echarts'
// import { getE10StackDetail } from '@/api/equipment/infoPandect'
import E10Table from './E10Table'
export default {
components: { E10Table },
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
},
equipmentName: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
chart: null,
tableVisible: false,
equipmentDetail: [],
list: [],
xDataList: [],
engineeringList: [],
nonscheduledDownList: [],
productiveList: [],
rampUpDownList: [],
scheduledDownList: [],
standByList: [],
unscheduledDownList: [],
startTime: '',
endTime: '',
name: ''
}
},
mounted() {
this.startTime = this.time1
this.endTime = this.time2
this.name = this.equipmentName
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
getDataList(params) {
console.log(params)
},
byYear() {
this.removeData()
this.setChart(this.list.)
},
byQuarterly() {
this.removeData()
this.setChart(this.list.季度)
},
byMonth() {
this.removeData()
this.setChart(this.list.)
},
byWeek() {
this.removeData()
this.setChart(this.list.)
},
byDay() {
this.removeData()
this.setChart(this.list.)
},
setChart(list) {
this.init()
},
removeData() {
// this.xDataList = [this.name]
this.engineeringList = [20]
this.nonscheduledDownList = [20]
this.productiveList = [10]
this.rampUpDownList = [30]
this.scheduledDownList = [8]
this.standByList = [2]
this.unscheduledDownList = [10]
},
getList() {
this.xDataList = [this.name]
this.tableVisible = true
},
init() {
this.chart = echarts.init(document.getElementById('monitorChart'))
this.chart.on('click', function(params) {
console.log('113d', params.name)
})
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
saveAsImage: { show: true }
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
max: 10,
axisLabel: {
interval: 0,
rotate: -30
},
data: this.xDataList
},
yAxis: {
type: 'value'
},
series: [
{
name: 'engineering',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.engineeringList
},
{
name: 'nonscheduledDown',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.nonscheduledDownList
},
{
name: 'productive',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.productiveList
},
{
name: 'rampUpDown',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.rampUpDownList
},
{
name: 'scheduledDown',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.scheduledDownList
},
{
name: 'standBy',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.standByList
},
{
name: 'unscheduledDown',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.unscheduledDownList
}
]
})
}
}
}
</script>

View File

@@ -0,0 +1,137 @@
<!--
* @Author: DY
* @Date: 2021-12-13 16:39:34
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:48:01
* @Description: Mcbf折线柱状图
-->
<template>
<div>
<div id="monitorChart" :style="{width: '1000px', height: '800px'}" style="margin-left:10%" />
</div>
</template>
<script>
import echarts from 'echarts'
// import { getAllMtbf } from '@/api/equipment/infoPandect'
export default {
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
}
},
data() {
return {
chart: null,
list: [],
xDataList: [],
yDataList: []
}
},
mounted() {},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
removeData() {
this.xDataList = ['ACOT1', 'ACOT2', 'ACOT-a', 'ACOT-b']
this.yDataList = [22, 40, 66, 44]
},
getList() {
this.removeData()
this.init()
},
init() {
this.chart = echarts.init(document.getElementById('monitorChart'))
const that = this
that.chart.on('click', function(params) {
that.$emit('equipmentName', params.name)
})
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
saveAsImage: { show: true }
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
axisLabel: {
interval: 0,
rotate: -30
},
max: 10,
data: this.xDataList
},
yAxis: [{
type: 'value',
min: 0,
max: 100,
axisLabel: {
formatter: '{value}次'
}
},
{
type: 'value',
min: 0,
max: 100,
axisLabel: {
formatter: '{value}次'
}
}
],
series: [
{
name: '稼动率值',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
barWidth: 40,
data: this.yDataList
},
{
name: '稼动率值',
type: 'line',
yAxisIndex: 1,
data: this.yDataList
}
]
})
}
}
}
</script>

View File

@@ -0,0 +1,185 @@
<!--
* @Author: DY
* @Date: 2021-12-13 16:39:34
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:48:53
* @Description: MCBF详情堆积图
-->
<template>
<div>
<div>
<el-button-group>
<el-button @click="byYear"></el-button>
<el-button @click="byQuarterly">季度</el-button>
<el-button @click="byMonth"></el-button>
<el-button @click="byWeek"></el-button>
<el-button @click="byDay"></el-button>
</el-button-group>
</div>
<div id="monitorChart" :style="{width: '700px', height: '550px'}" style="margin-left:10%" />
<mcbf-table v-if="tableVisible" ref="tableRef" :table-data="tableData" />
</div>
</template>
<script>
import echarts from 'echarts'
// import { getMcbfDetail } from '@/api/equipment/infoPandect'
import McbfTable from './McbfTable'
export default {
components: { McbfTable },
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
},
equipmentName: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
chart: null,
tableVisible: false,
tableData: [],
equipmentDetail: [],
list: [],
xDataList: [],
yDataList: [],
startTime: '',
endTime: '',
name: ''
}
},
mounted() {
this.startTime = this.time1
this.endTime = this.time2
this.name = this.equipmentName
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
getDataList(params) {
console.log(params)
},
byYear() {
this.removeData()
this.setChart(this.list.)
this.tableData = this.list.
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
byQuarterly() {
this.removeData()
this.setChart(this.list.季度)
this.tableData = this.list.季度
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
byMonth() {
this.removeData()
this.setChart(this.list.)
this.tableData = this.list.
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
byWeek() {
this.removeData()
this.setChart(this.list.)
this.tableData = this.list.
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
byDay() {
this.removeData()
this.setChart(this.list.)
this.tableData = this.list.
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
setChart(list) {
this.init()
},
removeData() {
this.xDataList = [this.name]
this.yDataList = [11, 33, 20, 53, 24]
},
getList() {
this.tableVisible = true
},
init() {
this.chart = echarts.init(document.getElementById('monitorChart'))
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
saveAsImage: { show: true }
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
max: 10,
axisLabel: {
interval: 0,
rotate: -30
},
data: this.xDataList
},
yAxis: {
type: 'value'
},
series: [
{
name: '稼动率值',
type: 'line',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.yDataList
}
]
})
}
}
}
</script>

View File

@@ -0,0 +1,133 @@
<!--
* @Author: DY
* @Date: 2021-12-13 16:39:34
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:41:38
* @Description: MTTR折线柱状图
-->
<template>
<div>
<div id="monitorChart" :style="{width: '1000px', height: '800px'}" style="margin-left:10%" />
</div>
</template>
<script>
import echarts from 'echarts'
// import { getMttr } from '@/api/equipment/infoPandect'
export default {
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
}
},
data() {
return {
chart: null,
list: [],
xDataList: [],
yDataList: []
}
},
mounted() {},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
removeData() {
this.xDataList = ['ACOT1', 'ACOT2', 'ACOT-a', 'ACOT-b']
this.yDataList = [22, 40, 66, 44]
},
getList() {
this.removeData()
this.init()
},
init() {
this.chart = echarts.init(document.getElementById('monitorChart'))
const that = this
that.chart.on('click', function(params) {
that.$emit('equipmentName', params.name)
})
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
saveAsImage: { show: true }
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
axisLabel: {
interval: 0,
rotate: -30
},
max: 10,
data: this.xDataList
},
yAxis: [{
type: 'value',
axisLabel: {
formatter: '{value}小时'
}
},
{
type: 'value',
axisLabel: {
formatter: '{value}小时'
}
}
],
series: [
{
name: '稼动率值',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
barWidth: 40,
data: this.yDataList
},
{
name: '稼动率值',
type: 'line',
yAxisIndex: 1,
data: this.yDataList
}
]
})
}
}
}
</script>

View File

@@ -0,0 +1,165 @@
<!--
* @Author: DY
* @Date: 2021-12-13 16:39:34
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:43:34
* @Description: MTTR详情堆积图
-->
<template>
<div>
<div>
<el-button-group>
<el-button @click="byYear"></el-button>
<el-button @click="byQuarterly">季度</el-button>
<el-button @click="byMonth"></el-button>
<el-button @click="byWeek"></el-button>
<el-button @click="byDay"></el-button>
</el-button-group>
</div>
<div id="monitorChart" :style="{width: '700px', height: '550px'}" style="margin-left:10%" />
<mttr-table v-if="tableVisible" :time1="startTime" :time2="endTime" :equipment-name="name" />
</div>
</template>
<script>
import echarts from 'echarts'
// import { getMttrDetail } from '@/api/equipment/infoPandect'
import MttrTable from './MttrTable'
export default {
components: { MttrTable },
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
},
equipmentName: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
chart: null,
tableVisible: false,
equipmentDetail: [],
list: [],
xDataList: [],
yDataList: [],
startTime: '',
endTime: '',
name: ''
}
},
mounted() {
this.startTime = this.time1
this.endTime = this.time2
this.name = this.equipmentName
this.removeData()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
getDataList(params) {
console.log(params)
},
byYear() {
this.removeData()
this.setChart(this.list.)
},
byQuarterly() {
this.removeData()
this.setChart(this.list.季度)
},
byMonth() {
this.removeData()
this.setChart(this.list.)
},
byWeek() {
this.removeData()
this.setChart(this.list.)
},
byDay() {
this.removeData()
this.setChart(this.list.)
},
setChart(list) {
this.init()
},
removeData() {
this.xDataList = [this.name]
this.yDataList = [30, 40, 30, 33, 44]
},
getList() {
this.tableVisible = true
},
init() {
this.chart = echarts.init(document.getElementById('monitorChart'))
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
saveAsImage: { show: true }
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
max: 10,
axisLabel: {
interval: 0,
rotate: -30
},
data: this.xDataList
},
yAxis: {
type: 'value'
},
series: [
{
name: '稼动率值',
type: 'line',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.yDataList
}
]
})
}
}
}
</script>

View File

@@ -0,0 +1,137 @@
<!--
* @Author: DY
* @Date: 2021-12-13 16:39:34
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:34:30
* @Description: OEE折线柱状图
-->
<template>
<div>
<div id="monitorChart" :style="{width: '1000px', height: '800px'}" style="margin-left:10%" />
</div>
</template>
<script>
import echarts from 'echarts'
// import { getOEE } from '@/api/equipment/infoPandect'
export default {
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
}
},
data() {
return {
chart: null,
list: [],
xDataList: [],
oeeList: []
}
},
mounted() {},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
removeData() {
this.xDataList = ['ACOT1', 'ACOT2', 'ACOT-a', 'ACOT-b']
this.oeeList = [20, 30, 80, 44]
},
getList() {
this.removeData()
this.init()
},
init() {
this.chart = echarts.init(document.getElementById('monitorChart'))
const that = this
that.chart.on('click', function(params) {
that.$emit('equipmentName', params.name)
})
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
saveAsImage: { show: true }
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
axisLabel: {
interval: 0,
rotate: -30
},
max: 10,
data: this.xDataList
},
yAxis: [{
type: 'value',
min: 0,
max: 100,
axisLabel: {
formatter: '{value}%'
}
},
{
type: 'value',
min: 0,
max: 100,
axisLabel: {
formatter: '{value}%'
}
}
],
series: [
{
name: 'oee',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
barWidth: 40,
data: this.oeeList
},
{
name: 'oee',
type: 'line',
yAxisIndex: 1,
data: this.oeeList
}
]
})
}
}
}
</script>

View File

@@ -0,0 +1,258 @@
<!--
* @Author: DY
* @Date: 2021-12-13 16:39:34
* @LastEditors: DY
* @LastEditTime: 2022-03-03 16:37:49
* @Description:OEE详情堆积图
-->
<template>
<div>
<div>
<el-button-group>
<el-button @click="byYear"></el-button>
<el-button @click="byQuarterly">季度</el-button>
<el-button @click="byMonth"></el-button>
<el-button @click="byWeek"></el-button>
<el-button @click="byDay"></el-button>
</el-button-group>
</div>
<div id="monitorChart" :style="{width: '700px', height: '550px'}" style="margin-left:10%" />
<oee-table v-if="tableVisible" ref="tableRef" :table-data="tableData" :equipment-name="name" />
</div>
</template>
<script>
import echarts from 'echarts'
// import { getOEEDetail } from '@/api/equipment/infoPandect'
import OeeTable from './OeeTable'
export default {
components: { OeeTable },
props: {
time1: {
type: Date,
default: () => {
return ''
}
},
time2: {
type: Date,
default: () => {
return ''
}
},
equipmentName: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
chart: null,
tableVisible: false,
equipmentDetail: [],
tableData: [],
list: [],
xDataList: [],
oeeList: [],
startTime: '',
endTime: '',
name: ''
}
},
mounted() {
this.startTime = this.time1
this.endTime = this.time2
this.name = this.equipmentName
this.removeData()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
getDataList(params) {
console.log(params)
},
async byYear() {
this.removeData()
this.setChart(this.list.)
this.tableData = this.list.
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
byQuarterly() {
this.removeData()
this.setChart(this.list.季度)
this.tableData = this.list.季度
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
byMonth() {
this.removeData()
this.setChart(this.list.)
this.tableData = this.list.
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
byWeek() {
this.removeData()
this.setChart(this.list.)
this.tableData = this.list.
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
byDay() {
this.removeData()
this.setChart(this.list.)
this.tableData = this.list.
setTimeout(() => {
this.$refs.tableRef.init()
}, 60)
},
setChart(list) {
this.init()
},
removeData() {
this.xDataList = [this.name]
this.oeeList = [30, 40, 30, 33, 44]
},
getList() {
this.tableVisible = true
},
init() {
this.chart = echarts.init(document.getElementById('monitorChart'))
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
saveAsImage: { show: true }
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
max: 10,
axisLabel: {
interval: 0,
rotate: -30
},
data: this.xDataList
},
yAxis: {
type: 'value'
},
series: [
{
name: 'oee',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.oeeList
},
{
name: 'performanceRate',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.performanceRateList
},
{
name: 'productiveCount',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.productiveCountList
},
{
name: 'productiveTime',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.productiveTimeList
},
{
name: 'runTime',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.runTimeList
},
{
name: 'time',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.timeList
},
{
name: 'timeRate',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.timeRateList
}
]
})
}
}
}
</script>

View File

@@ -0,0 +1,178 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: zwq
* @LastEditTime: 2022-03-03 14:28:58
* @Description:
-->
<template>
<div class="app-container">
<head-form
:placeholder-name="placeholderName"
:key-name="keyName"
:show-add="showAdd"
@getDataList="getList"
@add="addNew"
/>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
>
<method-btn
slot="handleBtn"
:width="trueWidth"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
</div>
</template>
<script>
import i18n from '@/lang'
import { StateConfigList, StateConfigDelete } from '@/api/basicData/StateConfig'
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { timeFormatter } from '@/filters'
import basicData from '@/filters/basicData'
/**
* 表格表头配置项 TypeScript接口注释
* tableConfig<ConfigItem> = []
*
* Interface ConfigItem = {
* prop: string,
* label: string,
* width: string,
* align: string,
* subcomponent: function,
* filter: function
* }
*
*
*/
const tableBtn = [
{
type: 'edit',
btnName: 'btn.edit'
}
// {
// type: 'delete',
// btnName: 'btn.delete'
// }
]
const tableProps = [
{
prop: 'createTime',
label: i18n.t('module.basicData.factory.createTime'),
filter: timeFormatter,
align: 'center'
},
{
prop: 'status',
label: i18n.t('module.basicData.StateConfig.status'),
align: 'center'
},
{
prop: 'twinkle',
label: i18n.t('module.basicData.StateConfig.Twinkle'),
filter: basicData('onDuty'),
align: 'center'
},
{
prop: 'colour',
label: i18n.t('module.basicData.StateConfig.DisplayColor'),
align: 'center'
},
{
prop: 'description',
label: i18n.t('module.basicData.visual.Remarks'),
align: 'center'
}
]
export default {
name: 'QCPplan',
components: { Pagination, BaseTable, MethodBtn, HeadForm },
data() {
return {
keyName: i18n.t('module.basicData.visual.keyword'),
placeholderName: this.$t('module.basicData.StateConfig.status'),
addOrUpdateVisible: false,
tableBtn,
trueWidth: 150,
tableProps,
list: [],
total: 0,
showAdd: false,
listLoading: true,
listQuery: {
current: 1,
size: 10
}
}
},
created() {
this.getList()
},
methods: {
handleClick(raw) {
console.log(raw)
if (raw.type === 'delete') {
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.status}]?`, this.$t('module.basicData.visual.Tips'), {
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
type: 'warning'
}).then(() => {
StateConfigDelete(raw.data.id).then(response => {
this.$message({
message: this.$t('module.basicData.visual.success'),
type: 'success',
duration: 1500,
onClose: () => {
this.getList()
}
})
})
}).catch(() => {})
}
},
getList(key) {
this.listLoading = true
this.listQuery.status = key
StateConfigList(this.listQuery).then(response => {
if (response.data.records) {
this.list = response.data.records
} else {
this.list.splice(0, this.list.length)
}
this.total = response.data.total
this.listLoading = false
})
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -13,11 +13,11 @@
{{ i.equipmentId ? equipmentObj[i.equipmentId] : $t('module.art.eqName') }}
</el-button>
</el-col>
<el-col :span="4" class="process-table-main-item-item">
<!-- <el-col :span="4" class="process-table-main-item-item">
<el-button v-if="!processPortObj[item.workSequenceId]" disabled>
{{ i.equipmentRecipeId ? equipmentRecipeObj[i.equipmentRecipeId] : $t('module.art.recipeName') }}
</el-button>
</el-col>
</el-col> -->
<!-- <el-col :span="4" class="process-table-main-item-item">
<el-button v-if="!processPortObj[item.workSequenceId]" disabled>
{{ i.nodeType ? nodeTypesObj[i.nodeType] : $t('module.art.artType') }}
@@ -36,7 +36,7 @@
</template>
<script>
import {
listAllEquipmentRecipe,
// listAllEquipmentRecipe,
listProcessFlowNode,
listProcess
} from '@/api/art-manage/art.js'
@@ -57,7 +57,7 @@ export default {
processObj: {},
processPortObj: {},
equipmentRecipeList: [],
equipmentRecipeObj: [],
// equipmentRecipeObj: [],
equipmentList: [],
equipmentObj: {},
showAddList: [],
@@ -102,12 +102,12 @@ export default {
console.log(this.processList)
console.log(this.processObj)
// 获取配方列表
const allRecipeRes = await listAllEquipmentRecipe()
this.equipmentRecipeList = allRecipeRes.data
allRecipeRes.data.map(item => {
this.equipmentRecipeObj[item.id] = item.name
})
console.log(this.equipmentRecipeList)
// const allRecipeRes = await listAllEquipmentRecipe()
// this.equipmentRecipeList = allRecipeRes.data
// allRecipeRes.data.map(item => {
// this.equipmentRecipeObj[item.id] = item.name
// })
// console.log(this.equipmentRecipeList)
// 获取设备列表
const allEquipmentRes = await listEquipment()
this.equipmentList = allEquipmentRes.data

View File

@@ -19,11 +19,11 @@
{{ i.equipmentId ? equipmentObj[i.equipmentId] : $t('module.art.eqName') }}
</el-button>
</el-col>
<el-col :span="4" class="process-table-main-item-item">
<!-- <el-col :span="4" class="process-table-main-item-item">
<el-button v-if="!processPortObj[item.workSequenceId]" icon="el-icon-edit" @click="choiceRecipe(index, idx, i.equipmentRecipeId)">
{{ i.equipmentRecipeId ? equipmentRecipeObj[i.equipmentRecipeId] : $t('module.art.recipeName') }}
</el-button>
</el-col>
</el-col> -->
<!-- <el-col :span="4" class="process-table-main-item-item">
<el-button v-if="!processPortObj[item.workSequenceId]" icon="el-icon-edit" @click="choiceArtType(index, idx, i.nodeType)">
{{ i.nodeType ? nodeTypesObj[i.nodeType] : $t('module.art.artType') }}
@@ -55,7 +55,7 @@ import processTableSelect from './process-table-select.vue'
import processTableAdd from './process-table-add.vue'
import vuedraggable from 'vuedraggable'
import {
listAllEquipmentRecipe,
// listAllEquipmentRecipe,
addProcessFlows,
listProcessFlowNode,
listProcess
@@ -82,7 +82,7 @@ export default {
processObj: {},
processPortObj: {},
equipmentRecipeList: [],
equipmentRecipeObj: [],
// equipmentRecipeObj: [],
equipmentList: [],
equipmentObj: {},
showAddList: [],
@@ -131,12 +131,12 @@ export default {
console.log(this.processList)
console.log(this.processObj)
// 获取配方列表
const allRecipeRes = await listAllEquipmentRecipe()
this.equipmentRecipeList = allRecipeRes.data
allRecipeRes.data.map(item => {
this.equipmentRecipeObj[item.id] = item.name
})
console.log(this.equipmentRecipeList)
// const allRecipeRes = await listAllEquipmentRecipe()
// this.equipmentRecipeList = allRecipeRes.data
// allRecipeRes.data.map(item => {
// this.equipmentRecipeObj[item.id] = item.name
// })
// console.log(this.equipmentRecipeList)
// 获取设备列表
const allEquipmentRes = await listEquipment()
this.equipmentList = allEquipmentRes.data
@@ -197,8 +197,8 @@ export default {
nodeType: '',
processFlowId: this.processFlowId,
workSequenceId: this.dataList[index].workSequenceId,
description: this.dataList[index].processFlowEquipmentParams[0]?.description ? this.dataList[index].processFlowEquipmentParams[0].description : '',
remark: this.dataList[index].processFlowEquipmentParams[0]?.remark ? this.dataList[index].processFlowEquipmentParams[0].remark : ''
description: this.dataList[index].processFlowEquipmentParams[0].description ? this.dataList[index].processFlowEquipmentParams[0].description : '',
remark: this.dataList[index].processFlowEquipmentParams[0].remark ? this.dataList[index].processFlowEquipmentParams[0].remark : ''
})
e.stopPropagation()
},
@@ -232,16 +232,16 @@ export default {
this.$refs.processtableselect.init('equipmentId', first, sec, id, this.processObj[processId].equipments)
},
// 选择配方
choiceRecipe(first, sec, id) {
if (this.dataList[first].processFlowEquipmentParams[sec]?.equipmentId) {
this.$refs.processtableselect.init('equipmentRecipeId', first, sec, id, this.equipmentRecipeList.filter(f => f.equipmentId === this.dataList[first].processFlowEquipmentParams[sec].equipmentId))
} else {
this.$message.error(this.$t('module.art.choiceEqError'))
}
},
// choiceRecipe(first, sec, id) {
// if (this.dataList[first].processFlowEquipmentParams[sec]?.equipmentId) {
// this.$refs.processtableselect.init('equipmentRecipeId', first, sec, id, this.equipmentRecipeList.filter(f => f.equipmentId === this.dataList[first].processFlowEquipmentParams[sec].equipmentId))
// } else {
// this.$message.error(this.$t('module.art.choiceEqError'))
// }
// },
// 选择工艺类型
choiceArtType(first, sec, id) {
if (this.dataList[first].processFlowEquipmentParams[sec]?.equipmentId) {
if (this.dataList[first].processFlowEquipmentParams[sec].equipmentId) {
this.$refs.processtableselect.init('nodeType', first, sec, id, this.nodeTypes)
} else {
this.$message.error(this.$t('module.art.choiceEqError'))
@@ -307,13 +307,14 @@ export default {
hasNull = true
}
})
} else {
item.processFlowEquipmentParams.map(i => {
if (!i.equipmentId || !i.equipmentRecipeId) {
hasNull = true
}
})
}
// else {
// item.processFlowEquipmentParams.map(i => {
// if (!i.equipmentId || !i.equipmentRecipeId) {
// hasNull = true
// }
// })
// }
})
// console.log(JSON.stringify(vm.dataList))
// if (vm.dataList.length === 0) {