This commit is contained in:
朱菊兰 2023-06-13 14:04:38 +08:00
parent de0a6c45e0
commit d5f1100dd9
7 changed files with 252 additions and 205 deletions

View File

@ -1,4 +1,8 @@
<template>
<div>
<div style="text-align: center; margin-bottom: 10px; font-weight: bold">
{{ name }}
</div>
<el-form ref="form" label-width="110px" :model="form">
<el-row :gutter="20">
<el-col :span="12">
@ -6,7 +10,7 @@
<el-input-number
v-model="form.january"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -15,7 +19,7 @@
<el-input-number
v-model="form.february"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -26,7 +30,7 @@
<el-input-number
v-model="form.march"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -35,7 +39,7 @@
<el-input-number
v-model="form.april"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -46,7 +50,7 @@
<el-input-number
v-model="form.may"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -55,7 +59,7 @@
<el-input-number
v-model="form.june"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -66,7 +70,7 @@
<el-input-number
v-model="form.july"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -75,7 +79,7 @@
<el-input-number
v-model="form.august"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -86,7 +90,7 @@
<el-input-number
v-model="form.september"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -95,7 +99,7 @@
<el-input-number
v-model="form.october"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -106,7 +110,7 @@
<el-input-number
v-model="form.november"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
@ -115,12 +119,13 @@
<el-input-number
v-model="form.december"
:min="0"
style="width: 300px"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import {
@ -131,16 +136,18 @@ export default {
name: 'productPowerEdit',
data() {
return {
form: {}
form: {},
name: ''
}
},
mounted() {},
methods: {
init(param) {
this.name = param.name
let date = new Date(param.timePosition)
let year = date.getFullYear()
performanceAnalysisPlan({
name: param.name,
name: this.name,
year: year
}).then((res) => {
console.log(res)
@ -150,6 +157,7 @@ export default {
})
},
submitForm() {
console.log(this.form)
performanceUpdatePlan({ ...this.form }).then((res) => {
if (res.code === 0) {
this.$message({

View File

@ -40,7 +40,7 @@
<el-col :span="6">
<div class="top-right">
<div>
<span class="title">{{ unitName }}单元计划产能</span>
<span class="title">{{ eqName }}计划产能</span>
<svg-icon
icon-class="device_edit"
class="icon-style"
@ -81,6 +81,7 @@
<base-dialog
dialogTitle="产能维护"
:dialogVisible="centervisible"
:close-on-click-modal="false"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
@ -101,7 +102,7 @@ import deviceOeeLine from './../components/deviceOeeLine.vue'
// import moment from 'moment'
const tableProps = [
{
prop: 'date',
prop: 'recordDate',
label: '时间',
minWidth: 160,
filter: timeFormatter
@ -173,7 +174,7 @@ export default {
children: 'children',
label: 'name'
},
unitName: '',
eqName: '',
chooseMonth: '',
formConfig: [
{
@ -231,10 +232,10 @@ export default {
getTree() {
getTreeData().then((res) => {
this.treeData = res.data
this.unitName = res.data[0].children[0].name
this.listQuery.name = this.unitName
this.eqName = res.data[0].children[0].children[0].name
this.listQuery.name = this.eqName
setTimeout(() => {
this.$refs.deviceTree.setCurrentKey(this.unitName)
this.$refs.deviceTree.setCurrentKey(this.eqName)
}, 100)
this.getList()
this.getPlan()
@ -274,8 +275,7 @@ export default {
{ month: '11月', value: null, type: 'november' },
{ month: '12月', value: null, type: 'december' }
]
performanceAnalysisPlan({ name: this.unitName, year: year }).then(
(res) => {
performanceAnalysisPlan({ name: this.eqName, year: year }).then((res) => {
if (res.code === 0 && !!res.data) {
let obj = res.data
for (let i = 0; i < arr.length; i++) {
@ -288,16 +288,15 @@ export default {
}
this.tableData2 = arr.slice(0, 6)
this.tableData3 = arr.slice(6, 12)
}
)
})
},
clickDevice(val) {
if (val.children && val.parent) {
//
if (!val.children) {
//
this.listQuery.name = val.name
this.unitName = val.name
this.getList()
this.getPlan()
this.eqName = val.name
// this.getList()
// this.getPlan()
}
},
editPower() {

View File

@ -64,7 +64,7 @@
marginBottom: 5 * beilv + 'px'
}"
>
{{ productMsg.finishNum }}
{{ productMsg.realProductNum }}
</p>
<p class="words">生产数量</p>
</div>

View File

@ -1,4 +1,5 @@
<template>
<div>
<el-drawer title="查看详情" :visible.sync="visible" size="70%">
<div>
<base-table
@ -18,32 +19,56 @@
/>
</base-table>
<pagination :limit="listQuery.size" :total="total" />
<el-drawer
title="玻璃ID追溯"
:append-to-body="true"
:visible.sync="historyVisible"
size="50%"
>
<el-form ref="form" :model="form" label-width="150px">
<el-form-item label="初投玻璃ID:">{{
form.initialGlassId
}}</el-form-item>
<el-form-item label="第一次复磨玻璃ID:">{{
form.reloadOne
}}</el-form-item>
<el-form-item label="第二次复磨玻璃ID:">{{
form.reloadTwo
}}</el-form-item>
<el-form-item label="第三次复磨玻璃ID:">{{
form.reloadThree
}}</el-form-item>
<el-form-item label="第四次复磨玻璃ID:">{{
form.reloadFour
}}</el-form-item>
</el-form>
</el-drawer>
</div>
</el-drawer>
<base-dialog
dialogTitle="玻璃ID追溯"
:dialogVisible="historyVisible"
:close-on-click-modal="false"
:before-close="handleCancel"
>
<el-form ref="historyForm" :model="form" label-width="150px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="初投玻璃ID:">
<el-input v-model="form.initialGlassId" disabled></el-input
></el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="第一次复磨玻璃ID:">
<el-input v-model="form.initialGlassId" disabled></el-input
></el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="第二次复磨玻璃ID:">
<el-input v-model="form.reloadTwo" disabled></el-input
></el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="第三次复磨玻璃ID:">
<el-input v-model="form.reloadThree" disabled></el-input
></el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="第四次复磨玻璃ID:">
<el-input v-model="form.reloadFour" disabled></el-input
></el-form-item>
</el-col>
</el-row>
</el-form>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" class="btnTextStyle" @click="handleCancel"
>取消</el-button
>
</el-col>
</el-row>
</base-dialog>
</div>
</template>
<script>
import { tableHeight, timeFormatter } from '@/utils/index'
@ -139,8 +164,10 @@ export default {
this.form.reloadFour = res.data.reloadFour ? res.data.reloadFour : '-'
})
},
handleCloseProcess() {},
handleCloseDevice() {}
handleCancel() {
this.$refs.historyForm.resetFields()
this.historyVisible = false
}
}
}
</script>

View File

@ -84,7 +84,7 @@
fontSize: 27 * beilv + 'px',
marginBottom: 6 * beilv + 'px'
}"
>{{ detailMsg.finishNum }}</span
>{{ detailMsg.realProductNum }}</span
>
<span class="tip" :style="{ fontSize: 16 * beilv + 'px' }"
>完成数量</span

View File

@ -113,7 +113,7 @@
marginBottom: 6 * beilv + 'px'
}"
>
{{ productMsg.finishNum }}
{{ productMsg.realProductNum }}
</p>
<p class="words" :style="{ fontSize: 14 * beilv + 'px' }">
生产数量

View File

@ -1,6 +1,9 @@
<template>
<div>
<div class="top-box">
<div style="padding: 10px 0 0 16px">
<search-bar :formConfigs="formConfig" />
</div>
<production-line-diagram></production-line-diagram>
</div>
<el-row class="bottom-box" :gutter="10">
@ -107,6 +110,16 @@ export default {
name: 'ProductionLineStatus',
data() {
return {
formConfig: [
{
type: 'select',
label: '产线',
selectOptions: JSON.parse(localStorage.getItem('publicList'))
.proLineVoList,
param: 'proLineId',
defaultSelect: ''
}
],
listQuery1: {
current: 1,
size: 10
@ -115,8 +128,8 @@ export default {
current: 1,
size: 5
},
tableH: tableHeight(450),
tableH2: (tableHeight(238) * 0.708 - 50) / 2,
tableH: tableHeight(479),
tableH2: (tableHeight(238) * 0.68 - 50) / 2,
tableProps1,
tableData1: [],
tableData2: [],
@ -130,8 +143,8 @@ export default {
components: { ProductionLineDiagram },
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(450)
this.tableH2 = (tableHeight(238) * 0.708 - 50) / 2
this.tableH = tableHeight(479)
this.tableH2 = (tableHeight(238) * 0.68 - 50) / 2
})
this.getTableMsg()
},
@ -162,10 +175,10 @@ export default {
border-radius: 4px;
}
.top-box {
height: calc((100vh - 90px - 50px - 16px) * 0.292);
height: calc((100vh - 90px - 50px - 16px) * 0.32);
}
.bottom-box {
height: calc((100vh - 90px - 50px - 16px) * 0.708);
height: calc((100vh - 90px - 50px - 16px) * 0.68);
padding: 0 16px 16px;
.area {
.title {