Examples of TSIcon


Examples of org.jeecgframework.web.system.pojo.base.TSIcon

  /**
   * @Description 修复操作按钮表
   * @author tanghan 2013-7-23
   */
  private void repairOperation() {
    TSIcon back = commonDao.findByProperty(TSIcon.class, "iconName", "返回")
        .get(0);
    TSFunction function = commonDao.findByProperty(TSFunction.class,
        "functionName", "Demo示例").get(0);

    TSOperation add = new TSOperation();
View Full Code Here

Examples of org.jeecgframework.web.system.pojo.base.TSIcon

   * @Description 修复图标表
   * @author tanghan 2013-7-19
   */
  private void repaireIcon() {
    org.jeecgframework.core.util.LogUtil.info("修复图标中");
    TSIcon back = new TSIcon();
    back.setIconName("返回");
    back.setIconType((short) 1);
    back.setIconPath("plug-in/accordion/images/back.png");
    back.setIconClas("back");
    back.setExtend("png");
    commonDao.saveOrUpdate(back);

    TSIcon pie = new TSIcon();

    pie.setIconName("饼图");
    pie.setIconType((short) 1);
    pie.setIconPath("plug-in/accordion/images/pie.png");
    pie.setIconClas("pie");
    pie.setExtend("png");
    commonDao.saveOrUpdate(pie);

    TSIcon pictures = new TSIcon();
    pictures.setIconName("图片");
    pictures.setIconType((short) 1);
    pictures.setIconPath("plug-in/accordion/images/pictures.png");
    pictures.setIconClas("pictures");
    pictures.setExtend("png");
    commonDao.saveOrUpdate(pictures);

    TSIcon pencil = new TSIcon();
    pencil.setIconName("笔");
    pencil.setIconType((short) 1);
    pencil.setIconPath("plug-in/accordion/images/pencil.png");
    pencil.setIconClas("pencil");
    pencil.setExtend("png");
    commonDao.saveOrUpdate(pencil);

    TSIcon map = new TSIcon();
    map.setIconName("地图");
    map.setIconType((short) 1);
    map.setIconPath("plug-in/accordion/images/map.png");
    map.setIconClas("map");
    map.setExtend("png");
    commonDao.saveOrUpdate(map);

    TSIcon group_add = new TSIcon();
    group_add.setIconName("组");
    group_add.setIconType((short) 1);
    group_add.setIconPath("plug-in/accordion/images/group_add.png");
    group_add.setIconClas("group_add");
    group_add.setExtend("png");
    commonDao.saveOrUpdate(group_add);

    TSIcon calculator = new TSIcon();
    calculator.setIconName("计算器");
    calculator.setIconType((short) 1);
    calculator.setIconPath("plug-in/accordion/images/calculator.png");
    calculator.setIconClas("calculator");
    calculator.setExtend("png");
    commonDao.saveOrUpdate(calculator);

    TSIcon folder = new TSIcon();
    folder.setIconName("文件夹");
    folder.setIconType((short) 1);
    folder.setIconPath("plug-in/accordion/images/folder.png");
    folder.setIconClas("folder");
    folder.setExtend("png");
    commonDao.saveOrUpdate(folder);
  }
View Full Code Here

Examples of org.jeecgframework.web.system.pojo.base.TSIcon

  /**
   * @Description 修复菜单权限
   * @author tanghan 2013-7-19
   */
  private void repairMenu() {
    TSIcon pic = commonDao.findByProperty(TSIcon.class, "iconName", "图片")
        .get(0);
    TSIcon group_add = commonDao.findByProperty(TSIcon.class, "iconName",
        "组").get(0);
    TSIcon pie = commonDao.findByProperty(TSIcon.class, "iconName", "饼图")
        .get(0);
    TSIcon folder = commonDao.findByProperty(TSIcon.class, "iconName",
        "文件夹").get(0);
    org.jeecgframework.core.util.LogUtil.info(pic.getIconPath());
    TSFunction autoinput = new TSFunction();
    autoinput.setFunctionName("Online 开发");
    autoinput.setFunctionUrl("");
View Full Code Here

Examples of org.jeecgframework.web.system.pojo.base.TSIcon

   */
  @RequestMapping(params = "saveOrUpdateIcon", method = RequestMethod.POST)
  @ResponseBody
  public AjaxJson saveOrUpdateIcon(HttpServletRequest request) throws Exception {
    AjaxJson j = new AjaxJson();   
    TSIcon icon = new TSIcon();
    Short iconType = oConvertUtils.getShort(request.getParameter("iconType"));
    String iconName = oConvertUtils.getString(request.getParameter("iconName"));
    String id = request.getParameter("id");
    icon.setId(id);
    icon.setIconName(iconName);
    icon.setIconType(iconType);
    // uploadFile.setBasePath("images/accordion");
    UploadFile uploadFile = new UploadFile(request, icon);
    uploadFile.setCusPath("plug-in/accordion/images");
    uploadFile.setExtend("extend");
    uploadFile.setTitleField("iconclas");
    uploadFile.setRealPath("iconPath");
    uploadFile.setObject(icon);
    uploadFile.setByteField("iconContent");
    uploadFile.setRename(false);
    systemService.uploadFile(uploadFile);
    // 图标的css样式
    String css = "." + icon.getIconClas() + "{background:url('../images/" + icon.getIconClas() + "." + icon.getExtend() + "') no-repeat}";
    write(request, css);
    message = "上传成功";
    j.setMsg(message);
    return j;
 
View Full Code Here

Examples of org.jeecgframework.web.system.pojo.base.TSIcon

  public AjaxJson update(HttpServletRequest request) throws Exception {
    AjaxJson j = new AjaxJson();
    Short iconType = oConvertUtils.getShort(request.getParameter("iconType"));
    String iconName = java.net.URLDecoder.decode(oConvertUtils.getString(request.getParameter("iconName")));
    String id = request.getParameter("id");
    TSIcon icon = new TSIcon();
    if (StringUtil.isNotEmpty(id)) {
      icon = systemService.get(TSIcon.class, id);
      icon.setId(id);
    }
    icon.setIconName(iconName);
    icon.setIconType(iconType);
    systemService.saveOrUpdate(icon);
    // 图标的css样式
    String css = "." + icon.getIconClas() + "{background:url('../images/" + icon.getIconClas() + "." + icon.getExtend() + "') no-repeat}";
    write(request, css);
    message = "更新成功";
    j.setMsg(message);
    return j;
  }
View Full Code Here

Examples of org.jeecgframework.web.system.pojo.base.TSIcon

            fileDir.mkdirs();
        }
        try {
            List list=dataGrid.getResults();
            for(Object obj:list){
                TSIcon icon=(TSIcon)obj;
                String fileName="icon"+ UUID.randomUUID()+"."+icon.getExtend();
                File tempFile=new File(fileDirName+File.separator+fileName);
                if(icon.getIconContent()!=null){
                byte2image(icon.getIconContent(),tempFile);
                icon.setIconPath("temp/"+fileName);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of org.jeecgframework.web.system.pojo.base.TSIcon

                  operation.setStatus(Short.parseShort(Integer.toString(autoMenuOperation.status())));
                  operation.setTSFunction(function);
                 
                  String iconId = autoMenuOperation.icon();
                  if (StringUtil.isNotEmpty(iconId)) {
                    TSIcon icon = new TSIcon();
                    icon.setId(iconId);
                    operation.setTSIcon(icon);
                  } else {
                    operation.setTSIcon(null);
                  }
                  this.save(operation);
View Full Code Here

Examples of org.jeecgframework.web.system.pojo.base.TSIcon

  public void flushRoleFunciton(String id, TSFunction newFunction) {
    TSFunction functionEntity = this.getEntity(TSFunction.class, id);
    if (functionEntity.getTSIcon() == null || !StringUtil.isNotEmpty(functionEntity.getTSIcon().getId())) {
      return;
    }
    TSIcon oldIcon = this.getEntity(TSIcon.class, functionEntity.getTSIcon().getId());
    if (!oldIcon.getIconClas().equals(newFunction.getTSIcon().getIconClas())) {
      // 刷新缓存
      HttpSession session = ContextHolderUtils.getSession();
      TSUser user = ResourceUtil.getSessionUserName();
      List<TSRoleUser> rUsers = this.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
      for (TSRoleUser ru : rUsers) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.