The best way to calculate the environmental impact of batteries in electric vehicles is to use life cycle assessment (LCA) and life cycle impact assessment (LCIA).
There are several LCA software platforms (such as GaBi, SimaPro, OpenLCA, SustainableMinds, etc.) that will help you in this quantitative assessment. The impact assessment that you can quantify include: global warming potential, ozone depletion potential, smog formation, health effects due to particulate matter, carcinogenics, and non-carcinogenics.
I've published several papers on this topic and these can be downloaded from my profile in ResearhGate.net.
The electricity used could have been used to reduce coal fired power plant power production instead of replacing gasoline/diesel in most US locations so it is questionable if electric vehicle are any better than conventional internal combustion engines. But the idea does make sense as a way to move emissions out of environmentally sensitive locations like the LA Basin to a location that can tolerate them better. Longer term (if/when most/all power plants capture and sequester CO2) powering vehicles with electricity moves emissions from a location where they cannot be captured to a location where they can.
One of the biggest challenges in performing this calculation is the personnel interested in this answer are primarily professors and other academic types. They are very good at developing very sophisticated models, but often lack access to real data (real costs, real CO2 emissions, etc.). As a result, their calculations should be viewed as more hypothetical and not a real correlation to the actual world.
In addition, unfortunately, some organizations/individuals will sometimes not make apples-to-apples comparison or leave out key information (i.e., comparing a Tesla Model S to a Toyota Corolla, simply adding the CO2 effect of the battery without comparing the CO2 effect of the engine in a gas-powered vehicle, etc.).
We need to crawl before we walk and walk before we run. The first step (crawling) is to replace dirty coal fired plants with cleaner technology. One way to do that is to conserve and to produce renewable energy to replace the coal. CO2 capture of emission from coal fired plant and sequestration of CO2 in caverns is another short term solution. In parallel prohibiting fossil fuel powered vehicles from sensitive area - like the LA Basin should be phased in.
Replacing all coal fired plants with natural gas is a logical next step - CO2 capture and sequestration for all power plants should also be phased in. After we have successfully made marginal power production clean it will be time to consider replacing most/all vehicles with electric vehicles. Phasing it in by producing electric vehicles now is a step in the right direction but it won't help much until incremental power production gets a lot cleaner than the dirty coal fired plants that produce it today.