-
-
-
+
diff --git a/src/views/count/table.vue b/src/views/count/table.vue
index 2654fd1..6399a44 100644
--- a/src/views/count/table.vue
+++ b/src/views/count/table.vue
@@ -10,16 +10,16 @@
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 @@
-
-
-
+
+
+
+
总CO₂e排放
+
+ {{ totalCarbon }}
+ 万吨
+
+
+
+ 低于同行
+ {{ 0 }}%
+
+
+
+
+
+ CO₂排放
+
+
+ {{ coCarbon }}
+ 万吨
+
+
+
+ 低于同行
+ {{ 0 }}%
+
+
+
+ CO₂
+
+
+
+
+ CH₄排放
+
+
+ {{ chCarbon }}
+ 万吨
+
+
+
+ 低于同行
+ {{ 0 }}%
+
+
+
+
+ CH₄
+
+
+
+
+ N₂O排放
+
+
+ {{ noCarbon }}
+ 万吨
+
+
+
+ 低于同行
+ {{ 0 }}%
+
+
+
+
+ N₂O
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -29,36 +176,91 @@
background-image: url("../../../assets/images/result-bg.png");
}
-.bak {
+// .bak {
+// position: absolute;
+// top: 30px;
+// left: 10%;
+// }
+.bak-btn {
position: absolute;
- top: 30px;
- left: 10%;
+ left: 0;
+ top: 0;
}
.content {
- width: 80%;
+ // width: 80%;
background: #fff;
margin: 0 auto;
min-height: 100vh;
- margin-top: -85px;
+ // margin-top: -85px;
border-radius: 8px;
+ // background-image: url("../../../assets/images/result-bg.png") no-repeat;
+ .echarts {
+ display: flex;
+ justify-content: space-around;
+ height: 25rem;
+ }
- .card-box {
- padding: 46px 35px;
+ .carbon-title {
+ // width: 60%;
+ margin: 0 auto;
+ background: url("../../../assets/images/carbon-result-bg-1.png") no-repeat;
+ height: 115px;
+ }
+
+ .part {
+ border: 2px solid #41a877 !important;
+ width: 24% !important;
+ border-radius: 6px;
+ height: 8rem !important;
+ // background-color: #ccc;
+ padding: 1.5rem 3rem 4rem 2.5rem !important;
+ // padding: 0 !important;
+ .logo {
+ top: 1rem !important;
+ border-radius: 4px;
+ }
+
+ .logo-co {
+ background-color: #41a877;
+ }
+
+ .logo-ch {
+ background-color: #6686f3;
+ }
+
+ .logo-no {
+ background-color: #bc86ff;
+ }
+ }
+
+ .card-part {
+ width: 70%;
+
+ .item {
+ border: 3px solid #41a877;
+ border-radius: 6px;
+ }
+ }
+
+ .data {
+ padding: 0 15px;
+ display: flex;
+ justify-content: space-between;
}
.u-f-ajsb {
display: flex;
align-items: center;
- justify-content: space-between;
+ justify-content: space-around;
}
.card {
overflow: hidden;
position: relative;
padding: 4rem 3rem 4rem 2.5rem;
- width: 28%;
- height: 14rem;
+ width: 25%;
+ height: 12rem;
border: 1px solid #fff;
border-radius: 6px;
@@ -75,6 +277,26 @@
top: 2.5rem;
width: 45px;
height: 45px;
+ text-align: center;
+ line-height: 45px;
+ }
+
+ .line {
+ width: 96%;
+ height: 3px;
+ background-color: #fff;
+ margin: 0 auto;
+ margin-top: 10px;
+ border-radius: 4px;
+ }
+
+ .content1 {
+ margin-top: 10px;
+
+ .count {
+ font-size: 20px;
+ font-weight: 700;
+ }
}
}
diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue
index a301c75..ec4f110 100644
--- a/src/views/count/electric.vue
+++ b/src/views/count/electric.vue
@@ -3,17 +3,42 @@
import page from './page.vue'
import tableList from './table.vue'
import result from './components/result.vue'
+const $router = useRouter()
const isShowTable = ref(true)
+const resultRef = ref()
+const carbonData = ref
([])
const resultFun = () => {
- isShowTable.value = !isShowTable.value
+ // 固定燃烧
+ const fixed = JSON.parse(sessionStorage.getItem('固定燃烧') as string)
+ carbonData.value.push(fixed)
+ // 移动燃烧
+ const mobile = JSON.parse(sessionStorage.getItem('移动燃烧') as string)
+ carbonData.value.push(mobile)
+ // 能源加工转换
+ const energy = JSON.parse(sessionStorage.getItem('能源加工转换') as string)
+ carbonData.value.push(energy)
+ // 购入电力
+ const electricity = JSON.parse(sessionStorage.getItem('购入电力') as string)
+ carbonData.value.push(electricity)
+ // 购入电力
+ const heat = JSON.parse(sessionStorage.getItem('购入热力') as string)
+ carbonData.value.push(heat)
+ // 光伏
+ const guang = JSON.parse(sessionStorage.getItem('光伏') as string)
+ carbonData.value.push(guang)
+ // isShowTable.value = !isShowTable.value
+ // 给子组件发送数据
+ resultRef.value.requestData(carbonData.value)
+ sessionStorage.setItem('计算结果', JSON.stringify(carbonData.value))
+ $router.push({ path: '/carbonCount/electricresult' })
}
-
-
-
+
diff --git a/src/views/count/table.vue b/src/views/count/table.vue
index 2654fd1..6399a44 100644
--- a/src/views/count/table.vue
+++ b/src/views/count/table.vue
@@ -10,16 +10,16 @@
diff --git a/src/views/data/electricity/detailDialog.vue b/src/views/data/electricity/detailDialog.vue
index b50d412..5e62fc1 100644
--- a/src/views/data/electricity/detailDialog.vue
+++ b/src/views/data/electricity/detailDialog.vue
@@ -1,12 +1,13 @@