From 675f3f475a61dd0ad8ffb76e183baa9b78f14f45 Mon Sep 17 00:00:00 2001
From: renmingwang <renmingwang@hnkhzn.com>
Date: 星期一, 30 三月 2026 16:46:31 +0800
Subject: [PATCH] 修改任务下发
---
项目代码/WMS/WIDESEA_WMSClient/src/views/Home.vue | 136 ++++++++++++++++++++++++---------------------
1 files changed, 72 insertions(+), 64 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Home.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Home.vue"
index 371c424..fb0665e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Home.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Home.vue"
@@ -3,7 +3,7 @@
<div class="head">
<h1>WMS绯荤粺鐩戞帶涓績</h1>
<div class="head-actions">
- <el-button type="primary" @click="toggleFullScreen" size="small">
+ <el-button type="primary" @click="toggleFullScreen" size="small" round>
<el-icon><FullScreen /></el-icon>
{{ isFullScreen ? '閫�鍑哄叏灞�' : '鍏ㄥ睆鏄剧ず' }}
</el-button>
@@ -21,39 +21,41 @@
</div>
</div>
<div class="data-center">
- <div class="title">搴撳瓨鏁版嵁</div>
- <div class="center-top-num">
- <div class="item">
- <div class="text">鎬昏揣浣嶆暟閲�</div>
- <div class="num">{{ totalStock }}</div>
- </div>
- <div class="item">
- <div class="text">浠婃棩鍏ュ簱</div>
- <div class="num">{{ todayInbound }}</div>
- </div>
- <div class="item">
- <div class="text">浠婃棩鍑哄簱</div>
- <div class="num">{{ todayOutbound }}</div>
- </div>
- <div class="item">
- <div class="text">鏈懆鍏ュ簱</div>
- <div class="num">{{ weekInbound }}</div>
- </div>
- <div class="item">
- <div class="text">鏈懆鍑哄簱</div>
- <div class="num">{{ weekOutbound }}</div>
- </div>
- <div class="item">
- <div class="text">鏈湀鍏ュ簱</div>
- <div class="num">{{ monthInbound }}</div>
- </div>
- <div class="item">
- <div class="text">鏈湀鍑哄簱</div>
- <div class="num">{{ monthOutbound }}</div>
- </div>
- <div class="item">
- <div class="text">寰呭鐞嗚鍗�</div>
- <div class="num">{{ pendingOrders }}</div>
+ <div class="data-center-item">
+ <div class="title">搴撳瓨鏁版嵁</div>
+ <div class="center-top-num">
+ <div class="item">
+ <div class="text">鎬昏揣浣嶆暟閲�</div>
+ <div class="num">{{ totalLocations }}</div>
+ </div>
+ <div class="item">
+ <div class="text">浠婃棩鍏ュ簱</div>
+ <div class="num">{{ todayInbound }}</div>
+ </div>
+ <div class="item">
+ <div class="text">浠婃棩鍑哄簱</div>
+ <div class="num">{{ todayOutbound }}</div>
+ </div>
+ <div class="item">
+ <div class="text">鏈懆鍏ュ簱</div>
+ <div class="num">{{ weekInbound }}</div>
+ </div>
+ <div class="item">
+ <div class="text">鏈懆鍑哄簱</div>
+ <div class="num">{{ weekOutbound }}</div>
+ </div>
+ <div class="item">
+ <div class="text">鏈湀鍏ュ簱</div>
+ <div class="num">{{ monthInbound }}</div>
+ </div>
+ <div class="item">
+ <div class="text">鏈湀鍑哄簱</div>
+ <div class="num">{{ monthOutbound }}</div>
+ </div>
+ <!-- <div class="item">
+ <div class="text">寰呭鐞嗚鍗�</div>
+ <div class="num">{{ pendingOrders }}</div>
+ </div> -->
</div>
</div>
<div class="data-center-item">
@@ -86,7 +88,7 @@
export default {
setup() {
- const totalStock = ref('0')
+ const totalLocations = ref('0')
const todayInbound = ref('0')
const todayOutbound = ref('0')
const weekInbound = ref('0')
@@ -143,7 +145,7 @@
const fetchData = async () => {
try {
// 鑾峰彇搴撳瓨缁熻鏁版嵁
- const stockStatistics = await http.post('/api/StockInfo/GetStockStatistics', {}, false)
+ const stockStatistics = await http.post('/api/Home/GetDt_TaskHty', {}, false)
console.log('搴撳瓨缁熻鏁版嵁:', stockStatistics)
@@ -151,7 +153,7 @@
if (stockStatistics.status) {
const data = stockStatistics.data;
console.log('搴撳瓨鏁版嵁:', data)
- totalStock.value = data.totalStock ? data.totalStock.toLocaleString() : '0';
+ totalLocations.value = data.totalLocations ? data.totalLocations.toLocaleString() : '0';
todayInbound.value = data.todayInbound ? data.todayInbound.toLocaleString() : '0';
todayOutbound.value = data.todayOutbound ? data.todayOutbound.toLocaleString() : '0';
weekInbound.value = data.weekInbound ? data.weekInbound.toLocaleString() : '0';
@@ -233,9 +235,9 @@
{ value: stockData.warehouseUtilization?.inStock || 0, name: '鏈夎揣' },
{ value: stockData.warehouseUtilization?.free || 0, name: '绌洪棽' },
{ value: stockData.warehouseUtilization?.inStockLock || 0, name: '鏈夎揣閿佸畾' },
- { value: stockData.warehouseUtilization?.lockLocations || 0, name: '閿佸畾' },
- { value: stockData.warehouseUtilization?.freeLock || 0, name: '绌洪棽閿佸畾' },
- { value: stockData.warehouseUtilization?.palletLock || 0, name: '澶ф墭鐩橀攣瀹�' }
+ // { value: stockData.warehouseUtilization?.lockLocations || 0, name: '閿佸畾' },
+ // { value: stockData.warehouseUtilization?.freeLock || 0, name: '绌洪棽閿佸畾' },
+ // { value: stockData.warehouseUtilization?.palletLock || 0, name: '澶ф墭鐩橀攣瀹�' }
]
}]
})
@@ -262,8 +264,8 @@
chartDailyInout.setOption({
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
grid: { left: '0%', top: '10px', right: '0%', bottom: '4%', containLabel: true },
- xAxis: { type: 'category', data: ['08鏃�', '09鏃�', '10鏃�', '11鏃�', '12鏃�', '13鏃�', '14鏃�', '15鏃�', '16鏃�', '17鏃�'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } },
- yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } },
+ xAxis: { type: 'category', data: ['08鏃�', '09鏃�', '10鏃�', '11鏃�', '12鏃�', '13鏃�', '14鏃�', '15鏃�', '16鏃�', '17鏃�'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } },
+ yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } },
series: [
{ name: '鍏ュ簱', type: 'bar', data: [], barWidth: '25%', itemStyle: { normal: { color: '#2f89cf' } } },
{ name: '鍑哄簱', type: 'bar', data: [], barWidth: '25%', itemStyle: { normal: { color: '#46d000' } } }
@@ -275,8 +277,8 @@
chartWeekInout.setOption({
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
grid: { left: '0%', top: '10px', right: '0%', bottom: '4%', containLabel: true },
- xAxis: { type: 'category', data: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄦ棩'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } },
- yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } },
+ xAxis: { type: 'category', data: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄦ棩'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } },
+ yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } },
series: [
{ name: '鍏ュ簱', type: 'bar', data: [], barWidth: '25%', itemStyle: { normal: { color: '#2f89cf' } } },
{ name: '鍑哄簱', type: 'bar', data: [], barWidth: '25%', itemStyle: { normal: { color: '#46d000' } } }
@@ -288,8 +290,8 @@
chartMonthInout.setOption({
tooltip: { trigger: 'axis' },
grid: { left: '0%', top: '10px', right: '0%', bottom: '4%', containLabel: true },
- xAxis: { type: 'category', data: ['01鏃�', '05鏃�', '10鏃�', '15鏃�', '20鏃�', '25鏃�', '30鏃�'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } },
- yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } },
+ xAxis: { type: 'category', data: ['01鏃�', '05鏃�', '10鏃�', '15鏃�', '20鏃�', '25鏃�', '30鏃�'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } },
+ yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } },
series: [
{ name: '鍏ュ簱', type: 'line', data: [], smooth: true, lineStyle: { color: '#2f89cf' }, areaStyle: { color: 'rgba(47, 137, 207, 0.3)' } },
{ name: '鍑哄簱', type: 'line', data: [], smooth: true, lineStyle: { color: '#46d000' }, areaStyle: { color: 'rgba(70, 208, 0, 0.3)' } }
@@ -300,7 +302,7 @@
chartWarehouseUtilization = echarts.init(document.getElementById('chart-warehouse-utilization'))
chartWarehouseUtilization.setOption({
tooltip: { trigger: 'item' },
- legend: { orient: 'vertical', left: 'left' },
+ legend: { orient: 'vertical', left: 'left', textStyle: { color: 'rgba(255,255,255,.8)' } },
series: [
{ name: '璐т綅鐘舵�佸垎甯�', type: 'pie', radius: '60%', data: [], emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } }
]
@@ -308,13 +310,12 @@
// 搴撳瓨鍙樺寲瓒嬪娍
chartStockTrend = echarts.init(document.getElementById('chart-stock-trend'))
- // 鐢熸垚鏈�杩�7澶╃殑杩炵画鏃ユ湡
const recentDays = generateRecentDays()
chartStockTrend.setOption({
tooltip: { trigger: 'axis' },
grid: { left: '0%', top: '10px', right: '0%', bottom: '4%', containLabel: true },
- xAxis: { type: 'category', data: recentDays, axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } },
- yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } },
+ xAxis: { type: 'category', data: recentDays, axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } },
+ yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } },
series: [{ type: 'line', data: [], smooth: true, lineStyle: { color: '#4ecdc4' }, areaStyle: { color: 'rgba(78, 205, 196, 0.3)' } }]
})
}
@@ -343,10 +344,10 @@
// 鍒濆鑾峰彇鏁版嵁
fetchData()
- // 瀹氭椂鍒锋柊鏁版嵁锛屾瘡30绉掓洿鏂颁竴娆�
+
dataTimer = setInterval(() => {
fetchData()
- }, 30000)
+ }, 600000)//鍗佸垎閽熸洿鏂颁竴娆�
})
onUnmounted(() => {
@@ -373,7 +374,7 @@
})
return {
- totalStock,
+ totalLocations,
todayInbound,
todayOutbound,
weekInbound,
@@ -401,7 +402,7 @@
.head {
height: 60px;
display: flex;
- justify-content: space-between;
+ justify-content: center;
align-items: center;
font-size: 24px;
font-weight: bold;
@@ -409,9 +410,12 @@
padding: 0 20px;
box-sizing: border-box;
margin-bottom: 10px;
+ position: relative;
}
-
+
.head-actions {
+ position: absolute;
+ right: 20px;
display: flex;
gap: 10px;
}
@@ -429,11 +433,12 @@
gap: 20px;
.data-left-item {
- height: calc(50% - 10px);
+ flex: 1;
background: rgba(10, 30, 50, 0.6);
- border-radius: 4px;
+ border-radius: 12px;
padding: 10px;
box-sizing: border-box;
+ min-height: 0;
}
}
@@ -444,19 +449,20 @@
gap: 20px;
.center-top-num {
+ flex: 1;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(2, 1fr);
gap: 15px;
- height: calc(50% - 10px);
background: rgba(10, 30, 50, 0.6);
- border-radius: 4px;
+ border-radius: 12px;
padding: 10px;
box-sizing: border-box;
+ min-height: 0;
.item {
background: rgba(10, 40, 70, 0.7);
- border-radius: 4px;
+ border-radius: 12px;
padding: 15px;
box-sizing: border-box;
display: flex;
@@ -479,13 +485,14 @@
}
.data-center-item {
- height: calc(50% - 10px);
+ flex: 1;
background: rgba(10, 30, 50, 0.6);
- border-radius: 4px;
+ border-radius: 12px;
padding: 10px;
box-sizing: border-box;
display: flex;
flex-direction: column;
+ min-height: 0;
> div[id^="chart-"] {
flex: 1;
@@ -502,11 +509,12 @@
gap: 20px;
.data-right-item {
- height: calc(50% - 10px);
+ flex: 1;
background: rgba(10, 30, 50, 0.6);
- border-radius: 4px;
+ border-radius: 12px;
padding: 10px;
box-sizing: border-box;
+ min-height: 0;
}
}
}
--
Gitblit v1.9.3