Browse Source

Merge remote-tracking branch 'origin/master'

master
常熟吴彦祖 2 months ago
parent
commit
62f0f4b0e9
  1. 209
      src/views/modules/dashboard/warehouse-3d-board.vue
  2. 16
      src/views/modules/labelSetting/components/DataSourceDialog.vue

209
src/views/modules/dashboard/warehouse-3d-board.vue

@ -82,32 +82,41 @@
<!-- 托盘数量统计 --> <!-- 托盘数量统计 -->
<div class="pallet-statistics"> <div class="pallet-statistics">
<!-- <div class="pallet-item flat">
<!-- 空托盘总数突出显示 -->
<div class="pallet-total-section">
<div class="pallet-total-item">
<div class="total-icon">📦</div>
<div class="total-info">
<div class="total-label">空托盘总数</div>
<div class="total-value">{{ emptyPalletTotal }}</div>
</div>
</div>
</div>
<!-- 分类明细 -->
<div class="pallet-detail-section">
<div class="detail-items">
<div class="pallet-item flat">
<div class="pallet-icon">📋</div> <div class="pallet-icon">📋</div>
<div class="pallet-info"> <div class="pallet-info">
<div class="pallet-label">平托盘</div> <div class="pallet-label">平托盘</div>
<div class="pallet-value">{{ storageData.flatPallet || 0 }}</div>
<div class="pallet-value">{{ (storageData.emptyContainerInventory && storageData.emptyContainerInventory.flatPallet) || 0 }}</div>
</div> </div>
</div> </div>
<div class="pallet-item guard"> <div class="pallet-item guard">
<div class="pallet-icon">🔲</div> <div class="pallet-icon">🔲</div>
<div class="pallet-info"> <div class="pallet-info">
<div class="pallet-label">围挡托盘</div>
<div class="pallet-value">{{ storageData.guardPallet || 0 }}</div>
<div class="pallet-label">托盘</div>
<div class="pallet-value">{{ (storageData.emptyContainerInventory && storageData.emptyContainerInventory.framePallet) || 0 }}</div>
</div> </div>
</div> </div>
<div class="pallet-item steel"> <div class="pallet-item steel">
<div class="pallet-icon"></div> <div class="pallet-icon"></div>
<div class="pallet-info"> <div class="pallet-info">
<div class="pallet-label">钢托盘</div> <div class="pallet-label">钢托盘</div>
<div class="pallet-value">{{ storageData.steelPallet || 0 }}</div>
<div class="pallet-value">{{ (storageData.emptyContainerInventory && storageData.emptyContainerInventory.steelPallet) || 0 }}</div>
</div>
</div> </div>
</div>-->
<div class="pallet-item other">
<div class="pallet-icon">📦</div>
<div class="pallet-info">
<div class="pallet-label">空托盘</div>
<div class="pallet-value">{{ storageData.emptyPallet || 0 }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -248,13 +257,6 @@
<!-- 底部装饰效果 --> <!-- 底部装饰效果 -->
<div class="bottom-decoration-bar"> <div class="bottom-decoration-bar">
<!-- 流光线条 -->
<div class="glow-lines-container">
<div class="glow-line line-1"></div>
<div class="glow-line line-2"></div>
<div class="glow-line line-3"></div>
</div>
<!-- 浮动数据点 --> <!-- 浮动数据点 -->
<div class="floating-data-points"> <div class="floating-data-points">
<div class="data-point point-1"> <div class="data-point point-1">
@ -312,11 +314,18 @@ export default {
totalSlots: 1960,// totalSlots: 1960,//
usedSlots: 0, usedSlots: 0,
utilizationRate: 0, utilizationRate: 0,
//
materialInventory: {
steelPallet: 0, steelPallet: 0,
guardPallet: 0,
framePallet: 0,
flatPallet: 0
},
//
emptyContainerInventory: {
flatPallet: 0, flatPallet: 0,
emptyPallet:0,
otherPallet: 0
framePallet: 0,
steelPallet: 0
}
}, },
// //
@ -356,6 +365,23 @@ export default {
} }
}, },
computed: {
/**
* 计算空托盘总数
*/
emptyPalletTotal() {
const empty = this.storageData.emptyContainerInventory || {}
return (empty.flatPallet || 0) + (empty.framePallet || 0) + (empty.steelPallet || 0)
},
/**
* 计算可用库位数总库位 - 已使用库位
*/
availableSlots() {
return this.storageData.totalSlots - this.storageData.usedSlots
}
},
mounted() { mounted() {
this.updateTime() this.updateTime()
this.timeInterval = setInterval(this.updateTime, 1000) this.timeInterval = setInterval(this.updateTime, 1000)
@ -395,6 +421,7 @@ export default {
}, },
methods: { methods: {
/** /**
* 处理窗口大小变化 * 处理窗口大小变化
*/ */
@ -479,10 +506,22 @@ export default {
// //
if (message.data.storageData && Object.keys(message.data.storageData).length > 0) { if (message.data.storageData && Object.keys(message.data.storageData).length > 0) {
this.storageData = Object.assign({}, this.storageData, message.data.storageData)
this.storageData.emptyPallet = this.storageData.otherPallet
this.storageData.otherPallet = this.storageData.totalSlots-this.storageData.flatPallet-
this.storageData.guardPallet-this.storageData.steelPallet
//
this.storageData = {
...this.storageData,
...message.data.storageData,
materialInventory: {
...this.storageData.materialInventory,
...(message.data.storageData.materialInventory || {})
},
emptyContainerInventory: {
...this.storageData.emptyContainerInventory,
...(message.data.storageData.emptyContainerInventory || {})
}
}
console.log('[智能立体仓库看板] 库位数据已更新:', this.storageData)
// //
this.$nextTick(() => { this.$nextTick(() => {
this.initStorageChart() this.initStorageChart()
@ -600,16 +639,18 @@ export default {
this.charts.storage = echarts.init(chartDom) this.charts.storage = echarts.init(chartDom)
// legend formatter
const storageData = {
steelPallet: this.storageData.steelPallet || 0,
guardPallet: this.storageData.guardPallet || 0,
flatPallet: this.storageData.flatPallet || 0,
otherPallet: this.storageData.otherPallet || 0
}
//
const materialInventory = this.storageData.materialInventory || {}
const materialSteelPallet = materialInventory.steelPallet || 0
const materialFramePallet = materialInventory.framePallet || 0
const materialFlatPallet = materialInventory.flatPallet || 0
//
const availableSlots = this.availableSlots
// //
console.log('初始化饼图 - 库位数据:', storageData)
console.log('初始化饼图 - 物料盘数据:', { materialSteelPallet, materialFramePallet, materialFlatPallet })
console.log('初始化饼图 - 可用库位:', availableSlots)
console.log('原始storageData:', this.storageData) console.log('原始storageData:', this.storageData)
const option = { const option = {
@ -675,8 +716,8 @@ export default {
}, },
data: [ data: [
{ {
value: storageData.steelPallet,
name: '钢托盘(' + storageData.steelPallet + ')',
value: materialSteelPallet,
name: '钢托盘(' + materialSteelPallet + ')',
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: 'linear',
@ -689,8 +730,8 @@ export default {
} }
}, },
{ {
value: storageData.guardPallet,
name: '围挡托盘(' + storageData.guardPallet + ')',
value: materialFramePallet,
name: '围框托盘(' + materialFramePallet + ')',
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: 'linear',
@ -703,8 +744,8 @@ export default {
} }
}, },
{ {
value: storageData.flatPallet,
name: '平托盘(' + storageData.flatPallet + ')',
value: materialFlatPallet,
name: '平托盘(' + materialFlatPallet + ')',
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: 'linear',
@ -717,8 +758,8 @@ export default {
} }
}, },
{ {
value: storageData.otherPallet,
name: '可用库位数(' + storageData.otherPallet + ')',
value: availableSlots,
name: '可用库位数(' + availableSlots + ')',
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: 'linear',
@ -1672,18 +1713,86 @@ export default {
/* 托盘数量统计样式 */ /* 托盘数量统计样式 */
.pallet-statistics { .pallet-statistics {
display: flex;
flex-direction: column;
gap: 6px;
/* 空托盘总数区域 */
.pallet-total-section {
.pallet-total-item {
padding: 1px 16px;
background: linear-gradient(135deg, rgba(192, 244, 181, 0.15) 0%, rgba(198, 230, 177, 0.15) 100%);
border: 2px solid rgba(255, 215, 0, 0.4);
border-radius: 8px;
display: flex;
align-items: center;
gap: 12px;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
border-color: rgba(255, 215, 0, 0.6);
}
.total-icon {
font-size: 20px;
opacity: 0.95;
}
.total-info {
flex: 1;
display: flex;
justify-content: space-between;
align-items: center;
.total-label {
font-size: 13px;
font-weight: 600;
color: #bded8e;
letter-spacing: 1px;
}
.total-value {
font-size: 20px;
font-weight: bold;
color: #bded8e;
text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}
}
}
}
/* 分类明细区域 */
.pallet-detail-section {
margin-left: 5px;
margin-right: 5px;
.detail-title {
font-size: 11px;
color: #8ab8d6;
margin-bottom: 8px;
padding-left: 4px;
letter-spacing: 0.5px;
opacity: 0.9;
}
.detail-items {
display: flex; display: flex;
gap: 8px; gap: 8px;
}
}
.pallet-item { .pallet-item {
flex: 1; flex: 1;
padding: 6px 8px;
min-width: 100px;
padding: 4px 12px;
background: rgba(25, 50, 85, 0.5); background: rgba(25, 50, 85, 0.5);
border: 1px solid rgba(0, 212, 255, 0.15); border: 1px solid rgba(0, 212, 255, 0.15);
border-radius: 4px;
border-radius: 6px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 6px;
gap: 8px;
transition: all 0.3s ease; transition: all 0.3s ease;
&:hover { &:hover {
@ -1693,7 +1802,7 @@ export default {
} }
.pallet-icon { .pallet-icon {
font-size: 18px;
font-size: 22px;
opacity: 0.9; opacity: 0.9;
} }
@ -1701,16 +1810,16 @@ export default {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 2px;
gap: 4px;
.pallet-label { .pallet-label {
font-size: 10px;
font-size: 11px;
color: #8ab8d6; color: #8ab8d6;
letter-spacing: 0.3px; letter-spacing: 0.3px;
} }
.pallet-value { .pallet-value {
font-size: 15px;
font-size: 17px;
font-weight: bold; font-weight: bold;
color: #fff; color: #fff;
} }
@ -1742,10 +1851,10 @@ export default {
} }
&.other { &.other {
border-left: 2px solid #ffd700;
border-left: 2px solid #b3f38d;
.pallet-value { .pallet-value {
color: #ffd700;
color: #b0ef77;
} }
} }
} }

16
src/views/modules/labelSetting/components/DataSourceDialog.vue

@ -14,22 +14,6 @@
<el-form label-position="top" class="data-source-form"> <el-form label-position="top" class="data-source-form">
<!-- 可选分组显示 --> <!-- 可选分组显示 -->
<template v-if="hasViewGroups"> <template v-if="hasViewGroups">
<!-- 系统变量组 -->
<div class="view-group">
<div class="view-title">系统变量</div>
<div class="checkbox-grid">
<label
v-for="sysVar in systemVariables"
:key="sysVar.fieldName"
class="checkbox-item system-var">
<el-checkbox :label="sysVar.fieldName" v-model="selectedKeys">
<span class="label-inner">
<span class="field-name" :title="sysVar.description">{{ sysVar.displayName }}</span>
</span>
</el-checkbox>
</label>
</div>
</div>
<div <div
v-for="group in viewGroups" v-for="group in viewGroups"
:key="group.viewSource" :key="group.viewSource"

Loading…
Cancel
Save