| | |
| | | xData.value = resChart.data.data.map((item: any) => { |
| | | return item.time; |
| | | }) |
| | | if(resChart.data.data && resChart.data.data.length > 0){ |
| | | const gasNewValue = resChart.data.data[0].gasCategoryConfigurationRespDTO |
| | | if(resChart.data.data && gasNewValue && gasNewValue != null ){ |
| | | resChart.data.data.forEach(item => { |
| | | item.gasValue = ((Number(item.gasValue) - Number(gasNewValue.concentration)) * Number(gasNewValue.multiplication)).toFixed(2) |
| | | }) |
| | | } |
| | | } |
| | | yData.value = resChart.data.data.map((item: any) => { |
| | | return item.gasValue; |
| | | }) |
| | |
| | | let res = await gasDataApi().getGasLinePage(pageParam); |
| | | if(res.data.code == 100) { |
| | | state.tableData.data = res.data.data; |
| | | if(res.data.data && res.data.data.length > 0){ |
| | | const gasNewValue = state.tableData.data[0].gasCategoryConfigurationRespDTO |
| | | if(res.data.data && gasNewValue && gasNewValue != null ){ |
| | | state.tableData.data.forEach(item => { |
| | | item.gasValue = ((Number(item.gasValue) - Number(gasNewValue.concentration)) * Number(gasNewValue.multiplication)).toFixed(2) |
| | | }) |
| | | } |
| | | } |
| | | state.tableData.total = res.data.total == null ? 0 :res.data.total; |
| | | state.tableData.listQuery.pageIndex = res.data.pageIndex; |
| | | state.tableData.listQuery.pageSize = res.data.pageSize; |