Пример #1
0
 public function run()
 {
     $page = (int) $this->getInput('page', 'get');
     $flag = $this->getInput('flag');
     $compid = (int) $this->getInput('compid');
     $compname = $this->getInput('compname');
     $perpage = 10;
     $args = array();
     $page = $page > 1 ? $page : 1;
     list($start, $perpage) = Pw::page2limit($page, $perpage);
     Wind::import('SRV:design.srv.vo.PwDesignComponentSo');
     $vo = new PwDesignComponentSo();
     if ($flag) {
         $vo->setModelFlag($flag);
         $args['flag'] = $flag;
     }
     if ($compid > 0) {
         $vo->setCompid($compid);
         $args['compid'] = $compid;
     }
     if ($compname) {
         $vo->setCompname($compname);
         $args['compname'] = $compname;
     }
     $list = $this->_getDesignComponentDs()->searchComponent($vo, $start, $perpage);
     $count = $this->_getDesignComponentDs()->countComponent($vo);
     $models = $this->_getDesignService()->getModelList();
     $this->setOutput($args, 'args');
     $this->setOutput($flag, 'flag');
     $this->setOutput($list, 'list');
     $this->setOutput($models, 'models');
     $this->setOutput($count, 'count');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
 }