diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index f26a2c1..25dfdca 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入热力', - co: sumArr.value[2] ? sumArr.value[2] : 0, - ch: sumArr.value[4] ? sumArr.value[4] : 0, - no: sumArr.value[6] ? sumArr.value[6] : 0, - } - sessionStorage.setItem('购入热力', JSON.stringify(value)) + // const value = { + // name: '购入热力', + // co: sumArr.value[2] ? sumArr.value[2] : 0, + // ch: sumArr.value[4] ? sumArr.value[4] : 0, + // no: sumArr.value[6] ? sumArr.value[6] : 0, + // } + // sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index f26a2c1..25dfdca 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入热力', - co: sumArr.value[2] ? sumArr.value[2] : 0, - ch: sumArr.value[4] ? sumArr.value[4] : 0, - no: sumArr.value[6] ? sumArr.value[6] : 0, - } - sessionStorage.setItem('购入热力', JSON.stringify(value)) + // const value = { + // name: '购入热力', + // co: sumArr.value[2] ? sumArr.value[2] : 0, + // ch: sumArr.value[4] ? sumArr.value[4] : 0, + // no: sumArr.value[6] ? sumArr.value[6] : 0, + // } + // sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 02b6427..dcac1ab 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -39,13 +39,13 @@ } }) sumArr.value = sums - const value = { - name: '能源加工转换', - co: 0, - ch: 0, - no: 0, - } - sessionStorage.setItem('能源加工转换', JSON.stringify(value)) + // const value = { + // name: '能源加工转换', + // co: 0, + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index f26a2c1..25dfdca 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入热力', - co: sumArr.value[2] ? sumArr.value[2] : 0, - ch: sumArr.value[4] ? sumArr.value[4] : 0, - no: sumArr.value[6] ? sumArr.value[6] : 0, - } - sessionStorage.setItem('购入热力', JSON.stringify(value)) + // const value = { + // name: '购入热力', + // co: sumArr.value[2] ? sumArr.value[2] : 0, + // ch: sumArr.value[4] ? sumArr.value[4] : 0, + // no: sumArr.value[6] ? sumArr.value[6] : 0, + // } + // sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 02b6427..dcac1ab 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -39,13 +39,13 @@ } }) sumArr.value = sums - const value = { - name: '能源加工转换', - co: 0, - ch: 0, - no: 0, - } - sessionStorage.setItem('能源加工转换', JSON.stringify(value)) + // const value = { + // name: '能源加工转换', + // co: 0, + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index 0e9b833..b94a1b5 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -227,13 +227,13 @@ } }) sumArr.value = sums - const value = { - name: '固定燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('固定燃烧', JSON.stringify(value)) + // const value = { + // name: '固定燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index f26a2c1..25dfdca 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入热力', - co: sumArr.value[2] ? sumArr.value[2] : 0, - ch: sumArr.value[4] ? sumArr.value[4] : 0, - no: sumArr.value[6] ? sumArr.value[6] : 0, - } - sessionStorage.setItem('购入热力', JSON.stringify(value)) + // const value = { + // name: '购入热力', + // co: sumArr.value[2] ? sumArr.value[2] : 0, + // ch: sumArr.value[4] ? sumArr.value[4] : 0, + // no: sumArr.value[6] ? sumArr.value[6] : 0, + // } + // sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 02b6427..dcac1ab 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -39,13 +39,13 @@ } }) sumArr.value = sums - const value = { - name: '能源加工转换', - co: 0, - ch: 0, - no: 0, - } - sessionStorage.setItem('能源加工转换', JSON.stringify(value)) + // const value = { + // name: '能源加工转换', + // co: 0, + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index 0e9b833..b94a1b5 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -227,13 +227,13 @@ } }) sumArr.value = sums - const value = { - name: '固定燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('固定燃烧', JSON.stringify(value)) + // const value = { + // name: '固定燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue index 97e361f..bb0d58d 100644 --- a/src/views/count/components/mobileCombustion.vue +++ b/src/views/count/components/mobileCombustion.vue @@ -201,13 +201,13 @@ } }) sumArr.value = sums - const value = { - name: '移动燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('移动燃烧', JSON.stringify(value)) + // const value = { + // name: '移动燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('移动燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index f26a2c1..25dfdca 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入热力', - co: sumArr.value[2] ? sumArr.value[2] : 0, - ch: sumArr.value[4] ? sumArr.value[4] : 0, - no: sumArr.value[6] ? sumArr.value[6] : 0, - } - sessionStorage.setItem('购入热力', JSON.stringify(value)) + // const value = { + // name: '购入热力', + // co: sumArr.value[2] ? sumArr.value[2] : 0, + // ch: sumArr.value[4] ? sumArr.value[4] : 0, + // no: sumArr.value[6] ? sumArr.value[6] : 0, + // } + // sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 02b6427..dcac1ab 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -39,13 +39,13 @@ } }) sumArr.value = sums - const value = { - name: '能源加工转换', - co: 0, - ch: 0, - no: 0, - } - sessionStorage.setItem('能源加工转换', JSON.stringify(value)) + // const value = { + // name: '能源加工转换', + // co: 0, + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index 0e9b833..b94a1b5 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -227,13 +227,13 @@ } }) sumArr.value = sums - const value = { - name: '固定燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('固定燃烧', JSON.stringify(value)) + // const value = { + // name: '固定燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue index 97e361f..bb0d58d 100644 --- a/src/views/count/components/mobileCombustion.vue +++ b/src/views/count/components/mobileCombustion.vue @@ -201,13 +201,13 @@ } }) sumArr.value = sums - const value = { - name: '移动燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('移动燃烧', JSON.stringify(value)) + // const value = { + // name: '移动燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('移动燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue index 2229a5c..52f8130 100644 --- a/src/views/count/components/photovoltaic.vue +++ b/src/views/count/components/photovoltaic.vue @@ -67,13 +67,13 @@ } }) sumArr.value = sums - const value = { - name: '光伏', - co: sumArr.value[4], - ch: 0, - no: 0, - } - sessionStorage.setItem('光伏', JSON.stringify(value)) + // const value = { + // name: '光伏', + // co: sumArr.value[4], + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('光伏', JSON.stringify(value)) return sums } const watchCapacity = (event: any, index: number) => { diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index f26a2c1..25dfdca 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入热力', - co: sumArr.value[2] ? sumArr.value[2] : 0, - ch: sumArr.value[4] ? sumArr.value[4] : 0, - no: sumArr.value[6] ? sumArr.value[6] : 0, - } - sessionStorage.setItem('购入热力', JSON.stringify(value)) + // const value = { + // name: '购入热力', + // co: sumArr.value[2] ? sumArr.value[2] : 0, + // ch: sumArr.value[4] ? sumArr.value[4] : 0, + // no: sumArr.value[6] ? sumArr.value[6] : 0, + // } + // sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 02b6427..dcac1ab 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -39,13 +39,13 @@ } }) sumArr.value = sums - const value = { - name: '能源加工转换', - co: 0, - ch: 0, - no: 0, - } - sessionStorage.setItem('能源加工转换', JSON.stringify(value)) + // const value = { + // name: '能源加工转换', + // co: 0, + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index 0e9b833..b94a1b5 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -227,13 +227,13 @@ } }) sumArr.value = sums - const value = { - name: '固定燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('固定燃烧', JSON.stringify(value)) + // const value = { + // name: '固定燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue index 97e361f..bb0d58d 100644 --- a/src/views/count/components/mobileCombustion.vue +++ b/src/views/count/components/mobileCombustion.vue @@ -201,13 +201,13 @@ } }) sumArr.value = sums - const value = { - name: '移动燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('移动燃烧', JSON.stringify(value)) + // const value = { + // name: '移动燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('移动燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue index 2229a5c..52f8130 100644 --- a/src/views/count/components/photovoltaic.vue +++ b/src/views/count/components/photovoltaic.vue @@ -67,13 +67,13 @@ } }) sumArr.value = sums - const value = { - name: '光伏', - co: sumArr.value[4], - ch: 0, - no: 0, - } - sessionStorage.setItem('光伏', JSON.stringify(value)) + // const value = { + // name: '光伏', + // co: sumArr.value[4], + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('光伏', JSON.stringify(value)) return sums } const watchCapacity = (event: any, index: number) => { diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue index 9d7eba9..28d63eb 100644 --- a/src/views/count/components/result.vue +++ b/src/views/count/components/result.vue @@ -7,12 +7,6 @@ onMounted(() => { carbonData.value = JSON.parse(sessionStorage.getItem('计算结果') as string) || [] }) -const requestData = (data: any) => { - carbonData.value = [] - // 接收父组件传来的数据 - // carbonData.value = data -} -defineExpose({ requestData }) // 总排放量 const totalCarbon = computed(() => { return carbonData.value.reduce((pre, target: any) => { diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index f26a2c1..25dfdca 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入热力', - co: sumArr.value[2] ? sumArr.value[2] : 0, - ch: sumArr.value[4] ? sumArr.value[4] : 0, - no: sumArr.value[6] ? sumArr.value[6] : 0, - } - sessionStorage.setItem('购入热力', JSON.stringify(value)) + // const value = { + // name: '购入热力', + // co: sumArr.value[2] ? sumArr.value[2] : 0, + // ch: sumArr.value[4] ? sumArr.value[4] : 0, + // no: sumArr.value[6] ? sumArr.value[6] : 0, + // } + // sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 02b6427..dcac1ab 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -39,13 +39,13 @@ } }) sumArr.value = sums - const value = { - name: '能源加工转换', - co: 0, - ch: 0, - no: 0, - } - sessionStorage.setItem('能源加工转换', JSON.stringify(value)) + // const value = { + // name: '能源加工转换', + // co: 0, + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index 0e9b833..b94a1b5 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -227,13 +227,13 @@ } }) sumArr.value = sums - const value = { - name: '固定燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('固定燃烧', JSON.stringify(value)) + // const value = { + // name: '固定燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue index 97e361f..bb0d58d 100644 --- a/src/views/count/components/mobileCombustion.vue +++ b/src/views/count/components/mobileCombustion.vue @@ -201,13 +201,13 @@ } }) sumArr.value = sums - const value = { - name: '移动燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('移动燃烧', JSON.stringify(value)) + // const value = { + // name: '移动燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('移动燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue index 2229a5c..52f8130 100644 --- a/src/views/count/components/photovoltaic.vue +++ b/src/views/count/components/photovoltaic.vue @@ -67,13 +67,13 @@ } }) sumArr.value = sums - const value = { - name: '光伏', - co: sumArr.value[4], - ch: 0, - no: 0, - } - sessionStorage.setItem('光伏', JSON.stringify(value)) + // const value = { + // name: '光伏', + // co: sumArr.value[4], + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('光伏', JSON.stringify(value)) return sums } const watchCapacity = (event: any, index: number) => { diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue index 9d7eba9..28d63eb 100644 --- a/src/views/count/components/result.vue +++ b/src/views/count/components/result.vue @@ -7,12 +7,6 @@ onMounted(() => { carbonData.value = JSON.parse(sessionStorage.getItem('计算结果') as string) || [] }) -const requestData = (data: any) => { - carbonData.value = [] - // 接收父组件传来的数据 - // carbonData.value = data -} -defineExpose({ requestData }) // 总排放量 const totalCarbon = computed(() => { return carbonData.value.reduce((pre, target: any) => { diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue index ec4f110..5c05abb 100644 --- a/src/views/count/electric.vue +++ b/src/views/count/electric.vue @@ -2,12 +2,11 @@ diff --git a/src/api/api/index.ts b/src/api/api/index.ts index ea695c1..b56e534 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -2,6 +2,11 @@ enum api { // 上传 upload = 'file/upload', + // 采集参数 + collect = '/collectionConfig/listPage', + collectAdd = '/collectionConfig/add', + collectUpdate = '/collectionConfig/update', + collectDelete = '/collectionConfig/delete', // 配电网列表 electricity = 'carbonElectricity/listPage', electricityAdd = 'carbonElectricity/add', @@ -17,6 +22,16 @@ deviceAdd = '/carbonDevice/add', deviceUpdate = '/carbonDevice/update', deviceDelete = '/carbonDevice/delete', + // 环境参数 + environment = '/environmentInfo/listPage', + environmentAdd = '/environmentInfo/add', + environmentUpdate = '/environmentInfo/update', + environmentDelete = '/environmentInfo/delete', + // 用热监测/用气监测 + carbonOtherMonitorAdd = '/carbonOtherMonitor/add', + carbonOtherMonitorUpdate = '/carbonOtherMonitor/update', + carbonOtherMonitorDelete = '/carbonOtherMonitor/delete', + carbonOtherMonitor = '/carbonOtherMonitor/listPage', } // 上传 export function uploadApi(data: FormData) { @@ -26,6 +41,37 @@ data, }) } +// 采集参数列表 +export function getCollectList(params: any) { + return request({ + url: `${api.collect}`, + method: 'get', + params, + }) +} +// 添加 采集参数 +export function addCollectList(data: any) { + return request({ + url: `${api.collectAdd}`, + method: 'post', + data, + }) +} +// 修改 采集参数 +export function updateCollectList(data: any) { + return request({ + url: `${api.collectUpdate}`, + method: 'post', + data, + }) +} +// 删除 采集参数 +export function deleteCollectList(id: any) { + return request({ + url: `${api.collectDelete}?id=${id}`, + method: 'post', + }) +} // 配电网列表 export function getElectricityList(params: any) { return request({ @@ -119,3 +165,65 @@ method: 'post', }) } +// 环境参数列表 +export function getEnvironmentList(params: any) { + return request({ + url: `${api.environment}`, + method: 'get', + params, + }) +} +// 修改 环境参数 +export function updateEnvironmentList(data: any) { + return request({ + url: `${api.environmentUpdate}`, + method: 'post', + data, + }) +} +// 增加 环境参数 +export function addEnvironmentList(data: any) { + return request({ + url: `${api.environmentAdd}`, + method: 'post', + data, + }) +} +// 删除 环境参数 +export function deleteEnvironmentList(id: any) { + return request({ + url: `${api.environmentDelete}?id=${id}`, + method: 'post', + }) +} +// 用热监测/用气监测列表 +export function getCarbonOtherMonitor(params: any) { + return request({ + url: `${api.carbonOtherMonitor}`, + method: 'get', + params, + }) +} +// 增加 用热监测/用气监测 +export function addCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorAdd}`, + method: 'post', + data, + }) +} +// 修改 用热监测/用气监测 +export function updateCarbonOtherMonitor(data: any) { + return request({ + url: `${api.carbonOtherMonitorUpdate}`, + method: 'post', + data, + }) +} +// 删除 用热监测/用气监测 +export function deleteCarbonOtherMonitor(id: any) { + return request({ + url: `${api.carbonOtherMonitorDelete}?id=${id}`, + method: 'post', + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 402fbd5..29c1f82 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,7 +26,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue index 44e8fd5..9a37cf4 100644 --- a/src/views/count/components/Purchaseofelectricity.vue +++ b/src/views/count/components/Purchaseofelectricity.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入电力', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('购入电力', JSON.stringify(value)) + // const value = { + // name: '购入电力', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('购入电力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue index f26a2c1..25dfdca 100644 --- a/src/views/count/components/Purchaseofheat.vue +++ b/src/views/count/components/Purchaseofheat.vue @@ -62,13 +62,13 @@ } }) sumArr.value = sums - const value = { - name: '购入热力', - co: sumArr.value[2] ? sumArr.value[2] : 0, - ch: sumArr.value[4] ? sumArr.value[4] : 0, - no: sumArr.value[6] ? sumArr.value[6] : 0, - } - sessionStorage.setItem('购入热力', JSON.stringify(value)) + // const value = { + // name: '购入热力', + // co: sumArr.value[2] ? sumArr.value[2] : 0, + // ch: sumArr.value[4] ? sumArr.value[4] : 0, + // no: sumArr.value[6] ? sumArr.value[6] : 0, + // } + // sessionStorage.setItem('购入热力', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue index 02b6427..dcac1ab 100644 --- a/src/views/count/components/energyProcessing.vue +++ b/src/views/count/components/energyProcessing.vue @@ -39,13 +39,13 @@ } }) sumArr.value = sums - const value = { - name: '能源加工转换', - co: 0, - ch: 0, - no: 0, - } - sessionStorage.setItem('能源加工转换', JSON.stringify(value)) + // const value = { + // name: '能源加工转换', + // co: 0, + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('能源加工转换', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue index 0e9b833..b94a1b5 100644 --- a/src/views/count/components/fixedCombustion.vue +++ b/src/views/count/components/fixedCombustion.vue @@ -227,13 +227,13 @@ } }) sumArr.value = sums - const value = { - name: '固定燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('固定燃烧', JSON.stringify(value)) + // const value = { + // name: '固定燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('固定燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue index 97e361f..bb0d58d 100644 --- a/src/views/count/components/mobileCombustion.vue +++ b/src/views/count/components/mobileCombustion.vue @@ -201,13 +201,13 @@ } }) sumArr.value = sums - const value = { - name: '移动燃烧', - co: sumArr.value[2], - ch: sumArr.value[4], - no: sumArr.value[6], - } - sessionStorage.setItem('移动燃烧', JSON.stringify(value)) + // const value = { + // name: '移动燃烧', + // co: sumArr.value[2], + // ch: sumArr.value[4], + // no: sumArr.value[6], + // } + // sessionStorage.setItem('移动燃烧', JSON.stringify(value)) return sums } // 排放量变化 diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue index 2229a5c..52f8130 100644 --- a/src/views/count/components/photovoltaic.vue +++ b/src/views/count/components/photovoltaic.vue @@ -67,13 +67,13 @@ } }) sumArr.value = sums - const value = { - name: '光伏', - co: sumArr.value[4], - ch: 0, - no: 0, - } - sessionStorage.setItem('光伏', JSON.stringify(value)) + // const value = { + // name: '光伏', + // co: sumArr.value[4], + // ch: 0, + // no: 0, + // } + // sessionStorage.setItem('光伏', JSON.stringify(value)) return sums } const watchCapacity = (event: any, index: number) => { diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue index 9d7eba9..28d63eb 100644 --- a/src/views/count/components/result.vue +++ b/src/views/count/components/result.vue @@ -7,12 +7,6 @@ onMounted(() => { carbonData.value = JSON.parse(sessionStorage.getItem('计算结果') as string) || [] }) -const requestData = (data: any) => { - carbonData.value = [] - // 接收父组件传来的数据 - // carbonData.value = data -} -defineExpose({ requestData }) // 总排放量 const totalCarbon = computed(() => { return carbonData.value.reduce((pre, target: any) => { diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue index ec4f110..5c05abb 100644 --- a/src/views/count/electric.vue +++ b/src/views/count/electric.vue @@ -2,12 +2,11 @@ diff --git a/src/views/count/table.vue b/src/views/count/table.vue index 6399a44..bf9761d 100644 --- a/src/views/count/table.vue +++ b/src/views/count/table.vue @@ -5,6 +5,72 @@ import Purchaseofheat from './components/Purchaseofheat.vue' import Purchaseofelectricity from './components/Purchaseofelectricity.vue' import photovoltaic from './components/photovoltaic.vue' +const fixRef = ref() +const mobileRef = ref() +const energyRef = ref() +const heatRef = ref() +const electricityRef = ref() +const photovoltaicRef = ref() +// 获取子组件数据 +const getData = () => { + // 固定燃烧数据 + const fixData = fixRef.value.sumArr + const value1 = { + name: '固定燃烧', + co: fixData[2], + ch: fixData[4], + no: fixData[6], + } + sessionStorage.setItem('固定燃烧', JSON.stringify(value1)) + // 移动燃烧数据 + const mobileData = mobileRef.value.sumArr + const value2 = { + name: '移动燃烧', + co: mobileData[2], + ch: mobileData[4], + no: mobileData[6], + } + sessionStorage.setItem('移动燃烧', JSON.stringify(value2)) + // 能源加工转换 + const energyData = energyRef.value.sumArr + const value3 = { + name: '能源加工转换', + co: 0, + ch: 0, + no: 0, + } + sessionStorage.setItem('能源加工转换', JSON.stringify(value3)) + // 购入热力 + const heatData = heatRef.value.sumArr + const value4 = { + name: '购入热力', + co: heatData[2] ? heatData[2] : 0, + ch: heatData[4] ? heatData[4] : 0, + no: heatData[6] ? heatData[6] : 0, + } + sessionStorage.setItem('购入热力', JSON.stringify(value4)) + // 购入电力 + const electricityData = electricityRef.value.sumArr + const value5 = { + name: '购入电力', + co: electricityData[2] ? electricityData[2] : 0, + ch: electricityData[4] ? electricityData[4] : 0, + no: electricityData[6] ? electricityData[6] : 0, + } + sessionStorage.setItem('购入电力', JSON.stringify(value5)) + // 光伏 + const photovoltaicData = photovoltaicRef.value.sumArr + const value6 = { + name: '光伏', + co: photovoltaicData[4], + ch: 0, + no: 0, + } + sessionStorage.setItem('光伏', JSON.stringify(value6)) +} +defineExpose({ + getData, +})