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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
<template> <template>
<div>
<el-drawer title="查看详情" :visible.sync="visible" size="70%"> <el-drawer title="查看详情" :visible.sync="visible" size="70%">
<div> <div>
<base-table <base-table
@ -18,32 +19,56 @@
/> />
</base-table> </base-table>
<pagination :limit="listQuery.size" :total="total" /> <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> </div>
</el-drawer> </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> </template>
<script> <script>
import { tableHeight, timeFormatter } from '@/utils/index' import { tableHeight, timeFormatter } from '@/utils/index'
@ -139,8 +164,10 @@ export default {
this.form.reloadFour = res.data.reloadFour ? res.data.reloadFour : '-' this.form.reloadFour = res.data.reloadFour ? res.data.reloadFour : '-'
}) })
}, },
handleCloseProcess() {}, handleCancel() {
handleCloseDevice() {} this.$refs.historyForm.resetFields()
this.historyVisible = false
}
} }
} }
</script> </script>

View File

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

View File

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

View File

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