Modern technologies provide great opportunities to access data with repeated measures. The treatment effect analysis for such data is rarely explored. To analyze it effectively, we must properly address the multi-source randomness arising from the random assignment and the measurement uncertainty, and utilize within-subject repeated measures in an efficient way. In this paper, we combine model-based and design-based perspectives and propose generalized least squares (GLS) estimators by taking the within-subject correlation into account. Without any distributional assumption, we prove that all GLS estimators are unbiased and asymptotically Gaussian distributed. It is shown that the GLS estimator with optimal within-subject weight matrices is locally efficient among all GLS estimators. The proposed framework has been further extended to the setting of vector outcomes and a sequence of dependent outcomes. We illustrate our methods through an analysis of a flexible duty-hour trial.