This commit is contained in:
‘937886381’
2026-01-06 13:48:11 +08:00
parent 20ef2b9763
commit 5605eeab06
287 changed files with 1890 additions and 1381 deletions

View File

@@ -1,9 +1,6 @@
<template>
<div class="coreBar">
<div class="header-row">
<div class="base-title">
各基地情况
</div>
<div class="barTop">
<div class="right-container">
<div class="legend">
@@ -294,11 +291,11 @@ export default {
padding: 12px;
.header-row {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 8px;
display: flex;
justify-content: flex-end; // 左右两端对齐
align-items: center; // 垂直居中
// width: 100%;
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
}
.base-title {

View File

@@ -108,8 +108,8 @@ export default {
*/
getRateFlag(rate) {
if (isNaN(rate) || rate === null || rate === undefined) return 0;
return rate >= 100 ? 1 : 0;
}
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字true→1false→0
},
}
}
</script>

View File

@@ -7,7 +7,7 @@
<div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left" @click="handleDashboardClick('/unitPriceAnalysis/unitPriceAnalysisBase')">
<div class="title">
单价·单位/万元
单价·
</div>
<div class="line">
<operatingSingleBar :detailData="{
@@ -18,7 +18,7 @@
</div>
<div class="dashboard right">
<div class="title">
运费·单位/万元
运费·
</div>
<div class="line">
<operatingSingleBar :detailData="{
@@ -50,6 +50,10 @@ export default {
运费: { completeRate: 0, diff: 0, real: 0, target: 0, thb: 0 },
})
},
dateData: {
type: Object,
default: () => ({})
},
factory: {
type: [String, Number],
default: ''
@@ -90,7 +94,8 @@ export default {
this.$router.push({
path: path,
query: {
factory: this.$route.query.factory ? this.$route.query.factory : this.factory
factory: this.$route.query.factory ? this.$route.query.factory : this.factory,
dateData:this.dateData
}
})
},

View File

@@ -39,7 +39,7 @@
</div>
</div>
<div class="lineBottom" style="height: 100%; width: 100%">
<operatingLineBar :chartData="chartD" style="height: 99%; width: 100%" />
<operatingLineBar :dateData="dateData" :chartData="chartD" style="height: 99%; width: 100%" />
</div>
</div>
</template>
@@ -51,7 +51,7 @@ import * as echarts from 'echarts';
export default {
name: "Container",
components: { operatingLineBar },
props: ["chartData"],
props: ["chartData",'dateData'],
emits: ['sort-change'], // 声明事件Vue3 推荐)
data() {
return {

View File

@@ -120,7 +120,7 @@ export default {
},
// min: 0,
// max: (value) => Math.ceil((value.max || 0) * 1.1),
scale: true,
axisTick: { show: false },
axisLabel: {
color: 'rgba(0, 0, 0, 0.45)',

View File

@@ -117,7 +117,7 @@ export default {
fontSize: 12,
align: 'right'
},
scale: true,
splitNumber: 4,
axisTick: { show: false },
axisLabel: {

View File

@@ -28,7 +28,11 @@ export default {
chartData: {
type: Object,
default: () => ({}),
}
},
dateData: {
type: Object,
default: () => ({}),
},
},
mounted() {
this.$nextTick(() => {
@@ -44,7 +48,7 @@ export default {
},
deep: true,
immediate: true
}
},
},
beforeDestroy() {
// 组件销毁时清理资源
@@ -80,7 +84,8 @@ export default {
path: 'netPriceAnalysisBase',
query: { // 使用query传递参数推荐也可使用params
// baseName: itemName,
factory: baseIndex
factory: baseIndex,
dateData: this.dateData
}
// 若仍需用base作为参数
// base: itemName,
@@ -116,11 +121,11 @@ export default {
}
}
},
grid: {
grid: {
top: 30,
bottom: 30,
right: 70,
left: 40
left: 60
},
xAxis: [
{
@@ -154,7 +159,7 @@ export default {
fontSize: 12,
align: 'right'
},
scale: true,
splitNumber: 4,
axisTick: { show: false },
axisLabel: {

View File

@@ -117,7 +117,7 @@ export default {
fontSize: 12,
align: 'right'
},
scale: true,
splitNumber: 4,
axisTick: { show: false },
axisLabel: {
@@ -146,7 +146,7 @@ export default {
},
splitLine: { show: false },
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
// scale: true,
//
splitNumber: 4,
}
],

View File

@@ -83,11 +83,11 @@ export default {
// return html;
// }
},
grid: {
top: 40,
bottom: 40,
right: 70,
left: 60,
grid: {
top: 30,
bottom: 60,
right: 30,
left: 50,
},
xAxis: [
{
@@ -123,7 +123,7 @@ export default {
type: 'solid' // 实线可选dashed虚线、dotted点线
}
},
scale: true,
splitNumber: 2,
axisTick: { show: false },
axisLabel: {

View File

@@ -30,7 +30,7 @@
background-color: rgba(249, 252, 255, 1);
">
<!-- <top-item /> -->
<operatingBar :chartData="chartData" @sort-change="sortChange" />
<operatingBar :dateData="dateData" :chartData="chartData" @sort-change="sortChange" />
</div>
</div>
</Container>
@@ -51,6 +51,10 @@ export default {
default: () => ({}),
required: true, // 标记为必填,避免空数据导致异常
},
dateData: {
type: Object,
default: () => ({}),
},
},
data() {
return {

View File

@@ -30,7 +30,7 @@
background-color: rgba(249, 252, 255, 1);
">
<!-- <top-item /> -->
<operatingBar :chartData="chartData" @sort-change="sortChange" />
<operatingBar :dateData="dateData" :chartData="chartData" @sort-change="sortChange" />
</div>
</div>
</Container>
@@ -51,6 +51,10 @@ export default {
default: () => ({}),
required: true, // 标记为必填,避免空数据导致异常
},
dateData: {
type: Object,
default: () => ({}),
},
},
data() {
return {

View File

@@ -14,7 +14,7 @@
{{ formatRate(factoryData?.completeRate) }}%
</div>
<div class="mom">
{{ formatRate(factoryData?.thb) }}%
{{ formatRate(factoryData?.thb) }}%
<img v-if="factoryData?.thb >= 0" class="arrow" src="../../../assets/img/topArrow.png" alt="">
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
</div>
@@ -111,8 +111,8 @@ export default {
*/
getRateFlag(rate) {
if (isNaN(rate) || rate === null || rate === undefined) return 0;
return rate >= 100 ? 1 : 0;
}
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字true→1false→0
},
}
}
</script>

View File

@@ -7,7 +7,7 @@
<div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left" @click="handleDashboardClick('/unitPriceAnalysis/unitPriceAnalysisBase')">
<div class="title">
单价·单位/万元
单价·
</div>
<div class="line">
<operatingSingleBar :detailData="{
@@ -18,7 +18,7 @@
</div>
<div class="dashboard right">
<div class="title">
运费·单位/万元
运费·
</div>
<div class="line">
<operatingSingleBar :detailData="{
@@ -50,6 +50,10 @@ export default {
运费: { completeRate: 0, diff: 0, real: 0, target: 0, thb: 0 },
})
},
dateData: {
type: Object,
default: () => ({})
},
factory: {
type: [String, Number],
default: ''
@@ -90,7 +94,8 @@ export default {
this.$router.push({
path: path,
query: {
factory: this.$route.query.factory ? this.$route.query.factory : this.factory
factory: this.$route.query.factory ? this.$route.query.factory : this.factory,
dateData: this.dateData
}
})
},