pageHeghtAdjust

This commit is contained in:
shijing 2022-04-06 16:53:58 +08:00
parent 755c0abb35
commit 0e9624281f
7 changed files with 66 additions and 59 deletions

View File

@ -135,6 +135,7 @@
export default {
mixins: [drawMixin],
inject:['reload'],
data() {
return {
timing: null,
@ -437,6 +438,7 @@
category:[],
planData:[],
realData:[],
timer:null,
}
},
components: {
@ -476,6 +478,9 @@
that.getOneData();//车间一
that.getTwoData();//车间二
that.getArticle();
that.timer = window.setInterval(() => {
that.reload();
},3600000)
},
beforeDestroy() {
clearInterval(this.timing)
@ -483,8 +488,8 @@
methods: {
timeFn() {
this.timing = setInterval(() => {
this.dateDay = formatTimeBigScreen(new Date(), 'HH: mm: ss')
this.dateYear = formatTimeBigScreen(new Date(), 'yyyy-MM-dd')
this.dateDay = formatTimeBigScreen(new Date(), 'HH: mm: ss');
this.dateYear = formatTimeBigScreen(new Date(), 'yyyy-MM-dd');
this.dateWeek = this.weekday[new Date().getDay()]
}, 1000)
},
@ -527,8 +532,19 @@
that.titleItem[3].number.number[0] = respo.data.count_selled;
that.titleItem[4].number.number[0] = respo.data.count_notok;
let mtestCount = respo.data.count_mtestok + respo.data.count_mtestnotok;
that.titleItem[5].number.number[0] = Math.floor((respo.data.count_mtestok / mtestCount) * 100);
that.rate[0].tips = Math.floor((respo.data.count_ok / respo.data.count) * 100);
if(respo.data.count_mtestok===0){
that.titleItem[5].number.number[0] = 0;
that.rate[0].tips = 0;
}else if(mtestCount===0){
that.titleItem[5].number.number[0] = 100;
}else{
that.titleItem[5].number.number[0] = Math.floor((respo.data.count_mtestok / mtestCount) * 100);
}
if(respo.data.count===0){
that.rate[0].tips = 100;
}else{
that.rate[0].tips = Math.floor((respo.data.count_ok / respo.data.count) * 100);
}
//工序生产进度
getProcessNow({type: 'big_screen'}).then(res => {
if (res.data) {
@ -703,6 +719,8 @@
that.limitedPlan = false;
getPlanGantt({type: 'big_screen'}).then(res => {
if (res.code === 200) {
that.planData = [];
that.realData = [];
let list = res.data.results;
list.forEach(item=>{
that.category.push(item.number);
@ -715,6 +733,9 @@
}
})
},
},
destroyed() {
clearInterval(this.timer)
}
}
</script>

View File

@ -147,7 +147,7 @@
</div>
</el-dialog>
</el-card>
<el-tabs type="border-card" style="height:310px">
<el-tabs type="border-card">
<el-tab-pane label="输入物料">
<el-button
v-if="checkPermission(['subproduction_update'])"
@ -681,7 +681,7 @@
data() {
return {
halfHeight: 190,
halfHeight: null,
materialoptions: [],
subproducationData: [],
inputtableData: [],
@ -759,11 +759,7 @@
let that = this;
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
let h = document.getElementById('processCard').clientHeight;
that.halfHeight = (hei - h - 160) / 2;
/* debugger;
console.log(hei);
console.log(h);
console.log(this.halfHeight)*/
that.halfHeight = (hei - h - 176) / 2;
},
methods: {
checkPermission,

View File

@ -33,7 +33,7 @@
fit
stripe
style="width: 100%"
height="300"
:height="domHeight"
@row-click="tableRowClick"
>
<el-table-column type="index" width="50"/>
@ -96,7 +96,7 @@
@pagination="getplanList"
/>
</el-card>
<el-card class="box-card">
<el-card class="box-card" id="ganttCard">
<div style="height: 40px;line-height: 40px;background: #F5F7FA;padding-left: 20px;">甘特图</div>
<gantt
v-if="proList.length>0"
@ -116,6 +116,7 @@
components: {Pagination, gantt},
data() {
return {
domHeight:null,
productionplanList: {
count: 0,
},
@ -279,6 +280,11 @@
this.$router.push({name: "plandetails", params: {id: scope.row.id}});
},
},
mounted() {
let hei = document.getElementsByClassName('app-main')[0].clientHeight;//
// let h = document.getElementById('ganttCard').clientHeight;//
this.domHeight = hei - 460;
}
};
</script>

View File

@ -29,11 +29,12 @@
</el-button>
<el-table
:data="productionplanList.results"
id="productionPlan"
border
fit
stripe
style="width: 100%"
height="300"
:height="domHeight"
>
<el-table-column type="index" width="50"/>
<el-table-column label="任务编号" prop="number" width="110">
@ -141,11 +142,12 @@
<el-tab-pane label="订单排产" name="订单排产">
<el-table
:data="orderList.results"
id="orderList"
border
fit
stripe
style="width: 100%"
height="250"
:height="domHeight"
>
<el-table-column type="index" width="50"/>
<el-table-column label="订单编号" width="110">
@ -278,6 +280,7 @@
components: {Pagination, gantt},
data() {
return {
domHeight:null,
orderplan: defaulteorderplan,
orderList: {
count: 0,
@ -507,6 +510,12 @@
this.$router.push({name: "work", params: {id: scope.row.id}});
},
},
mounted() {
let hei = document.getElementsByClassName('app-main')[0].clientHeight;//
let domHeight = this.domHeight = (hei - 205) / 2;
document.getElementById('orderList').style.height = domHeight + 'px';
document.getElementById('productionPlan').style.height = domHeight + 'px';
}
};
</script>

View File

@ -21,66 +21,38 @@
stripe
highlight-current-row
height="100"
v-el-height-adaptive-table="{ bottomOffset: 25 }"
v-el-height-adaptive-table="{ bottomOffset: 44 }"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="订单编号" width="110">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="所需产品" show-overflow-tooltip width="150">
<template slot-scope="scope">{{
scope.row.product_.name
}}
</template>
<template slot-scope="scope">{{scope.row.product_.name }}</template>
</el-table-column>
<el-table-column label="产品数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column>
<el-table-column label="已派数量">
<template slot-scope="scope">{{
scope.row.planed_count
}}
</template>
<template slot-scope="scope">{{scope.row.planed_count }}</template>
</el-table-column>
<el-table-column label="产品型号">
<template slot-scope="scope">{{
scope.row.product_.specification
}}
</template>
<template slot-scope="scope">{{scope.row.product_.specification }}</template>
</el-table-column>
<el-table-column label="客户名称" show-overflow-tooltip width="150">
<template slot-scope="scope">{{
scope.row.customer_.name
}}
</template>
<template slot-scope="scope">{{scope.row.customer_.name}}</template>
</el-table-column>
<el-table-column label="合同编号" show-overflow-tooltip width="150">
<template slot-scope="scope" v-if=" scope.row.contract_">{{
scope.row.contract_.number
}}
</template>
<template slot-scope="scope" v-if=" scope.row.contract_">{{scope.row.contract_.number }}</template>
</el-table-column>
<el-table-column label="合同名称" show-overflow-tooltip width="150">
<template slot-scope="scope" v-if=" scope.row.contract_">{{
scope.row.contract_.name
}}
</template>
<template slot-scope="scope" v-if=" scope.row.contract_">{{scope.row.contract_.name }}</template>
</el-table-column>
<el-table-column label="交货日期" width="110">
<template slot-scope="scope">{{
scope.row.delivery_date
}}
</template>
<template slot-scope="scope">{{scope.row.delivery_date }}</template>
</el-table-column>
<el-table-column label="创建时间" width="110">
<template slot-scope="scope">{{
scope.row.create_time
}}
</template>
<template slot-scope="scope">{{scope.row.create_time }}</template>
</el-table-column>
<el-table-column label="计划生产数" width="150px" fixed="right">
<template slot-scope="scope">
@ -96,7 +68,6 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="orderList.count > 0"
:total="orderList.count"
@ -127,7 +98,7 @@
fit
stripe
style="width: 100%"
height="330"
:height="domHeight"
ref="multipleTables"
>
<el-table-column type="selection" width="55"></el-table-column>
@ -194,10 +165,9 @@
fit
stripe
style="width: 100%"
height="280"
:height="domHeight"
>
<el-table-column type="index" width="50"/>
<el-table-column label="设备名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
@ -268,6 +238,7 @@
components: {Pagination},
data() {
return {
domHeight:null,
orderplan: defaulteorderplan,
orderList: {
count: 0,
@ -397,5 +368,11 @@
});
},
},
mounted() {
let hei = document.getElementsByClassName('app-main')[0].clientHeight;//
let domHeight = this.domHeight = (hei - 116) / 2;
document.getElementById('orderList').style.height = domHeight + 'px';
document.getElementById('productionPlan').style.height = domHeight + 'px';
}
};
</script>

View File

@ -43,7 +43,6 @@
fit
stripe
highlight-current-row
max-height="700"
height="100"
v-el-height-adaptive-table="{ bottomOffset: 43 }"
>

View File

@ -43,9 +43,8 @@
fit
stripe
highlight-current-row
max-height="700"
height="100"
v-el-height-adaptive-table="{bottomOffset: 50}"
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="供应商名" prop="name">