From ed42221638c0b96d29fbf0394412fcab08883285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 5 Dec 2024 15:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/board/warehouse/fifthFloor.vue | 2 +- .../src/views/board/warehouse/thirdFloor.vue | 81 +++++++++++-------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/hw-ui/src/views/board/warehouse/fifthFloor.vue b/hw-ui/src/views/board/warehouse/fifthFloor.vue index 21a8bf59..71bd3dbe 100644 --- a/hw-ui/src/views/board/warehouse/fifthFloor.vue +++ b/hw-ui/src/views/board/warehouse/fifthFloor.vue @@ -181,7 +181,7 @@ export default { allowPointSelect: false, cursor: 'pointer', depth: 35, - startAngle: 45,y + startAngle: 45, size: 200, dataLabels: { enabled: true, diff --git a/hw-ui/src/views/board/warehouse/thirdFloor.vue b/hw-ui/src/views/board/warehouse/thirdFloor.vue index b9c1523e..91e2093b 100644 --- a/hw-ui/src/views/board/warehouse/thirdFloor.vue +++ b/hw-ui/src/views/board/warehouse/thirdFloor.vue @@ -1,10 +1,13 @@ @@ -143,7 +146,7 @@ export default { monthRawInAmount: [0, 0, 0, 0], monthRawOutAmount: [0, 0, 0, 0] }, - wareHouseData:[], + wareHouseData: [], title: [ '生产计划', '当前库存统计' @@ -168,7 +171,8 @@ export default { singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3 waitTime: 0 }, - scrollTableData: [] + scrollTableData: [], + locationData:{} } }, mounted() { @@ -188,23 +192,32 @@ export default { }) locationStatus().then(e => { console.log(e) + let isUse = e.data.filter(v=> v.containerCode).length + console.log(isUse) + this.locationData = { + isUse:isUse, + notUse:e.data.length - isUse, + isUseRate : ((isUse / e.data.length)*100).toFixed(0), + notUseRate : (((e.data.length - isUse) / e.data.length)*100).toFixed(0) + } + function groupArrayBySize(arr, groupSize) { if (!Array.isArray(arr) || typeof groupSize !== 'number' || groupSize <= 0) { throw new Error('Invalid input') } - const result = []; + const result = [] for (let i = 0; i < arr.length; i += groupSize) { - result.push(arr.slice(i, i + groupSize)); + result.push(arr.slice(i, i + groupSize)) } - return result; + return result } - this.wareHouseData = groupArrayBySize(e.data, 30); + this.wareHouseData = groupArrayBySize(e.data, 30) }) - productCompleteCount().then(e=>{ + productCompleteCount().then(e => { this.$refs.chart1.setData({ grid: { @@ -230,7 +243,7 @@ export default { } }, xAxis: { - data: e.data.map(v => parseTime(v.week,'{m}-{d} {h}:{s}')), + data: e.data.map(v => parseTime(v.week, '{m}-{d} {h}:{s}')), axisLabel: { margin: 10, color: '#ffffff63' @@ -373,7 +386,6 @@ export default { }) }) productPlan().then(e => { - console.log(e) this.scrollTableData = e.data.map(v => { return { taskCode: v.taskCode, @@ -461,7 +473,8 @@ export default { width: 33.3%; height: 32%; } -.wareHouse{ + +.wareHouse { position: absolute; top: 37%; left: 42.4%; @@ -470,11 +483,13 @@ export default { display: flex; flex-direction: column; justify-content: space-between; - .list{ + + .list { width: 100%; display: flex; justify-content: space-between; - .item{ + + .item { display: inline-block; width: 2%; height: 1.5vw;