bi调整0324
This commit is contained in:
parent
4809d1e8ef
commit
8b033d88fc
|
|
@ -46,7 +46,7 @@ export default {
|
||||||
let date = new Date(); // 从今天的日期开始
|
let date = new Date(); // 从今天的日期开始
|
||||||
for (let i = 1; i <= N; i++) {
|
for (let i = 1; i <= N; i++) {
|
||||||
// 格式化日期为'YYYY-MM-DD'
|
// 格式化日期为'YYYY-MM-DD'
|
||||||
const formattedDate = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
|
const formattedDate = `${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
|
||||||
const formattedDate2 = `${date.getFullYear()}${String(date.getMonth() + 1).padStart(2, '0')}${String(date.getDate()).padStart(2, '0')}`;
|
const formattedDate2 = `${date.getFullYear()}${String(date.getMonth() + 1).padStart(2, '0')}${String(date.getDate()).padStart(2, '0')}`;
|
||||||
|
|
||||||
// 订单量随机在20到200之间,步长为10
|
// 订单量随机在20到200之间,步长为10
|
||||||
|
|
@ -56,7 +56,7 @@ export default {
|
||||||
const completedQuantity = Math.floor(Math.random() * (orderQuantity / 10)) * 10;
|
const completedQuantity = Math.floor(Math.random() * (orderQuantity / 10)) * 10;
|
||||||
|
|
||||||
// 计算完成百分比
|
// 计算完成百分比
|
||||||
const completionRate = ((completedQuantity / orderQuantity) * 100).toFixed(2) + '%';
|
const completionRate = ((completedQuantity / orderQuantity) * 100).toFixed(1) + '%';
|
||||||
// eslint-disable-next-line no-inner-declarations
|
// eslint-disable-next-line no-inner-declarations
|
||||||
function createProgressCircle(percentage) {
|
function createProgressCircle(percentage) {
|
||||||
let color, content;
|
let color, content;
|
||||||
|
|
@ -99,11 +99,14 @@ export default {
|
||||||
// eslint-disable-next-line no-const-assign
|
// eslint-disable-next-line no-const-assign
|
||||||
newDataItem = [
|
newDataItem = [
|
||||||
`PS-${formattedDate2}${String(i).padStart(3, '0')}`, // 编号
|
`PS-${formattedDate2}${String(i).padStart(3, '0')}`, // 编号
|
||||||
`
|
//`
|
||||||
<div style="font-weight:bold;font-size:35px;">
|
// <div style="font-weight:bold;font-size:35px;">
|
||||||
${title}
|
// ${title}
|
||||||
</div>
|
// </div>
|
||||||
`, // 固定值
|
//`,
|
||||||
|
title,
|
||||||
|
|
||||||
|
// 固定值
|
||||||
formattedDate, // 日期
|
formattedDate, // 日期
|
||||||
orderQuantity, // 订单量
|
orderQuantity, // 订单量
|
||||||
completionRate, // 完成率
|
completionRate, // 完成率
|
||||||
|
|
@ -200,17 +203,17 @@ export default {
|
||||||
data: generateRandomData(30, 'U1盖板'),
|
data: generateRandomData(30, 'U1盖板'),
|
||||||
headerHeight: 50,
|
headerHeight: 50,
|
||||||
index: true,
|
index: true,
|
||||||
columnWidth: [80, 300,400],
|
columnWidth: [80, 280,400],
|
||||||
align: ['center']
|
align: ['center']
|
||||||
},
|
},
|
||||||
|
|
||||||
config3: {
|
config3: {
|
||||||
|
|
||||||
header: ['工单号', '产品名称', '派工日期', '派工数量', '工序进度', '上陶瓷', '气密性QC', '整机组装', '功能QC', '全外观QC', '包装'] ,
|
header: ['工单号', '产品名称', '派工日期', '派工数量', '工序进度', '上陶瓷', '气密性QC', '整机组装', '功能QC', '全外观QC', '包装','剩余数量'] ,
|
||||||
data: generateRandomData(30, 'U1C智能坐便器[220V]'),
|
data: generateRandomData(30, 'U1C智能坐便器[220V]'),
|
||||||
headerHeight: 50,
|
headerHeight: 50,
|
||||||
index: true,
|
index: true,
|
||||||
columnWidth: [80, 300,400],
|
columnWidth: [80, 280,400],
|
||||||
align: ['center']
|
align: ['center']
|
||||||
},
|
},
|
||||||
config4: {
|
config4: {
|
||||||
|
|
@ -218,7 +221,7 @@ export default {
|
||||||
data: generateRandomData(30, 'U1机芯2'),
|
data: generateRandomData(30, 'U1机芯2'),
|
||||||
headerHeight: 50,
|
headerHeight: 50,
|
||||||
index: true,
|
index: true,
|
||||||
columnWidth: [80, 300,400],
|
columnWidth: [80, 280,400],
|
||||||
align: ['center']
|
align: ['center']
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,8 @@ export default {
|
||||||
data: rawData.map(value => {
|
data: rawData.map(value => {
|
||||||
const segments = generateStackData(value);
|
const segments = generateStackData(value);
|
||||||
return i < segments.length ? segments[i] : 0; // 超出分段返回 0
|
return i < segments.length ? segments[i] : 0; // 超出分段返回 0
|
||||||
}),
|
}), // 替换为你的数据
|
||||||
|
barWidth: '40%', // 设置柱状图宽度为 40% 的可用空间,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: `rgba(135, 206, 235, ${i * 0.1+0.2})`, // 从下往上透明度变化,
|
color: `rgba(135, 206, 235, ${i * 0.1+0.2})`, // 从下往上透明度变化,
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,8 @@ export default {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: [
|
data: [
|
||||||
75, 65, 68, 69, 40, 82
|
75, 65, 68, 69, 40, 82
|
||||||
],
|
], // 替换为你的数据
|
||||||
|
barWidth: '40%', // 设置柱状图宽度为 40% 的可用空间,
|
||||||
markPoint: {
|
markPoint: {
|
||||||
data: [
|
data: [
|
||||||
{ type: 'max', name: 'Max' },
|
{ type: 'max', name: 'Max' },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue