This paper addresses the problem of leader-follower quasi-bipartite consensus (LFQBC) over the finite-horizon for discrete-time time-varying networked multi-agent systems (NMASs). The NMASs undergo stochastic nonlinearities and randomly occurring mixed attacks (ROMAs), where the false data injection attacks (FDIAs) and denial-of-service attacks (DoSAs) are addressed. A time-varying output feedback controller is proposed in the framework of the signed digraph. Moreover, in order to save transmission resources and reduce computational burden, the controller is deployed in the cloud, and also an event-triggered mechanism (ETM) is designed between the controller and the actuators. The transient characteristics of consensus behavior in NMASs with both cooperative and antagonistic interactions are demonstrated by establishing a sufficient condition of the LFQBC, based on the utilization of recursive linear matrix inequality and stochastic analysis. In addition, a convex optimization algorithm is proposed to ensure locally optimal LFQBC. The proposed approach is shown to be effective by using a numerical example.