Merge remote-tracking branch 'new_hw/yangwl'

# Conflicts:
#	src/api/plan/whiteOrder.js
master
Yangwl 8 months ago
commit 7d2ff6f09b

@ -62,3 +62,12 @@ export function syncSAPbp() {
data: data data: data
}); });
} }
// 查询设备小时产量
export function getHourProductionList(query) {
return request({
url: '/mes/reportWork/getHourProductionList',
method: 'get',
params: query
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

@ -83,10 +83,10 @@
生产中 生产中
</div> </div>
<div class="infoModel" :style="`display:${loopIndex === k?'inline-block':''}`"> <div class="infoModel" :style="`display:${loopIndex === k?'inline-block':''}`">
<div class="title">{{ i.equName }}</div> <div class="title">{{ (i||{}).equName }}</div>
<div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> {{ i.quantity }}</div> <div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> {{ (i||{}).quantity }}</div>
<div class="equipmentInfo"><span style="color: #fff9">设备状态:</span> {{ <div class="equipmentInfo"><span style="color: #fff9">设备状态:</span> {{
parseFloat(i.quantity) > 0 ? '运行' : '停机' parseFloat((i||{}).quantity) > 0 ? '运行' : '停机'
}} }}
</div> </div>
</div> </div>
@ -96,10 +96,10 @@
:style="`top: ${equipmentLocation[k].top}%;left: ${equipmentLocation[k].left}%;`"> :style="`top: ${equipmentLocation[k].top}%;left: ${equipmentLocation[k].left}%;`">
<div :class="equipmentLocation[k].isRight?`equipmentName1`:`equipmentName`" <div :class="equipmentLocation[k].isRight?`equipmentName1`:`equipmentName`"
:style="`display:${loopIndex === 18+k?'inline-block':''}`"> :style="`display:${loopIndex === 18+k?'inline-block':''}`">
<div class="title">{{ i.equName }}</div> <div class="title">{{ (i||{}).equName }}</div>
<div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> {{ i.quantity }}</div> <div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> {{ (i||{}).quantity }}</div>
<div class="equipmentInfo"><span style="color: #fff9">设备状态:</span> {{ <div class="equipmentInfo"><span style="color: #fff9">设备状态:</span> {{
parseFloat(i.quantity) > 0 ? '运行' : '停机' parseFloat((i||{}).quantity) > 0 ? '运行' : '停机'
}} }}
</div> </div>
</div> </div>
@ -108,7 +108,7 @@
v-for="(i,k) in ringLocation"></div> v-for="(i,k) in ringLocation"></div>
<div :class="`${i.IsLoad? 'agv2':'agv1'}`" v-for="i in agvData" v-show="i.show" <div :class="`${i.IsLoad? 'agv2':'agv1'}`" v-for="i in agvData" v-show="i.show && !(i.x>0.3&&i.x<0.62 && i.y <0.8)"
:style="`${getLocation(i.x,i.y)}transform: rotate(${parseFloat(i.rotate )- 180}deg);`"></div> :style="`${getLocation(i.x,i.y)}transform: rotate(${parseFloat(i.rotate )- 180}deg);`"></div>
</div> </div>
</div> </div>
@ -350,6 +350,8 @@ export default {
}, },
getData() { getData() {
let time = parseTime(new Date(), '{h}-{i}').split('-') let time = parseTime(new Date(), '{h}-{i}').split('-')
let i = parseFloat(time[0]) || 0 let i = parseFloat(time[0]) || 0
let s = parseFloat(time [1]) || 0 let s = parseFloat(time [1]) || 0
@ -382,6 +384,8 @@ export default {
} }
this.hfData = hfArr this.hfData = hfArr
this.equipmentData = equipmentArr this.equipmentData = equipmentArr
console.log(this.hfData)
console.log(this.equipmentData)
}) })
} }
}, },

