xiugai
This commit is contained in:
@@ -159,8 +159,8 @@ export default {
|
|||||||
// this.ytdData = res.data.ytd
|
// this.ytdData = res.data.ytd
|
||||||
})
|
})
|
||||||
// getSalesRevenueGroupData({
|
// getSalesRevenueGroupData({
|
||||||
// startTime: this.selectDate.startTime,
|
// startTime: this.dateData.startTime,
|
||||||
// endTime: this.selectDate.endTime,
|
// endTime: this.dateData.endTime,
|
||||||
// sort: this.sort,
|
// sort: this.sort,
|
||||||
// index: undefined,
|
// index: undefined,
|
||||||
// factory: undefined
|
// factory: undefined
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="label-text">月份选择</span>
|
<span class="label-text">月份选择</span>
|
||||||
</div>
|
</div>
|
||||||
<el-date-picker v-model="date" type="month" placeholder="请选择月份" class="custom-date-picker"
|
<el-date-picker :clearable="false" v-model="date" type="month" placeholder="请选择月份" class="custom-date-picker"
|
||||||
style="width: 132px;height: 29px;" @change="emitTimeRange" />
|
style="width: 132px;height: 29px;" @change="emitTimeRange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,7 +45,11 @@ export default {
|
|||||||
name: 'Header',
|
name: 'Header',
|
||||||
props: {
|
props: {
|
||||||
isFullScreen: { type: Boolean, default: false },
|
isFullScreen: { type: Boolean, default: false },
|
||||||
topTitle: { type: String, default: '' }
|
topTitle: { type: String, default: '' },
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: {} // 默认值设为350px
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -162,6 +166,19 @@ export default {
|
|||||||
this.date = undefined;
|
this.date = undefined;
|
||||||
// this.emitTimeRange();
|
// this.emitTimeRange();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
dateData: {
|
||||||
|
immediate: true, // 初始化时立即执行
|
||||||
|
handler(newVal) {
|
||||||
|
if (newVal && (newVal.startTime || newVal.endTime)) {
|
||||||
|
// 优先使用 startTime 转换为月份格式
|
||||||
|
const timeStamp = newVal.startTime || newVal.endTime;
|
||||||
|
if (timeStamp !== 0) {
|
||||||
|
const monthStr = moment(timeStamp).format('YYYY-MM');
|
||||||
|
this.date = monthStr; // 赋值给选择器
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export default {
|
|||||||
nameTextStyle: { color: 'rgba(255,255,255,0.7)', fontSize: 14, align: 'left' },
|
nameTextStyle: { color: 'rgba(255,255,255,0.7)', fontSize: 14, align: 'left' },
|
||||||
min: () => 0,
|
min: () => 0,
|
||||||
max: (value) => Math.ceil(value.max),
|
max: (value) => Math.ceil(value.max),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: { color: 'rgba(255,255,255,0.7)', fontSize: 12 },
|
axisLabel: { color: 'rgba(255,255,255,0.7)', fontSize: 12 },
|
||||||
splitLine: { lineStyle: { color: 'RGBA(24, 88, 100, 0.6)', type: 'dashed' } },
|
splitLine: { lineStyle: { color: 'RGBA(24, 88, 100, 0.6)', type: 'dashed' } },
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "Container",
|
name: "Container",
|
||||||
components: {},
|
components: {},
|
||||||
props: ["purchase"],
|
props: ["purchase",'dateData'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
itemList: []
|
itemList: []
|
||||||
@@ -62,7 +62,10 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
handleRoute(path) {
|
handleRoute(path) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:path
|
path: path,
|
||||||
|
query: {
|
||||||
|
dateData: this.dateData
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
transformData(rawData) {
|
transformData(rawData) {
|
||||||
@@ -114,7 +117,9 @@ export default {
|
|||||||
background: #f9fcff;
|
background: #f9fcff;
|
||||||
padding: 12px 12px 0 12px;
|
padding: 12px 12px 0 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0px 4px 12px 2px #B5CDE5;
|
||||||
|
}
|
||||||
.unit {
|
.unit {
|
||||||
height: 18px;
|
height: 18px;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Container name="采购重点指标" nameTwo="存货重点指标" icon="cockpitItemIcon" size="bottomBasic">
|
<Container name="采购重点指标" nameTwo="存货重点指标" icon="cockpitItemIcon" size="bottomBasic">
|
||||||
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
||||||
<div class="bottom-left-content" style="display: flex;gap: 9px;padding: 14px 16px;">
|
<div class="bottom-left-content" style="display: flex;gap: 9px;padding: 14px 16px;">
|
||||||
<coreBottomLeftItem :purchase="purchase">
|
<coreBottomLeftItem :dateData="dateData" :purchase="purchase">
|
||||||
</coreBottomLeftItem>
|
</coreBottomLeftItem>
|
||||||
<div class="content-right" style="background: #F9FCFF;padding: 15px 12px;">
|
<div class="content-right" style="background: #F9FCFF;padding: 15px 12px;">
|
||||||
<base-table style="height: 180px;width: 260px;" :page="1" :limit="10" :show-index="true" :beilv="1"
|
<base-table style="height: 180px;width: 260px;" :page="1" :limit="10" :show-index="true" :beilv="1"
|
||||||
@@ -29,6 +29,10 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => {} // 默认空数组,避免报错
|
default: () => {} // 默认空数组,避免报错
|
||||||
},
|
},
|
||||||
|
dateData: { // 接收父组件传递的设备数据数组
|
||||||
|
type: Object,
|
||||||
|
default: () => { } // 默认空数组,避免报错
|
||||||
|
},
|
||||||
inventory: { // 恢复生产概览数据(原代码注释了,需根据实际需求保留)
|
inventory: { // 恢复生产概览数据(原代码注释了,需根据实际需求保留)
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default {
|
|||||||
label: { backgroundColor: '#6a7985' }
|
label: { backgroundColor: '#6a7985' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: { top: 10, bottom: 20, right: 25, left: 70 },
|
grid: { top: 35, bottom: 20, right: 25, left: 70 },
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
@@ -119,10 +119,12 @@ export default {
|
|||||||
],
|
],
|
||||||
yAxis: {
|
yAxis: {
|
||||||
// type: 'value',
|
// type: 'value',
|
||||||
nameTextStyle: { color: 'rgba(0, 0, 0, 0.45)', fontSize: 14, align: 'left' },
|
name: '元/㎡',
|
||||||
|
// nameLocation:'center',
|
||||||
|
nameTextStyle: { color: 'rgba(0, 0, 0, 0.45)', fontSize: 14, align: 'right' },
|
||||||
// min: () => 0,
|
// min: () => 0,
|
||||||
// max: (value) => Math.ceil(value.max),
|
// max: (value) => Math.ceil(value.max),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: { color: 'rgba(0, 0, 0, 0.45)', fontSize: 12 },
|
axisLabel: { color: 'rgba(0, 0, 0, 0.45)', fontSize: 12 },
|
||||||
splitLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
splitLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
||||||
|
|||||||
@@ -41,7 +41,11 @@ export default {
|
|||||||
cost: { // 接收父组件传递的 cost 数据对象
|
cost: { // 接收父组件传递的 cost 数据对象
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
}
|
},
|
||||||
|
dateData: { // 接收父组件传递的 cost 数据对象
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -65,7 +69,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: path,
|
path: path,
|
||||||
query: {
|
query: {
|
||||||
factory: this.$route.query.factory ? this.$route.query.factory : 5
|
factory: this.$route.query.factory ? this.$route.query.factory : 5,
|
||||||
|
dateData: this.dateData
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -134,7 +139,10 @@ export default {
|
|||||||
background: #f9fcff;
|
background: #f9fcff;
|
||||||
padding: 12px 0px 17px 12px;
|
padding: 12px 0px 17px 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0px 4px 12px 2px #B5CDE5;
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
.unit {
|
.unit {
|
||||||
height: 18px;
|
height: 18px;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="activeTab === 'inventory'">
|
<template v-else-if="activeTab === 'inventory'">
|
||||||
<!-- 存货重点指标对应的内容 -->
|
<!-- 存货重点指标对应的内容 -->
|
||||||
<costItem :cost="cost"></costItem>
|
<costItem :dateData="dateData" :cost="cost"></costItem>
|
||||||
<div class="bottom"
|
<div class="bottom"
|
||||||
style="display: flex; width: 100%;margin-top: 8px;background-color: rgba(249, 252, 255, 1);">
|
style="display: flex; width: 100%;margin-top: 8px;background-color: rgba(249, 252, 255, 1);">
|
||||||
<CostsBottomBar :line="cost.line" :dateData="dateData">
|
<CostsBottomBar :line="cost.line" :dateData="dateData">
|
||||||
@@ -144,7 +144,7 @@ export default {
|
|||||||
nameTextStyle: { color: 'rgba(255,255,255,0.7)', fontSize: 14, align: 'left' },
|
nameTextStyle: { color: 'rgba(255,255,255,0.7)', fontSize: 14, align: 'left' },
|
||||||
min: 0,
|
min: 0,
|
||||||
max: (value) => Math.ceil(value.max),
|
max: (value) => Math.ceil(value.max),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: { color: 'rgba(255,255,255,0.7)', fontSize: 12 },
|
axisLabel: { color: 'rgba(255,255,255,0.7)', fontSize: 12 },
|
||||||
splitLine: { lineStyle: { color: 'RGBA(24, 88, 100, 0.6)', type: 'dashed' } },
|
splitLine: { lineStyle: { color: 'RGBA(24, 88, 100, 0.6)', type: 'dashed' } },
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
tableProps: [
|
tableProps: [
|
||||||
{ prop: 'name', label: '攻坚指标', align: 'center' },
|
{ prop: 'name', label: '攻坚指标', align: 'center' },
|
||||||
{ prop: 'target', label: '攻坚目标', align: 'center' },
|
{ prop: 'target', label: '攻坚预算', align: 'center' },
|
||||||
{ prop: 'monthlyActual', label: '当月实际', align: 'center' },
|
{ prop: 'monthlyActual', label: '当月实际', align: 'center' },
|
||||||
{ prop: 'accumulated', label: '累计', align: 'center', subcomponent: finishDiv },
|
{ prop: 'accumulated', label: '累计', align: 'center', subcomponent: finishDiv },
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -46,7 +46,11 @@ export default {
|
|||||||
leftMargin: {
|
leftMargin: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: '350px' // 默认值设为350px
|
default: '350px' // 默认值设为350px
|
||||||
}
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: {} // 默认值设为350px
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -75,11 +79,26 @@ export default {
|
|||||||
this.date = undefined;
|
this.date = undefined;
|
||||||
// this.emitTimeRange();
|
// this.emitTimeRange();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
dateData: {
|
||||||
|
immediate: true, // 初始化时立即执行
|
||||||
|
handler(newVal) {
|
||||||
|
console.log('newVal', newVal);
|
||||||
|
|
||||||
|
if (newVal && (newVal.startTime || newVal.endTime)) {
|
||||||
|
// 优先使用 startTime 转换为月份格式
|
||||||
|
const timeStamp = newVal.startTime || newVal.endTime;
|
||||||
|
if (timeStamp !== 0) {
|
||||||
|
const monthStr = moment(timeStamp).format('YYYY-MM');
|
||||||
|
this.date = monthStr; // 赋值给选择器
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 初始化默认日期(当前月,格式:yyyy-MM)
|
// 初始化默认日期(当前月,格式:yyyy-MM)
|
||||||
console.log(this.$router);
|
// console.log(this.$router);
|
||||||
this.date = moment().format('YYYY-MM');
|
this.date = moment().format('YYYY-MM');
|
||||||
this.$nextTick(() => this.emitTimeRange());
|
this.$nextTick(() => this.emitTimeRange());
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@@ -144,7 +144,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: { show: false },
|
splitLine: { show: false },
|
||||||
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -31,7 +31,9 @@
|
|||||||
<div class="yield" style="display: flex;justify-content: space-between;">
|
<div class="yield" style="display: flex;justify-content: space-between;">
|
||||||
<div class="progress-percent">完成率</div>
|
<div class="progress-percent">完成率</div>
|
||||||
<!-- 百分比颜色动态绑定 -->
|
<!-- 百分比颜色动态绑定 -->
|
||||||
<div class="progress-percent">
|
<div class="progress-percent" :style="{
|
||||||
|
color: getColor(itemList[0].currentValue, itemList[0].targetValue)
|
||||||
|
}">
|
||||||
{{ itemList[0].progress }}%
|
{{ itemList[0].progress }}%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 20,
|
top: 35,
|
||||||
bottom: 20,
|
bottom: 20,
|
||||||
right: 25,
|
right: 25,
|
||||||
},
|
},
|
||||||
@@ -140,14 +140,12 @@ export default {
|
|||||||
],
|
],
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
nameTextStyle: {
|
name: '元/㎡',
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
// nameLocation:'center',
|
||||||
fontSize: 14,
|
nameTextStyle: { color: 'rgba(0, 0, 0, 0.45)', fontSize: 14, align: 'right' },
|
||||||
align: 'left'
|
|
||||||
},
|
|
||||||
min: 0,
|
min: 0,
|
||||||
// max: function (value) { return Math.ceil(value.max * 1.1); }, // 增加一点余量
|
// max: function (value) { return Math.ceil(value.max * 1.1); }, // 增加一点余量
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
path: route,
|
path: route,
|
||||||
query: {
|
query: {
|
||||||
// 关键修复4:dateData是对象,需序列化后传递(否则路由query无法正常接收对象)
|
// 关键修复4:dateData是对象,需序列化后传递(否则路由query无法正常接收对象)
|
||||||
dateData: JSON.stringify(this.dateData)
|
dateData: this.dateData
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: 252px;
|
width: 253px;
|
||||||
height: 110px;
|
height: 110px;
|
||||||
background: #f9fcff;
|
background: #f9fcff;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
|||||||
@@ -181,10 +181,16 @@ export default {
|
|||||||
|
|
||||||
.coreItem> :nth-child(4) {
|
.coreItem> :nth-child(4) {
|
||||||
grid-area: item4;
|
grid-area: item4;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0px 4px 12px 2px #B5CDE5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coreItem> :nth-child(5) {
|
.coreItem> :nth-child(5) {
|
||||||
grid-area: item5;
|
grid-area: item5;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0px 4px 12px 2px #B5CDE5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: (value) => value.max > 0 ? Math.ceil(value.max * 1.1) : 100, // 留10%余量
|
// max: (value) => value.max > 0 ? Math.ceil(value.max * 1.1) : 100, // 留10%余量
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader top-title="费用分析" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
<ReportHeader :dateData="dateData" top-title="费用分析" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
||||||
@timeRangeChange="handleTimeChange" />
|
@timeRangeChange="handleTimeChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns:1624px;
|
grid-template-columns:1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChart :monthData="monthData" />
|
<operatingLineChart :dateData="dateData" :monthData="monthData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChartCumulative :ytdData="ytdData" />
|
<operatingLineChartCumulative :dateData="dateData" :ytdData="ytdData" />
|
||||||
<!-- <keyWork /> -->
|
<!-- <keyWork /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
beilv: 1,
|
beilv: 1,
|
||||||
value: 100,
|
value: 100,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
selectDate: {},
|
dateData: {},
|
||||||
monthData: {},
|
monthData: {},
|
||||||
ytdData: {},
|
ytdData: {},
|
||||||
};
|
};
|
||||||
@@ -137,12 +137,13 @@ export default {
|
|||||||
this.beilv = _this.clientWidth / 1920;
|
this.beilv = _this.clientWidth / 1920;
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
getExpenseAnalysisGroupData({
|
getExpenseAnalysisGroupData({
|
||||||
startTime: this.selectDate.startTime,
|
startTime: this.dateData.startTime,
|
||||||
endTime: this.selectDate.endTime,
|
endTime: this.dateData.endTime,
|
||||||
sort: this.sort,
|
sort: this.sort,
|
||||||
index: undefined,
|
index: undefined,
|
||||||
factory: undefined
|
factory: undefined
|
||||||
@@ -161,7 +162,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
console.log(obj, 'obj');
|
console.log(obj, 'obj');
|
||||||
this.selectDate = obj
|
this.dateData= obj
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="基地费用分析" :is-full-screen="isFullScreen"
|
<ReportHeader :dateData="dateData" size="psi" @timeRangeChange="handleTimeChange" top-title="基地费用分析" :is-full-screen="isFullScreen"
|
||||||
@screenfullChange="screenfullChange" />
|
@screenfullChange="screenfullChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
margin-top: -20px;
|
margin-top: -20px;
|
||||||
@@ -186,6 +186,7 @@ export default {
|
|||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ export default {
|
|||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
// mounted() {
|
||||||
this.processTrendData(this.trend);
|
// this.processTrendData(this.trend);
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
this.$emit("handleChange", value);
|
this.$emit("handleChange", value);
|
||||||
@@ -76,9 +76,9 @@ export default {
|
|||||||
*/
|
*/
|
||||||
processTrendData(trendData) {
|
processTrendData(trendData) {
|
||||||
// 数据兜底:确保是数组且长度为12
|
// 数据兜底:确保是数组且长度为12
|
||||||
const validTrend = Array.isArray(trendData) && trendData.length === 12
|
const validTrend = Array.isArray(trendData)
|
||||||
? trendData
|
? trendData
|
||||||
: this.$props.trend.default();
|
: {}
|
||||||
|
|
||||||
// 初始化空数组
|
// 初始化空数组
|
||||||
const months = [];
|
const months = [];
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<div class="coreBar">
|
<div class="coreBar">
|
||||||
<!-- 新增行容器:包裹“各基地情况”和barTop -->
|
<!-- 新增行容器:包裹“各基地情况”和barTop -->
|
||||||
<div class="header-row">
|
<div class="header-row">
|
||||||
<div class="base-title">
|
|
||||||
各基地情况
|
|
||||||
</div>
|
|
||||||
<div class="barTop">
|
<div class="barTop">
|
||||||
<!-- 关键:新增右侧容器,包裹图例和按钮组,实现整体靠右 -->
|
<!-- 关键:新增右侧容器,包裹图例和按钮组,实现整体靠右 -->
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
@@ -263,9 +260,9 @@ export default {
|
|||||||
// 新增:头部行容器,实现一行排列
|
// 新增:头部行容器,实现一行排列
|
||||||
.header-row {
|
.header-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between; // 左右两端对齐
|
justify-content: flex-end; // 左右两端对齐
|
||||||
align-items: center; // 垂直居中
|
align-items: center; // 垂直居中
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
|
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,7 +284,6 @@ export default {
|
|||||||
// 保留原有align-items,确保内部元素垂直居中
|
// 保留原有align-items,确保内部元素垂直居中
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
|
|
||||||
// 1. 右侧容器:包裹图例和按钮组,整体靠右
|
// 1. 右侧容器:包裹图例和按钮组,整体靠右
|
||||||
.right-container {
|
.right-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<!-- 管理费用模块 -->
|
<!-- 管理费用模块 -->
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
管理费用·单位/万元
|
管理费用·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="manageCostData"></operatingSingleBar>
|
<operatingSingleBar :detailData="manageCostData"></operatingSingleBar>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<!-- 销售费用模块 -->
|
<!-- 销售费用模块 -->
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
销售费用·单位/万元
|
销售费用·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="saleCostData"></operatingSingleBar>
|
<operatingSingleBar :detailData="saleCostData"></operatingSingleBar>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<!-- 财务费用模块 -->
|
<!-- 财务费用模块 -->
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
财务费用·单位/万元
|
财务费用·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="financeCostData"></operatingSingleBar>
|
<operatingSingleBar :detailData="financeCostData"></operatingSingleBar>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBottom" style="height: 100%; width: 100%">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,7 +51,7 @@ import * as echarts from 'echarts';
|
|||||||
export default {
|
export default {
|
||||||
name: "Container",
|
name: "Container",
|
||||||
components: { operatingLineBar },
|
components: { operatingLineBar },
|
||||||
props: ["chartData"],
|
props: ["chartData",'dateData'],
|
||||||
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -28,7 +28,11 @@ export default {
|
|||||||
chartData: {
|
chartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
}
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -80,7 +84,8 @@ export default {
|
|||||||
path: 'expenseAnalysisBase',
|
path: 'expenseAnalysisBase',
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
query: { // 使用query传递参数(推荐),也可使用params
|
||||||
// baseName: itemName,
|
// baseName: itemName,
|
||||||
factory: baseIndex
|
factory: baseIndex,
|
||||||
|
dateData: this.dateData
|
||||||
}
|
}
|
||||||
// 若仍需用base作为参数:
|
// 若仍需用base作为参数:
|
||||||
// base: itemName,
|
// base: itemName,
|
||||||
@@ -116,11 +121,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 30,
|
top: 30,
|
||||||
bottom: 30,
|
bottom: 30,
|
||||||
right: 70,
|
right: 70,
|
||||||
left: 40
|
left: 60
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -154,7 +159,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: { show: false },
|
splitLine: { show: false },
|
||||||
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 2,
|
splitNumber: 2,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
background-color: rgba(249, 252, 255, 1);
|
background-color: rgba(249, 252, 255, 1);
|
||||||
">
|
">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<operatingBar :chartData="chartData" @sort-change="sortChange" />
|
<operatingBar :dateData="dateData" :chartData="chartData" @sort-change="sortChange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -56,8 +56,11 @@ export default {
|
|||||||
target: 0
|
target: 0
|
||||||
},
|
},
|
||||||
factory: []
|
factory: []
|
||||||
}),
|
})
|
||||||
required: true
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
background-color: rgba(249, 252, 255, 1);
|
background-color: rgba(249, 252, 255, 1);
|
||||||
">
|
">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<operatingBar @sort-change="sortChange" :chartData="chartData" />
|
<operatingBar :dateData="dateData" @sort-change="sortChange" :chartData="chartData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -53,6 +53,10 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
{{ ytdData?.rate || 0 }}%
|
{{ ytdData?.rate || 0 }}%
|
||||||
</div>
|
</div>
|
||||||
<div class="mom">
|
<div class="mom">
|
||||||
环比{{ ytdData?.yoyRate || 0 }}%
|
同比{{ ytdData?.yoyRate || 0 }}%
|
||||||
<img v-if="ytdData?.yoyRate >= 0" class="arrow" src="../../../assets/img/topArrow.png" alt="">
|
<img v-if="ytdData?.yoyRate >= 0" class="arrow" src="../../../assets/img/topArrow.png" alt="">
|
||||||
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
|
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default {
|
|||||||
// boundaryGap: [10, 0], // 可根据需要开启,控制轴的留白
|
// boundaryGap: [10, 0], // 可根据需要开启,控制轴的留白
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
min: 0,
|
min: 0,
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<!-- 管理费用模块 -->
|
<!-- 管理费用模块 -->
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
管理费用·单位/万元
|
管理费用·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="manageCostData"></operatingSingleBar>
|
<operatingSingleBar :detailData="manageCostData"></operatingSingleBar>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<!-- 销售费用模块 -->
|
<!-- 销售费用模块 -->
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
销售费用·单位/万元
|
销售费用·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="saleCostData"></operatingSingleBar>
|
<operatingSingleBar :detailData="saleCostData"></operatingSingleBar>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<!-- 财务费用模块 -->
|
<!-- 财务费用模块 -->
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
财务费用·单位/万元
|
财务费用·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="financeCostData"></operatingSingleBar>
|
<operatingSingleBar :detailData="financeCostData"></operatingSingleBar>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader top-title="全成本分析" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
<ReportHeader :dateData="dateData" top-title="全成本分析" :is-full-screen="isFullScreen"
|
||||||
@timeRangeChange="handleTimeChange" />
|
@screenfullChange="screenfullChange" @timeRangeChange="handleTimeChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns:1624px;
|
grid-template-columns:1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChart :thisMonData="thisMonData" />
|
<operatingLineChart :dateData="dateData" :thisMonData="thisMonData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChartCumulative :totalData="totalData" />
|
<operatingLineChartCumulative :dateData="dateData" :totalData="totalData" />
|
||||||
<!-- <keyWork /> -->
|
<!-- <keyWork /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,7 +68,7 @@ export default {
|
|||||||
timer: null,
|
timer: null,
|
||||||
beilv: 1,
|
beilv: 1,
|
||||||
value: 100,
|
value: 100,
|
||||||
selectDate: {},
|
dateData: {},
|
||||||
thisMonData: {},
|
thisMonData: {},
|
||||||
totalData: {},
|
totalData: {},
|
||||||
};
|
};
|
||||||
@@ -136,14 +136,15 @@ export default {
|
|||||||
this.beilv = _this.clientWidth / 1920;
|
this.beilv = _this.clientWidth / 1920;
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData(obj) {
|
getData(obj) {
|
||||||
getUnitPriceAnalysisGroupData({
|
getUnitPriceAnalysisGroupData({
|
||||||
startTime: this.selectDate.startTime,
|
startTime: this.dateData.startTime,
|
||||||
endTime: this.selectDate.endTime,
|
endTime: this.dateData.endTime,
|
||||||
paramName: '全成本'
|
paramName: '全成本'
|
||||||
// timeDim: this.selectDate.mode
|
// timeDim: this.dateData.mode
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.thisMonData = res.data.thisMonData
|
this.thisMonData = res.data.thisMonData
|
||||||
@@ -158,7 +159,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
// console.log(obj, 'obj');
|
// console.log(obj, 'obj');
|
||||||
this.selectDate = obj
|
this.dateData= obj
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="基地全成本分析" :is-full-screen="isFullScreen"
|
<ReportHeader :dateData="dateData" size="psi" @timeRangeChange="handleTimeChange" top-title="基地全成本分析"
|
||||||
@screenfullChange="screenfullChange" />
|
:is-full-screen="isFullScreen" @screenfullChange="screenfullChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
margin-top: -20px;
|
margin-top: -20px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -37,7 +37,8 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<relatedIndicatorsAnalysis :factory="factory" :relatedData="relatedData" :title="'相关指标分析·单位/万元'" />
|
<relatedIndicatorsAnalysis :dateData="dateData" :factory="factory" :relatedData="relatedData"
|
||||||
|
:title="'相关指标分析'" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -173,7 +174,8 @@ export default {
|
|||||||
this.beilv = _this.clientWidth / 1920;
|
this.beilv = _this.clientWidth / 1920;
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<div class="coreBar">
|
<div class="coreBar">
|
||||||
<!-- 新增行容器:包裹“各基地情况”和barTop -->
|
<!-- 新增行容器:包裹“各基地情况”和barTop -->
|
||||||
<div class="header-row">
|
<div class="header-row">
|
||||||
<div class="base-title">
|
|
||||||
各基地情况
|
|
||||||
</div>
|
|
||||||
<div class="barTop">
|
<div class="barTop">
|
||||||
<!-- 关键:新增右侧容器,包裹图例和按钮组,实现整体靠右 -->
|
<!-- 关键:新增右侧容器,包裹图例和按钮组,实现整体靠右 -->
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
@@ -298,10 +295,10 @@ export default {
|
|||||||
// 新增:头部行容器,实现一行排列
|
// 新增:头部行容器,实现一行排列
|
||||||
.header-row {
|
.header-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between; // 左右两端对齐
|
justify-content: flex-end; // 左右两端对齐
|
||||||
align-items: center; // 垂直居中
|
align-items: center; // 垂直居中
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
|
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)整)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 各基地情况标题样式
|
// 各基地情况标题样式
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ export default {
|
|||||||
*/
|
*/
|
||||||
getRateFlag(rate) {
|
getRateFlag(rate) {
|
||||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
return rate >= 100 ? 1 : 0;
|
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="topItem-container" style="display: flex; gap: 8px;">
|
<div class="topItem-container" style="display: flex; gap: 8px;">
|
||||||
<div class="dashboard left">
|
<div class="dashboard left">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
销量·单位/万元
|
销量·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar></operatingSingleBar>
|
<operatingSingleBar></operatingSingleBar>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dashboard right">
|
<div class="dashboard right">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
单价·单位/万元
|
单价·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar></operatingSingleBar>
|
<operatingSingleBar></operatingSingleBar>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBottom" style="height: 100%; width: 100%">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,7 +51,7 @@ import * as echarts from 'echarts';
|
|||||||
export default {
|
export default {
|
||||||
name: "Container",
|
name: "Container",
|
||||||
components: { operatingLineBar },
|
components: { operatingLineBar },
|
||||||
props: ["chartData"],
|
props: ["chartData", 'dateData'],
|
||||||
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -28,7 +28,11 @@ export default {
|
|||||||
chartData: {
|
chartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
}
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -80,7 +84,8 @@ export default {
|
|||||||
path: 'fullCostAnalysisBase',
|
path: 'fullCostAnalysisBase',
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
query: { // 使用query传递参数(推荐),也可使用params
|
||||||
// baseName: itemName,
|
// baseName: itemName,
|
||||||
factory: baseIndex
|
factory: baseIndex,
|
||||||
|
dateData: this.dateData
|
||||||
}
|
}
|
||||||
// 若仍需用base作为参数:
|
// 若仍需用base作为参数:
|
||||||
// base: itemName,
|
// base: itemName,
|
||||||
@@ -116,11 +121,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 30,
|
top: 30,
|
||||||
bottom: 30,
|
bottom: 30,
|
||||||
right: 70,
|
right: 70,
|
||||||
left: 40
|
left: 60
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -154,7 +159,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: { show: false },
|
splitLine: { show: false },
|
||||||
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ export default {
|
|||||||
// return html;
|
// return html;
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 40,
|
top: 30,
|
||||||
bottom: 40,
|
bottom: 60,
|
||||||
right: 70,
|
right: 30,
|
||||||
left: 60,
|
left: 50,
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 2,
|
splitNumber: 2,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
background-color: rgba(249, 252, 255, 1);
|
background-color: rgba(249, 252, 255, 1);
|
||||||
">
|
">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<operatingBar :chartData="chartData" @sort-change="sortChange" />
|
<operatingBar :dateData="dateData" :chartData="chartData" @sort-change="sortChange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -51,6 +51,10 @@ export default {
|
|||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
required: true, // 标记为必填,避免空数据导致异常
|
required: true, // 标记为必填,避免空数据导致异常
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
background-color: rgba(249, 252, 255, 1);
|
background-color: rgba(249, 252, 255, 1);
|
||||||
">
|
">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<operatingBar :chartData="chartData" @sort-change="sortChange" />
|
<operatingBar :dateData="dateData" :chartData="chartData" @sort-change="sortChange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -51,6 +51,10 @@ export default {
|
|||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
required: true, // 标记为必填,避免空数据导致异常
|
required: true, // 标记为必填,避免空数据导致异常
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<div class="dashboard left"
|
<div class="dashboard left"
|
||||||
@click="handleDashboardClick('/productionCostAnalysis/productionCostAnalysisBase')">
|
@click="handleDashboardClick('/productionCostAnalysis/productionCostAnalysisBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
制造成本·单位/万元
|
制造成本·元/㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar :detailData="{
|
<operatingSingleBar :detailData="{
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dashboard right" @click="handleDashboardClick('/expenseAnalysis/expenseAnalysisBase')">
|
<div class="dashboard right" @click="handleDashboardClick('/expenseAnalysis/expenseAnalysisBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
财务费用·单位/万元
|
财务费用·元/㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar :detailData="{
|
<operatingSingleBar :detailData="{
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dashboard right" @click="handleDashboardClick('/expenseAnalysis/expenseAnalysisBase')">
|
<div class="dashboard right" @click="handleDashboardClick('/expenseAnalysis/expenseAnalysisBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
销售费用·单位/万元
|
销售费用·元/㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar :detailData="{
|
<operatingSingleBar :detailData="{
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dashboard right" @click="handleDashboardClick('/expenseAnalysis/expenseAnalysisBase')">
|
<div class="dashboard right" @click="handleDashboardClick('/expenseAnalysis/expenseAnalysisBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
管理费用·单位/万元
|
管理费用·元/㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar :detailData="{
|
<operatingSingleBar :detailData="{
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dashboard right">
|
<div class="dashboard right">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
运费·单位/万元
|
运费·元/㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar :detailData="{
|
<operatingSingleBar :detailData="{
|
||||||
@@ -85,6 +85,10 @@ export default {
|
|||||||
relatedTotal: {} // 兜底累计数据
|
relatedTotal: {} // 兜底累计数据
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
factory: {
|
factory: {
|
||||||
type: [Number,String],
|
type: [Number,String],
|
||||||
default: ''
|
default: ''
|
||||||
@@ -136,7 +140,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: path,
|
path: path,
|
||||||
query: {
|
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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
{{ formatRate(factoryData?.completeRate) }}%
|
{{ formatRate(factoryData?.completeRate) }}%
|
||||||
</div>
|
</div>
|
||||||
<div class="mom">
|
<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-if="factoryData?.thb >= 0" class="arrow" src="../../../assets/img/topArrow.png" alt="">
|
||||||
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
|
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
@@ -111,8 +111,8 @@ export default {
|
|||||||
*/
|
*/
|
||||||
getRateFlag(rate) {
|
getRateFlag(rate) {
|
||||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
return rate >= 100 ? 1 : 0;
|
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="topItem-container" style="display: flex; gap: 8px;">
|
<div class="topItem-container" style="display: flex; gap: 8px;">
|
||||||
<div class="dashboard left">
|
<div class="dashboard left">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
销量·单位/万元
|
销量·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar></operatingSingleBar>
|
<operatingSingleBar></operatingSingleBar>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dashboard right">
|
<div class="dashboard right">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
单价·单位/万元
|
单价·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar></operatingSingleBar>
|
<operatingSingleBar></operatingSingleBar>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader top-title="毛利率" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
<ReportHeader :dateData="dateData" top-title="毛利率" :is-full-screen="isFullScreen"
|
||||||
@timeRangeChange="handleTimeChange" />
|
@screenfullChange="screenfullChange" @timeRangeChange="handleTimeChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns:1624px;
|
grid-template-columns:1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChart :monthData="monthData" />
|
<operatingLineChart :dateData="dateData" :monthData="monthData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChartCumulative :ytdData="ytdData" />
|
<operatingLineChartCumulative :dateData="dateData" :ytdData="ytdData" />
|
||||||
<!-- <keyWork /> -->
|
<!-- <keyWork /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,7 +68,7 @@ export default {
|
|||||||
timer: null,
|
timer: null,
|
||||||
beilv: 1,
|
beilv: 1,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
selectDate: {},
|
dateData: {},
|
||||||
monthData: {},
|
monthData: {},
|
||||||
ytdData: {},
|
ytdData: {},
|
||||||
value: 100,
|
value: 100,
|
||||||
@@ -142,12 +142,13 @@ export default {
|
|||||||
this.beilv = _this.clientWidth / 1920;
|
this.beilv = _this.clientWidth / 1920;
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
getGrossMarginGroupData({
|
getGrossMarginGroupData({
|
||||||
startTime: this.selectDate.startTime,
|
startTime: this.dateData.startTime,
|
||||||
endTime: this.selectDate.endTime,
|
endTime: this.dateData.endTime,
|
||||||
sort: this.sort,
|
sort: this.sort,
|
||||||
index: undefined,
|
index: undefined,
|
||||||
factory: undefined
|
factory: undefined
|
||||||
@@ -166,7 +167,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
console.log(obj, 'obj');
|
console.log(obj, 'obj');
|
||||||
this.selectDate = obj
|
this.dateData= obj
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="基地毛利率" :is-full-screen="isFullScreen"
|
<ReportHeader :dateData="dateData" size="psi" @timeRangeChange="handleTimeChange" top-title="基地毛利率"
|
||||||
@screenfullChange="screenfullChange" />
|
:is-full-screen="isFullScreen" @screenfullChange="screenfullChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
margin-top: -20px;
|
margin-top: -20px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -37,8 +37,9 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 804px 804px;
|
grid-template-columns: 804px 804px;
|
||||||
">
|
">
|
||||||
<monthlyRelatedMetrics :factory="factory" :monthAnalysis="monthAnalysis" :title="'月度·相关指标分析'" />
|
<monthlyRelatedMetrics :dateData="dateData" :factory="factory" :monthAnalysis="monthAnalysis"
|
||||||
<yearRelatedMetrics :factory="factory" :ytdAnalysis="ytdAnalysis" :title="'累计·相关指标分析'" />
|
:title="'月度·相关指标分析'" />
|
||||||
|
<yearRelatedMetrics :dateData="dateData" :factory="factory" :ytdAnalysis="ytdAnalysis" :title="'累计·相关指标分析'" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -188,6 +189,7 @@ export default {
|
|||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
|
|||||||
@@ -76,9 +76,9 @@ export default {
|
|||||||
*/
|
*/
|
||||||
processTrendData(trendData) {
|
processTrendData(trendData) {
|
||||||
// 数据兜底:确保是数组且长度为12
|
// 数据兜底:确保是数组且长度为12
|
||||||
const validTrend = Array.isArray(trendData) && trendData.length === 12
|
const validTrend = Array.isArray(trendData)
|
||||||
? trendData
|
? trendData
|
||||||
: this.$props.trend.default();
|
: []
|
||||||
|
|
||||||
// 初始化空数组
|
// 初始化空数组
|
||||||
const months = [];
|
const months = [];
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<div class="coreBar">
|
<div class="coreBar">
|
||||||
<!-- 新增行容器:包裹“各基地情况”和barTop -->
|
<!-- 新增行容器:包裹“各基地情况”和barTop -->
|
||||||
<div class="header-row">
|
<div class="header-row">
|
||||||
<div class="base-title">
|
|
||||||
各基地情况
|
|
||||||
</div>
|
|
||||||
<div class="barTop">
|
<div class="barTop">
|
||||||
<!-- 关键:新增右侧容器,包裹图例和按钮组,实现整体靠右 -->
|
<!-- 关键:新增右侧容器,包裹图例和按钮组,实现整体靠右 -->
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
@@ -342,10 +339,10 @@ export default {
|
|||||||
|
|
||||||
// 新增:头部行容器,实现一行排列
|
// 新增:头部行容器,实现一行排列
|
||||||
.header-row {
|
.header-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between; // 左右两端对齐
|
justify-content: flex-end; // 左右两端对齐
|
||||||
align-items: center; // 垂直居中
|
align-items: center; // 垂直居中
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
|
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => {} // 默认空数组,避免报错
|
default: () => {} // 默认空数组,避免报错
|
||||||
},
|
},
|
||||||
|
|
||||||
title: { // 接收父组件传递的设备数据数组
|
title: { // 接收父组件传递的设备数据数组
|
||||||
type: String,
|
type: String,
|
||||||
default: () => '' // 默认空数组,避免报错
|
default: () => '' // 默认空数组,避免报错
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<!-- 累计指标1 -->
|
<!-- 累计指标1 -->
|
||||||
<div class="dashboard left" @click="handleDashboardClick('/operatingRevenue/operatingRevenueBase')">
|
<div class="dashboard left" @click="handleDashboardClick('/operatingRevenue/operatingRevenueBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
收入·单位/万元
|
收入·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="ytdIncomeData"></operatingSingleBar>
|
<operatingSingleBar :detailData="ytdIncomeData"></operatingSingleBar>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<!-- 累计指标2 -->
|
<!-- 累计指标2 -->
|
||||||
<div class="dashboard right" @click="handleDashboardClick('/fullCostAnalysis/fullCostAnalysisBase')">
|
<div class="dashboard right" @click="handleDashboardClick('/fullCostAnalysis/fullCostAnalysisBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
全成本·单位/万元
|
全成本·元/㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="ytdCostData"></operatingSingleBar>
|
<operatingSingleBar :detailData="ytdCostData"></operatingSingleBar>
|
||||||
@@ -43,6 +43,10 @@ export default {
|
|||||||
{ title: "累计全成本", budget: 0, real: 0, rate: 0, diff: 0 }
|
{ title: "累计全成本", budget: 0, real: 0, rate: 0, diff: 0 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
dateData: { // 接收父组件传递的设备数据数组
|
||||||
|
type: Object,
|
||||||
|
default: () => { } // 默认空数组,避免报错
|
||||||
|
},
|
||||||
factory: {
|
factory: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: ''
|
default: ''
|
||||||
@@ -75,7 +79,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: path,
|
path: path,
|
||||||
query: {
|
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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBottom" style="height: 100%; width: 100%">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,7 +51,7 @@ import * as echarts from 'echarts';
|
|||||||
export default {
|
export default {
|
||||||
name: "Container",
|
name: "Container",
|
||||||
components: { operatingLineBar },
|
components: { operatingLineBar },
|
||||||
props: ["chartData"],
|
props: ["chartData",'dateData'],
|
||||||
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -28,7 +28,11 @@ export default {
|
|||||||
chartData: {
|
chartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
}
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -80,7 +84,8 @@ export default {
|
|||||||
path: 'grossMarginBase',
|
path: 'grossMarginBase',
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
query: { // 使用query传递参数(推荐),也可使用params
|
||||||
// baseName: itemName,
|
// baseName: itemName,
|
||||||
factory: baseIndex
|
factory: baseIndex,
|
||||||
|
dateData:this.dateData
|
||||||
}
|
}
|
||||||
// 若仍需用base作为参数:
|
// 若仍需用base作为参数:
|
||||||
// base: itemName,
|
// base: itemName,
|
||||||
@@ -120,7 +125,7 @@ export default {
|
|||||||
top: 30,
|
top: 30,
|
||||||
bottom: 30,
|
bottom: 30,
|
||||||
right: 70,
|
right: 70,
|
||||||
left: 40
|
left: 60
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -154,7 +159,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: { show: false },
|
splitLine: { show: false },
|
||||||
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ export default {
|
|||||||
// return html;
|
// return html;
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 40,
|
top: 30,
|
||||||
bottom: 40,
|
bottom: 60,
|
||||||
right: 70,
|
right: 30,
|
||||||
left: 60,
|
left: 50,
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 2,
|
splitNumber: 2,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
background-color: rgba(249, 252, 255, 1);
|
background-color: rgba(249, 252, 255, 1);
|
||||||
">
|
">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<operatingBar :chartData="chartData" @sort-change="sortChange" />
|
<operatingBar :dateData="dateData" :chartData="chartData" @sort-change="sortChange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -59,6 +59,10 @@ export default {
|
|||||||
}),
|
}),
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -85,12 +89,10 @@ export default {
|
|||||||
* @param {number} rate 处理后的rate值(已*100)
|
* @param {number} rate 处理后的rate值(已*100)
|
||||||
* @returns {0|1} flag值
|
* @returns {0|1} flag值
|
||||||
*/
|
*/
|
||||||
getRateFlag(rate) {
|
getRateFlag(rate) {
|
||||||
// 处理非数字/空值,默认返回 0
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||||
// 核心逻辑:≥100 → 1;<100 → 0
|
},
|
||||||
return rate >= 100 ? 1 : 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 核心处理函数:在所有数据都准备好后,才组装 chartData
|
* 核心处理函数:在所有数据都准备好后,才组装 chartData
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
background-color: rgba(249, 252, 255, 1);
|
background-color: rgba(249, 252, 255, 1);
|
||||||
">
|
">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<operatingBar @sort-change="sortChange" :chartData="chartData" />
|
<operatingBar :dateData="dateData" @sort-change="sortChange" :chartData="chartData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -53,6 +53,10 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -79,12 +83,11 @@ export default {
|
|||||||
* @param {number} rate 处理后的rate值(已*100)
|
* @param {number} rate 处理后的rate值(已*100)
|
||||||
* @returns {0|1} flag值
|
* @returns {0|1} flag值
|
||||||
*/
|
*/
|
||||||
getRateFlag(rate) {
|
|
||||||
// 处理非数字/空值,默认返回 0
|
getRateFlag(rate) {
|
||||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
// 核心逻辑:≥100 → 1;<100 → 0
|
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||||
return rate >= 100 ? 1 : 0;
|
},
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 核心处理函数:在所有数据都准备好后,才组装 chartData
|
* 核心处理函数:在所有数据都准备好后,才组装 chartData
|
||||||
|
|||||||
@@ -242,90 +242,8 @@ export default {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
// 毛利率场景数据
|
|
||||||
const grossProfitData = {
|
|
||||||
series: [
|
|
||||||
// 1. 完成率(折线图)
|
|
||||||
{
|
|
||||||
name: '完成率',
|
|
||||||
type: 'line',
|
|
||||||
yAxisIndex: 1,
|
|
||||||
lineStyle: { color: 'rgba(40, 138, 255, .5)', width: 2 },
|
|
||||||
itemStyle: {
|
|
||||||
color: 'rgba(40, 138, 255, 1)',
|
|
||||||
borderColor: 'rgba(40, 138, 255, 1)',
|
|
||||||
borderWidth: 2,
|
|
||||||
radius: 4
|
|
||||||
},
|
|
||||||
areaStyle: {
|
|
||||||
opacity: 0.2,
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(40, 138, 255, .9)' },
|
|
||||||
{ offset: 1, color: 'rgba(40, 138, 255, 0)' }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
data: [106.7, 96.9, 106.5, 106.1, 93.8, 105.9], // 毛利率完成率(%)
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolSize: 6
|
|
||||||
},
|
|
||||||
// 2. 目标(柱状图)
|
|
||||||
{
|
|
||||||
name: '目标',
|
|
||||||
type: 'bar',
|
|
||||||
yAxisIndex: 0,
|
|
||||||
barWidth: 14,
|
|
||||||
itemStyle: {
|
|
||||||
color: {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0, y: 0, x2: 0, y2: 1,
|
|
||||||
colorStops: [
|
|
||||||
{ offset: 0, color: 'rgba(130, 204, 255, 1)' },
|
|
||||||
{ offset: 1, color: 'rgba(75, 157, 255, 1)' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
borderRadius: [4, 4, 0, 0],
|
|
||||||
borderWidth: 0
|
|
||||||
},
|
|
||||||
data: [30, 32, 31, 33, 32, 34] // 目标毛利率(万元)
|
|
||||||
},
|
|
||||||
// 3. 实际(柱状图)
|
|
||||||
{
|
|
||||||
name: '实际',
|
|
||||||
type: 'bar',
|
|
||||||
yAxisIndex: 0,
|
|
||||||
barWidth: 14,
|
|
||||||
itemStyle: {
|
|
||||||
color: (params) => {
|
|
||||||
const safeFlag = [1, 0, 1, 1, 0, 1]; // 达标状态
|
|
||||||
const currentFlag = safeFlag[params.dataIndex] || 0;
|
|
||||||
return currentFlag === 1
|
|
||||||
? {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0, y: 0, x2: 0, y2: 1,
|
|
||||||
colorStops: [
|
|
||||||
{ offset: 0, color: 'rgba(174, 239, 224, 1)' },
|
|
||||||
{ offset: 1, color: 'rgba(118, 218, 190, 1)' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0, y: 0, x2: 0, y2: 1,
|
|
||||||
colorStops: [
|
|
||||||
{ offset: 0, color: 'rgba(253, 209, 129, 1)' },
|
|
||||||
{ offset: 1, color: 'rgba(249, 164, 74, 1)' }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
},
|
|
||||||
borderRadius: [4, 4, 0, 0],
|
|
||||||
borderWidth: 0
|
|
||||||
},
|
|
||||||
data: [32, 31, 33, 35, 30, 36] // 实际毛利率(万元)
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
// 根据按钮状态返回对应数据
|
// 根据按钮状态返回对应数据
|
||||||
return this.activeButton === 0 ? salesData : grossProfitData;
|
return salesData
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
{{ ytdData?.rate || 0 }}%
|
{{ ytdData?.rate || 0 }}%
|
||||||
</div>
|
</div>
|
||||||
<div class="mom">
|
<div class="mom">
|
||||||
环比{{ ytdData?.yoyRate || 0 }}%
|
同比{{ ytdData?.yoyRate || 0 }}%
|
||||||
<img v-if="ytdData?.yoyRate >= 0" class="arrow" src="../../../assets/img/topArrow.png" alt="">
|
<img v-if="ytdData?.yoyRate >= 0" class="arrow" src="../../../assets/img/topArrow.png" alt="">
|
||||||
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
|
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default {
|
|||||||
// boundaryGap: [10, 0], // 可根据需要开启,控制轴的留白
|
// boundaryGap: [10, 0], // 可根据需要开启,控制轴的留白
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
min: 0,
|
min: 0,
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<!-- 收入模块(传递整合了flag的incomeData) -->
|
<!-- 收入模块(传递整合了flag的incomeData) -->
|
||||||
<div class="dashboard left" @click="handleDashboardClick('/operatingRevenue/operatingRevenueBase')">
|
<div class="dashboard left" @click="handleDashboardClick('/operatingRevenue/operatingRevenueBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
收入·单位/万元
|
收入·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="incomeData"></operatingSingleBar>
|
<operatingSingleBar :detailData="incomeData"></operatingSingleBar>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<!-- 全成本模块(传递整合了flag的totalCostData) -->
|
<!-- 全成本模块(传递整合了flag的totalCostData) -->
|
||||||
<div class="dashboard right" @click="handleDashboardClick('/fullCostAnalysis/fullCostAnalysisBase')">
|
<div class="dashboard right" @click="handleDashboardClick('/fullCostAnalysis/fullCostAnalysisBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
全成本·单位/万元
|
全成本·万元
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="totalCostData"></operatingSingleBar>
|
<operatingSingleBar :detailData="totalCostData"></operatingSingleBar>
|
||||||
@@ -44,6 +44,10 @@ export default {
|
|||||||
{ title: "全成本", budget: 0, real: 0, rate: 0, diff: 0 }
|
{ title: "全成本", budget: 0, real: 0, rate: 0, diff: 0 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
dateData: { // 接收父组件传递的设备数据数组
|
||||||
|
type: Object,
|
||||||
|
default: () => { } // 默认空数组,避免报错
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
@@ -80,7 +84,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: path,
|
path: path,
|
||||||
query: {
|
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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
grid-template-columns: 560px 745px 560px ;
|
grid-template-columns: 560px 745px 560px ;
|
||||||
">
|
">
|
||||||
<coreSalesKPIs :sale="sale" :dateData="dateData" />
|
<coreSalesKPIs :sale="sale" :dateData="dateData" />
|
||||||
<financeCosts :finance="finance" :dateData="dateData" :cost="cost" />
|
<financeCosts :finance="finance" :dateData="dateData" :cost="cost" />
|
||||||
<keyProductionIndicators :productData="productData" :dateData="dateData" />
|
<keyProductionIndicators :productData="productData" :dateData="dateData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
grid-template-columns:745px 560px 560px ;
|
grid-template-columns:745px 560px 560px ;
|
||||||
">
|
">
|
||||||
<orderProgress @getData="getOrderData" :baseOrder="orderTableData" :orderOutput="orderOutput" />
|
<orderProgress @getData="getOrderData" :baseOrder="orderTableData" :orderOutput="orderOutput" />
|
||||||
<coreBottomLeft :purchase="purchase" :inventory="inventory" />
|
<coreBottomLeft :dateData="dateData" :purchase="purchase" :inventory="inventory" />
|
||||||
<keyWork :importantWork="importantWork" />
|
<keyWork :importantWork="importantWork" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -156,8 +156,8 @@ export default {
|
|||||||
this.calendarList = res.data
|
this.calendarList = res.data
|
||||||
})
|
})
|
||||||
// getSalesRevenueGroupData({
|
// getSalesRevenueGroupData({
|
||||||
// startTime: this.selectDate.startTime,
|
// startTime: this.dateData.startTime,
|
||||||
// endTime: this.selectDate.endTime,
|
// endTime: this.dateData.endTime,
|
||||||
// sort: this.sort,
|
// sort: this.sort,
|
||||||
// index: undefined,
|
// index: undefined,
|
||||||
// factory: undefined
|
// factory: undefined
|
||||||
@@ -170,7 +170,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
console.log(obj, 'obj');
|
console.log(obj, 'obj');
|
||||||
this.selectDate = obj
|
this.dateData= obj
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader top-title="投入产出率" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
<ReportHeader :dateData="dateData" top-title="投入产出率" :is-full-screen="isFullScreen"
|
||||||
@timeRangeChange="handleTimeChange" />
|
@screenfullChange="screenfullChange" @timeRangeChange="handleTimeChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns:1624px;
|
grid-template-columns:1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChart :monthData="monthData" />
|
<operatingLineChart :dateData="dateData" :monthData="monthData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChartCumulative :salesTrendMap="salesTrendMap" :ytdData="ytdData" />
|
<operatingLineChartCumulative :dateData="dateData" :salesTrendMap="salesTrendMap" :ytdData="ytdData" />
|
||||||
<!-- <keyWork /> -->
|
<!-- <keyWork /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
beilv: 1,
|
beilv: 1,
|
||||||
value: 100,
|
value: 100,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
selectDate: {},
|
dateData: {},
|
||||||
monthData: {},
|
monthData: {},
|
||||||
ytdData: {},
|
ytdData: {},
|
||||||
};
|
};
|
||||||
@@ -137,12 +137,13 @@ export default {
|
|||||||
this.beilv = _this.clientWidth / 1920;
|
this.beilv = _this.clientWidth / 1920;
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
getInputOutputRateGroupData({
|
getInputOutputRateGroupData({
|
||||||
startTime: this.selectDate.startTime,
|
startTime: this.dateData.startTime,
|
||||||
endTime: this.selectDate.endTime,
|
endTime: this.dateData.endTime,
|
||||||
sort: this.sort,
|
sort: this.sort,
|
||||||
index: undefined,
|
index: undefined,
|
||||||
factory: undefined
|
factory: undefined
|
||||||
@@ -161,7 +162,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
console.log(obj, 'obj');
|
console.log(obj, 'obj');
|
||||||
this.selectDate = obj
|
this.dateData= obj
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="基地投入产出率" :is-full-screen="isFullScreen"
|
<ReportHeader :dateData="dateData" size="psi" @timeRangeChange="handleTimeChange" top-title="基地投入产出率"
|
||||||
@screenfullChange="screenfullChange" />
|
:is-full-screen="isFullScreen" @screenfullChange="screenfullChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
margin-top: -20px;
|
margin-top: -20px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -185,6 +185,7 @@ export default {
|
|||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
|
|||||||
@@ -76,9 +76,9 @@ export default {
|
|||||||
*/
|
*/
|
||||||
processTrendData(trendData) {
|
processTrendData(trendData) {
|
||||||
// 数据兜底:确保是数组且长度为12
|
// 数据兜底:确保是数组且长度为12
|
||||||
const validTrend = Array.isArray(trendData) && trendData.length === 12
|
const validTrend = Array.isArray(trendData)
|
||||||
? trendData
|
? trendData
|
||||||
: this.$props.trend.default();
|
: []
|
||||||
|
|
||||||
// 初始化空数组
|
// 初始化空数组
|
||||||
const months = [];
|
const months = [];
|
||||||
@@ -129,10 +129,8 @@ export default {
|
|||||||
*/
|
*/
|
||||||
getRateFlag(rate) {
|
getRateFlag(rate) {
|
||||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
// 原始rate若为小数(如0.8 → 80%,1.1 → 110%),则*100后判断
|
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||||
const ratePercent = rate;
|
},
|
||||||
return ratePercent >= 100 ? 1 : 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<div class="coreBar">
|
<div class="coreBar">
|
||||||
<!-- 新增行容器:包裹“各基地情况”和barTop -->
|
<!-- 新增行容器:包裹“各基地情况”和barTop -->
|
||||||
<div class="header-row">
|
<div class="header-row">
|
||||||
<div class="base-title">
|
|
||||||
各基地情况
|
|
||||||
</div>
|
|
||||||
<div class="barTop">
|
<div class="barTop">
|
||||||
<!-- 关键:新增右侧容器,包裹图例和按钮组,实现整体靠右 -->
|
<!-- 关键:新增右侧容器,包裹图例和按钮组,实现整体靠右 -->
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
@@ -260,10 +257,10 @@ export default {
|
|||||||
|
|
||||||
// 新增:头部行容器,实现一行排列
|
// 新增:头部行容器,实现一行排列
|
||||||
.header-row {
|
.header-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between; // 左右两端对齐
|
justify-content: flex-end; // 左右两端对齐
|
||||||
align-items: center; // 垂直居中
|
align-items: center; // 垂直居中
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
|
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<!-- 领用量模块(传递整合了flag的useData) -->
|
<!-- 领用量模块(传递整合了flag的useData) -->
|
||||||
<div class="dashboard left">
|
<div class="dashboard left">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
领用量·单位/万元
|
领用量·㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="useData"></operatingSingleBar>
|
<operatingSingleBar :detailData="useData"></operatingSingleBar>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<!-- 加工产量模块(传递整合了flag的processData) -->
|
<!-- 加工产量模块(传递整合了flag的processData) -->
|
||||||
<div class="dashboard right">
|
<div class="dashboard right">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
加工产量·单位/万元
|
加工产量·㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="processData"></operatingSingleBar>
|
<operatingSingleBar :detailData="processData"></operatingSingleBar>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBottom" style="height: 100%; width: 100%">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,7 +51,7 @@ import * as echarts from 'echarts';
|
|||||||
export default {
|
export default {
|
||||||
name: "Container",
|
name: "Container",
|
||||||
components: { operatingLineBar },
|
components: { operatingLineBar },
|
||||||
props: ["chartData"],
|
props: ["chartData",'dateData'],
|
||||||
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -28,7 +28,11 @@ export default {
|
|||||||
chartData: {
|
chartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
}
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -80,7 +84,8 @@ export default {
|
|||||||
path: 'inputOutputRatioBase',
|
path: 'inputOutputRatioBase',
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
query: { // 使用query传递参数(推荐),也可使用params
|
||||||
// baseName: itemName,
|
// baseName: itemName,
|
||||||
factory: baseIndex
|
factory: baseIndex,
|
||||||
|
dateData: this.dateData
|
||||||
}
|
}
|
||||||
// 若仍需用base作为参数:
|
// 若仍需用base作为参数:
|
||||||
// base: itemName,
|
// base: itemName,
|
||||||
@@ -116,11 +121,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 30,
|
top: 30,
|
||||||
bottom: 30,
|
bottom: 30,
|
||||||
right: 70,
|
right: 70,
|
||||||
left: 40
|
left: 60
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -154,7 +159,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: { show: false },
|
splitLine: { show: false },
|
||||||
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ export default {
|
|||||||
// return html;
|
// return html;
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 40,
|
top: 30,
|
||||||
bottom: 40,
|
bottom: 60,
|
||||||
right: 70,
|
right: 30,
|
||||||
left: 60,
|
left: 50,
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 2,
|
splitNumber: 2,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
background-color: rgba(249, 252, 255, 1);
|
background-color: rgba(249, 252, 255, 1);
|
||||||
">
|
">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<operatingBar :chartData="chartData" @sort-change="sortChange" />
|
<operatingBar :dateData="dateData" :chartData="chartData" @sort-change="sortChange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -59,6 +59,10 @@ export default {
|
|||||||
}),
|
}),
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -85,12 +89,10 @@ export default {
|
|||||||
* @param {number} rate 处理后的rate值(已*100)
|
* @param {number} rate 处理后的rate值(已*100)
|
||||||
* @returns {0|1} flag值
|
* @returns {0|1} flag值
|
||||||
*/
|
*/
|
||||||
getRateFlag(rate) {
|
getRateFlag(rate) {
|
||||||
// 处理非数字/空值,默认返回 0
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||||
// 核心逻辑:≥100 → 1;<100 → 0
|
},
|
||||||
return rate >= 100 ? 1 : 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 核心处理函数:在所有数据都准备好后,才组装 chartData
|
* 核心处理函数:在所有数据都准备好后,才组装 chartData
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
background-color: rgba(249, 252, 255, 1);
|
background-color: rgba(249, 252, 255, 1);
|
||||||
">
|
">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<operatingBar @sort-change="sortChange" :chartData="chartData" />
|
<operatingBar :dateData="dateData" @sort-change="sortChange" :chartData="chartData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@@ -53,6 +53,10 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -79,12 +83,10 @@ export default {
|
|||||||
* @param {number} rate 处理后的rate值(已*100)
|
* @param {number} rate 处理后的rate值(已*100)
|
||||||
* @returns {0|1} flag值
|
* @returns {0|1} flag值
|
||||||
*/
|
*/
|
||||||
getRateFlag(rate) {
|
getRateFlag(rate) {
|
||||||
// 处理非数字/空值,默认返回 0
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||||
// 核心逻辑:≥100 → 1;<100 → 0
|
},
|
||||||
return rate >= 100 ? 1 : 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 核心处理函数:在所有数据都准备好后,才组装 chartData
|
* 核心处理函数:在所有数据都准备好后,才组装 chartData
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
{{ ytdData?.rate || 0 }}%
|
{{ ytdData?.rate || 0 }}%
|
||||||
</div>
|
</div>
|
||||||
<div class="mom">
|
<div class="mom">
|
||||||
环比{{ ytdData?.yoyRate || 0 }}%
|
同比{{ ytdData?.yoyRate || 0 }}%
|
||||||
<img v-if="ytdData?.yoyRate >= 0" class="arrow" src="../../../assets/img/topArrow.png" alt="">
|
<img v-if="ytdData?.yoyRate >= 0" class="arrow" src="../../../assets/img/topArrow.png" alt="">
|
||||||
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
|
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default {
|
|||||||
// boundaryGap: [10, 0], // 可根据需要开启,控制轴的留白
|
// boundaryGap: [10, 0], // 可根据需要开启,控制轴的留白
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
min: 0,
|
min: 0,
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<!-- 领用量模块(传递整合了flag的useData) -->
|
<!-- 领用量模块(传递整合了flag的useData) -->
|
||||||
<div class="dashboard left">
|
<div class="dashboard left">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
领用量·单位/万元
|
领用量·㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="useData"></operatingSingleBar>
|
<operatingSingleBar :detailData="useData"></operatingSingleBar>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<!-- 加工产量模块(传递整合了flag的processData) -->
|
<!-- 加工产量模块(传递整合了flag的processData) -->
|
||||||
<div class="dashboard right">
|
<div class="dashboard right">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
加工产量·单位/万元
|
加工产量·㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<operatingSingleBar :detailData="processData"></operatingSingleBar>
|
<operatingSingleBar :detailData="processData"></operatingSingleBar>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader top-title="净价分析" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
<ReportHeader :dateData="dateData" top-title="净价分析" :is-full-screen="isFullScreen"
|
||||||
@timeRangeChange="handleTimeChange" />
|
@screenfullChange="screenfullChange" @timeRangeChange="handleTimeChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns:1624px;
|
grid-template-columns:1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChart :thisMonData="thisMonData" />
|
<operatingLineChart :dateData="dateData" :thisMonData="thisMonData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChartCumulative :totalData="totalData" />
|
<operatingLineChartCumulative :dateData="dateData" :totalData="totalData" />
|
||||||
<!-- <keyWork /> -->
|
<!-- <keyWork /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,7 +68,7 @@ export default {
|
|||||||
timer: null,
|
timer: null,
|
||||||
beilv: 1,
|
beilv: 1,
|
||||||
value: 100,
|
value: 100,
|
||||||
selectDate: {},
|
dateData: {},
|
||||||
thisMonData: {},
|
thisMonData: {},
|
||||||
totalData: {},
|
totalData: {},
|
||||||
};
|
};
|
||||||
@@ -136,14 +136,15 @@ export default {
|
|||||||
this.beilv = _this.clientWidth / 1920;
|
this.beilv = _this.clientWidth / 1920;
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData(obj) {
|
getData(obj) {
|
||||||
getUnitPriceAnalysisGroupData({
|
getUnitPriceAnalysisGroupData({
|
||||||
startTime: this.selectDate.startTime,
|
startTime: this.dateData.startTime,
|
||||||
endTime: this.selectDate.endTime,
|
endTime: this.dateData.endTime,
|
||||||
paramName: '净价'
|
paramName: '净价'
|
||||||
// timeDim: this.selectDate.mode
|
// timeDim: this.dateData.mode
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.thisMonData = res.data.thisMonData
|
this.thisMonData = res.data.thisMonData
|
||||||
@@ -158,7 +159,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
// console.log(obj, 'obj');
|
// console.log(obj, 'obj');
|
||||||
this.selectDate = obj
|
this.dateData= obj
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||||
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="基地净价分析" :is-full-screen="isFullScreen"
|
<ReportHeader :dateData="dateData" size="psi" @timeRangeChange="handleTimeChange" top-title="基地净价分析"
|
||||||
@screenfullChange="screenfullChange" />
|
:is-full-screen="isFullScreen" @screenfullChange="screenfullChange" />
|
||||||
<div class="main-body" style="
|
<div class="main-body" style="
|
||||||
margin-top: -20px;
|
margin-top: -20px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -178,7 +178,8 @@ export default {
|
|||||||
this.beilv = _this.clientWidth / 1920;
|
this.beilv = _this.clientWidth / 1920;
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||||
|
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="coreBar">
|
<div class="coreBar">
|
||||||
<div class="header-row">
|
<div class="header-row">
|
||||||
<div class="base-title">
|
|
||||||
各基地情况
|
|
||||||
</div>
|
|
||||||
<div class="barTop">
|
<div class="barTop">
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
@@ -294,11 +291,11 @@ export default {
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
|
||||||
.header-row {
|
.header-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: flex-end; // 左右两端对齐
|
||||||
align-items: center;
|
align-items: center; // 垂直居中
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px; // 与下方图表区保留间距(可根据需求调整)
|
||||||
}
|
}
|
||||||
|
|
||||||
.base-title {
|
.base-title {
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ export default {
|
|||||||
*/
|
*/
|
||||||
getRateFlag(rate) {
|
getRateFlag(rate) {
|
||||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
return rate >= 100 ? 1 : 0;
|
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="topItem-container" style="display: flex; gap: 8px;">
|
<div class="topItem-container" style="display: flex; gap: 8px;">
|
||||||
<div class="dashboard left" @click="handleDashboardClick('/unitPriceAnalysis/unitPriceAnalysisBase')">
|
<div class="dashboard left" @click="handleDashboardClick('/unitPriceAnalysis/unitPriceAnalysisBase')">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
单价·单位/万元
|
单价·万㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar :detailData="{
|
<operatingSingleBar :detailData="{
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dashboard right">
|
<div class="dashboard right">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
运费·单位/万元
|
运费·万㎡
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<operatingSingleBar :detailData="{
|
<operatingSingleBar :detailData="{
|
||||||
@@ -50,6 +50,10 @@ export default {
|
|||||||
运费: { completeRate: 0, diff: 0, real: 0, target: 0, thb: 0 },
|
运费: { completeRate: 0, diff: 0, real: 0, target: 0, thb: 0 },
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
factory: {
|
factory: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: ''
|
default: ''
|
||||||
@@ -90,7 +94,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: path,
|
path: path,
|
||||||
query: {
|
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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBottom" style="height: 100%; width: 100%">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,7 +51,7 @@ import * as echarts from 'echarts';
|
|||||||
export default {
|
export default {
|
||||||
name: "Container",
|
name: "Container",
|
||||||
components: { operatingLineBar },
|
components: { operatingLineBar },
|
||||||
props: ["chartData"],
|
props: ["chartData",'dateData'],
|
||||||
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
emits: ['sort-change'], // 声明事件(Vue3 推荐)
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
// max: (value) => Math.ceil((value.max || 0) * 1.1),
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -28,7 +28,11 @@ export default {
|
|||||||
chartData: {
|
chartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
}
|
},
|
||||||
|
dateData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -44,7 +48,7 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
// 组件销毁时清理资源
|
// 组件销毁时清理资源
|
||||||
@@ -80,7 +84,8 @@ export default {
|
|||||||
path: 'netPriceAnalysisBase',
|
path: 'netPriceAnalysisBase',
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
query: { // 使用query传递参数(推荐),也可使用params
|
||||||
// baseName: itemName,
|
// baseName: itemName,
|
||||||
factory: baseIndex
|
factory: baseIndex,
|
||||||
|
dateData: this.dateData
|
||||||
}
|
}
|
||||||
// 若仍需用base作为参数:
|
// 若仍需用base作为参数:
|
||||||
// base: itemName,
|
// base: itemName,
|
||||||
@@ -116,11 +121,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 30,
|
top: 30,
|
||||||
bottom: 30,
|
bottom: 30,
|
||||||
right: 70,
|
right: 70,
|
||||||
left: 40
|
left: 60
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -154,7 +159,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'right'
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: { show: false },
|
splitLine: { show: false },
|
||||||
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
axisLine: { lineStyle: { color: 'rgba(0, 0, 0, 0.15)' } },
|
||||||
// scale: true,
|
//
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ export default {
|
|||||||
// return html;
|
// return html;
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 40,
|
top: 30,
|
||||||
bottom: 40,
|
bottom: 60,
|
||||||
right: 70,
|
right: 30,
|
||||||
left: 60,
|
left: 50,
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
type: 'solid' // 实线(可选:dashed虚线、dotted点线)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scale: true,
|
|
||||||
splitNumber: 2,
|
splitNumber: 2,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user