修改bug
This commit is contained in:
@@ -94,18 +94,6 @@ export default {
|
|||||||
if (itemName === undefined) {
|
if (itemName === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 路由跳转时携带序号(或名称+序号)
|
|
||||||
this.$router.push({
|
|
||||||
path: 'operatingRevenueBase',
|
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
|
||||||
// baseName: itemName,
|
|
||||||
factory: baseIndex,
|
|
||||||
dateData: this.dateData
|
|
||||||
}
|
|
||||||
// 若仍需用base作为参数:
|
|
||||||
// base: itemName,
|
|
||||||
// params: { baseIndex: baseIndex }
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 定义resize处理函数(命名函数,方便移除)
|
// 定义resize处理函数(命名函数,方便移除)
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
<!--
|
|
||||||
* @Date: 2020-12-14 09:07:03
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @LastEditTime: 2024-09-05 09:50:14
|
|
||||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="visual-base-table-container">
|
<div class="visual-base-table-container">
|
||||||
<el-table :max-height="maxHeight" ref="scroll_Table" @mouseenter.native="autoScroll(true)"
|
<el-table :max-height="maxHeight" ref="scroll_Table" @mouseenter.native="autoScroll(true)"
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ export default {
|
|||||||
console.log('当前编辑状态:', isEdit, '当前时间维度:', this.timeType);
|
console.log('当前编辑状态:', isEdit, '当前时间维度:', this.timeType);
|
||||||
// 基础表格列配置(只读模式使用)
|
// 基础表格列配置(只读模式使用)
|
||||||
const baseTableProps = [
|
const baseTableProps = [
|
||||||
// { prop: 'type', label: '指标类型', align: 'center' },
|
{ prop: 'type', label: '指标类型', align: 'center' },
|
||||||
{ prop: 'name', label: '指标名称', align: 'center' },
|
{ prop: 'name', label: '指标名称', align: 'center' },
|
||||||
{ prop: 'unit', label: '单位', align: 'center', filter: publicFormatter('lb_dw') },
|
{ prop: 'unit', label: '单位', align: 'center', filter: publicFormatter('lb_dw') },
|
||||||
{ prop: 'target', label: '预算值', align: 'center' },
|
{ prop: 'target', label: '预算值', align: 'center' },
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="number" :style="{ color: getTargetColor(item.currentValue, item.targetValue) }">
|
<div class="number" :style="{ color: getTargetColor(item.progress) }">
|
||||||
{{ item.currentValue }}
|
{{ item.currentValue }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">实际值</div>
|
<div class="title">实际值</div>
|
||||||
@@ -21,15 +21,15 @@
|
|||||||
<div class="progress-container">
|
<div class="progress-container">
|
||||||
<div class="progress-bar" :style="{
|
<div class="progress-bar" :style="{
|
||||||
width: item.progress + '%',
|
width: item.progress + '%',
|
||||||
background: getTargetColor(item.currentValue, item.targetValue)
|
background: getTargetColor(item.progress)
|
||||||
}"></div>
|
}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="yield" style="display: flex;justify-content: space-between;">
|
<div class="yield" style="display: flex;justify-content: space-between;">
|
||||||
<div class="progress-percent" :style="{ color: getTargetColor(item.currentValue, item.targetValue) }">完成率
|
<div class="progress-percent" :style="{ color: getTargetColor(item.progress) }">完成率
|
||||||
</div>
|
</div>
|
||||||
<div class="progress-percent" :style="{ color: getTargetColor(item.currentValue, item.targetValue) }">
|
<div class="progress-percent" :style="{ color: getTargetColor(item.progress) }">
|
||||||
{{ item.progress }}%
|
{{ item.progress }}%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -95,8 +95,8 @@ export default {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTargetColor(currentValue, targetValue) {
|
getTargetColor(progress) {
|
||||||
return currentValue >= targetValue
|
return progress >= 100
|
||||||
? "rgba(98, 213, 180, 1)"
|
? "rgba(98, 213, 180, 1)"
|
||||||
: "rgba(249, 164, 74, 1)";
|
: "rgba(249, 164, 74, 1)";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="bottom"
|
<div class="bottom"
|
||||||
style="display: flex; width: 100%;margin-top: 8px;background-color: rgba(249, 252, 255, 1);">
|
style="display: flex; width: 100%;margin-top: 8px;background-color: rgba(249, 252, 255, 1);">
|
||||||
<!-- <top-item /> -->
|
|
||||||
<coreBottomBar :line="sale.line" :dateData="dateData" />
|
<coreBottomBar :line="sale.line" :dateData="dateData" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -19,7 +18,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Container from './container.vue'
|
import Container from './container.vue'
|
||||||
// import * as echarts from 'echarts'
|
|
||||||
import topItem from './top-item.vue'
|
import topItem from './top-item.vue'
|
||||||
import coreBottomBar from './coreBottomBar.vue'
|
import coreBottomBar from './coreBottomBar.vue'
|
||||||
|
|
||||||
@@ -57,8 +55,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 初始化图表(若需展示图表,需在模板中添加对应 DOM)
|
|
||||||
// this.$nextTick(() => this.updateChart())
|
|
||||||
this.saleData = this.sale.month
|
this.saleData = this.sale.month
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -21,9 +21,6 @@
|
|||||||
</CostsBottomBar>
|
</CostsBottomBar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 图表容器:根据状态控制显示(若需展示图表) -->
|
|
||||||
<!-- <div id="productionStatusChart" style="height: 200px; margin-top: 12px;" v-if="showChart"></div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ export default {
|
|||||||
|
|
||||||
// 基础表格列配置(只读模式使用)
|
// 基础表格列配置(只读模式使用)
|
||||||
const baseTableProps = [
|
const baseTableProps = [
|
||||||
// { prop: 'type', label: '指标类型', align: 'center' },
|
{ prop: 'type', label: '指标类型', align: 'center' },
|
||||||
{ prop: 'name', label: '指标名称', align: 'center' },
|
{ prop: 'name', label: '指标名称', align: 'center' },
|
||||||
{ prop: 'unitLabel', label: '单位', align: 'center' },
|
{ prop: 'unitLabel', label: '单位', align: 'center' },
|
||||||
{ prop: 'value', label: '实际值', align: 'center' },
|
{ prop: 'value', label: '实际值', align: 'center' },
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<!-- 进度条颜色和宽度动态绑定 -->
|
<!-- 进度条颜色和宽度动态绑定 -->
|
||||||
<div class="progress-bar" :style="{
|
<div class="progress-bar" :style="{
|
||||||
width: itemList[0].progress + '%',
|
width: itemList[0].progress + '%',
|
||||||
background: getColor(item.currentValue, item.targetValue)
|
background: getColor(item.progress)
|
||||||
}"></div>
|
}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<div class="progress-percent">完成率</div>
|
<div class="progress-percent">完成率</div>
|
||||||
<!-- 百分比颜色动态绑定 -->
|
<!-- 百分比颜色动态绑定 -->
|
||||||
<div class="progress-percent" :style="{
|
<div class="progress-percent" :style="{
|
||||||
color: getColor(item.currentValue, item.targetValue)
|
color: getColor(item.progress)
|
||||||
}">
|
}">
|
||||||
{{ item.progress }}%
|
{{ item.progress }}%
|
||||||
</div>
|
</div>
|
||||||
@@ -103,8 +103,8 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 颜色判断核心方法:实际值≥预算值返回绿色,否则返回橙色
|
// 颜色判断核心方法:实际值≥预算值返回绿色,否则返回橙色
|
||||||
getColor(currentValue, targetValue) {
|
getColor(progress) {
|
||||||
return currentValue >= targetValue
|
return progress >= 100
|
||||||
? "rgba(98, 213, 180, 1)"
|
? "rgba(98, 213, 180, 1)"
|
||||||
: "rgba(249, 164, 74, 1)";
|
: "rgba(249, 164, 74, 1)";
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
<!-- 实际值:根据 实际值≥目标值 动态绑定类名 -->
|
<!-- 实际值:根据 实际值≥目标值 动态绑定类名 -->
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="number" :class="{
|
<div class="number" :class="{
|
||||||
'number-exceed': item.currentValue >= item.targetValue,
|
'number-exceed': item.progress >= 100,
|
||||||
'number-below': item.currentValue < item.targetValue
|
'number-below': item.progress < 100
|
||||||
}">
|
}">
|
||||||
{{ item.currentValue }}
|
{{ item.currentValue }}
|
||||||
</div>
|
</div>
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
<div class="progress-group">
|
<div class="progress-group">
|
||||||
<div class="progress-container">
|
<div class="progress-container">
|
||||||
<div class="progress-bar" :style="{ width: item.progressWidth + '%' }" :class="{
|
<div class="progress-bar" :style="{ width: item.progressWidth + '%' }" :class="{
|
||||||
'bar-exceed': item.currentValue >= item.targetValue,
|
'bar-exceed': item.progress >= 100,
|
||||||
'bar-below': item.currentValue < item.targetValue
|
'bar-below': item.progress < 100
|
||||||
}"></div>
|
}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,14 +36,14 @@
|
|||||||
<!-- 完成率:同步绑定类名 -->
|
<!-- 完成率:同步绑定类名 -->
|
||||||
<div class="yield" style="display: flex;justify-content: space-between;">
|
<div class="yield" style="display: flex;justify-content: space-between;">
|
||||||
<div class="progress-percent" :class="{
|
<div class="progress-percent" :class="{
|
||||||
'percent-exceed': item.currentValue >= item.targetValue,
|
'percent-exceed': item.progress >= 100,
|
||||||
'percent-below': item.currentValue < item.targetValue
|
'percent-below': item.progress < 100
|
||||||
}">完成率</div>
|
}">完成率</div>
|
||||||
<div class="progress-percent" :class="{
|
<div class="progress-percent" :class="{
|
||||||
'percent-exceed': item.currentValue >= item.targetValue,
|
'percent-exceed': item.progress >= 100,
|
||||||
'percent-below': item.currentValue < item.targetValue
|
'percent-below': item.progress < 100
|
||||||
}">
|
}">
|
||||||
{{ item.progressDisplay }}
|
{{ item.progress }}%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,9 +62,9 @@
|
|||||||
<!-- 实际值:根据与目标值的比较动态变色 -->
|
<!-- 实际值:根据与目标值的比较动态变色 -->
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="number" :class="{
|
<div class="number" :class="{
|
||||||
'exceed-target': item.currentValue > item.targetValue,
|
'exceed-target': item.progress > 100,
|
||||||
'below-target': item.currentValue < item.targetValue,
|
'below-target': item.progress < 100,
|
||||||
'equal-target': item.currentValue === item.targetValue
|
'equal-target': item.progress == 100
|
||||||
}">
|
}">
|
||||||
{{ item.currentValue }}
|
{{ item.currentValue }}
|
||||||
</div>
|
</div>
|
||||||
@@ -75,17 +75,17 @@
|
|||||||
<div class="progress-group">
|
<div class="progress-group">
|
||||||
<div class="progress-container">
|
<div class="progress-container">
|
||||||
<div class="progress-bar" :style="{ width: item.progress + '%' }" :class="{
|
<div class="progress-bar" :style="{ width: item.progress + '%' }" :class="{
|
||||||
'exceed-pro-target': item.currentValue > item.targetValue,
|
'exceed-pro-target': item.progress > 100,
|
||||||
'below-pro-target': item.currentValue < item.targetValue,
|
'below-pro-target': item.progress < 100,
|
||||||
'equal-pro-target': item.currentValue === item.targetValue
|
'equal-pro-target': item.progress == 100
|
||||||
}"></div>
|
}"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress-percent" :class="{
|
<div class="progress-percent" :class="{
|
||||||
'exceed-target': item.currentValue > item.targetValue,
|
'exceed-target': item.progress > 100,
|
||||||
'below-target': item.currentValue < item.targetValue,
|
'below-target': item.progress < 100,
|
||||||
'equal-target': item.currentValue === item.targetValue
|
'equal-target': item.progress == 100
|
||||||
}">
|
}">
|
||||||
{{ item.progressDisplay }}
|
{{ item.progress }}%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -226,7 +226,7 @@ export default {
|
|||||||
// 额外兜底:避免data中的属性为undefined
|
// 额外兜底:避免data中的属性为undefined
|
||||||
const target = data.target || 0;
|
const target = data.target || 0;
|
||||||
const real = data.real || 0;
|
const real = data.real || 0;
|
||||||
const rate = data.rate || '0%';
|
const rate = data.rate || 0;
|
||||||
|
|
||||||
// 解析rate字符串
|
// 解析rate字符串
|
||||||
const parsedRate = this.parseRateString(rate);
|
const parsedRate = this.parseRateString(rate);
|
||||||
@@ -234,24 +234,12 @@ export default {
|
|||||||
// 进度条宽度:限制在0-100之间
|
// 进度条宽度:限制在0-100之间
|
||||||
const progressWidth = Math.min(Math.max(parsedRate.progressValue, 0), 100);
|
const progressWidth = Math.min(Math.max(parsedRate.progressValue, 0), 100);
|
||||||
|
|
||||||
// 显示文本处理
|
|
||||||
let progressDisplay;
|
|
||||||
if (mappingItem.isPercentage) {
|
|
||||||
// 对于需要加%的指标,确保有%符号
|
|
||||||
progressDisplay = parsedRate.displayText.includes('%')
|
|
||||||
? parsedRate.displayText
|
|
||||||
: `${parsedRate.displayText}%`;
|
|
||||||
} else {
|
|
||||||
// 对于经营性利润和利润总额,直接使用原始rate字符串
|
|
||||||
progressDisplay = parsedRate.displayText;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: mappingItem.name,
|
name: mappingItem.name,
|
||||||
targetValue: target,
|
targetValue: target,
|
||||||
currentValue: real,
|
currentValue: real,
|
||||||
progressWidth: progressWidth, // 用于进度条宽度
|
progressWidth: progressWidth, // 用于进度条宽度
|
||||||
progressDisplay: progressDisplay, // 用于显示文本
|
progress: rate, // 用于显示文本
|
||||||
route: mappingItem.route
|
route: mappingItem.route
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
<!-- 实际值:根据与目标值的比较动态变色 -->
|
<!-- 实际值:根据与目标值的比较动态变色 -->
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="number" :class="{
|
<div class="number" :class="{
|
||||||
'exceed-target': item.currentValue > item.targetValue,
|
'exceed-target': item.progress > 100,
|
||||||
'below-target': item.currentValue < item.targetValue,
|
'below-target': item.progress < 100,
|
||||||
'equal-target': item.currentValue === item.targetValue
|
'equal-target': item.progress === 100
|
||||||
}">
|
}">
|
||||||
{{ item.currentValue }}
|
{{ item.currentValue }}
|
||||||
</div>
|
</div>
|
||||||
@@ -25,15 +25,15 @@
|
|||||||
<div class="progress-group">
|
<div class="progress-group">
|
||||||
<div class="progress-container">
|
<div class="progress-container">
|
||||||
<div class="progress-bar" :style="{ width: item.progress + '%' }" :class="{
|
<div class="progress-bar" :style="{ width: item.progress + '%' }" :class="{
|
||||||
'exceed-pro-target': item.currentValue > item.targetValue,
|
'exceed-pro-target': item.progress > 100,
|
||||||
'below-pro-target': item.currentValue < item.targetValue,
|
'below-pro-target': item.progress < 100,
|
||||||
'equal-pro-target': item.currentValue === item.targetValue
|
'equal-pro-target': item.progress === 100
|
||||||
}"></div>
|
}"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress-percent" :class="{
|
<div class="progress-percent" :class="{
|
||||||
'exceed-target': item.currentValue > item.targetValue,
|
'exceed-target': item.progress > 100,
|
||||||
'below-target': item.currentValue < item.targetValue,
|
'below-target': item.progress < 100,
|
||||||
'equal-target': item.currentValue === item.targetValue
|
'equal-target': item.progress === 100
|
||||||
}">
|
}">
|
||||||
{{ item.progress }}%
|
{{ item.progress }}%
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ export default {
|
|||||||
const { actual, target, progress } = this.itemList[index];
|
const { actual, target, progress } = this.itemList[index];
|
||||||
|
|
||||||
// 新增条件:如果实际值、预算值和进度都为0,则显示绿色
|
// 新增条件:如果实际值、预算值和进度都为0,则显示绿色
|
||||||
if (actual === 0 && target === 0 && progress === 0) {
|
// if (actual === 0 && target === 0 && progress === 0) {
|
||||||
return "rgba(98, 213, 180, 1)"; // 绿色
|
// return "rgba(98, 213, 180, 1)"; // 绿色
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 原有的通用判断逻辑
|
// 原有的通用判断逻辑
|
||||||
return progress >= 100
|
return progress >= 100
|
||||||
|
|||||||
@@ -94,18 +94,6 @@ export default {
|
|||||||
if (itemName === undefined) {
|
if (itemName === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 路由跳转时携带序号(或名称+序号)
|
|
||||||
this.$router.push({
|
|
||||||
path: 'operatingRevenueBase',
|
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
|
||||||
// baseName: itemName,
|
|
||||||
factory: baseIndex,
|
|
||||||
dateData: this.dateData
|
|
||||||
}
|
|
||||||
// 若仍需用base作为参数:
|
|
||||||
// base: itemName,
|
|
||||||
// params: { baseIndex: baseIndex }
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 定义resize处理函数(命名函数,方便移除)
|
// 定义resize处理函数(命名函数,方便移除)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="dayReport" class="dayReport" :style="styles">
|
<div id="dayReport" class="dayReport" :style="styles">
|
||||||
<!-- <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> -->
|
|
||||||
<sidebar style="opacity: .9;" v-if="!sidebar.hide && openSider" class="sidebar-container" />
|
<sidebar style="opacity: .9;" v-if="!sidebar.hide && openSider" class="sidebar-container" />
|
||||||
<ReportHeader top-title="洛玻集团运营驾驶舱" :openSider="openSider" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
<ReportHeader top-title="洛玻集团运营驾驶舱" :openSider="openSider" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
|
||||||
@siderOpenChange="siderOpenChange" @timeRangeChange="handleTimeChange" />
|
@siderOpenChange="siderOpenChange" @timeRangeChange="handleTimeChange" />
|
||||||
@@ -40,7 +39,6 @@ import keyProductionIndicators from './components/keyProductionIndicators.vue'
|
|||||||
import coreBottomLeft from './components/coreBottomLeft.vue'
|
import coreBottomLeft from './components/coreBottomLeft.vue'
|
||||||
import orderProgress from './components/orderProgress.vue'
|
import orderProgress from './components/orderProgress.vue'
|
||||||
import keyWork from './components/keyWork.vue'
|
import keyWork from './components/keyWork.vue'
|
||||||
// import moment from 'moment'
|
|
||||||
import { getOperateCockpit, getOrderDetail } from '@/api/cockpit'
|
import { getOperateCockpit, getOrderDetail } from '@/api/cockpit'
|
||||||
import { Sidebar } from "../../layout/components";
|
import { Sidebar } from "../../layout/components";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
@@ -98,7 +96,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
transform: `scale(${v})`,
|
transform: `scale(${v})`,
|
||||||
transformOrigin: 'left top'
|
transformOrigin: 'left top'
|
||||||
// overflow: hidden;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -134,9 +131,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async getOrderData(num) {
|
async getOrderData(num) {
|
||||||
const res = await getOrderDetail({
|
const res = await getOrderDetail({
|
||||||
// startTime: this.dateData.startTime,
|
|
||||||
// endTime: this.dateData.endTime,
|
|
||||||
// timeDim: this.dateData.mode,
|
|
||||||
baseId: num
|
baseId: num
|
||||||
})
|
})
|
||||||
this.orderTableData = res.data
|
this.orderTableData = res.data
|
||||||
|
|||||||
@@ -20,23 +20,6 @@
|
|||||||
<indicatorDetails @updateLeft='getData' @updateLevel='getLevel'/>
|
<indicatorDetails @updateLeft='getData' @updateLevel='getLevel'/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="top" style="margin-top: -20px; display: flex; gap: 16px">
|
|
||||||
<div class="top-three" style="
|
|
||||||
display: grid;
|
|
||||||
gap: 12px;
|
|
||||||
grid-template-columns:416px 1192px;
|
|
||||||
">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="centerImg" style="
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1; /* 确保在 backp 之上、内容之下 */
|
|
||||||
"></div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -47,23 +30,15 @@ import { Sidebar } from "../../layout/components";
|
|||||||
import screenfull from "screenfull";
|
import screenfull from "screenfull";
|
||||||
import indicatorCalendar from "./components/indicatorCalendar.vue";
|
import indicatorCalendar from "./components/indicatorCalendar.vue";
|
||||||
import indicatorDetails from "./components/indicatorDetails.vue";
|
import indicatorDetails from "./components/indicatorDetails.vue";
|
||||||
|
|
||||||
// import premProdStatus from "./components/premProdStatus.vue";
|
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
// import operatingLineChart from "../operatingComponents/operatingLineChart";
|
|
||||||
// import operatingLineChartCumulative from "../operatingComponents/operatingLineChartCumulative.vue";
|
|
||||||
|
|
||||||
import { getRealMonthCalendar } from '@/api/cockpit'
|
import { getRealMonthCalendar } from '@/api/cockpit'
|
||||||
import moment from "moment";
|
|
||||||
export default {
|
export default {
|
||||||
name: "DayReport",
|
name: "DayReport",
|
||||||
components: {
|
components: {
|
||||||
ReportHeader,
|
ReportHeader,
|
||||||
indicatorCalendar,
|
indicatorCalendar,
|
||||||
indicatorDetails,
|
indicatorDetails,
|
||||||
// operatingLineChartCumulative,
|
|
||||||
// operatingLineChart,
|
|
||||||
// premProdStatus,
|
|
||||||
Sidebar,
|
Sidebar,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -201,28 +176,7 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
screenfull.toggle(this.$refs.dayReportB);
|
screenfull.toggle(this.$refs.dayReportB);
|
||||||
},
|
}
|
||||||
// 导出
|
|
||||||
// exportPDF() {
|
|
||||||
// this.$message.success('正在导出,请稍等!')
|
|
||||||
// const element = document.getElementById('dayRepDom')
|
|
||||||
// element.style.display = 'block'
|
|
||||||
// const fileName = '株洲碲化镉生产日报' + moment().format('yyMMDD') + '.pdf'
|
|
||||||
// html2canvas(element, {
|
|
||||||
// dpi: 300, // Set to 300 DPI
|
|
||||||
// scale: 3 // Adjusts your resolution
|
|
||||||
// }).then(function(canvas) {
|
|
||||||
// const imgWidth = 595.28
|
|
||||||
// const imgHeight = 841.89
|
|
||||||
// const pageData = canvas.toDataURL('image/jpeg', 1.0)
|
|
||||||
// const PDF = new JsPDF('', 'pt', [imgWidth, imgHeight])
|
|
||||||
// PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
|
|
||||||
// setTimeout(() => {
|
|
||||||
// PDF.save(fileName) // 导出文件名
|
|
||||||
// }, 1000)
|
|
||||||
// })
|
|
||||||
// element.style.display = 'none'
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -94,18 +94,6 @@ export default {
|
|||||||
if (itemName === undefined) {
|
if (itemName === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 路由跳转时携带序号(或名称+序号)
|
|
||||||
this.$router.push({
|
|
||||||
path: 'operatingRevenueBase',
|
|
||||||
query: { // 使用query传递参数(推荐),也可使用params
|
|
||||||
// baseName: itemName,
|
|
||||||
factory: baseIndex,
|
|
||||||
dateData: this.dateData
|
|
||||||
}
|
|
||||||
// 若仍需用base作为参数:
|
|
||||||
// base: itemName,
|
|
||||||
// params: { baseIndex: baseIndex }
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 定义resize处理函数(命名函数,方便移除)
|
// 定义resize处理函数(命名函数,方便移除)
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ export default {
|
|||||||
return ['预算', '实际'];
|
return ['预算', '实际'];
|
||||||
},
|
},
|
||||||
chartD() {
|
chartD() {
|
||||||
// 背景图片路径(若不需要可注释)
|
|
||||||
// const bgImageUrl = require('@/assets/img/labelBg.png');
|
|
||||||
console.log('detailData++++++++++++++++++++++', this.detailData);
|
|
||||||
const rate = this.detailData?.rate || 0
|
const rate = this.detailData?.rate || 0
|
||||||
const diff = this.detailData?.diff || 0
|
const diff = this.detailData?.diff || 0
|
||||||
console.log('diff', diff);
|
console.log('diff', diff);
|
||||||
|
|||||||
@@ -81,7 +81,10 @@ export default {
|
|||||||
const data = list.find(item => item && item.title === def.name) || fallback
|
const data = list.find(item => item && item.title === def.name) || fallback
|
||||||
return {
|
return {
|
||||||
...def,
|
...def,
|
||||||
data,
|
data: {
|
||||||
|
...data,
|
||||||
|
flag: data.rate >= 100 ? 1 : 0,
|
||||||
|
},
|
||||||
sortValue: Number((data && data.real) ?? 0)
|
sortValue: Number((data && data.real) ?? 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user