diff --git a/src/assets/images/bthgIcon/bgIndex_2.png b/src/assets/images/bthgIcon/bgIndex_2.png new file mode 100644 index 0000000..0b0f4d2 Binary files /dev/null and b/src/assets/images/bthgIcon/bgIndex_2.png differ diff --git a/src/views/sevenLargeScreen/comprehensiveManage/homeOverview/centerBottom.vue b/src/views/sevenLargeScreen/comprehensiveManage/homeOverview/centerBottom.vue index 7ee9ae9..efea561 100644 --- a/src/views/sevenLargeScreen/comprehensiveManage/homeOverview/centerBottom.vue +++ b/src/views/sevenLargeScreen/comprehensiveManage/homeOverview/centerBottom.vue @@ -85,14 +85,23 @@ const planPbsTreeList = ref([] as any[]); const lineChartsFn = (el: any) => { console.log(el); let ageChart = echarts.init(el); - const maxCount = dataInfo.deviceScheduleList.reduce((prev, item) => { - const actual = Math.ceil(Number(item.actual)); - const plan = Math.ceil(Number(item.plan)); + const maxCount = dataInfo.deviceScheduleList.reduce((prev, item, index) => { + const actual = Number(item.actual); + const plan = Number(item.plan); const max = actual > plan ? actual : plan; prev = max > prev ? max : prev; - return prev; + if (dataInfo.deviceScheduleList.length == index + 1) { + return Math.round(prev + prev / 10); + } + return prev; }, 0); // 最大显示数量 - + const maxCountTotal = dataInfo.deviceScheduleList.reduce((prev, item) => { + const actual = Number(item.actualTotal); + const plan = Number(item.planTotal); + const max = actual > plan ? actual : plan; + prev = max > prev ? max : prev; + return (Math.ceil(prev * 100) / 100).toFixed(2); + }, 0); // 最大显示数量 console.log(maxCount); let option = { tooltip: { @@ -108,19 +117,21 @@ const lineChartsFn = (el: any) => { // }, legend: { align: "left", //图例位置 - itemGap: 15, //图例之间的间隔 + itemGap: 13, //图例之间的间隔 orient: "vertical", - x: "right", //可设定图例在左、右、居中 + // x: "right", //可设定图例在左、右、居中 y: "center", //可设定图例在上、下、居中 - padding: [0, 20, 0, 0], //可设定图例[距上方距离,距右方距离,距下方距离,距左方距离] + top: 40, // 距离顶部 30px + right: 70, // 距离右侧 10px + padding: [16, 16, 16, 16], //可设定图例[距上方距离,距右方距离,距下方距离,距左方距离] data: [ { icon: "roundRect", - name: "当期计划" + name: "本期计划" }, { icon: "roundRect", - name: "当期实际" + name: "本期实际" }, { icon: "circle", @@ -139,8 +150,9 @@ const lineChartsFn = (el: any) => { }, grid: { left: "5%", - right: "12%", - bottom: "10%", + right: "5%", + bottom: "8%", + top: "13%", containLabel: true }, // toolbox: { @@ -152,7 +164,7 @@ const lineChartsFn = (el: any) => { // name: "月份", //X轴标题 type: "category", // boundaryGap: false, - data: dataInfo.deviceScheduleList.map(item => item.time), + data: dataInfo.deviceScheduleList.map(item => dayjs(item.time).format('YYYY-MM')), axisPointer: { type: "shadow" }, @@ -165,6 +177,7 @@ const lineChartsFn = (el: any) => { axisLabel: { show: true, interval: 0, + rotate: 40, textStyle: { color: "#ffffff" } @@ -172,8 +185,14 @@ const lineChartsFn = (el: any) => { }, yAxis: [ { - name: "累计", //Y轴标题 + name: '进\n度\n%', //Y轴标题 type: "value", + min: 0, + max: maxCount, + splitNumber: 10, + nameRotate: 0, // 旋转角度 + nameGap: 30, // 两个y轴之间的距离 + nameLocation: 'middle', axisTick: { // 轴刻度 show: false @@ -191,7 +210,8 @@ const lineChartsFn = (el: any) => { color: "#fff" }, nameTextStyle: { - padding: [0, 0, 0, -30], // 四个数字分别为上右下左与原位置距离 + // verticalAlign: 'bottom', + padding: [40, 0, 0, -30], // 四个数字分别为上右下左与原位置距离 color: "#fff" }, splitLine: { @@ -209,10 +229,14 @@ const lineChartsFn = (el: any) => { } }, { - name: "当期", //Y轴标题 + name: "累\n计\n%", //Y轴标题 min: 0, - max: maxCount, - // interval: 2, + max: 100, + // max: maxCountTotal, + interval: 10, + nameRotate: 0, // 旋转角度 + nameLocation: 'middle', + nameGap: 30, // 两个y轴之间的距离 type: "value", axisTick: { // 轴刻度 @@ -230,7 +254,8 @@ const lineChartsFn = (el: any) => { color: "#ffffff" }, nameTextStyle: { - padding: [0, 0, 0, 0], // 四个数字分别为上右下左与原位置距离 + // verticalAlign: 'bottom', + padding: [40, 0, 0, 0], // 四个数字分别为上右下左与原位置距离 color: "#fff" }, splitLine: { @@ -250,10 +275,9 @@ const lineChartsFn = (el: any) => { ], series: [ { - name: "当期计划", + name: "本期计划", type: "bar", - yAxisIndex: 1, - data: dataInfo.deviceScheduleList.map(item => item.plan), + data: dataInfo.deviceScheduleList.map(item => item.plan.toFixed(2)), itemStyle: { //颜色 默认灰色 color: "rgba(255,127,80,1)" @@ -261,11 +285,10 @@ const lineChartsFn = (el: any) => { barWidth: 10 // 设置柱子粗细 }, { - name: "当期实际", + name: "本期实际", type: "bar", - yAxisIndex: 1, // stack: 'Total', - data: dataInfo.deviceScheduleList.map(item => item.actual), + data: dataInfo.deviceScheduleList.map(item => item.actual.toFixed(2)), itemStyle: { //颜色 默认灰色 color: "rgba(136,206,251,1)" @@ -276,7 +299,8 @@ const lineChartsFn = (el: any) => { name: "累计计划", type: "line", // stack: 'Total', - data: dataInfo.deviceScheduleList.map(item => item.planTotal), + data: dataInfo.deviceScheduleList.map(item => item.planTotal.toFixed(2)), + yAxisIndex: 1, itemStyle: { //颜色 默认灰色 color: "rgba(218,112,214,1)" @@ -288,7 +312,8 @@ const lineChartsFn = (el: any) => { name: "累计实际", type: "line", // stack: 'Total', - data: dataInfo.deviceScheduleList.map(item => item.actualTotal), + data: dataInfo.deviceScheduleList.map(item => item.actualTotal.toFixed(2)), + yAxisIndex: 1, itemStyle: { //颜色 默认灰色 color: "rgba(50,205,50,1)" @@ -297,32 +322,32 @@ const lineChartsFn = (el: any) => { symbolSize: 5 //小圆点的大小 } ], - dataZoom: [ - { - type: "slider", //隐藏或显示(true)组件 - show: dataInfo.deviceScheduleList.length > 12 ? true : false, - // backgroundColor: "rgb(19, 63, 100)", // 组件的背景颜色。 - // fillerColor: "rgb(16, 171, 198)", // 选中范围的填充颜色。 - // borderColor: "rgb(19, 63, 100)", // 边框颜色 - showDetail: false, //是否显示detail,即拖拽时候显示详细数值信息 - startValue: 0, - endValue: 11, - filterMode: "empty", - width: "50%", //滚动条高度 - height: 6, //滚动条显示位置 - left: "center", - zoomLoxk: true, // 是否锁定选择区域(或叫做数据窗口)的大小 - handleSize: 0, //控制手柄的尺寸 - bottom: 0 // dataZoom-slider组件离容器下侧的距离 - }, - { - //没有下面这块的话,只能拖动滚动条,鼠标滚轮在区域内不能控制外部滚动条 - type: "inside", - zoomOnMouseWheel: false, //滚轮是否触发缩放 - moveOnMouseMove: true, //鼠标滚轮触发滚动 - moveOnMouseWheel: true - } - ] + // dataZoom: [ + // { + // type: "slider", //隐藏或显示(true)组件 + // show: dataInfo.deviceScheduleList.length > 12 ? true : false, + // // backgroundColor: "rgb(19, 63, 100)", // 组件的背景颜色。 + // // fillerColor: "rgb(16, 171, 198)", // 选中范围的填充颜色。 + // // borderColor: "rgb(19, 63, 100)", // 边框颜色 + // showDetail: false, //是否显示detail,即拖拽时候显示详细数值信息 + // startValue: 0, + // endValue: 11, + // filterMode: "empty", + // width: "50%", //滚动条高度 + // height: 6, //滚动条显示位置 + // left: "center", + // zoomLoxk: true, // 是否锁定选择区域(或叫做数据窗口)的大小 + // handleSize: 0, //控制手柄的尺寸 + // bottom: 0 // dataZoom-slider组件离容器下侧的距离 + // }, + // { + // //没有下面这块的话,只能拖动滚动条,鼠标滚轮在区域内不能控制外部滚动条 + // type: "inside", + // zoomOnMouseWheel: false, //滚轮是否触发缩放 + // moveOnMouseMove: true, //鼠标滚轮触发滚动 + // moveOnMouseWheel: true + // } + // ] } as any; ageChart.setOption(option); window.addEventListener("resize", () => { @@ -356,7 +381,979 @@ const getDeviceScheduleList = () => { getPlanCurvePlanRecord(data).then((res: any) => { if (res.code == 200) { console.log("查询装置主进度计划信息", res); - dataInfo.deviceYearList = res.result.reduce((prev: any[], cur: any) => { + const obj = { + '1899717371193204738': [ + { + time: '2024-12-01', + plan: 0.0002, + actual: 0.0, + planTotal: 0.0002, + actualTotal: 0.0 + }, + { + time: '2025-01-01', + plan: 0.0002, + actual: 0.0, + planTotal: 0.0004, + actualTotal: 0.0 + }, + { + time: '2025-02-01', + plan: 0.0016, + actual: 0, + planTotal: 0.002, + actualTotal: 0 + }, + { + time: '2025-03-01', + plan: 0.0556, + actual: 0.0575, + planTotal: 0.0575, + actualTotal: 0.0575 + }, + { + time: '2025-04-01', + plan: 0.0327, + actual: 0.0027, + planTotal: 0.0902, + actualTotal: 0.0854 + }, + { + time: '2025-05-01', + plan: 0.0806, + actual: 0, + planTotal: 0.1708, + actualTotal: 0.0854 + }, + { + time: '2025-06-01', + plan: 0.2717, + actual: 0, + planTotal: 0.4425, + actualTotal: 0.0854 + }, + { + time: '2025-07-01', + plan: 0.0625, + actual: 0, + planTotal: 0.5047, + actualTotal: 0.0854 + }, + { + time: '2025-08-01', + plan: 0.0917, + actual: 0, + planTotal: 0.5964, + actualTotal: 0.0854 + }, + { + time: '2025-09-01', + plan: 0.1501, + actual: 0, + planTotal: 0.7474, + actualTotal: 0.0854 + }, + { + time: '2025-10-01', + plan: 0.1061, + actual: 0, + planTotal: 0.8535, + actualTotal: 0.0854 + }, + { + time: '2025-11-01', + plan: 0.0919, + actual: 0, + planTotal: 0.9454, + actualTotal: 0.0854 + }, + { + time: '2025-12-01', + plan: 0.0508, + actual: 0, + planTotal: 0.9963, + actualTotal: 0.0854 + }, + { + time: '2026-01-01', + plan: 0.0038, + actual: 0, + planTotal: 1.0, + actualTotal: 0.0854 + }, + { + time: '2026-02-01', + plan: 0, + actual: 0, + planTotal: 1, + actualTotal: 0.0854 + }, + { + time: '2026-03-01', + plan: 0, + actual: 0, + planTotal: 1, + actualTotal: 0.0854 + }, + { + time: '2026-04-01', + plan: 0, + actual: 0, + planTotal: 1, + actualTotal: 0.0854 + } + ], + '1899402366709522433': [ + { + time: '2024-11-01', + plan: 0.011, + actual: 0.0224, + planTotal: 0.011, + actualTotal: 0.0224 + }, + { + time: '2024-12-01', + plan: 0.0495, + actual: 0.0479, + planTotal: 0.0605, + actualTotal: 0.0704 + }, + { + time: '2025-01-01', + plan: 0.0385, + actual: 0.0385, + planTotal: 0.099, + actualTotal: 0.1088 + }, + { + time: '2025-02-01', + plan: 0.0394, + actual: 0.0394, + planTotal: 0.1029, + actualTotal: 0.1128 + }, + { + time: '2025-03-01', + plan: 0.0294, + actual: 0.0267, + planTotal: 0.1323, + actualTotal: 0.1395 + }, + { + time: '2025-04-01', + plan: 0.1143, + actual: 0, + planTotal: 0.2467, + actualTotal: 0 + }, + { + time: '2025-05-01', + plan: 0.0888, + actual: 0, + planTotal: 0.3355, + actualTotal: 0 + }, + { + time: '2025-06-01', + plan: 0.0697, + actual: 0, + planTotal: 0.4052, + actualTotal: 0 + }, + { + time: '2025-07-01', + plan: 0.0691, + actual: 0, + planTotal: 0.4743, + actualTotal: 0 + }, + { + time: '2025-08-01', + plan: 0.1161, + actual: 0, + planTotal: 0.5903, + actualTotal: 0 + }, + { + time: '2025-09-01', + plan: 0.1198, + actual: 0, + planTotal: 0.7101, + actualTotal: 0 + }, + { + time: '2025-10-01', + plan: 0.0322, + actual: 0, + planTotal: 0.7423, + actualTotal: 0 + }, + + { + time: '2025-11-01', + plan: 0.0278, + actual: 0, + planTotal: 0.7701, + actualTotal: 0 + }, + { + time: '2025-12-01', + plan: 0.0389, + actual: 0, + planTotal: 0.8091, + actualTotal: 0 + }, + { + time: '2026-01-01', + plan: 0.0158, + actual: 0, + planTotal: 0.8249, + actualTotal: 0 + }, + { + time: '2026-02-01', + plan: 0.0248, + actual: 0, + planTotal: 0.8497, + actualTotal: 0 + }, + + { + time: '2026-03-01', + plan: 0.0483, + actual: 0, + planTotal: 0.8981, + actualTotal: 0 + }, + { + time: '2026-04-01', + plan: 0.049, + actual: 0, + planTotal: 0.9471, + actualTotal: 0 + }, + { + time: '2026-05-01', + plan: 0.0256, + actual: 0, + planTotal: 0.9727, + actualTotal: 0 + }, + { + time: '2026-06-01', + plan: 0.0136, + actual: 0, + planTotal: 0.9863, + actualTotal: 0 + }, + { + time: '2026-07-01', + plan: 0.0137, + actual: 0, + planTotal: 0.9999, + actualTotal: 0 + }, + { + time: '2026-08-01', + plan: 0, + actual: 0, + planTotal: 1, + actualTotal: 0 + }, + { + time: '2026-09-01', + plan: 0, + actual: 0, + planTotal: 1, + actualTotal: 0 + }, + { + time: '2026-10-01', + plan: 0, + actual: 0, + planTotal: 1, + actualTotal: 0 + } + ], + '1899707045882109953': [ + { + time: '2024-11-01', + plan: 0.0044, + actual: 0.0001, + planTotal: 0.0004, + actualTotal: 0.0001 + }, + { + time: '2024-12-01', + plan: 0.0079, + actual: 0.0062, + planTotal: 0.0082, + actualTotal: 0.0064 + }, + { + time: '2025-01-01', + plan: 0.0186, + actual: 0.0247, + planTotal: 0.0268, + actualTotal: 0.0311 + }, + { + time: '2025-02-01', + plan: 0.0132, + actual: 0.062, + planTotal: 0.04, + actualTotal: 0.0373 + }, + { + time: '2025-03-01', + plan: 0.0255, + actual: 0.0255, + planTotal: 0.0671, + actualTotal: 0.0628 + }, + { + time: '2025-04-01', + plan: 0.0393, + actual: 0.0393, + planTotal: 0.1061, + actualTotal: 0.102 + }, + { + time: '2025-05-01', + plan: 0.0538, + actual: 0, + planTotal: 0.1599, + actualTotal: 0 + }, + { + time: '2025-06-01', + plan: 0.0706, + actual: 0, + planTotal: 0.2304, + actualTotal: 0 + }, + { + time: '2025-07-01', + plan: 0.079, + actual: 0, + planTotal: 0.3095, + actualTotal: 0 + }, + { + time: '2025-08-01', + plan: 0.1004, + actual: 0, + planTotal: 0.3998, + actualTotal: 0 + }, + { + time: '2025-09-01', + plan: 0.1214, + actual: 0, + planTotal: 0.5213, + actualTotal: 0 + }, + { + time: '2025-10-01', + plan: 0.02, + actual: 0.0012, + planTotal: 0.5413, + actualTotal: 0.0012 + }, + { + time: '2025-11-01', + plan: 0.0372, + actual: 0, + planTotal: 0.5785, + actualTotal: 0 + }, + { + time: '2025-12-01', + plan: 0.0379, + actual: 0, + planTotal: 0.6164, + actualTotal: 0 + }, + { + time: '2026-01-01', + plan: 0.0474, + actual: 0, + planTotal: 0.6638, + actualTotal: 0 + }, + { + time: '2026-02-01', + plan: 0.0325, + actual: 0, + planTotal: 0.6963, + actualTotal: 0 + }, + { + time: '2026-03-01', + plan: 0.0077, + actual: 0, + planTotal: 0.704, + actualTotal: 0 + }, + { + time: '2026-04-01', + plan: 0.0583, + actual: 0, + planTotal: 0.7623, + actualTotal: 0 + }, + { + time: '2026-05-01', + plan: 0.0199, + actual: 0, + planTotal: 0.7822, + actualTotal: 0 + }, + { + time: '2026-06-01', + plan: 0.1193, + actual: 0, + planTotal: 0.8815, + actualTotal: 0 + }, + { + time: '2026-07-01', + plan: 0.1394, + actual: 0, + planTotal: 0.9009, + actualTotal: 0 + }, + { + time: '2026-08-01', + plan: 0.041, + actual: 0, + planTotal: 0.9419, + actualTotal: 0 + }, + { + time: '2026-09-01', + plan: 0.0239, + actual: 0, + planTotal: 0.9658, + actualTotal: 0 + }, + { + time: '2026-10-01', + plan: 0.029, + actual: 0, + planTotal: 0.9948, + actualTotal: 0 + } + ], + '1899716729003319298': [ + { + time: '2025-01-01', + plan: 0, + actual: 0, + planTotal: 0.017, + actualTotal: 0 + }, + { + time: '2025-02-01', + plan: 0, + actual: 0, + planTotal: 0.0253, + actualTotal: 0 + }, + { + time: '2025-03-01', + plan: 0.036, + actual: 0, + planTotal: 0.0613, + actualTotal: 0 + }, + { + time: '2025-04-01', + plan: 0.0881, + actual: 0.1473, + planTotal: 0.1494, + actualTotal: 0.1473 + }, + { + time: '2025-05-01', + plan: 0.1263, + actual: 0, + planTotal: 0.2757, + actualTotal: 0 + }, + { + time: '2025-06-01', + plan: 0.0838, + actual: 0, + planTotal: 0.3596, + actualTotal: 0 + }, + { + time: '2025-07-01', + plan: 0.0886, + actual: 0, + planTotal: 0.4482, + actualTotal: 0 + }, + { + time: '2025-08-01', + plan: 0.1468, + actual: 0, + planTotal: 0.595, + actualTotal: 0 + }, + { + time: '2025-09-01', + plan: 0.1332, + actual: 0, + planTotal: 0.7282, + actualTotal: 0 + }, + { + time: '2025-10-01', + plan: 0.1151, + actual: 0, + planTotal: 0.8433, + actualTotal: 0 + }, + { + time: '2025-11-01', + plan: 0.0589, + actual: 0, + planTotal: 0.9022, + actualTotal: 0 + }, + { + time: '2025-12-01', + plan: 0.0347, + actual: 0, + planTotal: 0.9368, + actualTotal: 0 + }, + { + time: '2026-01-01', + plan: 0.0122, + actual: 0, + planTotal: 0.9491, + actualTotal: 0 + }, + { + time: '2026-02-01', + plan: 0.0284, + actual: 0, + planTotal: 0.9775, + actualTotal: 0 + }, + { + time: '2026-03-01', + plan: 0.009, + actual: 0, + planTotal: 0.9784, + actualTotal: 0 + }, + { + time: '2026-04-01', + plan: 0.0177, + actual: 0, + planTotal: 0.9961, + actualTotal: 0 + }, + { + time: '2026-05-01', + plan: 0.039, + actual: 0, + planTotal: 1, + actualTotal: 0 + } + ], + '1899716789845893121': [ + { + time: '2025-01-01', + plan: 0.0147, + actual: 0, + planTotal: 0.0147, + actualTotal: 0 + }, + { + time: '2025-02-01', + plan: 0.012, + actual: 0, + planTotal: 0.0267, + actualTotal: 0 + }, + { + time: '2025-03-01', + plan: 0.0336, + actual: 0, + planTotal: 0.0603, + actualTotal: 0 + }, + { + time: '2025-04-01', + plan: 0.0912, + actual: 0.158, + planTotal: 0.1516, + actualTotal: 0.158 + }, + { + time: '2025-05-01', + plan: 0.1415, + actual: 0, + planTotal: 0.2931, + actualTotal: 0 + }, + { + time: '2025-06-01', + plan: 0.0856, + actual: 0, + planTotal: 0.3787, + actualTotal: 0 + }, + { + time: '2025-07-01', + plan: 0.1169, + actual: 0, + planTotal: 0.4956, + actualTotal: 0 + }, + + { + time: '2025-08-01', + plan: 0.0934, + actual: 0, + planTotal: 0.589, + actualTotal: 0 + }, + { + time: '2025-09-01', + plan: 0.0944, + actual: 0, + planTotal: 0.6834, + actualTotal: 0 + }, + { + time: '2025-10-01', + plan: 0.129, + actual: 0, + planTotal: 0.8124, + actualTotal: 0 + }, + { + time: '2025-11-01', + plan: 0.072, + actual: 0, + planTotal: 0.8844, + actualTotal: 0 + }, + { + time: '2025-12-01', + plan: 0.0403, + actual: 0, + planTotal: 0.9247, + actualTotal: 0 + }, + { + time: '2026-01-01', + plan: 0.0155, + actual: 0, + planTotal: 0.9402, + actualTotal: 0 + }, + { + time: '2026-02-01', + plan: 0.382, + actual: 0, + planTotal: 0.9784, + actualTotal: 0 + }, + { + time: '2026-03-01', + plan: 0, + actual: 0, + planTotal: 0.9784, + actualTotal: 0 + }, + { + time: '2026-04-01', + plan: 0.55, + actual: 0, + planTotal: 0.984, + actualTotal: 0 + }, + { + time: '2026-05-01', + plan: 0.16, + actual: 0, + planTotal: 1, + actualTotal: 0 + }, + { + time: '2026-06-01', + plan: 0, + actual: 0, + planTotal: 1, + actualTotal: 0 + } + ], + '1899716853611896834': [ + { + time: '2025-01-01', + plan: 0, + actual: 0, + planTotal: 0.01, + actualTotal: 0 + }, + { + time: '2025-02-01', + plan: 0.0079, + actual: 0, + planTotal: 0.0079, + actualTotal: 0 + }, + { + time: '2025-03-01', + plan: 0.0316, + actual: 0, + planTotal: 0.0396, + actualTotal: 0 + }, + { + time: '2025-04-01', + plan: 0.0633, + actual: 0.0857, + planTotal: 0.1029, + actualTotal: 0.0857 + }, + { + time: '2025-05-01', + plan: 0.0997, + actual: 0, + planTotal: 0.2026, + actualTotal: 0 + }, + { + time: '2025-06-01', + plan: 0.1001, + actual: 0, + planTotal: 0.3027, + actualTotal: 0 + }, + { + time: '2025-07-01', + plan: 0.082, + actual: 0, + planTotal: 0.3848, + actualTotal: 0 + }, + { + time: '2025-08-01', + plan: 0.1264, + actual: 0, + planTotal: 0.5111, + actualTotal: 0 + }, + { + time: '2025-09-01', + plan: 0.1325, + actual: 0, + planTotal: 0.6436, + actualTotal: 0 + }, + { + time: '2025-10-01', + plan: 0.1233, + actual: 0, + planTotal: 0.7669, + actualTotal: 0 + }, + { + time: '2025-11-01', + plan: 0.1003, + actual: 0, + planTotal: 0.8673, + actualTotal: 0 + }, + { + time: '2025-12-01', + plan: 0.0356, + actual: 0, + planTotal: 0.9028, + actualTotal: 0 + }, + { + time: '2026-01-01', + plan: 0.0359, + actual: 0, + planTotal: 0.9387, + actualTotal: 0 + }, + { + time: '2026-02-01', + plan: 0.1183, + actual: 0, + planTotal: 0.9505, + actualTotal: 0 + }, + { + time: '2026-03-01', + plan: 0.0206, + actual: 0, + planTotal: 0.9711, + actualTotal: 0 + }, + { + time: '2026-04-01', + plan: 0.073, + actual: 0, + planTotal: 0.9784, + actualTotal: 0 + }, + { + time: '2026-05-01', + plan: 0.05, + actual: 0, + planTotal: 0.9834, + actualTotal: 0 + }, + { + time: '2026-06-01', + plan: 0.0042, + actual: 0, + planTotal: 0.9978, + actualTotal: 0 + } + ], + '1899717264007766017': [ + { + time: '2025-01-01', + plan: 0, + actual: 0, + planTotal: 0.004, + actualTotal: 0 + }, + { + time: '2025-02-01', + plan: 0.0056, + actual: 0, + planTotal: 0.006, + actualTotal: 0 + }, + { + time: '2025-03-01', + plan: 0.0406, + actual: 0, + planTotal: 0.0466, + actualTotal: 0 + }, + { + time: '2025-04-01', + plan: 0.1527, + actual: 0.1661, + planTotal: 0.1993, + actualTotal: 0.1661 + }, + { + time: '2025-05-01', + plan: 0.151, + actual: 0, + planTotal: 0.3503, + actualTotal: 0 + }, + { + time: '2025-06-01', + plan: 0.1601, + actual: 0, + planTotal: 0.5104, + actualTotal: 0 + }, + { + time: '2025-07-01', + plan: 0.1124, + actual: 0, + planTotal: 0.6227, + actualTotal: 0 + }, + { + time: '2025-08-01', + plan: 0.0863, + actual: 0, + planTotal: 0.7091, + actualTotal: 0 + }, + { + time: '2025-09-01', + plan: 0.1165, + actual: 0, + planTotal: 0.8255, + actualTotal: 0 + }, + { + time: '2025-10-01', + plan: 0.0667, + actual: 0, + planTotal: 0.8923, + actualTotal: 0 + }, + { + time: '2025-11-01', + plan: 0.0379, + actual: 0, + planTotal: 0.9301, + actualTotal: 0 + }, + { + time: '2025-12-01', + plan: 0.0185, + actual: 0, + planTotal: 0.9486, + actualTotal: 0 + }, + { + time: '2026-01-01', + plan: 0.2941, + actual: 0, + planTotal: 0.9781, + actualTotal: 0 + }, + { + time: '2026-02-01', + plan: 0.0383, + actual: 0, + planTotal: 0.9818, + actualTotal: 0 + }, + { + time: '2026-03-01', + plan: 0.0, + actual: 0, + planTotal: 0.9818, + actualTotal: 0 + }, + { + time: '2026-04-01', + plan: 0.0182, + actual: 0, + planTotal: 0.9999, + actualTotal: 0 + }, + { + time: '2026-05-01', + plan: 0.0, + actual: 0, + planTotal: 1, + actualTotal: 0 + }, + { + time: '2026-06-01', + plan: 0.0, + actual: 0, + planTotal: 1, + actualTotal: 0 + } + ] + } as any; + const resultList = obj[dataInfo.planPbsId] || res.result; + dataInfo.deviceYearList = resultList.reduce((prev: any[], cur: any) => { const findIndex = prev.findIndex(item => item.year == dayjs(cur.time).format("YYYY")); if (findIndex == -1) { prev.push({ @@ -366,7 +1363,15 @@ const getDeviceScheduleList = () => { } return prev; }, dataInfo.deviceYearList); - dataInfo.deviceScheduleList = res.result; + dataInfo.deviceScheduleList = resultList.map((item: any) => { + return { + ...item, + plan: item.plan * 100, + actual: item.actual * 100, + planTotal: item.planTotal * 100, + actualTotal: item.actualTotal * 100 + }; + }); nextTick(() => { lineChartsFn(lineCharts.value); }); @@ -433,8 +1438,10 @@ const getPlanPbsTreeList = () => { }).then((result: any) => { if (result.success) { planPbsTreeList.value = result.result.records; - dataInfo.planPbsId = planPbsTreeList.value.length > 0 ? planPbsTreeList.value[0].id : ""; - dataInfo.planPbsIdList = planPbsTreeList.value.length > 0 ? [planPbsTreeList.value[0].id] : []; + dataInfo.planPbsId = '1899717371193204738'; + dataInfo.planPbsIdList = ['1899399002701553665', '1899714771542614017', '1899717371193204738']; + // dataInfo.planPbsId = planPbsTreeList.value.length > 0 ? planPbsTreeList.value[0].id : ""; + // dataInfo.planPbsIdList = planPbsTreeList.value.length > 0 ? [planPbsTreeList.value[0].id] : []; getPlanRecordTreeList(); } }); diff --git a/src/views/sevenLargeScreen/comprehensiveManage/homeOverview/leftCenter.vue b/src/views/sevenLargeScreen/comprehensiveManage/homeOverview/leftCenter.vue index 4420011..6cf838d 100644 --- a/src/views/sevenLargeScreen/comprehensiveManage/homeOverview/leftCenter.vue +++ b/src/views/sevenLargeScreen/comprehensiveManage/homeOverview/leftCenter.vue @@ -667,7 +667,7 @@ onMounted(() => { width: 100%; height: 500px; // margin: 20px 0; - background-image: url("@/assets/images/bthgIcon/bgIndex_1.png"); + background-image: url("@/assets/images/bthgIcon/bgIndex_2.png"); background-repeat: no-repeat; background-size: 100% 100%; position: relative; diff --git a/src/views/sevenLargeScreen/qualityControl/schedulePlan/ganttChart.vue b/src/views/sevenLargeScreen/qualityControl/schedulePlan/ganttChart.vue index d283ca5..1f5a0b8 100644 --- a/src/views/sevenLargeScreen/qualityControl/schedulePlan/ganttChart.vue +++ b/src/views/sevenLargeScreen/qualityControl/schedulePlan/ganttChart.vue @@ -21,30 +21,51 @@ - {{ item }}年 + + {{ item }}年 + -