工艺&设备
This commit is contained in:
@@ -95,23 +95,23 @@ export const routes = [
|
||||
component: () =>
|
||||
import('../views/productionScheduling/workOrderManagement')
|
||||
},
|
||||
{
|
||||
path: 'workReportManagement',
|
||||
name: 'workReportManagement',
|
||||
meta: {
|
||||
title: '报工管理'
|
||||
},
|
||||
component: () =>
|
||||
import('../views/productionScheduling/workReportManagement')
|
||||
},
|
||||
{
|
||||
path: 'taskDcheduling',
|
||||
name: 'taskDcheduling',
|
||||
meta: {
|
||||
title: '任务调度'
|
||||
},
|
||||
component: () => import('../views/productionScheduling/taskDcheduling')
|
||||
},
|
||||
// {
|
||||
// path: 'workReportManagement',
|
||||
// name: 'workReportManagement',
|
||||
// meta: {
|
||||
// title: '报工管理'
|
||||
// },
|
||||
// component: () =>
|
||||
// import('../views/productionScheduling/workReportManagement')
|
||||
// },
|
||||
// {
|
||||
// path: 'taskDcheduling',
|
||||
// name: 'taskDcheduling',
|
||||
// meta: {
|
||||
// title: '任务调度'
|
||||
// },
|
||||
// component: () => import('../views/productionScheduling/taskDcheduling')
|
||||
// },
|
||||
{
|
||||
path: 'generateReports',
|
||||
name: 'generateReports',
|
||||
@@ -186,14 +186,14 @@ export const routes = [
|
||||
title: '设备管理'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'vehicleManagement',
|
||||
name: 'vehicleManagement',
|
||||
meta: {
|
||||
title: '载具管理'
|
||||
},
|
||||
component: () => import('../views/deviceManagement/vehicleManagement')
|
||||
},
|
||||
// {
|
||||
// path: 'vehicleManagement',
|
||||
// name: 'vehicleManagement',
|
||||
// meta: {
|
||||
// title: '载具管理'
|
||||
// },
|
||||
// component: () => import('../views/deviceManagement/vehicleManagement')
|
||||
// },
|
||||
{
|
||||
path: 'performanceAnalysis',
|
||||
name: 'performanceAnalysis',
|
||||
@@ -337,15 +337,15 @@ export const routes = [
|
||||
import('../views/deviceManagement/alarmInformation/historyAlarm')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'deviceRegistration',
|
||||
name: 'deviceRegistration',
|
||||
meta: {
|
||||
title: '设备登记'
|
||||
},
|
||||
component: () => import('../views/deviceManagement/deviceRegistration')
|
||||
}
|
||||
// {
|
||||
// path: 'deviceRegistration',
|
||||
// name: 'deviceRegistration',
|
||||
// meta: {
|
||||
// title: '设备登记'
|
||||
// },
|
||||
// component: () => import('../views/deviceManagement/deviceRegistration')
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -492,15 +492,15 @@ export const routes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'statisticalAnalysis',
|
||||
name: 'statisticalAnalysis',
|
||||
meta: {
|
||||
title: '统计分析'
|
||||
},
|
||||
component: () =>
|
||||
import('../views/qualityManagement/statisticalAnalysis')
|
||||
},
|
||||
// {
|
||||
// path: 'statisticalAnalysis',
|
||||
// name: 'statisticalAnalysis',
|
||||
// meta: {
|
||||
// title: '统计分析'
|
||||
// },
|
||||
// component: () =>
|
||||
// import('../views/qualityManagement/statisticalAnalysis')
|
||||
// },
|
||||
{
|
||||
path: 'productTraceability',
|
||||
name: 'productTraceability',
|
||||
|
||||
@@ -58,6 +58,7 @@ import {
|
||||
palletIndicatorGetType
|
||||
} from '@/api/deviceManagement'
|
||||
import { timeFormatter } from '@/utils'
|
||||
import moment from 'moment'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'proLineName',
|
||||
@@ -143,12 +144,15 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '产品上片时间',
|
||||
dateType: 'datetime',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
placeholder: '产品上片时间',
|
||||
param: 'testTime',
|
||||
width: 200
|
||||
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultSelect: [],
|
||||
width: 350
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -160,7 +164,9 @@ export default {
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 20,
|
||||
palletId: ''
|
||||
palletId: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
},
|
||||
total: 0,
|
||||
tableProps,
|
||||
@@ -181,53 +187,69 @@ export default {
|
||||
this.tableH = tableHeight(330)
|
||||
this.tableH2 = tableHeight(360) / 2
|
||||
})
|
||||
this.getList()
|
||||
this.formConfig[1].defaultSelect = [
|
||||
moment().format('yyyy-MM-DD') + 'T00:00:00',
|
||||
moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
]
|
||||
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
|
||||
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
palletIndicatorAnalysisPage({ ...this.listQuery }).then((res) => {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
this.setCurrent()
|
||||
let palletId = this.tableData[0].palletId
|
||||
this.getLevel(palletId)
|
||||
})
|
||||
},
|
||||
setCurrent() {
|
||||
let _this = this
|
||||
setTimeout(function () {
|
||||
_this.$refs.palletTable1.setCurrent('palletTable', 0)
|
||||
}, 500)
|
||||
if (this.listQuery.palletId) {
|
||||
palletIndicatorAnalysisPage({ ...this.listQuery }).then((res) => {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
})
|
||||
this.getLevel()
|
||||
} else {
|
||||
this.$message.error('请先输入托盘id后再查询')
|
||||
}
|
||||
},
|
||||
getLevel() {
|
||||
// 需要修改ID
|
||||
palletIndicatorGetType({ id: 1 }).then((res) => {
|
||||
palletIndicatorGetType({
|
||||
palletId: this.listQuery.palletId,
|
||||
startTime: this.listQuery.startTime,
|
||||
endTime: this.listQuery.endTime
|
||||
}).then((res) => {
|
||||
this.tableData2 = []
|
||||
if (res.code === 0) {
|
||||
const data = res.data
|
||||
this.chartMsg = data
|
||||
console.log(this.chartMsg)
|
||||
let obj = {}
|
||||
obj.productType = '良品'
|
||||
obj.num = data.okNum
|
||||
obj.percentage = data.okPercentage
|
||||
this.tableData2.push(obj)
|
||||
let obj2 = {}
|
||||
obj2.productType = '待再加工'
|
||||
obj2.num = data.reprocessNum
|
||||
obj2.percentage = data.rePercentage
|
||||
this.tableData2.push(obj2)
|
||||
let obj3 = {}
|
||||
obj3.productType = '废品'
|
||||
obj3.num = data.wasteNum
|
||||
obj3.percentage = data.noPercentage
|
||||
this.tableData2.push(obj3)
|
||||
let arr = [
|
||||
{ name: '良品', num: 'okNum', percentage: 'okPercentage' },
|
||||
{
|
||||
name: '待再加工',
|
||||
num: 'reprocessNum',
|
||||
percentage: 'rePercentage'
|
||||
},
|
||||
{ name: '废品', num: 'wasteNum', percentage: 'noPercentage' },
|
||||
{ name: '抽检', num: 'checkNum', percentage: 'checkPercentage' },
|
||||
{ name: '废弃', num: 'scrapNum', percentage: 'scrapPercentage' },
|
||||
{ name: '碎片', num: 'chipNum', percentage: 'checkPercentage' },
|
||||
{
|
||||
name: '次良品',
|
||||
num: 'inferiorNum',
|
||||
percentage: 'inferiorPercentage'
|
||||
}
|
||||
]
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let obj = {}
|
||||
obj.productType = arr[i].name
|
||||
obj.num = data[arr[i].num]
|
||||
obj.percentage = data[arr[i].percentage]
|
||||
this.tableData2.push(obj)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
if (val.btnName === 'search') {
|
||||
this.listQuery.palletId = val.palletId
|
||||
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : ''
|
||||
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : ''
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -98,7 +98,7 @@ import {
|
||||
} from '@/api/deviceManagement'
|
||||
import productPowerEdit from './../components/productPowerEdit.vue'
|
||||
import deviceOeeLine from './../components/deviceOeeLine.vue'
|
||||
import moment from 'moment'
|
||||
// import moment from 'moment'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'date',
|
||||
@@ -185,7 +185,6 @@ export default {
|
||||
placeholder: '月份选择',
|
||||
param: 'timePosition',
|
||||
defaultSelect: '',
|
||||
pickerOptions: {},
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
@@ -215,7 +214,6 @@ export default {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = tableHeight(214) / 2 - 75
|
||||
})
|
||||
this.getMonth()
|
||||
this.setDefaultVal()
|
||||
this.getTree()
|
||||
},
|
||||
@@ -242,27 +240,6 @@ export default {
|
||||
this.getPlan()
|
||||
})
|
||||
},
|
||||
getMonth() {
|
||||
let arr = [
|
||||
'2022-03',
|
||||
'2022-05',
|
||||
'2022-06',
|
||||
'2022-08',
|
||||
'2022-11',
|
||||
'2023-01',
|
||||
'2022-03'
|
||||
]
|
||||
this.formConfig[0].pickerOptions = {
|
||||
disabledDate(date) {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (moment(date).format('YYYY-MM') === arr[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
// 获取设备OEE
|
||||
performanceAnalysisGet({ ...this.listQuery }).then((res) => {
|
||||
|
||||
@@ -40,22 +40,31 @@
|
||||
:table-data="tableData"
|
||||
:max-height="tableH"
|
||||
/>
|
||||
<pagination
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
:total="total"
|
||||
@pagination="getReal"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<script>
|
||||
import { tableHeight, timeFormatter } from '@/utils/index'
|
||||
import { tableHeight, timeFormatter, publicFormatter } from '@/utils/index'
|
||||
import { getTreeData } from '@/api/app'
|
||||
import { getAlarmReal, getAlarmHis } from '@/api/processManagement'
|
||||
import moment from 'moment'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'paramName',
|
||||
label: '工艺参数'
|
||||
label: '工艺参数',
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'variableName',
|
||||
label: '变量名称'
|
||||
label: '变量名称',
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'eqName',
|
||||
@@ -81,7 +90,8 @@ const tableProps = [
|
||||
{
|
||||
prop: 'alarmType',
|
||||
label: '报警类型',
|
||||
width: 100
|
||||
width: 100,
|
||||
filter: publicFormatter('alarmTypeVoList')
|
||||
},
|
||||
{
|
||||
prop: 'alarmLimit',
|
||||
@@ -133,7 +143,7 @@ export default {
|
||||
total: 0,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 1000,
|
||||
size: 20,
|
||||
equipmentId: null,
|
||||
proLineId: null,
|
||||
unitId: null,
|
||||
@@ -146,8 +156,14 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = tableHeight(300)
|
||||
this.tableH = tableHeight(340)
|
||||
})
|
||||
this.formConfig[0].defaultSelect = [
|
||||
moment().format('yyyy-MM-DD') + 'T00:00:00',
|
||||
moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
]
|
||||
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
|
||||
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
this.getTree()
|
||||
this.getReal()
|
||||
},
|
||||
@@ -161,6 +177,7 @@ export default {
|
||||
getAlarmReal({ ...this.listQuery }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -168,6 +185,7 @@ export default {
|
||||
getAlarmHis({ ...this.listQuery }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -195,10 +213,11 @@ export default {
|
||||
console.log(val)
|
||||
if (val === '实时数据') {
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
this.getReal()
|
||||
} else if (val === '历史数据') {
|
||||
this.tableData = []
|
||||
console.log(this.listQuery)
|
||||
this.total = 0
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
|
||||
@@ -68,12 +68,14 @@ const tableProps = [
|
||||
{
|
||||
prop: 'variableName',
|
||||
label: '变量名称',
|
||||
minWidth: 150
|
||||
minWidth: 180,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'paramName',
|
||||
label: '工艺参数',
|
||||
minWidth: 150
|
||||
minWidth: 180,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'maxValue',
|
||||
@@ -194,6 +196,7 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
cascaderSelect(val) {
|
||||
let obj = { ...this.$refs.searchBarForm.formInline }
|
||||
switch (val.value.length) {
|
||||
case 1:
|
||||
this.listQuery.proLineId = val.value[0]
|
||||
@@ -202,7 +205,11 @@ export default {
|
||||
size: 1000,
|
||||
proLineId: this.listQuery.proLineId
|
||||
}).then((res) => {
|
||||
this.formConfig[1].defaultSelect = ''
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.formConfig[0].defaultSelect = obj.keyword
|
||||
this.formConfig[1].selectOptions = res.data
|
||||
this.formConfig[2].defaultSelect = obj.variableName
|
||||
})
|
||||
break
|
||||
case 2:
|
||||
@@ -214,7 +221,11 @@ export default {
|
||||
proLineId: this.listQuery.proLineId,
|
||||
unitId: this.listQuery.unitId
|
||||
}).then((res) => {
|
||||
this.formConfig[1].defaultSelect = ''
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.formConfig[0].defaultSelect = obj.keyword
|
||||
this.formConfig[1].selectOptions = res.data
|
||||
this.formConfig[2].defaultSelect = obj.variableName
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
@@ -228,12 +239,19 @@ export default {
|
||||
unitId: this.listQuery.unitId,
|
||||
equipmentId: this.listQuery.equipmentId
|
||||
}).then((res) => {
|
||||
this.formConfig[1].defaultSelect = ''
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.formConfig[0].defaultSelect = obj.keyword
|
||||
this.formConfig[1].selectOptions = res.data
|
||||
this.formConfig[2].defaultSelect = obj.variableName
|
||||
})
|
||||
break
|
||||
default:
|
||||
this.formConfig[0].defaultSelect = ''
|
||||
this.formConfig[1].defaultSelect = ''
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.formConfig[1].selectOptions = []
|
||||
this.formConfig[2].defaultSelect = obj.variableName
|
||||
}
|
||||
},
|
||||
getTree() {
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
:max-height="tableH"
|
||||
:row-class-name="tableRowClassName"
|
||||
/>
|
||||
<!-- <pagination
|
||||
<pagination
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
:total="total"
|
||||
@pagination="getRealList"
|
||||
/> -->
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<process-monitoring-chart :beilv="beilv" />
|
||||
@@ -55,12 +55,14 @@ const tableProps = [
|
||||
{
|
||||
prop: 'paramName',
|
||||
label: '工艺参数',
|
||||
minWidth: 150
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'variableName',
|
||||
label: '变量名称',
|
||||
minWidth: 150
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'eqName',
|
||||
@@ -127,7 +129,7 @@ export default {
|
||||
],
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 1000,
|
||||
size: 20,
|
||||
equipmentId: '',
|
||||
paramName: '',
|
||||
startTime: '',
|
||||
@@ -135,7 +137,7 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
tableH: tableHeight(290),
|
||||
tableH: tableHeight(340),
|
||||
total: 0,
|
||||
historyList: []
|
||||
}
|
||||
@@ -152,6 +154,7 @@ export default {
|
||||
this.getRealList()
|
||||
},
|
||||
methods: {
|
||||
// 实时数据
|
||||
getRealList() {
|
||||
getPageReal({ ...this.listQuery }).then((res) => {
|
||||
console.log(res)
|
||||
@@ -161,6 +164,7 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 历史数据
|
||||
getHistoryList() {
|
||||
if (!this.listQuery.startTime || !this.listQuery.endTime) {
|
||||
this.$message.error('时间范围不能为空')
|
||||
@@ -174,8 +178,12 @@ export default {
|
||||
this.$message.error('工艺参数不能为空')
|
||||
return false
|
||||
}
|
||||
getPageHistory({ ...this.listQuery }).then((res) => {
|
||||
console.log(res)
|
||||
getPageHistory({
|
||||
startTime: this.listQuery.startTime,
|
||||
endTime: this.listQuery.endTime,
|
||||
equipmentId: this.listQuery.equipmentId,
|
||||
paramName: this.listQuery.paramName
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.historyList = res
|
||||
}
|
||||
@@ -187,7 +195,6 @@ export default {
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
if (this.type === '实时数据') {
|
||||
this.listQuery.startTime = ''
|
||||
this.listQuery.endTime = ''
|
||||
@@ -203,7 +210,6 @@ export default {
|
||||
}
|
||||
},
|
||||
changeType(val) {
|
||||
console.log(val)
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.listQuery.startTime = ''
|
||||
this.listQuery.endTime = ''
|
||||
@@ -213,14 +219,22 @@ export default {
|
||||
if (val === '历史数据') {
|
||||
this.formConfig[0].type = 'datePicker'
|
||||
this.formConfig[0].label = '时间范围'
|
||||
this.formConfig[0].defaultSelect = []
|
||||
this.formConfig[1].defaultSelect = []
|
||||
this.formConfig[2].defaultSelect = ''
|
||||
} else {
|
||||
this.formConfig[0].type = ''
|
||||
this.formConfig[0].label = ''
|
||||
this.formConfig[0].defaultSelect = []
|
||||
this.formConfig[1].defaultSelect = []
|
||||
this.formConfig[2].defaultSelect = ''
|
||||
this.getRealList()
|
||||
}
|
||||
},
|
||||
cascaderSelect(val) {
|
||||
console.log(val)
|
||||
if (val.value.length === 3) {
|
||||
console.log('333333333333333')
|
||||
this.listQuery.equipmentId = val.value[2]
|
||||
getParamList({
|
||||
current: 1,
|
||||
@@ -228,9 +242,18 @@ export default {
|
||||
equipmentId: this.listQuery.equipmentId
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
let obj = { ...this.$refs.searchBarForm.formInline }
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.formConfig[0].defaultSelect = obj.timeStr
|
||||
this.formConfig[1].defaultSelect = JSON.parse(
|
||||
JSON.stringify(obj.equipmentId)
|
||||
)
|
||||
this.formConfig[2].defaultSelect = ''
|
||||
this.formConfig[2].selectOptions = res.data
|
||||
})
|
||||
} else {
|
||||
console.log('清空')
|
||||
this.formConfig[1].defaultSelect = ''
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.formConfig[2].selectOptions = []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user