From 0e9624281fbf0e44b0f3439c7fd0f8ed6f4c30dc Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 6 Apr 2022 16:53:58 +0800 Subject: [PATCH] pageHeghtAdjust --- hb_client/src/views/bigScreen/index.vue | 29 ++++++++-- hb_client/src/views/mtm/productprocess.vue | 10 ++-- hb_client/src/views/pm/management.vue | 10 +++- hb_client/src/views/pm/plan.vue | 13 ++++- hb_client/src/views/pm/resources.vue | 59 +++++++-------------- hb_client/src/views/procurement/puorder.vue | 1 - hb_client/src/views/procurement/vendor.vue | 3 +- 7 files changed, 66 insertions(+), 59 deletions(-) diff --git a/hb_client/src/views/bigScreen/index.vue b/hb_client/src/views/bigScreen/index.vue index 8a71ee7..30a77ec 100644 --- a/hb_client/src/views/bigScreen/index.vue +++ b/hb_client/src/views/bigScreen/index.vue @@ -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) } } diff --git a/hb_client/src/views/mtm/productprocess.vue b/hb_client/src/views/mtm/productprocess.vue index 9b540f4..bd0e314 100644 --- a/hb_client/src/views/mtm/productprocess.vue +++ b/hb_client/src/views/mtm/productprocess.vue @@ -147,7 +147,7 @@ - + @@ -96,7 +96,7 @@ @pagination="getplanList" /> - +
甘特图
diff --git a/hb_client/src/views/pm/plan.vue b/hb_client/src/views/pm/plan.vue index 908f79c..ebf88e4 100644 --- a/hb_client/src/views/pm/plan.vue +++ b/hb_client/src/views/pm/plan.vue @@ -29,11 +29,12 @@
@@ -141,11 +142,12 @@ @@ -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'; + } }; diff --git a/hb_client/src/views/pm/resources.vue b/hb_client/src/views/pm/resources.vue index d0d9363..701d248 100644 --- a/hb_client/src/views/pm/resources.vue +++ b/hb_client/src/views/pm/resources.vue @@ -21,66 +21,38 @@ stripe highlight-current-row height="100" - v-el-height-adaptive-table="{ bottomOffset: 25 }" + v-el-height-adaptive-table="{ bottomOffset: 44 }" > - - - + - - + - - + - + - + - + - + - + - @@ -194,10 +165,9 @@ fit stripe style="width: 100%" - height="280" + :height="domHeight" > - @@ -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'; + } }; diff --git a/hb_client/src/views/procurement/puorder.vue b/hb_client/src/views/procurement/puorder.vue index 47ae8bd..602e2a4 100644 --- a/hb_client/src/views/procurement/puorder.vue +++ b/hb_client/src/views/procurement/puorder.vue @@ -43,7 +43,6 @@ fit stripe highlight-current-row - max-height="700" height="100" v-el-height-adaptive-table="{ bottomOffset: 43 }" > diff --git a/hb_client/src/views/procurement/vendor.vue b/hb_client/src/views/procurement/vendor.vue index e945868..72a5c9b 100644 --- a/hb_client/src/views/procurement/vendor.vue +++ b/hb_client/src/views/procurement/vendor.vue @@ -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}" >