public function doeditAction()
 {
     $tpl = $this->getInput('tpl', 'post');
     $compid = (int) $this->getInput('compid', 'post');
     $tpl = $this->_getDesignService()->filterTemplate($tpl);
     if (!$this->_getDesignService()->checkTemplate($tpl)) {
         $this->showError("DESIGN:template.error");
     }
     $property = $this->bo->getProperty();
     $limit = $this->compileFor($tpl);
     $property['limit'] = $limit ? $limit : $property['limit'];
     Wind::import('SRV:design.dm.PwDesignModuleDm');
     $dm = new PwDesignModuleDm($this->bo->moduleid);
     $dm->setModuleTpl($tpl)->setCompid($compid)->setProperty($property);
     $resource = $this->_getModuleDs()->updateModule($dm);
     if ($resource instanceof PwError) {
         $this->showError($resource->getError());
     }
     //更新模版
     $module = $this->bo->getModule();
     if ($module['module_type'] == PwDesignModule::TYPE_IMPORT) {
         Wind::import('SRV:design.bo.PwDesignPageBo');
         $pageBo = new PwDesignPageBo($this->pageid);
         $pageInfo = $pageBo->getPage();
         Wind::import('SRV:design.srv.PwPortalCompile');
         $compile = new PwPortalCompile($pageBo);
         if ($pageInfo['page_type'] == PwDesignPage::PORTAL) {
             $compile->replaceList($this->bo->moduleid, $tpl);
         } elseif ($pageInfo['page_type'] == PwDesignPage::SYSTEM) {
             !$module['segment'] && ($module['segment'] = '');
             $compile->replaceList($this->bo->moduleid, $tpl, $module['segment']);
         }
     }
     //更机数据
     Wind::import('SRV:design.srv.data.PwAutoData');
     $srv = new PwAutoData($this->bo->moduleid);
     $srv->addAutoData();
     $this->showMessage("operate.success");
 }