value => '正常', self::Lose->value => '缺卡', self::Absent->value => '旷工', ]; } public static function source() { return [ self::Normal->value => [ 'label' => self::Normal->text(), 'color' => '#1b9908', ], self::Lose->value => [ 'label' => self::Lose->text(), 'color' => '#d97116', ], self::Absent->value => [ 'label' => self::Absent->text(), 'color' => '#a61922', ], ]; } public function text() { return data_get(self::options(), $this->value); } }