} } for (var i = 0; i < count; i++) { tid = id_list[i]; if (toHide) { document.getElementById('div_'+tid).style.display = 'none' document.getElementById(tid).className = 'hiddenRow'; } else { document.getElementById(tid).className = ''; } } }
function showTestDetail(div_id){ var details_div = document.getElementById(div_id) var displayState = details_div.style.display // alert(displayState) if (displayState != 'block' ) { displayState = 'block' details_div.style.display = 'block' } else { details_div.style.display = 'none' } }
function html_escape(s) { s = s.replace(/&/g,'&'); s = s.replace(/</g,'<'); s = s.replace(/>/g,'>'); return s; }
/* obsoleted by detail in <div> function showOutput(id, name) { var w = window.open("", //url name, "resizable,scrollbars,status,width=800,height=450"); d = w.document; d.write("<pre>"); d.write(html_escape(output_list[id])); d.write("\n");
/** * 后端详情 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ ForumEntity forum = forumService.selectById(id); return R.ok().put("data", forum); }
/** * 前端详情 */ @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ ForumEntity forum = forumService.selectById(id); return R.ok().put("data", forum); } /** * 论坛详情 */ @IgnoreAuth @RequestMapping("/list/{id}") public R list(@PathVariable("id") String id){ ForumEntity forum = forumService.selectById(id); getChilds(forum); return R.ok().put("data", forum); } private ForumEntity getChilds(ForumEntity forum){ List<ForumEntity> childs = new ArrayList<ForumEntity>(); childs = forumService.selectList(new EntityWrapper<ForumEntity>().eq("parentid", forum.getId())); if(childs == null || childs.size()==0) { returnnull; } forum.setChilds(childs); for(ForumEntity forumEntity : childs) { getChilds(forumEntity); } return forum; }
/** * 后端保存 */ @RequestMapping("/save") public R save(@RequestBody ForumEntity forum, HttpServletRequest request){ forum.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); //ValidatorUtils.validateEntity(forum); forum.setUserid((Long)request.getSession().getAttribute("userId")); forumService.insert(forum);
@RequestMapping("/lists") public R list( ZuoweizanliEntity zuoweizanli){ EntityWrapper<ZuoweizanliEntity> ew = new EntityWrapper<ZuoweizanliEntity>(); ew.allEq(MPUtil.allEQMapPre( zuoweizanli, "zuoweizanli")); return R.ok().put("data", zuoweizanliService.selectListView(ew)); }
/** * 查询 */ @RequestMapping("/query") public R query(ZuoweizanliEntity zuoweizanli){ EntityWrapper< ZuoweizanliEntity> ew = new EntityWrapper< ZuoweizanliEntity>(); ew.allEq(MPUtil.allEQMapPre( zuoweizanli, "zuoweizanli")); ZuoweizanliView zuoweizanliView = zuoweizanliService.selectView(ew); return R.ok("查询座位暂离成功").put("data", zuoweizanliView); } /** * 后端详情 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ ZuoweizanliEntity zuoweizanli = zuoweizanliService.selectById(id); return R.ok().put("data", zuoweizanli); }
/** * 前端详情 */ @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ ZuoweizanliEntity zuoweizanli = zuoweizanliService.selectById(id); return R.ok().put("data", zuoweizanli); }
/** * 后端保存 */ @RequestMapping("/save") public R save(@RequestBody ZuoweizanliEntity zuoweizanli, HttpServletRequest request){ zuoweizanli.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());