public function _before_add()
 {
     $this->assign("group_id", $_REQUEST['modeid']);
     //查询连字符
     $html = getSelectByHtml('roleinexp', 'select');
     $html = str_replace('"', "'", $html);
     $this->assign("html", $html);
     $this->lookgroupandnode();
 }
 /**
  *
  * @Title: lookupaddremind
  * @Description: todo(工具栏加入提醒)
  * @author renling
  * @date 2014-8-4 下午3:35:48
  * @throws
  */
 public function lookupaddremind()
 {
     $modelname = $_REQUEST['md'];
     //读取配置信息
     $scdmodel = D('SystemConfigDetail');
     $detailList = $scdmodel->getDetail($modelname);
     $this->assign("detailList", $detailList);
     $this->assign("md", $_REQUEST['md']);
     //查询连字符
     $html = getSelectByHtml('roleinexp', 'select');
     $html = str_replace('"', "'", $html);
     $this->assign("html", $html);
     //查询list文件
     $this->display();
 }
 /**
  *
  * @Title: lookupchangeedit
  * @Description: todo(修改提醒条件)
  * @author renling
  * @date 2014-8-11 下午2:16:31
  * @throws
  */
 public function lookupchangeedit()
 {
     $map['id'] = $_REQUEST['id'];
     $remindAllList = $this->lookupremindList($map);
     $this->assign("listkey", $_REQUEST['list']);
     $this->assign("remindAllList", $remindAllList);
     $scdmodel = D('SystemConfigDetail');
     $detailList = $scdmodel->getDetail($remindAllList[0]['name']);
     $this->assign("detailList", $detailList);
     //查询连字符
     $html = getSelectByHtml('roleinexp', 'select');
     $html = str_replace('"', "'", $html);
     $this->assign("html", $html);
     $this->assign("md", $_REQUEST['md']);
     $this->display();
 }
 public function _before_edit()
 {
     $id = $_REQUEST['id'];
     $this->assign("id", $id);
     $pid = $_REQUEST['pid'];
     if ($pid) {
         $vo = M('mis_system_panel_desing_sub')->where("id={$id}")->find();
         $this->assign('modelname', $vo['modelname']);
         //处理条件字段
         //面板条件
         $vo2 = $vo;
         $vo['rulesinfo'] = array();
         $vo['showrules']['panel'] = $vo2['showmap'];
         $vo['rules']['panel'] = $vo2['map'];
         $vo['rulesinfo']['panel'] = $vo2['rulesinfo'];
         //更多按钮条件
         $vo['showrules']['more'] = $vo2['moreshowrules'];
         $vo['rules']['more'] = $vo2['morerules'];
         $vo['rulesinfo']['more'] = $vo2['morerulesinfo'];
         $vo['modelid'] = getFieldBy($vo['modelname'], 'name', 'id', 'node');
         $vo['allfields'] = unserialize($vo['allfields']);
         $type = getFieldBy($pid, 'id', 'type', 'mis_system_panel_desing_mas');
         if ($type == 1) {
             //面板
             $temptitle = explode(',', $vo['showtitle']);
             foreach ($temptitle as $tk => $tv) {
                 $temp = explode('|', $tv);
                 $vo['checkfield'][$temp[0]] = $temp[0];
                 $vo['showwidth'][$temp[0]] = $temp[1];
                 //$vo['showsort'][$temp[0]] = $temp[2];
                 unset($temp);
             }
             $vo['showtitle'] = explode(',', $vo['showtitle']);
             $scdmodel = D('SystemConfigDetail');
             $detailList = $scdmodel->getDetail($vo['modelname'], false);
             $this->assign('detailList', $detailList);
             if ($detailList) {
                 $temp = array();
                 foreach ($vo['checkfield'] as $ck => $cv) {
                     foreach ($detailList as $k => $v) {
                         if ($cv == $v['name']) {
                             $temp[$k] = $v;
                         }
                     }
                 }
                 // 					$detailList = array_merge($temp,$detailList);
                 // 					print_r($detailList);
                 unset($temp);
                 // 					$this->assign ( 'detailList', $detailList );
             }
             //数据排序
             $showsort = array();
             if ($vo['showsort']) {
                 $showsortarr = explode(',', $vo['showsort']);
                 foreach ($showsortarr as $v) {
                     $temp = explode(' ', $v);
                     $showsort[$temp[0]] = $temp[1];
                 }
             }
             $this->assign("showsort", json_encode($showsort));
             //查询连字符
             $html = getSelectByHtml('roleinexp', 'select');
             $html = str_replace('"', "'", $html);
             $this->assign("html", $html);
             $this->lookgroupandnode($type);
             $this->assign("jsonvo", json_encode($vo));
             $this->assign("vo", $vo);
             $this->display("editsub");
         } elseif ($type == 0) {
             //iframe
             //查询连字符
             $html = getSelectByHtml('roleinexp', 'select');
             $html = str_replace('"', "'", $html);
             $this->assign("html", $html);
             $this->lookgroupandnode($type);
             $this->assign("vo", $vo);
             $this->display("editreport");
         } elseif ($type == 2) {
             //新闻
             $this->assign("vo", $vo);
             $this->display("editnews");
         }
         exit;
     }
 }
 /**
  *
  * @Title: lookupcommon
  * @Description: todo(公用查询)
  * @author renling
  * @date 2014-1-13 下午3:41:15
  * @throws
  */
 private function lookupcommon($defaultId)
 {
     //视图model
     $ProcessNodeModel = D('ProcessNode');
     //构造查询条件
     $NodeMap['status'] = 1;
     $NodeMap['id'] = $defaultId;
     //获取节点信息
     $ProcessNodeList = $ProcessNodeModel->where($NodeMap)->getField("name");
     //读取配置字段
     $scdmodel = D('SystemConfigDetail');
     $detailList = $scdmodel->getDetail($ProcessNodeList, false);
     foreach ($detailList as $key => $val) {
         if ($val['rules'] != 1) {
             unset($detailList[$key]);
         }
     }
     $html = getSelectByHtml('roleinexp', 'select');
     $html = str_replace('"', "'", $html);
     $this->assign("html", $html);
     $this->assign("detailList", $detailList);
 }