The invention discloses a portable device used for peritoneal dialysis and a pipeline of the portable device. The portable device used for peritoneal dialysis comprises a body, a circuit board, a heating board, a temperature probe, a heater, an electronic scale, sensors, a display screen, a command button, a bi-directional peristaltic pump, a pressure detector and a key pipeline, wherein the circuit board is fixedly connected in the body, the heating board is connected to the upper portion of the body, the temperature probe is fixedly connected to the center of the heating board, the heating board is connected with the circuit board through the temperature probe, the heater is fixedly connected to the lower portion of the heating board, the electric scale is arranged below the heating board, a dialyzate bag and a drainage liquid bag are placed on the electric scale, the sensors are fixedly connected to the four corners of the body, the electric scale is connected with the circuit board through the sensors, the display screen, the command button, the bi-directional peristaltic pump and the pressure detector are fixedly connected to a front panel of the body, a power switch and a power supply are fixedly connected to the back side of the body, and the bi-directional peristaltic pump and the pressure sensor are connected through the key pipeline.