Recurrent neural networks (RNNs), as a specialized neural network architecture for processing time series data, are increasingly vital in predicting the remaining useful life (RUL) and tool wear. However, RNNs have inherent sequence dependency, which makes it difficult to effectively parallelize when processing input data, significantly reducing training efficiency. To address these limitations, this paper proposes a temporal-spatial encoder convolutional network (TSECN) for RUL and tool wear prediction. This model uses the temporal feature extraction (TFE) module is adopted to excavate temporal features parallelly and dynamically weigh the features of different timesteps to improve its feature representation capability. Meanwhile, the spatial feature extraction (SFE) module is employed to excavate both local and global spatial features, which are then fused by a new feature fusion layer to enhance its prediction accuracy. The feature compression module is utilized to reduce the computational complexity and mitigate over-fitting. Finally, the regression prediction module is used to realize an accurate prediction of the target variable. Based on the C-MAPSS and PHM2010 datasets, experiments were conducted to assess the performance of the TSECN model, which shows that the TSECN model surpasses the state-of-the-arts in both the RUL and wear prediction tasks in terms of prediction accuracy.