zjl #23

Merged
juzi merged 3 commits from zjl into master 2023-06-16 16:25:07 +08:00
7 changed files with 252 additions and 205 deletions
Showing only changes of commit d5f1100dd9 - Show all commits

View File

@ -1,126 +1,131 @@
<template> <template>
<el-form ref="form" label-width="110px" :model="form"> <div>
<el-row :gutter="20"> <div style="text-align: center; margin-bottom: 10px; font-weight: bold">
<el-col :span="12"> {{ name }}
<el-form-item label="1月" prop="january"> </div>
<el-input-number <el-form ref="form" label-width="110px" :model="form">
v-model="form.january" <el-row :gutter="20">
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="1月" prop="january">
></el-input-number> <el-input-number
</el-form-item> v-model="form.january"
</el-col> :min="0"
<el-col :span="12"> style="width: 100%"
<el-form-item label="2月" prop="february"> ></el-input-number>
<el-input-number </el-form-item>
v-model="form.february" </el-col>
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="2月" prop="february">
></el-input-number> <el-input-number
</el-form-item> v-model="form.february"
</el-col> :min="0"
</el-row> style="width: 100%"
<el-row :gutter="20"> ></el-input-number>
<el-col :span="12"> </el-form-item>
<el-form-item label="3月" prop="march"> </el-col>
<el-input-number </el-row>
v-model="form.march" <el-row :gutter="20">
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="3月" prop="march">
></el-input-number> <el-input-number
</el-form-item> v-model="form.march"
</el-col> :min="0"
<el-col :span="12"> style="width: 100%"
<el-form-item label="4月" prop="april"> ></el-input-number>
<el-input-number </el-form-item>
v-model="form.april" </el-col>
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="4月" prop="april">
></el-input-number> <el-input-number
</el-form-item> v-model="form.april"
</el-col> :min="0"
</el-row> style="width: 100%"
<el-row :gutter="20"> ></el-input-number>
<el-col :span="12"> </el-form-item>
<el-form-item label="5月" prop="may"> </el-col>
<el-input-number </el-row>
v-model="form.may" <el-row :gutter="20">
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="5月" prop="may">
></el-input-number> <el-input-number
</el-form-item> v-model="form.may"
</el-col> :min="0"
<el-col :span="12"> style="width: 100%"
<el-form-item label="6月" prop="june"> ></el-input-number>
<el-input-number </el-form-item>
v-model="form.june" </el-col>
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="6月" prop="june">
></el-input-number> <el-input-number
</el-form-item> v-model="form.june"
</el-col> :min="0"
</el-row> style="width: 100%"
<el-row :gutter="20"> ></el-input-number>
<el-col :span="12"> </el-form-item>
<el-form-item label="7月" prop="july"> </el-col>
<el-input-number </el-row>
v-model="form.july" <el-row :gutter="20">
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="7月" prop="july">
></el-input-number> <el-input-number
</el-form-item> v-model="form.july"
</el-col> :min="0"
<el-col :span="12"> style="width: 100%"
<el-form-item label="8月" prop="august"> ></el-input-number>
<el-input-number </el-form-item>
v-model="form.august" </el-col>
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="8月" prop="august">
></el-input-number> <el-input-number
</el-form-item> v-model="form.august"
</el-col> :min="0"
</el-row> style="width: 100%"
<el-row :gutter="20"> ></el-input-number>
<el-col :span="12"> </el-form-item>
<el-form-item label="9月" prop="september"> </el-col>
<el-input-number </el-row>
v-model="form.september" <el-row :gutter="20">
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="9月" prop="september">
></el-input-number> <el-input-number
</el-form-item> v-model="form.september"
</el-col> :min="0"
<el-col :span="12"> style="width: 100%"
<el-form-item label="10月" prop="october"> ></el-input-number>
<el-input-number </el-form-item>
v-model="form.october" </el-col>
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="10月" prop="october">
></el-input-number> <el-input-number
</el-form-item> v-model="form.october"
</el-col> :min="0"
</el-row> style="width: 100%"
<el-row :gutter="20"> ></el-input-number>
<el-col :span="12"> </el-form-item>
<el-form-item label="11月" prop="november"> </el-col>
<el-input-number </el-row>
v-model="form.november" <el-row :gutter="20">
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="11月" prop="november">
></el-input-number> <el-input-number
</el-form-item> v-model="form.november"
</el-col> :min="0"
<el-col :span="12"> style="width: 100%"
<el-form-item label="12月" prop="december"> ></el-input-number>
<el-input-number </el-form-item>
v-model="form.december" </el-col>
:min="0" <el-col :span="12">
style="width: 300px" <el-form-item label="12月" prop="december">
></el-input-number> <el-input-number
</el-form-item> v-model="form.december"
</el-col> :min="0"
</el-row> style="width: 100%"
</el-form> ></el-input-number>
</el-form-item>
</el-col>
</el-row>
</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,30 +275,28 @@ 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++) { arr[i].value = obj[arr[i].type]
arr[i].value = obj[arr[i].type] }
} } else {
} else { for (let i = 0; i < arr.length; i++) {
for (let i = 0; i < arr.length; i++) { arr[i].value = null
arr[i].value = null
}
} }
this.tableData2 = arr.slice(0, 6)
this.tableData3 = arr.slice(6, 12)
} }
) this.tableData2 = arr.slice(0, 6)
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,49 +1,74 @@
<template> <template>
<el-drawer title="查看详情" :visible.sync="visible" size="70%"> <div>
<div> <el-drawer title="查看详情" :visible.sync="visible" size="70%">
<base-table <div>
:page="1" <base-table
:limit="1000" :page="1"
:table-props="tableProps" :limit="1000"
:table-data="tableData" :table-props="tableProps"
:max-height="tableH" :table-data="tableData"
> :max-height="tableH"
<method-btn >
v-if="tableBtn.length" <method-btn
slot="handleBtn" v-if="tableBtn.length"
:width="110" slot="handleBtn"
label="操作" :width="110"
:method-list="tableBtn" label="操作"
@clickBtn="handleClick" :method-list="tableBtn"
/> @clickBtn="handleClick"
</base-table> />
<pagination :limit="listQuery.size" :total="total" /> </base-table>
<el-drawer <pagination :limit="listQuery.size" :total="total" />
title="玻璃ID追溯" </div>
:append-to-body="true" </el-drawer>
:visible.sync="historyVisible" <base-dialog
size="50%" dialogTitle="玻璃ID追溯"
> :dialogVisible="historyVisible"
<el-form ref="form" :model="form" label-width="150px"> :close-on-click-modal="false"
<el-form-item label="初投玻璃ID:">{{ :before-close="handleCancel"
form.initialGlassId >
}}</el-form-item> <el-form ref="historyForm" :model="form" label-width="150px">
<el-form-item label="第一次复磨玻璃ID:">{{ <el-row :gutter="20">
form.reloadOne <el-col :span="12">
}}</el-form-item> <el-form-item label="初投玻璃ID:">
<el-form-item label="第二次复磨玻璃ID:">{{ <el-input v-model="form.initialGlassId" disabled></el-input
form.reloadTwo ></el-form-item>
}}</el-form-item> </el-col>
<el-form-item label="第三次复磨玻璃ID:">{{ <el-col :span="12">
form.reloadThree <el-form-item label="第一次复磨玻璃ID:">
}}</el-form-item> <el-input v-model="form.initialGlassId" disabled></el-input
<el-form-item label="第四次复磨玻璃ID:">{{ ></el-form-item>
form.reloadFour </el-col>
}}</el-form-item> </el-row>
</el-form> <el-row :gutter="20">
</el-drawer> <el-col :span="12">
</div> <el-form-item label="第二次复磨玻璃ID:">
</el-drawer> <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 {