This commit is contained in:
‘937886381’
2026-01-12 16:07:02 +08:00
parent b491f24126
commit babbe98c09
95 changed files with 286 additions and 259 deletions

View File

@@ -5,11 +5,11 @@ ENV = 'development'
VUE_APP_TITLE = 洛玻集团驾驶舱 VUE_APP_TITLE = 洛玻集团驾驶舱
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://172.16.32.18:7070' # VUE_APP_BASE_API = 'http://172.16.32.18:7070'
# VUE_APP_BASE_API = 'http://172.16.32.95:7070' # VUE_APP_BASE_API = 'http://172.16.32.95:7070'
# 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://192.168.0.35:7070' VUE_APP_BASE_API = 'http://192.168.0.35:7070'
# 路由懒加载 # 路由懒加载

BIN
dist.zip

Binary file not shown.

View File

@@ -17,7 +17,7 @@ export default {
const vnodes = [] const vnodes = []
if (icon) { if (icon) {
vnodes.push(<svg-icon icon-class={icon}/>) vnodes.push(<svg-icon icon-class={icon} />)
} }
if (title) { if (title) {

View File

@@ -1,19 +1,12 @@
<template> <template>
<div :class="{ 'has-logo': showLogo }" :style="{ <div :class="{ 'has-logo': showLogo }"
backgroundColor: :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
settings.sideTheme === 'theme-dark'
? variables.menuBackground
: variables.menuLightBackground,
}">
<logo v-if="showLogo" :collapse="isCollapse" /> <logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="settings.sideTheme === 'theme-dark' <el-menu :default-active="activeMenu" :collapse="isCollapse"
? variables.menuBackground :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
: variables.menuLightBackground :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
" :text-color="settings.sideTheme === 'theme-dark' :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
? variables.menuColor
: variables.menuLightColor
" :unique-opened="true" active-text-color="#fff" :collapse-transition="false" mode="vertical">
<!-- 根据 sidebarRouters 路由生成菜单 --> <!-- 根据 sidebarRouters 路由生成菜单 -->
<sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route" <sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route"
:base-path="route.path" /> :base-path="route.path" />
@@ -23,16 +16,16 @@
</template> </template>
<script> <script>
import { mapGetters, mapState } from 'vuex'; import { mapGetters, mapState } from "vuex";
import Logo from './Logo'; import Logo from "./Logo";
import SidebarItem from './SidebarItem'; import SidebarItem from "./SidebarItem";
import variables from '@/assets/styles/variables.scss'; import variables from "@/assets/styles/variables.scss";
export default { export default {
components: { SidebarItem, Logo }, components: { SidebarItem, Logo },
computed: { computed: {
...mapState(['settings']), ...mapState(["settings"]),
...mapGetters(['sidebarRouters', 'sidebar']), ...mapGetters(["sidebarRouters", "sidebar"]),
activeMenu() { activeMenu() {
const route = this.$route; const route = this.$route;
const { meta, path } = route; const { meta, path } = route;
@@ -50,7 +43,7 @@ export default {
}, },
isCollapse() { isCollapse() {
return !this.sidebar.opened; return !this.sidebar.opened;
}, }
}, }
}; };
</script> </script>

View File

@@ -102,7 +102,15 @@ export default {
// 计算当月第一天00:00:00的时间戳 // 计算当月第一天00:00:00的时间戳
startTime = targetMoment.startOf('month').valueOf(); startTime = targetMoment.startOf('month').valueOf();
// 计算当月最后一天23:59:59的时间戳 // 计算当月最后一天23:59:59的时间戳
endTime = targetMoment.endOf('month').valueOf(); endTime = targetMoment.clone()
.endOf('month')
.set({
hour: 23,
minute: 59,
second: 59,
millisecond: 0 // 毫秒设为0
})
.valueOf();
// 调试输出 // 调试输出
console.log('月份时间范围计算结果:', { console.log('月份时间范围计算结果:', {

View File

@@ -132,7 +132,15 @@ export default {
// 计算当月第一天00:00:00的时间戳 // 计算当月第一天00:00:00的时间戳
startTime = targetMoment.startOf('month').valueOf(); startTime = targetMoment.startOf('month').valueOf();
// 计算当月最后一天23:59:59的时间戳 // 计算当月最后一天23:59:59的时间戳
endTime = targetMoment.endOf('month').valueOf(); endTime = targetMoment.clone()
.endOf('month')
.set({
hour: 23,
minute: 59,
second: 59,
millisecond: 0 // 毫秒设为0
})
.valueOf();
// 调试输出 // 调试输出
console.log('月份时间范围计算结果:', { console.log('月份时间范围计算结果:', {

View File

@@ -89,29 +89,42 @@ export default {
}, },
methods: { methods: {
// 解析rate字符串提取百分比数值 // 解析rate字符串提取百分比数值
parseRateString(rateStr) { // 改进的 parseRateString 方法:能处理数字和字符串类型
if (!rateStr || typeof rateStr !== 'string') { parseRateString(rateValue) {
// 如果是 undefined 或 null返回默认值
if (rateValue === undefined || rateValue === null) {
return { displayText: '0%', progressValue: 0 }; return { displayText: '0%', progressValue: 0 };
} }
// 尝试匹配百分比数字,如"减亏93%"中的93 // 如果是数字类型,直接处理
const match = rateStr.match(/(\d+(\.\d+)?)%/); if (typeof rateValue === 'number') {
if (match) {
const percentValue = parseFloat(match[1]);
return { return {
displayText: rateStr, // 保持原字符串显示 displayText: `${rateValue.toFixed(2)}%`,
progressValue: percentValue // 提取的百分比数值用于进度条 progressValue: Math.min(Math.max(rateValue, 0), 100)
}; };
} }
// 如果没有匹配到百分比,尝试解析纯数字 // 如果是字符串类型,使用正则表达式处理
const numMatch = rateStr.match(/\d+(\.\d+)?/); if (typeof rateValue === 'string') {
if (numMatch) { // 尝试匹配百分比数字,如"减亏93%"中的93
const numValue = parseFloat(numMatch[0]); const match = rateValue.match(/(\d+(\.\d+)?)%/);
return { if (match) {
displayText: rateStr, const percentValue = parseFloat(match[1]);
progressValue: numValue return {
}; displayText: rateValue,
progressValue: Math.min(Math.max(percentValue, 0), 100)
};
}
// 如果没有匹配到百分比,尝试解析纯数字
const numMatch = rateValue.match(/\d+(\.\d+)?/);
if (numMatch) {
const numValue = parseFloat(numMatch[0]);
return {
displayText: rateValue,
progressValue: Math.min(Math.max(numValue, 0), 100)
};
}
} }
// 默认返回 // 默认返回

View File

@@ -159,15 +159,15 @@ export default {
const currentDiff = diff[params.dataIndex] || 0; const currentDiff = diff[params.dataIndex] || 0;
const currentFlag = flags[params.dataIndex] || 0; const currentFlag = flags[params.dataIndex] || 0;
const prefix = currentFlag === 1 ? '+' : '-'; // const prefix = currentFlag === 1 ? '+' : '-';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -185,15 +185,15 @@ export default {
const currentDiff = diff[params.dataIndex] || 0; const currentDiff = diff[params.dataIndex] || 0;
const currentFlag = flags[params.dataIndex] || 0; const currentFlag = flags[params.dataIndex] || 0;
const prefix = currentFlag === 1 ? '+' : '-'; // const prefix = currentFlag === 1 ? '+' : '-';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -88,18 +88,18 @@ export default {
* @param {number} rate 处理后的rate值已*100 * @param {number} rate 处理后的rate值已*100
* @returns {0|1} flag值 * @returns {0|1} flag值
*/ */
getRateFlag(rate, real, target) { getRateFlag(rate, real, target) {
if (isNaN(rate) || rate === null || rate === undefined) return 0; if (isNaN(rate) || rate === null || rate === undefined) return 0;
// 1. 完成率 >= 100 => 达标 // 1. 完成率 >= 100 => 达标
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;
}, },
/** /**
* 核心处理函数:在所有数据都准备好后,才组装 chartData * 核心处理函数:在所有数据都准备好后,才组装 chartData
*/ */

View File

@@ -84,16 +84,16 @@ export default {
* @returns {0|1} flag值 * @returns {0|1} flag值
*/ */
getRateFlag(rate, real, target) { getRateFlag(rate, real, target) {
// 先处理无效值的情况
if (isNaN(rate) || rate === null || rate === undefined) return 0; if (isNaN(rate) || rate === null || rate === undefined) return 0;
console.log(rate, real, target)
// 实际值和目标值都为0时算作达标 // 1. 完成率 >= 100 => 达标
if (real === 0 && target === 0 && rate === 0) { if (rate >= 100) return 1;
return 1; // 达标
} // 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
// 其他情况rate >= 100 或 rate === 0 时达标 if (rate === 0 && target === 0) return 1;
return (rate >= 100) ? 1 : 0;
// 其他情况 => 未达标
return 0;
}, },
/** /**
* 核心处理函数:在所有数据都准备好后,才组装 chartData * 核心处理函数:在所有数据都准备好后,才组装 chartData

View File

@@ -118,14 +118,14 @@ export default {
// const flags = flags || []; // const flags = flags || [];
const currentDiff = diff || 0; const currentDiff = diff || 0;
const currentFlag = this.detailData?.flag || 0; const currentFlag = this.detailData?.flag || 0;
const prefix = currentFlag === 1 ? '+' : '-'; // const prefix = currentFlag === 1 ? '+' : '-';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -164,14 +164,14 @@ export default {
// const flags = flags || []; // const flags = flags || [];
const currentDiff = diff || 0; const currentDiff = diff || 0;
const currentFlag = data.flags[0] || 0; const currentFlag = data.flags[0] || 0;
const prefix = currentFlag === 1 ? '+' : '-'; // const prefix = currentFlag === 1 ? '+' : '-';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -163,14 +163,14 @@ getRateFlag(rate, real, target) {
// const flags = flags || []; // const flags = flags || [];
const currentDiff = diff || 0; const currentDiff = diff || 0;
const currentFlag = flagValue || 0; const currentFlag = flagValue || 0;
const prefix = currentFlag === 1 ? '+' : '-'; // const prefix = currentFlag === 1 ? '+' : '-';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -196,15 +196,15 @@ export default {
const currentFlag = flags[params.dataIndex] || 0; const currentFlag = flags[params.dataIndex] || 0;
console.log('currentFlag', flags, params.dataIndex); console.log('currentFlag', flags, params.dataIndex);
const prefix = currentFlag === 1 ? '+' : '-'; // const prefix = currentFlag === 1 ? '+' : '-';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -185,15 +185,15 @@ export default {
const currentDiff = diff[params.dataIndex] || 0; const currentDiff = diff[params.dataIndex] || 0;
const currentFlag = flags[params.dataIndex] || 0; const currentFlag = flags[params.dataIndex] || 0;
const prefix = currentFlag === 1 ? '+' : '-'; // const prefix = currentFlag === 1 ? '+' : '-';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -118,14 +118,14 @@ export default {
// const flags = flags || []; // const flags = flags || [];
const currentDiff = diff || 0; const currentDiff = diff || 0;
const currentFlag = this.detailData?.flag || 0; const currentFlag = this.detailData?.flag || 0;
const prefix = currentFlag === 1 ? '+' : ''; // const prefix = currentFlag === 1 ? '+' : '';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -164,14 +164,14 @@ export default {
// const flags = flags || []; // const flags = flags || [];
const currentDiff = diff || 0; const currentDiff = diff || 0;
const currentFlag = flags[0] || 0; const currentFlag = flags[0] || 0;
const prefix = currentFlag === 1 ? '+' : ''; // const prefix = currentFlag === 1 ? '+' : '';
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -121,10 +121,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -163,10 +163,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -170,10 +170,10 @@ getRateFlag(rate, real, target) {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -162,10 +162,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -170,10 +170,10 @@ getRateFlag(rate, real, target) {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -196,10 +196,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -119,10 +119,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -162,10 +162,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -170,10 +170,10 @@ getRateFlag(rate, real, target) {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -163,10 +163,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -21,7 +21,7 @@
</div> </div>
<div class="electricityGauge"> <div class="electricityGauge">
<!-- 传递包含flag的factoryData给仪表盘组件 --> <!-- 传递包含flag的factoryData给仪表盘组件 -->
<electricityGauge id="month" :detailData="factoryData"></electricityGauge> <electricityGauge id="year" :detailData="factoryData"></electricityGauge>
</div> </div>
</div> </div>
<div class="line" style="padding: 0px;"> <div class="line" style="padding: 0px;">

View File

@@ -120,10 +120,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -198,10 +198,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -119,10 +119,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -162,10 +162,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -160,10 +160,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -161,10 +161,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -162,10 +162,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -160,10 +160,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -160,10 +160,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -162,10 +162,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -159,10 +159,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -163,10 +163,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -159,10 +159,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -161,10 +161,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -160,10 +160,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -191,10 +191,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -127,10 +127,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -120,10 +120,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -162,10 +162,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -167,10 +167,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -170,10 +170,10 @@ getRateFlag(rate, real, target) {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -110,6 +110,8 @@ export default {
totalData: {}, totalData: {},
trend: [], trend: [],
relatedData: {}, relatedData: {},
relatedMon: {},
relatedTotal: {},
// cusProData: {}, // cusProData: {},
}; };
}, },
@@ -199,11 +201,13 @@ export default {
getUnitPriceAnalysisBaseData(requestParams).then((res) => { getUnitPriceAnalysisBaseData(requestParams).then((res) => {
this.monData = res.data.monData this.monData = res.data.monData
this.totalData = res.data.totalData this.totalData = res.data.totalData
// this.relatedMon = res.data.relatedMon this.relatedMon = res.data.relatedMon
this.relatedData = { this.relatedTotal = res.data.relatedTotal
relatedTotal: res.data.relatedTotal,
relatedMon: res.data.relatedMon, // this.relatedData = {
} // relatedTotal: res.data.relatedTotal,
// relatedMon: res.data.relatedMon,
// }
this.trend = res.data.trend this.trend = res.data.trend
// this.relatedTotal = res.data.relatedTotal // this.relatedTotal = res.data.relatedTotal
// this.cusProData = { // this.cusProData = {

View File

@@ -108,8 +108,10 @@ export default {
dateData: {}, dateData: {},
monData: {}, monData: {},
totalData: {}, totalData: {},
trend: [], trend: {},
relatedData: {}, relatedData: {},
relatedMon: {},
relatedTotal: {},
// cusProData: {}, // cusProData: {},
}; };
}, },
@@ -191,7 +193,7 @@ export default {
// index: this.index, // index: this.index,
// sort: 1, // sort: 1,
paramName: '产销率', paramName: '产销率',
paramList: ['产量', '销量'], paramList: ['产量(深加工)', '销量'],
baseId: this.factory, baseId: this.factory,
// baseId: Number(this.factory), // baseId: Number(this.factory),
}; };
@@ -200,10 +202,9 @@ export default {
this.monData = res.data.monData this.monData = res.data.monData
this.totalData = res.data.totalData this.totalData = res.data.totalData
// this.relatedMon = res.data.relatedMon // this.relatedMon = res.data.relatedMon
this.relatedData = { this.relatedMon = res.data.relatedMon
relatedTotal: res.data.relatedTotal, this.relatedTotal = res.data.relatedTotal
relatedMon: res.data.relatedMon,
}
this.trend = res.data.trend this.trend = res.data.trend
// this.relatedTotal = res.data.relatedTotal // this.relatedTotal = res.data.relatedTotal
// this.cusProData = { // this.cusProData = {

View File

@@ -200,10 +200,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -200,10 +200,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -63,8 +63,8 @@ export default {
return { return {
activeButton: 0, activeButton: 0,
isDropdownShow: false, isDropdownShow: false,
selectedProfit: '产量', // 关键修改:默认赋值为「净价」,初始化即展示该类目数据 selectedProfit: '产量(深加工)', // 关键修改:默认赋值为「净价」,初始化即展示该类目数据
profitOptions: ['产量', '销量'] profitOptions: ['产量(深加工)', '销量']
}; };
}, },
computed: { computed: {
@@ -200,10 +200,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -11,8 +11,8 @@
</div> </div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="{ <operatingSingleBar :detailData="{
...(relatedMon.产量 || defaultData), ...(relatedMon['产量(深加工)'] || defaultData),
flag: getRateFlag((relatedMon.产量 || defaultData).completeRate, (relatedMon.产量 || defaultData).real, (relatedMon.产量 || defaultData).target) flag: getRateFlag((relatedMon['产量(深加工)'] || defaultData).completeRate, (relatedMon['产量(深加工)'] || defaultData).real, (relatedMon['产量(深加工)'] || defaultData).target)
}" /> }" />
</div> </div>
</div> </div>

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -119,10 +119,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -11,8 +11,8 @@
</div> </div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="{ <operatingSingleBar :detailData="{
...(relatedTotal.产量 || defaultData), ...(relatedTotal['产量(深加工)'] || defaultData),
flag: getRateFlag((relatedTotal.产量 || defaultData).completeRate, (relatedTotal.产量 || defaultData).real, (relatedTotal.产量 || defaultData).target) flag: getRateFlag((relatedTotal['产量(深加工)'] || defaultData).completeRate, (relatedTotal['产量(深加工)'] || defaultData).real, (relatedTotal['产量(深加工)'] || defaultData).target)
}" /> }" />
</div> </div>
</div> </div>

View File

@@ -164,10 +164,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -122,10 +122,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -120,10 +120,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -197,7 +197,7 @@ export default {
// index: this.index, // index: this.index,
// sort: 1, // sort: 1,
paramName: '单价', paramName: '单价',
paramList: ['销量','成本','运费'], paramList: ['销量','成本','运费'],
baseId:this.factory, baseId:this.factory,
// baseId: Number(this.factory), // baseId: Number(this.factory),
}; };

View File

@@ -11,7 +11,7 @@
<div class="chart-wrap"> <div class="chart-wrap">
<operatingSingleBar :detailData="{ <operatingSingleBar :detailData="{
...(relatedMon.销量 || defaultData), ...(relatedMon.销量 || defaultData),
flag: getRateFlag((relatedMon.销量 || defaultData).completeRate, (relatedMon.销量 || defaultData).real, (relatedMon.销量 || defaultData).target,) flag: getRateFlag((relatedMon.销量 || defaultData).completeRate, (relatedMon.销量 || defaultData).real, (relatedMon.销量 || defaultData).target,)
}" /> }" />
</div> </div>
</div> </div>
@@ -22,8 +22,8 @@
</div> </div>
<div class="chart-wrap"> <div class="chart-wrap">
<operatingSingleBar :detailData="{ <operatingSingleBar :detailData="{
...(relatedMon.成本 || defaultData), ...(relatedMon.成本 || defaultData),
flag: getRateFlag((relatedMon.成本 || defaultData).completeRate, (relatedMon.成本 || defaultData).real, (relatedMon.成本 || defaultData).target) flag: getRateFlag((relatedMon.成本 || defaultData).completeRate, (relatedMon.成本 || defaultData).real, (relatedMon.成本 || defaultData).target)
}" /> }" />
</div> </div>
</div> </div>
@@ -36,7 +36,7 @@
<div class="chart-wrap"> <div class="chart-wrap">
<operatingSingleBar :detailData="{ <operatingSingleBar :detailData="{
...(relatedMon.运费 || defaultData), ...(relatedMon.运费 || defaultData),
flag: getRateFlag((relatedMon.运费 || defaultData).completeRate, (relatedMon.运费 || defaultData).real, (relatedMon.运费 || defaultData).target) flag: getRateFlag((relatedMon.运费 || defaultData).completeRate, (relatedMon.运费 || defaultData).real, (relatedMon.运费 || defaultData).target)
}" /> }" />
</div> </div>
</div> </div>
@@ -63,7 +63,7 @@ export default {
}, },
dateData: { dateData: {
type: Object, type: Object,
default: () => ({ }) default: () => ({})
}, },
factory: { factory: {
type: [String, Number], type: [String, Number],
@@ -115,18 +115,18 @@ export default {
* @param {number} rate 完成率原始值如89代表89% * @param {number} rate 完成率原始值如89代表89%
* @returns {0|1} flag值 * @returns {0|1} flag值
*/ */
getRateFlag(rate, real, target) { getRateFlag(rate, real, target) {
if (isNaN(rate) || rate === null || rate === undefined) return 0; if (isNaN(rate) || rate === null || rate === undefined) return 0;
// 1. 完成率 >= 100 => 达标 // 1. 完成率 >= 100 => 达标
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;
}, },
/** /**
* 图表更新方法:可在这里补充全局的图表刷新逻辑 * 图表更新方法:可在这里补充全局的图表刷新逻辑

View File

@@ -190,10 +190,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -125,10 +125,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -171,10 +171,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -158,10 +158,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -119,10 +119,10 @@ export default {
// 根据标志位选择不同的样式类 // 根据标志位选择不同的样式类
if (currentFlag === 1) { if (currentFlag === 1) {
// 达标 - 使用 rate-achieved 样式 // 达标 - 使用 rate-achieved 样式
return `{achieved|${prefix}${currentDiff}}{text|差值}`; return `{achieved|${currentDiff}}{text|差值}`;
} else { } else {
// 未达标 - 使用 rate-unachieved 样式 // 未达标 - 使用 rate-unachieved 样式
return `{unachieved|${prefix}${currentDiff}}{text|差值}`; return `{unachieved|${currentDiff}}{text|差值}`;
} }
}, },
backgroundColor: { backgroundColor: {

View File

@@ -22,8 +22,8 @@
</div> </div>
<div class="chart-wrap"> <div class="chart-wrap">
<operatingSingleBar :detailData="{ <operatingSingleBar :detailData="{
...(relatedTotal.成本 || defaultData), ...(relatedTotal.成本 || defaultData),
flag: getRateFlag((relatedTotal.成本 || defaultData).completeRate, (relatedTotal.成本 || defaultData).real, (relatedTotal.成本 || defaultData).target) flag: getRateFlag((relatedTotal.成本 || defaultData).completeRate, (relatedTotal.成本 || defaultData).real, (relatedTotal.成本 || defaultData).target)
}" /> }" />
</div> </div>
</div> </div>