I'm pretty sure the tank with the big hole is the black tank. Typically you'd have a pipe from that, going to a gate valve, and then a tee with the pipe from the gray tank (and its gate valve that's in place). The third leg of the tee goes to the connector for the sewer hose. The wiring is tank level sensors; you can safely ignore them and figure out the tank levels in other ways (by time or sight, for instance), particularly as the sensor systems sometimes tend to be finicky to keep clean enough to work properly. It also looks like they chopped out and threw away the resistor pack that connects to all the individual tank probes and the wire going back to the gauge panel.
You are going to have a difficult time attaching the pipe to the holding tank, as bumpy notes. You'll also have to patch the holes from the wood screws. If you can find a replacement tank, that might be an easier way to go, depending on how access is to the tank. It looks to me like it's not too bad, like you might be able to replace it without disassembling the entire floor of the RV, but it's not really possible to tell for sure from these pictures.
You could also just attach a bayonet fitting to the gray tank and use a porta-potty rather than the toilet and black tank. Sometimes the bathroom sink is plumbed to the black tank...which would also need to be rerouted if that's your situation.
I think the black ring is part of a fitting for the tank. It kind of looks like a toilet flange part to me, but it may be from the drain fitting.