For a microphase-separated diblock copolymer ionic gel swollen in salt solution, a molecular-thermodynamic model is based on the self-consistent field theory in the limit of strongly segregated copolymer subchains. The geometry of microdomains is described using the Milner generic wedge construction neglecting the packing frustration. Thermodynamic functions are expressed analytically for gels of lamellar, bicontinuous, cylindrical and spherical morphologies. Molecules are characterized by chain composition, length, rigidity, degree of ionization, and by effective polymer-polymer and polymer-solvent interaction parameters.The model predicts equilibrium solvent uptakes and the equilibrium microdomain spacing for gels swollen in salt solutions. Results are given for details of the gel structure: distribution of mobile ions and polymer segments, and the electric potential across microdomains. Apart from effects obtained by coupling classical Flory-Rehner theory with Donnan equilibria, viz., increased swelling with polyelectrolyte charge and shrinking of gel upon addition of salt, the model predicts the effects of microphase morphology on swelling.