应收账款等4个新增页面
This commit is contained in:
4
.env.dev
4
.env.dev
@@ -10,11 +10,11 @@ VUE_APP_TITLE = 洛玻集团驾驶舱
|
|||||||
# VUE_APP_BASE_API = 'http://172.16.33.83:7070'
|
# VUE_APP_BASE_API = 'http://172.16.33.83:7070'
|
||||||
|
|
||||||
# 杨姗姗
|
# 杨姗姗
|
||||||
VUE_APP_BASE_API = 'http://172.16.20.218:7070'
|
# VUE_APP_BASE_API = 'http://172.16.20.218:7070'
|
||||||
# 小田
|
# 小田
|
||||||
# VUE_APP_BASE_API = 'http://172.16.19.232:7070'
|
# VUE_APP_BASE_API = 'http://172.16.19.232:7070'
|
||||||
# 测试
|
# 测试
|
||||||
# VUE_APP_BASE_API = 'http://192.168.0.35:8080'
|
VUE_APP_BASE_API = 'http://192.168.0.35:8080'
|
||||||
# 闫阳
|
# 闫阳
|
||||||
# VUE_APP_BASE_API = 'http://172.16.19.131:7070'
|
# VUE_APP_BASE_API = 'http://172.16.19.131:7070'
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
|
|||||||
'/procurementGainAnalysis',
|
'/procurementGainAnalysis',
|
||||||
'/fullCostAnalysis',
|
'/fullCostAnalysis',
|
||||||
'/electricityCostAnalysis',
|
'/electricityCostAnalysis',
|
||||||
// '/expenseAnalysis',
|
|
||||||
"/cost", // cost 根路由
|
"/cost", // cost 根路由
|
||||||
"/cost/profitImpactAnalysis", // cost 子菜单(完整路径)
|
"/cost/profitImpactAnalysis", // cost 子菜单(完整路径)
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ getRateFlag(rate, real, target) {
|
|||||||
if (rate >= 100) return 1;
|
if (rate >= 100) return 1;
|
||||||
|
|
||||||
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
||||||
if (rate === 0 && target === 0) return 1;
|
// if (rate === 0 && target === 0) return 1;
|
||||||
|
|
||||||
// 其他情况 => 未达标
|
// 其他情况 => 未达标
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ getRateFlag(rate, real, target) {
|
|||||||
if (rate >= 100) return 1;
|
if (rate >= 100) return 1;
|
||||||
|
|
||||||
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
||||||
if (rate === 0 && target === 0) return 1;
|
// if (rate === 0 && target === 0) return 1;
|
||||||
|
|
||||||
// 其他情况 => 未达标
|
// 其他情况 => 未达标
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export default {
|
|||||||
label: { backgroundColor: '#6a7985' }
|
label: { backgroundColor: '#6a7985' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: { top: 35, bottom: 3, right: 15, left: 15, containLabel: true},
|
grid: { top: 35, bottom: 3, right: 15, left: 18, containLabel: true},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<span class="legend-text">未完成</span>
|
<span class="legend-text">未完成</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<base-table style="height: 204px;" :page="1" :limit="10" :show-index="true" :beilv="1"
|
<base-table style="height: 204px;" :page="1" :limit="10000" :show-index="true" :beilv="1"
|
||||||
:tableConfig="tableProps" :table-data="tableData" />
|
:tableConfig="tableProps" :table-data="tableData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export default {
|
|||||||
selectDate:{},
|
selectDate:{},
|
||||||
monthData: {},
|
monthData: {},
|
||||||
ytdData:{},
|
ytdData:{},
|
||||||
|
dateData:{}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,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,
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ export default {
|
|||||||
// 左侧Y轴:营业收入、成本(单位万元)
|
// 左侧Y轴:营业收入、成本(单位万元)
|
||||||
{
|
{
|
||||||
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,
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ getRateFlag(rate, real, target) {
|
|||||||
if (rate >= 100) return 1;
|
if (rate >= 100) return 1;
|
||||||
|
|
||||||
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
||||||
if (rate === 0 && target === 0) return 1;
|
// if (rate === 0 && target === 0) return 1;
|
||||||
|
|
||||||
// 其他情况 => 未达标
|
// 其他情况 => 未达标
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -36,12 +36,12 @@ import ReportHeader from "../components/noRouterHeader.vue";
|
|||||||
import { Sidebar } from "../../../layout/components";
|
import { Sidebar } from "../../../layout/components";
|
||||||
import screenfull from "screenfull";
|
import screenfull from "screenfull";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import operatingLineChart from "../accountsReceivableComponents/operatingLineChart";
|
import operatingLineChart from "../electricityCostAnalysisComponents/operatingLineChart";
|
||||||
import operatingLineChartCumulative from "../accountsReceivableComponents/operatingLineChartCumulative.vue";
|
import operatingLineChartCumulative from "../electricityCostAnalysisComponents/operatingLineChartCumulative.vue";
|
||||||
|
|
||||||
import { getElectricityCostAnalysisData } from '@/api/cockpit'
|
import { getElectricityCostAnalysisData } from '@/api/cockpit'
|
||||||
export default {
|
export default {
|
||||||
name: "AccountsReceivable",
|
name: "electricityCostAnalysis",
|
||||||
components: {
|
components: {
|
||||||
ReportHeader,
|
ReportHeader,
|
||||||
operatingLineChartCumulative,
|
operatingLineChartCumulative,
|
||||||
@@ -140,19 +140,11 @@ export default {
|
|||||||
index: undefined,
|
index: undefined,
|
||||||
factory: undefined
|
factory: undefined
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log('res==============================',res);
|
|
||||||
this.monthData= res.data.month
|
this.monthData= res.data.month
|
||||||
this.ytdData = res.data.ytd
|
this.ytdData = res.data.ytd
|
||||||
|
|
||||||
// this.saleData = res.data.SaleData
|
|
||||||
// this.premiumProduct = res.data.premiumProduct
|
|
||||||
// this.salesTrendMap = res.data.salesTrendMap
|
|
||||||
// this.grossMarginTrendMap = res.data.grossMarginTrendMap
|
|
||||||
// this.salesProportion = res.data.salesProportion ? res.data.salesProportion : {}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
console.log(obj, 'obj');
|
|
||||||
this.dateData= obj
|
this.dateData= obj
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ import moment from "moment";
|
|||||||
// import html2canvas from 'html2canvas'
|
// import html2canvas from 'html2canvas'
|
||||||
// import JsPDF from 'jspdf'
|
// import JsPDF from 'jspdf'
|
||||||
export default {
|
export default {
|
||||||
name: "DayReport",
|
name: "electricityCostAnalysisBase",
|
||||||
components: {
|
components: {
|
||||||
ReportHeader,
|
ReportHeader,
|
||||||
changeBase,
|
changeBase,
|
||||||
@@ -107,7 +107,7 @@ export default {
|
|||||||
monData: {},
|
monData: {},
|
||||||
totalData: {},
|
totalData: {},
|
||||||
trend: [],
|
trend: [],
|
||||||
relatedData: [],
|
relatedData: {},
|
||||||
trendName: '原片电费',
|
trendName: '原片电费',
|
||||||
// cusProData: {},
|
// cusProData: {},
|
||||||
};
|
};
|
||||||
@@ -201,7 +201,7 @@ export default {
|
|||||||
endTime: this.dateData.endTime,
|
endTime: this.dateData.endTime,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
index: this.trendName,
|
index: this.trendName,
|
||||||
factory: null
|
factory: this.factory
|
||||||
};
|
};
|
||||||
// 调用接口
|
// 调用接口
|
||||||
getElectricityCostAnalysisFData(requestParams).then((res) => {
|
getElectricityCostAnalysisFData(requestParams).then((res) => {
|
||||||
@@ -211,7 +211,7 @@ export default {
|
|||||||
relatedMon: res.data.monthAnalysis,
|
relatedMon: res.data.monthAnalysis,
|
||||||
relatedTotal: res.data.ytdAnalysis
|
relatedTotal: res.data.ytdAnalysis
|
||||||
}
|
}
|
||||||
this.trend = res.data.dataTrend
|
this.trend = res.data.trend
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
|
|||||||
@@ -51,16 +51,14 @@ export default {
|
|||||||
|
|
||||||
// 遍历传入的 trendData 数组(响应式依赖,变化时自动重算)
|
// 遍历传入的 trendData 数组(响应式依赖,变化时自动重算)
|
||||||
this.trendData.forEach((item) => {
|
this.trendData.forEach((item) => {
|
||||||
// 1. 格式化时间并推入时间数组
|
timeArr.push(item.title);
|
||||||
const yearMonth = this.formatTimeToYearMonth(item.time);
|
|
||||||
timeArr.push(yearMonth);
|
|
||||||
|
|
||||||
// 2. 提取其他字段,兜底为0(防止null/undefined影响图表渲染)
|
// 2. 提取其他字段,兜底为0(防止null/undefined影响图表渲染)
|
||||||
valueArr.push(item.value ?? 0);
|
valueArr.push(item.real ?? 0);
|
||||||
diffValueArr.push(item.diffValue ?? 0);
|
diffValueArr.push(item.diff ?? 0);
|
||||||
targetValueArr.push(item.targetValue ?? 0);
|
targetValueArr.push(item.budget ?? 0);
|
||||||
proportionArr.push(item.proportion ?? 0);
|
proportionArr.push(item.rate ?? 0);
|
||||||
completedArr.push(item.completed ?? 0);
|
completedArr.push(item.rate && item.rate>=100 ? 1 : 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 组装并返回格式化后的数据(结构与原一致)
|
// 组装并返回格式化后的数据(结构与原一致)
|
||||||
@@ -81,15 +79,6 @@ export default {
|
|||||||
* @param {Number} timestamp 13位毫秒级时间戳
|
* @param {Number} timestamp 13位毫秒级时间戳
|
||||||
* @returns {String} 格式化后的年月字符串(如:2025-10)
|
* @returns {String} 格式化后的年月字符串(如:2025-10)
|
||||||
*/
|
*/
|
||||||
formatTimeToYearMonth(timestamp) {
|
|
||||||
if (!timestamp || isNaN(timestamp)) {
|
|
||||||
return ""; // 容错:非有效时间戳返回空字符串
|
|
||||||
}
|
|
||||||
const date = new Date(timestamp);
|
|
||||||
const year = date.getFullYear();
|
|
||||||
const month = String(date.getMonth() + 1).padStart(2, "0"); // 月份从0开始,补0至2位
|
|
||||||
return `${year}-${month}`;
|
|
||||||
},
|
|
||||||
getData(value) {
|
getData(value) {
|
||||||
this.$emit('getData', value)
|
this.$emit('getData', value)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<div class="dropdown-options" v-if="isDropdownShow">
|
<div class="dropdown-options" v-if="isDropdownShow">
|
||||||
<div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index"
|
<div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index"
|
||||||
@click.stop="selectProfit(item)">
|
@click.stop="selectProfit(item)">
|
||||||
{{ item }}
|
{{ item.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,20 +60,19 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isDropdownShow: false,
|
isDropdownShow: false,
|
||||||
selectedProfit: '原片电费', // 选中的名称,初始为null
|
selectedProfit: '总电费', // 选中的名称,初始为null
|
||||||
profitOptions:[
|
profitOptions:[
|
||||||
'原片电费',
|
{name:'总电费',unit:'万元'},
|
||||||
'加工电费',
|
{name:'原片电费',unit:'万元'},
|
||||||
'外围电费',
|
{name:'加工电费',unit:'万元'},
|
||||||
'发电量',
|
{name:'外围电费',unit:'万元'},
|
||||||
'日均发电量'
|
{name:'发电量',unit:'度'},
|
||||||
]
|
{name:'日均发电量',unit:'度'}
|
||||||
|
],
|
||||||
|
unit:'万元',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// profitOptions() {
|
|
||||||
// return this.categoryData.map(item => item.name) || [];
|
|
||||||
// },
|
|
||||||
currentDataSource() {
|
currentDataSource() {
|
||||||
return this.chartData
|
return this.chartData
|
||||||
},
|
},
|
||||||
@@ -89,6 +88,7 @@ export default {
|
|||||||
|
|
||||||
const salesData = {
|
const salesData = {
|
||||||
allPlaceNames: this.locations,
|
allPlaceNames: this.locations,
|
||||||
|
unit: this.unit,
|
||||||
series: [
|
series: [
|
||||||
// 1. 完成率(折线图)
|
// 1. 完成率(折线图)
|
||||||
{
|
{
|
||||||
@@ -247,9 +247,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectProfit(item) {
|
selectProfit(item) {
|
||||||
this.selectedProfit = item;
|
this.selectedProfit = item.name;
|
||||||
|
this.unit = item.unit;
|
||||||
this.isDropdownShow = false;
|
this.isDropdownShow = false;
|
||||||
this.$emit('handleGetItemData', item)
|
this.$emit('handleGetItemData', item.name)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ export default {
|
|||||||
const data = this.currentDataSource;
|
const data = this.currentDataSource;
|
||||||
const salesData = {
|
const salesData = {
|
||||||
allPlaceNames: this.locations,
|
allPlaceNames: this.locations,
|
||||||
|
unit:'万元',
|
||||||
series: [
|
series: [
|
||||||
// 完成率(折线图)
|
// 完成率(折线图)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export default {
|
|||||||
|
|
||||||
// 路由跳转时携带序号(或名称+序号)
|
// 路由跳转时携带序号(或名称+序号)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: 'totalProfitBase',
|
path: 'electricityCostAnalysisBase',
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
query: { // 使用query传递参数(推荐),也可使用params
|
||||||
// baseName: itemName,
|
// baseName: itemName,
|
||||||
factory: baseIndex,
|
factory: baseIndex,
|
||||||
@@ -119,7 +119,7 @@ export default {
|
|||||||
return; // 实例未初始化则返回
|
return; // 实例未初始化则返回
|
||||||
}
|
}
|
||||||
|
|
||||||
const { allPlaceNames, series } = this.chartData || {};
|
const { allPlaceNames,unit, series } = this.chartData || {};
|
||||||
const xData = allPlaceNames || [];
|
const xData = allPlaceNames || [];
|
||||||
const chartSeries = series || [];
|
const chartSeries = series || [];
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ export default {
|
|||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '万元',
|
name: unit,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: 'rgba(0, 0, 0, 0.45)',
|
color: 'rgba(0, 0, 0, 0.45)',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ export default {
|
|||||||
name: "ProductionStatus",
|
name: "ProductionStatus",
|
||||||
components: { Container, operatingBar, operatingTopBar },
|
components: { Container, operatingBar, operatingTopBar },
|
||||||
props: {
|
props: {
|
||||||
monData: {
|
monthData: {
|
||||||
type: Array,
|
type: Object,
|
||||||
default: () => [],
|
default: () => {},
|
||||||
},
|
},
|
||||||
dateData: {
|
dateData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -92,7 +92,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
monData: {
|
monthData: {
|
||||||
handler() {
|
handler() {
|
||||||
this.processChartData();
|
this.processChartData();
|
||||||
},
|
},
|
||||||
@@ -104,52 +104,48 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 核心方法:按levelId匹配地名生成locations
|
* 核心方法:按levelId匹配地名生成locations
|
||||||
*/
|
*/
|
||||||
|
getRateFlag(rate, real, target) {
|
||||||
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
|
|
||||||
|
// 1. 完成率 >= 100 => 达标
|
||||||
|
if (rate >= 100) return 1;
|
||||||
|
|
||||||
|
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
||||||
|
// if (rate === 0 && target === 0) return 1;
|
||||||
|
|
||||||
|
// 其他情况 => 未达标
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
processChartData() {
|
processChartData() {
|
||||||
// 初始化空数据结构
|
// 初始化空数据结构
|
||||||
const initTopBarData = {
|
const initTopBarData = {
|
||||||
locations: [], diff: [], targets: [], reals: [], rate: [], flags: []
|
locations: [], diff: [], targets: [], reals: [], rate: [], flags: []
|
||||||
};
|
};
|
||||||
const initBarData = { locations: [], diff: [], targets: [], reals: [], rate: [], flags: [] };
|
const initBarData = { locations: [], diff: [], targets: [], reals: [], rate: [], flags: [] };
|
||||||
|
|
||||||
if (!Array.isArray(this.monData) || this.monData.length === 0) {
|
|
||||||
this.chartData = { topBarData: initTopBarData, barData: initBarData };
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1. 处理levelId=1的整合数据(逻辑不变)
|
// 1. 处理levelId=1的整合数据(逻辑不变)
|
||||||
const level1Data = this.monData.filter(item => item.levelId === 1);
|
const level1Data = this.monthData.group;
|
||||||
|
if (!level1Data) return;
|
||||||
const topBarData = { ...initTopBarData };
|
const topBarData = { ...initTopBarData };
|
||||||
level1Data.forEach(item => {
|
topBarData.locations = ["凯盛新能"];
|
||||||
if (!item.name) return;
|
topBarData.diff.push(level1Data.diff || 0);
|
||||||
topBarData.locations = ["凯盛新能"]; // levelId=1固定为凯盛新能
|
|
||||||
topBarData.diff.push(item.diffValue || 0);
|
|
||||||
topBarData.targets.push(item.targetValue || 0);
|
|
||||||
topBarData.reals.push(item.value || 0);
|
|
||||||
topBarData.rate.push(item.proportion || 0);
|
|
||||||
topBarData.flags.push(item.completed ? 1 : 0);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
topBarData.targets.push(level1Data.target || 0);
|
||||||
|
topBarData.reals.push(level1Data.real || 0);
|
||||||
|
topBarData.rate.push(level1Data.rate || 0);
|
||||||
|
topBarData.flags.push(this.getRateFlag(level1Data.rate, level1Data.real, level1Data.target));
|
||||||
// 2. 处理levelId≠1的整合数据(核心:levelId匹配地名)
|
// 2. 处理levelId≠1的整合数据(核心:levelId匹配地名)
|
||||||
const barData = { ...initBarData };
|
const barData = { ...initBarData };
|
||||||
// 筛选有效数据:levelId≠1 且 levelId在baseIndexToNameMap中
|
// 筛选有效数据:levelId≠1 且 levelId在baseIndexToNameMap中
|
||||||
const validOtherData = this.monData.filter(item => {
|
const validOtherData = this.monthData.factory
|
||||||
return item.levelId !== 1 && baseIndexToNameMap.hasOwnProperty(item.levelId);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 遍历有效数据,填充locations(levelId→地名)
|
// 遍历有效数据,填充locations(levelId→地名)
|
||||||
validOtherData.forEach(item => {
|
validOtherData.forEach(item => {
|
||||||
// 根据levelId(序号)从映射表获取对应地名
|
barData.locations.push(item.title); // locations=levelId对应的地名(如levelId=7→宜兴)
|
||||||
const baseName = baseIndexToNameMap[item.levelId];
|
barData.diff.push(item.diff || 0);
|
||||||
if (baseName) { // 确保地名和原始名称有效
|
barData.targets.push(item.target || 0);
|
||||||
// barData.names.push(item.name); // 保留monData中的原始名称
|
barData.reals.push(item.real || 0);
|
||||||
barData.locations.push(baseName); // locations=levelId对应的地名(如levelId=7→宜兴)
|
barData.rate.push(item.rate || 0);
|
||||||
barData.diff.push(item.diffValue || 0);
|
barData.flags.push(this.getRateFlag(item.rate, item.real, item.target));
|
||||||
barData.targets.push(item.targetValue || 0);
|
|
||||||
barData.reals.push(item.value || 0);
|
|
||||||
barData.rate.push(item.proportion || 0);
|
|
||||||
barData.flags.push(item.completed ? 1 : 0);
|
|
||||||
// barData.baseIndexes.push(Number(item.levelId) || 0); // 序号转数字
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 3. 更新chartData
|
// 3. 更新chartData
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ export default {
|
|||||||
name: "ProductionStatus",
|
name: "ProductionStatus",
|
||||||
components: { Container, operatingBar, operatingTopBar },
|
components: { Container, operatingBar, operatingTopBar },
|
||||||
props: {
|
props: {
|
||||||
totalData: {
|
ytdData: {
|
||||||
type: Array,
|
type: Object,
|
||||||
default: () => [],
|
default: () => {},
|
||||||
},
|
},
|
||||||
dateData: {
|
dateData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -92,7 +92,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
totalData: {
|
ytdData: {
|
||||||
handler() {
|
handler() {
|
||||||
this.processChartData();
|
this.processChartData();
|
||||||
},
|
},
|
||||||
@@ -104,6 +104,18 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 核心方法:按levelId匹配地名生成locations
|
* 核心方法:按levelId匹配地名生成locations
|
||||||
*/
|
*/
|
||||||
|
getRateFlag(rate, real, target) {
|
||||||
|
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||||
|
|
||||||
|
// 1. 完成率 >= 100 => 达标
|
||||||
|
if (rate >= 100) return 1;
|
||||||
|
|
||||||
|
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
||||||
|
// if (rate === 0 && target === 0) return 1;
|
||||||
|
|
||||||
|
// 其他情况 => 未达标
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
processChartData() {
|
processChartData() {
|
||||||
// 初始化空数据结构
|
// 初始化空数据结构
|
||||||
const initTopBarData = {
|
const initTopBarData = {
|
||||||
@@ -111,45 +123,30 @@ export default {
|
|||||||
};
|
};
|
||||||
const initBarData = { locations: [], diff: [], targets: [], reals: [], rate: [], flags: [] };
|
const initBarData = { locations: [], diff: [], targets: [], reals: [], rate: [], flags: [] };
|
||||||
|
|
||||||
if (!Array.isArray(this.totalData) || this.totalData.length === 0) {
|
|
||||||
this.chartData = { topBarData: initTopBarData, barData: initBarData };
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1. 处理levelId=1的整合数据(逻辑不变)
|
// 1. 处理levelId=1的整合数据(逻辑不变)
|
||||||
const level1Data = this.totalData.filter(item => item.levelId === 1);
|
const level1Data = this.ytdData.group;
|
||||||
|
if (!level1Data) return;
|
||||||
const topBarData = { ...initTopBarData };
|
const topBarData = { ...initTopBarData };
|
||||||
level1Data.forEach(item => {
|
topBarData.locations = ["凯盛新能"];
|
||||||
if (!item.name) return;
|
topBarData.diff.push(level1Data.diff || 0);
|
||||||
topBarData.locations = ["凯盛新能"]; // levelId=1固定为凯盛新能
|
topBarData.targets.push(level1Data.target || 0);
|
||||||
topBarData.diff.push(item.diffValue || 0);
|
topBarData.reals.push(level1Data.real || 0);
|
||||||
topBarData.targets.push(item.targetValue || 0);
|
topBarData.rate.push(level1Data.rate || 0);
|
||||||
topBarData.reals.push(item.value || 0);
|
topBarData.flags.push(this.getRateFlag(level1Data.rate, level1Data.real, level1Data.target));
|
||||||
topBarData.rate.push(item.proportion || 0);
|
|
||||||
topBarData.flags.push(item.completed ? 1 : 0);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 2. 处理levelId≠1的整合数据(核心:levelId匹配地名)
|
// 2. 处理levelId≠1的整合数据(核心:levelId匹配地名)
|
||||||
const barData = { ...initBarData };
|
const barData = { ...initBarData };
|
||||||
// 筛选有效数据:levelId≠1 且 levelId在baseIndexToNameMap中
|
// 筛选有效数据:levelId≠1 且 levelId在baseIndexToNameMap中
|
||||||
const validOtherData = this.totalData.filter(item => {
|
const validOtherData = this.ytdData.factory
|
||||||
return item.levelId !== 1 && baseIndexToNameMap.hasOwnProperty(item.levelId);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 遍历有效数据,填充locations(levelId→地名)
|
// 遍历有效数据,填充locations(levelId→地名)
|
||||||
validOtherData.forEach(item => {
|
validOtherData.forEach(item => {
|
||||||
// 根据levelId(序号)从映射表获取对应地名
|
barData.locations.push(item.title); // locations=levelId对应的地名(如levelId=7→宜兴)
|
||||||
const baseName = baseIndexToNameMap[item.levelId];
|
barData.diff.push(item.diff || 0);
|
||||||
if (baseName) { // 确保地名和原始名称有效
|
barData.targets.push(item.target || 0);
|
||||||
// barData.names.push(item.name); // 保留monData中的原始名称
|
barData.reals.push(item.real || 0);
|
||||||
barData.locations.push(baseName); // locations=levelId对应的地名(如levelId=7→宜兴)
|
barData.rate.push(item.rate || 0);
|
||||||
barData.diff.push(item.diffValue || 0);
|
barData.flags.push(this.getRateFlag(item.rate, item.real, item.target));
|
||||||
barData.targets.push(item.targetValue || 0);
|
|
||||||
barData.reals.push(item.value || 0);
|
|
||||||
barData.rate.push(item.proportion || 0);
|
|
||||||
barData.flags.push(item.completed ? 1 : 0);
|
|
||||||
// barData.baseIndexes.push(Number(item.levelId) || 0); // 序号转数字
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 3. 更新chartData
|
// 3. 更新chartData
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ export default {
|
|||||||
chartD() {
|
chartD() {
|
||||||
// 背景图片路径(若不需要可注释)
|
// 背景图片路径(若不需要可注释)
|
||||||
// const bgImageUrl = require('@/assets/img/labelBg.png');
|
// const bgImageUrl = require('@/assets/img/labelBg.png');
|
||||||
const rate = this.detailData?.proportion? Number(this.detailData?.proportion) : 0
|
const rate = this.detailData?.rate? Number(this.detailData?.rate) : 0
|
||||||
const diff = this.detailData?.diffValue || 0
|
const diff = this.detailData?.diff || 0
|
||||||
console.log('diff', diff);
|
console.log('diff', diff);
|
||||||
|
|
||||||
const seriesData = [
|
const seriesData = [
|
||||||
{
|
{
|
||||||
value: this.detailData?.targetValue || 0,
|
value: this.detailData?.budget || 0,
|
||||||
flag: 1, // 实际项:达标(绿色)
|
flag: 1, // 实际项:达标(绿色)
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
@@ -49,8 +49,8 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: this.detailData?.value || 0,
|
value: this.detailData?.real || 0,
|
||||||
flag: this.detailData?.completed, // 实际项:达标(绿色)
|
flag: this.detailData?.rate>=100, // 实际项:达标(绿色)
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
{{ item.name }}·{{ item.unit }}
|
{{ item.name }}·{{ item.unit }}
|
||||||
</div>
|
</div>
|
||||||
<div style='font-size: 14px;text-align: right;padding-right: 5px;'>
|
<div style='font-size: 14px;text-align: right;padding-right: 5px;'>
|
||||||
<span>完成率:<span style='color: #0B58FF;'>{{item.data.proportion}}%</span></span>
|
<span>完成率:<span style='color: #0B58FF;'>{{item.data.rate}}%</span></span>
|
||||||
<span style='display: inline-block;margin-left: 10px;'>差值:<span :style="{color:item.data.completed>0?'#30B590':'#FF9423'}" >{{item.data.diffValue}}</span></span>
|
<span style='display: inline-block;margin-left: 10px;'>差值:<span :style="{color:item.data.rate>=100?'#30B590':'#FF9423'}" >{{item.data.diff}}</span></span>
|
||||||
</div>
|
</div>
|
||||||
<operatingSingleBar :detailData="item.data"></operatingSingleBar>
|
<operatingSingleBar :detailData="item.data"></operatingSingleBar>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,7 +61,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
chart: null,
|
chart: null,
|
||||||
// 核心:当前激活的数据集(月度/累计),默认初始化月度数据
|
// 核心:当前激活的数据集(月度/累计),默认初始化月度数据
|
||||||
activeData: this.relatedData.relatedMon || []
|
activeData: this.relatedData.relatedMon || [],
|
||||||
|
currentTab: 'month'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -79,11 +80,11 @@ export default {
|
|||||||
const list = (Array.isArray(this.activeData) ? this.activeData : [])
|
const list = (Array.isArray(this.activeData) ? this.activeData : [])
|
||||||
|
|
||||||
return this.indicatorDefs.map(def => {
|
return this.indicatorDefs.map(def => {
|
||||||
const data = list.find(item => item && item.name === def.name) || fallback
|
const data = list.find(item => item && item.title === def.name) || fallback
|
||||||
return {
|
return {
|
||||||
...def,
|
...def,
|
||||||
data,
|
data,
|
||||||
sortValue: Number((data && data.value) ?? 0)
|
sortValue: Number((data && data.real) ?? 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -107,7 +108,12 @@ export default {
|
|||||||
// 可选:监听 relatedData 初始变化(若父组件异步传递数据,确保 activeData 同步更新)
|
// 可选:监听 relatedData 初始变化(若父组件异步传递数据,确保 activeData 同步更新)
|
||||||
relatedData: {
|
relatedData: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
|
if(this.currentTab === 'month') {
|
||||||
this.activeData = newVal.relatedMon || [];
|
this.activeData = newVal.relatedMon || [];
|
||||||
|
}else{
|
||||||
|
this.activeData = newVal.relatedTotal || [];
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true
|
||||||
@@ -132,6 +138,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
console.log('Tab 切换值:', value);
|
console.log('Tab 切换值:', value);
|
||||||
|
this.currentTab = value;
|
||||||
// 根据 Tab 值更新当前激活的数据集
|
// 根据 Tab 值更新当前激活的数据集
|
||||||
if (value === 'month') {
|
if (value === 'month') {
|
||||||
// 切换为月度数据
|
// 切换为月度数据
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default {
|
|||||||
dateData: {},
|
dateData: {},
|
||||||
monData: {},
|
monData: {},
|
||||||
totalData: {},
|
totalData: {},
|
||||||
trend: [],
|
trend: {},
|
||||||
relatedData: {},
|
relatedData: {},
|
||||||
// cusProData: {},
|
// cusProData: {},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default {
|
|||||||
// 数据兜底:确保是数组且长度≥2
|
// 数据兜底:确保是数组且长度≥2
|
||||||
const validData = Array.isArray(data) && data.length >= 2
|
const validData = Array.isArray(data) && data.length >= 2
|
||||||
? data
|
? data
|
||||||
: this.$props.ytdAnalysis.default();
|
: this.$props.ytdAnalysis;
|
||||||
|
|
||||||
// 提取收入(第0项)、全成本(第1项)数据
|
// 提取收入(第0项)、全成本(第1项)数据
|
||||||
const incomeItem = validData[0] || { title: "营业收入", budget: 0, real: 0, rate: 0, diff: 0 };
|
const incomeItem = validData[0] || { title: "营业收入", budget: 0, real: 0, rate: 0, diff: 0 };
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: 1624px;
|
grid-template-columns: 1624px;
|
||||||
">
|
">
|
||||||
<operatingLineChartCumulative :dateData="dateData" :salesTrendMap="salesTrendMap" :ytdData="ytdData" />
|
<operatingLineChartCumulative :dateData="dateData" :ytdData="ytdData" />
|
||||||
<!-- <keyWork /> -->
|
<!-- <keyWork /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -152,12 +152,6 @@ export default {
|
|||||||
console.log(res);
|
console.log(res);
|
||||||
this.monthData = res.data.month
|
this.monthData = res.data.month
|
||||||
this.ytdData = res.data.ytd
|
this.ytdData = res.data.ytd
|
||||||
|
|
||||||
// this.saleData = res.data.SaleData
|
|
||||||
// this.premiumProduct = res.data.premiumProduct
|
|
||||||
// this.salesTrendMap = res.data.salesTrendMap
|
|
||||||
// this.grossMarginTrendMap = res.data.grossMarginTrendMap
|
|
||||||
// this.salesProportion = res.data.salesProportion ? res.data.salesProportion : {}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleTimeChange(obj) {
|
handleTimeChange(obj) {
|
||||||
|
|||||||
@@ -48,10 +48,6 @@ export default {
|
|||||||
name: "ProductionStatus",
|
name: "ProductionStatus",
|
||||||
components: { Container, operatingBar, operatingTopBar },
|
components: { Container, operatingBar, operatingTopBar },
|
||||||
props: {
|
props: {
|
||||||
salesTrendMap: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
ytdData: {
|
ytdData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ getRateFlag(rate, real, target) {
|
|||||||
if (rate >= 100) return 1;
|
if (rate >= 100) return 1;
|
||||||
|
|
||||||
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
||||||
if (rate === 0 && target === 0) return 1;
|
// if (rate === 0 && target === 0) return 1;
|
||||||
|
|
||||||
// 其他情况 => 未达标
|
// 其他情况 => 未达标
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ getRateFlag(rate, real, target) {
|
|||||||
if (rate >= 100) return 1;
|
if (rate >= 100) return 1;
|
||||||
|
|
||||||
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
|
||||||
if (rate === 0 && target === 0) return 1;
|
// if (rate === 0 && target === 0) return 1;
|
||||||
|
|
||||||
// 其他情况 => 未达标
|
// 其他情况 => 未达标
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ import moment from "moment";
|
|||||||
// import html2canvas from 'html2canvas'
|
// import html2canvas from 'html2canvas'
|
||||||
// import JsPDF from 'jspdf'
|
// import JsPDF from 'jspdf'
|
||||||
export default {
|
export default {
|
||||||
name: "DayReport",
|
name: "procurementGainAnalysisBase",
|
||||||
components: {
|
components: {
|
||||||
ReportHeader,
|
ReportHeader,
|
||||||
changeBase,
|
changeBase,
|
||||||
@@ -105,9 +105,8 @@ export default {
|
|||||||
dateData: {},
|
dateData: {},
|
||||||
monData: {},
|
monData: {},
|
||||||
totalData: {},
|
totalData: {},
|
||||||
trend: [],
|
trend: {},
|
||||||
relatedData: {},
|
relatedData: {}
|
||||||
// cusProData: {},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -52,14 +52,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="centerImg" style="
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1; /* 确保在 backp 之上、内容之下 */
|
|
||||||
"></div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -69,23 +61,14 @@ import screenfull from "screenfull";
|
|||||||
import changeBase from "../components/changeBase.vue";
|
import changeBase from "../components/changeBase.vue";
|
||||||
import monthlyOverview from "../salesVolumeAnalysisComponents/monthlyOverview.vue";
|
import monthlyOverview from "../salesVolumeAnalysisComponents/monthlyOverview.vue";
|
||||||
import totalOverview from "../salesVolumeAnalysisComponents/totalOverview.vue";
|
import totalOverview from "../salesVolumeAnalysisComponents/totalOverview.vue";
|
||||||
// import totalOverview from "../operatingComponents/totalOverview.vue";
|
|
||||||
import monthlyRelatedMetrics from "../salesVolumeAnalysisComponents/monthlyThreeRelatedMetrics.vue";
|
import monthlyRelatedMetrics from "../salesVolumeAnalysisComponents/monthlyThreeRelatedMetrics.vue";
|
||||||
import yearRelatedMetrics from "../salesVolumeAnalysisComponents/yearThreeRelatedMetrics.vue";
|
import yearRelatedMetrics from "../salesVolumeAnalysisComponents/yearThreeRelatedMetrics.vue";
|
||||||
import dataTrend from "../salesVolumeAnalysisComponents/dataTrendDouble.vue";
|
import dataTrend from "../salesVolumeAnalysisComponents/dataTrendDouble.vue";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import { getUnitPriceAnalysisBaseData } from '@/api/cockpit'
|
import { getUnitPriceAnalysisBaseData } from '@/api/cockpit'
|
||||||
// import PSDO from "./components/PSDO.vue";
|
|
||||||
// import psiLineChart from "./components/psiLineChart.vue";
|
|
||||||
|
|
||||||
// import coreBottomLeft from "./components/coreBottomLeft.vue";
|
|
||||||
// import orderProgress from "./components/orderProgress.vue";
|
|
||||||
// import keyWork from "./components/keyWork.vue";
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
// import html2canvas from 'html2canvas'
|
|
||||||
// import JsPDF from 'jspdf'
|
|
||||||
export default {
|
export default {
|
||||||
name: "DayReport",
|
name: "doublePlatedBase",
|
||||||
components: {
|
components: {
|
||||||
ReportHeader,
|
ReportHeader,
|
||||||
changeBase,
|
changeBase,
|
||||||
@@ -108,7 +91,7 @@ export default {
|
|||||||
dateData: {},
|
dateData: {},
|
||||||
monData: {},
|
monData: {},
|
||||||
totalData: {},
|
totalData: {},
|
||||||
trend: [],
|
trend: {},
|
||||||
relatedData: {},
|
relatedData: {},
|
||||||
relatedMon: {},
|
relatedMon: {},
|
||||||
relatedTotal: {},
|
relatedTotal: {},
|
||||||
|
|||||||
@@ -52,14 +52,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="centerImg" style="
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1; /* 确保在 backp 之上、内容之下 */
|
|
||||||
"></div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -69,23 +61,14 @@ import screenfull from "screenfull";
|
|||||||
import changeBase from "../components/changeBase.vue";
|
import changeBase from "../components/changeBase.vue";
|
||||||
import monthlyOverview from "../salesVolumeAnalysisComponents/monthlyOverview.vue";
|
import monthlyOverview from "../salesVolumeAnalysisComponents/monthlyOverview.vue";
|
||||||
import totalOverview from "../salesVolumeAnalysisComponents/totalOverview.vue";
|
import totalOverview from "../salesVolumeAnalysisComponents/totalOverview.vue";
|
||||||
// import totalOverview from "../operatingComponents/totalOverview.vue";
|
|
||||||
import monthlyRelatedMetrics from "../salesVolumeAnalysisComponents/monthlyRelatedMetrics.vue";
|
import monthlyRelatedMetrics from "../salesVolumeAnalysisComponents/monthlyRelatedMetrics.vue";
|
||||||
import yearRelatedMetrics from "../salesVolumeAnalysisComponents/yearRelatedMetrics.vue";
|
import yearRelatedMetrics from "../salesVolumeAnalysisComponents/yearRelatedMetrics.vue";
|
||||||
import dataTrend from "../salesVolumeAnalysisComponents/dataTrendProduct.vue";
|
import dataTrend from "../salesVolumeAnalysisComponents/dataTrendProduct.vue";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import { getUnitPriceAnalysisBaseData } from '@/api/cockpit'
|
import { getUnitPriceAnalysisBaseData } from '@/api/cockpit'
|
||||||
// import PSDO from "./components/PSDO.vue";
|
|
||||||
// import psiLineChart from "./components/psiLineChart.vue";
|
|
||||||
|
|
||||||
// import coreBottomLeft from "./components/coreBottomLeft.vue";
|
|
||||||
// import orderProgress from "./components/orderProgress.vue";
|
|
||||||
// import keyWork from "./components/keyWork.vue";
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
// import html2canvas from 'html2canvas'
|
|
||||||
// import JsPDF from 'jspdf'
|
|
||||||
export default {
|
export default {
|
||||||
name: "DayReport",
|
name: "productionSalesBase",
|
||||||
components: {
|
components: {
|
||||||
ReportHeader,
|
ReportHeader,
|
||||||
changeBase,
|
changeBase,
|
||||||
@@ -95,7 +78,6 @@ export default {
|
|||||||
dataTrend,
|
dataTrend,
|
||||||
monthlyRelatedMetrics,
|
monthlyRelatedMetrics,
|
||||||
yearRelatedMetrics
|
yearRelatedMetrics
|
||||||
// psiLineChart
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ import moment from "moment";
|
|||||||
// import html2canvas from 'html2canvas'
|
// import html2canvas from 'html2canvas'
|
||||||
// import JsPDF from 'jspdf'
|
// import JsPDF from 'jspdf'
|
||||||
export default {
|
export default {
|
||||||
name: "DayReport",
|
name: "salesVolumeAnalysisBase",
|
||||||
components: {
|
components: {
|
||||||
ReportHeader,
|
ReportHeader,
|
||||||
changeBase,
|
changeBase,
|
||||||
@@ -105,7 +105,7 @@ export default {
|
|||||||
dateData: {},
|
dateData: {},
|
||||||
monData: {},
|
monData: {},
|
||||||
totalData: {},
|
totalData: {},
|
||||||
trend: [],
|
trend: {},
|
||||||
relatedData:{},
|
relatedData:{},
|
||||||
// cusProData: {},
|
// cusProData: {},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ export default {
|
|||||||
{ key: 'netPrice', name: '净价', unit: '元/㎡', route:'/netPriceAnalysis/netPriceAnalysisBase'},
|
{ key: 'netPrice', name: '净价', unit: '元/㎡', route:'/netPriceAnalysis/netPriceAnalysisBase'},
|
||||||
{ key: 'unitPrice', name: '单价', unit: '元/㎡',route:'/unitPriceAnalysis/unitPriceAnalysisBase' },
|
{ key: 'unitPrice', name: '单价', unit: '元/㎡',route:'/unitPriceAnalysis/unitPriceAnalysisBase' },
|
||||||
{ key: 'productionSales', name: '产销率', unit: '%',route:'/salesVolumeAnalysis/productionSalesBase'},
|
{ key: 'productionSales', name: '产销率', unit: '%',route:'/salesVolumeAnalysis/productionSalesBase'},
|
||||||
{ key: 'manageCost', name: '双镀销量', unit: '万㎡',route:'/salesVolumeAnalysis/doublePlatedBase' },
|
{ key: 'sdxl', name: '双镀销量', unit: '万㎡',route:'/salesVolumeAnalysis/doublePlatedBase' },
|
||||||
{ key: 'freight', name: '双镀占比', unit: '%',route:'/salesVolumeAnalysis/doublePlatedBase' },
|
{ key: 'freight', name: '双镀占比', unit: '%',route:'/salesVolumeAnalysis/doublePlatedBase' },
|
||||||
{ key: 'manageCost', name: '溢价产品销量', unit: '万㎡',route:null },
|
{ key: 'cpxl', name: '溢价产品销量', unit: '万㎡',route:null },
|
||||||
{ key: 'premiumProducts', name: '溢价产品毛利', unit: '元',route:null },
|
{ key: 'premiumProducts', name: '溢价产品毛利', unit: '元',route:null },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export default {
|
|||||||
let _this = this
|
let _this = this
|
||||||
const fallback = { target: 0, real: 0, completeRate: 0, diff: 0, flag: 0 }
|
const fallback = { target: 0, real: 0, completeRate: 0, diff: 0, flag: 0 }
|
||||||
const list = Object.entries(_this.relatedTotal).map(([title, data]) => {
|
const list = Object.entries(_this.relatedTotal).map(([title, data]) => {
|
||||||
|
if (!data) return fallback
|
||||||
return {
|
return {
|
||||||
title: title,
|
title: title,
|
||||||
target: data.target,
|
target: data.target,
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ export default {
|
|||||||
selectDate:{},
|
selectDate:{},
|
||||||
thisMonData: {},
|
thisMonData: {},
|
||||||
totalData: {},
|
totalData: {},
|
||||||
|
dateData: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user