@ -4,20 +4,21 @@
<div class="modelTitle" style=" top: 15.2%;left: 3%;">烘房状态</div> <div class="modelTitle" style=" top: 15.2%;left: 3%;">烘房状态</div>
<div class="modelTitle" style="top:15.2%;left:32%">设备运行数据</div> <div class="modelTitle" style="top:15.2%;left:32%">设备运行数据</div>
<div class="modelTitle" style="top:15.2%;left:71%">烘房白坯质量统计</div> <div class="modelTitle" style="top:15.2%;left:71%">烘房白坯质量统计</div>
<div class="modelTitle" style="top:65%;left:32%">近7天产量</div> <!-- <div class="modelTitle" style="top:65%;left:32%">近7天产量</div>-->
<div class="modelTitle" style="top:65%;left:32%">烘房耗电量</div>
<div class="modelTitle" style="top:65%;left:71%">计划达成率</div> <div class="modelTitle" style="top:65%;left:71%">计划达成率</div>
<div class="title1" style="top:24%;left:34%">成型机产量</div> <!-- <div class="title1" style="top:24%;left:34%">成型机产量</div>-->
<div class="title1" style="top:24%;left:52.5%">烘房产量</div> <!-- <div class="title1" style="top:24%;left:52.5%">烘房产量</div>-->
<div class="title1" style="top:45%;left:34%">烘房耗电量</div> <!-- <div class="title1" style="top:45%;left:34%">烘房耗电量</div>-->
<div class="title1" style="top:45%;left:52.5%">AGV开动数量</div> <!-- <div class="title1" style="top:45%;left:52.5%">AGV开动数量</div>-->
<div class="unit1" style="top: 31.3%;left: 45.5%;"></div> <!-- <div class="unit1" style="top: 31.3%;left: 45.5%;"></div>-->
<div class="unit1" style="top: 31.3%;left: 63.5%"></div> <!-- <div class="unit1" style="top: 31.3%;left: 63.5%"></div>-->
<div class="unit1" style="top: 51.3%;left: 45.5%;">KWh</div> <!-- <div class="unit1" style="top: 51.3%;left: 45.5%;">KWh</div>-->
<div class="unit1" style="top: 51.3%;left: 63.5%;"></div> <!-- <div class="unit1" style="top: 51.3%;left: 63.5%;"></div>-->
<div class="num1" style="top: 31.5%;left: 39.5%;">{{ CData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div> <!-- <div class="num1" style="top: 31.5%;left: 39.5%;">{{ CData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div>-->
<div class="num1" style="top:31.5%;left:57.7%">{{ HData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div> <!-- <div class="num1" style="top:31.5%;left:57.7%">{{ HData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div>-->
<div class="num1" style="top:51.6%;left:39.5%">{{ expend }}</div> <!-- <div class="num1" style="top:51.6%;left:39.5%">{{ expend }}</div>-->
<div class="num1" style="top:51.6%;left:57.7%">{{ agvData.length }}</div> <!-- <div class="num1" style="top:51.6%;left:57.7%">{{ agvData.length }}</div>-->
<div class="title2" style="top: 73.5%;left: 86.8%;">计划生产数量</div> <div class="title2" style="top: 73.5%;left: 86.8%;">计划生产数量</div>
<div class="title2" style="top: 85.3%;left: 86.8%;">实际生产数量</div> <div class="title2" style="top: 85.3%;left: 86.8%;">实际生产数量</div>
<div class="unit2" style="top: 76.5%;left: 95%;"></div> <div class="unit2" style="top: 76.5%;left: 95%;"></div>
@ -83,6 +84,7 @@
</div> </div>
<Chart ref="chart1" class="chart1"></Chart> <Chart ref="chart1" class="chart1"></Chart>
<Chart ref="chart2" class="chart2"></Chart> <Chart ref="chart2" class="chart2"></Chart>
<Chart ref="chart3" class="chart3"></Chart>
</div> </div>
</template> </template>
<script> <script>
@ -134,10 +136,108 @@ export default {
methods: { methods: {
getData() { getData() {
dryRoomDataCarousel().then(e => { dryRoomDataCarousel().then(e => {
this.table1Data = e.data.dryingroomList || [] this.table1Data = e.data.dryingroomList.filter(v=>parseFloat(v.expend/v.yield)) || []
}) })
EnergyExpend().then(e => { EnergyExpend().then(e => {
this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2) this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2)
let option2 = {
grid: {
top: '15%',
bottom: '10%',
// left: '5%',
right: '3%'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
label: {
show: true
}
}
},
legend: {
right: 0,
textStyle: {
color: '#eee'
}
},
xAxis: {
data: e.map(v => v.monitorName.split(' - ')?.[1]?.split('(')?.[0]),
axisLine: {
show: true, //X线
lineStyle: {
color: '#fff'
}
},
axisTick: {
show: true //X
},
axisLabel: {
interval:0,
show: true,
textStyle: {
color: '#fff' //X
}
}
},
yAxis: [
{
type: 'value',
name: '单位KWh',
nameTextStyle: {
color: '#fff'
},
splitLine: {
show: false
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
color: '#fff'
}
},
axisLabel: {
show: true,
textStyle: {
color: '#fff'
}
}
}
],
series: [
{
label: {
show: true,
position: 'top',
formatter: "{c}",
color: "#fff"
},
name: '耗电量',
type: 'bar',
smooth: true, //线
showAllSymbol: true, //
symbol: "emptyCircle", //
symbolSize: 5, //
// itemStyle: {
// //线
// color: "#058cff",
// },
// lineStyle: {
// color: "#058cff",
// },
// areaStyle: {
// color: "rgba(5,140,255, 0.2)",
// },
data: e.map(v => parseFloat(v.expend)),
},
]
};
this.$refs.chart3.setData(option2)
}) })
agvdata().then(e => { agvdata().then(e => {
console.log(e) console.log(e)
@ -206,7 +306,8 @@ export default {
axisLabel: { axisLabel: {
color: '#ccc' color: '#ccc'
}, },
data: e.checkList.map(v => v.machineName), // data: e.checkList.map(v => v.machineName),
data: e.checkList.map((v,k) => '产品'+k),
}, },
series: [ series: [
{ {
@ -256,6 +357,7 @@ export default {
}; };
this.$refs.chart1.setData(option) this.$refs.chart1.setData(option)
}) })
getHourProductionLists().then(e => { getHourProductionLists().then(e => {
let option1 = { let option1 = {
grid: { grid: {
@ -489,9 +591,16 @@ export default {
top: 67.6%; top: 67.6%;
left: 31.3%; left: 31.3%;
}
.chart3 {
position: absolute;
width: 37.4%;
height: 42.5%;
top: 17.6%;
left: 31.3%;
} }
.case-item { .case-item {
border: 2px solid #0c61ad; border: 2px solid #0c61ad;
border-radius: 2px; border-radius: 2px;
margin: 8px 0 0 0; margin: 8px 0 0 0;

@ -499,6 +499,13 @@
<el-table-column align="center" width="150" prop="batchNumList" label="批次数量"></el-table-column> <el-table-column align="center" width="150" prop="batchNumList" label="批次数量"></el-table-column>
</el-table> </el-table>
<!-- 测试 --> <!-- 测试 -->
<el-row style="margin-top: 20px">
<el-steps :active="2">
<el-step title="成型" :description="totalQuantity_cx"></el-step>
<el-step title="烘房" :description="totalQuantity_hf"></el-step>
</el-steps>
</el-row>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" v-if="showDetail"> </el-button> <el-button type="primary" @click="submitForm" v-if="showDetail"> </el-button>
@ -640,6 +647,7 @@ import {
import moment from 'moment'; import moment from 'moment';
import { getProEquipment, getProRoutes, getProShifts,selectMaterielList} from '@/api/plan/order' import { getProEquipment, getProRoutes, getProShifts,selectMaterielList} from '@/api/plan/order'
import {prototype} from "clipboard"; import {prototype} from "clipboard";
import {getHourProductionList} from '@/api/plan/whiteOrder';
export default { export default {
name: "WorkorderBP", name: "WorkorderBP",
@ -728,6 +736,9 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
//
totalQuantity_cx: 0,
totalQuantity_hf: 0,
// //
workorderList: [], workorderList: [],
// //
@ -1447,6 +1458,34 @@ export default {
getWorkBatchList(this.selectWork).then(response => { getWorkBatchList(this.selectWork).then(response => {
this.formFields = response.data this.formFields = response.data
}) })
//
getHourProductionList({
workorderCode: this.selectWork.workorderCode,
}).then(response => {
let totalQuantity_cx = 0;
let totalQuantity_hf = 0;
// equName
response.forEach(item => {
// quantity
const quantity = Number(item.quantity) || 0;
if (item.equName.includes("成型")) {
totalQuantity_cx += quantity;
}
});
response.forEach(item => {
// quantity
const quantity = Number(item.quantity) || 0;
if (item.equName.includes("烘房")) {
totalQuantity_hf += quantity;
}
});
this.totalQuantity_cx = totalQuantity_cx;
this.totalQuantity_hf = totalQuantity_hf;
});
// //
// //

Loading…
Cancel
Save