排产BOM挂载
This commit is contained in:
@@ -138,7 +138,7 @@ export default {
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const option = {
|
||||
tooltip: {
|
||||
@@ -164,6 +164,9 @@ export default {
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '销售数量',
|
||||
@@ -207,6 +210,9 @@ export default {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b}: {c} ({d}%)'
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '销售业绩',
|
||||
|
||||
@@ -44,36 +44,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 原有图表区域(保留兼容性) -->
|
||||
<el-row :gutter="20" class="section-row">
|
||||
<el-col :span="24">
|
||||
<div class="section-title">
|
||||
<h2>原有图表区域</h2>
|
||||
<p>兼容原有的图表展示</p>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 顶部:3 张summary卡片 -->
|
||||
<el-row :gutter="20" class="top-row">
|
||||
<el-col :span="24">
|
||||
<OrderSummary :data-info="orderSummaryData" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 第一行图表 -->
|
||||
<el-row :gutter="20" class="chart-row">
|
||||
<el-col :span="8">
|
||||
<OrderCompletion :completion-rate="orderSummaryData.completionRate" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<ProductSales :product-sales="productSalesData" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<CustomerRegion :customer-data="customerClusterData" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 定时刷新设置抽屉 -->
|
||||
<el-drawer
|
||||
title="定时刷新设置"
|
||||
@@ -98,10 +68,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrderSummary from './components/OrderSummary.vue'
|
||||
import OrderCompletion from './components/OrderCompletion.vue'
|
||||
import ProductSales from './components/ProductSales.vue'
|
||||
import CustomerRegion from './components/CustomerRegion.vue'
|
||||
import PerformanceArea from './components/PerformanceArea.vue'
|
||||
import CurrentSituationArea from './components/CurrentSituationArea.vue'
|
||||
import RecommendationArea from './components/RecommendationArea.vue'
|
||||
@@ -110,10 +76,6 @@ import { getDashboardData } from '@/api/wms/order'
|
||||
export default {
|
||||
name: 'OrderAnalysisDashboard',
|
||||
components: {
|
||||
OrderSummary,
|
||||
OrderCompletion,
|
||||
ProductSales,
|
||||
CustomerRegion,
|
||||
PerformanceArea,
|
||||
CurrentSituationArea,
|
||||
RecommendationArea,
|
||||
@@ -126,14 +88,6 @@ export default {
|
||||
currentSituationArea: {},
|
||||
recommendationArea: {}
|
||||
},
|
||||
// 原有数据结构(保持兼容性)
|
||||
orderSummaryData: {
|
||||
totalOrders: 0,
|
||||
completedThisMonth: 0,
|
||||
completionRate: 0
|
||||
},
|
||||
productSalesData: [],
|
||||
customerClusterData: [],
|
||||
// 新增定时刷新相关数据
|
||||
drawerVisible: false,
|
||||
autoRefresh: false,
|
||||
@@ -164,21 +118,6 @@ export default {
|
||||
recommendationArea: data.recommendationArea || {}
|
||||
}
|
||||
|
||||
// 保持原有数据结构的兼容性
|
||||
this.orderSummaryData = {
|
||||
totalOrders: data.orderSummary?.totalOrderCount || 0,
|
||||
completedThisMonth: data.orderSummary?.monthFinishedOrderCount || 0,
|
||||
completionRate: data.orderSummary?.finishedRate || 0,
|
||||
...data.orderSummary
|
||||
}
|
||||
this.productSalesData = data.productRank || []
|
||||
this.customerClusterData = data.customerRegion || []
|
||||
this.materialAnalysisData = {
|
||||
categories: (data.orderMaterial || []).map(item => item.materialName),
|
||||
usageFrequency: (data.orderMaterial || []).map(item => item.usedCount),
|
||||
stockQuantity: (data.orderMaterial || []).map(item => item.stockCount),
|
||||
purchaseCycle: (data.orderMaterial || []).map(item => item.purchaseCycle)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据看板数据失败:', error)
|
||||
this.$message.error('获取数据失败,请稍后重试')
|
||||
|
||||
Reference in New Issue
Block a user