diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/carbonAnalyse.vue b/src/views/count/components/carbonAnalyse.vue new file mode 100644 index 0000000..33a4cfd --- /dev/null +++ b/src/views/count/components/carbonAnalyse.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/carbonAnalyse.vue b/src/views/count/components/carbonAnalyse.vue new file mode 100644 index 0000000..33a4cfd --- /dev/null +++ b/src/views/count/components/carbonAnalyse.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonElement.vue b/src/views/count/components/carbonElement.vue new file mode 100644 index 0000000..71fb2cb --- /dev/null +++ b/src/views/count/components/carbonElement.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/carbonAnalyse.vue b/src/views/count/components/carbonAnalyse.vue new file mode 100644 index 0000000..33a4cfd --- /dev/null +++ b/src/views/count/components/carbonAnalyse.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonElement.vue b/src/views/count/components/carbonElement.vue new file mode 100644 index 0000000..71fb2cb --- /dev/null +++ b/src/views/count/components/carbonElement.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonGather.vue b/src/views/count/components/carbonGather.vue new file mode 100644 index 0000000..5f3ff37 --- /dev/null +++ b/src/views/count/components/carbonGather.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/carbonAnalyse.vue b/src/views/count/components/carbonAnalyse.vue new file mode 100644 index 0000000..33a4cfd --- /dev/null +++ b/src/views/count/components/carbonAnalyse.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonElement.vue b/src/views/count/components/carbonElement.vue new file mode 100644 index 0000000..71fb2cb --- /dev/null +++ b/src/views/count/components/carbonElement.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonGather.vue b/src/views/count/components/carbonGather.vue new file mode 100644 index 0000000..5f3ff37 --- /dev/null +++ b/src/views/count/components/carbonGather.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 5b40342..02b6427 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -13,7 +13,6 @@ const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -40,6 +39,13 @@ } }) sumArr.value = sums + const value = { + name: '能源加工转换', + co: 0, + ch: 0, + no: 0, + } + sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/carbonAnalyse.vue b/src/views/count/components/carbonAnalyse.vue new file mode 100644 index 0000000..33a4cfd --- /dev/null +++ b/src/views/count/components/carbonAnalyse.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonElement.vue b/src/views/count/components/carbonElement.vue new file mode 100644 index 0000000..71fb2cb --- /dev/null +++ b/src/views/count/components/carbonElement.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonGather.vue b/src/views/count/components/carbonGather.vue new file mode 100644 index 0000000..5f3ff37 --- /dev/null +++ b/src/views/count/components/carbonGather.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 5b40342..02b6427 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -13,7 +13,6 @@ const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -40,6 +39,13 @@ } }) sumArr.value = sums + const value = { + name: '能源加工转换', + co: 0, + ch: 0, + no: 0, + } + sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index de2412f..0e9b833 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -194,11 +194,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -225,6 +227,13 @@ } }) sumArr.value = sums + const value = { + name: '固定燃烧', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/carbonAnalyse.vue b/src/views/count/components/carbonAnalyse.vue new file mode 100644 index 0000000..33a4cfd --- /dev/null +++ b/src/views/count/components/carbonAnalyse.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonElement.vue b/src/views/count/components/carbonElement.vue new file mode 100644 index 0000000..71fb2cb --- /dev/null +++ b/src/views/count/components/carbonElement.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonGather.vue b/src/views/count/components/carbonGather.vue new file mode 100644 index 0000000..5f3ff37 --- /dev/null +++ b/src/views/count/components/carbonGather.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 5b40342..02b6427 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -13,7 +13,6 @@ const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -40,6 +39,13 @@ } }) sumArr.value = sums + const value = { + name: '能源加工转换', + co: 0, + ch: 0, + no: 0, + } + sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index de2412f..0e9b833 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -194,11 +194,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -225,6 +227,13 @@ } }) sumArr.value = sums + const value = { + name: '固定燃烧', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue index b745bef..97e361f 100644 --- a/src/views/count/components/mobileCombustion.vue +++ b/src/views/count/components/mobileCombustion.vue @@ -168,11 +168,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -199,6 +201,13 @@ } }) sumArr.value = sums + const value = { + name: '移动燃烧', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('移动燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/carbonAnalyse.vue b/src/views/count/components/carbonAnalyse.vue new file mode 100644 index 0000000..33a4cfd --- /dev/null +++ b/src/views/count/components/carbonAnalyse.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonElement.vue b/src/views/count/components/carbonElement.vue new file mode 100644 index 0000000..71fb2cb --- /dev/null +++ b/src/views/count/components/carbonElement.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonGather.vue b/src/views/count/components/carbonGather.vue new file mode 100644 index 0000000..5f3ff37 --- /dev/null +++ b/src/views/count/components/carbonGather.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 5b40342..02b6427 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -13,7 +13,6 @@ const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -40,6 +39,13 @@ } }) sumArr.value = sums + const value = { + name: '能源加工转换', + co: 0, + ch: 0, + no: 0, + } + sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index de2412f..0e9b833 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -194,11 +194,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -225,6 +227,13 @@ } }) sumArr.value = sums + const value = { + name: '固定燃烧', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue index b745bef..97e361f 100644 --- a/src/views/count/components/mobileCombustion.vue +++ b/src/views/count/components/mobileCombustion.vue @@ -168,11 +168,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -199,6 +201,13 @@ } }) sumArr.value = sums + const value = { + name: '移动燃烧', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('移动燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue index 144101c..2229a5c 100644 --- a/src/views/count/components/photovoltaic.vue +++ b/src/views/count/components/photovoltaic.vue @@ -34,12 +34,14 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] columns.forEach((column: any, index: number) => { - console.log(column, 'column') if (index === 0) { sums[index] = '总计' } @@ -65,6 +67,13 @@ } }) sumArr.value = sums + const value = { + name: '光伏', + co: sumArr.value[4], + ch: 0, + no: 0, + } + sessionStorage.setItem('光伏', JSON.stringify(value)) return sums } const watchCapacity = (event: any, index: number) => { diff --git a/src/assets/images/carbon-result-bg-1.png b/src/assets/images/carbon-result-bg-1.png new file mode 100644 index 0000000..d1f724e --- /dev/null +++ b/src/assets/images/carbon-result-bg-1.png Binary files differ diff --git a/src/components.d.ts b/src/components.d.ts index 90f2dde..402fbd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -17,6 +17,7 @@ Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] + BarChartPile: typeof import('./components/Echart/BarChartPile.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] @@ -25,6 +26,7 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] + copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/Echart/BarChartHorizontal.vue b/src/components/Echart/BarChartHorizontal.vue index 475cdbf..9c0e3b8 100644 --- a/src/components/Echart/BarChartHorizontal.vue +++ b/src/components/Echart/BarChartHorizontal.vue @@ -342,6 +342,7 @@ name: item.name, type: 'bar', colorBy: props.colorBy, + stack: 'total', label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/BarChartPile.vue b/src/components/Echart/BarChartPile.vue new file mode 100644 index 0000000..04015b0 --- /dev/null +++ b/src/components/Echart/BarChartPile.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/src/components/Echart/BarChartVertical.vue b/src/components/Echart/BarChartVertical.vue index 02f9f14..433bc9a 100644 --- a/src/components/Echart/BarChartVertical.vue +++ b/src/components/Echart/BarChartVertical.vue @@ -348,7 +348,8 @@ const series: barSeriesOption = { name: item.name, type: 'bar', - colorBy: props.colorBy, + // stack: 'total', + // colorBy: props.colorBy, label: { normal: { show: props.showLabel, diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 74d506a..18caf45 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -35,12 +35,12 @@ default: () => { return { show: true, - orient: 'vertical', - right: '20%', - top: 'center', + orient: 'horizontal', + left: 'center', + bottom: '0', icon: 'circle', - itemWidth: 12, - itemHeight: 12, + // itemWidth: 12, + // itemHeight: 12, itemStyle: { fontSize: 18, }, @@ -72,10 +72,12 @@ * 饼图的半径[内半径,外半径] */ radius: { - type: Array, - default: () => { - return ['30%', '45%'] - }, + // type: Array, + // default: () => { + // return ['30%', '45%'] + // }, + type: String, + default: '55%', }, /** * 距离容器右侧距离,默认0,为legend在右侧时做准备 @@ -120,7 +122,7 @@ default: () => { return { top: '10%', - left: '5%', + left: '15%', right: '50%', bottom: 20, containLabel: true, // 是否包含坐标轴的刻度标签 @@ -146,7 +148,7 @@ */ labelPosition: { type: String, - default: 'center', + default: 'outside', }, /** * 悬停格式化 @@ -205,25 +207,25 @@ type: 'pie', avoidLabelOverlap: true, // 是否启用防止标签重叠策略 roseType: props.roseType, // 玫瑰图类型 - radius: props.radius as string[], // 饼图的半径[内半径,外半径] + radius: props.radius as string, // 饼图的半径[内半径,外半径] center: ['50%', '50%'], // 圆心坐标[横坐标,纵坐标] startAngle: 140, right: props.right, label: { show: props.labelShow, - position: 'center', + position: 'outside', formatter: props.labelFormatter ? props.labelFormatter : (props.valueType == 'percentage' ? '{style1|{b}}\n{style2|{d}%}' : '{style1|{b}}\n{style2|{c}}'), - fontSize: 20, + // fontSize: 20, fontWeight: 'bold', rich: { style1: { color: props.fontColor, - fontSize: 16, + // fontSize: 16, }, style2: { color: props.fontColor, fontWeight: 'bolder', - fontSize: 19, + // fontSize: 19, }, }, emphasis: { diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index 53685f7..8b64153 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -38,6 +38,18 @@ activeMenu: '/carbonCount', }, }, + { + path: 'electricresult', + name: 'electricresult', + component: () => import('@/views/count/components/result.vue'), + meta: { + title: '电力碳核算', + auth: '/count/electric', + sidebar: false, + breadcrumb: true, + activeMenu: '/carbonCount', + }, + }, // { // path: 'heatingcount', // name: 'Heatingcount', diff --git a/src/views/count/components/BarChart.vue b/src/views/count/components/BarChart.vue new file mode 100644 index 0000000..c9b56ba --- /dev/null +++ b/src/views/count/components/BarChart.vue @@ -0,0 +1,95 @@ + + + + diff --git a/src/views/count/components/BarChartPile.vue b/src/views/count/components/BarChartPile.vue new file mode 100644 index 0000000..617ff61 --- /dev/null +++ b/src/views/count/components/BarChartPile.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index f2eafd6..44e8fd5 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入电力', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index 99a7d69..f26a2c1 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -29,11 +29,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -60,6 +62,13 @@ } }) sumArr.value = sums + const value = { + name: '购入热力', + co: sumArr.value[2] ? sumArr.value[2] : 0, + ch: sumArr.value[4] ? sumArr.value[4] : 0, + no: sumArr.value[6] ? sumArr.value[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/carbonAnalyse.vue b/src/views/count/components/carbonAnalyse.vue new file mode 100644 index 0000000..33a4cfd --- /dev/null +++ b/src/views/count/components/carbonAnalyse.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonElement.vue b/src/views/count/components/carbonElement.vue new file mode 100644 index 0000000..71fb2cb --- /dev/null +++ b/src/views/count/components/carbonElement.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/count/components/carbonGather.vue b/src/views/count/components/carbonGather.vue new file mode 100644 index 0000000..5f3ff37 --- /dev/null +++ b/src/views/count/components/carbonGather.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 5b40342..02b6427 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -13,7 +13,6 @@ const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -40,6 +39,13 @@ } }) sumArr.value = sums + const value = { + name: '能源加工转换', + co: 0, + ch: 0, + no: 0, + } + sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index de2412f..0e9b833 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -194,11 +194,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -225,6 +227,13 @@ } }) sumArr.value = sums + const value = { + name: '固定燃烧', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue index b745bef..97e361f 100644 --- a/src/views/count/components/mobileCombustion.vue +++ b/src/views/count/components/mobileCombustion.vue @@ -168,11 +168,13 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] - console.log(columns, 'columns') columns.forEach((column: any, index: number) => { if (index === 0) { sums[index] = '总计' @@ -199,6 +201,13 @@ } }) sumArr.value = sums + const value = { + name: '移动燃烧', + co: sumArr.value[2], + ch: sumArr.value[4], + no: sumArr.value[6], + } + sessionStorage.setItem('移动燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue index 144101c..2229a5c 100644 --- a/src/views/count/components/photovoltaic.vue +++ b/src/views/count/components/photovoltaic.vue @@ -34,12 +34,14 @@ }, ] const sumArr = ref([]) +defineExpose({ + sumArr, +}) // 总计 const summary = (params: any) => { const { columns, data } = params const sums: string[] = [] columns.forEach((column: any, index: number) => { - console.log(column, 'column') if (index === 0) { sums[index] = '总计' } @@ -65,6 +67,13 @@ } }) sumArr.value = sums + const value = { + name: '光伏', + co: sumArr.value[4], + ch: 0, + no: 0, + } + sessionStorage.setItem('光伏', JSON.stringify(value)) return sums } const watchCapacity = (event: any, index: number) => { diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue index de4fd7c..14ef5e2 100644 --- a/src/views/count/components/result.vue +++ b/src/views/count/components/result.vue @@ -1,23 +1,170 @@