<template>
|
<div class="content-box2">
|
<dv-border-box-6>
|
<div>
|
<div class="top-top">工单编号</div>
|
<!-- <div class="top-bottom">{{orderDetail.workOrderNo}}</div>-->
|
<div class="top-bottom selectBottom">
|
|
<el-select class="mySelect" v-model="value" @change="handleSelectChange" placeholder="请选择">
|
<el-option
|
v-for="item in options"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
</div>
|
</div>
|
</dv-border-box-6>
|
<dv-border-box-6>
|
<div>
|
<div class="top-top">产品名称</div>
|
<div style="font-size: 20px;margin-top: 75px;margin-left: 30px;color: #71CAFC">{{orderDetail.materialName}}</div>
|
</div>
|
</dv-border-box-6>
|
<dv-border-box-6>
|
<div>
|
<div class="top-top">计划数量</div>
|
<div class="top-bottom blue">{{orderDetail.planQty}}</div>
|
</div>
|
</dv-border-box-6>
|
<dv-border-box-6>
|
<div>
|
<div class="top-top">出料数量</div>
|
<div class="top-bottom blue">{{orderDetail.actualQty}}个</div>
|
</div>
|
</dv-border-box-6>
|
<dv-border-box-6>
|
<div>
|
<div class="top-top">NG数量</div>
|
<div class="top-bottom blue">{{orderDetail.NgNumber}}个</div>
|
</div>
|
</dv-border-box-6>
|
<dv-border-box-6>
|
<div>
|
<div class="top-top">合格率</div>
|
<div class="top-bottom orange">{{orderDetail.passRate}}%</div>
|
</div>
|
</dv-border-box-6>
|
<dv-border-box-6>
|
<div>
|
<div class="top-top">完成率</div>
|
<div class="top-bottom orange">{{orderDetail.completionRate}}%</div>
|
</div>
|
</dv-border-box-6>
|
<dv-border-box-6>
|
<div>
|
<div class="top-top">剩余时间(小时)</div>
|
<div class="top-bottom blue">{{orderDetail.remainder}}</div>
|
</div>
|
</dv-border-box-6>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: "top",
|
data() {
|
return {
|
orderDetail: {
|
"materialName":"Ebike中置电机总成(MIGIC C1 36V)",
|
"planQty":30,
|
"completionRate":100,
|
"workOrderNo":"M202311220006",
|
"actualQty":30,
|
"remainder":0,
|
"NgNumber":0,
|
"passRate":100
|
},
|
options: [{
|
value: 'M202311220001',
|
label: 'M202311220001',
|
}, {
|
value: 'M202311220002',
|
label: 'M202311220002'
|
}, {
|
value: 'M202311220003',
|
label: 'M202311220003'
|
}, {
|
value: 'M202311220004',
|
label: 'M202311220004'
|
}, {
|
value: 'M202311220005',
|
label: 'M202311220005'
|
}],
|
value: ''
|
}
|
},
|
mounted() {
|
this.orderListInit();
|
this.tops();
|
this.changeTiming();
|
this.value = this.options[0].value; // 设置默认选中第一个选项
|
},
|
methods: {
|
// eslint-disable-next-line no-unused-vars
|
handleSelectChange(value) {
|
// 触发自定义事件
|
this.$bus.$emit('refresh-components', value)
|
this.tops();
|
},
|
tops(){
|
// this.orderListInit();
|
console.log(this.value);
|
this.$http.get('http://172.20.1.10:8080/productionOrdeInfo/topData?workOrderNo='+this.value)
|
// this.$http.get('http://127.0.0.1:8080/productionOrdeInfo/topData?workOrderNo='+this.value)
|
.then((response)=>{
|
this.orderDetail = response.data.data;
|
console.log(response.data.data);
|
})
|
},
|
orderListInit(){
|
this.$http.get('http://172.20.1.10:8080/productionOrdeInfo/orderDescListFive')
|
// this.$http.get('http://127.0.0.1:8080/productionOrdeInfo/orderDescListFive')
|
.then((response)=>{
|
this.options = response.data.data;
|
this.value = this.options[0].value; // 设置默认选中第一个选项
|
|
})
|
},
|
changeTiming() {
|
setInterval(() => {
|
this.tops();
|
this.orderListInit();
|
}, 300000)
|
},
|
}
|
}
|
</script>
|
|
<style scoped>
|
.content-box2{
|
height: 200px;
|
display: grid;
|
grid-template-columns: 3fr 3fr 3fr 3fr 3fr 3fr 3fr 3fr;
|
}
|
.top-top{
|
font-size: 25px;
|
text-align: center;
|
margin-top: 40px;
|
}
|
.top-bottom{
|
font-size: 30px;
|
text-align: center;
|
margin-top: 80px;
|
}
|
.adaptive-font-size {
|
font-size: calc(1vw + 1vh + 1vmin);
|
}
|
/deep/.el-input__inner {
|
background-color: #0f1325;
|
color: #71CAFC;
|
font-size: 20px;
|
border: 1px solid #0f1325;
|
}
|
.blue{
|
color: #71CAFC;
|
}
|
.orange{
|
color: #FB9D7E;
|
}
|
.red{
|
color: #FF0000;
|
}
|
.green{
|
color: #00FF00;
|
}
|
.content-box{
|
height: 200px;
|
display: grid;
|
grid-template-columns: 3fr 3fr 3fr 3fr 3fr 3fr 3fr 3fr;
|
}
|
.content-box1{
|
}
|
.el-select .el-input,
|
.el-select-dropdown .el-select-dropdown__item {
|
font-size: 16px;
|
}
|
.selectBottom{
|
width: 90%;
|
margin-left: 10px;
|
margin-top: 70px;
|
}
|
/*.mySelect{*/
|
/* */
|
/*}*/
|
</style>
|