添加假数据

main
junhong 1 week ago
parent c4e3f5e49f
commit cfa514ea64
  1. 10
      src/views/constructionScheduling/progress-monitoring/echartsOptions.js
  2. 6
      src/views/constructionScheduling/progress-monitoring/index.vue

@ -13,7 +13,7 @@ export function echartsZhe({ ydata2, ydata1, xdata }) {
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
show: true, show: false,
textStyle: { textStyle: {
color: "#8a989f", color: "#8a989f",
fontSize: 10, fontSize: 10,
@ -40,7 +40,7 @@ export function echartsZhe({ ydata2, ydata1, xdata }) {
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
show: true, show: false,
textStyle: { textStyle: {
color: "#8a989f", color: "#8a989f",
fontSize: 10, fontSize: 10,
@ -60,9 +60,9 @@ export function echartsZhe({ ydata2, ydata1, xdata }) {
}] }]
return { return {
grid: { grid: {
left: "5%", left: "10%",
right: "12%", right: "12%",
top: "15%", top: "25%",
bottom: "10%", bottom: "10%",
}, },
legend: { legend: {
@ -71,7 +71,7 @@ export function echartsZhe({ ydata2, ydata1, xdata }) {
textStyle: { textStyle: {
fontSize: 14, fontSize: 14,
}, },
data: xdata ? xdata : [], data: ['计划进度','实际进度'],
}, },
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",

@ -60,9 +60,9 @@ function getList(params) {
state.echart({ state.echart({
id: 'staff' + key, id: 'staff' + key,
grid: state.echartsZhe({ grid: state.echartsZhe({
ydata1: groupedData[key].map(item => item.plan), ydata1: groupedData[key].map(item => item.plan).reverse(),
ydata2: groupedData[key].map(item => item.sj), ydata2: groupedData[key].map(item => item.sj).reverse(),
xdata: groupedData[key].map(item => item.date) xdata: groupedData[key].map(item => item.date.slice(-5)).reverse()
}), }),
}); });
}) })

Loading…
Cancel
Save