diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue new file mode 100644 index 0000000..a301c75 --- /dev/null +++ b/src/views/count/electric.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue new file mode 100644 index 0000000..a301c75 --- /dev/null +++ b/src/views/count/electric.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/views/count/gas.vue b/src/views/count/gas.vue new file mode 100644 index 0000000..f4e91bd --- /dev/null +++ b/src/views/count/gas.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue new file mode 100644 index 0000000..a301c75 --- /dev/null +++ b/src/views/count/electric.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/views/count/gas.vue b/src/views/count/gas.vue new file mode 100644 index 0000000..f4e91bd --- /dev/null +++ b/src/views/count/gas.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/heating.vue b/src/views/count/heating.vue new file mode 100644 index 0000000..33b824e --- /dev/null +++ b/src/views/count/heating.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue new file mode 100644 index 0000000..a301c75 --- /dev/null +++ b/src/views/count/electric.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/views/count/gas.vue b/src/views/count/gas.vue new file mode 100644 index 0000000..f4e91bd --- /dev/null +++ b/src/views/count/gas.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/heating.vue b/src/views/count/heating.vue new file mode 100644 index 0000000..33b824e --- /dev/null +++ b/src/views/count/heating.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/index.vue b/src/views/count/index.vue deleted file mode 100644 index 3b75665..0000000 --- a/src/views/count/index.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue new file mode 100644 index 0000000..a301c75 --- /dev/null +++ b/src/views/count/electric.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/views/count/gas.vue b/src/views/count/gas.vue new file mode 100644 index 0000000..f4e91bd --- /dev/null +++ b/src/views/count/gas.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/heating.vue b/src/views/count/heating.vue new file mode 100644 index 0000000..33b824e --- /dev/null +++ b/src/views/count/heating.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/index.vue b/src/views/count/index.vue deleted file mode 100644 index 3b75665..0000000 --- a/src/views/count/index.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - diff --git a/src/views/count/list.vue b/src/views/count/list.vue new file mode 100644 index 0000000..5aa3f4b --- /dev/null +++ b/src/views/count/list.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue new file mode 100644 index 0000000..a301c75 --- /dev/null +++ b/src/views/count/electric.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/views/count/gas.vue b/src/views/count/gas.vue new file mode 100644 index 0000000..f4e91bd --- /dev/null +++ b/src/views/count/gas.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/heating.vue b/src/views/count/heating.vue new file mode 100644 index 0000000..33b824e --- /dev/null +++ b/src/views/count/heating.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/index.vue b/src/views/count/index.vue deleted file mode 100644 index 3b75665..0000000 --- a/src/views/count/index.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - diff --git a/src/views/count/list.vue b/src/views/count/list.vue new file mode 100644 index 0000000..5aa3f4b --- /dev/null +++ b/src/views/count/list.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/page.vue b/src/views/count/page.vue index 7f82c84..02a5160 100644 --- a/src/views/count/page.vue +++ b/src/views/count/page.vue @@ -1,12 +1,10 @@ + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue new file mode 100644 index 0000000..a301c75 --- /dev/null +++ b/src/views/count/electric.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/views/count/gas.vue b/src/views/count/gas.vue new file mode 100644 index 0000000..f4e91bd --- /dev/null +++ b/src/views/count/gas.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/heating.vue b/src/views/count/heating.vue new file mode 100644 index 0000000..33b824e --- /dev/null +++ b/src/views/count/heating.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/index.vue b/src/views/count/index.vue deleted file mode 100644 index 3b75665..0000000 --- a/src/views/count/index.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - diff --git a/src/views/count/list.vue b/src/views/count/list.vue new file mode 100644 index 0000000..5aa3f4b --- /dev/null +++ b/src/views/count/list.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/page.vue b/src/views/count/page.vue index 7f82c84..02a5160 100644 --- a/src/views/count/page.vue +++ b/src/views/count/page.vue @@ -1,12 +1,10 @@ + + diff --git a/src/views/count/table.vue b/src/views/count/table.vue new file mode 100644 index 0000000..2654fd1 --- /dev/null +++ b/src/views/count/table.vue @@ -0,0 +1,25 @@ + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64aa9b4..5683eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,6 +72,8 @@ vue-tsc: ^1.0.9 vue3-print-nb: ^0.1.4 vuedraggable: ^4.1.0 + vxe-table: ^4.3.11 + xe-utils: '3' xlsx: ^0.18.5 dependencies: @@ -104,6 +106,8 @@ vue-router: 4.1.6_vue@3.2.44 vue3-print-nb: 0.1.4 vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44 + vxe-table: 4.3.11_vue@3.2.44+xe-utils@3.5.7 + xe-utils: 3.5.7 xlsx: 0.18.5 devDependencies: @@ -8171,6 +8175,16 @@ vue: 3.2.44 dev: false + /vxe-table/4.3.11_vue@3.2.44+xe-utils@3.5.7: + resolution: {integrity: sha512-n2OXuUaKurVxxhRz0b1DojLdvtYwKkidRAqI9oGDw2IQ0y2IPs2Oq+lX2V6ar3glFdjjkS3BqnDBAk0elt6e0Q==} + peerDependencies: + vue: ^3.2.28 + xe-utils: ^3.5.0 + dependencies: + vue: 3.2.44 + xe-utils: 3.5.7 + dev: false + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8292,6 +8306,10 @@ signal-exit: 3.0.7 dev: true + /xe-utils/3.5.7: + resolution: {integrity: sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==} + dev: false + /xlsx/0.18.5: resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} engines: {node: '>=0.8'} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 710b837..ea695c1 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -1,5 +1,7 @@ import request from '@/api/index' enum api { + // 上传 + upload = 'file/upload', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -16,6 +18,14 @@ deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', } +// 上传 +export function uploadApi(data: FormData) { + return request({ + url: `${api.upload}`, + method: 'post', + data, + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -43,11 +53,8 @@ // 删除 配电网 export function deleteElectricityList(id: any) { return request({ - url: `${api.electricityDelete}`, + url: `${api.electricityDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 光伏/楼宇/电动车管理列表 @@ -77,11 +84,8 @@ // 删除 光伏/楼宇/电动车管 export function deleteMonitorStation(id: any) { return request({ - url: `${api.monitorStationdDelete}`, + url: `${api.monitorStationdDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } // 设备管理列表 @@ -111,10 +115,7 @@ // 删除 设备管理 export function deleteDeviceList(id: any) { return request({ - url: `${api.deviceDelete}`, + url: `${api.deviceDelete}?id=${id}`, method: 'post', - data: { - id, - }, }) } diff --git a/src/assets/images/co.png b/src/assets/images/co.png new file mode 100644 index 0000000..37f375c --- /dev/null +++ b/src/assets/images/co.png Binary files differ diff --git a/src/assets/images/result-bg.png b/src/assets/images/result-bg.png new file mode 100644 index 0000000..9625a5c --- /dev/null +++ b/src/assets/images/result-bg.png Binary files differ diff --git a/src/assets/images/result1.png b/src/assets/images/result1.png new file mode 100644 index 0000000..ae84e8e --- /dev/null +++ b/src/assets/images/result1.png Binary files differ diff --git a/src/main.ts b/src/main.ts index 695df5c..553b0a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import ElementPlus from 'element-plus' -import print from 'vue3-print-nb' +// import print from 'vue3-print-nb' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import pinia from './store' @@ -20,10 +20,9 @@ if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } - const app = createApp(App) app.config.globalProperties.hasPerm = hasPermission -app.use(print) +// app.use(print) app.use(ElementPlus) app.use(pinia) app.use(router) diff --git a/src/router/modules/carbonCount.ts b/src/router/modules/carbonCount.ts index cedac7f..53685f7 100644 --- a/src/router/modules/carbonCount.ts +++ b/src/router/modules/carbonCount.ts @@ -6,7 +6,7 @@ { path: '/carbonCount', component: Layout, - redirect: '/carbonCount/count', + redirect: '/carbonCount/electriccount', name: 'Dcount', meta: { title: '碳足迹计算', @@ -14,18 +14,54 @@ auth: '/count', }, children: [ + // { + // path: 'count', + // name: 'Count', + // component: () => import('@/views/count/index.vue'), + // meta: { + // title: '碳足迹计算', + // auth: '/count', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, { - path: 'count', - name: 'Count', - component: () => import('@/views/count/index.vue'), + path: 'electriccount', + name: 'Electriccount', + component: () => import('@/views/count/electric.vue'), meta: { - title: '碳足迹计算', - auth: '/count', - sidebar: false, - breadcrumb: true, + title: '电力碳核算', + auth: '/count/electric', + // sidebar: false, + // breadcrumb: true, activeMenu: '/carbonCount', }, }, + // { + // path: 'heatingcount', + // name: 'Heatingcount', + // component: () => import('@/views/count/heating.vue'), + // meta: { + // title: '热力碳核算', + // auth: '/count/heating', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, + // { + // path: 'gascount', + // name: 'Gascount', + // component: () => import('@/views/count/gas.vue'), + // meta: { + // title: '燃气碳核算', + // auth: '/count/gas', + // // sidebar: false, + // // breadcrumb: true, + // activeMenu: '/carbonCount', + // }, + // }, ], }, ] diff --git a/src/router/modules/carbonEvaluate.ts b/src/router/modules/carbonEvaluate.ts index 81d1163..1838bfd 100644 --- a/src/router/modules/carbonEvaluate.ts +++ b/src/router/modules/carbonEvaluate.ts @@ -17,7 +17,7 @@ { path: 'evaluate', name: 'Evaluate', - component: () => import('@/views/footprint/index.vue'), + component: () => import('@/views/evaluate/index.vue'), meta: { title: '碳足迹评价', auth: '/evaluate', diff --git a/src/router/routes.ts b/src/router/routes.ts index 927f0e0..5b4eba3 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,7 +7,7 @@ import footprintRoute from './modules/carbonFootprint' import evaluateRoute from './modules/carbonEvaluate' import warningRoute from './modules/carbonWarning' -import decisionRoute from './modules/carbonDecision' +// import decisionRoute from './modules/carbonDecision' import countRoute from './modules/carbonCount' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -151,16 +151,16 @@ ...warningRoute, ], }, - { - meta: { - title: '碳足迹决策', - icon: '', - auth: '/decision', - }, - children: [ - ...decisionRoute, - ], - }, + // { + // meta: { + // title: '碳足迹决策', + // icon: '', + // auth: '/decision', + // }, + // children: [ + // ...decisionRoute, + // ], + // }, { meta: { title: '碳足迹计算', diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue new file mode 100644 index 0000000..f2eafd6 --- /dev/null +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -0,0 +1,398 @@ + + + + + + + + + diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue new file mode 100644 index 0000000..99a7d69 --- /dev/null +++ b/src/views/count/components/Purchaseofheat.vue @@ -0,0 +1,420 @@ + + + + + + + + + diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue new file mode 100644 index 0000000..5b40342 --- /dev/null +++ b/src/views/count/components/energyProcessing.vue @@ -0,0 +1,412 @@ + + + + + + + + + diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue new file mode 100644 index 0000000..de2412f --- /dev/null +++ b/src/views/count/components/fixedCombustion.vue @@ -0,0 +1,593 @@ + + + + + + + + + diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue new file mode 100644 index 0000000..b745bef --- /dev/null +++ b/src/views/count/components/mobileCombustion.vue @@ -0,0 +1,543 @@ + + + + + + + + + diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue new file mode 100644 index 0000000..144101c --- /dev/null +++ b/src/views/count/components/photovoltaic.vue @@ -0,0 +1,321 @@ + + + + + + + + + diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue new file mode 100644 index 0000000..de4fd7c --- /dev/null +++ b/src/views/count/components/result.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue new file mode 100644 index 0000000..a301c75 --- /dev/null +++ b/src/views/count/electric.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/views/count/gas.vue b/src/views/count/gas.vue new file mode 100644 index 0000000..f4e91bd --- /dev/null +++ b/src/views/count/gas.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/heating.vue b/src/views/count/heating.vue new file mode 100644 index 0000000..33b824e --- /dev/null +++ b/src/views/count/heating.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/count/index.vue b/src/views/count/index.vue deleted file mode 100644 index 3b75665..0000000 --- a/src/views/count/index.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - diff --git a/src/views/count/list.vue b/src/views/count/list.vue new file mode 100644 index 0000000..5aa3f4b --- /dev/null +++ b/src/views/count/list.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/count/page.vue b/src/views/count/page.vue index 7f82c84..02a5160 100644 --- a/src/views/count/page.vue +++ b/src/views/count/page.vue @@ -1,12 +1,10 @@ + + diff --git a/src/views/count/table.vue b/src/views/count/table.vue new file mode 100644 index 0000000..2654fd1 --- /dev/null +++ b/src/views/count/table.vue @@ -0,0 +1,25 @@ + + + diff --git a/src/views/data/collect/collect.vue b/src/views/data/collect/collect.vue index 51605be..65db991 100644 --- a/src/views/data/collect/collect.vue +++ b/src/views/data/collect/collect.vue @@ -87,6 +87,7 @@ searchQuery.limit = 20 searchQuery.deviceType = '' searchQuery.deviceNo = '' + search() } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { @@ -112,7 +113,7 @@