CdssSelect.php 716 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class CdssSelect extends Model
  5. {
  6. protected $table = "jm_cdss_select";
  7. public function getCategoryAttr($value)
  8. {
  9. $options = [ 1 => '全身症状' , 2 => '皮肤黏膜' , 3 => '面部五官' , 4 => '神经系统' , 5 => '呼吸系统' , 6 => '运动系统'];
  10. return $options[$value];
  11. }
  12. public static function getCategoryInt($value)
  13. {
  14. $options = ['全身症状' => 1 , '皮肤黏膜' => 2, '面部五官' => 3, '神经系统' => 4, '呼吸系统' => 5, '运动系统' => 6];
  15. return $options[$value];
  16. }
  17. public function getSelectValuesAttr($options)
  18. {
  19. return explode(',' , $options);
  20. }
  21. }