修改
This commit is contained in:
@@ -32,7 +32,7 @@ export function getReceiveDetailPage(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: "/lb/receive-detail/page",
|
url: "/lb/receive-detail/page",
|
||||||
method: "get",
|
method: "get",
|
||||||
data: data,
|
params: data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,6 +40,6 @@ export function getAccountSumaryPage(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: "/lb/account-sumary/page",
|
url: "/lb/account-sumary/page",
|
||||||
method: "get",
|
method: "get",
|
||||||
data: data,
|
params: data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="">
|
<div style="">
|
||||||
<Container name="利润影主要响因素" icon="cockpitItemIcon" size="profitMiddleBasic" topSize="KFAPTopTitle">
|
<Container name="利润主要影响因素" icon="cockpitItemIcon" size="profitMiddleBasic" topSize="KFAPTopTitle">
|
||||||
<div class="kpi-content" style="padding: 14px 16px; display: flex;width: 100%;">
|
<div class="kpi-content" style="padding: 14px 16px; display: flex;width: 100%;">
|
||||||
<div class="left" style="width: 382px;">
|
<div class="left" style="width: 382px;">
|
||||||
<top-item :itemList="targetItemList" />
|
<top-item :itemList="targetItemList" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<Container name="库存" icon="cockpitItemIcon" size="psiMiddleBg" topSize="KFAPTopTitle">
|
<Container name="库存总览·万m²" icon="cockpitItemIcon" size="psiMiddleBg" topSize="KFAPTopTitle">
|
||||||
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
||||||
<div class="kpi-content" style="padding: 14px 16px; display: flex;width: 100%;">
|
<div class="kpi-content" style="padding: 14px 16px; display: flex;width: 100%;">
|
||||||
<div class="bottom"
|
<div class="bottom"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
{{ stockVO.avgValue || 0 }}
|
{{ stockVO.avgValue || 0 }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
平均数量
|
平均销量
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,11 +11,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<!-- 实际值(当前值)颜色动态绑定 -->
|
|
||||||
<div class="number" :style="{ color: getColor(itemList[0].currentValue, itemList[0].targetValue) }">
|
<div class="number" :style="{ color: getColor(itemList[0].currentValue, itemList[0].targetValue) }">
|
||||||
{{ itemList[0].currentValue }}
|
{{ itemList[0].currentValue }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">当前值</div>
|
<div class="title">实际值</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
<!-- 循环渲染剩余的item(从索引1开始) -->
|
<!-- 循环渲染剩余的item(从索引1开始) -->
|
||||||
<div class="item groupData" style="display: flex;padding: 0;" v-for="(item, index) in itemList.slice(1)"
|
<div class="item groupData" style="display: flex;padding: 0;" v-for="(item, index) in itemList.slice(1)"
|
||||||
:key="index">
|
:key="index">
|
||||||
|
<!-- 左侧目标值/实际值部分(不变) -->
|
||||||
<div class="left" style="display: flex;align-items: start;gap: 4px;padding: 12px 0 0 12px;">
|
<div class="left" style="display: flex;align-items: start;gap: 4px;padding: 12px 0 0 12px;">
|
||||||
<div class="groupName">{{ item.unit }}</div>
|
<div class="groupName">{{ item.unit }}</div>
|
||||||
<div class="left-target">
|
<div class="left-target">
|
||||||
@@ -49,7 +49,6 @@
|
|||||||
<div class="title">目标值</div>
|
<div class="title">目标值</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="left-real">
|
<div class="left-real">
|
||||||
<!-- 实际值颜色动态绑定 -->
|
|
||||||
<div class="number" :style="{ color: getColor(item.currentValue, item.targetValue) }">
|
<div class="number" :style="{ color: getColor(item.currentValue, item.targetValue) }">
|
||||||
{{ item.currentValue }}
|
{{ item.currentValue }}
|
||||||
</div>
|
</div>
|
||||||
@@ -58,10 +57,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="cityLine"></div>
|
<div class="cityLine"></div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<!-- 顶部完成率颜色动态绑定 -->
|
<!-- 顶部完成率部分(不变) -->
|
||||||
<div class="groupName" :class="{
|
<div class="groupName" :class="{
|
||||||
'bg-default': item.currentValue < item.targetValue, // 小于目标值:默认背景
|
'bg-default': item.currentValue < item.targetValue,
|
||||||
'bg-green': item.currentValue >= item.targetValue // 大于等于目标值:绿色背景
|
'bg-green': item.currentValue >= item.targetValue
|
||||||
}" style="font-size: 12px;display: flex;align-items: center;justify-content: flex-end;">
|
}" style="font-size: 12px;display: flex;align-items: center;justify-content: flex-end;">
|
||||||
<div class="title">完成率</div>
|
<div class="title">完成率</div>
|
||||||
<div class="yield" style="font-size: 22px;margin-bottom: 4px;">
|
<div class="yield" style="font-size: 22px;margin-bottom: 4px;">
|
||||||
@@ -70,50 +69,27 @@
|
|||||||
<div class="unit">%</div>
|
<div class="unit">%</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 第一个城市进度 -->
|
<!-- 动态渲染城市进度:循环 item.cities -->
|
||||||
<div class="right-city">
|
<div class="right-city" v-for="(city, cityIdx) in item.cities" :key="cityIdx"
|
||||||
<div class="city">桐城</div>
|
:style="{ marginTop: cityIdx > 0 ? '2px' : '0' }">
|
||||||
|
<div class="city">{{ city.name }}</div> <!-- 动态城市名 -->
|
||||||
<div class="city-progress-group">
|
<div class="city-progress-group">
|
||||||
<div class="city-progress-container">
|
<div class="city-progress-container">
|
||||||
<!-- 城市进度条颜色动态绑定 -->
|
<!-- 动态城市进度条(颜色按城市进度判断) -->
|
||||||
<div class="city-progress-bar" :style="{
|
<div class="city-progress-bar" :style="{
|
||||||
width: item.progress + '%',
|
width: city.progress + '%',
|
||||||
background: getColor(item.currentValue, item.targetValue)
|
background: getColor(city.completed, city.total) // 用城市已完成/总数判断颜色
|
||||||
}"></div>
|
}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="city-progress-yield" style="display: flex;justify-content: space-between;">
|
<div class="city-progress-yield" style="display: flex;justify-content: space-between;">
|
||||||
<!-- numerator颜色动态绑定 -->
|
<!-- 动态比值(已完成/总数) -->
|
||||||
<div class="numerator" :style="{ color: getColor(item.currentValue, item.targetValue) }">
|
<div class="numerator" :style="{ color: getColor(city.completed, city.total) }">
|
||||||
12/13
|
{{ city.completed }}/{{ city.total }}
|
||||||
</div>
|
</div>
|
||||||
<!-- 城市完成率颜色动态绑定 -->
|
<!-- 动态城市完成率 -->
|
||||||
<div class="city-yield" :style="{ color: getColor(item.currentValue, item.targetValue) }">
|
<div class="city-yield" :style="{ color: getColor(city.completed, city.total) }">
|
||||||
{{ item.progress }}%
|
{{ city.progress }}%
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 第二个城市进度 -->
|
|
||||||
<div class="right-city" style="margin-top: 2px;">
|
|
||||||
<div class="city">桐城</div>
|
|
||||||
<div class="city-progress-group">
|
|
||||||
<div class="city-progress-container">
|
|
||||||
<!-- 城市进度条颜色动态绑定 -->
|
|
||||||
<div class="city-progress-bar" :style="{
|
|
||||||
width: item.progress + '%',
|
|
||||||
background: getColor(item.currentValue, item.targetValue)
|
|
||||||
}"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="city-progress-yield" style="display: flex;justify-content: space-between;">
|
|
||||||
<!-- numerator颜色动态绑定 -->
|
|
||||||
<div class="numerator" :style="{ color: getColor(item.currentValue, item.targetValue) }">
|
|
||||||
12/13
|
|
||||||
</div>
|
|
||||||
<!-- 城市完成率颜色动态绑定 -->
|
|
||||||
<div class="city-yield" :style="{ color: getColor(item.currentValue, item.targetValue) }">
|
|
||||||
{{ item.progress }}%
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -134,38 +110,54 @@ export default {
|
|||||||
{
|
{
|
||||||
unit: "总进度",
|
unit: "总进度",
|
||||||
targetValue: 16,
|
targetValue: 16,
|
||||||
currentValue: 14.5, // 小于目标值,应显示橙色
|
currentValue: 14.5,
|
||||||
progress: 90
|
progress: 90,
|
||||||
|
cities: [] // 总进度无需城市数据,留空
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
unit: "一组",
|
unit: "一组",
|
||||||
targetValue: 16,
|
targetValue: 16,
|
||||||
currentValue: 17, // 大于目标值,应显示绿色
|
currentValue: 17,
|
||||||
progress: 106
|
progress: 106,
|
||||||
|
cities: [
|
||||||
|
{ name: "桐城", completed: 12, total: 13, progress: 92 },
|
||||||
|
{ name: "自贡", completed: 15, total: 16, progress: 93 } // 新增城市示例
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
unit: "二组",
|
unit: "二组",
|
||||||
targetValue: 16,
|
targetValue: 16,
|
||||||
currentValue: 16, // 等于目标值,应显示绿色
|
currentValue: 16,
|
||||||
progress: 100
|
progress: 100,
|
||||||
|
cities: [
|
||||||
|
{ name: "蚌埠", completed: 10, total: 12, progress: 83 },
|
||||||
|
{ name: "合肥", completed: 8, total: 10, progress: 80 }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
// 其他组同理,按需添加 cities 数据
|
||||||
{
|
{
|
||||||
unit: "三组",
|
unit: "三组",
|
||||||
targetValue: 16,
|
targetValue: 16,
|
||||||
currentValue: 15.2, // 小于目标值,应显示橙色
|
currentValue: 15.2,
|
||||||
progress: 85
|
progress: 85,
|
||||||
|
cities: [{ name: "宜兴", completed: 9, total: 11, progress: 81 }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
unit: "四组",
|
unit: "四组",
|
||||||
targetValue: 16,
|
targetValue: 16,
|
||||||
currentValue: 18, // 大于目标值,应显示绿色
|
currentValue: 18,
|
||||||
progress: 112
|
progress: 112,
|
||||||
|
cities: [
|
||||||
|
{ name: "漳州", completed: 14, total: 15, progress: 93 },
|
||||||
|
{ name: "洛阳", completed: 12, total: 14, progress: 85 }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
unit: "五组",
|
unit: "五组",
|
||||||
targetValue: 16,
|
targetValue: 16,
|
||||||
currentValue: 14, // 小于目标值,应显示橙色
|
currentValue: 14,
|
||||||
progress: 80
|
progress: 80,
|
||||||
|
cities: [{ name: "桐城", completed: 7, total: 9, progress: 77 }]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<bottomMiddleContainer name="订单进度跟踪·万m²" icon="cockpitItemIcon" size="bottomBasic">
|
<bottomMiddleContainer name="订单产量跟踪·万m²" icon="cockpitItemIcon" size="bottomBasic">
|
||||||
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
||||||
<div style="display: flex;gap: 9px;padding: 14px 16px;">
|
<div style="display: flex;gap: 9px;padding: 14px 16px;">
|
||||||
<orderItem />
|
<orderItem />
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export default {
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: 'Line 1',
|
name: '实际',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
stack: 'Total',
|
stack: 'Total',
|
||||||
symbol: 'circle', // 点的形状(circle为圆形)
|
symbol: 'circle', // 点的形状(circle为圆形)
|
||||||
@@ -157,7 +157,7 @@ export default {
|
|||||||
data: [140, 232, 101, 264, 90, 340, 250]
|
data: [140, 232, 101, 264, 90, 340, 250]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Line 2',
|
name: '目标',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
stack: 'Total',
|
stack: 'Total',
|
||||||
symbol: 'circle', // 点的形状(circle为圆形)
|
symbol: 'circle', // 点的形状(circle为圆形)
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export default {
|
|||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '万㎡',
|
name: '万元',
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default {
|
|||||||
// flag 为 0 时使用灰色,为 1 时使用橙色
|
// flag 为 0 时使用灰色,为 1 时使用橙色
|
||||||
return this.flag === 1
|
return this.flag === 1
|
||||||
? 'rgba(255, 132, 0, 1)'
|
? 'rgba(255, 132, 0, 1)'
|
||||||
: 'rgba(103, 103, 103, 0.79)';
|
: 'rgba(54, 181, 138, 1)';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBottom" style="height: 100%; width: 1590px">
|
<div class="lineBottom" style="height: 100%; width: 1590px">
|
||||||
<costBaseBarChart style="height: 99%; width: 1590px" />
|
<costBaseBarChart :yName="yName" style="height: 99%; width: 1590px" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,18 +51,12 @@ import costBaseBarChart from './costBaseBarChart.vue';
|
|||||||
export default {
|
export default {
|
||||||
name: "Container",
|
name: "Container",
|
||||||
components: { costBaseBarChart },
|
components: { costBaseBarChart },
|
||||||
props: ["name", "size", "icon"],
|
props: ['dateData','yName'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isDropdownShow: false,
|
isDropdownShow: false,
|
||||||
selectedProfit: '原料', // 默认选中"原料"
|
selectedProfit: '原料', // 默认选中"原料"
|
||||||
profitOptions: ['原料', '其他选项1', '其他选项2'], // 可根据实际需求修改选项
|
profitOptions: ['原料', '其他选项1', '其他选项2'], // 可根据实际需求修改选项
|
||||||
itemList: [
|
|
||||||
{ unit: "单价·元/m²", targetValue: 16, currentValue: 14.5, progress: 90 },
|
|
||||||
{ unit: "净价·元/m²", targetValue: 16, currentValue: 15.2, progress: 85 },
|
|
||||||
{ unit: "销量·万m²", targetValue: 20, currentValue: 16, progress: 80 },
|
|
||||||
{ unit: "双镀面板·万m²", targetValue: 15, currentValue: 13.8, progress: 92 },
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
yName: {
|
||||||
|
type: String,
|
||||||
|
default: () => '元/㎡'
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initData();
|
this.initData();
|
||||||
@@ -63,14 +69,14 @@ export default {
|
|||||||
interval: 0,
|
interval: 0,
|
||||||
padding: [5, 0, 0, 0] // 标签向下偏移,避免与柱子底部重叠
|
padding: [5, 0, 0, 0] // 标签向下偏移,避免与柱子底部重叠
|
||||||
},
|
},
|
||||||
data: ['漳州', '桐城', '合肥', '宜兴', '自贡', '洛阳']
|
data: ['6月', '7月', '8月', '9月', '10月', '11月']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
// 左侧Y轴:目标/达标/未达标(数量,单位“片”)
|
// 左侧Y轴:目标/达标/未达标(数量,单位“片”)
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '元',
|
name: this.yName,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ export default {
|
|||||||
const currentIndex = params[0].dataIndex;
|
const currentIndex = params[0].dataIndex;
|
||||||
// 使用处理后的 safeFlag,避免越界
|
// 使用处理后的 safeFlag,避免越界
|
||||||
const currentFlag = safeFlag[currentIndex] || 0;
|
const currentFlag = safeFlag[currentIndex] || 0;
|
||||||
const statusText = currentFlag === 0 ? '达标' : '不达标';
|
// const statusText = currentFlag === 0 ? '达标' : '不达标';
|
||||||
let html = `${params[0].axisValue}(${statusText})<br/>`;
|
let html = `${params[0].axisValue}<br/>`;
|
||||||
params.forEach(item => {
|
params.forEach(item => {
|
||||||
const unit = item.seriesName === '完成率' ? '%' : '万元';
|
const unit = item.seriesName === '完成率' ? '%' : '万元';
|
||||||
html += `${item.marker} ${item.seriesName}: ${item.value}${unit}<br/>`;
|
html += `${item.marker} ${item.seriesName}: ${item.value}${unit}<br/>`;
|
||||||
|
|||||||
@@ -75,16 +75,16 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 提取核心成本类型(仅保留“原片”“加工”等,去掉“成本”二字)
|
// 提取核心成本类型(仅保留“原片”“加工”等,去掉“成本”二字)
|
||||||
extractCoreCostType(name) {
|
extractCoreCostType(name) {
|
||||||
// 匹配“前缀(含分公司/工厂/区域等)+ 核心词 + 任意后缀”,提取中间核心词
|
// 匹配“前缀(含分公司/工厂/区域等)+ 核心词 + 后缀”,提取核心词+后缀
|
||||||
// 兼容后缀:成本、费用、支出、损耗等,前缀:XX分公司、XX工厂、XX区域等
|
// 兼容后缀:成本、费用、支出、损耗等,前缀:XX分公司、XX工厂、XX区域等
|
||||||
const match = name.match(/(分公司)\s*([^,。;!?]+?)\s*(成本)/);
|
const match = name.match(/(分公司)\s*([^,。;!?]+?)\s*(成本)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
return match[2].trim(); // 提取中间核心词,去除前后空格
|
// 保留核心词+后缀(去除前后空格)
|
||||||
|
return (match[2] + match[3]).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 通用匹配:无明确前缀标识时,提取“最后一个连续汉字后缀”前的内容
|
// 通用匹配:无明确前缀时,保留完整内容(原逻辑会去除末尾2个以上汉字,此处修改为保留全部)
|
||||||
const generalMatch = name.match(/(.+?)(?=[\u4e00-\u9fa5]{2,}$)/);
|
return name.trim();
|
||||||
return generalMatch ? generalMatch[1].trim() : name.trim();
|
|
||||||
},
|
},
|
||||||
// 提取地名(成本类型前的核心地区名)
|
// 提取地名(成本类型前的核心地区名)
|
||||||
extractLocation(name) {
|
extractLocation(name) {
|
||||||
@@ -92,11 +92,11 @@ export default {
|
|||||||
const match = name.match(/(.+?)分公司/);
|
const match = name.match(/(.+?)分公司/);
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
return match[1].trim() || '未知地区';
|
return match[1].trim() || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 兜底(处理不含“分公司”的情况)
|
// 兜底(处理不含“分公司”的情况)
|
||||||
return '未知地区';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="number" :style="{ color: getColorByFlag(item.flag) }">
|
<div class="number" :style="{ color: getColorByFlag(item.flag) }">
|
||||||
{{ item.value || 0 }}
|
{{ item.value || 0 }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">当前值</div>
|
<div class="title">实际值</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 进度条 + 完成率 -->
|
<!-- 进度条 + 完成率 -->
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="yield">
|
<div class="yield">
|
||||||
<span class="progress-percent">完成率</span>
|
<span class="progress-percent" :style="{ color: getColorByFlag(item.flag) }">完成率</span>
|
||||||
<!-- 完成率:动态颜色 + 百分比格式 -->
|
<!-- 完成率:动态颜色 + 百分比格式 -->
|
||||||
<span class="progress-percent progress-value" :style="{ color: getColorByFlag(item.flag) }">
|
<span class="progress-percent progress-value" :style="{ color: getColorByFlag(item.flag) }">
|
||||||
{{ getProportionPercent(item.proportion) }}%
|
{{ getProportionPercent(item.proportion) }}%
|
||||||
@@ -138,7 +138,7 @@ export default {
|
|||||||
getColorByFlag(flag, isProgressBar = false) {
|
getColorByFlag(flag, isProgressBar = false) {
|
||||||
const colorMap = {
|
const colorMap = {
|
||||||
0: {
|
0: {
|
||||||
text: 'rgba(103, 103, 103, 0.79)',
|
text: 'rgba(54, 181, 138, 1)',
|
||||||
progress: 'rgba(103, 103, 103, 0.5)' // 进度条颜色稍浅
|
progress: 'rgba(103, 103, 103, 0.5)' // 进度条颜色稍浅
|
||||||
},
|
},
|
||||||
1: {
|
1: {
|
||||||
|
|||||||
@@ -72,17 +72,29 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 提取核心成本类型(仅保留“原片”“加工”等,去掉“成本”二字)
|
// 提取核心成本类型(仅保留“原片”“加工”等,去掉“成本”二字)
|
||||||
|
// extractCoreCostType(name) {
|
||||||
|
// // 匹配“前缀(含分公司/工厂/区域等)+ 核心词 + 任意后缀”,提取中间核心词
|
||||||
|
// // 兼容后缀:成本、费用、支出、损耗等,前缀:XX分公司、XX工厂、XX区域等
|
||||||
|
// const match = name.match(/(分公司)\s*([^,。;!?]+?)\s*(成本)/);
|
||||||
|
// if (match) {
|
||||||
|
// return match[2].trim(); // 提取中间核心词,去除前后空格
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 通用匹配:无明确前缀标识时,提取“最后一个连续汉字后缀”前的内容
|
||||||
|
// const generalMatch = name.match(/(.+?)(?=[\u4e00-\u9fa5]{2,}$)/);
|
||||||
|
// return generalMatch ? generalMatch[1].trim() : name.trim();
|
||||||
|
// },
|
||||||
extractCoreCostType(name) {
|
extractCoreCostType(name) {
|
||||||
// 匹配“前缀(含分公司/工厂/区域等)+ 核心词 + 任意后缀”,提取中间核心词
|
// 匹配“前缀(含分公司/工厂/区域等)+ 核心词 + 后缀”,提取核心词+后缀
|
||||||
// 兼容后缀:成本、费用、支出、损耗等,前缀:XX分公司、XX工厂、XX区域等
|
// 兼容后缀:成本、费用、支出、损耗等,前缀:XX分公司、XX工厂、XX区域等
|
||||||
const match = name.match(/(分公司)\s*([^,。;!?]+?)\s*(成本)/);
|
const match = name.match(/(分公司)\s*([^,。;!?]+?)\s*(成本)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
return match[2].trim(); // 提取中间核心词,去除前后空格
|
// 保留核心词+后缀(去除前后空格)
|
||||||
|
return (match[2] + match[3]).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 通用匹配:无明确前缀标识时,提取“最后一个连续汉字后缀”前的内容
|
// 通用匹配:无明确前缀时,保留完整内容(原逻辑会去除末尾2个以上汉字,此处修改为保留全部)
|
||||||
const generalMatch = name.match(/(.+?)(?=[\u4e00-\u9fa5]{2,}$)/);
|
return name.trim();
|
||||||
return generalMatch ? generalMatch[1].trim() : name.trim();
|
|
||||||
},
|
},
|
||||||
// 提取地名(成本类型前的核心地区名)
|
// 提取地名(成本类型前的核心地区名)
|
||||||
extractLocation(name) {
|
extractLocation(name) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
{ prop: 'name', label: '物料名称', align: 'center' },
|
{ prop: 'name', label: '物料名称', align: 'center' },
|
||||||
{ prop: 'code', label: '物料编码', align: 'center' },
|
{ prop: 'code', label: '物料编码', align: 'center' },
|
||||||
{
|
{
|
||||||
prop: 'time', label: '领用日期', align: 'center',
|
prop: 'time', label: '入账日期', align: 'center',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
},
|
},
|
||||||
{ prop: 'num', label: '数量', align: 'center' },
|
{ prop: 'num', label: '数量', align: 'center' },
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="width: 100%;">
|
<div style="width: 100%;">
|
||||||
<Container name="趋势图" icon="cockpitItemIcon" size="operatingLarge" topSize="large">
|
<Container :name="name" icon="cockpitItemIcon" size="operatingLarge" topSize="large">
|
||||||
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
||||||
<div class="kpi-content" style="padding: 14px 16px; display: flex;width: 100%;">
|
<div class="kpi-content" style="padding: 14px 16px; display: flex;width: 100%;">
|
||||||
<div class="bottom" style="height: 420px; display: flex; width: 100%;background-color: rgba(249, 252, 255, 1);">
|
<div class="bottom" style="height: 420px; display: flex; width: 100%;background-color: rgba(249, 252, 255, 1);">
|
||||||
<!-- <top-item /> -->
|
<!-- <top-item /> -->
|
||||||
<costBar />
|
<costBar :yName="yName" :dateData="dateData" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -25,6 +25,18 @@ export default {
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => [] // 默认空数组,避免报错
|
default: () => [] // 默认空数组,避免报错
|
||||||
},
|
},
|
||||||
|
dateData: { // 接收父组件传递的设备数据数组
|
||||||
|
type: Array,
|
||||||
|
default: () => {} // 默认空数组,避免报错
|
||||||
|
},
|
||||||
|
yName: { // 接收父组件传递的设备数据数组
|
||||||
|
type: String,
|
||||||
|
default: () => '' // 默认空数组,避免报错
|
||||||
|
},
|
||||||
|
name: { // 接收父组件传递的设备数据数组
|
||||||
|
type: String,
|
||||||
|
default: () => '趋势图' // 默认空数组,避免报错
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -43,123 +55,8 @@ export default {
|
|||||||
// 初始化图表(若需展示图表,需在模板中添加对应 DOM)
|
// 初始化图表(若需展示图表,需在模板中添加对应 DOM)
|
||||||
// this.$nextTick(() => this.updateChart())
|
// this.$nextTick(() => this.updateChart())
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
|
||||||
// 销毁图表,避免内存泄漏
|
|
||||||
if (this.chart) {
|
|
||||||
this.chart.dispose()
|
|
||||||
this.chart = null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
updateChart() {
|
updateChart() {
|
||||||
// 注意:原代码中图表依赖 id 为 "productionStatusChart" 的 DOM,需在模板中补充,否则会报错
|
|
||||||
// 示例:在 Container 内添加 <div id="productionStatusChart" style="height: 200px;"></div>
|
|
||||||
if (!document.getElementById('productionStatusChart')) return
|
|
||||||
|
|
||||||
if (this.chart) this.chart.dispose()
|
|
||||||
this.chart = echarts.init(document.getElementById('productionStatusChart'))
|
|
||||||
|
|
||||||
const data = [
|
|
||||||
this.productionOverviewVo.input || 0,
|
|
||||||
this.productionOverviewVo.output || 0,
|
|
||||||
this.productionOverviewVo.ng || 0,
|
|
||||||
this.productionOverviewVo.lowValue || 0,
|
|
||||||
this.productionOverviewVo.scrap || 0,
|
|
||||||
this.productionOverviewVo.inProcess || 0,
|
|
||||||
this.productionOverviewVo.engineer || 0
|
|
||||||
]
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
type: 'bar',
|
|
||||||
grid: { left: 51, right: 40, top: 50, bottom: 45 },
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: { type: 'shadow' },
|
|
||||||
className: 'production-status-chart-tooltip'
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
offset: 8,
|
|
||||||
data: ['投入', '产出', '待判', '低价值', '报废', '在制', '实验片'],
|
|
||||||
axisTick: { show: false },
|
|
||||||
axisLine: { show: true, onZero: false, lineStyle: { color: '#00E8FF' } },
|
|
||||||
axisLabel: {
|
|
||||||
color: 'rgba(255,255,255,0.7)',
|
|
||||||
fontSize: 12,
|
|
||||||
interval: 0,
|
|
||||||
width: 38,
|
|
||||||
overflow: 'break'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
name: '单位/片',
|
|
||||||
nameTextStyle: { color: 'rgba(255,255,255,0.7)', fontSize: 14, align: 'left' },
|
|
||||||
min: () => 0,
|
|
||||||
max: (value) => Math.ceil(value.max),
|
|
||||||
scale: true,
|
|
||||||
axisTick: { show: false },
|
|
||||||
axisLabel: { color: 'rgba(255,255,255,0.7)', fontSize: 12 },
|
|
||||||
splitLine: { lineStyle: { color: 'RGBA(24, 88, 100, 0.6)', type: 'dashed' } },
|
|
||||||
axisLine: { show: true, lineStyle: { color: '#00E8FF' } }
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
type: 'pictorialBar',
|
|
||||||
label: { show: true, position: 'top', distance: -3, color: '#89CDFF', fontSize: 11 },
|
|
||||||
symbolSize: [20, 8],
|
|
||||||
symbolOffset: [0, 5],
|
|
||||||
z: 20,
|
|
||||||
itemStyle: {
|
|
||||||
borderColor: '#3588C7',
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'RGBA(22, 89, 98, 1)' },
|
|
||||||
{ offset: 1, color: '#3588C7' }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
data: data
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'bar',
|
|
||||||
barWidth: 20,
|
|
||||||
itemStyle: {
|
|
||||||
borderWidth: 1,
|
|
||||||
borderColor: '#3588C7',
|
|
||||||
opacity: 0.8,
|
|
||||||
color: {
|
|
||||||
x: 0, y: 0, x2: 0, y2: 1,
|
|
||||||
type: 'linear',
|
|
||||||
global: false,
|
|
||||||
colorStops: [
|
|
||||||
{ offset: 0, color: 'rgba(73,178,255,0)' },
|
|
||||||
{ offset: 0.5, color: 'rgba(0, 232, 255, .5)' },
|
|
||||||
{ offset: 1, color: 'rgba(0, 232, 255, 1)' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tooltip: { show: false },
|
|
||||||
data: data
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'pictorialBar',
|
|
||||||
symbolSize: [20, 8],
|
|
||||||
symbolOffset: [0, -4],
|
|
||||||
z: 12,
|
|
||||||
symbolPosition: 'end',
|
|
||||||
itemStyle: {
|
|
||||||
borderColor: 'rgba(0, 232, 255, 1)',
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'RGBA(22, 89, 98, 1)' },
|
|
||||||
{ offset: 1, color: '#3588C7' }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
tooltip: { show: false },
|
|
||||||
data: data
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
this.chart.setOption(option)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<div class="middle-line"></div>
|
<div class="middle-line"></div>
|
||||||
<div class="value-item">
|
<div class="value-item">
|
||||||
<div class="number">{{ item.currentValue }}</div>
|
<div class="number">{{ item.currentValue }}</div>
|
||||||
<div class="title">当前值</div>
|
<div class="title">实际值</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 进度条 + 完成率 -->
|
<!-- 进度条 + 完成率 -->
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<div class="number" :style="{ color: item.flag === 1 ? '#36B58A' : '#F9A44A' }">
|
<div class="number" :style="{ color: item.flag === 1 ? '#36B58A' : '#F9A44A' }">
|
||||||
{{ item.value }}
|
{{ item.value }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">当前值</div>
|
<div class="title">实际值</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress-yield-group">
|
<div class="progress-yield-group">
|
||||||
|
|||||||
@@ -73,16 +73,16 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 提取核心成本类型(仅保留“原片”“加工”等,去掉“成本”二字)
|
// 提取核心成本类型(仅保留“原片”“加工”等,去掉“成本”二字)
|
||||||
extractCoreCostType(name) {
|
extractCoreCostType(name) {
|
||||||
// 匹配“前缀(含分公司/工厂/区域等)+ 核心词 + 任意后缀”,提取中间核心词
|
// 匹配“前缀(含分公司/工厂/区域等)+ 核心词 + 后缀”,提取核心词+后缀
|
||||||
// 兼容后缀:成本、费用、支出、损耗等,前缀:XX分公司、XX工厂、XX区域等
|
// 兼容后缀:成本、费用、支出、损耗等,前缀:XX分公司、XX工厂、XX区域等
|
||||||
const match = name.match(/(分公司)\s*([^,。;!?]+?)\s*(成本)/);
|
const match = name.match(/(分公司)\s*([^,。;!?]+?)\s*(成本)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
return match[2].trim(); // 提取中间核心词,去除前后空格
|
// 保留核心词+后缀(去除前后空格)
|
||||||
|
return (match[2] + match[3]).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 通用匹配:无明确前缀标识时,提取“最后一个连续汉字后缀”前的内容
|
// 通用匹配:无明确前缀时,保留完整内容(原逻辑会去除末尾2个以上汉字,此处修改为保留全部)
|
||||||
const generalMatch = name.match(/(.+?)(?=[\u4e00-\u9fa5]{2,}$)/);
|
return name.trim();
|
||||||
return generalMatch ? generalMatch[1].trim() : name.trim();
|
|
||||||
},
|
},
|
||||||
// 提取地名(成本类型前的核心地区名)
|
// 提取地名(成本类型前的核心地区名)
|
||||||
extractLocation(name) {
|
extractLocation(name) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="number" :style="{ color: getColorByFlag(item.flag) }">
|
<div class="number" :style="{ color: getColorByFlag(item.flag) }">
|
||||||
{{ item.value || 0 }}
|
{{ item.value || 0 }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">当前值</div>
|
<div class="title">实际值</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 进度条 + 完成率 -->
|
<!-- 进度条 + 完成率 -->
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="yield">
|
<div class="yield">
|
||||||
<span class="progress-percent">完成率</span>
|
<span class="progress-percent" :style="{ color: getColorByFlag(item.flag) }">完成率</span>
|
||||||
<!-- 完成率:动态颜色 + 百分比格式 -->
|
<!-- 完成率:动态颜色 + 百分比格式 -->
|
||||||
<span class="progress-percent progress-value" :style="{ color: getColorByFlag(item.flag) }">
|
<span class="progress-percent progress-value" :style="{ color: getColorByFlag(item.flag) }">
|
||||||
{{ getProportionPercent(item.proportion) }}%
|
{{ getProportionPercent(item.proportion) }}%
|
||||||
@@ -134,7 +134,7 @@ export default {
|
|||||||
getColorByFlag(flag, isProgressBar = false) {
|
getColorByFlag(flag, isProgressBar = false) {
|
||||||
const colorMap = {
|
const colorMap = {
|
||||||
1: {
|
1: {
|
||||||
text: 'rgba(103, 103, 103, 0.79)',
|
text: 'rgba(54, 181, 138, 1)',
|
||||||
progress: 'rgba(103, 103, 103, 0.5)' // 进度条颜色稍浅
|
progress: 'rgba(103, 103, 103, 0.5)' // 进度条颜色稍浅
|
||||||
},
|
},
|
||||||
0: {
|
0: {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default {
|
|||||||
interval: 0,
|
interval: 0,
|
||||||
padding: [5, 0, 0, 0] // 标签向下偏移,避免与柱子底部重叠
|
padding: [5, 0, 0, 0] // 标签向下偏移,避免与柱子底部重叠
|
||||||
},
|
},
|
||||||
data: ['漳州', '桐城', '合肥', '宜兴', '自贡', '洛阳']
|
data: ['6月', '7月', '8月', '9月', '10月', '11月']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="number">{{ item.currentValue }}</div>
|
<div class="number">{{ item.currentValue }}</div>
|
||||||
<div class="title">当前值</div>
|
<div class="title">实际值</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 进度条和百分比 -->
|
<!-- 进度条和百分比 -->
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<profitLineChart :trendData="trendData" />
|
<profitLineChart :yName="'元/㎡'" :trendData="trendData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -180,13 +180,13 @@ export default {
|
|||||||
};
|
};
|
||||||
// 调用接口
|
// 调用接口
|
||||||
getCostAnalysisXXCostList(requestParams).then((res) => {
|
getCostAnalysisXXCostList(requestParams).then((res) => {
|
||||||
this.itemData = res.data[1].map((item) => {
|
this.itemData = res.data[0].map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
route: 'singleFuelAnalysis'
|
route: 'singleFuelAnalysis'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.trendData= res.data[0]
|
this.trendData= res.data[1]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<profitLineChart :trendData="trendData" />
|
<profitLineChart :yName="'元/㎡'" :trendData="trendData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -180,13 +180,13 @@ export default {
|
|||||||
};
|
};
|
||||||
// 调用接口
|
// 调用接口
|
||||||
getCostAnalysisXXCostList(requestParams).then((res) => {
|
getCostAnalysisXXCostList(requestParams).then((res) => {
|
||||||
this.itemData = res.data[1].map((item) => {
|
this.itemData = res.data[0].map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
route: 'singlecombustionPowerAnalysis'
|
route: 'singlecombustionPowerAnalysis'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.trendData = res.data[0]
|
this.trendData = res.data[1]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<profitLineChart :trendData="trendData" />
|
<profitLineChart :yName="'元/㎡'" :trendData="trendData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -180,13 +180,13 @@ export default {
|
|||||||
};
|
};
|
||||||
// 调用接口
|
// 调用接口
|
||||||
getCostAnalysisXXCostList(requestParams).then((res) => {
|
getCostAnalysisXXCostList(requestParams).then((res) => {
|
||||||
this.itemData = res.data[1].map((item) => {
|
this.itemData = res.data[0].map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
route: 'singlePackingAnalysis'
|
route: 'singlePackingAnalysis'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.trendData = res.data[0]
|
this.trendData = res.data[1]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<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 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;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<profitLineChart :trendData="trendData" />
|
<profitLineChart :yName="'元/㎡'" :trendData="trendData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -180,13 +180,13 @@ export default {
|
|||||||
};
|
};
|
||||||
// 调用接口
|
// 调用接口
|
||||||
getCostAnalysisXXCostList(requestParams).then((res) => {
|
getCostAnalysisXXCostList(requestParams).then((res) => {
|
||||||
this.itemData = res.data[1].map((item) => {
|
this.itemData = res.data[0].map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
route: 'singleProductionCostsAnalysis'
|
route: 'singleProductionCostsAnalysis'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.trendData = res.data[0]
|
this.trendData = res.data[1]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +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" top-title="利润影响额分析" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
<ReportHeader size="psi" top-title="利润影响额分析" :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;
|
||||||
@@ -17,10 +16,10 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<changeBase />
|
<singleTopSelect typeName="分析对象" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top" style="display: flex; gap: 16px;margin-top: -20px;">
|
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
|
||||||
<div class="left-three" style="
|
<div class="left-three" style="
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
@@ -35,7 +34,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<profitLineChart />
|
<profitLineChart :name=" '总利润趋势图·元' " :yName="'元' " />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,7 +56,7 @@ import changeBase from "./costComponents/changeBase";
|
|||||||
import totalProfit from "./costComponents/totalProfit.vue";
|
import totalProfit from "./costComponents/totalProfit.vue";
|
||||||
import profitLineChart from "./costComponents/profitLineChart.vue";
|
import profitLineChart from "./costComponents/profitLineChart.vue";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
|
import singleTopSelect from "./costComponents/singleTopSelect.vue";
|
||||||
// import PSDO from "./components/PSDO.vue";
|
// import PSDO from "./components/PSDO.vue";
|
||||||
// import psiLineChart from "./components/psiLineChart.vue";
|
// import psiLineChart from "./components/psiLineChart.vue";
|
||||||
|
|
||||||
@@ -71,7 +70,7 @@ export default {
|
|||||||
name: "DayReport",
|
name: "DayReport",
|
||||||
components: {
|
components: {
|
||||||
ReportHeader,
|
ReportHeader,
|
||||||
changeBase,
|
singleTopSelect,
|
||||||
profitLineChart,
|
profitLineChart,
|
||||||
totalProfit,
|
totalProfit,
|
||||||
Sidebar,
|
Sidebar,
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<profitLineChart />
|
<profitLineChart :yName="'元/㎡'" :dateData="dateData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,6 +85,7 @@ export default {
|
|||||||
beilv: 1,
|
beilv: 1,
|
||||||
value: 100,
|
value: 100,
|
||||||
coreProductVisualAlarmVO: [],
|
coreProductVisualAlarmVO: [],
|
||||||
|
dateData:{},
|
||||||
itemData: [],
|
itemData: [],
|
||||||
trendData: [],
|
trendData: [],
|
||||||
};
|
};
|
||||||
@@ -152,6 +153,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData(obj) {
|
getData(obj) {
|
||||||
|
this.dateData = obj
|
||||||
getCostAnalysisXXCostList({
|
getCostAnalysisXXCostList({
|
||||||
startTime: "1762704000290",
|
startTime: "1762704000290",
|
||||||
endTime: "1762790399290",
|
endTime: "1762790399290",
|
||||||
@@ -159,13 +161,13 @@ export default {
|
|||||||
trendName: "原料成本",
|
trendName: "原料成本",
|
||||||
levelId: 2
|
levelId: 2
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.itemData = res.data[1].map((item) => {
|
this.itemData = res.data[0].map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
route:'singleRawMaterialAnalysis'
|
route:'singleRawMaterialAnalysis'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.trendData = res.data[0]
|
this.trendData = res.data[1]
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 804px 804px;
|
grid-template-columns: 804px 804px;
|
||||||
">
|
">
|
||||||
<topLeftChart :name=" '采购单价·元/㎡' " />
|
<topLeftChart :name=" '采购单价·元/m³' " />
|
||||||
<topRightChart :name="'消耗量·㎡'" />
|
<topRightChart :name="'消耗量·m³'" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 804px 804px;
|
grid-template-columns: 804px 804px;
|
||||||
">
|
">
|
||||||
<bottomLeftChart :name="'单项趋势'" />
|
<bottomLeftChart :name="'单耗趋势·m³/㎡'" />
|
||||||
<bottomLeftChart :name="'产量·㎡'" />
|
<bottomLeftChart :name="'产量·㎡'" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 804px 804px;
|
grid-template-columns: 804px 804px;
|
||||||
">
|
">
|
||||||
<bottomLeftChart :name="'单项趋势'" />
|
<bottomLeftChart :name="'单耗趋势·只/㎡'" />
|
||||||
<bottomLeftChart :name="'产量·㎡'" />
|
<bottomLeftChart :name="'产量·㎡'" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
grid-template-columns:804px 804px;
|
grid-template-columns:804px 804px;
|
||||||
">
|
">
|
||||||
<productItemOverviewItem :parentItemList="itemLeftList" :title=" '领用汇总' " />
|
<productItemOverviewItem :parentItemList="itemLeftList" :title=" '领用汇总' " />
|
||||||
<productItemOverviewItem :parentItemList="itemRightList" :title="'入库汇总'" />
|
<productItemOverviewItem :parentItemList="itemRightList" :title="'入账汇总'" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 804px 804px;
|
grid-template-columns: 804px 804px;
|
||||||
">
|
">
|
||||||
<bottomLeftChart :name="'单项趋势'" />
|
<bottomLeftChart :name="'单耗趋势·吨/㎡'" />
|
||||||
<bottomLeftChart :name="'产量·㎡'" />
|
<bottomLeftChart :name="'产量·㎡'" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 804px 804px;
|
grid-template-columns: 804px 804px;
|
||||||
">
|
">
|
||||||
<bottomLeftChart :name="'单项趋势'" />
|
<bottomLeftChart :name="'单耗趋势·吨/㎡'" />
|
||||||
<bottomLeftChart :name="'产量·㎡'" />
|
<bottomLeftChart :name="'产量·㎡'" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user