rows($this->rock->dbinstr('deptpath',$this->id,'[',']'))>0)return '部门下有用户不允许删除'; if($this->rows('pid='.$this->id.'')>0)return '有下级部门不允许删除'; } }