diff --git a/pom.xml b/pom.xml index ad9bc5648101974e4d620e1698f6f84493cef00f..9b2177f3ec3591aacd87185dc094acfc7c0a0796 100644 --- a/pom.xml +++ b/pom.xml @@ -3,11 +3,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.example - springboot_v2 + com.zsess.mian + taskManage jar - springboot_v2 - springbootv2系统 + taskManage_v1 + 任务跟踪管理系统 org.springframework.boot @@ -66,20 +66,20 @@ pagehelper-spring-boot-starter 1.2.5 - + + mysql mysql-connector-java 8.0.11 - --> + @@ -198,11 +198,11 @@ 1.9 - ueditor - 1.4.3 - 1.8 - system - ${basedir}/lib/ueditor-1.1.2.jar + baidu + ueditor + 1.1.2 + + @@ -225,6 +225,31 @@ + + + org.apache.maven.plugins + maven-install-plugin + + + + install-ueditor + clean + + ${basedir}/lib/ueditor-1.1.2.jar + default + baidu + ueditor + 1.1.2 + jar + true + + + install-file + + + + + org.apache.maven.plugins diff --git a/src/main/java/com/fc/SpringbootStart.java b/src/main/java/com/fc/SpringbootStart.java index 492ed7532d1ffdca48c212d49a325827fb2020ab..a256055e387209a802b67042e1ef50273a59804e 100644 --- a/src/main/java/com/fc/SpringbootStart.java +++ b/src/main/java/com/fc/SpringbootStart.java @@ -10,42 +10,14 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; * @author fuce * */ -@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) +@SpringBootApplication(exclude = DataSourceAutoConfiguration.class, + scanBasePackages = {"com.fc.test","com.zsess.taskmanage"}) +// public class SpringbootStart { public static void main(String[] args) { SpringApplication.run(SpringbootStart.class, args); - System.out.println("*******************************************\n" + - "* 码云地址 *\n" + - "* https://gitee.com/bdj/SpringBoot_v2 *\n" + - "* *\n" + - "*******************************************\n" + - " _.._ ,-------------------.\n" + - " ,' `. ( 启动成功!开启学习之旅! )\n" + - " / __) __` \\ `-,-----------------'\n" + - " ( (`-`(-') ) _.-'\n" + - " /) \\ = / (\n" + - " /' |--' . \\\n" + - " ( ,---| `-.)__`\n" + - " )( `-.,--' _`-.\n" + - " '/,' ( Uu\",\n" + - " (_ , `/,-' )\n" + - " `.__, : `-'/ /`--'\n" + - " | `--' |\n" + - " ` `-._ /\n" + - " \\ (\n" + - " /\\ . \\. \n" + - " / |` \\ ,-\\\n" + - " / \\| .) / \\\n" + - " ( ,'|\\ ,' :\n" + - " | \\,`.`--\"/ }\n" + - " `,' \\ |,' /\n" + - " / \"-._ `-/ |\n" + - " \"-. \"-.,'| ;\n" + - " / _/[\"---'\"\"]\n" + - " : / |\"- '\n" + - " ' | /\n" + - " ` |"); + System.out.println(" ( 启动成功!)\n"); } } diff --git a/src/main/java/com/fc/test/common/base/BaseController.java b/src/main/java/com/fc/test/common/base/BaseController.java index f75d0d6156fb38cef631f2f508236278bd196c27..3e0d29c29e5a695d7557f51f69a3924b37a59180 100644 --- a/src/main/java/com/fc/test/common/base/BaseController.java +++ b/src/main/java/com/fc/test/common/base/BaseController.java @@ -13,6 +13,8 @@ import org.springframework.ui.ModelMap; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; +import javax.annotation.Resource; + /** * web层通用数据处理 * @ClassName: BaseController @@ -24,8 +26,13 @@ import org.springframework.web.bind.annotation.InitBinder; public class BaseController { //系统用户 - @Autowired - public SysUserService sysUserService; + @Resource + public SysUserService sysUserService; + /** + * 系统部门。 + */ + @Resource + public SysDepartmentService sysDepartmentService; //系统角色 @Autowired @@ -61,9 +68,8 @@ public class BaseController * 将前台传递过来的日期格式的字符串,自动转化为Date类型 */ @InitBinder - public void initBinder(WebDataBinder binder) - { - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + public void initBinder(WebDataBinder binder) throws Exception { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); dateFormat.setLenient(false); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); } diff --git a/src/main/java/com/fc/test/common/conf/MybatisConfig.java b/src/main/java/com/fc/test/common/conf/MybatisConfig.java index a26d616c461284721f1a6cfa33ce53e7b5b81b34..eaf73f4296455c5d761dc74b26f568d698ba2ca9 100644 --- a/src/main/java/com/fc/test/common/conf/MybatisConfig.java +++ b/src/main/java/com/fc/test/common/conf/MybatisConfig.java @@ -27,7 +27,7 @@ import com.fc.test.common.dataSources.DynamicDataSource; * @date 2019-12-06 21:11 */ @Configuration -@MapperScan(basePackages = "com.fc.test.mapper") +@MapperScan(basePackages = {"com.fc.test.mapper","com.zsess.taskmanage.mapper"}) public class MybatisConfig { @Bean diff --git a/src/main/java/com/fc/test/common/file/FileUploadUtils.java b/src/main/java/com/fc/test/common/file/FileUploadUtils.java index 7c8412781968c0a18185ad7e3c73c9cdc0538226..4ee4ff1e587a3a84377b565afb55b18c52d3e52f 100644 --- a/src/main/java/com/fc/test/common/file/FileUploadUtils.java +++ b/src/main/java/com/fc/test/common/file/FileUploadUtils.java @@ -101,8 +101,8 @@ public class FileUploadUtils { * * @param baseDir 相对应用的基目录 * @param file 上传的文件 - * @param needDatePathAndRandomName 是否需要日期目录和随机文件名前缀 - * @param extension 上传文件类型 +// * @param needDatePathAndRandomName 是否需要日期目录和随机文件名前缀 +// * @param extension 上传文件类型 * @return 返回上传成功的文件名 * @throws FileSizeLimitExceededException 如果超出最大大小 * @throws FileNameLengthLimitExceededException 文件名太长 @@ -113,7 +113,11 @@ public class FileUploadUtils { { String fileName=file.getOriginalFilename(); // 获得文件后缀名称 - String suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase(); + final int index = fileName.lastIndexOf("."); + String suffixName = null; + if (index > 0) { + suffixName = fileName.substring(index).toLowerCase(); + } if(StringUtils.isEmpty(suffixName)) { //如果没有后缀默认后缀 suffixName=FileUploadUtils.IMAGE_JPG_EXTENSION; diff --git a/src/main/java/com/fc/test/common/interceptor/MyWebAppConfigurer.java b/src/main/java/com/fc/test/common/interceptor/MyWebAppConfigurer.java index 8f9ff5715acb2c21b5fcfad66788e140825bb2f7..a8b44e1dcc61c95fd75f5cc21d3d62ca47d752e3 100644 --- a/src/main/java/com/fc/test/common/interceptor/MyWebAppConfigurer.java +++ b/src/main/java/com/fc/test/common/interceptor/MyWebAppConfigurer.java @@ -89,6 +89,9 @@ public class MyWebAppConfigurer extends WebMvcConfigurationSupport { /** 静态资源处理 **/ @Override protected void addResourceHandlers(ResourceHandlerRegistry registry) { + logger.info("静态资源处理【路径 isrootDir = "+ isrootDir+ "】"); + logger.info("静态资源处理【路径 defaultBaseDir = "+ defaultBaseDir+ "】"); + //配置虚拟路径为项目得static下面 registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); if(!"Y".equals(isstatic)) { diff --git a/src/main/java/com/fc/test/common/support/ConvertUtil.java b/src/main/java/com/fc/test/common/support/ConvertUtil.java index 554f79c2bc0b9ff941cea3c8ab3b720873821565..65955422041930ed44596deadfb47b379c022935 100644 --- a/src/main/java/com/fc/test/common/support/ConvertUtil.java +++ b/src/main/java/com/fc/test/common/support/ConvertUtil.java @@ -43,6 +43,7 @@ public class ConvertUtil { return toIntArray(",", str); } + /** * 转换为Integer数组
* @param split 分隔符 @@ -102,6 +103,17 @@ public class ConvertUtil { return stringB; } + /** + * 字符串转化为list, + * @param str, 分隔符为‘,’ + * @return + */ + public static List toListIntArray(String str) { + final Integer[] intArray = toIntArray(",", str); + final List intlist = Arrays.asList(intArray); + return intlist; + } + /** * 转换为String数组
* @param split 被转换的值 diff --git a/src/main/java/com/fc/test/controller/AdminController.java b/src/main/java/com/fc/test/controller/AdminController.java index d4a22dfeb1dfb02c3a1d5bc75f523c7d26c878b8..9aa723f25ab677ab14cf0f161b6dbfd461aa17f3 100644 --- a/src/main/java/com/fc/test/controller/AdminController.java +++ b/src/main/java/com/fc/test/controller/AdminController.java @@ -1,18 +1,27 @@ package com.fc.test.controller; import java.util.List; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.fc.test.common.base.BaseController; import com.fc.test.common.conf.V2Config; import com.fc.test.common.domain.AjaxResult; +import com.fc.test.mapper.custom.RoleDao; import com.fc.test.model.auto.SysNotice; +import com.fc.test.model.auto.TsysRole; import com.fc.test.model.auto.TsysUser; import com.fc.test.model.custom.BootstrapTree; +import com.fc.test.model.custom.Tablepar; import com.fc.test.model.custom.TitleVo; import com.fc.test.shiro.util.ShiroUtils; import com.fc.test.util.StringUtils; +import com.github.pagehelper.PageInfo; import com.google.code.kaptcha.Constants; +import com.zsess.taskmanage.model.DeptTaskInfo; +import com.zsess.taskmanage.model.Taskinfo; +import com.zsess.taskmanage.service.DeptTaskInfoService; +import com.zsess.taskmanage.service.TaskinfoService; import io.swagger.annotations.ApiOperation; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; @@ -44,7 +53,14 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes; @RequestMapping("/admin") public class AdminController extends BaseController{ private static Logger logger=LoggerFactory.getLogger(AdminController.class); - + //角色dao + @Resource + private RoleDao roleDao ; + @Resource + private DeptTaskInfoService deptTaskInfoService; + @Resource + private TaskinfoService taskinfoService; + //默认模板前缀 private String prefix = "admin"; @ApiOperation(value="首页",notes="首页") @@ -54,6 +70,7 @@ public class AdminController extends BaseController{ BootstrapTree bootstrapTree= sysPermissionService.getbooBootstrapTreePerm(ShiroUtils.getUserId()); request.getSession().setAttribute("bootstrapTree", bootstrapTree); request.getSession().setAttribute("sessionUserName",ShiroUtils.getUser().getNickname()); + request.getSession().setAttribute("roleid", 1); //获取公告信息 List notices=sysNoticeService.getuserNoticeNotRead(ShiroUtils.getUser(),0); request.getSession().setAttribute("notices",notices); @@ -66,10 +83,104 @@ public class AdminController extends BaseController{ setTitle(map, new TitleVo("首页", "首页", true,"欢迎进入", true, false)); return prefix+"/main"; } + + @ApiOperation(value="首页控制面板",notes="控制面板") + @GetMapping("/control") + public String control(ModelMap map) { + String pageUrl = prefix + "/control"; + String uid=ShiroUtils.getUserId(); + boolean isLeader = false; + final List tsysRoles= roleDao.queryUserRole(uid); + Integer roleOrder = null; + for(TsysRole role : tsysRoles) { + roleOrder = role.getOrder(); + break; + } + switch(roleOrder) { + case 1: pageUrl = this.controlForLeader(map); + break; + case 2:pageUrl = this.controlForTaskStart(map); + break; + case 3:pageUrl = this.controlForProcessLeader(map); + break; + default: pageUrl = this.controlForProcessExecutor(map);; + } + return pageUrl; + + } + + /** + * 通用个人(普通执法人员)主页控制台. + * @param map + * @return + */ + private String controlForProcessExecutor(ModelMap map) { + setTitle(map, new TitleVo("个人主页", "首页", true,"欢迎进入", true, false)); + Tablepar tablepar = new Tablepar(); + tablepar.setIsAsc("asc"); + tablepar.setPageNum(1); + tablepar.setPageSize(10); + Taskinfo record = new Taskinfo(); + final PageInfo page=taskinfoService.taskProcesslistForExecutor(tablepar,record) ; + map.addAttribute("tasknum",page.getTotal()); + return "taskmanage/controlForProcessExecutor"; + } + /** + * 通用个人(科室负责人)主页控制台. + * @param map + * @return + */ + private String controlForProcessLeader(ModelMap map) { + setTitle(map, new TitleVo("个人主页", "首页", true,"欢迎进入", true, false)); + Tablepar tablepar = new Tablepar(); + tablepar.setIsAsc("asc"); + tablepar.setPageNum(1); + tablepar.setPageSize(10); + Taskinfo record = new Taskinfo(); + final PageInfo page=taskinfoService.taskProcesslist(tablepar,record) ; + map.addAttribute("tasknum",page.getTotal()); + return "taskmanage/controlForProcessLeader"; + } + /** + * 个人(任務發起)主页控制台. + * @param map + * @return + */ + private String controlForTaskStart(ModelMap map) { + setTitle(map, new TitleVo("个人主页", "首页", true,"欢迎进入", true, false)); + + Tablepar tablepar = new Tablepar(); + tablepar.setIsAsc("asc"); + tablepar.setPageNum(1); + tablepar.setPageSize(10); + Taskinfo record = new Taskinfo(); + final PageInfo page= taskinfoService.listForAddTask(tablepar,record) ; + map.addAttribute("tasknum",page.getTotal()); + return "taskmanage/controlForTaskStart"; + } + + @ApiOperation(value="高级管理员个人主页",notes="高级管理员个人主页") + public String controlForLeader(ModelMap map) { + setTitle(map, new TitleVo("个人主页", "首页", true,"欢迎进入", true, false)); + final Listdepttaskinfos = this.deptTaskInfoService.getDeptExeTaskInfoForControl(); + for(int i=0; i<4;i++) { + final DeptTaskInfo depttask = depttaskinfos.get(i); + map.addAttribute("depttask" + i,depttask); + } + Tablepar tablepar = new Tablepar(); + tablepar.setIsAsc("asc"); + tablepar.setPageNum(1); + tablepar.setPageSize(10); + Taskinfo record = new Taskinfo(); + final PageInfo page=taskinfoService.listForAudiLeader(tablepar,record) ; + map.addAttribute("tasknum",page.getTotal()); + + return "taskmanage/controlForLeader"; + } /** * 请求到登陆界面 - * @param request + * @param modelMap * @return */ @ApiOperation(value="请求到登陆界面",notes="请求到登陆界面") @@ -94,10 +205,10 @@ public class AdminController extends BaseController{ /** * 用户登陆验证 * @param user - * @param rcode + * @param code * @param redirectAttributes * @param rememberMe - * @param model + * @param rememberMe * @param request * @return */ diff --git a/src/main/java/com/fc/test/controller/IndexController.java b/src/main/java/com/fc/test/controller/IndexController.java index 895aff057344a412cf14d8b6afbad9189e9e8521..b233f4735c0ce0cc5ab1be89f5d8da9bd2d3e738 100644 --- a/src/main/java/com/fc/test/controller/IndexController.java +++ b/src/main/java/com/fc/test/controller/IndexController.java @@ -1,6 +1,7 @@ package com.fc.test.controller; import com.fc.test.common.base.BaseController; +import com.fc.test.common.conf.V2Config; import com.fc.test.model.custom.TitleVo; import io.swagger.annotations.ApiOperation; import org.springframework.stereotype.Controller; @@ -28,7 +29,11 @@ public class IndexController extends BaseController{ public String index(ModelMap map) { String str="前台"; setTitle(map, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false)); - return "index"; +// return "index"; // 进入前台空白页面 + //通过参数 RollVerification, 控制登陆页面使用验证码方式,数字还是滑动效果 + map.put("RollVerification", V2Config.getRollVerification()); +// System.out.println("V2Config.getRollVerification()>>>"+V2Config.getRollVerification()); + return "login"; // 进入登陆页面 } /** * 前台访问/index的get请求 @@ -42,6 +47,7 @@ public class IndexController extends BaseController{ public String index2(ModelMap map) { String str="前台"; setTitle(map, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false)); - return "index"; +// return "index"; + return "login"; } } diff --git a/src/main/java/com/fc/test/controller/admin/AutoCodeController.java b/src/main/java/com/fc/test/controller/admin/AutoCodeController.java index 1f50d3d1e8423e56ec9005dbb7a483c8e21623c4..0c9ad517851406d2d31910a6e2c33e7e677df368 100644 --- a/src/main/java/com/fc/test/controller/admin/AutoCodeController.java +++ b/src/main/java/com/fc/test/controller/admin/AutoCodeController.java @@ -72,7 +72,7 @@ public class AutoCodeController extends BaseController { /** * 代码自动生成全局配置 * - * @param model + * @param modelMap * @return * @author fuce * @Date 2019年8月13日 上午12:34:30 diff --git a/src/main/java/com/fc/test/controller/admin/FileController.java b/src/main/java/com/fc/test/controller/admin/FileController.java index 8930c51c8ed4c60f7410c43f62dbc582256a0228..ca5df5f32da3d8a5f814b8accc47fb3c71955386 100644 --- a/src/main/java/com/fc/test/controller/admin/FileController.java +++ b/src/main/java/com/fc/test/controller/admin/FileController.java @@ -117,6 +117,38 @@ public class FileController extends BaseController{ return error(e.getMessage()); } } + + /** + * 文件上传 + * @param file + * @return + * @author fuce + * @Date 2019年11月20日 下午10:18:49 + */ + //@Log(title = "文件上传", action = "1") + @ApiOperation(value = "文件上传", notes = "文件上传") + @PostMapping("/uploadFile") + @ResponseBody + public AjaxResult uploadFile(@RequestParam("file") MultipartFile file) + { + try + { + if (!file.isEmpty()) + { + //插入文件存储表 + String id=sysDatasService.insertSelective(file); +// final String fileName = file.getOriginalFilename(); + if(id!=null){ + return AjaxResult.successData(200, id); + } + } + return error(); + } + catch (Exception e) + { + return error(e.getMessage()); + } + } /** * 文件添加 diff --git a/src/main/java/com/fc/test/controller/admin/SysDepartmentController.java b/src/main/java/com/fc/test/controller/admin/SysDepartmentController.java index f0acf2b96cb1f086b4621662dac8e0c62267123f..92e319e880b54bebd172fb317253e6a498131442 100644 --- a/src/main/java/com/fc/test/controller/admin/SysDepartmentController.java +++ b/src/main/java/com/fc/test/controller/admin/SysDepartmentController.java @@ -1,6 +1,9 @@ package com.fc.test.controller.admin; import java.util.List; + +import com.fc.test.model.auto.TsysUser; +import com.fc.test.service.SysUserService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -21,6 +24,8 @@ import com.fc.test.service.SysDepartmentService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import javax.annotation.Resource; + @Api(value = "部门表") @Controller @RequestMapping("/SysDepartmentController") @@ -29,6 +34,8 @@ public class SysDepartmentController extends BaseController{ private String prefix = "admin/sysDepartment"; @Autowired private SysDepartmentService sysDepartmentService; + @Resource + private SysUserService sysUserService; /** * 分页跳转 @@ -126,7 +133,7 @@ public class SysDepartmentController extends BaseController{ /** * 检查用户 - * @param tsysUser + * @param sysDepartment * @return */ @ApiOperation(value = "检查Name唯一", notes = "检查Name唯一") @@ -153,14 +160,17 @@ public class SysDepartmentController extends BaseController{ public String edit(@PathVariable("id") String id, ModelMap mmap) { //获取自己的权限信息 - SysDepartment mytsysPermission = sysDepartmentService.selectByPrimaryKey(id); + SysDepartment mysysdepartment = sysDepartmentService.selectByPrimaryKey(id); //获取父权限信息 - SysDepartment department = sysDepartmentService.selectByPrimaryKey(mytsysPermission.getParentId()); + SysDepartment department = sysDepartmentService.selectByPrimaryKey(mysysdepartment.getParentId()); if(department==null) { department=new SysDepartment(1, "", "顶级菜单", "", "", "", 0, 1, 1); } - mmap.put("SysDepartment", mytsysPermission); + mmap.put("SysDepartment", mysysdepartment); mmap.put("perSysDepartment", department); + final Listusers = this.sysUserService.getUserlistByDeptid(Integer.valueOf(id)); + mmap.put("userlist", users); + return prefix + "/edit"; } @@ -182,7 +192,6 @@ public class SysDepartmentController extends BaseController{ * 根据主键查询 * * @param id - * @param mmap * @return */ @PostMapping("/get/{id}") diff --git a/src/main/java/com/fc/test/controller/admin/UserController.java b/src/main/java/com/fc/test/controller/admin/UserController.java index e8e93370a95af9fe23ae7f5e2d986116370853e6..96122bf756710732ea300908696dcb8383400886 100644 --- a/src/main/java/com/fc/test/controller/admin/UserController.java +++ b/src/main/java/com/fc/test/controller/admin/UserController.java @@ -1,6 +1,8 @@ package com.fc.test.controller.admin; import java.util.List; + +import com.fc.test.model.auto.SysDepartment; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -86,8 +88,10 @@ public class UserController extends BaseController{ public String add(ModelMap modelMap) { //添加角色列表 - List tsysRoleList=sysRoleService.queryList(); + final List tsysRoleList=sysRoleService.queryList(); modelMap.put("tsysRoleList",tsysRoleList); + final List deptList = sysDepartmentService.getDeptsWithoutRoot(); + modelMap.put("deptList",deptList); return prefix + "/add"; } /** @@ -161,10 +165,12 @@ public class UserController extends BaseController{ public String edit(@PathVariable("id") String id, ModelMap mmap) { //查询所有角色 - List roleVos=sysUserService.getUserIsRole(id); + final List roleVos=sysUserService.getUserIsRole(id); mmap.put("roleVos",roleVos); - mmap.put("TsysUser", sysUserService.selectByPrimaryKey(id)); - + final TsysUser user = sysUserService.selectByPrimaryKey(id); + mmap.put("TsysUser", user); + final List deptList = sysDepartmentService.getall(); + mmap.put("deptList", deptList); return prefix + "/edit"; } diff --git a/src/main/java/com/fc/test/controller/gen/TestController.java b/src/main/java/com/fc/test/controller/gen/TestController.java new file mode 100644 index 0000000000000000000000000000000000000000..7378cb95c96ea42690256b54a8b7033b9a66ea5c --- /dev/null +++ b/src/main/java/com/fc/test/controller/gen/TestController.java @@ -0,0 +1,167 @@ +package com.fc.test.controller.gen; + +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.github.pagehelper.PageInfo; +import com.fc.test.common.base.BaseController; +import com.fc.test.common.domain.AjaxResult; +import com.fc.test.model.auto.Test; +import com.fc.test.model.custom.TableSplitResult; +import com.fc.test.model.custom.Tablepar; +import com.fc.test.model.custom.TitleVo; +import com.fc.test.service.TestService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@Api(value = "测试表") +@Controller +@RequestMapping("/TestController") +public class TestController extends BaseController{ + + private String prefix = "gen/test"; + @Autowired + private TestService testService; + + /** + * 分页跳转 + */ + @ApiOperation(value = "分页跳转", notes = "分页跳转") + @GetMapping("/view") + @RequiresPermissions("gen:test:view") + public String view(ModelMap model) + { + String str="测试表"; + setTitle(model, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false)); + return prefix + "/list"; + } + + /** + * 分页查询 + */ + //@Log(title = "测试表集合查询", action = "111") + @ApiOperation(value = "分页查询", notes = "分页查询") + @PostMapping("/list") + @RequiresPermissions("gen:test:list") + @ResponseBody + public Object list(Tablepar tablepar,Test record){ + PageInfo page=testService.list(tablepar,record) ; + TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + } + + /** + * 新增跳转 + */ + @ApiOperation(value = "新增跳转", notes = "新增跳转") + @GetMapping("/add") + public String add(ModelMap modelMap) + { + return prefix + "/add"; + } + + /** + * 新增 + */ + //@Log(title = "测试表新增", action = "111") + @ApiOperation(value = "新增", notes = "新增") + @PostMapping("/add") + @RequiresPermissions("gen:test:add") + @ResponseBody + public AjaxResult add(Test test){ + int b=testService.insertSelective(test); + if(b>0){ + return success(); + }else{ + return error(); + } + } + + /** + * 删除 + * @param ids + * @return + */ + //@Log(title = "测试表删除", action = "111") + @ApiOperation(value = "删除", notes = "删除") + @PostMapping("/remove") + @RequiresPermissions("gen:test:remove") + @ResponseBody + public AjaxResult remove(String ids){ + int b=testService.deleteByPrimaryKey(ids); + if(b>0){ + return success(); + }else{ + return error(); + } + } + + /** + * 检查Name + * @param tsysUser + * @return + */ + @ApiOperation(value = "检查Name唯一", notes = "检查Name唯一") + @PostMapping("/checkNameUnique") + @ResponseBody + public int checkNameUnique(Test test){ + int b=testService.checkNameUnique(test); + if(b>0){ + return 1; + }else{ + return 0; + } + } + + + /** + * 修改跳转 + * @param id + * @param mmap + * @return + */ + @ApiOperation(value = "修改跳转", notes = "修改跳转") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") String id, ModelMap mmap) + { + mmap.put("Test", testService.selectByPrimaryKey(id)); + + return prefix + "/edit"; + } + + /** + * 修改保存 + */ + //@Log(title = "测试表修改", action = "111") + @ApiOperation(value = "修改保存", notes = "修改保存") + @RequiresPermissions("gen:test:edit") + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(Test record) + { + return toAjax(testService.updateByPrimaryKeySelective(record)); + } + + + /** + * 根据主键查询 + * + * @param id + * @param mmap + * @return + */ + @ApiOperation(value = "根据id查询唯一", notes = "根据id查询唯一") + @PostMapping("/get/{id}") + public Test edit(@PathVariable("id") String id) { + return testService.selectByPrimaryKey(id); + } + + + +} diff --git a/src/main/java/com/fc/test/mapper/auto/SysDepartmentMapper.java b/src/main/java/com/fc/test/mapper/auto/SysDepartmentMapper.java index cc3acf62dc145a197a6c18d63dba7d154be0d284..952fcb3dd32309e4e046be75720842a2d29accda 100644 --- a/src/main/java/com/fc/test/mapper/auto/SysDepartmentMapper.java +++ b/src/main/java/com/fc/test/mapper/auto/SysDepartmentMapper.java @@ -34,5 +34,5 @@ public interface SysDepartmentMapper { int updateByPrimaryKeySelective(SysDepartment record); int updateByPrimaryKey(SysDepartment record); - + } \ No newline at end of file diff --git a/src/main/java/com/fc/test/mapper/auto/TestMapper.java b/src/main/java/com/fc/test/mapper/auto/TestMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..f011385d43f76de0ba1c8f61d08d8bedff477d31 --- /dev/null +++ b/src/main/java/com/fc/test/mapper/auto/TestMapper.java @@ -0,0 +1,38 @@ +package com.fc.test.mapper.auto; + +import com.fc.test.model.auto.Test; +import com.fc.test.model.auto.TestExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +/** + * 测试表 TestMapper + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-03 13:09:35 + */ +public interface TestMapper { + + long countByExample(TestExample example); + + int deleteByExample(TestExample example); + + int deleteByPrimaryKey(String id); + + int insert(Test record); + + int insertSelective(Test record); + + List selectByExample(TestExample example); + + Test selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Test record, @Param("example") TestExample example); + + int updateByExample(@Param("record") Test record, @Param("example") TestExample example); + + int updateByPrimaryKeySelective(Test record); + + int updateByPrimaryKey(Test record); + +} \ No newline at end of file diff --git a/src/main/java/com/fc/test/mapper/custom/TsysDatasDao.java b/src/main/java/com/fc/test/mapper/custom/TsysDatasDao.java index 35c936bd4f85fc978f6704577fb5d46461e41f9c..429970bc600db772dceb7e60e2c0df01902912d7 100644 --- a/src/main/java/com/fc/test/mapper/custom/TsysDatasDao.java +++ b/src/main/java/com/fc/test/mapper/custom/TsysDatasDao.java @@ -9,5 +9,26 @@ import com.fc.test.model.auto.TsysDatas; public interface TsysDatasDao { public List selectByPrimaryKeys(@Param("ids") List ids); - + + /** + * 通过任务管理附件id,获取文件数据信息。 + * @param ids + * @return + */ + public List selectByTaskfileids(@Param("ids") List ids); + + /** + * 通过任务id taskid 获取所有的文件数据信息. + * @param taskid + * @return + */ + public List selectByTaskid(@Param("taskid") String taskid); + + /** + * 通过任务id taskid 获取指定附件类型的文件数据信息. + * @param taskid + * @param filetype 附件类型, 0任务信息;1任务汇报 + * @return + */ + public List getTaskFileByTaskidAndFiletype(@Param("taskid") String taskid, @Param("filetype") Integer filetype); } \ No newline at end of file diff --git a/src/main/java/com/fc/test/model/auto/Test.java b/src/main/java/com/fc/test/model/auto/Test.java new file mode 100644 index 0000000000000000000000000000000000000000..f6118d227ebd4c4b1c736bf76c9b924f74ff53e4 --- /dev/null +++ b/src/main/java/com/fc/test/model/auto/Test.java @@ -0,0 +1,105 @@ +package com.fc.test.model.auto; + +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import java.lang.Integer; + +/** + * 测试表 Test + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-03 13:09:35 + */ + @ApiModel(value="Test", description="测试表") +public class Test implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** 主键 **/ + @ApiModelProperty(value = "主键") + private String id; + + /** 名称 **/ + @ApiModelProperty(value = "名称") + private String name; + + /** 年龄 **/ + @ApiModelProperty(value = "年龄") + private Integer age; + + /** 创建时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @ApiModelProperty(value = "创建时间") + private Date crateTime; + + /** 别名 **/ + @ApiModelProperty(value = "别名") + private String tesName; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public Integer getAge() { + return age; + } + + public void setAge(Integer age) { + this.age = age; + } + + + public Date getCrateTime() { + return crateTime; + } + + public void setCrateTime(Date crateTime) { + this.crateTime = crateTime; + } + + + public String getTesName() { + return tesName; + } + + public void setTesName(String tesName) { + this.tesName = tesName; + } + + + public Test() { + super(); + } + + + public Test(String id,String name,Integer age,Date crateTime,String tesName) { + + this.id = id; + this.name = name; + this.age = age; + this.crateTime = crateTime; + this.tesName = tesName; + + } + +} \ No newline at end of file diff --git a/src/main/java/com/fc/test/model/auto/TestExample.java b/src/main/java/com/fc/test/model/auto/TestExample.java new file mode 100644 index 0000000000000000000000000000000000000000..882a285fbf3519e6b74b08a3b02a5cc10b5ef9ef --- /dev/null +++ b/src/main/java/com/fc/test/model/auto/TestExample.java @@ -0,0 +1,615 @@ +package com.fc.test.model.auto; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import cn.hutool.core.util.StrUtil; +/** + * 测试表 TestExample + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-03 13:09:35 + */ +public class TestExample { + + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + + public Criteria andAgeIsNull() { + addCriterion("age is null"); + return (Criteria) this; + } + + public Criteria andAgeIsNotNull() { + addCriterion("age is not null"); + return (Criteria) this; + } + + public Criteria andAgeEqualTo(Integer value) { + addCriterion("age =", value, "age"); + return (Criteria) this; + } + + public Criteria andAgeNotEqualTo(Integer value) { + addCriterion("age <>", value, "age"); + return (Criteria) this; + } + + public Criteria andAgeGreaterThan(Integer value) { + addCriterion("age >", value, "age"); + return (Criteria) this; + } + + public Criteria andAgeGreaterThanOrEqualTo(Integer value) { + addCriterion("age >=", value, "age"); + return (Criteria) this; + } + + public Criteria andAgeLessThan(Integer value) { + addCriterion("age <", value, "age"); + return (Criteria) this; + } + + public Criteria andAgeLessThanOrEqualTo(Integer value) { + addCriterion("age <=", value, "age"); + return (Criteria) this; + } + + public Criteria andAgeLike(Integer value) { + addCriterion("age like", value, "age"); + return (Criteria) this; + } + + public Criteria andAgeNotLike(Integer value) { + addCriterion("age not like", value, "age"); + return (Criteria) this; + } + + public Criteria andAgeIn(List values) { + addCriterion("age in", values, "age"); + return (Criteria) this; + } + + public Criteria andAgeNotIn(List values) { + addCriterion("age not in", values, "age"); + return (Criteria) this; + } + + public Criteria andAgeBetween(Integer value1, Integer value2) { + addCriterion("age between", value1, value2, "age"); + return (Criteria) this; + } + + public Criteria andAgeNotBetween(Integer value1, Integer value2) { + addCriterion("age not between", value1, value2, "age"); + return (Criteria) this; + } + + + public Criteria andCrateTimeIsNull() { + addCriterion("crate_time is null"); + return (Criteria) this; + } + + public Criteria andCrateTimeIsNotNull() { + addCriterion("crate_time is not null"); + return (Criteria) this; + } + + public Criteria andCrateTimeEqualTo(Date value) { + addCriterion("crate_time =", value, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeNotEqualTo(Date value) { + addCriterion("crate_time <>", value, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeGreaterThan(Date value) { + addCriterion("crate_time >", value, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("crate_time >=", value, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeLessThan(Date value) { + addCriterion("crate_time <", value, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeLessThanOrEqualTo(Date value) { + addCriterion("crate_time <=", value, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeLike(Date value) { + addCriterion("crate_time like", value, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeNotLike(Date value) { + addCriterion("crate_time not like", value, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeIn(List values) { + addCriterion("crate_time in", values, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeNotIn(List values) { + addCriterion("crate_time not in", values, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeBetween(Date value1, Date value2) { + addCriterion("crate_time between", value1, value2, "crateTime"); + return (Criteria) this; + } + + public Criteria andCrateTimeNotBetween(Date value1, Date value2) { + addCriterion("crate_time not between", value1, value2, "crateTime"); + return (Criteria) this; + } + + + public Criteria andTesNameIsNull() { + addCriterion("tes_name is null"); + return (Criteria) this; + } + + public Criteria andTesNameIsNotNull() { + addCriterion("tes_name is not null"); + return (Criteria) this; + } + + public Criteria andTesNameEqualTo(String value) { + addCriterion("tes_name =", value, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameNotEqualTo(String value) { + addCriterion("tes_name <>", value, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameGreaterThan(String value) { + addCriterion("tes_name >", value, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameGreaterThanOrEqualTo(String value) { + addCriterion("tes_name >=", value, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameLessThan(String value) { + addCriterion("tes_name <", value, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameLessThanOrEqualTo(String value) { + addCriterion("tes_name <=", value, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameLike(String value) { + addCriterion("tes_name like", value, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameNotLike(String value) { + addCriterion("tes_name not like", value, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameIn(List values) { + addCriterion("tes_name in", values, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameNotIn(List values) { + addCriterion("tes_name not in", values, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameBetween(String value1, String value2) { + addCriterion("tes_name between", value1, value2, "tesName"); + return (Criteria) this; + } + + public Criteria andTesNameNotBetween(String value1, String value2) { + addCriterion("tes_name not between", value1, value2, "tesName"); + return (Criteria) this; + } + + + public Criteria andLikeQuery(Test record) { + List list= new ArrayList(); + List list2= new ArrayList(); + StringBuffer buffer=new StringBuffer(); + + if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) { + list.add("ifnull(id,'')"); + } + if(record.getName()!=null&&StrUtil.isNotEmpty(record.getName().toString())) { + list.add("ifnull(name,'')"); + } + if(record.getAge()!=null&&StrUtil.isNotEmpty(record.getAge().toString())) { + list.add("ifnull(age,'')"); + } + if(record.getCrateTime()!=null&&StrUtil.isNotEmpty(record.getCrateTime().toString())) { + list.add("ifnull(crate_time,'')"); + } + if(record.getTesName()!=null&&StrUtil.isNotEmpty(record.getTesName().toString())) { + list.add("ifnull(tes_name,'')"); + } + if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) { + list2.add("'%"+record.getId()+"%'"); + } + if(record.getName()!=null&&StrUtil.isNotEmpty(record.getName().toString())) { + list2.add("'%"+record.getName()+"%'"); + } + if(record.getAge()!=null&&StrUtil.isNotEmpty(record.getAge().toString())) { + list2.add("'%"+record.getAge()+"%'"); + } + if(record.getCrateTime()!=null&&StrUtil.isNotEmpty(record.getCrateTime().toString())) { + list2.add("'%"+record.getCrateTime()+"%'"); + } + if(record.getTesName()!=null&&StrUtil.isNotEmpty(record.getTesName().toString())) { + list2.add("'%"+record.getTesName()+"%'"); + } + + buffer.append(" CONCAT("); + buffer.append(StrUtil.join("",list)); + buffer.append(")"); + buffer.append("like CONCAT("); + + + buffer.append(StrUtil.join("",list2)); + + buffer.append(")"); + if(!" CONCAT()like CONCAT()".equals(buffer.toString())) { + addCriterion(buffer.toString()); + } + return (Criteria) this; + } + +} + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/fc/test/model/auto/TsysDatas.java b/src/main/java/com/fc/test/model/auto/TsysDatas.java index 813e3050dccc5c8d21ee1ad0dca3ac84b302342b..cf1d2367ee500cf87cf4b4ed6aba279b288592a8 100644 --- a/src/main/java/com/fc/test/model/auto/TsysDatas.java +++ b/src/main/java/com/fc/test/model/auto/TsysDatas.java @@ -13,15 +13,19 @@ public class TsysDatas implements Serializable { private String fileSuffix; /**Y 项目目录,N盘符目录 **/ private String fileType; - + /** + * 原文件名称. + */ + private String fileOrginName; private static final long serialVersionUID = 1L; - public TsysDatas(String id, String filePath, String fileAbsolutePath, String fileSuffix, String fileType) { + public TsysDatas(String id, String filePath, String fileAbsolutePath, String fileSuffix, String fileType, String fileOrginName) { this.id = id; this.filePath = filePath; this.fileAbsolutePath = fileAbsolutePath; this.fileSuffix = fileSuffix; this.fileType = fileType; + this.fileOrginName = fileOrginName; } public TsysDatas() { @@ -67,4 +71,12 @@ public class TsysDatas implements Serializable { public void setFileType(String fileType) { this.fileType = fileType == null ? null : fileType.trim(); } -} \ No newline at end of file + + public String getFileOrginName() { + return fileOrginName; + } + + public void setFileOrginName(String fileOrginName) { + this.fileOrginName = fileOrginName; + } +} diff --git a/src/main/java/com/fc/test/model/auto/TsysRole.java b/src/main/java/com/fc/test/model/auto/TsysRole.java index 5ec8c484635f87bb14e682a75d6fd6bc1aca95c4..3fc5a1c40f9c85accc3cd686999f543fdb2119e5 100644 --- a/src/main/java/com/fc/test/model/auto/TsysRole.java +++ b/src/main/java/com/fc/test/model/auto/TsysRole.java @@ -7,6 +7,8 @@ public class TsysRole implements Serializable { private String name; + private Integer order; + private static final long serialVersionUID = 1L; public String getId() { @@ -25,14 +27,28 @@ public class TsysRole implements Serializable { this.name = name == null ? null : name.trim(); } - public TsysRole(String id, String name) { + public TsysRole(String id, String name) { + super(); + this.id = id; + this.name = name; + } + + public TsysRole(String id, String name, Integer order) { super(); this.id = id; this.name = name; + this.order = order; } public TsysRole() { super(); } - + + public Integer getOrder() { + return order; + } + + public void setOrder(Integer order) { + this.order = order; + } } \ No newline at end of file diff --git a/src/main/java/com/fc/test/model/auto/TsysUser.java b/src/main/java/com/fc/test/model/auto/TsysUser.java index 1fe95816570834c2ed93ac72aabb94162d1eefdf..2f643deccbda5366404ce0b4defdcfe9668b711b 100644 --- a/src/main/java/com/fc/test/model/auto/TsysUser.java +++ b/src/main/java/com/fc/test/model/auto/TsysUser.java @@ -10,14 +10,21 @@ public class TsysUser implements Serializable { private String password; private String nickname; + /** + * 部门id. + */ + private Integer deptid; + + private String deptName; private static final long serialVersionUID = 1L; - public TsysUser(String id, String username, String password, String nickname) { + public TsysUser(String id, String username, String password, String nickname, Integer deptid) { this.id = id; this.username = username; this.password = password; this.nickname = nickname; + this.deptid = deptid; } public TsysUser() { @@ -55,4 +62,32 @@ public class TsysUser implements Serializable { public void setNickname(String nickname) { this.nickname = nickname == null ? null : nickname.trim(); } + + /** + * @param deptid + */ + public void setDeptid(Integer deptid) { + this.deptid = deptid; + } + + /** + * @return + */ + public Integer getDeptid() { + return deptid; + } + + /** + * @return + */ + public String getDeptName() { + return deptName; + } + + /** + * @param deptName + */ + public void setDeptName(String deptName) { + this.deptName = deptName; + } } \ No newline at end of file diff --git a/src/main/java/com/fc/test/model/auto/TsysUserExample.java b/src/main/java/com/fc/test/model/auto/TsysUserExample.java index 2c7e8ad8f3a55f1502e7f3c84c05f76aa5e7fd7c..6dd3bd8e7dc025255af0828302033f4419af2298 100644 --- a/src/main/java/com/fc/test/model/auto/TsysUserExample.java +++ b/src/main/java/com/fc/test/model/auto/TsysUserExample.java @@ -383,6 +383,11 @@ public class TsysUserExample { addCriterion("nickname not between", value1, value2, "nickname"); return (Criteria) this; } + + public Criteria andDeptidEqualTo(Integer value) { + addCriterion("deptid =", value, "deptid"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/src/main/java/com/fc/test/model/custom/autocode/AutoCodeConfig.java b/src/main/java/com/fc/test/model/custom/autocode/AutoCodeConfig.java index 5f1a9dea4dad4a495ac1f970d901390b418b460b..511e6e18a6240b6483c0c875b6571d2f82d64301 100644 --- a/src/main/java/com/fc/test/model/custom/autocode/AutoCodeConfig.java +++ b/src/main/java/com/fc/test/model/custom/autocode/AutoCodeConfig.java @@ -24,11 +24,27 @@ public class AutoCodeConfig { static { configuration=getConfig(); - - - - globalConfig =new GlobalConfig(null, configuration.getString("parentPack"), configuration.getString("parentPath"),configuration.getBoolean("cover"), - configuration.getBoolean("swagger"),configuration.getString("javaSource"),configuration.getString("resources"),configuration.getString("xmlPath"),configuration.getString("packageBean"),configuration.getString("packageDao"),configuration.getString("packageController"), configuration.getString("packageService"), configuration.getString("tablePrefix"),configuration.getBoolean("autoCode"), configuration.getBoolean("watchMobel"),configuration.getString("author"),configuration.getString("email")); + final String parentPack = configuration.getString("parentPack"); + final String parentPath = configuration.getString("parentPath"); + final Boolean cover = configuration.getBoolean("cover"); + final Boolean swagger = configuration.getBoolean("swagger"); + final String javaSource = configuration.getString("javaSource"); + final String resources = configuration.getString("resources"); + final String xmlPath = configuration.getString("xmlPath"); + final String packageBean = configuration.getString("packageBean"); + final String packageDao = configuration.getString("packageDao"); + final String packageController = configuration.getString("packageController"); + final String packageService = configuration.getString("packageService"); + final String tablePrefix = configuration.getString("tablePrefix"); + final Boolean autoCode = configuration.getBoolean("autoCode"); + final Boolean watchMobel = configuration.getBoolean("watchMobel"); + final String author = configuration.getString("author"); + final String email = configuration.getString("email"); + globalConfig =new GlobalConfig(null, parentPack, parentPath,cover, + swagger,javaSource,resources,xmlPath, + packageBean,packageDao,packageController, + packageService,tablePrefix,autoCode, + watchMobel,author,email); } public AutoCodeConfig() { super(); @@ -41,7 +57,10 @@ public class AutoCodeConfig { */ public static Configuration getConfig() { try { - return new PropertiesConfiguration("auto_code/auto_code_config.properties" ); + final PropertiesConfiguration proCfing = new PropertiesConfiguration(); + proCfing.setEncoding("UTF-8"); + proCfing.load("auto_code/auto_code_config.properties"); + return proCfing; } catch (ConfigurationException e) { System.out.println("获取配置文件失败"); e.printStackTrace(); diff --git a/src/main/java/com/fc/test/service/SysDatasService.java b/src/main/java/com/fc/test/service/SysDatasService.java index eef6c61ec28602174de32c40d58e7fb9eb2f3aef..8eff68e50c5248f17ba0bbe4e8f13c0d7a77170f 100644 --- a/src/main/java/com/fc/test/service/SysDatasService.java +++ b/src/main/java/com/fc/test/service/SysDatasService.java @@ -80,9 +80,14 @@ public class SysDatasService implements BaseService //filesURL=V2Config.getIsroot_dir()+files; } - String fileName=file.getOriginalFilename(); + final String fileName=file.getOriginalFilename(); // 获得文件后缀名称 - String suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase(); + final int index = fileName.lastIndexOf("."); + String suffixName = null; + if (index > 0) { + suffixName = fileName.substring(index).toLowerCase(); + } +// String suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase(); if(StringUtils.isEmpty(suffixName)) { //如果没有后缀默认后缀 suffixName=FileUploadUtils.IMAGE_JPG_EXTENSION; @@ -94,6 +99,7 @@ public class SysDatasService implements BaseService record.setFilePath(relative_filesURL); record.setFileAbsolutePath(absolute_filesURL); record.setFileSuffix(suffixName); + record.setFileOrginName(fileName); //上传路径类型 record.setFileType(V2Config.getIsstatic()); if(tsysDatasMapper.insertSelective(record)>0) diff --git a/src/main/java/com/fc/test/service/SysDepartmentService.java b/src/main/java/com/fc/test/service/SysDepartmentService.java index a26699d3acb031429650508065509408883c0c5c..b282530a0c593d19d0c5086db6bbfa4e203069c7 100644 --- a/src/main/java/com/fc/test/service/SysDepartmentService.java +++ b/src/main/java/com/fc/test/service/SysDepartmentService.java @@ -17,6 +17,8 @@ import com.fc.test.model.custom.BootstrapTree; import com.fc.test.model.custom.Tablepar; import com.fc.test.util.StringUtils; +import javax.annotation.Resource; + /** * 部门表 SysDepartmentService * @@ -28,14 +30,14 @@ import com.fc.test.util.StringUtils; **/ @Service public class SysDepartmentService implements BaseService { - @Autowired + @Resource private SysDepartmentMapper sysDepartmentMapper; /** * 分页查询 * - * @param pageNum - * @param pageSize + * @param tablepar + * @param name * @return */ public PageInfo list(Tablepar tablepar, String name) { @@ -187,10 +189,22 @@ public class SysDepartmentService implements BaseService getall(){ - SysDepartmentExample example = new SysDepartmentExample(); + final SysDepartmentExample example = new SysDepartmentExample(); example.setOrderByClause("order_num asc"); return sysDepartmentMapper.selectByExample(example); } + + /** + * 获取 + * @return + */ + public List getDeptsWithoutRoot() { + final SysDepartmentExample example = new SysDepartmentExample(); + example.createCriteria().andParentIdNotEqualTo("0"); + example.setOrderByClause("order_num asc"); + final List result = sysDepartmentMapper.selectByExample(example); + return result; + } } diff --git a/src/main/java/com/fc/test/service/SysUserService.java b/src/main/java/com/fc/test/service/SysUserService.java index 9a6efbc29a3b83fb8bafbe551e6d28fe132c5578..d04670768baa661edfff4a0ac2437b6c0ceb6af3 100644 --- a/src/main/java/com/fc/test/service/SysUserService.java +++ b/src/main/java/com/fc/test/service/SysUserService.java @@ -25,6 +25,8 @@ import com.fc.test.util.StringUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import javax.annotation.Resource; + /** * 系统用户 * @ClassName: SysUserService @@ -35,30 +37,32 @@ import com.github.pagehelper.PageInfo; @Service public class SysUserService implements BaseService{ //生成的用户dao - @Autowired + @Resource private TsysUserMapper tsysUserMapper; //生成的角色用户dao - @Autowired + @Resource private TSysRoleUserMapper tSysRoleUserMapper; //自定义角色dao - @Autowired + @Resource private RoleDao roleDao; //自动生成的角色dao - @Autowired + @Resource private TsysRoleMapper tsysRoleMapper; - + + + /** * 分页查询 - * @param pageNum - * @param pageSize + * @param tablepar + * @param username * @return */ public PageInfo list(Tablepar tablepar,String username){ TsysUserExample testExample=new TsysUserExample(); - testExample.setOrderByClause("id+0 DESC"); + testExample.setOrderByClause("a.id+0 DESC"); if(username!=null&&!"".equals(username)){ testExample.createCriteria().andUsernameLike("%"+username+"%"); } @@ -157,7 +161,21 @@ public class SysUserService implements BaseService{ return tsysUserMapper.deleteByExample(example); } - + + /** + * 根据部门id获取用户信息. + * @param deptid + * @return + */ + public List getUserlistByDeptid(Integer deptid) { + final TsysUserExample example = new TsysUserExample(); + if(null != deptid) { + example.createCriteria().andDeptidEqualTo(deptid); + } + final List list = tsysUserMapper.selectByExample(example); + return list; + } + /** * 检查用户name * @param tsysUser diff --git a/src/main/java/com/fc/test/service/TestService.java b/src/main/java/com/fc/test/service/TestService.java new file mode 100644 index 0000000000000000000000000000000000000000..dc93cfd7950d9f2e6ce47bdedf6f0ee45bf6075a --- /dev/null +++ b/src/main/java/com/fc/test/service/TestService.java @@ -0,0 +1,138 @@ +package com.fc.test.service; + +import java.util.List; +import java.util.Arrays; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import cn.hutool.core.util.StrUtil; +import com.fc.test.common.base.BaseService; +import com.fc.test.common.support.ConvertUtil; +import com.fc.test.mapper.auto.TestMapper; +import com.fc.test.model.auto.Test; +import com.fc.test.model.auto.TestExample; +import com.fc.test.model.custom.Tablepar; +import com.fc.test.util.SnowflakeIdWorker; +import com.fc.test.util.StringUtils; + +/** + * 测试表 TestService + * @Title: TestService.java  + * @Package com.fc.test.service  + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-03 13:09:35   + **/ +@Service +public class TestService implements BaseService{ + @Autowired + private TestMapper testMapper; + + + /** + * 分页查询 + * @param pageNum + * @param pageSize + * @return + */ + public PageInfo list(Tablepar tablepar,Test record){ + TestExample testExample=new TestExample(); + testExample.createCriteria().andLikeQuery(record); + testExample.setOrderByClause("id ASC"); + if(StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) +" "+tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list= testMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + + @Override + public int deleteByPrimaryKey(String ids) { + + List lista=ConvertUtil.toListStrArray(ids); + TestExample example=new TestExample(); + example.createCriteria().andIdIn(lista); + return testMapper.deleteByExample(example); + + + } + + + @Override + public Test selectByPrimaryKey(String id) { + + return testMapper.selectByPrimaryKey(id); + + } + + + @Override + public int updateByPrimaryKeySelective(Test record) { + return testMapper.updateByPrimaryKeySelective(record); + } + + + /** + * 添加 + */ + @Override + public int insertSelective(Test record) { + + //添加雪花主键id + record.setId(SnowflakeIdWorker.getUUID()); + + + return testMapper.insertSelective(record); + } + + + @Override + public int updateByExampleSelective(Test record, TestExample example) { + + return testMapper.updateByExampleSelective(record, example); + } + + + @Override + public int updateByExample(Test record, TestExample example) { + + return testMapper.updateByExample(record, example); + } + + @Override + public List selectByExample(TestExample example) { + + return testMapper.selectByExample(example); + } + + + @Override + public long countByExample(TestExample example) { + + return testMapper.countByExample(example); + } + + + @Override + public int deleteByExample(TestExample example) { + + return testMapper.deleteByExample(example); + } + + /** + * 检查name + * @param test + * @return + */ + public int checkNameUnique(Test test){ + TestExample example=new TestExample(); + example.createCriteria().andNameEqualTo(test.getName()); + List list=testMapper.selectByExample(example); + return list.size(); + } + + +} diff --git a/src/main/java/com/zsess/taskmanage/controller/ControlindexController.java b/src/main/java/com/zsess/taskmanage/controller/ControlindexController.java new file mode 100644 index 0000000000000000000000000000000000000000..9a320fd193e571f24f5c30ffdeacacd63a962d5e --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/controller/ControlindexController.java @@ -0,0 +1,66 @@ +package com.zsess.taskmanage.controller; + +import com.fc.test.model.auto.TsysUser; +import com.fc.test.shiro.util.ShiroUtils; +import com.zsess.taskmanage.model.DeptTaskInfo; +import com.zsess.taskmanage.service.DeptTaskInfoService; +import io.swagger.annotations.Api; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.*; + +@Api(value = "控制面板控制器") +@Controller +@RequestMapping("/control") +public class ControlindexController { + private static Logger logger= LoggerFactory.getLogger(ControlindexController.class); + @Resource + private DeptTaskInfoService deptTaskInfoService; + + //显示任务统计模块数据 + @RequestMapping("/counttasknum") + @ResponseBody + public Object getCompleteTasknum(HttpServletResponse response) throws IOException { + final List taskCompList = this.deptTaskInfoService.getDeptTaskCompleteNum(); + return taskCompList; + } + + //显示本周的每天的记录 + @RequestMapping("/countweeklogin") + @ResponseBody + public Object getDaynumForWeek(HttpServletResponse response) throws IOException{ + Integer []r=new Integer[7]; +// Calendar calendar=Calendar.getInstance(); +// setToFirstDay(calendar); + for (int i = 0; i < 7; i++) { +// SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); +// r[i]=userLogRecordDao.countlog(sdf.format(calendar.getTime())); +// calendar.add(Calendar.DATE, 1); + r[i]= i*2; + } + return r; + } + + //日历的数据显示 + @RequestMapping("/littlecalendar") + @ResponseBody + public Object getlittlecalendar(HttpSession session, HttpServletResponse response) throws IOException { + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); + final TsysUser user = ShiroUtils.getUser(); + final String str_userid = user.getId(); + long userid=Long.valueOf(str_userid); + final List list=new ArrayList<>(); + list.add(sdf.format(new Date())); + return list; + } + +} diff --git a/src/main/java/com/zsess/taskmanage/controller/TaskManageComControl.java b/src/main/java/com/zsess/taskmanage/controller/TaskManageComControl.java new file mode 100644 index 0000000000000000000000000000000000000000..23da2faf672dc2dd29087efe7b3025a1b313a857 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/controller/TaskManageComControl.java @@ -0,0 +1,52 @@ +package com.zsess.taskmanage.controller; + +import com.zsess.taskmanage.model.common.CommonIdNameBo; +import com.zsess.taskmanage.service.TaskManageComService; +import io.swagger.annotations.Api; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Api(value = "控制面板控制器") +@Controller +@RequestMapping("/taskManageComControl") +public class TaskManageComControl { + + private static Logger logger = LoggerFactory.getLogger(TaskManageComControl.class); + + @Resource(name = "taskManageComService") + private TaskManageComService comService; + /** + * 获取任务状态数据post 接口. + */ + @PostMapping("/getTaskComIdNameMap") + @ResponseBody + public Map getTaskComIdNameMap(ModelMap modelMap) + { + + final Map idNameMap = new HashMap(); + final List taskStatusList = this.comService.getTaskStatusList(); + final Map statusMap = new HashMap(); + for(CommonIdNameBo bo : taskStatusList) { + statusMap.put(bo.getId(),bo.getName()); + } + idNameMap.put("statusMap",statusMap); + final List taskFreqList = this.comService.getTaskFreqList(); + final Map taskFreqMap = new HashMap(); + for(CommonIdNameBo bo : taskFreqList) { + taskFreqMap.put(bo.getId(),bo.getName()); + } + idNameMap.put("taskFreqMap",taskFreqMap); + return idNameMap; + } + +} diff --git a/src/main/java/com/zsess/taskmanage/controller/TaskfileInfoController.java b/src/main/java/com/zsess/taskmanage/controller/TaskfileInfoController.java new file mode 100644 index 0000000000000000000000000000000000000000..fa940e9c4c57d6d03cc3426564bfe9ace42ed861 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/controller/TaskfileInfoController.java @@ -0,0 +1,302 @@ +package com.zsess.taskmanage.controller; + +import com.fc.test.common.base.BaseController; +import com.fc.test.common.domain.AjaxResult; +import com.fc.test.model.auto.TsysDatas; +import com.fc.test.model.auto.TsysFile; +import com.fc.test.model.custom.TableSplitResult; +import com.fc.test.model.custom.Tablepar; +import com.fc.test.model.custom.TitleVo; +import com.fc.test.util.StringUtils; +import com.zsess.taskmanage.model.TaskfileInfo; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.github.pagehelper.PageInfo; +import com.zsess.taskmanage.service.TaskfileInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +import javax.annotation.Resource; +import java.util.List; + +@Api(value = "任务管理附件信息表") +@Controller +@RequestMapping("/TaskfileInfoController") +public class TaskfileInfoController extends BaseController { + private static Logger logger = LoggerFactory.getLogger(TaskfileInfoController.class); + private String prefix = "taskmanage/taskfileInfo"; + @Resource + private TaskfileInfoService taskfileInfoService; + + /** + * 分页跳转 + */ + @ApiOperation(value = "分页跳转", notes = "分页跳转") + @GetMapping("/view") + @RequiresPermissions("gen:taskfileInfo:view") + public String view(ModelMap model) + { + String str="任务管理附件信息表"; + setTitle(model, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false)); + return prefix + "/list"; + } + + /** + * 分页查询 + */ + //@Log(title = "任务管理附件信息表集合查询", action = "111") + @ApiOperation(value = "分页查询", notes = "分页查询") + @PostMapping("/list") + @RequiresPermissions("gen:taskfileInfo:list") + @ResponseBody + public Object list(Tablepar tablepar, TaskfileInfo record){ + PageInfo page=taskfileInfoService.list(tablepar,record) ; + TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + } + + /** + * 新增跳转 + */ + @ApiOperation(value = "新增跳转", notes = "新增跳转") + @GetMapping("/add") + public String add(ModelMap modelMap) + { + return prefix + "/add"; + } + + /** + * 新增 + */ + @ApiOperation(value = "新增", notes = "新增") + @PostMapping("/add") +// @RequiresPermissions("gen:taskfileInfo:add") + @ResponseBody + public AjaxResult add(TaskfileInfo taskfileInfo){ + int b=taskfileInfoService.insertSelective(taskfileInfo); + if(b>0){ + return success(); + }else{ + return error(); + } + } + + /** + * 删除 + * @param ids + * @return + */ + //@Log(title = "任务管理附件信息表删除", action = "111") + @ApiOperation(value = "删除", notes = "删除") + @PostMapping("/remove") + @RequiresPermissions("gen:taskfileInfo:remove") + @ResponseBody + public AjaxResult remove(String ids){ + + int b=taskfileInfoService.deleteByPrimaryKey(ids); + if(b>0){ + return success(); + }else{ + return error(); + } + } + + /** + * 检查Name + * @param taskfileInfo + * @return + */ + @ApiOperation(value = "检查Name唯一", notes = "检查Name唯一") + @PostMapping("/checkNameUnique") + @ResponseBody + public int checkNameUnique(TaskfileInfo taskfileInfo){ + int b=taskfileInfoService.checkNameUnique(taskfileInfo); + if(b>0){ + return 1; + }else{ + return 0; + } + } + + + /** + * 修改跳转 + * @param id + * @param mmap + * @return + */ + @ApiOperation(value = "修改跳转", notes = "修改跳转") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") String id, ModelMap mmap) + { + mmap.put("TaskfileInfo", taskfileInfoService.selectByPrimaryKey(id)); + + return prefix + "/edit"; + } + + /** + * 修改保存 + */ + //@Log(title = "任务管理附件信息表修改", action = "111") + @ApiOperation(value = "修改保存", notes = "修改保存") + @RequiresPermissions("gen:taskfileInfo:edit") + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(TaskfileInfo record) + { + return toAjax(taskfileInfoService.updateByPrimaryKeySelective(record)); + } + + + /** + * 根据主键查询 + * + * @param id + * @return + */ + @ApiOperation(value = "根据id查询唯一", notes = "根据id查询唯一") + @PostMapping("/get/{id}") + public TaskfileInfo edit(@PathVariable("id") String id) { + return taskfileInfoService.selectByPrimaryKey(id); + } + + /** + * 文件列表 + * @param tablepar + * @param selfSearch 搜索字符 + * @return + */ + @ApiOperation(value = "分页查询", notes = "分页查询") + @PostMapping("/taskFilelist") +// @RequiresPermissions("system:file:list") + @ResponseBody + public Object taskFilelist(Tablepar tablepar,String selfSearch){ + final String taskid = selfSearch; + final PageInfo page=taskfileInfoService.getPageListByTaskid(tablepar,taskid) ; + final TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + + } + + /** + * 文件列表 + * @param tablepar + * @param selfSearch 搜索字符 + * @return + */ + @ApiOperation(value = "分页查询", notes = "分页查询") + @PostMapping("/taskPorcessFilelist") +// @RequiresPermissions("system:file:list") + @ResponseBody + public Object taskPorcessFilelist(Tablepar tablepar,String selfSearch){ + final String taskid = selfSearch; + final PageInfo page=taskfileInfoService.getPageListOftaskProcessFileByTaskid(tablepar,taskid) ; + final TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + + } + + /** + * 新增附件跳转 + * @param taskid + * @param mmap + * @return + */ + @GetMapping("/addfile/{taskid}/{filetype}") + public String addfile(@PathVariable("taskid") String taskid, @PathVariable("filetype") Integer filetype, ModelMap mmap) + { + mmap.put("taskid", taskid); + mmap.put("filetype", filetype); +// mmap.put("TaskfileInfo", taskfileInfoService.selectByPrimaryKey(id)); + + return prefix + "/addfile"; + } + + /** + * 文件添加 + * @param taskfileInfo + * @param dataId + * @return + */ + //@Log(title = "文件添加", action = "1") + @ApiOperation(value = "文件添加", notes = "文件添加") + @PostMapping("/addfile") +// @RequiresPermissions("system:file:add") + @ResponseBody + public AjaxResult addfile(TaskfileInfo taskfileInfo,String dataId){ + if(StringUtils.isNotEmpty(dataId)) { +// taskfileInfo.setFiletype(0); + int b=taskfileInfoService.insertSelective(taskfileInfo, dataId); + if(b>0){ + return success(); + }else{ + return error("请上传文件"); + } + } + return error("请上传文件"); + } + /** + * 任務執行過程文件添加 + * @param taskfileInfo + * @param dataId + * @return + */ + //@Log(title = "文件添加", action = "1") + @ApiOperation(value = "文件添加", notes = "文件添加") + @PostMapping("/addtaskProcessFile") +// @RequiresPermissions("system:file:add") + @ResponseBody + public AjaxResult addtaskProcessFile(TaskfileInfo taskfileInfo,String dataId){ + if(StringUtils.isNotEmpty(dataId)) { + taskfileInfo.setFiletype(1); + int b=taskfileInfoService.insertSelective(taskfileInfo, dataId); + if(b>0){ + return success(); + }else{ + return error("请上传文件"); + } + } + return error("请上传文件"); + } + /** + * 展示文件跳转页面 + */ + @ApiOperation(value = "展示文件跳转页面", notes = "展示文件跳转页面") + @GetMapping("/viewfile/{id}") + public String viewfile(@PathVariable("id") String id,ModelMap mmap){ + final List sysdatas = taskfileInfoService.queryTsysDataByTaskfileID(id); + mmap.put("tsysDatas",sysdatas); + return prefix + "/viewfile"; + } + + /** + * 展示文件跳转页面 + */ + @ApiOperation(value = "展示文件跳转页面", notes = "展示文件跳转页面") + @GetMapping("/viewAllfile/{taskid}") + public String viewAllfile(@PathVariable("taskid") String id,ModelMap mmap){ + final List sysdatas = taskfileInfoService.getTaskFileByTaskidAndFiletype(id,0); + mmap.put("tsysDatas",sysdatas); + return prefix + "/viewfile"; + } + + /** + * 展示文件跳转页面 + */ + @ApiOperation(value = "展示文件跳转页面", notes = "展示文件跳转页面") + @GetMapping("/viewAllProcessfile/{taskid}") + public String viewAllProcessfile(@PathVariable("taskid") String id,ModelMap mmap){ + final List sysdatas = taskfileInfoService.getTaskFileByTaskidAndFiletype(id,1); + mmap.put("tsysDatas",sysdatas); + return prefix + "/viewfile"; + } +} diff --git a/src/main/java/com/zsess/taskmanage/controller/TaskinfoController.java b/src/main/java/com/zsess/taskmanage/controller/TaskinfoController.java new file mode 100644 index 0000000000000000000000000000000000000000..2c36d79b3c585f0b2ec8957c07e0c79f329bce2f --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/controller/TaskinfoController.java @@ -0,0 +1,499 @@ +package com.zsess.taskmanage.controller; + +import com.fc.test.common.base.BaseController; +import com.fc.test.common.domain.AjaxResult; +import com.fc.test.common.support.ConvertUtil; +import com.fc.test.mapper.custom.RoleDao; +import com.fc.test.model.auto.SysDepartment; +import com.fc.test.model.auto.TsysRole; +import com.fc.test.model.auto.TsysUser; +import com.fc.test.model.custom.TableSplitResult; +import com.fc.test.model.custom.Tablepar; +import com.fc.test.model.custom.TitleVo; +import com.fc.test.shiro.util.ShiroUtils; +import com.github.pagehelper.util.StringUtil; +import com.zsess.taskmanage.model.TaskStatus; +import com.zsess.taskmanage.model.common.CommonIdNameBo; +import com.zsess.taskmanage.service.TaskManageComService; +import com.zsess.taskmanage.service.TaskfileInfoService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; +import com.github.pagehelper.PageInfo; +import com.zsess.taskmanage.model.Taskinfo; +import com.zsess.taskmanage.service.TaskinfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +@Api(value = "任务信息主表") +@Controller +@RequestMapping("/TaskinfoController") +public class TaskinfoController extends BaseController { + + private static Logger logger = LoggerFactory.getLogger(TaskinfoController.class); + + private String prefix = "taskmanage/taskinfo"; + @Resource + private RoleDao roleDao ; + @Resource + private TaskinfoService taskinfoService; + @Resource(name = "taskManageComService") + private TaskManageComService comService; + @Resource + private TaskfileInfoService taskfileInfoService; + /** + * 将前台传递过来的日期格式的字符串,自动转化为Date类型,因为通用类的日期格式包含时分秒,这里需要重写 + */ +// @InitBinder +// public void initBinder(WebDataBinder binder) throws Exception { +// // 注册自定义的属性编辑器 +// DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); +// df.setLenient(false); +// CustomDateEditor dateEditor = new CustomDateEditor(df, true); +// // 表示如果命令对象有Date类型的属性,将使用该属性编辑器进行类型转换 +// binder.registerCustomEditor(Date.class, dateEditor); +// } + + /** + * 任务发起人分页跳转 + */ + @ApiOperation(value = "分页跳转", notes = "分页跳转") + @GetMapping("/taskListForAddView") + @RequiresPermissions("gen:taskinfo:taskListForAddView") + public String taskListForAddView(ModelMap modelMap) + { + String str="执法任务发起"; + this.setTaskListViewCommonInfo(modelMap, str); + return prefix + "/list"; + } + + /** + * 分页查询 + */ + //@Log(title = "任务信息主表集合查询", action = "list") + @ApiOperation(value = "分页查询", notes = "分页查询") + @PostMapping("/list") +// @RequiresPermissions("gen:taskinfo:list") + @ResponseBody + public Object list(Tablepar tablepar, Taskinfo record){ + final PageInfo page=taskinfoService.listForAddTask(tablepar,record) ; + final TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + } + + /** + * 浏览查询分页查询 + */ + @ApiOperation(value = "分页查询", notes = "分页查询") + @PostMapping("/listForView") +// @RequiresPermissions("gen:taskinfo:list") + @ResponseBody + public Object listForView(Tablepar tablepar, Taskinfo record){ + final PageInfo page=taskinfoService.listForView(tablepar,record) ; + final TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + } + + /** + * 任务审批列表分页查询 + */ + @ApiOperation(value = "分页查询", notes = "分页查询") + @PostMapping("/listForLeader") +// @RequiresPermissions("gen:taskinfo:list") + @ResponseBody + public Object listForAuditLeader(Tablepar tablepar, Taskinfo record){ + final PageInfo page=taskinfoService.listForAudiLeader(tablepar,record) ; + final TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + } + + + /** + * 任务审批管理跳转 + */ + @ApiOperation(value = "分页跳转", notes = "分页跳转") + @GetMapping("/tasklistLearderView") +// @RequiresPermissions("gen:taskinfo:tasklistLearderView") + public String tasklistLearderView(ModelMap modelMap) + { + String str="执法任务审批"; + this.setTaskListViewCommonInfo(modelMap, str); + final Taskinfo taskinfo = new Taskinfo(); + modelMap.put("Taskinfo", taskinfo); + return prefix + "/tasklistForLeader"; + } + + /** + * 个人代办任务列表跳转 + */ + @ApiOperation(value = "个人代办任务列表跳转", notes = "个人代办任务列表跳转") + @GetMapping("/tasklistforPerson") +// @RequiresPermissions("gen:taskinfo:tasklistLearderView") + public String tasklistforPerson(ModelMap modelMap) + { + String pageUrl = ""; + final TsysUser user = ShiroUtils.getUser(); + final String uid= user.getId(); + boolean isLeader = false; + final List tsysRoles= roleDao.queryUserRole(uid); + final StringBuffer roleNamestr = new StringBuffer(); + for(TsysRole role : tsysRoles) { + final String rolename = role.getName(); + roleNamestr.append(",").append(rolename); + } + final Taskinfo taskinfo = new Taskinfo(); + if(roleNamestr.indexOf(",任务管理员")>=0) { + pageUrl = this.taskListForAddView(modelMap); + modelMap.put("Taskinfo", taskinfo); + } else if (roleNamestr.indexOf(",科室负责人") > 0) { + pageUrl = this.taskProcessForLearderView(modelMap); + modelMap.put("Taskinfo", taskinfo); + } else if (roleNamestr.indexOf(",执法科普通人员") > 0) { + pageUrl = this.taskProcessListForExecutorView(modelMap); + modelMap.put("Taskinfo", taskinfo); + } else { + pageUrl = this.tasklistForView(modelMap, user.getDeptid().toString(),"2,4,5,8",""); + } + + return pageUrl; + } + + /** + * 执法科待处理任务列表 + */ + @ApiOperation(value = "分页跳转", notes = "分页跳转") + @GetMapping("/tasklistForView/{deptid}/{statusstr}/{deptname}") +// @RequiresPermissions("gen:taskinfo:tasklistLearderView") + public String tasklistForView(ModelMap modelMap, + @PathVariable("deptid")String deptid, @PathVariable("statusstr")String statusstr, + @PathVariable("deptname")String deptname) + { + String str= deptname + "代办任务列表查看"; + this.setTaskListViewCommonInfo(modelMap, str); + final Taskinfo taskinfoCon = new Taskinfo(); + if (StringUtil.isNotEmpty(deptid)) { + taskinfoCon.setReciveDeptid(Integer.valueOf(deptid)); + } + taskinfoCon.setStatusstr(statusstr); + modelMap.put("Taskinfo", taskinfoCon); + return prefix + "/listForView"; + } + /** + * 执法监督科待处理任务列表 + */ + @ApiOperation(value = "分页跳转", notes = "分页跳转") + @GetMapping("/taskAddlistForView/{deptid}/{statusstr}/{deptname}") +// @RequiresPermissions("gen:taskinfo:tasklistLearderView") + public String taskAddlistForView(ModelMap modelMap, + @PathVariable("deptid")String deptid, @PathVariable("statusstr")String statusstr, + @PathVariable("deptname")String deptname) + { + String str= deptname + "代办任务列表查看"; + this.setTaskListViewCommonInfo(modelMap, str); + final Taskinfo taskinfoCon = new Taskinfo(); + if (StringUtil.isNotEmpty(deptid)) { + taskinfoCon.setDeptid(Integer.valueOf(deptid)); + } + taskinfoCon.setStatusstr(statusstr); + modelMap.put("Taskinfo", taskinfoCon); + return prefix + "/listForView"; + } + + /** + * 部门负责人角色任务处理信息跳转 + */ + @ApiOperation(value = "任务处理信息分页跳转", notes = "任务处理信息分页跳转") + @GetMapping("/taskProcessForLearderView") +// @RequiresPermissions("gen:taskinfo:taskProcessForLearderView") + public String taskProcessForLearderView(ModelMap modelMap) + { + String str="任务信息处理"; + this.setTaskListViewCommonInfo(modelMap, str); + return prefix + "/taskProcessListForLeader"; + } + + /** + * 执行人员角色任务处理信息跳转 + */ + @ApiOperation(value = "执行人员角色任务处理信息分页跳转", notes = "执行人员角色任务处理信息分页跳转") + @GetMapping("/taskProcessListForExecutorView") +// @RequiresPermissions("gen:taskinfo:taskProcessListForExecutorView") + public String taskProcessListForExecutorView(ModelMap modelMap) + { + String str="任务信息处理"; + this.setTaskListViewCommonInfo(modelMap, str); + return prefix + "/taskProcessListForExecutor"; + } + + /** + * 设置通用任务列表信息数据 + * @param modelMap + * @param title + */ + private void setTaskListViewCommonInfo(ModelMap modelMap, String title) { + setTitle(modelMap, new TitleVo("列表", title + "管理", true, "欢迎进入" + title + "页面", true, false)); + final List taskStatusList = this.comService.getTaskStatusList(); + modelMap.addAttribute("taskStatusList", taskStatusList); + final List deptList = sysDepartmentService.getDeptsWithoutRoot(); + modelMap.put("deptList", deptList); + final List taskFreqList = this.comService.getTaskFreqList(); + Taskinfo taskinfo = new Taskinfo(); + modelMap.put("Taskinfo", taskinfo); + modelMap.addAttribute("taskFreqList", taskFreqList); + } + + @ApiOperation(value = "任务处理分页查询", notes = "分页查询") + @PostMapping("/taskProcesslist") + @ResponseBody + public Object taskProcesslist(Tablepar tablepar, Taskinfo record){ + final PageInfo page=taskinfoService.taskProcesslist(tablepar,record) ; + final TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + } + + @ApiOperation(value = "任务处理分页查询", notes = "分页查询") + @PostMapping("/tasklistProcessForExecutor") +// @RequiresPermissions("gen:taskinfo:list") + @ResponseBody + public Object taskProcesslistForExecutor(Tablepar tablepar, Taskinfo record){ + final PageInfo page=taskinfoService.taskProcesslistForExecutor(tablepar,record) ; + final TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + } + + /** + * 新增跳转 + */ + @ApiOperation(value = "新增跳转", notes = "新增跳转") + @GetMapping("/add") + public String add(ModelMap modelMap) + { + final List taskStatusList = this.comService.getTaskStatusList(); + modelMap.addAttribute("taskStatusList",taskStatusList); + final List deptList = sysDepartmentService.getDeptsWithoutRoot(); + modelMap.put("deptList", deptList); + final List taskFreqList = this.comService.getTaskFreqList(); + modelMap.addAttribute("taskFreqList",taskFreqList); + return prefix + "/addnewTask"; + } + /** + * 新增跳转 + */ + @ApiOperation(value = "新增跳转", notes = "新增跳转") + @GetMapping("/addnewTaskForLeader") + public String addnewTaskForLeader(ModelMap modelMap) + { + final List taskStatusList = this.comService.getTaskStatusList(); + modelMap.addAttribute("taskStatusList",taskStatusList); + final List deptList = sysDepartmentService.getDeptsWithoutRoot(); + modelMap.put("deptList", deptList); + final List taskFreqList = this.comService.getTaskFreqList(); + modelMap.addAttribute("taskFreqList",taskFreqList); + return prefix + "/addnewTaskForLeader"; + } + /** + * 新增 + */ + //@Log(title = "任务信息主表新增", action = "111") + @ApiOperation(value = "新增", notes = "新增") + @PostMapping("/add") + @RequiresPermissions("gen:taskinfo:add") + @ResponseBody + public AjaxResult add(Taskinfo taskinfo){ + int b=taskinfoService.insertSelective(taskinfo); + if(b>0){ + return success(); + }else{ + return error(); + } + } + + /** + * 删除 + * @param ids + * @return + */ + //@Log(title = "任务信息主表删除", action = "111") + @ApiOperation(value = "删除", notes = "删除") + @PostMapping("/remove") + @RequiresPermissions("gen:taskinfo:remove") + @ResponseBody + public AjaxResult remove(String ids){ + int b=taskinfoService.deleteByPrimaryKey(ids); + if(b>0){ + return success(); + }else{ + return error(); + } + } + + /** + * 检查Name + * @param taskinfo + * @return + */ + @ApiOperation(value = "检查Name唯一", notes = "检查Name唯一") + @PostMapping("/checkNameUnique") + @ResponseBody + public int checkNameUnique(Taskinfo taskinfo){ + int b=taskinfoService.checkNameUnique(taskinfo); + if(b>0){ + return 1; + }else{ + return 0; + } + } + + + /** + * 修改跳转 + * @param id + * @param modelMap + * @return . + */ + @ApiOperation(value = "修改跳转", notes = "修改跳转") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") String id, ModelMap modelMap) + { + final List taskStatusList = this.comService.getTaskStatusList(); + modelMap.addAttribute("taskStatusList",taskStatusList); + final List deptList = sysDepartmentService.getDeptsWithoutRoot(); + modelMap.put("deptList", deptList); + modelMap.put("Taskinfo", taskinfoService.selectByPrimaryKey(id)); + final List taskFreqList = this.comService.getTaskFreqList(); + modelMap.addAttribute("taskFreqList",taskFreqList); + return prefix + "/edit"; + } + + /** + * 修改保存 + */ + //@Log(title = "任务信息主表修改", action = "111") + @ApiOperation(value = "修改保存", notes = "修改保存") + @RequiresPermissions("gen:taskinfo:edit") + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(Taskinfo record) + { + return toAjax(taskinfoService.updateByPrimaryKeySelective(record)); + } + + + /** + * 根据主键查询 + * + * @param id + * @return . + */ + @ApiOperation(value = "根据id查询唯一", notes = "根据id查询唯一") + @PostMapping("/get/{id}") + public Taskinfo edit(@PathVariable("id") String id) { + return taskinfoService.selectByPrimaryKey(id); + } + + /** + * 批量审核 + * @param ids + * @return + */ + @ApiOperation(value = "删除", notes = "删除") + @PostMapping("/batchAuditTaskstatus") +// @RequiresPermissions("gen:taskinfo:remove") + @ResponseBody + public AjaxResult batchAuditTaskstatus(String ids, Integer zt){ + logger.info("进入批量任务下达审批方法:batchAuditTaskstatus(" + ids + ")"); + final List idList= ConvertUtil.toListStrArray(ids); + int result =taskinfoService.updateStatusByids(zt, idList); + if(result>0){ + return success(); + }else{ + return error(); + } + } + /** + * 新增任务 + */ + @ApiOperation(value = "新增任务", notes = "新增任务") + @PostMapping("/addNewTask") + @ResponseBody + public AjaxResult addNewTask(Taskinfo taskinfo){ + taskinfo.setStatusid(TaskStatus.ADD.getIndex()); + int b=taskinfoService.insertSelective(taskinfo); + if(b>0){ + return success(); + }else{ + return error(); + } + } + /** + * 新增任务 + */ + @ApiOperation(value = "新增任务", notes = "新增任务") + @PostMapping("/addNewTaskForLeader") + @ResponseBody + public AjaxResult addNewTaskForLeader(Taskinfo taskinfo){ + taskinfo.setStatusid(TaskStatus.ASSIGN.getIndex()); + int b=taskinfoService.insertSelective(taskinfo); + if(b>0){ + return success(); + }else{ + return error(); + } + } + + /** + * 修改跳转 + * @param id + * @param modelMap + * @return . + */ + @ApiOperation(value = "任務分配到執行人跳转", notes = "任務分配到執行人跳转") + @GetMapping("/assginToExecutorPage/{id}") + public String assginToExecutorPage(@PathVariable("id") String id, ModelMap modelMap) + { + + final List taskStatusList = this.comService.getTaskStatusList(); + modelMap.addAttribute("taskStatusList",taskStatusList); + + final List taskFreqList = this.comService.getTaskFreqList(); + modelMap.addAttribute("taskFreqList",taskFreqList); + + final List deptList = sysDepartmentService.getDeptsWithoutRoot(); + modelMap.put("deptList", deptList); + + final Taskinfo taskInfo = taskinfoService.selectByPrimaryKey(id); + modelMap.put("Taskinfo", taskInfo); + +// final List sysdatas = taskfileInfoService.queryTsysDataByTaskid(id); +// modelMap.put("tsysDatas",sysdatas); + + final Integer deptid = taskInfo.getReciveDeptid(); + final List userList = this.sysUserService.getUserlistByDeptid(deptid); + modelMap.put("userList", userList); + return prefix + "/assignToExecutor"; + } + + /** + * 修改保存 + */ + @ApiOperation(value = "任務分配到執行人保存", notes = "任務分配到執行人保存") + @PostMapping("/assignExecutorSeve") + @ResponseBody + public AjaxResult assignExecutorSeve(Taskinfo record) + { + logger.info("任务分配执行人"); + record.setStatusid(TaskStatus.ACCEPTED.getIndex()); + record.setUpdatetime(new Date()); + final int rs = taskinfoService.updateByPrimaryKeySelective(record); + return toAjax(rs); + } + + +} diff --git a/src/main/java/com/zsess/taskmanage/controller/TaskprocessInfoController.java b/src/main/java/com/zsess/taskmanage/controller/TaskprocessInfoController.java new file mode 100644 index 0000000000000000000000000000000000000000..7e9b343a5db20f413b47187e66c3b204cef35f7b --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/controller/TaskprocessInfoController.java @@ -0,0 +1,288 @@ +package com.zsess.taskmanage.controller; + +import com.fc.test.common.base.BaseController; +import com.fc.test.common.domain.AjaxResult; +import com.fc.test.model.auto.SysDepartment; +import com.fc.test.model.auto.TsysUser; +import com.fc.test.model.custom.TableSplitResult; +import com.fc.test.model.custom.Tablepar; +import com.fc.test.model.custom.TitleVo; +import com.fc.test.shiro.util.ShiroUtils; +import com.zsess.taskmanage.model.TaskStatus; +import com.zsess.taskmanage.model.Taskinfo; +import com.zsess.taskmanage.model.common.CommonIdNameBo; +import com.zsess.taskmanage.service.TaskManageComService; +import com.zsess.taskmanage.service.TaskinfoService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.util.StopWatch; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.github.pagehelper.PageInfo; +import com.zsess.taskmanage.model.TaskprocessInfo; +import com.zsess.taskmanage.service.TaskprocessInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +@Api(value = "任务管理执行过程信息") +@Controller +@RequestMapping("/TaskprocessInfoController") +public class TaskprocessInfoController extends BaseController { + private static Logger logger = LoggerFactory.getLogger(TaskprocessInfoController.class); + private String prefix = "taskmanage/taskprocessInfo"; + @Autowired + private TaskprocessInfoService taskprocessInfoService; + @Resource + private TaskinfoService taskinfoService; + @Resource(name = "taskManageComService") + private TaskManageComService comService; + + /** + * 分页跳转 + */ + @ApiOperation(value = "分页跳转", notes = "分页跳转") + @GetMapping("/taskProcessInfoOper/{taskid}") +// @RequiresPermissions("gen:taskprocessInfo:view") + public String view(ModelMap modelMap,@PathVariable("taskid") String taskid) + { +// String str="任务执行处理信息"; +// setTitle(modelMap, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false)); + final List taskStatusList = this.comService.getTaskStatusList(); + modelMap.addAttribute("taskStatusList",taskStatusList); + final List deptList = sysDepartmentService.getDeptsWithoutRoot(); + modelMap.put("deptList", deptList); + final List taskFreqList = this.comService.getTaskFreqList(); + modelMap.addAttribute("taskFreqList", taskFreqList); + + modelMap.put("Taskinfo", taskinfoService.selectByPrimaryKey(taskid)); + + + return prefix + "/taskProcessInfo"; + } + + @GetMapping("/taskProcessInfoView/{taskid}") +// @RequiresPermissions("gen:taskprocessInfo:view") + public String taskProcessInfoView(ModelMap modelMap,@PathVariable("taskid") String taskid) + { + modelMap.put("Taskinfo", taskinfoService.selectByPrimaryKey(taskid)); + return prefix + "/taskProcessInfoView"; + } + + /** + * 分页查询 + */ + //@Log(title = "任务管理执行过程信息集合查询", action = "111") + @ApiOperation(value = "分页查询", notes = "分页查询") + @PostMapping("/taskProcessInfoList") +// @RequiresPermissions("gen:taskprocessInfo:list") + @ResponseBody + public Object taskProcessInfoList(Tablepar tablepar, Taskinfo record,String selfSearch){ + final TaskprocessInfo processInfo = new TaskprocessInfo(); + processInfo.setTaskid(selfSearch); + final PageInfo page=taskprocessInfoService.getTaskProcesslistBytaskid(tablepar,processInfo) ; + final TableSplitResult result=new TableSplitResult(page.getPageNum(), page.getTotal(), page.getList()); + return result; + } + + /** + * 新增跳转 + */ + @ApiOperation(value = "新增跳转", notes = "新增跳转") + @GetMapping("/add/{taskid}") + public String add(ModelMap modelMap, @PathVariable("taskid") String taskid) + { + modelMap.put("taskid", taskid); + return prefix + "/add"; + } + + /** + * 新增 + */ + @ApiOperation(value = "新增", notes = "新增") + @PostMapping("/add") +// @RequiresPermissions("gen:taskprocessInfo:add") + @ResponseBody + public AjaxResult add(TaskprocessInfo taskprocessInfo){ + final String taskid = taskprocessInfo.getTaskid(); + final Taskinfo taskifno = taskinfoService.selectByPrimaryKey(taskid); + final Integer taskstatus4 = TaskStatus.EXECUTING.getIndex(); + if (!taskstatus4.equals(taskifno.getStatusid()) ) { + taskifno.setStatusid(taskstatus4); + final int rs = taskinfoService.updateByPrimaryKeySelective(taskifno); + } + final AjaxResult rs = genComProcessInfo(taskprocessInfo, taskstatus4,0); + return rs; + } + + /** + * 任务分配退回跳转 + */ + @ApiOperation(value = "任务分配退回跳转", notes = "任务分配退回跳转") + @GetMapping("/assignBack/{taskid}/{statusid}") + public String assignBack(ModelMap modelMap, @PathVariable("taskid") String taskid, + @PathVariable("statusid") Integer statusid) + { + modelMap.put("taskid", taskid); + final Taskinfo taskinfo = taskinfoService.selectByPrimaryKey(taskid); +// final Integer statusid = taskinfo.getStatusid(); + modelMap.put("statusid", statusid); + modelMap.put("taskname", taskinfo.getTaskname()); + String urlpath = "/assignBack"; + if (statusid.equals(Integer.valueOf(8))) { + urlpath = "/completeBack"; + } + return prefix + urlpath; + } + /** + * 任务分配回退保存 + */ + @ApiOperation(value = "任务分配回退保存", notes = "任务分配回退保存") + @PostMapping("/assignBack") + @ResponseBody + public AjaxResult assignBack(TaskprocessInfo taskprocessInfo){ + logger.info("任务分配审核:退回"); + final String taskid = taskprocessInfo.getTaskid(); + final Taskinfo taskifno = taskinfoService.selectByPrimaryKey(taskid); + final Integer taskstatus3 = TaskStatus.ASSIGNBACK.getIndex(); + if (!taskstatus3.equals(taskifno.getStatusid()) ) { + taskifno.setStatusid(taskstatus3); + final int rs = taskinfoService.updateByPrimaryKeySelective(taskifno); + } + final AjaxResult rs = genComProcessInfo(taskprocessInfo, taskstatus3,1); + return rs; + } + + /** + * 任务分配回退保存 + */ + @ApiOperation(value = "任务分配回退保存", notes = "任务分配回退保存") + @PostMapping("/completeBack") + @ResponseBody + public AjaxResult completeBack(TaskprocessInfo taskprocessInfo){ + logger.info("任务完成申请审核:退回"); + final String taskid = taskprocessInfo.getTaskid(); + final Taskinfo taskifno = taskinfoService.selectByPrimaryKey(taskid); + final Integer taskstatus8 = TaskStatus.COMPLETEBACK.getIndex(); + if (!taskstatus8.equals(taskifno.getStatusid()) ) { + taskifno.setStatusid(taskstatus8); + final int rs = taskinfoService.updateByPrimaryKeySelective(taskifno); + } + final AjaxResult rs = genComProcessInfo(taskprocessInfo, taskstatus8, 1); + return rs; + } + + /** + * 生成公共的任务处理信息. + * @param taskprocessInfo + * @param taskstatusid + * @param processStatueid + * @return + */ + private AjaxResult genComProcessInfo(TaskprocessInfo taskprocessInfo, Integer taskstatusid, Integer processStatueid) { + final TsysUser user = ShiroUtils.getUser(); + taskprocessInfo.setCreatetime(new Date()); + taskprocessInfo.setDetpid(user.getDeptid()); + taskprocessInfo.setUserid(user.getId()); + taskprocessInfo.setUpdatetime(new Date()); + taskprocessInfo.setStatusid(taskstatusid); + taskprocessInfo.setProcessstatus(processStatueid); + int b = taskprocessInfoService.insertSelective(taskprocessInfo); + if (b > 0) { + return success(); + } else { + return error(); + } + } + + /** + * 删除 + * @param ids + * @return + */ + //@Log(title = "任务管理执行过程信息删除", action = "111") + @ApiOperation(value = "删除", notes = "删除") + @PostMapping("/remove") + @RequiresPermissions("gen:taskprocessInfo:remove") + @ResponseBody + public AjaxResult remove(String ids){ + int b=taskprocessInfoService.deleteByPrimaryKey(ids); + if(b>0){ + return success(); + }else{ + return error(); + } + } + + /** + * 检查Name + * @param taskprocessInfo + * @return + */ + @ApiOperation(value = "检查Name唯一", notes = "检查Name唯一") + @PostMapping("/checkNameUnique") + @ResponseBody + public int checkNameUnique(TaskprocessInfo taskprocessInfo){ + int b=taskprocessInfoService.checkNameUnique(taskprocessInfo); + if(b>0){ + return 1; + }else{ + return 0; + } + } + + + /** + * 修改跳转 + * @param id + * @param mmap + * @return + */ + @ApiOperation(value = "修改跳转", notes = "修改跳转") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") String id, ModelMap mmap) + { + mmap.put("TaskprocessInfo", taskprocessInfoService.selectByPrimaryKey(id)); + + return prefix + "/edit"; + } + + /** + * 修改保存 + */ + //@Log(title = "任务管理执行过程信息修改", action = "111") + @ApiOperation(value = "修改保存", notes = "修改保存") + @RequiresPermissions("gen:taskprocessInfo:edit") + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(TaskprocessInfo record) + { + return toAjax(taskprocessInfoService.updateByPrimaryKeySelective(record)); + } + + + /** + * 根据主键查询 + * + * @param id + * @return + */ + @ApiOperation(value = "根据id查询唯一", notes = "根据id查询唯一") + @PostMapping("/get/{id}") + public TaskprocessInfo edit(@PathVariable("id") String id) { + return taskprocessInfoService.selectByPrimaryKey(id); + } + + + +} diff --git a/src/main/java/com/zsess/taskmanage/mapper/DeptTaskInfoDao.java b/src/main/java/com/zsess/taskmanage/mapper/DeptTaskInfoDao.java new file mode 100644 index 0000000000000000000000000000000000000000..b22e539a01b0ea9b484256a03099fe09b51443fe --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/mapper/DeptTaskInfoDao.java @@ -0,0 +1,28 @@ +package com.zsess.taskmanage.mapper; + +import com.zsess.taskmanage.model.DeptTaskInfo; + +import java.util.List; + +/** + * 部门任务信息mapper + */ +public interface DeptTaskInfoDao { + /** + * 获取任务发起部门的待处理信息. + * @return + */ + List getDeptAddtaskInfo(); + + /** + * 获取执行中的部门任务信息. + * @return + */ + List getDeptExetaskInfo(); + + /** + * 获取各部门已完成任务数量. + * @return + */ + ListgetDeptTaskCompleteNum(); +} diff --git a/src/main/java/com/zsess/taskmanage/mapper/TaskfileInfoMapper.java b/src/main/java/com/zsess/taskmanage/mapper/TaskfileInfoMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..642cee09980b0d09c26881418ba392f3f4606185 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/mapper/TaskfileInfoMapper.java @@ -0,0 +1,38 @@ +package com.zsess.taskmanage.mapper; + +import com.zsess.taskmanage.model.TaskfileInfo; +import com.zsess.taskmanage.model.TaskfileInfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +/** + * 任务管理附件信息表 TaskfileInfoMapper + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-16 15:39:49 + */ +public interface TaskfileInfoMapper { + + long countByExample(TaskfileInfoExample example); + + int deleteByExample(TaskfileInfoExample example); + + int deleteByPrimaryKey(String id); + + int insert(TaskfileInfo record); + + int insertSelective(TaskfileInfo record); + + List selectByExample(TaskfileInfoExample example); + + TaskfileInfo selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TaskfileInfo record, @Param("example") TaskfileInfoExample example); + + int updateByExample(@Param("record") TaskfileInfo record, @Param("example") TaskfileInfoExample example); + + int updateByPrimaryKeySelective(TaskfileInfo record); + + int updateByPrimaryKey(TaskfileInfo record); + +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/mapper/TaskinfoMapper.java b/src/main/java/com/zsess/taskmanage/mapper/TaskinfoMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..5b1ca2becf9d6c6104b1297752c01aff0a9c00cd --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/mapper/TaskinfoMapper.java @@ -0,0 +1,48 @@ +package com.zsess.taskmanage.mapper; +// com.zsess.taskmanage.mapper.auto.TaskinfoMapper + +import com.zsess.taskmanage.model.Taskinfo; +import com.zsess.taskmanage.model.TaskinfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +/** + * 任务信息主表 TaskinfoMapper + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-06 15:25:56 + */ +public interface TaskinfoMapper { + + long countByExample(TaskinfoExample example); + + int deleteByExample(TaskinfoExample example); + + int deleteByPrimaryKey(String id); + + int insert(Taskinfo record); + + int insertSelective(Taskinfo record); + + List selectByExample(TaskinfoExample example); + + Taskinfo selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Taskinfo record, @Param("example") TaskinfoExample example); + + int updateByExample(@Param("record") Taskinfo record, @Param("example") TaskinfoExample example); + + int updateByPrimaryKeySelective(Taskinfo record); + + int updateByPrimaryKey(Taskinfo record); + + /** + * 根据任务ids更新任务状态 + * @param statusid 任务状态id + * @param ids 任务id + * @return 更新结果 + */ + int updateStatusByids(@Param("statusid") Integer statusid,@Param("ids") Listids); + + +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/mapper/TaskprocessInfoMapper.java b/src/main/java/com/zsess/taskmanage/mapper/TaskprocessInfoMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..12c0e75b74d3619ed0ca8ad13d7909594ccb2e16 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/mapper/TaskprocessInfoMapper.java @@ -0,0 +1,38 @@ +package com.zsess.taskmanage.mapper; + +import com.zsess.taskmanage.model.TaskprocessInfo; +import com.zsess.taskmanage.model.TaskprocessInfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +/** + * 任务管理执行过程信息 TaskprocessInfoMapper + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-15 10:42:35 + */ +public interface TaskprocessInfoMapper { + + long countByExample(TaskprocessInfoExample example); + + int deleteByExample(TaskprocessInfoExample example); + + int deleteByPrimaryKey(String id); + + int insert(TaskprocessInfo record); + + int insertSelective(TaskprocessInfo record); + + List selectByExample(TaskprocessInfoExample example); + + TaskprocessInfo selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TaskprocessInfo record, @Param("example") TaskprocessInfoExample example); + + int updateByExample(@Param("record") TaskprocessInfo record, @Param("example") TaskprocessInfoExample example); + + int updateByPrimaryKeySelective(TaskprocessInfo record); + + int updateByPrimaryKey(TaskprocessInfo record); + +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/model/DeptTaskInfo.java b/src/main/java/com/zsess/taskmanage/model/DeptTaskInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..6555fbeeb4c9e3b79e857e9919a5fce5fceed451 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/DeptTaskInfo.java @@ -0,0 +1,53 @@ +package com.zsess.taskmanage.model; + +import java.io.Serializable; + +/** + * 部门任务信息. + */ +public class DeptTaskInfo implements Serializable { + + private Integer deptid; + + private String deptname; + /** + * 执行中的任务数量 + */ + private Integer tasknum; + /** + * 任务状态集 + */ + private String statusstr; + + public Integer getDeptid() { + return deptid; + } + + public void setDeptid(Integer deptid) { + this.deptid = deptid; + } + + public String getDeptname() { + return deptname; + } + + public void setDeptname(String deptname) { + this.deptname = deptname; + } + + public Integer getTasknum() { + return tasknum; + } + + public void setTasknum(Integer tasknum) { + this.tasknum = tasknum; + } + + public String getStatusstr() { + return statusstr; + } + + public void setStatusstr(String statusstr) { + this.statusstr = statusstr; + } +} diff --git a/src/main/java/com/zsess/taskmanage/model/TaskStatus.java b/src/main/java/com/zsess/taskmanage/model/TaskStatus.java new file mode 100644 index 0000000000000000000000000000000000000000..eda3b8651dc6f4957c48cac7c05a90d2ac97799e --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/TaskStatus.java @@ -0,0 +1,42 @@ +package com.zsess.taskmanage.model; + +public enum TaskStatus { + + ADD("新增",0), ASSIGN("已分配",1), + ASSIGNCONFIRM("分配确认",2), + ASSIGNBACK("分配退回",3), + ACCEPTED("任务接收",4), + EXECUTING("执行中",5),COMPLETEAPPLY("任务完成申请",6), + COMPLETED("任务完成",7), + COMPLETEBACK("完成申请退回",8); + private int index; + private String name; + + private TaskStatus(String name ,int index) { + this.index = index; + this.name = name; + } + + // 普通方法 + public static String getName(int index) { + for (TaskStatus r : TaskStatus.values()) { + if (r.getIndex() == index) { + return r.name; + } + } + return null; + } + // get set 方法 + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public int getIndex() { + return index; + } + public void setIndex(int index) { + this.index = index; + } +} diff --git a/src/main/java/com/zsess/taskmanage/model/TaskfileInfo.java b/src/main/java/com/zsess/taskmanage/model/TaskfileInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..1af9f8a70a643664df8127d46afee7ad016b0d37 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/TaskfileInfo.java @@ -0,0 +1,187 @@ +package com.zsess.taskmanage.model; + +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import java.lang.Integer; + +/** + * 任务管理附件信息表 TaskfileInfo + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-16 15:39:49 + */ + @ApiModel(value="TaskfileInfo", description="任务管理附件信息表") +public class TaskfileInfo implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** 附件id **/ + @ApiModelProperty(value = "附件id") + private String id; + + /** 任务id **/ + @ApiModelProperty(value = "任务id") + private String taskid; + + /** 附件类型, 0任务信息;1任务汇报 **/ + @ApiModelProperty(value = "附件类型, 0任务信息;1任务汇报") + private Integer filetype; + + /** 文件名称 **/ + @ApiModelProperty(value = "文件名称") + private String filename; + + /** 附件数据id + **/ + @ApiModelProperty(value = "附件数据id ") + private String dataId; + + /** 上传人员 **/ + @ApiModelProperty(value = "上传人员") + private String createuserid; + + /** 上传时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @ApiModelProperty(value = "上传时间") + private Date createtime; + + /** 上传人员名称 **/ + @ApiModelProperty(value = "上传人员名称") + private String createusername; + + /** 上传部门id **/ + @ApiModelProperty(value = "上传部门id") + private Integer createdeptid; + + + /** 上传部门名称 **/ + @ApiModelProperty(value = "上传部门名称") + private String createdeptname; + /** + * 任务执行id. + */ + private String processid; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public String getTaskid() { + return taskid; + } + + public void setTaskid(String taskid) { + this.taskid = taskid; + } + + + public Integer getFiletype() { + return filetype; + } + + public void setFiletype(Integer filetype) { + this.filetype = filetype; + } + + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + + public String getDataId() { + return dataId; + } + + public void setDataId(String dataId) { + this.dataId = dataId; + } + + + public String getCreateuserid() { + return createuserid; + } + + public void setCreateuserid(String createuserid) { + this.createuserid = createuserid; + } + + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + + public String getCreateusername() { + return createusername; + } + + public void setCreateusername(String createusername) { + this.createusername = createusername; + } + + + public Integer getCreatedeptid() { + return createdeptid; + } + + public void setCreatedeptid(Integer createdeptid) { + this.createdeptid = createdeptid; + } + + + public String getCreatedeptname() { + return createdeptname; + } + + public void setCreatedeptname(String createdeptname) { + this.createdeptname = createdeptname; + } + + + public TaskfileInfo() { + super(); + } + + + public TaskfileInfo(String id,String taskid,Integer filetype,String filename,String dataId,String createuserid,Date createtime,String createusername,Integer createdeptid,String createdeptname) { + + this.id = id; + this.taskid = taskid; + this.filetype = filetype; + this.filename = filename; + this.dataId = dataId; + this.createuserid = createuserid; + this.createtime = createtime; + this.createusername = createusername; + this.createdeptid = createdeptid; + this.createdeptname = createdeptname; + + } + + public String getProcessid() { + return processid; + } + + public void setProcessid(String processid) { + this.processid = processid; + } +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/model/TaskfileInfoExample.java b/src/main/java/com/zsess/taskmanage/model/TaskfileInfoExample.java new file mode 100644 index 0000000000000000000000000000000000000000..6e32e0f042249f944859c091697aa8b3781f7643 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/TaskfileInfoExample.java @@ -0,0 +1,1000 @@ +package com.zsess.taskmanage.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import cn.hutool.core.util.StrUtil; +/** + * 任务管理附件信息表 TaskfileInfoExample + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-16 15:39:49 + */ +public class TaskfileInfoExample { + + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TaskfileInfoExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + + public Criteria andTaskidIsNull() { + addCriterion("taskid is null"); + return (Criteria) this; + } + + public Criteria andTaskidIsNotNull() { + addCriterion("taskid is not null"); + return (Criteria) this; + } + + public Criteria andTaskidEqualTo(String value) { + addCriterion("taskid =", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotEqualTo(String value) { + addCriterion("taskid <>", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidGreaterThan(String value) { + addCriterion("taskid >", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidGreaterThanOrEqualTo(String value) { + addCriterion("taskid >=", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLessThan(String value) { + addCriterion("taskid <", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLessThanOrEqualTo(String value) { + addCriterion("taskid <=", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLike(String value) { + addCriterion("taskid like", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotLike(String value) { + addCriterion("taskid not like", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidIn(List values) { + addCriterion("taskid in", values, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotIn(List values) { + addCriterion("taskid not in", values, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidBetween(String value1, String value2) { + addCriterion("taskid between", value1, value2, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotBetween(String value1, String value2) { + addCriterion("taskid not between", value1, value2, "taskid"); + return (Criteria) this; + } + + + public Criteria andFiletypeIsNull() { + addCriterion("filetype is null"); + return (Criteria) this; + } + + public Criteria andFiletypeIsNotNull() { + addCriterion("filetype is not null"); + return (Criteria) this; + } + + public Criteria andFiletypeEqualTo(Integer value) { + addCriterion("filetype =", value, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeNotEqualTo(Integer value) { + addCriterion("filetype <>", value, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeGreaterThan(Integer value) { + addCriterion("filetype >", value, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeGreaterThanOrEqualTo(Integer value) { + addCriterion("filetype >=", value, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeLessThan(Integer value) { + addCriterion("filetype <", value, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeLessThanOrEqualTo(Integer value) { + addCriterion("filetype <=", value, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeLike(Integer value) { + addCriterion("filetype like", value, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeNotLike(Integer value) { + addCriterion("filetype not like", value, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeIn(List values) { + addCriterion("filetype in", values, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeNotIn(List values) { + addCriterion("filetype not in", values, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeBetween(Integer value1, Integer value2) { + addCriterion("filetype between", value1, value2, "filetype"); + return (Criteria) this; + } + + public Criteria andFiletypeNotBetween(Integer value1, Integer value2) { + addCriterion("filetype not between", value1, value2, "filetype"); + return (Criteria) this; + } + + + public Criteria andFilenameIsNull() { + addCriterion("filename is null"); + return (Criteria) this; + } + + public Criteria andFilenameIsNotNull() { + addCriterion("filename is not null"); + return (Criteria) this; + } + + public Criteria andFilenameEqualTo(String value) { + addCriterion("filename =", value, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameNotEqualTo(String value) { + addCriterion("filename <>", value, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameGreaterThan(String value) { + addCriterion("filename >", value, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameGreaterThanOrEqualTo(String value) { + addCriterion("filename >=", value, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameLessThan(String value) { + addCriterion("filename <", value, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameLessThanOrEqualTo(String value) { + addCriterion("filename <=", value, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameLike(String value) { + addCriterion("filename like", value, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameNotLike(String value) { + addCriterion("filename not like", value, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameIn(List values) { + addCriterion("filename in", values, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameNotIn(List values) { + addCriterion("filename not in", values, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameBetween(String value1, String value2) { + addCriterion("filename between", value1, value2, "filename"); + return (Criteria) this; + } + + public Criteria andFilenameNotBetween(String value1, String value2) { + addCriterion("filename not between", value1, value2, "filename"); + return (Criteria) this; + } + + + public Criteria andDataIdIsNull() { + addCriterion("data_id is null"); + return (Criteria) this; + } + + public Criteria andDataIdIsNotNull() { + addCriterion("data_id is not null"); + return (Criteria) this; + } + + public Criteria andDataIdEqualTo(String value) { + addCriterion("data_id =", value, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdNotEqualTo(String value) { + addCriterion("data_id <>", value, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdGreaterThan(String value) { + addCriterion("data_id >", value, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdGreaterThanOrEqualTo(String value) { + addCriterion("data_id >=", value, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdLessThan(String value) { + addCriterion("data_id <", value, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdLessThanOrEqualTo(String value) { + addCriterion("data_id <=", value, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdLike(String value) { + addCriterion("data_id like", value, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdNotLike(String value) { + addCriterion("data_id not like", value, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdIn(List values) { + addCriterion("data_id in", values, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdNotIn(List values) { + addCriterion("data_id not in", values, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdBetween(String value1, String value2) { + addCriterion("data_id between", value1, value2, "dataId"); + return (Criteria) this; + } + + public Criteria andDataIdNotBetween(String value1, String value2) { + addCriterion("data_id not between", value1, value2, "dataId"); + return (Criteria) this; + } + + + public Criteria andCreateuseridIsNull() { + addCriterion("createuserid is null"); + return (Criteria) this; + } + + public Criteria andCreateuseridIsNotNull() { + addCriterion("createuserid is not null"); + return (Criteria) this; + } + + public Criteria andCreateuseridEqualTo(String value) { + addCriterion("createuserid =", value, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridNotEqualTo(String value) { + addCriterion("createuserid <>", value, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridGreaterThan(String value) { + addCriterion("createuserid >", value, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridGreaterThanOrEqualTo(String value) { + addCriterion("createuserid >=", value, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridLessThan(String value) { + addCriterion("createuserid <", value, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridLessThanOrEqualTo(String value) { + addCriterion("createuserid <=", value, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridLike(String value) { + addCriterion("createuserid like", value, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridNotLike(String value) { + addCriterion("createuserid not like", value, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridIn(List values) { + addCriterion("createuserid in", values, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridNotIn(List values) { + addCriterion("createuserid not in", values, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridBetween(String value1, String value2) { + addCriterion("createuserid between", value1, value2, "createuserid"); + return (Criteria) this; + } + + public Criteria andCreateuseridNotBetween(String value1, String value2) { + addCriterion("createuserid not between", value1, value2, "createuserid"); + return (Criteria) this; + } + + + public Criteria andCreatetimeIsNull() { + addCriterion("createtime is null"); + return (Criteria) this; + } + + public Criteria andCreatetimeIsNotNull() { + addCriterion("createtime is not null"); + return (Criteria) this; + } + + public Criteria andCreatetimeEqualTo(Date value) { + addCriterion("createtime =", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotEqualTo(Date value) { + addCriterion("createtime <>", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeGreaterThan(Date value) { + addCriterion("createtime >", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) { + addCriterion("createtime >=", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLessThan(Date value) { + addCriterion("createtime <", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLessThanOrEqualTo(Date value) { + addCriterion("createtime <=", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLike(Date value) { + addCriterion("createtime like", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotLike(Date value) { + addCriterion("createtime not like", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeIn(List values) { + addCriterion("createtime in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotIn(List values) { + addCriterion("createtime not in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeBetween(Date value1, Date value2) { + addCriterion("createtime between", value1, value2, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotBetween(Date value1, Date value2) { + addCriterion("createtime not between", value1, value2, "createtime"); + return (Criteria) this; + } + + + public Criteria andCreateusernameIsNull() { + addCriterion("createusername is null"); + return (Criteria) this; + } + + public Criteria andCreateusernameIsNotNull() { + addCriterion("createusername is not null"); + return (Criteria) this; + } + + public Criteria andCreateusernameEqualTo(String value) { + addCriterion("createusername =", value, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameNotEqualTo(String value) { + addCriterion("createusername <>", value, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameGreaterThan(String value) { + addCriterion("createusername >", value, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameGreaterThanOrEqualTo(String value) { + addCriterion("createusername >=", value, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameLessThan(String value) { + addCriterion("createusername <", value, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameLessThanOrEqualTo(String value) { + addCriterion("createusername <=", value, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameLike(String value) { + addCriterion("createusername like", value, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameNotLike(String value) { + addCriterion("createusername not like", value, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameIn(List values) { + addCriterion("createusername in", values, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameNotIn(List values) { + addCriterion("createusername not in", values, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameBetween(String value1, String value2) { + addCriterion("createusername between", value1, value2, "createusername"); + return (Criteria) this; + } + + public Criteria andCreateusernameNotBetween(String value1, String value2) { + addCriterion("createusername not between", value1, value2, "createusername"); + return (Criteria) this; + } + + + public Criteria andCreatedeptidIsNull() { + addCriterion("createdeptid is null"); + return (Criteria) this; + } + + public Criteria andCreatedeptidIsNotNull() { + addCriterion("createdeptid is not null"); + return (Criteria) this; + } + + public Criteria andCreatedeptidEqualTo(Integer value) { + addCriterion("createdeptid =", value, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidNotEqualTo(Integer value) { + addCriterion("createdeptid <>", value, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidGreaterThan(Integer value) { + addCriterion("createdeptid >", value, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidGreaterThanOrEqualTo(Integer value) { + addCriterion("createdeptid >=", value, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidLessThan(Integer value) { + addCriterion("createdeptid <", value, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidLessThanOrEqualTo(Integer value) { + addCriterion("createdeptid <=", value, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidLike(Integer value) { + addCriterion("createdeptid like", value, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidNotLike(Integer value) { + addCriterion("createdeptid not like", value, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidIn(List values) { + addCriterion("createdeptid in", values, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidNotIn(List values) { + addCriterion("createdeptid not in", values, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidBetween(Integer value1, Integer value2) { + addCriterion("createdeptid between", value1, value2, "createdeptid"); + return (Criteria) this; + } + + public Criteria andCreatedeptidNotBetween(Integer value1, Integer value2) { + addCriterion("createdeptid not between", value1, value2, "createdeptid"); + return (Criteria) this; + } + + + public Criteria andCreatedeptnameIsNull() { + addCriterion("createdeptname is null"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameIsNotNull() { + addCriterion("createdeptname is not null"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameEqualTo(String value) { + addCriterion("createdeptname =", value, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameNotEqualTo(String value) { + addCriterion("createdeptname <>", value, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameGreaterThan(String value) { + addCriterion("createdeptname >", value, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameGreaterThanOrEqualTo(String value) { + addCriterion("createdeptname >=", value, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameLessThan(String value) { + addCriterion("createdeptname <", value, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameLessThanOrEqualTo(String value) { + addCriterion("createdeptname <=", value, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameLike(String value) { + addCriterion("createdeptname like", value, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameNotLike(String value) { + addCriterion("createdeptname not like", value, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameIn(List values) { + addCriterion("createdeptname in", values, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameNotIn(List values) { + addCriterion("createdeptname not in", values, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameBetween(String value1, String value2) { + addCriterion("createdeptname between", value1, value2, "createdeptname"); + return (Criteria) this; + } + + public Criteria andCreatedeptnameNotBetween(String value1, String value2) { + addCriterion("createdeptname not between", value1, value2, "createdeptname"); + return (Criteria) this; + } + + + public Criteria andLikeQuery(TaskfileInfo record) { + List list= new ArrayList(); + List list2= new ArrayList(); + StringBuffer buffer=new StringBuffer(); + + if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) { + list.add("ifnull(id,'')"); + } + if(record.getTaskid()!=null&&StrUtil.isNotEmpty(record.getTaskid().toString())) { + list.add("ifnull(taskid,'')"); + } + if(record.getFiletype()!=null&&StrUtil.isNotEmpty(record.getFiletype().toString())) { + list.add("ifnull(filetype,'')"); + } + if(record.getFilename()!=null&&StrUtil.isNotEmpty(record.getFilename().toString())) { + list.add("ifnull(filename,'')"); + } + if(record.getDataId()!=null&&StrUtil.isNotEmpty(record.getDataId().toString())) { + list.add("ifnull(data_id,'')"); + } + if(record.getCreateuserid()!=null&&StrUtil.isNotEmpty(record.getCreateuserid().toString())) { + list.add("ifnull(createuserid,'')"); + } + if(record.getCreatetime()!=null&&StrUtil.isNotEmpty(record.getCreatetime().toString())) { + list.add("ifnull(createtime,'')"); + } + if(record.getCreateusername()!=null&&StrUtil.isNotEmpty(record.getCreateusername().toString())) { + list.add("ifnull(createusername,'')"); + } + if(record.getCreatedeptid()!=null&&StrUtil.isNotEmpty(record.getCreatedeptid().toString())) { + list.add("ifnull(createdeptid,'')"); + } + if(record.getCreatedeptname()!=null&&StrUtil.isNotEmpty(record.getCreatedeptname().toString())) { + list.add("ifnull(createdeptname,'')"); + } + if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) { + list2.add("'%"+record.getId()+"%'"); + } + if(record.getTaskid()!=null&&StrUtil.isNotEmpty(record.getTaskid().toString())) { + list2.add("'%"+record.getTaskid()+"%'"); + } + if(record.getFiletype()!=null&&StrUtil.isNotEmpty(record.getFiletype().toString())) { + list2.add("'%"+record.getFiletype()+"%'"); + } + if(record.getFilename()!=null&&StrUtil.isNotEmpty(record.getFilename().toString())) { + list2.add("'%"+record.getFilename()+"%'"); + } + if(record.getDataId()!=null&&StrUtil.isNotEmpty(record.getDataId().toString())) { + list2.add("'%"+record.getDataId()+"%'"); + } + if(record.getCreateuserid()!=null&&StrUtil.isNotEmpty(record.getCreateuserid().toString())) { + list2.add("'%"+record.getCreateuserid()+"%'"); + } + if(record.getCreatetime()!=null&&StrUtil.isNotEmpty(record.getCreatetime().toString())) { + list2.add("'%"+record.getCreatetime()+"%'"); + } + if(record.getCreateusername()!=null&&StrUtil.isNotEmpty(record.getCreateusername().toString())) { + list2.add("'%"+record.getCreateusername()+"%'"); + } + if(record.getCreatedeptid()!=null&&StrUtil.isNotEmpty(record.getCreatedeptid().toString())) { + list2.add("'%"+record.getCreatedeptid()+"%'"); + } + if(record.getCreatedeptname()!=null&&StrUtil.isNotEmpty(record.getCreatedeptname().toString())) { + list2.add("'%"+record.getCreatedeptname()+"%'"); + } + + buffer.append(" CONCAT("); + buffer.append(StrUtil.join("",list)); + buffer.append(")"); + buffer.append("like CONCAT("); + + + buffer.append(StrUtil.join("",list2)); + + buffer.append(")"); + if(!" CONCAT()like CONCAT()".equals(buffer.toString())) { + addCriterion(buffer.toString()); + } + return (Criteria) this; + } + +} + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/model/Taskinfo.java b/src/main/java/com/zsess/taskmanage/model/Taskinfo.java new file mode 100644 index 0000000000000000000000000000000000000000..73e60e8d6364f0156592bbe4e0c430cdf4175cc3 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/Taskinfo.java @@ -0,0 +1,317 @@ +package com.zsess.taskmanage.model; + +import java.io.Serializable; + +import com.fc.test.model.auto.TsysFile; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.lang.Long; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; + +import java.lang.Integer; +import java.util.List; + +import static org.springframework.format.annotation.DateTimeFormat.ISO.DATE; + +/** + * 任务信息主表 Taskinfo + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-06 15:25:56 + */ + @ApiModel(value="Taskinfo", description="任务信息主表") +public class Taskinfo implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** 任务ID **/ + @ApiModelProperty(value = "任务ID") + private String taskid; + + /** 任务名称 **/ + @ApiModelProperty(value = "任务名称") + private String taskname; + + /** 任务描述 **/ + @ApiModelProperty(value = "任务描述") + private String taskdesc; + + /** 任务开始日期 **/ + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") +// @DateTimeFormat(pattern = "yyyy-MM-dd", iso= DATE) + @ApiModelProperty(value = "任务开始日期") + private Date begindate; + + /** 任务完成日期 **/ + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") +// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso= DATE) + @ApiModelProperty(value = "任务完成日期") + private Date enddate; + + /** 汇报频率 **/ + @ApiModelProperty(value = "汇报频率") + private Integer freqid; + + /** 新增时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @ApiModelProperty(value = "新增时间") + private Date createtime; + + /** 更新时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @ApiModelProperty(value = "更新时间") + private Date updatetime; + + /** 任务发布人 **/ + @ApiModelProperty(value = "任务发布人") + private String userid; + + + + /** 任务发布部门 **/ + @ApiModelProperty(value = "任务发布部门") + private Integer deptid; + /** 任务接收部门 **/ + @ApiModelProperty(value = "任务接收部门") + private Integer reciveDeptid; + /** + * 接收部门名称. + */ + private String reciveDeptName; + + /** 任务执行人 **/ + @ApiModelProperty(value = "任务执行人") + private String reciveUserid; + /** + * 任务执行人名称 + */ + private String reciveUserName; + + /** 任务状态ID aoa_status_list.status_id **/ + @ApiModelProperty(value = "任务状态ID") + private Integer statusid; + /** + * 汇报要求 + */ + private String reportdesc; + + /** + * 处理过程信息数量。 + */ + private Integer processnum; + /** + * 最新的处理汇报信息 + */ + private String processmsg; + /** + * 状态字符串. + */ + private String statusstr; + + public String getProcessmsg() { + return processmsg; + } + + public void setProcessmsg(String processmsg) { + this.processmsg = processmsg; + } + + public Integer getProcessnum() { + return processnum; + } + + public void setProcessnum(Integer processnum) { + this.processnum = processnum; + } + + public String getReportdesc() { + return reportdesc; + } + + public void setReportdesc(String reportdesc) { + this.reportdesc = reportdesc; + } + + public String getTaskid() { + return taskid; + } + + public void setTaskid(String taskid) { + this.taskid = taskid; + } + + + public String getTaskname() { + return taskname; + } + + public void setTaskname(String taskname) { + this.taskname = taskname; + } + + + public String getTaskdesc() { + return taskdesc; + } + + public void setTaskdesc(String taskdesc) { + this.taskdesc = taskdesc; + } + + + public Date getBegindate() { + return begindate; + } + + public void setBegindate(Date begindate) { + this.begindate = begindate; + } + + + public Date getEnddate() { + return enddate; + } + + public void setEnddate(Date enddate) { + this.enddate = enddate; + } + + + public Integer getFreqid() { + return freqid; + } + + public void setFreqid(Integer freqid) { + this.freqid = freqid; + } + + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + + public Date getUpdatetime() { + return updatetime; + } + + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; + } + + + public String getUserid() { + return userid; + } + + public void setUserid(String userid) { + this.userid = userid; + } + + + public Integer getReciveDeptid() { + return reciveDeptid; + } + + public void setReciveDeptid(Integer reciveDeptid) { + this.reciveDeptid = reciveDeptid; + } + + + public String getReciveUserid() { + return reciveUserid; + } + + public void setReciveUserid(String reciveUserid) { + this.reciveUserid = reciveUserid; + } + + + public Integer getStatusid() { + return statusid; + } + + public void setStatusid(Integer statusid) { + this.statusid = statusid; + } + + + public Taskinfo() { + super(); + } + + + public Taskinfo(String taskid,String taskname,String taskdesc,Date begindate,Date enddate,Integer freqid, + Date createtime,Date updatetime,String userid,Integer reciveDeptid,String reciveUserid, + Integer statusid, String reportdesc, Integer deptid) { + + this.taskid = taskid; + this.taskname = taskname; + this.taskdesc = taskdesc; + this.begindate = begindate; + this.enddate = enddate; + this.freqid = freqid; + this.createtime = createtime; + this.updatetime = updatetime; + this.userid = userid; + this.reciveDeptid = reciveDeptid; + this.reciveUserid = reciveUserid; + this.statusid = statusid; + this.reportdesc = reportdesc; + this.deptid = deptid; + + } + + public String getReciveDeptName() { + return reciveDeptName; + } + + public void setReciveDeptName(String reciveDeptName) { + this.reciveDeptName = reciveDeptName; + } + + public String getReciveUserName() { + return reciveUserName; + } + + public void setReciveUserName(String reciveUserName) { + this.reciveUserName = reciveUserName; + } + + public Integer getDeptid() { + return deptid; + } + + public void setDeptid(Integer deptid) { + this.deptid = deptid; + } + + public String getStatusstr() { + return statusstr; + } + + public void setStatusstr(String statusstr) { + this.statusstr = statusstr; + } + // private DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); +// +// public String getBegindateStr() { +// final String begindateStr = df.format(this.begindate); +// return begindateStr; +// } +// +// public String getEnddateStr() { +// final String enddateStr = df.format(this.getEnddate()); +// return enddateStr; +// } +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/model/TaskinfoCon.java b/src/main/java/com/zsess/taskmanage/model/TaskinfoCon.java new file mode 100644 index 0000000000000000000000000000000000000000..3b1f1d2d7c9551a44bd374cbbd8ae1f0d21fdbfa --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/TaskinfoCon.java @@ -0,0 +1,274 @@ +package com.zsess.taskmanage.model; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Date; + +/** + * 任务信息查询条件对象 TaskinfoCon + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-06 15:25:56 + */ + @ApiModel(value="TaskinfoCon", description="任务信息查询条件对象") +public class TaskinfoCon implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** 任务ID **/ + @ApiModelProperty(value = "任务ID") + private String taskid; + + /** 任务名称 **/ + @ApiModelProperty(value = "任务名称") + private String taskname; + + /** 任务描述 **/ + @ApiModelProperty(value = "任务描述") + private String taskdesc; + + /** 任务开始日期 **/ + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") +// @DateTimeFormat(pattern = "yyyy-MM-dd", iso= DATE) + @ApiModelProperty(value = "任务开始日期") + private Date begindate; + + /** 任务完成日期 **/ + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") +// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso= DATE) + @ApiModelProperty(value = "任务完成日期") + private Date enddate; + + /** 汇报频率 **/ + @ApiModelProperty(value = "汇报频率") + private Integer freqid; + + /** 新增时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @ApiModelProperty(value = "新增时间") + private Date createtime; + + /** 更新时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @ApiModelProperty(value = "更新时间") + private Date updatetime; + + /** 任务发布人 **/ + @ApiModelProperty(value = "任务发布人") + private String userid; + + + + /** 任务发布部门 **/ + @ApiModelProperty(value = "任务发布部门") + private Integer deptid; + /** 任务接收部门 **/ + @ApiModelProperty(value = "任务接收部门") + private Integer reciveDeptid; + /** + * 接收部门名称. + */ + private String reciveDeptName; + + /** 任务执行人 **/ + @ApiModelProperty(value = "任务执行人") + private String reciveUserid; + /** + * 任务执行人名称 + */ + private String reciveUserName; + + /** 任务状态ID aoa_status_list.status_id **/ + @ApiModelProperty(value = "任务状态ID") + private Integer statusid; + /** + * 任务状态多选. + */ + private String statusstr; + /** + * 汇报要求 + */ + private String reportdesc; + + /** + * 处理过程信息数量。 + */ + private Integer processnum; + /** + * 最新的处理汇报信息 + */ + private String processmsg; + + public String getProcessmsg() { + return processmsg; + } + + public void setProcessmsg(String processmsg) { + this.processmsg = processmsg; + } + + public Integer getProcessnum() { + return processnum; + } + + public void setProcessnum(Integer processnum) { + this.processnum = processnum; + } + + public String getReportdesc() { + return reportdesc; + } + + public void setReportdesc(String reportdesc) { + this.reportdesc = reportdesc; + } + + public String getTaskid() { + return taskid; + } + + public void setTaskid(String taskid) { + this.taskid = taskid; + } + + + public String getTaskname() { + return taskname; + } + + public void setTaskname(String taskname) { + this.taskname = taskname; + } + + + public String getTaskdesc() { + return taskdesc; + } + + public void setTaskdesc(String taskdesc) { + this.taskdesc = taskdesc; + } + + + public Date getBegindate() { + return begindate; + } + + public void setBegindate(Date begindate) { + this.begindate = begindate; + } + + + public Date getEnddate() { + return enddate; + } + + public void setEnddate(Date enddate) { + this.enddate = enddate; + } + + + public Integer getFreqid() { + return freqid; + } + + public void setFreqid(Integer freqid) { + this.freqid = freqid; + } + + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + + public Date getUpdatetime() { + return updatetime; + } + + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; + } + + + public String getUserid() { + return userid; + } + + public void setUserid(String userid) { + this.userid = userid; + } + + + public Integer getReciveDeptid() { + return reciveDeptid; + } + + public void setReciveDeptid(Integer reciveDeptid) { + this.reciveDeptid = reciveDeptid; + } + + + public String getReciveUserid() { + return reciveUserid; + } + + public void setReciveUserid(String reciveUserid) { + this.reciveUserid = reciveUserid; + } + + + public Integer getStatusid() { + return statusid; + } + + public void setStatusid(Integer statusid) { + this.statusid = statusid; + } + + + public TaskinfoCon() { + super(); + } + + + public String getReciveDeptName() { + return reciveDeptName; + } + + public void setReciveDeptName(String reciveDeptName) { + this.reciveDeptName = reciveDeptName; + } + + public String getReciveUserName() { + return reciveUserName; + } + + public void setReciveUserName(String reciveUserName) { + this.reciveUserName = reciveUserName; + } + + public Integer getDeptid() { + return deptid; + } + + public void setDeptid(Integer deptid) { + this.deptid = deptid; + } + + public String getStatusstr() { + return statusstr; + } + + public void setStatusstr(String statusstr) { + this.statusstr = statusstr; + } +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/model/TaskinfoExample.java b/src/main/java/com/zsess/taskmanage/model/TaskinfoExample.java new file mode 100644 index 0000000000000000000000000000000000000000..239954439b596af5b7ecbb6b3c364794f2e5ee32 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/TaskinfoExample.java @@ -0,0 +1,1114 @@ +package com.zsess.taskmanage.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import cn.hutool.core.util.StrUtil; +/** + * 任务信息主表 TaskinfoExample + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-06 15:25:56 + */ +public class TaskinfoExample { + + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TaskinfoExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTaskidIsNull() { + addCriterion("taskid is null"); + return (Criteria) this; + } + + public Criteria andTaskidIsNotNull() { + addCriterion("taskid is not null"); + return (Criteria) this; + } + + public Criteria andTaskidEqualTo(String value) { + addCriterion("taskid =", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotEqualTo(String value) { + addCriterion("taskid <>", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidGreaterThan(String value) { + addCriterion("taskid >", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidGreaterThanOrEqualTo(String value) { + addCriterion("taskid >=", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLessThan(String value) { + addCriterion("taskid <", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLessThanOrEqualTo(String value) { + addCriterion("taskid <=", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLike(String value) { + addCriterion("taskid like", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotLike(String value) { + addCriterion("taskid not like", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidIn(List values) { + addCriterion("taskid in", values, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotIn(List values) { + addCriterion("taskid not in", values, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidBetween(String value1, String value2) { + addCriterion("taskid between", value1, value2, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotBetween(String value1, String value2) { + addCriterion("taskid not between", value1, value2, "taskid"); + return (Criteria) this; + } + + + public Criteria andTasknameIsNull() { + addCriterion("taskname is null"); + return (Criteria) this; + } + + public Criteria andTasknameIsNotNull() { + addCriterion("taskname is not null"); + return (Criteria) this; + } + + public Criteria andTasknameEqualTo(String value) { + addCriterion("taskname =", value, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameNotEqualTo(String value) { + addCriterion("taskname <>", value, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameGreaterThan(String value) { + addCriterion("taskname >", value, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameGreaterThanOrEqualTo(String value) { + addCriterion("taskname >=", value, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameLessThan(String value) { + addCriterion("taskname <", value, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameLessThanOrEqualTo(String value) { + addCriterion("taskname <=", value, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameLike(String value) { + addCriterion("taskname like", value, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameNotLike(String value) { + addCriterion("taskname not like", value, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameIn(List values) { + addCriterion("taskname in", values, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameNotIn(List values) { + addCriterion("taskname not in", values, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameBetween(String value1, String value2) { + addCriterion("taskname between", value1, value2, "taskname"); + return (Criteria) this; + } + + public Criteria andTasknameNotBetween(String value1, String value2) { + addCriterion("taskname not between", value1, value2, "taskname"); + return (Criteria) this; + } + + + public Criteria andTaskdescIsNull() { + addCriterion("taskdesc is null"); + return (Criteria) this; + } + + public Criteria andTaskdescIsNotNull() { + addCriterion("taskdesc is not null"); + return (Criteria) this; + } + + public Criteria andTaskdescEqualTo(String value) { + addCriterion("taskdesc =", value, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescNotEqualTo(String value) { + addCriterion("taskdesc <>", value, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescGreaterThan(String value) { + addCriterion("taskdesc >", value, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescGreaterThanOrEqualTo(String value) { + addCriterion("taskdesc >=", value, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescLessThan(String value) { + addCriterion("taskdesc <", value, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescLessThanOrEqualTo(String value) { + addCriterion("taskdesc <=", value, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescLike(String value) { + addCriterion("taskdesc like", value, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescNotLike(String value) { + addCriterion("taskdesc not like", value, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescIn(List values) { + addCriterion("taskdesc in", values, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescNotIn(List values) { + addCriterion("taskdesc not in", values, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescBetween(String value1, String value2) { + addCriterion("taskdesc between", value1, value2, "taskdesc"); + return (Criteria) this; + } + + public Criteria andTaskdescNotBetween(String value1, String value2) { + addCriterion("taskdesc not between", value1, value2, "taskdesc"); + return (Criteria) this; + } + + + public Criteria andBegindateIsNull() { + addCriterion("begindate is null"); + return (Criteria) this; + } + + public Criteria andBegindateIsNotNull() { + addCriterion("begindate is not null"); + return (Criteria) this; + } + + public Criteria andBegindateEqualTo(Date value) { + addCriterion("begindate =", value, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateNotEqualTo(Date value) { + addCriterion("begindate <>", value, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateGreaterThan(Date value) { + addCriterion("begindate >", value, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateGreaterThanOrEqualTo(Date value) { + addCriterion("begindate >=", value, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateLessThan(Date value) { + addCriterion("begindate <", value, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateLessThanOrEqualTo(Date value) { + addCriterion("begindate <=", value, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateLike(Date value) { + addCriterion("begindate like", value, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateNotLike(Date value) { + addCriterion("begindate not like", value, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateIn(List values) { + addCriterion("begindate in", values, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateNotIn(List values) { + addCriterion("begindate not in", values, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateBetween(Date value1, Date value2) { + addCriterion("begindate between", value1, value2, "begindate"); + return (Criteria) this; + } + + public Criteria andBegindateNotBetween(Date value1, Date value2) { + addCriterion("begindate not between", value1, value2, "begindate"); + return (Criteria) this; + } + + + public Criteria andEnddateIsNull() { + addCriterion("enddate is null"); + return (Criteria) this; + } + + public Criteria andEnddateIsNotNull() { + addCriterion("enddate is not null"); + return (Criteria) this; + } + + public Criteria andEnddateEqualTo(Date value) { + addCriterion("enddate =", value, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateNotEqualTo(Date value) { + addCriterion("enddate <>", value, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateGreaterThan(Date value) { + addCriterion("enddate >", value, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateGreaterThanOrEqualTo(Date value) { + addCriterion("enddate >=", value, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateLessThan(Date value) { + addCriterion("enddate <", value, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateLessThanOrEqualTo(Date value) { + addCriterion("enddate <=", value, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateLike(Date value) { + addCriterion("enddate like", value, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateNotLike(Date value) { + addCriterion("enddate not like", value, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateIn(List values) { + addCriterion("enddate in", values, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateNotIn(List values) { + addCriterion("enddate not in", values, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateBetween(Date value1, Date value2) { + addCriterion("enddate between", value1, value2, "enddate"); + return (Criteria) this; + } + + public Criteria andEnddateNotBetween(Date value1, Date value2) { + addCriterion("enddate not between", value1, value2, "enddate"); + return (Criteria) this; + } + + + public Criteria andFreqidIsNull() { + addCriterion("freqid is null"); + return (Criteria) this; + } + + public Criteria andFreqidIsNotNull() { + addCriterion("freqid is not null"); + return (Criteria) this; + } + + public Criteria andFreqidEqualTo(Integer value) { + addCriterion("freqid =", value, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidNotEqualTo(Integer value) { + addCriterion("freqid <>", value, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidGreaterThan(Integer value) { + addCriterion("freqid >", value, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidGreaterThanOrEqualTo(Integer value) { + addCriterion("freqid >=", value, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidLessThan(Integer value) { + addCriterion("freqid <", value, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidLessThanOrEqualTo(Integer value) { + addCriterion("freqid <=", value, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidLike(Long value) { + addCriterion("freqid like", value, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidNotLike(Long value) { + addCriterion("freqid not like", value, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidIn(List values) { + addCriterion("freqid in", values, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidNotIn(List values) { + addCriterion("freqid not in", values, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidBetween(Long value1, Long value2) { + addCriterion("freqid between", value1, value2, "freqid"); + return (Criteria) this; + } + + public Criteria andFreqidNotBetween(Integer value1, Integer value2) { + addCriterion("freqid not between", value1, value2, "freqid"); + return (Criteria) this; + } + + + public Criteria andCreatetimeIsNull() { + addCriterion("createtime is null"); + return (Criteria) this; + } + + public Criteria andCreatetimeIsNotNull() { + addCriterion("createtime is not null"); + return (Criteria) this; + } + + public Criteria andCreatetimeEqualTo(Date value) { + addCriterion("createtime =", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotEqualTo(Date value) { + addCriterion("createtime <>", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeGreaterThan(Date value) { + addCriterion("createtime >", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) { + addCriterion("createtime >=", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLessThan(Date value) { + addCriterion("createtime <", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLessThanOrEqualTo(Date value) { + addCriterion("createtime <=", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLike(Date value) { + addCriterion("createtime like", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotLike(Date value) { + addCriterion("createtime not like", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeIn(List values) { + addCriterion("createtime in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotIn(List values) { + addCriterion("createtime not in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeBetween(Date value1, Date value2) { + addCriterion("createtime between", value1, value2, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotBetween(Date value1, Date value2) { + addCriterion("createtime not between", value1, value2, "createtime"); + return (Criteria) this; + } + + + public Criteria andUpdatetimeIsNull() { + addCriterion("updatetime is null"); + return (Criteria) this; + } + + public Criteria andUpdatetimeIsNotNull() { + addCriterion("updatetime is not null"); + return (Criteria) this; + } + + public Criteria andUpdatetimeEqualTo(Date value) { + addCriterion("updatetime =", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeNotEqualTo(Date value) { + addCriterion("updatetime <>", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeGreaterThan(Date value) { + addCriterion("updatetime >", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) { + addCriterion("updatetime >=", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeLessThan(Date value) { + addCriterion("updatetime <", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeLessThanOrEqualTo(Date value) { + addCriterion("updatetime <=", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeLike(Date value) { + addCriterion("updatetime like", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeNotLike(Date value) { + addCriterion("updatetime not like", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeIn(List values) { + addCriterion("updatetime in", values, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeNotIn(List values) { + addCriterion("updatetime not in", values, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeBetween(Date value1, Date value2) { + addCriterion("updatetime between", value1, value2, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeNotBetween(Date value1, Date value2) { + addCriterion("updatetime not between", value1, value2, "updatetime"); + return (Criteria) this; + } + + + public Criteria andUseridIsNull() { + addCriterion("userid is null"); + return (Criteria) this; + } + + public Criteria andUseridIsNotNull() { + addCriterion("userid is not null"); + return (Criteria) this; + } + + public Criteria andUseridEqualTo(String value) { + addCriterion("userid =", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotEqualTo(String value) { + addCriterion("userid <>", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridGreaterThan(String value) { + addCriterion("userid >", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridGreaterThanOrEqualTo(String value) { + addCriterion("userid >=", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLessThan(String value) { + addCriterion("userid <", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLessThanOrEqualTo(String value) { + addCriterion("userid <=", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLike(String value) { + addCriterion("userid like", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotLike(String value) { + addCriterion("userid not like", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridIn(List values) { + addCriterion("userid in", values, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotIn(List values) { + addCriterion("userid not in", values, "userid"); + return (Criteria) this; + } + + public Criteria andUseridBetween(String value1, String value2) { + addCriterion("userid between", value1, value2, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotBetween(String value1, String value2) { + addCriterion("userid not between", value1, value2, "userid"); + return (Criteria) this; + } + + + public Criteria andReciveDeptidIsNull() { + addCriterion("recive_deptid is null"); + return (Criteria) this; + } + + public Criteria andReciveDeptidIsNotNull() { + addCriterion("recive_deptid is not null"); + return (Criteria) this; + } + + + + public Criteria andReciveDeptidEqualTo(Integer value) { + addCriterion("recive_deptid =", value, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidNotEqualTo(Integer value) { + addCriterion("recive_deptid <>", value, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidGreaterThan(Integer value) { + addCriterion("recive_deptid >", value, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidGreaterThanOrEqualTo(Integer value) { + addCriterion("recive_deptid >=", value, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidLessThan(Integer value) { + addCriterion("recive_deptid <", value, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidLessThanOrEqualTo(Integer value) { + addCriterion("recive_deptid <=", value, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidLike(Integer value) { + addCriterion("recive_deptid like", value, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidNotLike(Integer value) { + addCriterion("recive_deptid not like", value, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidIn(List values) { + addCriterion("recive_deptid in", values, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidNotIn(List values) { + addCriterion("recive_deptid not in", values, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidBetween(Integer value1, Integer value2) { + addCriterion("recive_deptid between", value1, value2, "reciveDeptid"); + return (Criteria) this; + } + + public Criteria andReciveDeptidNotBetween(Integer value1, Integer value2) { + addCriterion("recive_deptid not between", value1, value2, "reciveDeptid"); + return (Criteria) this; + } + + + public Criteria andReciveUseridIsNull() { + addCriterion("recive_userid is null"); + return (Criteria) this; + } + + public Criteria andReciveUseridIsNotNull() { + addCriterion("recive_userid is not null"); + return (Criteria) this; + } + + public Criteria andReciveUseridEqualTo(String value) { + addCriterion("recive_userid =", value, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridNotEqualTo(String value) { + addCriterion("recive_userid <>", value, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridGreaterThan(String value) { + addCriterion("recive_userid >", value, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridGreaterThanOrEqualTo(String value) { + addCriterion("recive_userid >=", value, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridLessThan(String value) { + addCriterion("recive_userid <", value, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridLessThanOrEqualTo(String value) { + addCriterion("recive_userid <=", value, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridLike(String value) { + addCriterion("recive_userid like", value, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridNotLike(String value) { + addCriterion("recive_userid not like", value, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridIn(List values) { + addCriterion("recive_userid in", values, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridNotIn(List values) { + addCriterion("recive_userid not in", values, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridBetween(String value1, String value2) { + addCriterion("recive_userid between", value1, value2, "reciveUserid"); + return (Criteria) this; + } + + public Criteria andReciveUseridNotBetween(String value1, String value2) { + addCriterion("recive_userid not between", value1, value2, "reciveUserid"); + return (Criteria) this; + } + + + public Criteria andStatusidIsNull() { + addCriterion("statusid is null"); + return (Criteria) this; + } + + public Criteria andStatusidIsNotNull() { + addCriterion("statusid is not null"); + return (Criteria) this; + } + + public Criteria andStatusidEqualTo(Integer value) { + addCriterion("statusid =", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidNotEqualTo(Integer value) { + addCriterion("statusid <>", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidGreaterThan(Integer value) { + addCriterion("statusid >", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidGreaterThanOrEqualTo(Integer value) { + addCriterion("statusid >=", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidLessThan(Integer value) { + addCriterion("statusid <", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidLessThanOrEqualTo(Integer value) { + addCriterion("statusid <=", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidLike(Integer value) { + addCriterion("statusid like", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidNotLike(Integer value) { + addCriterion("statusid not like", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidIn(List values) { + addCriterion("statusid in", values, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidNotIn(List values) { + addCriterion("statusid not in", values, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidBetween(Integer value1, Integer value2) { + addCriterion("statusid between", value1, value2, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidNotBetween(Integer value1, Integer value2) { + addCriterion("statusid not between", value1, value2, "statusid"); + return (Criteria) this; + } + public Criteria andDeptidEqualTo(Integer value) { + addCriterion("deptid =", value, "deptid"); + return (Criteria) this; + } + public Criteria andDeptidIn(List values) { + addCriterion("deptid in", values, "deptid"); + return (Criteria) this; + } + + public Criteria andDeptidNotIn(List values) { + addCriterion("deptid not in", values, "deptid"); + return (Criteria) this; + } + + public Criteria andLikeQuery(Taskinfo record) { + List list= new ArrayList(); + List list2= new ArrayList(); + StringBuffer buffer=new StringBuffer(); + + if(record.getTaskname()!=null&&StrUtil.isNotEmpty(record.getTaskname().toString())) { + list.add("ifnull(taskname,'')"); + } + if(record.getTaskdesc()!=null&&StrUtil.isNotEmpty(record.getTaskdesc().toString())) { + list.add("ifnull(taskdesc,'')"); + } + if(record.getReportdesc()!=null&&StrUtil.isNotEmpty(record.getReportdesc().toString())) { + list.add("ifnull(reportdesc,'')"); + } + + if(record.getTaskname()!=null&&StrUtil.isNotEmpty(record.getTaskname().toString())) { + list2.add("'%"+record.getTaskname()+"%'"); + } + if(record.getTaskdesc()!=null&&StrUtil.isNotEmpty(record.getTaskdesc().toString())) { + list2.add("'%"+record.getTaskdesc()+"%'"); + } + if(record.getReportdesc()!=null&&StrUtil.isNotEmpty(record.getReportdesc().toString())) { + list2.add("'%"+record.getReportdesc()+"%'"); + } + buffer.append(" CONCAT("); + buffer.append(StrUtil.join("",list)); + buffer.append(")"); + buffer.append("like CONCAT("); + + + buffer.append(StrUtil.join("",list2)); + + buffer.append(")"); + if(!" CONCAT()like CONCAT()".equals(buffer.toString())) { + addCriterion(buffer.toString()); + } + return (Criteria) this; + } + +} + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/model/TaskprocessInfo.java b/src/main/java/com/zsess/taskmanage/model/TaskprocessInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..85a8d8063855a65382bd50d530088f378b97b52d --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/TaskprocessInfo.java @@ -0,0 +1,184 @@ +package com.zsess.taskmanage.model; + +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import java.lang.Integer; + +/** + * 任务管理执行过程信息 TaskprocessInfo + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-15 10:42:35 + */ + @ApiModel(value="TaskprocessInfo", description="任务管理执行过程信息") +public class TaskprocessInfo implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** 任务处理过程id **/ + @ApiModelProperty(value = "任务处理过程id") + private String processid; + + /** 任务id **/ + @ApiModelProperty(value = "任务id") + private String taskid; + + /** 处理部门id **/ + @ApiModelProperty(value = "处理部门id") + private Integer detpid; + /** + * 部门名称 + */ + private String deptname; + /** 处理人员id **/ + @ApiModelProperty(value = "处理人员id") + private String userid; + /** + * 处理人员名称 + */ + private String username; + + /** 新增处理时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @ApiModelProperty(value = "新增处理时间") + private Date createtime; + + /** 更新时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @ApiModelProperty(value = "更新时间") + private Date updatetime; + + /** 任务状态id **/ + @ApiModelProperty(value = "任务状态id") + private Integer statusid; + + /** 任务处理信息说明 **/ + @ApiModelProperty(value = "任务处理信息说明") + private String processmsg; + + /** 任务处理信息状态 0 无效,1有效 **/ + @ApiModelProperty(value = "任务处理信息状态 0 无效,1有效") + private Integer processstatus; + + + public String getProcessid() { + return processid; + } + + public void setProcessid(String processid) { + this.processid = processid; + } + + + public String getTaskid() { + return taskid; + } + + public void setTaskid(String taskid) { + this.taskid = taskid; + } + + + public Integer getDetpid() { + return detpid; + } + + public void setDetpid(Integer detpid) { + this.detpid = detpid; + } + + + public String getUserid() { + return userid; + } + + public void setUserid(String userid) { + this.userid = userid; + } + + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + + public Date getUpdatetime() { + return updatetime; + } + + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; + } + + + public Integer getStatusid() { + return statusid; + } + + public void setStatusid(Integer statusid) { + this.statusid = statusid; + } + + + public String getProcessmsg() { + return processmsg; + } + + public void setProcessmsg(String processmsg) { + this.processmsg = processmsg; + } + + + public Integer getProcessstatus() { + return processstatus; + } + + public void setProcessstatus(Integer processstatus) { + this.processstatus = processstatus; + } + + + public TaskprocessInfo() { + super(); + } + + + public TaskprocessInfo(String processid,String taskid,Integer detpid,String userid,Date createtime,Date updatetime,Integer statusid,String processmsg,Integer processstatus) { + + this.processid = processid; + this.taskid = taskid; + this.detpid = detpid; + this.userid = userid; + this.createtime = createtime; + this.updatetime = updatetime; + this.statusid = statusid; + this.processmsg = processmsg; + this.processstatus = processstatus; + + } + + public String getDeptname() { + return deptname; + } + + public void setDeptname(String deptname) { + this.deptname = deptname; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/model/TaskprocessInfoExample.java b/src/main/java/com/zsess/taskmanage/model/TaskprocessInfoExample.java new file mode 100644 index 0000000000000000000000000000000000000000..feddb90bb27858501fe0191439d69afb8ac92dd5 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/TaskprocessInfoExample.java @@ -0,0 +1,923 @@ +package com.zsess.taskmanage.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import cn.hutool.core.util.StrUtil; +/** + * 任务管理执行过程信息 TaskprocessInfoExample + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-15 10:42:35 + */ +public class TaskprocessInfoExample { + + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TaskprocessInfoExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andProcessidIsNull() { + addCriterion("processid is null"); + return (Criteria) this; + } + + public Criteria andProcessidIsNotNull() { + addCriterion("processid is not null"); + return (Criteria) this; + } + + public Criteria andProcessidEqualTo(String value) { + addCriterion("processid =", value, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidNotEqualTo(String value) { + addCriterion("processid <>", value, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidGreaterThan(String value) { + addCriterion("processid >", value, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidGreaterThanOrEqualTo(String value) { + addCriterion("processid >=", value, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidLessThan(String value) { + addCriterion("processid <", value, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidLessThanOrEqualTo(String value) { + addCriterion("processid <=", value, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidLike(String value) { + addCriterion("processid like", value, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidNotLike(String value) { + addCriterion("processid not like", value, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidIn(List values) { + addCriterion("processid in", values, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidNotIn(List values) { + addCriterion("processid not in", values, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidBetween(String value1, String value2) { + addCriterion("processid between", value1, value2, "processid"); + return (Criteria) this; + } + + public Criteria andProcessidNotBetween(String value1, String value2) { + addCriterion("processid not between", value1, value2, "processid"); + return (Criteria) this; + } + + + public Criteria andTaskidIsNull() { + addCriterion("taskid is null"); + return (Criteria) this; + } + + public Criteria andTaskidIsNotNull() { + addCriterion("taskid is not null"); + return (Criteria) this; + } + + public Criteria andTaskidEqualTo(String value) { + addCriterion("taskid =", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotEqualTo(String value) { + addCriterion("taskid <>", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidGreaterThan(String value) { + addCriterion("taskid >", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidGreaterThanOrEqualTo(String value) { + addCriterion("taskid >=", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLessThan(String value) { + addCriterion("taskid <", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLessThanOrEqualTo(String value) { + addCriterion("taskid <=", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidLike(String value) { + addCriterion("taskid like", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotLike(String value) { + addCriterion("taskid not like", value, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidIn(List values) { + addCriterion("taskid in", values, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotIn(List values) { + addCriterion("taskid not in", values, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidBetween(String value1, String value2) { + addCriterion("taskid between", value1, value2, "taskid"); + return (Criteria) this; + } + + public Criteria andTaskidNotBetween(String value1, String value2) { + addCriterion("taskid not between", value1, value2, "taskid"); + return (Criteria) this; + } + + + public Criteria andDetpidIsNull() { + addCriterion("detpid is null"); + return (Criteria) this; + } + + public Criteria andDetpidIsNotNull() { + addCriterion("detpid is not null"); + return (Criteria) this; + } + + public Criteria andDetpidEqualTo(Integer value) { + addCriterion("detpid =", value, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidNotEqualTo(Integer value) { + addCriterion("detpid <>", value, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidGreaterThan(Integer value) { + addCriterion("detpid >", value, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidGreaterThanOrEqualTo(Integer value) { + addCriterion("detpid >=", value, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidLessThan(Integer value) { + addCriterion("detpid <", value, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidLessThanOrEqualTo(Integer value) { + addCriterion("detpid <=", value, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidLike(Integer value) { + addCriterion("detpid like", value, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidNotLike(Integer value) { + addCriterion("detpid not like", value, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidIn(List values) { + addCriterion("detpid in", values, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidNotIn(List values) { + addCriterion("detpid not in", values, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidBetween(Integer value1, Integer value2) { + addCriterion("detpid between", value1, value2, "detpid"); + return (Criteria) this; + } + + public Criteria andDetpidNotBetween(Integer value1, Integer value2) { + addCriterion("detpid not between", value1, value2, "detpid"); + return (Criteria) this; + } + + + public Criteria andUseridIsNull() { + addCriterion("userid is null"); + return (Criteria) this; + } + + public Criteria andUseridIsNotNull() { + addCriterion("userid is not null"); + return (Criteria) this; + } + + public Criteria andUseridEqualTo(String value) { + addCriterion("userid =", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotEqualTo(String value) { + addCriterion("userid <>", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridGreaterThan(String value) { + addCriterion("userid >", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridGreaterThanOrEqualTo(String value) { + addCriterion("userid >=", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLessThan(String value) { + addCriterion("userid <", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLessThanOrEqualTo(String value) { + addCriterion("userid <=", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLike(String value) { + addCriterion("userid like", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotLike(String value) { + addCriterion("userid not like", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridIn(List values) { + addCriterion("userid in", values, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotIn(List values) { + addCriterion("userid not in", values, "userid"); + return (Criteria) this; + } + + public Criteria andUseridBetween(String value1, String value2) { + addCriterion("userid between", value1, value2, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotBetween(String value1, String value2) { + addCriterion("userid not between", value1, value2, "userid"); + return (Criteria) this; + } + + + public Criteria andCreatetimeIsNull() { + addCriterion("createtime is null"); + return (Criteria) this; + } + + public Criteria andCreatetimeIsNotNull() { + addCriterion("createtime is not null"); + return (Criteria) this; + } + + public Criteria andCreatetimeEqualTo(Date value) { + addCriterion("createtime =", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotEqualTo(Date value) { + addCriterion("createtime <>", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeGreaterThan(Date value) { + addCriterion("createtime >", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) { + addCriterion("createtime >=", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLessThan(Date value) { + addCriterion("createtime <", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLessThanOrEqualTo(Date value) { + addCriterion("createtime <=", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeLike(Date value) { + addCriterion("createtime like", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotLike(Date value) { + addCriterion("createtime not like", value, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeIn(List values) { + addCriterion("createtime in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotIn(List values) { + addCriterion("createtime not in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeBetween(Date value1, Date value2) { + addCriterion("createtime between", value1, value2, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotBetween(Date value1, Date value2) { + addCriterion("createtime not between", value1, value2, "createtime"); + return (Criteria) this; + } + + + public Criteria andUpdatetimeIsNull() { + addCriterion("updatetime is null"); + return (Criteria) this; + } + + public Criteria andUpdatetimeIsNotNull() { + addCriterion("updatetime is not null"); + return (Criteria) this; + } + + public Criteria andUpdatetimeEqualTo(Date value) { + addCriterion("updatetime =", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeNotEqualTo(Date value) { + addCriterion("updatetime <>", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeGreaterThan(Date value) { + addCriterion("updatetime >", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) { + addCriterion("updatetime >=", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeLessThan(Date value) { + addCriterion("updatetime <", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeLessThanOrEqualTo(Date value) { + addCriterion("updatetime <=", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeLike(Date value) { + addCriterion("updatetime like", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeNotLike(Date value) { + addCriterion("updatetime not like", value, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeIn(List values) { + addCriterion("updatetime in", values, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeNotIn(List values) { + addCriterion("updatetime not in", values, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeBetween(Date value1, Date value2) { + addCriterion("updatetime between", value1, value2, "updatetime"); + return (Criteria) this; + } + + public Criteria andUpdatetimeNotBetween(Date value1, Date value2) { + addCriterion("updatetime not between", value1, value2, "updatetime"); + return (Criteria) this; + } + + + public Criteria andStatusidIsNull() { + addCriterion("statusid is null"); + return (Criteria) this; + } + + public Criteria andStatusidIsNotNull() { + addCriterion("statusid is not null"); + return (Criteria) this; + } + + public Criteria andStatusidEqualTo(Integer value) { + addCriterion("statusid =", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidNotEqualTo(Integer value) { + addCriterion("statusid <>", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidGreaterThan(Integer value) { + addCriterion("statusid >", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidGreaterThanOrEqualTo(Integer value) { + addCriterion("statusid >=", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidLessThan(Integer value) { + addCriterion("statusid <", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidLessThanOrEqualTo(Integer value) { + addCriterion("statusid <=", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidLike(Integer value) { + addCriterion("statusid like", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidNotLike(Integer value) { + addCriterion("statusid not like", value, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidIn(List values) { + addCriterion("statusid in", values, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidNotIn(List values) { + addCriterion("statusid not in", values, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidBetween(Integer value1, Integer value2) { + addCriterion("statusid between", value1, value2, "statusid"); + return (Criteria) this; + } + + public Criteria andStatusidNotBetween(Integer value1, Integer value2) { + addCriterion("statusid not between", value1, value2, "statusid"); + return (Criteria) this; + } + + + public Criteria andProcessmsgIsNull() { + addCriterion("processmsg is null"); + return (Criteria) this; + } + + public Criteria andProcessmsgIsNotNull() { + addCriterion("processmsg is not null"); + return (Criteria) this; + } + + public Criteria andProcessmsgEqualTo(String value) { + addCriterion("processmsg =", value, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgNotEqualTo(String value) { + addCriterion("processmsg <>", value, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgGreaterThan(String value) { + addCriterion("processmsg >", value, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgGreaterThanOrEqualTo(String value) { + addCriterion("processmsg >=", value, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgLessThan(String value) { + addCriterion("processmsg <", value, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgLessThanOrEqualTo(String value) { + addCriterion("processmsg <=", value, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgLike(String value) { + addCriterion("processmsg like", value, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgNotLike(String value) { + addCriterion("processmsg not like", value, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgIn(List values) { + addCriterion("processmsg in", values, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgNotIn(List values) { + addCriterion("processmsg not in", values, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgBetween(String value1, String value2) { + addCriterion("processmsg between", value1, value2, "processmsg"); + return (Criteria) this; + } + + public Criteria andProcessmsgNotBetween(String value1, String value2) { + addCriterion("processmsg not between", value1, value2, "processmsg"); + return (Criteria) this; + } + + + public Criteria andProcessstatusIsNull() { + addCriterion("processstatus is null"); + return (Criteria) this; + } + + public Criteria andProcessstatusIsNotNull() { + addCriterion("processstatus is not null"); + return (Criteria) this; + } + + public Criteria andProcessstatusEqualTo(Integer value) { + addCriterion("processstatus =", value, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusNotEqualTo(Integer value) { + addCriterion("processstatus <>", value, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusGreaterThan(Integer value) { + addCriterion("processstatus >", value, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusGreaterThanOrEqualTo(Integer value) { + addCriterion("processstatus >=", value, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusLessThan(Integer value) { + addCriterion("processstatus <", value, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusLessThanOrEqualTo(Integer value) { + addCriterion("processstatus <=", value, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusLike(Integer value) { + addCriterion("processstatus like", value, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusNotLike(Integer value) { + addCriterion("processstatus not like", value, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusIn(List values) { + addCriterion("processstatus in", values, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusNotIn(List values) { + addCriterion("processstatus not in", values, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusBetween(Integer value1, Integer value2) { + addCriterion("processstatus between", value1, value2, "processstatus"); + return (Criteria) this; + } + + public Criteria andProcessstatusNotBetween(Integer value1, Integer value2) { + addCriterion("processstatus not between", value1, value2, "processstatus"); + return (Criteria) this; + } + + + public Criteria andLikeQuery(TaskprocessInfo record) { + List list= new ArrayList(); + List list2= new ArrayList(); + StringBuffer buffer=new StringBuffer(); + + if(record.getProcessid()!=null&&StrUtil.isNotEmpty(record.getProcessid().toString())) { + list.add("ifnull(processid,'')"); + } + if(record.getTaskid()!=null&&StrUtil.isNotEmpty(record.getTaskid().toString())) { + list.add("ifnull(taskid,'')"); + } + if(record.getDetpid()!=null&&StrUtil.isNotEmpty(record.getDetpid().toString())) { + list.add("ifnull(detpid,'')"); + } + if(record.getUserid()!=null&&StrUtil.isNotEmpty(record.getUserid().toString())) { + list.add("ifnull(userid,'')"); + } + if(record.getCreatetime()!=null&&StrUtil.isNotEmpty(record.getCreatetime().toString())) { + list.add("ifnull(createtime,'')"); + } + if(record.getUpdatetime()!=null&&StrUtil.isNotEmpty(record.getUpdatetime().toString())) { + list.add("ifnull(updatetime,'')"); + } + if(record.getStatusid()!=null&&StrUtil.isNotEmpty(record.getStatusid().toString())) { + list.add("ifnull(statusid,'')"); + } + if(record.getProcessmsg()!=null&&StrUtil.isNotEmpty(record.getProcessmsg().toString())) { + list.add("ifnull(processmsg,'')"); + } + if(record.getProcessstatus()!=null&&StrUtil.isNotEmpty(record.getProcessstatus().toString())) { + list.add("ifnull(processstatus,'')"); + } + if(record.getProcessid()!=null&&StrUtil.isNotEmpty(record.getProcessid().toString())) { + list2.add("'%"+record.getProcessid()+"%'"); + } + if(record.getTaskid()!=null&&StrUtil.isNotEmpty(record.getTaskid().toString())) { + list2.add("'%"+record.getTaskid()+"%'"); + } + if(record.getDetpid()!=null&&StrUtil.isNotEmpty(record.getDetpid().toString())) { + list2.add("'%"+record.getDetpid()+"%'"); + } + if(record.getUserid()!=null&&StrUtil.isNotEmpty(record.getUserid().toString())) { + list2.add("'%"+record.getUserid()+"%'"); + } + if(record.getCreatetime()!=null&&StrUtil.isNotEmpty(record.getCreatetime().toString())) { + list2.add("'%"+record.getCreatetime()+"%'"); + } + if(record.getUpdatetime()!=null&&StrUtil.isNotEmpty(record.getUpdatetime().toString())) { + list2.add("'%"+record.getUpdatetime()+"%'"); + } + if(record.getStatusid()!=null&&StrUtil.isNotEmpty(record.getStatusid().toString())) { + list2.add("'%"+record.getStatusid()+"%'"); + } + if(record.getProcessmsg()!=null&&StrUtil.isNotEmpty(record.getProcessmsg().toString())) { + list2.add("'%"+record.getProcessmsg()+"%'"); + } + if(record.getProcessstatus()!=null&&StrUtil.isNotEmpty(record.getProcessstatus().toString())) { + list2.add("'%"+record.getProcessstatus()+"%'"); + } + + buffer.append(" CONCAT("); + buffer.append(StrUtil.join("",list)); + buffer.append(")"); + buffer.append("like CONCAT("); + + + buffer.append(StrUtil.join("",list2)); + + buffer.append(")"); + if(!" CONCAT()like CONCAT()".equals(buffer.toString())) { + addCriterion(buffer.toString()); + } + return (Criteria) this; + } + +} + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/zsess/taskmanage/model/common/CommonIdNameBo.java b/src/main/java/com/zsess/taskmanage/model/common/CommonIdNameBo.java new file mode 100644 index 0000000000000000000000000000000000000000..57c238fecb7bac79dbab4b0e975d3bd941b00fdb --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/model/common/CommonIdNameBo.java @@ -0,0 +1,33 @@ +package com.zsess.taskmanage.model.common; + +import java.io.Serializable; + +public class CommonIdNameBo implements Serializable { + + private static final long serialVersionUID = 1L; + + private String id; + + private String name; + + public CommonIdNameBo(String id, String text) { + this.id = id; + this.name = text; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/java/com/zsess/taskmanage/service/DeptTaskInfoService.java b/src/main/java/com/zsess/taskmanage/service/DeptTaskInfoService.java new file mode 100644 index 0000000000000000000000000000000000000000..40ed9df68dbcfbc126193456686e2ef24ff2002a --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/service/DeptTaskInfoService.java @@ -0,0 +1,42 @@ +package com.zsess.taskmanage.service; + +import com.zsess.taskmanage.mapper.DeptTaskInfoDao; +import com.zsess.taskmanage.model.DeptTaskInfo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class DeptTaskInfoService { + /** + * 日志 + */ + private static Logger logger = LoggerFactory.getLogger(DeptTaskInfoService.class); + @Resource + private DeptTaskInfoDao deptTaskInfoDao; + + /** + * 获取所有部门待处理任务数. + * @return + */ + public ListgetDeptExeTaskInfoForControl() { + logger.info("获取部门待处理的任务数量"); + final List deptAddtaskInfo = deptTaskInfoDao.getDeptAddtaskInfo(); + final List deptExetaskInfo = deptTaskInfoDao.getDeptExetaskInfo(); + deptAddtaskInfo.addAll(deptExetaskInfo); + return deptAddtaskInfo; + } + + /** + * + * @return + */ + public ListgetDeptTaskCompleteNum() { + logger.info("获取部门已处理完成的任务数量"); + final List depttaskCompleteNum = deptTaskInfoDao.getDeptTaskCompleteNum(); + return depttaskCompleteNum; + } +} diff --git a/src/main/java/com/zsess/taskmanage/service/TaskManageComService.java b/src/main/java/com/zsess/taskmanage/service/TaskManageComService.java new file mode 100644 index 0000000000000000000000000000000000000000..cb8d86111604b3d5d78dfd16bfc143000cc2b4ea --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/service/TaskManageComService.java @@ -0,0 +1,66 @@ +package com.zsess.taskmanage.service; + +import com.zsess.taskmanage.model.TaskStatus; +import com.zsess.taskmanage.model.common.CommonIdNameBo; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + *通过服务 + */ +@Service +public class TaskManageComService { + /** + * 获取任务状态数据. + * @return getTaskStatusList . + */ + public List getTaskStatusList() { + + final List taskStatusList = new ArrayList(); + + final CommonIdNameBo status0 = new CommonIdNameBo(String.valueOf(TaskStatus.ADD.getIndex()),TaskStatus.ADD.getName()); + taskStatusList.add(status0); + final CommonIdNameBo status1 = new CommonIdNameBo(String.valueOf(TaskStatus.ASSIGN.getIndex()),TaskStatus.ASSIGN.getName());; + taskStatusList.add(status1); + final CommonIdNameBo status2 = new CommonIdNameBo(String.valueOf(TaskStatus.ASSIGNCONFIRM.getIndex()),TaskStatus.ASSIGNCONFIRM.getName()); + taskStatusList.add(status2); + final CommonIdNameBo status3 = new CommonIdNameBo(String.valueOf(TaskStatus.ASSIGNBACK.getIndex()),TaskStatus.ASSIGNBACK.getName()); + taskStatusList.add(status3); + final CommonIdNameBo status4 = new CommonIdNameBo(String.valueOf(TaskStatus.ACCEPTED.getIndex()),TaskStatus.ACCEPTED.getName()); + taskStatusList.add(status4); + final CommonIdNameBo status5 = new CommonIdNameBo(String.valueOf(TaskStatus.EXECUTING.getIndex()),TaskStatus.EXECUTING.getName()); + taskStatusList.add(status5); + final CommonIdNameBo status6 = new CommonIdNameBo(String.valueOf(TaskStatus.COMPLETEAPPLY.getIndex()),TaskStatus.COMPLETEAPPLY.getName()); + taskStatusList.add(status6); + final CommonIdNameBo status7 = new CommonIdNameBo(String.valueOf(TaskStatus.COMPLETED.getIndex()),TaskStatus.COMPLETED.getName()); + taskStatusList.add(status7); + final CommonIdNameBo status8 = new CommonIdNameBo(String.valueOf(TaskStatus.COMPLETEBACK.getIndex()),TaskStatus.COMPLETEBACK.getName()); + taskStatusList.add(status8); + + return taskStatusList; + } + + /** + * 获取任务汇报频率ID名称数据集. + * @return + */ + public List getTaskFreqList() { + final List taskFreqList = new ArrayList(); + final CommonIdNameBo freq0 = new CommonIdNameBo("0","天"); + taskFreqList.add(freq0); + final CommonIdNameBo freq1 = new CommonIdNameBo("1","周"); + taskFreqList.add(freq1); + final CommonIdNameBo freq2 = new CommonIdNameBo("2","月"); + taskFreqList.add(freq2); + final CommonIdNameBo freq3 = new CommonIdNameBo("3","季"); + taskFreqList.add(freq3); + final CommonIdNameBo freq4 = new CommonIdNameBo("4","年"); + taskFreqList.add(freq4); + return taskFreqList; + } + + + +} diff --git a/src/main/java/com/zsess/taskmanage/service/TaskfileInfoService.java b/src/main/java/com/zsess/taskmanage/service/TaskfileInfoService.java new file mode 100644 index 0000000000000000000000000000000000000000..daad80bf8fd79a904025f510ee32c169b91fe947 --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/service/TaskfileInfoService.java @@ -0,0 +1,245 @@ +package com.zsess.taskmanage.service; + +import java.util.Date; +import java.util.List; + +import com.fc.test.common.base.BaseService; +import com.fc.test.common.support.ConvertUtil; +import com.fc.test.mapper.auto.TsysDatasMapper; +import com.fc.test.mapper.custom.TsysDatasDao; +import com.fc.test.model.auto.TsysDatas; +import com.fc.test.model.auto.TsysUser; +import com.fc.test.model.custom.Tablepar; +import com.fc.test.service.SysFileService; +import com.fc.test.shiro.util.ShiroUtils; +import com.fc.test.util.SnowflakeIdWorker; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import cn.hutool.core.util.StrUtil; +import com.zsess.taskmanage.mapper.TaskfileInfoMapper; +import com.zsess.taskmanage.model.TaskfileInfo; +import com.zsess.taskmanage.model.TaskfileInfoExample; +import com.fc.test.util.StringUtils; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; + +/** + * 任务管理附件信息表 TaskfileInfoService + * @Title: TaskfileInfoService.java  + * @Package com.zsess.taskmanage.service  + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-16 15:39:49   + **/ +@Service +public class TaskfileInfoService implements BaseService { + /** + * 日志 + */ + private static Logger logger = LoggerFactory.getLogger(TaskfileInfoService.class); + + @Resource + private TaskfileInfoMapper taskfileInfoMapper; + + @Resource + private TsysDatasDao tsysDatasDao; + @Resource + private SysFileService sysFileService; + //文件存储mapper + @Resource + private TsysDatasMapper tsysDatasMapper; + /** + * 分页查询 + * @param tablepar + * @param record + * @return + */ + public PageInfo list(Tablepar tablepar, TaskfileInfo record){ + TaskfileInfoExample testExample=new TaskfileInfoExample(); + testExample.createCriteria().andLikeQuery(record); + testExample.setOrderByClause("id ASC"); + if(StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) +" "+tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list= taskfileInfoMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + + /** + * 分页列表查询. + * @param tablepar + * @param taskid + * @return + */ + public PageInfo getPageListByTaskid(Tablepar tablepar, String taskid){ + final List list= this.getListBytaskid(taskid); + final PageInfo pageInfo = new PageInfo(list); + return pageInfo; + + } + + /** + * 获取任务执行过程中的附件分页列表. + * @param tablepar + * @param taskid + * @return + */ + public PageInfo getPageListOftaskProcessFileByTaskid(Tablepar tablepar, String taskid){ + final List list= this.getTaskFileListBytaskidAndfiletype(taskid, Integer.valueOf(1)); + final PageInfo pageInfo = new PageInfo(list); + return pageInfo; + + } + + @Override + @Transactional + public int deleteByPrimaryKey(String ids) { + logger.info("附件信息与本地文件同时删除"); + List lista= ConvertUtil.toListStrArray(ids); + //删除本地文件 + List datas=tsysDatasDao.selectByTaskfileids(lista); + for (TsysDatas tsysDatas : datas) { + sysFileService.deletefile(tsysDatas); + //删除文件存储表 + tsysDatasMapper.deleteByPrimaryKey(tsysDatas.getId()); + } + + final TaskfileInfoExample example=new TaskfileInfoExample(); + example.createCriteria().andIdIn(lista); + final int rs = taskfileInfoMapper.deleteByExample(example); + return rs; + } + + public List getListBytaskid(String taskid) { + final TaskfileInfoExample example=new TaskfileInfoExample(); + example.createCriteria().andTaskidEqualTo(taskid); + final List list= this.selectByExample(example); + return list; + } + + public List getTaskFileListBytaskidAndfiletype(String taskid, Integer filetype) { + final TaskfileInfoExample example=new TaskfileInfoExample(); + example.createCriteria().andTaskidEqualTo(taskid).andFiletypeEqualTo(filetype); + final List list= this.selectByExample(example); + return list; + } + + @Override + public TaskfileInfo selectByPrimaryKey(String id) { + + return taskfileInfoMapper.selectByPrimaryKey(id); + + } + + + @Override + public int updateByPrimaryKeySelective(TaskfileInfo record) { + return taskfileInfoMapper.updateByPrimaryKeySelective(record); + } + + + /** + * 添加 + */ + @Override + public int insertSelective(TaskfileInfo record) { + //添加雪花主键id + if(StringUtils.isEmpty(record.getId())) { + record.setId(SnowflakeIdWorker.getUUID()); + } + record.setCreatetime(new Date()); + final TsysUser user = ShiroUtils.getUser(); + record.setCreateuserid(user.getId()); + record.setCreateusername(user.getUsername()); + record.setCreatedeptid(user.getDeptid()); + record.setCreatedeptname(user.getDeptName()); + return taskfileInfoMapper.insertSelective(record); + } + /** + * 添加任务附件信息 + */ + public int insertSelective(TaskfileInfo record, String dataId) { + record.setDataId(dataId); + final int rs = this.insertSelective(record); + return rs; +// return taskfileInfoMapper.insertSelective(record); + } + + + @Override + public int updateByExampleSelective(TaskfileInfo record, TaskfileInfoExample example) { + + return taskfileInfoMapper.updateByExampleSelective(record, example); + } + + + @Override + public int updateByExample(TaskfileInfo record, TaskfileInfoExample example) { + + return taskfileInfoMapper.updateByExample(record, example); + } + + @Override + public List selectByExample(TaskfileInfoExample example) { + + return taskfileInfoMapper.selectByExample(example); + } + + + @Override + public long countByExample(TaskfileInfoExample example) { + + return taskfileInfoMapper.countByExample(example); + } + + + @Override + public int deleteByExample(TaskfileInfoExample example) { + + return taskfileInfoMapper.deleteByExample(example); + } + + /** + * 检查name + * @param taskfileInfo + * @return + */ + public int checkNameUnique(TaskfileInfo taskfileInfo){ + TaskfileInfoExample example=new TaskfileInfoExample(); + example.createCriteria().andTaskidEqualTo(taskfileInfo.getTaskid()); + List list=taskfileInfoMapper.selectByExample(example); + return list.size(); + } + /** + * 根据文件列表id查询出对应的文件信息,已经支持多个图片获取 + * @param fileid + * @return + */ + public List queryTsysDataByTaskfileID(String fileid){ + List lista= ConvertUtil.toListStrArray(fileid); + List datas=tsysDatasDao.selectByTaskfileids(lista); + return datas; + } + + /** + * 通过任务id 获取当前任务的所有文件信息. + * @param taskid 任务id + * @return + */ + public List queryTsysDataByTaskid(String taskid){ +// List lista= ConvertUtil.toListStrArray(fileid); + final List datas=tsysDatasDao.selectByTaskid(taskid); + return datas; + } + + public List getTaskFileByTaskidAndFiletype(String taskid, Integer filetype) { + final List datas= tsysDatasDao.getTaskFileByTaskidAndFiletype(taskid,filetype); + return datas; + } +} diff --git a/src/main/java/com/zsess/taskmanage/service/TaskinfoService.java b/src/main/java/com/zsess/taskmanage/service/TaskinfoService.java new file mode 100644 index 0000000000000000000000000000000000000000..5285185160e03cb8c47c9cbef8c541264fc05cee --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/service/TaskinfoService.java @@ -0,0 +1,348 @@ +package com.zsess.taskmanage.service; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import com.fc.test.common.base.BaseService; +import com.fc.test.common.support.ConvertUtil; +import com.fc.test.model.auto.TsysUser; +import com.fc.test.model.custom.Tablepar; +import com.fc.test.shiro.util.ShiroUtils; +import com.fc.test.util.SimpleEmailUtil; +import com.fc.test.util.SnowflakeIdWorker; +import com.github.pagehelper.util.StringUtil; +import com.zsess.taskmanage.model.TaskStatus; +import org.apache.ibatis.annotations.Param; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import cn.hutool.core.util.StrUtil; +import com.zsess.taskmanage.mapper.TaskinfoMapper; +import com.zsess.taskmanage.model.Taskinfo; +import com.zsess.taskmanage.model.TaskinfoExample; +import com.fc.test.util.StringUtils; + +import javax.annotation.Resource; + +/** + * 任务信息主表 TaskinfoService + * @Title: TaskinfoService.java  + * @Package com.zsess.taskmanage.service  + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-06 15:25:56   + **/ +@Service +public class TaskinfoService implements BaseService { + + private static Logger logger = LoggerFactory.getLogger(TaskinfoService.class); + + @Resource + private TaskinfoMapper taskinfoMapper; + + /** + * 分页查询 + * @param tablepar + * @param record + * @return + */ + public PageInfo listForAudiLeader(Tablepar tablepar, Taskinfo record){ + final TaskinfoExample testExample=new TaskinfoExample(); + TaskinfoExample.Criteria con = testExample.createCriteria(); + final ListstatusCon = new ArrayList(); + //审批列表条件1,不处理新增以及退回的任务信息 + if(null == record.getStatusid()) { + //1分配 + statusCon.add(1); + //2 分配确认 +// statusCon.add(2); + //6 任务完成申请 + statusCon.add(6); + con.andStatusidIn(statusCon); + } else { + statusCon.add(record.getStatusid()); + con.andStatusidIn(statusCon); + } + this.genComconToExampleForList(record, con); + + //审批条件2、处理自己发起的任务信息 + final ListstatusCon2 = new ArrayList(); + //新增 + statusCon2.add(0); + //新增退回 + statusCon2.add(3); + TaskinfoExample.Criteria con2 = testExample.createCriteria(); + final String userid = ShiroUtils.getUserId(); + con2.andStatusidIn(statusCon2).andUseridEqualTo(userid); + testExample.or(con2); + + testExample.setOrderByClause("taskid DESC"); + if(StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) +" "+tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list= taskinfoMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + + /** + * 任务发起人员待处理任务列表. + * @param tablepar + * @param record + * @return + */ + public PageInfo listForAddTask(Tablepar tablepar, Taskinfo record) { + logger.info("任务发起人员待处理任务列表取数:listForAddTask"); + final TaskinfoExample testExample = new TaskinfoExample(); + TaskinfoExample.Criteria con = testExample.createCriteria(); + final String userid = ShiroUtils.getUserId(); + con.andUseridEqualTo(userid); + final List statusCon = new ArrayList(); + statusCon.addAll(ConvertUtil.toListIntArray("0,3")); + if (record.getStatusid() != null) { + statusCon.clear(); + statusCon.add(record.getStatusid()); + } + con.andStatusidIn(statusCon); + this.genComconToExampleForList(record, con); + testExample.setOrderByClause("taskid DESC"); + if (StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) + " " + tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list = taskinfoMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + + /** + * 分页查询 + * @param tablepar + * @param record + * @return + */ + public PageInfo listForView(Tablepar tablepar, Taskinfo record){ + final TaskinfoExample testExample=new TaskinfoExample(); + TaskinfoExample.Criteria con = testExample.createCriteria(); + final Integer deptid = record.getDeptid(); + if(record.getDeptid()!=null) { + con.andDeptidEqualTo(deptid); + final Liststatusids1 = ConvertUtil.toListIntArray("0,3"); + con.andStatusidIn(statusids1); + + TaskinfoExample.Criteria con2 = testExample.createCriteria(); + con2.andReciveDeptidEqualTo(deptid); + final Liststatusids2 = ConvertUtil.toListIntArray("2,4,5,8"); + con2.andStatusidIn(statusids2); + testExample.or(con2); + } else { + final String statusstr = record.getStatusstr(); + if (StringUtils.isNotEmpty(statusstr)) { + final Liststatusids = ConvertUtil.toListIntArray(statusstr); + con.andStatusidIn(statusids); + } + final Integer reciveDeptid = record.getReciveDeptid(); + if (null!= reciveDeptid) { + con.andReciveDeptidEqualTo(reciveDeptid); + } + } + + + testExample.setOrderByClause("taskid DESC"); + if(StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) +" "+tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list= taskinfoMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + + /** + * 设置通用查询条件. + * @param record + * @param con + */ + private void genComconToExampleForList(Taskinfo record, TaskinfoExample.Criteria con) { + con.andLikeQuery(record); + if(null!= record.getBegindate() && null!= record.getEnddate()) { + con.andBegindateBetween(record.getBegindate(), record.getEnddate()); + con.andEnddateBetween(record.getBegindate(), record.getEnddate()); + } else if(null!= record.getBegindate()) { + con.andBegindateGreaterThanOrEqualTo(record.getBegindate()); + } else if (null != record.getEnddate()) { + con.andEnddateLessThanOrEqualTo(record.getBegindate()); + } + if(null != record.getReciveDeptid() && StringUtil.isNotEmpty(record.getReciveDeptid().toString())) { + con.andReciveDeptidEqualTo(record.getReciveDeptid()); + } + if(null != record.getFreqid() && StringUtil.isNotEmpty(record.getFreqid().toString())) { + con.andFreqidEqualTo(record.getFreqid()); + } + } + + /** + * 分页查询 + * @param tablepar + * @param record + * @return + */ + public PageInfo taskProcesslist(Tablepar tablepar, Taskinfo record){ + logger.info("获取执法科待处理任务信息"); + final TaskinfoExample testExample=new TaskinfoExample(); + final TsysUser user = ShiroUtils.getUser(); + final Integer deptid = user.getDeptid(); + final List exeStatus = new ArrayList(); + exeStatus.addAll(ConvertUtil.toListIntArray("2,4,5,6,8")); + if(record.getStatusid()!=null) { + exeStatus.clear(); + exeStatus.add(record.getStatusid()); + } + testExample.createCriteria().andStatusidIn(exeStatus).andReciveDeptidEqualTo(deptid); + testExample.createCriteria().andLikeQuery(record); + testExample.setOrderByClause("taskid ASC"); + if(StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) +" "+tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list= taskinfoMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + /** + * 获取执行人待处理任务信息 + * @param tablepar + * @param record + * @return + */ + public PageInfo taskProcesslistForExecutor(Tablepar tablepar, Taskinfo record){ + logger.info("获取执行人待处理任务信息"); + final TaskinfoExample testExample=new TaskinfoExample(); + final TsysUser user = ShiroUtils.getUser(); +// final Integer deptid = user.getDeptid(); + final List exeStatus =new ArrayList (); + exeStatus.addAll(ConvertUtil.toListIntArray("4,5,8")); + if(record.getStatusid()!=null) { + exeStatus.clear(); + exeStatus.add(record.getStatusid()); + } + testExample.createCriteria().andStatusidIn(exeStatus).andReciveUseridEqualTo(user.getId()); + testExample.createCriteria().andLikeQuery(record); + testExample.setOrderByClause("taskid ASC"); + if(StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) +" "+tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list= taskinfoMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + + @Override + public int deleteByPrimaryKey(String ids) { + + List lista= ConvertUtil.toListStrArray(ids); + TaskinfoExample example=new TaskinfoExample(); + example.createCriteria().andTaskidIn(lista); + return taskinfoMapper.deleteByExample(example); + + + } + + + @Override + public Taskinfo selectByPrimaryKey(String id) { + + return taskinfoMapper.selectByPrimaryKey(id); + + } + + + @Override + public int updateByPrimaryKeySelective(Taskinfo record) { + return taskinfoMapper.updateByPrimaryKeySelective(record); + } + + + /** + * 添加 + */ + @Override + public int insertSelective(Taskinfo record) { + final String taskid = record.getTaskid(); + + if(StringUtils.isEmpty(taskid)) { + //添加雪花主键id + record.setTaskid(SnowflakeIdWorker.getUUID()); + } + record.setCreatetime(new Date()); + record.setUpdatetime(new Date()); + final TsysUser user = ShiroUtils.getUser(); + record.setUserid(user.getId()); + record.setDeptid(user.getDeptid()); + return taskinfoMapper.insertSelective(record); + } + + + @Override + public int updateByExampleSelective(Taskinfo record, TaskinfoExample example) { + + return taskinfoMapper.updateByExampleSelective(record, example); + } + + + @Override + public int updateByExample(Taskinfo record, TaskinfoExample example) { + + return taskinfoMapper.updateByExample(record, example); + } + + @Override + public List selectByExample(TaskinfoExample example) { + + return taskinfoMapper.selectByExample(example); + } + + + @Override + public long countByExample(TaskinfoExample example) { + + return taskinfoMapper.countByExample(example); + } + + + @Override + public int deleteByExample(TaskinfoExample example) { + + return taskinfoMapper.deleteByExample(example); + } + + /** + * 检查name + * @param taskinfo + * @return + */ + public int checkNameUnique(Taskinfo taskinfo){ + TaskinfoExample example=new TaskinfoExample(); + example.createCriteria().andTasknameEqualTo(taskinfo.getTaskname()); + List list=taskinfoMapper.selectByExample(example); + return list.size(); + } + + /** + * 根据任务ids更新任务状态 + * @param statusid 任务状态id + * @param ids 任务id + * @return 更新结果 + */ + public int updateStatusByids(@Param("statusid") Integer statusid, @Param("ids") Listids){ + logger.info("更新任务状态,status= " + statusid +", ids = " + ids); + final int rs = this.taskinfoMapper.updateStatusByids(statusid,ids); + return rs; + } +} diff --git a/src/main/java/com/zsess/taskmanage/service/TaskprocessInfoService.java b/src/main/java/com/zsess/taskmanage/service/TaskprocessInfoService.java new file mode 100644 index 0000000000000000000000000000000000000000..94f5399ab5cfc52719e1b5e9467f5a59ea2ba9ee --- /dev/null +++ b/src/main/java/com/zsess/taskmanage/service/TaskprocessInfoService.java @@ -0,0 +1,159 @@ +package com.zsess.taskmanage.service; + +import java.util.List; + +import com.fc.test.common.base.BaseService; +import com.fc.test.common.support.ConvertUtil; +import com.fc.test.model.custom.Tablepar; +import com.fc.test.util.SnowflakeIdWorker; +import org.springframework.stereotype.Service; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import cn.hutool.core.util.StrUtil; +import com.zsess.taskmanage.mapper.TaskprocessInfoMapper; +import com.zsess.taskmanage.model.TaskprocessInfo; +import com.zsess.taskmanage.model.TaskprocessInfoExample; +import com.fc.test.util.StringUtils; + +import javax.annotation.Resource; + +/** + * 任务管理执行过程信息 TaskprocessInfoService + * @Title: TaskprocessInfoService.java  + * @Package com.zsess.taskmanage.service  + * @author mian_自动生成 + * @email mianli85@163.com + * @date 2020-07-15 10:42:35   + **/ +@Service +public class TaskprocessInfoService implements BaseService { + @Resource + private TaskprocessInfoMapper taskprocessInfoMapper; + + + /** + * 分页查询 + * @param tablepar + * @param record + * @return + */ + public PageInfo list(Tablepar tablepar, TaskprocessInfo record){ + TaskprocessInfoExample testExample=new TaskprocessInfoExample(); + testExample.createCriteria().andLikeQuery(record); + testExample.setOrderByClause("processid ASC"); + if(StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) +" "+tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list= taskprocessInfoMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + + /** + * 分页查询 + * @param tablepar + * @param record + * @return + */ + public PageInfo getTaskProcesslistBytaskid(Tablepar tablepar, TaskprocessInfo record){ + final TaskprocessInfoExample testExample=new TaskprocessInfoExample(); + testExample.createCriteria().andTaskidEqualTo(record.getTaskid()); + testExample.setOrderByClause("processid DESC"); + if(StrUtil.isNotEmpty(tablepar.getOrderByColumn())) { + testExample.setOrderByClause(StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) +" "+tablepar.getIsAsc()); + } + PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize()); + List list= taskprocessInfoMapper.selectByExample(testExample); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + + + @Override + public int deleteByPrimaryKey(String ids) { + + List lista= ConvertUtil.toListStrArray(ids); + TaskprocessInfoExample example=new TaskprocessInfoExample(); + example.createCriteria().andProcessidIn(lista); + return taskprocessInfoMapper.deleteByExample(example); + + + } + + + @Override + public TaskprocessInfo selectByPrimaryKey(String id) { + + return taskprocessInfoMapper.selectByPrimaryKey(id); + + } + + + @Override + public int updateByPrimaryKeySelective(TaskprocessInfo record) { + return taskprocessInfoMapper.updateByPrimaryKeySelective(record); + } + + + /** + * 添加 + */ + @Override + public int insertSelective(TaskprocessInfo record) { + + //添加雪花主键id + record.setProcessid(SnowflakeIdWorker.getUUID()); + + + return taskprocessInfoMapper.insertSelective(record); + } + + + @Override + public int updateByExampleSelective(TaskprocessInfo record, TaskprocessInfoExample example) { + + return taskprocessInfoMapper.updateByExampleSelective(record, example); + } + + + @Override + public int updateByExample(TaskprocessInfo record, TaskprocessInfoExample example) { + + return taskprocessInfoMapper.updateByExample(record, example); + } + + @Override + public List selectByExample(TaskprocessInfoExample example) { + + return taskprocessInfoMapper.selectByExample(example); + } + + + @Override + public long countByExample(TaskprocessInfoExample example) { + + return taskprocessInfoMapper.countByExample(example); + } + + + @Override + public int deleteByExample(TaskprocessInfoExample example) { + + return taskprocessInfoMapper.deleteByExample(example); + } + + /** + * 检查name + * @param taskprocessInfo + * @return + */ + public int checkNameUnique(TaskprocessInfo taskprocessInfo){ + TaskprocessInfoExample example=new TaskprocessInfoExample(); + example.createCriteria().andTaskidEqualTo(taskprocessInfo.getTaskid()); + List list=taskprocessInfoMapper.selectByExample(example); + return list.size(); + } + + +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index c640b2f68cd38c9ebd19afd080b23246a6836fc2..149b58f48ea4b0c2d0e9b6285793b1f57085a957 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,71 +1,19 @@ #dev环境 mysql7.0 -spring: - datasource: - type: com.alibaba.druid.pool.DruidDataSource - driverClassName: com.mysql.jdbc.Driver - #druid连接池配置 - druid: - #主库数据源 - master: - url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false - username: root - password: root - #备数据源 #关闭 - slave: - enabled: false - url: jdbc:mysql://localhost:3306/springbootv3?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false - username: root - password: root - #配置初始化连接数大小 - initial-size: 10 - # 最大连接数 - max-active: 50 - #最小连接数 - min-idle: 10 - #获取连接等待超时时间 - max-wait: 5000 - pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 - max-pool-prepared-statement-per-connection-size: 20 - validation-query: SELECT 1 FROM DUAL - validation-query-timeout: 20000 - test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 - test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 - test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 - time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - min-evictable-idle-time-millis: 300000 #一个连接在池中最小生存的时间,单位是毫秒 - #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定) - stat-view-servlet: - enabled: true - url-pattern: /druid/* - #可以增加访问账号密码【去掉注释就可以】 - #login-username: admin - #login-password: admin - filter: - stat: - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true - -#mysql 8.0 - #spring: # datasource: # type: com.alibaba.druid.pool.DruidDataSource -# driverClassName: com.mysql.cj.jdbc.Driver +# driverClassName: com.mysql.jdbc.Driver # #druid连接池配置 # druid: -# # 主库数据源 +# #主库数据源 # master: -# url: jdbc:mysql://localhost:3306/test?useSSL=false&serverTimezone=UTC +# url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false # username: root -# password: root -# #树熊数据源 +# password: 123456 +# #备数据源 #关闭 # slave: -# enabled : false -# url: jdbc:mysql://localhost:3306/test2?useSSL=false&serverTimezone=UTC +# enabled: false +# url: jdbc:mysql://localhost:3306/springbootv3?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false # username: root # password: root # #配置初始化连接数大小 @@ -99,4 +47,56 @@ spring: # merge-sql: true # wall: # config: -# multi-statement-allow: true \ No newline at end of file +# multi-statement-allow: true + +#mysql 8.0 + +spring: + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + #druid连接池配置 + druid: + # 主库数据源 + master: + url: jdbc:mysql://127.0.0.1:3306/springbootv2?useSSL=false&serverTimezone=GMT&characterEncoding=utf8 + username: root + password: 123456 + #树熊数据源 + slave: + enabled : false + url: jdbc:mysql://localhost:3306/springbootv2?useSSL=false&serverTimezone=UTC + username: root + password: root + #配置初始化连接数大小 + initial-size: 10 + # 最大连接数 + max-active: 50 + #最小连接数 + min-idle: 10 + #获取连接等待超时时间 + max-wait: 5000 + pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 + max-pool-prepared-statement-per-connection-size: 20 + validation-query: SELECT 1 FROM DUAL + validation-query-timeout: 20000 + test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 + test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 + test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 + time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + min-evictable-idle-time-millis: 300000 #一个连接在池中最小生存的时间,单位是毫秒 + #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定) + stat-view-servlet: + enabled: true + url-pattern: /druid/* + #可以增加访问账号密码【去掉注释就可以】 + #login-username: admin + #login-password: admin + filter: + stat: + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true \ No newline at end of file diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 6c49eb60b3f7b0a43bebb31b4afba34192fd2cc9..b46c89082e4c35fa99cf8bccaee70e20aa6bbb5f 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -8,9 +8,9 @@ spring: druid: #主库数据源 master: - url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false + url: jdbc:mysql://47.115.58.27:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false username: root - password: root + password: 123456@mian #备数据源 #关闭 slave: enabled: false diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index aa5ea912eca515ad9a8dae927f5ad3620f6d6aff..7fc6894dd1acb35a31ba4adfe0ed063c5b58db0c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -7,9 +7,9 @@ fuce: #版权年份 copyrightYear: 2018 #文件上传路径 - defaultBaseDir: D:/v2file/ + defaultBaseDir: F:/home/taskManage/v2file/ #地址是否放入项目static目录,如果未Y 放入项目得static。 profile配置失效。 为N存放在D:/v2file/ 前端读取相同,不受影响 - isstatic: Y + isstatic: N #开启存放静态文件夹后目录 isroot_dir: static/file_upload/ #邮件功能 @@ -27,7 +27,7 @@ fuce: rollVerification: true #tomcat config server : - port : 8080 + port : 8089 ##项目名字配置 #servlet : # context-path : /demo @@ -41,7 +41,7 @@ server : spring : # 环境 dev|test|prod profiles : - active : dev + active : prod #引入其他配置文件,例如ftpHX 未配置文件application-ftpHX.yml #include: ftpHX,ftpCloud servlet: diff --git a/src/main/resources/auto_code/auto_code_config.properties b/src/main/resources/auto_code/auto_code_config.properties index e63c08526161a7cef58905390114cb5ad32873e1..36855df8a044fc55f7bf97834e561a113c1f7320 100644 --- a/src/main/resources/auto_code/auto_code_config.properties +++ b/src/main/resources/auto_code/auto_code_config.properties @@ -11,9 +11,10 @@ globalConfig: # - dataName: test_code2 # aliasName: DDDDDDD #生成代码的项目路径 - parentPath: D:\\Users\\Administrator\\git\\SpringBoot_v3 +# parentPath: D:\\Users\\Administrator\\git\\SpringBoot_v3 + parentPath: F:\\学习项目代码\\SpringBoot_v2 #生成代码的父包 如父包是com.fc.test.test controller将在com.fc.test.test.controller下 bean 将在com.fc.test.test.bean下 ,service,dao同理 - parentPack: com.fc.test + parentPack: com.zsess.taskmanage #是否覆盖生成文件 如果为true将会把以前的文件覆盖掉 cover: false #xml存放的文件夹默认 mybatisMapper @@ -21,9 +22,9 @@ globalConfig: #是否生成swagger文档 默认true swagger: false #作者 - author: fuce + author: mian #电子邮箱 - email: 115889198@qq.com + email: mianli85@163.com #java在项目中的classpath位置 javaSource: src/main/java #resource位置 diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt index 1e7f343092c54eae8c47544531a41ef7b472fe10..42994e63ac602a0f8b34ffd7511293beb07d1da4 100644 --- a/src/main/resources/banner.txt +++ b/src/main/resources/banner.txt @@ -1,35 +1,5 @@ ${AnsiColor.BRIGHT_BLUE} Application Version: ${fuce.version} Spring Boot Version: ${spring-boot.version} -*************************************** -* 码云地址 * -* https://gitee.com/bdj/SpringBoot_v2 * -* * -*************************************** - _.._ ,------------------------. - ,' `. ( SpringBoot_v2谁用谁知道! ) - / __) __` \ `-,----------------------` - ( (`-`(-') ) _.-' - /) \ = / ( - /' |--' . \ - ( ,---| `-.)__` - )( `-.,--' _`-. - '/,' ( Uu", - (_ , `/,-' ) - `.__, : `-'/ /`--' - | `--' | - ` `-._ / - \ ( - /\ . \. - / |` \ ,-\ - / \| .) / \ - ( ,'|\ ,' : - | \,`.`--"/ } - `,' \ |,' / - / "-._ `-/ | - "-. "-.,'| ; - / _/["---'""] - : / |"- ' - ' | / - ` | + ${AnsiColor.BLACK} \ No newline at end of file diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 99674293a635b4337b25bcbfa6492ca6f334c204..cdd599066af9d6f42d54eff357e356fe2214f4dc 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -10,9 +10,10 @@ debug:当此属性设置为true时,将打印出logback内部日志信息, - + + - + @@ -95,13 +96,13 @@ debug:当此属性设置为true时,将打印出logback内部日志信息, --> - + - + + a.id, a.username,a.password,a.nickname,a.deptid,b.dept_name deptName + from t_sys_user a left join t_sys_department b on (a.deptid = b.id) @@ -121,6 +123,9 @@ nickname, + + deptid, + @@ -135,6 +140,9 @@ #{nickname,jdbcType=VARCHAR}, + + #{deptid,jdbcType=INTEGER}, + @@ -23,5 +23,26 @@ #{item,jdbcType=VARCHAR} - + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/custom/TsysRoleMapper.xml b/src/main/resources/mybatis/custom/TsysRoleMapper.xml index 72e60c0144ee30d27cece4fc65a274d8c2c9cb3d..af95c80b25bfc9ec24ebc49ac9298cb9b5040abe 100644 --- a/src/main/resources/mybatis/custom/TsysRoleMapper.xml +++ b/src/main/resources/mybatis/custom/TsysRoleMapper.xml @@ -4,14 +4,16 @@ + - id, name + id, name, order \ No newline at end of file diff --git a/src/main/resources/mybatis/custom/TsysUserMapper.xml b/src/main/resources/mybatis/custom/TsysUserMapper.xml index b6be540290317b9fe5fe57d87f3526a0d9e45482..f1892049a602847f46c8fafc9a2611be090a4229 100644 --- a/src/main/resources/mybatis/custom/TsysUserMapper.xml +++ b/src/main/resources/mybatis/custom/TsysUserMapper.xml @@ -9,6 +9,7 @@ \ No newline at end of file diff --git a/src/main/resources/mybatis/taskManage/DepttaskInfoMapper.xml b/src/main/resources/mybatis/taskManage/DepttaskInfoMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..968d1b06d3abcf078a61bad15d269364732e54ad --- /dev/null +++ b/src/main/resources/mybatis/taskManage/DepttaskInfoMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/taskManage/TaskfileInfoMapper.xml b/src/main/resources/mybatis/taskManage/TaskfileInfoMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..a684e5d3fdab49b7938f8b504587e98b8d5ce5d2 --- /dev/null +++ b/src/main/resources/mybatis/taskManage/TaskfileInfoMapper.xml @@ -0,0 +1,368 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, + taskid, + filetype, + filename, + data_id, + createuserid, + createtime, + createusername, + createdeptid, + createdeptname + + + + + + delete from t_taskfile_info + where id = #{id,jdbcType=VARCHAR} + + + delete from t_taskfile_info + + + + + + + insert into t_taskfile_info ( + id, + taskid, + filetype, + filename, + data_id, + createuserid, + createtime, + createusername, + createdeptid, + createdeptname, + processid + ) + values ( + #{id,jdbcType=VARCHAR}, + #{taskid,jdbcType=VARCHAR}, + #{filetype,jdbcType=INTEGER}, + #{filename,jdbcType=VARCHAR}, + #{dataId,jdbcType=VARCHAR}, + #{createuserid,jdbcType=VARCHAR}, + #{createtime,jdbcType=TIMESTAMP}, + #{createusername,jdbcType=VARCHAR}, + #{createdeptid,jdbcType=INTEGER}, + #{createdeptname,jdbcType=VARCHAR}, + #{processid,jdbcType=VARCHAR} + ) + + + + insert into t_taskfile_info + + + + id, + + + + + taskid, + + + + + filetype, + + + + + filename, + + + + + data_id, + + + + + createuserid, + + + + + createtime, + + + + + createusername, + + + + + createdeptid, + + + + + createdeptname, + + + processid, + + + + + #{id,jdbcType=VARCHAR}, + + + #{taskid,jdbcType=VARCHAR}, + + + #{filetype,jdbcType=INTEGER}, + + + #{filename,jdbcType=VARCHAR}, + + + #{dataId,jdbcType=VARCHAR}, + + + #{createuserid,jdbcType=VARCHAR}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + #{createusername,jdbcType=VARCHAR}, + + + #{createdeptid,jdbcType=INTEGER}, + + + #{createdeptname,jdbcType=VARCHAR}, + + + #{processid,jdbcType=VARCHAR}, + + + + + + + + update t_taskfile_info + + + id = #{record.id,jdbcType=VARCHAR}, + + + taskid = #{record.taskid,jdbcType=VARCHAR}, + + + filetype = #{record.filetype,jdbcType=INTEGER}, + + + filename = #{record.filename,jdbcType=VARCHAR}, + + + data_id = #{record.dataId,jdbcType=VARCHAR}, + + + createuserid = #{record.createuserid,jdbcType=VARCHAR}, + + + createtime = #{record.createtime,jdbcType=TIMESTAMP}, + + + createusername = #{record.createusername,jdbcType=VARCHAR}, + + + createdeptid = #{record.createdeptid,jdbcType=INTEGER}, + + + createdeptname = #{record.createdeptname,jdbcType=VARCHAR}, + + + + + + + + + + + update t_taskfile_info + set + id = #{record.id,jdbcType=VARCHAR}, + taskid = #{record.taskid,jdbcType=VARCHAR}, + filetype = #{record.filetype,jdbcType=INTEGER}, + filename = #{record.filename,jdbcType=VARCHAR}, + data_id = #{record.dataId,jdbcType=VARCHAR}, + createuserid = #{record.createuserid,jdbcType=VARCHAR}, + createtime = #{record.createtime,jdbcType=TIMESTAMP}, + createusername = #{record.createusername,jdbcType=VARCHAR}, + createdeptid = #{record.createdeptid,jdbcType=INTEGER}, + createdeptname = #{record.createdeptname,jdbcType=VARCHAR}, + processid = #{record.processid,jdbcType=VARCHAR} + + + + + + + + update t_taskfile_info + + + taskid = #{taskid,jdbcType=VARCHAR}, + + + filetype = #{filetype,jdbcType=INTEGER}, + + + filename = #{filename,jdbcType=VARCHAR}, + + + data_id = #{dataId,jdbcType=VARCHAR}, + + + createuserid = #{createuserid,jdbcType=VARCHAR}, + + + createtime = #{createtime,jdbcType=TIMESTAMP}, + + + createusername = #{createusername,jdbcType=VARCHAR}, + + + createdeptid = #{createdeptid,jdbcType=INTEGER}, + + + createdeptname = #{createdeptname,jdbcType=VARCHAR}, + + + createdeptname = #{processid,jdbcType=VARCHAR}, + + + where + id = #{id,jdbcType=VARCHAR} + + + + + + + update t_taskfile_info + set + taskid = #{taskid,jdbcType=VARCHAR}, + filetype = #{filetype,jdbcType=INTEGER}, + filename = #{filename,jdbcType=VARCHAR}, + data_id = #{dataId,jdbcType=VARCHAR}, + createuserid = #{createuserid,jdbcType=VARCHAR}, + createtime = #{createtime,jdbcType=TIMESTAMP}, + createusername = #{createusername,jdbcType=VARCHAR}, + createdeptid = #{createdeptid,jdbcType=INTEGER}, + createdeptname = #{createdeptname,jdbcType=VARCHAR}, + processid = #{processid,jdbcType=VARCHAR} + where + id = #{id,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/taskManage/TaskinfoMapper.xml b/src/main/resources/mybatis/taskManage/TaskinfoMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..3102eb169757fdd7133b98ef7f4a9a22fa0a0a47 --- /dev/null +++ b/src/main/resources/mybatis/taskManage/TaskinfoMapper.xml @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and a.${criterion.condition} #{criterion.value} + + + and a.${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and a.${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + a.taskid, + taskname, + taskdesc, + begindate, + enddate, + freqid, + createtime, + updatetime, + userid, + recive_deptid, + reciveDeptName, + recive_userid, + reciveUserName, + statusid, + reportdesc, + deptid, + d.processnum, + d.processmsg + + + + a.taskid, taskname, taskdesc, begindate, enddate, freqid, createtime, updatetime, userid, + recive_deptid, reciveDeptName, recive_userid, reciveUserName, statusid, reportdesc, a.deptid, + d.processmsg, ifnull(e.filenum, 0) processnum + from t_taskinfo a + left join (select id deptid, dept_name reciveDeptName from t_sys_department) b on (b.deptid = a.recive_deptid) + left join (select id,username reciveUserName from t_sys_user ) c on (a. recive_userid = c.id) + left join (select m.taskid, n.processmsg from ( + select taskid, max(processid) maxid from t_taskprocess_info group by taskid) m, + t_taskprocess_info n + where m.maxid = n.processid + ) d on (a.taskid = d.taskid) + left join (select taskid,count(*) filenum from t_taskfile_info where filetype=1 group by taskid) e + on (a.taskid = e.taskid) + + + + + + + delete from t_taskinfo + where taskid = #{taskid,jdbcType=VARCHAR} + + + delete from t_taskinfo a + + + + + + + insert into t_taskinfo ( + taskid, + taskname, + taskdesc, + begindate, + enddate, + freqid, + createtime, + updatetime, + userid, + recive_deptid, + recive_userid, + statusid, + reportdesc, + deptid + ) + values ( + #{taskid,jdbcType=VARCHAR}, + #{taskname,jdbcType=VARCHAR}, + #{taskdesc,jdbcType=VARCHAR}, + #{begindate,jdbcType=TIMESTAMP}, + #{enddate,jdbcType=TIMESTAMP}, + #{freqid,jdbcType=INTEGER}, + #{createtime,jdbcType=TIMESTAMP}, + #{updatetime,jdbcType=TIMESTAMP}, + #{userid,jdbcType=BIGINT}, + #{reciveDeptid,jdbcType=INTEGER}, + #{reciveUserid,jdbcType=BIGINT}, + #{statusid,jdbcType=INTEGER}, + #{reportdesc,jdbcType=VARCHAR} + #{deptid,jdbcType=INTEGER} + ) + + + + insert into t_taskinfo + + + + taskid, + + + + + taskname, + + + + + taskdesc, + + + + + begindate, + + + + + enddate, + + + + + freqid, + + + + + createtime, + + + + + updatetime, + + + + + userid, + + + + + recive_deptid, + + + + + recive_userid, + + + statusid, + + + reportdesc, + + + deptid, + + + + + #{taskid,jdbcType=VARCHAR}, + + + #{taskname,jdbcType=VARCHAR}, + + + #{taskdesc,jdbcType=VARCHAR}, + + + #{begindate,jdbcType=TIMESTAMP}, + + + #{enddate,jdbcType=TIMESTAMP}, + + + #{freqid,jdbcType=INTEGER}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + #{updatetime,jdbcType=TIMESTAMP}, + + + #{userid,jdbcType=BIGINT}, + + + #{reciveDeptid,jdbcType=INTEGER}, + + + #{reciveUserid,jdbcType=BIGINT}, + + + #{statusid,jdbcType=INTEGER}, + + + #{reportdesc,jdbcType=VARCHAR}, + + + #{deptid,jdbcType=INTEGER}, + + + + + + + + update t_taskinfo + + + taskid = #{record.taskid,jdbcType=VARCHAR}, + + + taskname = #{record.taskname,jdbcType=VARCHAR}, + + + taskdesc = #{record.taskdesc,jdbcType=VARCHAR}, + + + begindate = #{record.begindate,jdbcType=TIMESTAMP}, + + + enddate = #{record.enddate,jdbcType=TIMESTAMP}, + + + freqid = #{record.freqid,jdbcType=INTEGER}, + + + createtime = #{record.createtime,jdbcType=TIMESTAMP}, + + + updatetime = #{record.updatetime,jdbcType=TIMESTAMP}, + + + userid = #{record.userid,jdbcType=VARCHAR}, + + + recive_deptid = #{record.reciveDeptid,jdbcType=INTEGER}, + + + recive_userid = #{record.reciveUserid,jdbcType=VARCHAR}, + + + statusid = #{record.statusid,jdbcType=INTEGER}, + + + statusid = #{record.reportdesc,jdbcType=VARCHAR}, + + + statusid = #{record.deptid,jdbcType=INTEGER}, + + + + + + + + + + update t_taskinfo + set + taskid = #{record.taskid,jdbcType=VARCHAR}, + taskname = #{record.taskname,jdbcType=VARCHAR}, + taskdesc = #{record.taskdesc,jdbcType=VARCHAR}, + begindate = #{record.begindate,jdbcType=TIMESTAMP}, + enddate = #{record.enddate,jdbcType=TIMESTAMP}, + freqid = #{record.freqid,jdbcType=INTEGER}, + createtime = #{record.createtime,jdbcType=TIMESTAMP}, + updatetime = #{record.updatetime,jdbcType=TIMESTAMP}, + userid = #{record.userid,jdbcType=VARCHAR}, + recive_deptid = #{record.reciveDeptid,jdbcType=INTEGER}, + recive_userid = #{record.reciveUserid,jdbcType=VARCHAR}, + statusid = #{record.statusid,jdbcType=INTEGER}, + reportdesc = #{record.reportdesc,jdbcType=VARCHAR}, + deptid = #{record.deptid,jdbcType=INTEGER} + + + + + + + + update t_taskinfo + + + taskname = #{taskname,jdbcType=VARCHAR}, + + + taskdesc = #{taskdesc,jdbcType=VARCHAR}, + + + begindate = #{begindate,jdbcType=TIMESTAMP}, + + + enddate = #{enddate,jdbcType=TIMESTAMP}, + + + freqid = #{freqid,jdbcType=INTEGER}, + + + createtime = #{createtime,jdbcType=TIMESTAMP}, + + + updatetime = #{updatetime,jdbcType=TIMESTAMP}, + + + userid = #{userid,jdbcType=VARCHAR}, + + + recive_deptid = #{reciveDeptid,jdbcType=INTEGER}, + + + recive_userid = #{reciveUserid,jdbcType=VARCHAR}, + + + statusid = #{statusid,jdbcType=INTEGER}, + + + reportdesc = #{reportdesc,jdbcType=VARCHAR}, + + + deptid = #{deptid,jdbcType=INTEGER}, + + + where + taskid = #{taskid,jdbcType=VARCHAR} + + + + + + + update t_taskinfo + set + taskname = #{taskname,jdbcType=VARCHAR}, + taskdesc = #{taskdesc,jdbcType=VARCHAR}, + begindate = #{begindate,jdbcType=TIMESTAMP}, + enddate = #{enddate,jdbcType=TIMESTAMP}, + freqid = #{freqid,jdbcType=INTEGER}, + createtime = #{createtime,jdbcType=TIMESTAMP}, + updatetime = #{updatetime,jdbcType=TIMESTAMP}, + userid = #{userid,jdbcType=VARCHAR}, + recive_deptid = #{reciveDeptid,jdbcType=INTEGER}, + recive_userid = #{reciveUserid,jdbcType=VARCHAR}, + statusid = #{statusid,jdbcType=INTEGER}, + reportdesc = #{reportdesc,jdbcType=VARCHAR}, + deptid = #{deptid,jdbcType=INTEGER} + where + taskid = #{taskid,jdbcType=VARCHAR} + + + + update t_taskinfo set statusid = #{statusid,jdbcType=BIGINT} + where taskid in + + #{id} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/taskManage/TaskprocessInfoMapper.xml b/src/main/resources/mybatis/taskManage/TaskprocessInfoMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..dd754e08549c5535fa6914e3ab741e978f799a04 --- /dev/null +++ b/src/main/resources/mybatis/taskManage/TaskprocessInfoMapper.xml @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + a.processid, + a.taskid, + a.detpid, + a.userid, + a.createtime, + a.updatetime, + a.statusid, + a.processmsg, + a.processstatus, + b.username, + c.deptname + from t_taskprocess_info a + left join (select id,username from t_sys_user ) b on (a. userid = b.id) + left join (select id, dept_name deptname from t_sys_department) c on (c.id = a.detpid) + + + + + + delete from t_taskprocess_info + where processid = #{processid,jdbcType=VARCHAR} + + + delete from t_taskprocess_info + + + + + + + insert into t_taskprocess_info ( + processid, + taskid, + detpid, + userid, + createtime, + updatetime, + statusid, + processmsg, + processstatus + ) + values ( + #{processid,jdbcType=VARCHAR}, + #{taskid,jdbcType=VARCHAR}, + #{detpid,jdbcType=INTEGER}, + #{userid,jdbcType=VARCHAR}, + #{createtime,jdbcType=TIMESTAMP}, + #{updatetime,jdbcType=TIMESTAMP}, + #{statusid,jdbcType=INTEGER}, + #{processmsg,jdbcType=VARCHAR}, + #{processstatus,jdbcType=INTEGER} + ) + + + + insert into t_taskprocess_info + + + + processid, + + + + + taskid, + + + + + detpid, + + + + + userid, + + + + + createtime, + + + + + updatetime, + + + + + statusid, + + + + + processmsg, + + + + + processstatus, + + + + + + #{processid,jdbcType=VARCHAR}, + + + #{taskid,jdbcType=VARCHAR}, + + + #{detpid,jdbcType=INTEGER}, + + + #{userid,jdbcType=VARCHAR}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + #{updatetime,jdbcType=TIMESTAMP}, + + + #{statusid,jdbcType=INTEGER}, + + + #{processmsg,jdbcType=VARCHAR}, + + + #{processstatus,jdbcType=INTEGER}, + + + + + + + + update t_taskprocess_info + + + processid = #{record.processid,jdbcType=VARCHAR}, + + + taskid = #{record.taskid,jdbcType=VARCHAR}, + + + detpid = #{record.detpid,jdbcType=INTEGER}, + + + userid = #{record.userid,jdbcType=VARCHAR}, + + + createtime = #{record.createtime,jdbcType=TIMESTAMP}, + + + updatetime = #{record.updatetime,jdbcType=TIMESTAMP}, + + + statusid = #{record.statusid,jdbcType=INTEGER}, + + + processmsg = #{record.processmsg,jdbcType=VARCHAR}, + + + processstatus = #{record.processstatus,jdbcType=INTEGER}, + + + + + + + + + + + update t_taskprocess_info + set + processid = #{record.processid,jdbcType=VARCHAR}, + taskid = #{record.taskid,jdbcType=VARCHAR}, + detpid = #{record.detpid,jdbcType=INTEGER}, + userid = #{record.userid,jdbcType=VARCHAR}, + createtime = #{record.createtime,jdbcType=TIMESTAMP}, + updatetime = #{record.updatetime,jdbcType=TIMESTAMP}, + statusid = #{record.statusid,jdbcType=INTEGER}, + processmsg = #{record.processmsg,jdbcType=VARCHAR}, + processstatus = #{record.processstatus,jdbcType=INTEGER} + + + + + + + + update t_taskprocess_info + + + taskid = #{taskid,jdbcType=VARCHAR}, + + + detpid = #{detpid,jdbcType=INTEGER}, + + + userid = #{userid,jdbcType=VARCHAR}, + + + createtime = #{createtime,jdbcType=TIMESTAMP}, + + + updatetime = #{updatetime,jdbcType=TIMESTAMP}, + + + statusid = #{statusid,jdbcType=INTEGER}, + + + processmsg = #{processmsg,jdbcType=VARCHAR}, + + + processstatus = #{processstatus,jdbcType=INTEGER}, + + + where + processid = #{processid,jdbcType=VARCHAR} + + + + + + + update t_taskprocess_info + set + taskid = #{taskid,jdbcType=VARCHAR}, + detpid = #{detpid,jdbcType=INTEGER}, + userid = #{userid,jdbcType=VARCHAR}, + createtime = #{createtime,jdbcType=TIMESTAMP}, + updatetime = #{updatetime,jdbcType=TIMESTAMP}, + statusid = #{statusid,jdbcType=INTEGER}, + processmsg = #{processmsg,jdbcType=VARCHAR}, + processstatus = #{processstatus,jdbcType=INTEGER} + where + processid = #{processid,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/src/main/resources/static/admin/assets/css/signin.css b/src/main/resources/static/admin/assets/css/signin.css index fd1a01d9d96468d3aa384107c2a8bafc6ca1330b..eef3e7aa443e71e606ad13a357573b820839ae52 100644 --- a/src/main/resources/static/admin/assets/css/signin.css +++ b/src/main/resources/static/admin/assets/css/signin.css @@ -25,8 +25,9 @@ body { -o-background-size: cover; background-size: cover; } + #login-wrapper { - margin: 50px auto 0; + margin: 200px auto 0; position: relative; z-index: 5; } diff --git a/src/main/resources/static/admin/assets/css/style.css b/src/main/resources/static/admin/assets/css/style.css index e4b37d1eabdc7602332028f0348435f42e7086f4..d3158ce845eba08cd92cdac68c7c733ae04af7c9 100644 --- a/src/main/resources/static/admin/assets/css/style.css +++ b/src/main/resources/static/admin/assets/css/style.css @@ -11,7 +11,7 @@ font-family:'FontAwesome', sans-serif; } body { - color: #9ea7b3!important; + color: #000000!important; font-family:"Open Sans", Arial, sans-serif!important; font-size: 13px!important; line-height: 20px; @@ -453,10 +453,19 @@ input:-webkit-autofill, textarea:-webkit-autofill { border: 1px solid !important; border-radius: 4px; box-shadow: none !important; - color: #C7D5E0 !important; + color: #000000 !important; font-size: 13px !important; /* height: 31px !important; */ } +.form-control2 { + background-color: #FFFFFF; + background-image: none; + border: 1px solid !important; + border-radius: 4px; + box-shadow: none !important; + color: #C7D5E0 !important; + font-size: 13px !important; +} .form-update { background-color: #FFFFFF; background-image: none; @@ -784,7 +793,8 @@ img.ikon { #search input[type="text"] { background: url("../img/search-dark.png") no-repeat scroll 14px 10px #FFFFFF; border: 0 none; - color: #9EA7B3 !important; + /*color: #9EA7B3 !important;*/ + color: #000000 !important; width: 150px; padding: 6px 15px 6px 35px; -webkit-border-radius: 4px; @@ -1750,7 +1760,8 @@ ul.topnav h4 { padding: 15px 0 0; } .tittle-content-header { - color: #9EA7B3 !important; + /*color: #9EA7B3 !important;*/ + color: #000000 !important; font-family:"Open Sans"; font-size: 16px; font-weight: normal; @@ -1891,7 +1902,8 @@ img.sidebar-icon { border-bottom: 1px dotted #DDDDDD; } .nest .title-alt h6 { - color: #9EA7B3; + /*color: #9EA7B3;*/ + color: #000000; float: left; font-family:'Open Sans', serif; font-size: 14px; @@ -3068,3 +3080,7 @@ small.pull-right { margin: 30px 0 20px!important; border-bottom: 0px solid #eee!important; } + +.condition-row { + margin-bottom: 15px; +} \ No newline at end of file diff --git a/src/main/resources/static/admin/assets/js/bootstrap/js/base_list.js b/src/main/resources/static/admin/assets/js/bootstrap/js/base_list.js index 0b65314461747b799df4a82f226836a1e58d539b..d8cf7ad62a33ede5259dfe7e495096f45fdb7c43 100644 --- a/src/main/resources/static/admin/assets/js/bootstrap/js/base_list.js +++ b/src/main/resources/static/admin/assets/js/bootstrap/js/base_list.js @@ -11,8 +11,13 @@ $.table._option=parms; var oTableInit = new Object(); //初始化Table + var tableid = 'dataTable'; + if($.common.isNotEmpty(parms.tableField)) { + tableid = parms.tableField; + } + $.table._option.tableId = '#' + tableid; oTableInit.Init = function () { - $('#dataTable').bootstrapTable({ + $('#'+ tableid).bootstrapTable({ contentType: "application/x-www-form-urlencoded", url:parms.dataUrl, //请求后台的URL(*) method: 'post', //请求方式(*) @@ -33,14 +38,13 @@ // height: 460, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 uniqueId: "id", //每一行的唯一标识,一般为主键列 queryParamsType: "",//参数类型 为null 后台用pageHelp 默认为limit - search: !0, - showRefresh: !0,//刷新按钮 - showToggle: !0,//排版按钮 - showColumns: !0,//显示列按钮 + search: parms.search, + showRefresh: parms.showRefresh,//刷新按钮 + showColumns: parms.showColumns,//显示列按钮 columns:parms.dataColumns, showToggle : false, //是否显示详细视图和列表视图的切换按钮 //>>>>>>>>>>>>>>导出excel表格设置 - showExport: true, //是否显示导出按钮 + showExport: parms.showExport, //是否显示导出按钮 buttonsAlign:"right", //按钮位置 exportDataType : "all", Icons:'glyphicon-export', @@ -72,6 +76,10 @@ //排序 search.orderByColumn=params.sortName; search.isAsc=params.sortOrder; + var selfSearchField = $.table._option.selfSearchField + if(!!selfSearchField) { + search.selfSearch = $("#"+selfSearchField).val(); + } return search; }, @@ -81,7 +89,8 @@ $.each(form.serializeArray(), function(i, field) { search[field.name] = field.value; }); - var params = $("#dataTable").bootstrapTable("getOptions"); + var tbId = $.table._option.tableId; + var params = $(tbId).bootstrapTable("getOptions"); params.queryParams=function(params){ /* return { pageSize: params.pageSize, //每页要显示的数据条数 @@ -98,22 +107,35 @@ if($.common.isNotEmpty(params.searchText)){ search.searchText=params.searchText; } + if($.common.isNotEmpty(params.selfSearch)){ + search.selfSearch=params.selfSearch; + } + return search; } - $("#dataTable").bootstrapTable("refresh", params) + var tbId = $.table._option.tableId; + $(tbId).bootstrapTable("refresh", params) }, selectColumns: function(column) { - return $.map($("#dataTable").bootstrapTable("getSelections"), function(row) { + var tbId = $.table._option.tableId; + return $.map($(tbId).bootstrapTable("getSelections"), function(row) { return row[column] }) }, + selectedRows: function() { + var tbId = $.table._option.tableId; + var rows = $(tbId).bootstrapTable("getSelections"); + return rows; + }, selectFirstColumns: function() { - return $.map($("#dataTable").bootstrapTable("getSelections"), function(row) { + var tbId = $.table._option.tableId; + return $.map($(tbId).bootstrapTable("getSelections"), function(row) { return row[$.table._option.dataColumns[1].field] }) }, refresh: function() { - $("#dataTable").bootstrapTable("refresh", { + var tbId = $.table._option.tableId; + $(tbId).bootstrapTable("refresh", { url: $.table._option.dataUrl, silent: true }) @@ -278,6 +300,11 @@ var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); }, + closeAndRefresh: function() { + var index = parent.layer.getFrameIndex(window.name); + parent.layer.close(index); + $.modal.reload(); + }, confirm: function(content, callBack) { layer.confirm(content, { icon: 3, @@ -316,6 +343,34 @@ content: url }) }, + openWithoutClosed: function(title, url, width, height) { + if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { + width = "auto"; + height = "auto"; + } + if ($.common.isEmpty(title)) { + title = false; + } + if ($.common.isEmpty(url)) { + url = "404.html"; + } + if ($.common.isEmpty(width)) { + width = 800; + } + if ($.common.isEmpty(height)) { + height = ($(window).height() - 50); + } + layer.open({ + type: 2, + area: [width + "px", height + "px"], + fix: false, + maxmin: false, + shade: 0.3, + title: title, + closeBtn:0, + content: url + }) + }, openFull: function(title, url, width, height) { if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { width = "auto"; diff --git a/src/main/resources/static/admin/portraits/men/timg.jpg b/src/main/resources/static/admin/portraits/men/timg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ed6f444d8d573f7b6a109e5386e09c40a9d2984 Binary files /dev/null and b/src/main/resources/static/admin/portraits/men/timg.jpg differ diff --git a/src/main/resources/static/admin/portraits/thumb/men/timg.jpg b/src/main/resources/static/admin/portraits/thumb/men/timg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ed6f444d8d573f7b6a109e5386e09c40a9d2984 Binary files /dev/null and b/src/main/resources/static/admin/portraits/thumb/men/timg.jpg differ diff --git a/src/main/resources/static/css/common/box.css b/src/main/resources/static/css/common/box.css new file mode 100644 index 0000000000000000000000000000000000000000..fb720c04bdee1547783f82f5a9cc77066d48bb21 --- /dev/null +++ b/src/main/resources/static/css/common/box.css @@ -0,0 +1,154 @@ +*{ + font-size: 14px; +} +.box { + position: relative; + border-radius: 3px; + background: #ffffff; + border-top: 3px solid #d2d6de; + margin-bottom: 20px; + width: 100%; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); +} + +.box-header { + color: #444; + display: block; + padding: 12px; + position: relative; + border-bottom: 1px solid #f4f4f4; +} + +.box-header .box-title { + display: inline-block; + font-size: 18px; + margin: 0; + line-height: 1; +} + +.box-header>.box-tools { + position: absolute; + right: 10px; + top: 5px; +} + +.box-body { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + padding: 10px; +} + +.box-footer { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + border-top: 1px solid #f4f4f4; + padding: 10px; + background-color: #fff; +} +.box-footer .btn-primary{ + margin-left: 16px; +} + +.box .box-primary { + border-top-color: #3c8dbc; +} + +.box.box-solid { + border-top: 0; +} + +.table .label { + padding: 0.4em .6em .3em; + line-height: 22px; +} +.label{ + font-weight:400; +} + +.no-padding { + padding: 0 !important; +} + +#page { + border-top: solid 1px #F5F5F5; + padding: 10px 0; + margin-top: -10px; + background: #FAFAFA; + overflow: hidden; +} + +#page .pageInfo { + text-align: left; +} + +#page .pageOperation { + text-align: right; +} + +#page .pageInfo>span { + color: #000; + font-weight: bold; + padding: 5px; +} + +/*label样式变换 */ +.sheding { + color: #6d7b8a !important; +} + +.sheding:hover { + background-color: #6d7b8a; + color: #fff !important; +} + +.xiugai { + color: #337ab7 !important; +} +.xiugai:visited { + color: #337ab7 !important; +} +.xiugai:hover{ + background-color: #337ab7; + color: #fff !important; +} + + +.shanchu { + color: #d9534f !important; +} + +.shanchu:hover { + background-color: #d9534f; + color: #fff !important; +} + + +.xinzeng { + color: #5cb85c !important; +} + +.xinzeng:hover { + background-color: #5cb85c; + color: #fff !important; +} +.row{ + margin-right: 0px; + margin-left:0px; +} +body{ + background:none; +} +.input-group-btn .btn{ + padding:7px; +} + +.input-group-btn .btn-change{ + padding:5px; +} +::-webkit-scrollbar { + width: 0; +} \ No newline at end of file diff --git a/src/main/resources/static/css/common/checkbox.css b/src/main/resources/static/css/common/checkbox.css new file mode 100644 index 0000000000000000000000000000000000000000..0da880422da7d0e11453b52810595f23671226a9 --- /dev/null +++ b/src/main/resources/static/css/common/checkbox.css @@ -0,0 +1,28 @@ + .labels label{ + font-size: 16px; + cursor: pointer; + } + + .labels label i { + font-size: 16px; + font-style: normal; + display: inline-block; + width: 20px; + height: 20px; + text-align: center; + line-height: 20px; + color: transparent; + vertical-align: middle; + margin: -2px 2px 1px 0px; + border: #2489c5 0px solid; + border-radius: 3px; + background:rgba(158, 158, 158, 0.4); + } + + input[type="checkbox"] { + display: none; + } + input[type="checkbox"]:checked+ i{ + background: #2489c5; + color: #fff; + } \ No newline at end of file diff --git a/src/main/resources/static/css/common/iconfont.css b/src/main/resources/static/css/common/iconfont.css new file mode 100644 index 0000000000000000000000000000000000000000..4cfb2adfc0a3b61f6bdd20b30fc617f1972a8450 --- /dev/null +++ b/src/main/resources/static/css/common/iconfont.css @@ -0,0 +1,49 @@ + +@font-face {font-family: "iconfont"; + src: url('iconfont.eot?t=1504918617351'); /* IE9*/ + src: url('iconfont.eot?t=1504918617351#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAA8IAAsAAAAAFvwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZXAkkXY21hcAAAAYAAAADiAAACoASc1vNnbHlmAAACZAAAChIAAA7QPvpsp2hlYWQAAAx4AAAALgAAADYPC/6daGhlYQAADKgAAAAgAAAAJAgZA1lobXR4AAAMyAAAABQAAABIR+kAAGxvY2EAAAzcAAAAJgAAACYh/B6MbWF4cAAADQQAAAAfAAAAIAEnAJVuYW1lAAANJAAAAUUAAAJtPlT+fXBvc3QAAA5sAAAAmgAAANfe0uWNeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/s84gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDxXYW7438AQw9zEMAUozAiSAwApKwyueJzFkksKAkEMRKv9O+MXFPyAiAy68QjjvVx6Bg/iEVx5CBeuq4+hlUlvBN1qmtfQSZOEVAA0AdTFXjSAcEOA2VXeUPnryCp/A2e9ZxjJ08GRgTmX3PHAEy+8x2ksnk/9sEjGObcsU2SSIp8sKKOdBVZYY5NOUUVGGGKAmuqN0UVbHeToqZu+6res89D6kvUHFv5X+t161f1Ir7E4JtQiE5olmDmaKpg7mi84dzRpcOHYTnDpWE5uHekA7hwpApaO7Q4PDiz3ybHueHFsj3h3pCHixJGaiFNHuiIWDpovyRNILgAAeJydV32MG8UVnzezH/5c27vrXdtn+2yvvXvBd078cXY+feckPdSQO9GWj1AaQr4Kf3DtVQilEqE50UDTkooUUgmE1DaEJqEFtRKgAk0LhUj9iwZQEQpVlaT0W0goBVFyyS59s75LD4XyR+/mZt68efN25s17v/eOiIR8dJYdZymikSFSJ+vJ1YSAVIWSQnNQdFo1WoVkUUyausIcyynKVqnG1oBZknSj0W7ZpiRLMVAgD81io+3UqAOjrS5dBQ0jB5AeyHxBrWRVdgBCKSd/j7eBPgrJQSsb6454nx0e0xsFLbAroqppVd0fkEQxQKkQU2DaNIJiMCR5j4mxTPL44BI6CJG0k9l4Q7QwoG7d1/pKrmIGAWZnQRsoKEfHEpkEtt0ZQ1PTcjwaSGWiVlmHXX8Op7RIzn6b4I+Md72N7aPvkDAxiUWWkh7e9zpCKkV+E6eogG6Yl9FWkd9Va/p8i/Mr9lLw2XIiD2axCx1mWlqxZDuJLpohqRurIKEArIZ9kXg84n2d9/+LPrbQ0U0gnwlEvHJqEGAwRX+E45nZ2f3uQ5EYQCwCj8UjJyD2fjzFp6n4zCIijg2uXmDsj6CiQuriuXlNf591H4pH6JuR+MuRuPtOJE4IRVtcEFayu0mKpPHFbUkGSTfBaDY67TVQFphKxNGWU4dHgqrsHQgGYSYUkSQVHAglZ7zD3msq+wZjsnc6lAp5Z4I0qD8hnPTm4IdQDP1cD6K9GX7jFXaIvk1s0iBThHQWLNQwzKRhjtZALtagjk4jo11NNGanaDvoTDKaFa1aA81K6lLJXgNWDVrtTnO01eZ+1cyDLj2bMAE30RkcB0xWF7wTihIK2kX4oG5QtkyAOlo6uv0eSu/ZvmMvY3uTm7SsuklRVWWTmtU2RTW1Z6pwRDVNdXPCeK4aYxCMx9syFVYI7s9aMZbKwDa2d8eOvZTy3vv39YqmKdeDmlXhvyT3LW7PX7GX2ToSJ0W0Z40HkJ6njS5t2Wja0lJkdWEQOu08SKzbffT4o7snJnb3h3u903EnvjcG+SXxm734kjzQF9ZMTNx5+PjhO/vDQ97bsdjdsSsKEN9yIQaFJfhNtPFHL7EXWJck8JtNso5cS3aSXeRbZB8hIlrMGUUjoq3MJJq0riEDzSwn84DR2e6wT5LAwJcuScDlEv0QWJAY/QQdLXuxjjXApt1SDaBWmh+GwFTPq/zp/GHoU1fdC641AjBizS87qcTCaiLlfMpal46X/2ZxvnWRL2+4tJJKwH42Xv5rf/ECH67i3PNqKqW6r/1/+84v+MCb7Ciz0QdKhGgt9Fbu68mELllFqQMly5ZwYvhImWjb8hdVnRFdVfWLH9kAR558MiSKIfp0SAQQQ7DnxRf5mosSYNN/IMvdeElg/ntvsJ+yqo9nRMSnwJfAh1CALYohSp45J4rnnun30wcYOzDt99VLzGfO0SMLXOxRN88L97E5doevexxRchviZKJll/wboHMsojUkdNNCyOPx7CSs9qi/yHnzANnndSyMeY6tctLioNrsg62eLHIfKqIsPB7Vo9j+0B9OhqIAUEi7c6kCEsjBvleHd+s9Pr33BE68ozg5EYpGQ+y32F/0cjBSgqmcA7vgQc72poPRaHARDU+hLHPfTRe4bppgzN/N3LllPUp7y6jEOXu28Y/06tv6R0HeddwjnNz8WyPA/ZpewAxyN1pGAau0lPG84Fi85+E+iikDyVIMJEwIujEIlzWKeNvudFG40+pvW2gUFWEY8cSK683G4m0mRhs3IJKNMWjbFj1cuXY4EhnIBkJBMRyCcg6CAZYvrKUMvkpF/GNsbakAsiyGw9SuUUWRw9FwOJzMatqK6WUxybBexvVAkK74vIi2CEf0fCwmzS/FK9cMRyOBUAibFArT8SrkS4t1H8xkqIAGEqgo6TnAQ1RubIrsGKXHmLh6ukaDQTkSoXYGAhITBYFRUaBWKVwuSGdX31ZjeKgry5QvMEEA4CuDcjiTAaBAGZYEAmTb9uaWSB+n2MR+bpkVCJslUcxfFV6zENkgZpt0sGRhi0JBq9h+nu5U2i1K3vJOixIUT52CojT5wPO3PPeBKH7wnN+HvQ8NB9/XgIDOZkXv9FsLwrc8/8DkxY0LctjD6w+HjbR3Mm2EH46OcFcQ8Dx78Dx7/FzXRSwmZv8Q+GCY8/DrhpnQFWr1uQ3OFhMfj9TKIhoqo6L11FVfpnTH5OpGEEppemO6AgPNtdbGnRR2TuaXm0H3MNt5VWMdwLpGYz2wtfRWHGB9w2e5f6Gb3Z/Is6hgcidAWaZjAxZMgDXg3lwZb2SQj+r1hAzLe546uQMxxleD+1u9r6HKJtfSRF1X9n78mXm8OcUeZBOICC30eaPRAQxf9O95LHCw102xJOWgDwVreB70c4EPAogAcErWZCjJiibPRXXlvKzFZIrBC6riTilaP8LLGfoGHlU5KstQDKgxeY52Q5jb3Zfm5JgaeC8aOoiioCkHedweQVG81JFQFM8YxjO+wL7NxtFDZJzFsK7ltZ5DVuObYK0HzWQV/6xV8PERG9ZtZrOLh5at0SY4NfhYiYd3dGTDtEYNU+N4XrJHEz6+m8mmkYQnrrn8Jx6ZicSzMzNw+13G+rz3pTx3rzzdi2M2OSQI90vCDwKSu1sKBCR4TAqcBnpyef/nRL/mu3hmOTx/VzI7lHcjuSGAoRzVB9cZQ4J0vyC4g3wjfV8KwGlZ9mMCu9/RP5IbyQ4yzetah8PxPLTy6xkKAhSCzejiy/Es3fIRC+GGN4kjENb1JbuF2NNpo69i/LT5r0/KmOmBF2QNQ5echf8E2LWe8Xu7BbCySp+qrgAWZYKiCDEJH3TAncyWsRZN018OVOTofVAv5zrpTCtXXJkXC91xKRYWraaRqg+I6RHNqa66utVj92lY4a9wny0MD/eq1WLcNIuGwUBY6VCluoLSFdU/0eUDAUUWpWJPOpstl7Puv9JlVs5upqb6LKsCW91Z2ZXlQlrIpXpiOCaVrgiEwkkhmRGCW78ZpMulX2TK7CY87HGo9vhnbjdKBjYez2jLf9JH0IMGyTLf34uLjMnL+9KlZI6eYFuANR73CURknvJlyTETMv2O+/r8s9f80X06mkhEaY33sFEUXw2FXg3pIfE3x47dilJwqC/tbck7VEhEvS2+4KFowr3A7pDCkA9Ld0iRsPthWGLf3wIntvSxZ5a5iIV1sopMkM+hl/Nnsx2eaHlZ0McVzDSIh8kFhOFchCIMSqeSh371kKeS6KMmVupd0HxS5i/NJjdspWzb1NRN4H03tdbGGd26IdtIzeG/bFs39KelsfR7sURAhFv0Kfd7I2MAYzeMiWNwsr4KKJI4f8Unh+urxmgBd0xt5/vSBzET0+1ceSJ2RLPMvjrsIZM+qjfT2qByb2nZWRgbwe2o6JBPrRyu92if9NXji/0H5jCWgQAAeJxjYGRgYADijkTV8Hh+m68M3CwMIHD1Zmwkgv6fw2LF3ATkcjAwgUQBGHYKFgAAeJxjYGRgYG7438AQw8LAwPD/GIsVA1AEBQgBAHGOBHp4nGNhYGBgfsnAwMJAGQYAR68BMQAAAAAAdgD8AS4BpAHeAqYC3gMMA5wEXASkBRYFaAXmBowG4gdoAAB4nGNgZGBgEGLoZOBmAAEmIOYCQgaG/2A+AwAYjgG9AHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nG2MXQ6CMBCEOyhtBUXFk5B4oWr4WTRbDDS2nN5NeHVeNvPN7KhMbSrUf9XIsMMeOTQMLA4oUOKIEyqcccEVNW4KMaen53s+BOpCFYnXlvtvyyM51jE48dUcfPKh99yzhGajTfkSIA8fsfbtRlrEm3kITqCeB5rkJOIUWh3JrY5scjL1cF4vYZJ9s5Ua27UsDe6V+gG+QzX9AAA=') format('woff'), + url('iconfont.ttf?t=1504918617351') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('iconfont.svg?t=1504918617351#iconfont') format('svg'); /* iOS 4.1- */ +} + +.iconfont { + font-family:"iconfont" !important; + font-size:16px; + font-style:normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-icon4:before { content: "\e619"; } + +.icon-huifu:before { content: "\e61a"; } + +.icon-xinzengwenjian:before { content: "\e63c"; } + +.icon-xuanze:before { content: "\e724"; } + +.icon-suoyougongneng:before { content: "\e715"; } + +.icon-xuanze1:before { content: "\e627"; } + +.icon-kongxinquan:before { content: "\e714"; } + +.icon-lajitong:before { content: "\e626"; } + +.icon-shuaxin:before { content: "\e6ae"; } + +.icon-shipin:before { content: "\e63d"; } + +.icon-yinyue:before { content: "\e680"; } + +.icon-xiazai:before { content: "\e6d8"; } + +.icon-yasuobao:before { content: "\e60b"; } + +.icon-tupian:before { content: "\e60a"; } + +.icon-shipin1:before { content: "\e601"; } + +.icon-fenxiang:before { content: "\e61b"; } + diff --git a/src/main/resources/static/css/common/skintheme.css b/src/main/resources/static/css/common/skintheme.css new file mode 100644 index 0000000000000000000000000000000000000000..7656363b7e287d9ef2c2dd8928f5b9ef1766eae2 --- /dev/null +++ b/src/main/resources/static/css/common/skintheme.css @@ -0,0 +1,89 @@ +/* 这里将是黄色主题的内容 */ +.yellow { + background: #f39c12 !important; +} +.yellow-box{ + border-top: 3px solid #f39c12; +} +.yellow-y{ + background: #d69325; +} +.yellow-none:focus, +.yellow-none:HOVER, +.yellow-none:visited{ + background: #d69325!important;; + color: white; +} +.yellow-left:hover, +.yellow-left:focus, +.yellow-left:visited{ + border-left: 3px solid #f39c12!important; +} + + +/* 这里将是蓝色主题的内容 */ +.blue { + background: #00c0ef !important; +} +.blue-box{ + border-top: 3px solid #00c0ef; +} +.blue-b{ + background:#19a8cc; +} +.blue-none:focus, +.blue-none:HOVER, +.blue-none:visited +{ + background: #19a8cc!important; + color: white; +} +.blue-left:hover, +.blue-left:focus, +.blue-left:visited{ + border-left: 3px solid #00c0ef!important; +} + +/* 这里将是红色主题的内容 */ +.red { + background: #dd4b39 !important; +} +.red-box{ + border-top: 3px solid #dd4b39; +} +.red-r{ + background:#c54030 !important; +} +.red-none:focus, +.red-none:HOVER, +.red-none:visited{ + background: #c54030 !important; + color: white; +} +.red-left:hover, +.red-left:focus, +.red-left:visited{ + border-left: 3px solid #dd4b39 !important; +} + +/* 这里将是绿色主题的内容 */ +.green{ + background: #00a65a !important; +} +.green-box{ + border-top: 3px solid #00a65a; +} +.green-g{ + background: #008d4c; +} +.green-none:focus, +.green-none:HOVER, +.green-none:visited{ + background: #008d4c!important;; + color: white; +} +.green-left:hover, +.green-left:focus, +.green-left:visited{ + border-left: 3px solid #00a65a!important; +} diff --git a/src/main/resources/static/css/common/tanchuang.css b/src/main/resources/static/css/common/tanchuang.css new file mode 100644 index 0000000000000000000000000000000000000000..f6c50f5101e9035605a3b1739661a574d89fc11a --- /dev/null +++ b/src/main/resources/static/css/common/tanchuang.css @@ -0,0 +1,87 @@ +#myModal .b { + color: #72afd2; +} + +#myModal .b:hover { + color: #23527c; +} + +#myModal #pager { + border-top: solid 1px #F5F5F5; + padding: 10px 0; + margin-top: -10px; + background: #FAFAFA; + overflow: hidden; +} + +#myModal div.Pager .CustomInfo span { + color: #000; + font-weight: bold; + padding: 5px; +} + +#myModal .modal-1 { + margin: 20px; + padding: 20px; + background: #ECF0F5; +} + +#myModal .modal-2 { + background: white; + border-top: 3px solid #D2D6DE; +} + +#myModal .closespan { + color: white; + font-size: 45px; +} + +#myModal .input-group { + width: 150px; + float: right; + margin-top: 13px; +} + +#shareModal .b { + color: #72afd2; +} + +#shareModal .b:hover { + color: #23527c; +} + +#shareModal #pager { + border-top: solid 1px #F5F5F5; + padding: 10px 0; + margin-top: -10px; + background: #FAFAFA; + overflow: hidden; +} + +#shareModal div.Pager .CustomInfo span { + color: #000; + font-weight: bold; + padding: 5px; +} + +#shareModal .modal-1 { + margin: 20px; + padding: 20px; + background: #ECF0F5; +} + +#shareModal .modal-2 { + background: white; + border-top: 3px solid #D2D6DE; +} + +#shareModal .closespan { + color: white; + font-size: 45px; +} + +#shareModal .input-group { + width: 150px; + float: right; + margin-top: 13px; +} \ No newline at end of file diff --git a/src/main/resources/static/css/controlpanel.css b/src/main/resources/static/css/controlpanel.css new file mode 100644 index 0000000000000000000000000000000000000000..9890d6524d05b01da691f4c46becb02f13dd61d2 --- /dev/null +++ b/src/main/resources/static/css/controlpanel.css @@ -0,0 +1,252 @@ +/*四个栅格系统,签到管理等*/ +.jichu { + position: relative; + border-radius: 3px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3) +} + +.daiban { + background: #dd4b39 !important; +} + +.kaoqin { + background: #00c0ef !important; +} + +.filecolor { + background-color: #00a65a !important; +} + +.tongxun { + background-color: #f39c12 !important; +} + +.chat { + background-color: #8a6d3b !important; +} + +.wenzi { + color: whitesmoke; + padding: 10px; +} + +.iconfont .glyphicon{ + margin-top: -100px; + margin-left: 156px; + font-size: 76px; + color: rgba(0, 0, 0, 0.15); +} +.iconfont .glyphicon:hover{ + font-size: 86px; +} + +.moreduo { + display: block; + line-height: 26px; + background: rgba(0, 0, 0, 0.1); + height: 26px; + color: whitesmoke; + text-align: center; +} + +.moreduo:hover { + text-decoration: none; +} +/*盒子模型基本css*/ +.right-btn-group { + color: white; + border-color: #367fa9; + border: 1px solid transparent; + border-radius: 3px; + margin-top: 5px; + margin-right: 10px; +} + +.right-btn-group button { + background: #e6e6e6; + border: 1px solid transparent; + border-radius: 3px; + outline-style: none; + height: 25px; +} + +.right-btn-group button:hover { + background: #adadad; +} + +.right-btn-group a { + color: white; +} + +.basicskin { + font-size: 9pt; + color: #fff; + padding: 2px 4px; + border-radius: 3px; +} + +.blueskin { + background-color: #00C0EF; +} + +.yellowskin { + background: #F39C12; +} + +.redskin { + background: #DD4B39; +} + +.look-xiangxi { + background-color: #f4f4f4; + color: #444; + border-radius: 3px; + border: 1px solid #ddd; + padding: 4px 8px; + font-size: 9pt; +} + +.look-xiangxi:hover { + text-decoration: none; +} + +.box-show { + border-top: 3px solid #ccc; + background: white; +} + +.box-show-heading { + background: white; + border: 0px; + height: 40px; + padding:0px; +} + +.btn-color button { + color: #fff; +} + +.btn-color button:hover { + background: #adadad; +} +/*右边五个格子的盒子,我的便签*/ +.list-group-item-li { + position: relative; + margin-bottom: -26px; +} + +.item-li-img { + position: absolute; + line-height: 100%; + border-radius: 50%; + width: 40px; + height: 40px; +} + +.item-li-p { + display: inline-block; + margin-top: -10px; + margin-left: 40px; + width: 94%; + padding: 10px; +} + +.input-div { + width: 100%; + text-align: center; + padding: 10px; +} + +.input-div input { + width: 90%; + height: 32px; + text-indent: 10px; +} + +.input-div input:focus { + border: 1px solid green; +} + +.input-div a { + border: 1px solid #4cae4c; + background: #00a65a; + color: white; + display: inline-block; + height: 32px; + width: 32px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; +} + +.panel-title h4 { + margin-left: 12px; +} + +.container-fluid { + padding: 0px; +} + +.dropdown-menu>li>a { + padding: 3px 13px; + color: #6f6f6f; +} + +.dropdown-menu { + min-width: 110px; + border: 1px solid #eaecec; + margin-left: -80px; +} + + + #calendar{ + font-size: 25px; + } + #calendar td,th{ + width: 14%; + padding: 9px 0 !important; + text-align: center !important; + /* padding-left: 23px; */ + /* padding-right: 20px; */ + /* padding-top: 9px; */ + /* padding-bottom: 9px; */ + cursor: pointer; + } + .col-md-7 td,th{ + text-align: left !important; + } + .tdhuifu { + padding-left: 13px !important; + padding-right: 10px !important; + } + /*当前天*/ + .today{ + color:red; + } + /*本月 文字颜色*/ + .currentday{ + color: white; + } + /*其他月颜色*/ + .lastMonth{ + color: black; + } + .nextMonth{ + color: black; + } + .rightcolmd{ + float:left; + width:41.66666667%; + min-height: 1px; + padding-right: 15px; + padding-left: 15px;} + + .right-btn-group button{ + background: #337ab7 !important; + } + .glyphicon-flag{ + color: #EE2C2C !important; + } + .col-md-7 th{ + padding-left: 10px !important; + } + diff --git a/src/main/resources/static/easyui/easyui-lang-zh_CN.js b/src/main/resources/static/easyui/easyui-lang-zh_CN.js new file mode 100644 index 0000000000000000000000000000000000000000..fa9ae25b6dc40ef92daed65336d5e23525ff13bc --- /dev/null +++ b/src/main/resources/static/easyui/easyui-lang-zh_CN.js @@ -0,0 +1,66 @@ +if ($.fn.pagination){ + $.fn.pagination.defaults.beforePageText = '第'; + $.fn.pagination.defaults.afterPageText = '共{pages}页'; + $.fn.pagination.defaults.displayMsg = '显示{from}到{to},共{total}记录'; +} +if ($.fn.datagrid){ + $.fn.datagrid.defaults.loadMsg = '正在处理,请稍待。。。'; +} +if ($.fn.treegrid && $.fn.datagrid){ + $.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg; +} +if ($.messager){ + $.messager.defaults.ok = '确定'; + $.messager.defaults.cancel = '取消'; +} +$.map(['validatebox','textbox','passwordbox','filebox','searchbox', + 'combo','combobox','combogrid','combotree', + 'datebox','datetimebox','numberbox', + 'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){ + if ($.fn[plugin]){ + $.fn[plugin].defaults.missingMessage = '该输入项为必输项'; + } +}); +if ($.fn.validatebox){ + $.fn.validatebox.defaults.rules.email.message = '请输入有效的电子邮件地址'; + $.fn.validatebox.defaults.rules.url.message = '请输入有效的URL地址'; + $.fn.validatebox.defaults.rules.length.message = '输入内容长度必须介于{0}和{1}之间'; + $.fn.validatebox.defaults.rules.remote.message = '请修正该字段'; +} +if ($.fn.calendar){ + $.fn.calendar.defaults.weeks = ['日','一','二','三','四','五','六']; + $.fn.calendar.defaults.months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']; +} +if ($.fn.datebox){ + $.fn.datebox.defaults.currentText = '今天'; + $.fn.datebox.defaults.closeText = '关闭'; + $.fn.datebox.defaults.okText = '确定'; + $.fn.datebox.defaults.formatter = function(date){ + var y = date.getFullYear(); + var m = date.getMonth()+1; + var d = date.getDate(); + return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d); + }; + $.fn.datebox.defaults.parser = function(s){ + if (!s) return new Date(); + var ss = s.split('-'); + var y = parseInt(ss[0],10); + var m = parseInt(ss[1],10); + var d = parseInt(ss[2],10); + if (!isNaN(y) && !isNaN(m) && !isNaN(d)){ + return new Date(y,m-1,d); + } else { + return new Date(); + } + }; +} +if ($.fn.datetimebox && $.fn.datebox){ + $.extend($.fn.datetimebox.defaults,{ + currentText: $.fn.datebox.defaults.currentText, + closeText: $.fn.datebox.defaults.closeText, + okText: $.fn.datebox.defaults.okText + }); +} +if ($.fn.datetimespinner){ + $.fn.datetimespinner.defaults.selections = [[0,4],[5,7],[8,10],[11,13],[14,16],[17,19]] +} diff --git a/src/main/resources/static/easyui/jquery.easyui.min.js b/src/main/resources/static/easyui/jquery.easyui.min.js new file mode 100644 index 0000000000000000000000000000000000000000..97743c9cf6d7b1019d510e0530164923ee753247 --- /dev/null +++ b/src/main/resources/static/easyui/jquery.easyui.min.js @@ -0,0 +1,16078 @@ +/** + * jQuery EasyUI 1.5.2 + * + * Copyright (c) 2009-2017 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +$.easyui={indexOfArray:function(a,o,id){ +for(var i=0,_1=a.length;i<_1;i++){ +if(id==undefined){ +if(a[i]==o){ +return i; +} +}else{ +if(a[i][o]==id){ +return i; +} +} +} +return -1; +},removeArrayItem:function(a,o,id){ +if(typeof o=="string"){ +for(var i=0,_2=a.length;i<_2;i++){ +if(a[i][o]==id){ +a.splice(i,1); +return; +} +} +}else{ +var _3=this.indexOfArray(a,o); +if(_3!=-1){ +a.splice(_3,1); +} +} +},addArrayItem:function(a,o,r){ +var _4=this.indexOfArray(a,o,r?r[o]:undefined); +if(_4==-1){ +a.push(r?r:o); +}else{ +a[_4]=r?r:o; +} +},getArrayItem:function(a,o,id){ +var _5=this.indexOfArray(a,o,id); +return _5==-1?null:a[_5]; +},forEach:function(_6,_7,_8){ +var _9=[]; +for(var i=0;i<_6.length;i++){ +_9.push(_6[i]); +} +while(_9.length){ +var _a=_9.shift(); +if(_8(_a)==false){ +return; +} +if(_7&&_a.children){ +for(var i=_a.children.length-1;i>=0;i--){ +_9.unshift(_a.children[i]); +} +} +} +}}; +$.parser={auto:true,onComplete:function(_b){ +},plugins:["draggable","droppable","resizable","pagination","tooltip","linkbutton","menu","menubutton","splitbutton","switchbutton","progressbar","tree","textbox","passwordbox","filebox","combo","combobox","combotree","combogrid","combotreegrid","tagbox","numberbox","validatebox","searchbox","spinner","numberspinner","timespinner","datetimespinner","calendar","datebox","datetimebox","slider","layout","panel","datagrid","propertygrid","treegrid","datalist","tabs","accordion","window","dialog","form"],parse:function(_c){ +var aa=[]; +for(var i=0;i<$.parser.plugins.length;i++){ +var _d=$.parser.plugins[i]; +var r=$(".easyui-"+_d,_c); +if(r.length){ +if(r[_d]){ +r.each(function(){ +$(this)[_d]($.data(this,"options")||{}); +}); +}else{ +aa.push({name:_d,jq:r}); +} +} +} +if(aa.length&&window.easyloader){ +var _e=[]; +for(var i=0;i=0){ +v=Math.floor((_12.width()-_13)*v/100); +}else{ +v=Math.floor((_12.height()-_13)*v/100); +} +}else{ +v=parseInt(v)||undefined; +} +return v; +},parseOptions:function(_15,_16){ +var t=$(_15); +var _17={}; +var s=$.trim(t.attr("data-options")); +if(s){ +if(s.substring(0,1)!="{"){ +s="{"+s+"}"; +} +_17=(new Function("return "+s))(); +} +$.map(["width","height","left","top","minWidth","maxWidth","minHeight","maxHeight"],function(p){ +var pv=$.trim(_15.style[p]||""); +if(pv){ +if(pv.indexOf("%")==-1){ +pv=parseInt(pv); +if(isNaN(pv)){ +pv=undefined; +} +} +_17[p]=pv; +} +}); +if(_16){ +var _18={}; +for(var i=0;i<_16.length;i++){ +var pp=_16[i]; +if(typeof pp=="string"){ +_18[pp]=t.attr(pp); +}else{ +for(var _19 in pp){ +var _1a=pp[_19]; +if(_1a=="boolean"){ +_18[_19]=t.attr(_19)?(t.attr(_19)=="true"):undefined; +}else{ +if(_1a=="number"){ +_18[_19]=t.attr(_19)=="0"?0:parseFloat(t.attr(_19))||undefined; +} +} +} +} +} +$.extend(_17,_18); +} +return _17; +}}; +$(function(){ +var d=$("
").appendTo("body"); +$._boxModel=d.outerWidth()!=100; +d.remove(); +d=$("
").appendTo("body"); +$._positionFixed=(d.css("position")=="fixed"); +d.remove(); +if(!window.easyloader&&$.parser.auto){ +$.parser.parse(); +} +}); +$.fn._outerWidth=function(_1b){ +if(_1b==undefined){ +if(this[0]==window){ +return this.width()||document.body.clientWidth; +} +return this.outerWidth()||0; +} +return this._size("width",_1b); +}; +$.fn._outerHeight=function(_1c){ +if(_1c==undefined){ +if(this[0]==window){ +return this.height()||document.body.clientHeight; +} +return this.outerHeight()||0; +} +return this._size("height",_1c); +}; +$.fn._scrollLeft=function(_1d){ +if(_1d==undefined){ +return this.scrollLeft(); +}else{ +return this.each(function(){ +$(this).scrollLeft(_1d); +}); +} +}; +$.fn._propAttr=$.fn.prop||$.fn.attr; +$.fn._size=function(_1e,_1f){ +if(typeof _1e=="string"){ +if(_1e=="clear"){ +return this.each(function(){ +$(this).css({width:"",minWidth:"",maxWidth:"",height:"",minHeight:"",maxHeight:""}); +}); +}else{ +if(_1e=="fit"){ +return this.each(function(){ +_20(this,this.tagName=="BODY"?$("body"):$(this).parent(),true); +}); +}else{ +if(_1e=="unfit"){ +return this.each(function(){ +_20(this,$(this).parent(),false); +}); +}else{ +if(_1f==undefined){ +return _21(this[0],_1e); +}else{ +return this.each(function(){ +_21(this,_1e,_1f); +}); +} +} +} +} +}else{ +return this.each(function(){ +_1f=_1f||$(this).parent(); +$.extend(_1e,_20(this,_1f,_1e.fit)||{}); +var r1=_22(this,"width",_1f,_1e); +var r2=_22(this,"height",_1f,_1e); +if(r1||r2){ +$(this).addClass("easyui-fluid"); +}else{ +$(this).removeClass("easyui-fluid"); +} +}); +} +function _20(_23,_24,fit){ +if(!_24.length){ +return false; +} +var t=$(_23)[0]; +var p=_24[0]; +var _25=p.fcount||0; +if(fit){ +if(!t.fitted){ +t.fitted=true; +p.fcount=_25+1; +$(p).addClass("panel-noscroll"); +if(p.tagName=="BODY"){ +$("html").addClass("panel-fit"); +} +} +return {width:($(p).width()||1),height:($(p).height()||1)}; +}else{ +if(t.fitted){ +t.fitted=false; +p.fcount=_25-1; +if(p.fcount==0){ +$(p).removeClass("panel-noscroll"); +if(p.tagName=="BODY"){ +$("html").removeClass("panel-fit"); +} +} +} +return false; +} +}; +function _22(_26,_27,_28,_29){ +var t=$(_26); +var p=_27; +var p1=p.substr(0,1).toUpperCase()+p.substr(1); +var min=$.parser.parseValue("min"+p1,_29["min"+p1],_28); +var max=$.parser.parseValue("max"+p1,_29["max"+p1],_28); +var val=$.parser.parseValue(p,_29[p],_28); +var _2a=(String(_29[p]||"").indexOf("%")>=0?true:false); +if(!isNaN(val)){ +var v=Math.min(Math.max(val,min||0),max||99999); +if(!_2a){ +_29[p]=v; +} +t._size("min"+p1,""); +t._size("max"+p1,""); +t._size(p,v); +}else{ +t._size(p,""); +t._size("min"+p1,min); +t._size("max"+p1,max); +} +return _2a||_29.fit; +}; +function _21(_2b,_2c,_2d){ +var t=$(_2b); +if(_2d==undefined){ +_2d=parseInt(_2b.style[_2c]); +if(isNaN(_2d)){ +return undefined; +} +if($._boxModel){ +_2d+=_2e(); +} +return _2d; +}else{ +if(_2d===""){ +t.css(_2c,""); +}else{ +if($._boxModel){ +_2d-=_2e(); +if(_2d<0){ +_2d=0; +} +} +t.css(_2c,_2d+"px"); +} +} +function _2e(){ +if(_2c.toLowerCase().indexOf("width")>=0){ +return t.outerWidth()-t.width(); +}else{ +return t.outerHeight()-t.height(); +} +}; +}; +}; +})(jQuery); +(function($){ +var _2f=null; +var _30=null; +var _31=false; +function _32(e){ +if(e.touches.length!=1){ +return; +} +if(!_31){ +_31=true; +dblClickTimer=setTimeout(function(){ +_31=false; +},500); +}else{ +clearTimeout(dblClickTimer); +_31=false; +_33(e,"dblclick"); +} +_2f=setTimeout(function(){ +_33(e,"contextmenu",3); +},1000); +_33(e,"mousedown"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _34(e){ +if(e.touches.length!=1){ +return; +} +if(_2f){ +clearTimeout(_2f); +} +_33(e,"mousemove"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _35(e){ +if(_2f){ +clearTimeout(_2f); +} +_33(e,"mouseup"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _33(e,_36,_37){ +var _38=new $.Event(_36); +_38.pageX=e.changedTouches[0].pageX; +_38.pageY=e.changedTouches[0].pageY; +_38.which=_37||1; +$(e.target).trigger(_38); +}; +if(document.addEventListener){ +document.addEventListener("touchstart",_32,true); +document.addEventListener("touchmove",_34,true); +document.addEventListener("touchend",_35,true); +} +})(jQuery); +(function($){ +function _39(e){ +var _3a=$.data(e.data.target,"draggable"); +var _3b=_3a.options; +var _3c=_3a.proxy; +var _3d=e.data; +var _3e=_3d.startLeft+e.pageX-_3d.startX; +var top=_3d.startTop+e.pageY-_3d.startY; +if(_3c){ +if(_3c.parent()[0]==document.body){ +if(_3b.deltaX!=null&&_3b.deltaX!=undefined){ +_3e=e.pageX+_3b.deltaX; +}else{ +_3e=e.pageX-e.data.offsetWidth; +} +if(_3b.deltaY!=null&&_3b.deltaY!=undefined){ +top=e.pageY+_3b.deltaY; +}else{ +top=e.pageY-e.data.offsetHeight; +} +}else{ +if(_3b.deltaX!=null&&_3b.deltaX!=undefined){ +_3e+=e.data.offsetWidth+_3b.deltaX; +} +if(_3b.deltaY!=null&&_3b.deltaY!=undefined){ +top+=e.data.offsetHeight+_3b.deltaY; +} +} +} +if(e.data.parent!=document.body){ +_3e+=$(e.data.parent).scrollLeft(); +top+=$(e.data.parent).scrollTop(); +} +if(_3b.axis=="h"){ +_3d.left=_3e; +}else{ +if(_3b.axis=="v"){ +_3d.top=top; +}else{ +_3d.left=_3e; +_3d.top=top; +} +} +}; +function _3f(e){ +var _40=$.data(e.data.target,"draggable"); +var _41=_40.options; +var _42=_40.proxy; +if(!_42){ +_42=$(e.data.target); +} +_42.css({left:e.data.left,top:e.data.top}); +$("body").css("cursor",_41.cursor); +}; +function _43(e){ +if(!$.fn.draggable.isDragging){ +return false; +} +var _44=$.data(e.data.target,"draggable"); +var _45=_44.options; +var _46=$(".droppable:visible").filter(function(){ +return e.data.target!=this; +}).filter(function(){ +var _47=$.data(this,"droppable").options.accept; +if(_47){ +return $(_47).filter(function(){ +return this==e.data.target; +}).length>0; +}else{ +return true; +} +}); +_44.droppables=_46; +var _48=_44.proxy; +if(!_48){ +if(_45.proxy){ +if(_45.proxy=="clone"){ +_48=$(e.data.target).clone().insertAfter(e.data.target); +}else{ +_48=_45.proxy.call(e.data.target,e.data.target); +} +_44.proxy=_48; +}else{ +_48=$(e.data.target); +} +} +_48.css("position","absolute"); +_39(e); +_3f(e); +_45.onStartDrag.call(e.data.target,e); +return false; +}; +function _49(e){ +if(!$.fn.draggable.isDragging){ +return false; +} +var _4a=$.data(e.data.target,"draggable"); +_39(e); +if(_4a.options.onDrag.call(e.data.target,e)!=false){ +_3f(e); +} +var _4b=e.data.target; +_4a.droppables.each(function(){ +var _4c=$(this); +if(_4c.droppable("options").disabled){ +return; +} +var p2=_4c.offset(); +if(e.pageX>p2.left&&e.pageXp2.top&&e.pageYp2.left&&e.pageXp2.top&&e.pageY_62.options.edge; +}; +}); +}; +$.fn.draggable.methods={options:function(jq){ +return $.data(jq[0],"draggable").options; +},proxy:function(jq){ +return $.data(jq[0],"draggable").proxy; +},enable:function(jq){ +return jq.each(function(){ +$(this).draggable({disabled:false}); +}); +},disable:function(jq){ +return jq.each(function(){ +$(this).draggable({disabled:true}); +}); +}}; +$.fn.draggable.parseOptions=function(_67){ +var t=$(_67); +return $.extend({},$.parser.parseOptions(_67,["cursor","handle","axis",{"revert":"boolean","deltaX":"number","deltaY":"number","edge":"number","delay":"number"}]),{disabled:(t.attr("disabled")?true:undefined)}); +}; +$.fn.draggable.defaults={proxy:null,revert:false,cursor:"move",deltaX:null,deltaY:null,handle:null,disabled:false,edge:0,axis:null,delay:100,onBeforeDrag:function(e){ +},onStartDrag:function(e){ +},onDrag:function(e){ +},onStopDrag:function(e){ +}}; +$.fn.draggable.isDragging=false; +})(jQuery); +(function($){ +function _68(_69){ +$(_69).addClass("droppable"); +$(_69).bind("_dragenter",function(e,_6a){ +$.data(_69,"droppable").options.onDragEnter.apply(_69,[e,_6a]); +}); +$(_69).bind("_dragleave",function(e,_6b){ +$.data(_69,"droppable").options.onDragLeave.apply(_69,[e,_6b]); +}); +$(_69).bind("_dragover",function(e,_6c){ +$.data(_69,"droppable").options.onDragOver.apply(_69,[e,_6c]); +}); +$(_69).bind("_drop",function(e,_6d){ +$.data(_69,"droppable").options.onDrop.apply(_69,[e,_6d]); +}); +}; +$.fn.droppable=function(_6e,_6f){ +if(typeof _6e=="string"){ +return $.fn.droppable.methods[_6e](this,_6f); +} +_6e=_6e||{}; +return this.each(function(){ +var _70=$.data(this,"droppable"); +if(_70){ +$.extend(_70.options,_6e); +}else{ +_68(this); +$.data(this,"droppable",{options:$.extend({},$.fn.droppable.defaults,$.fn.droppable.parseOptions(this),_6e)}); +} +}); +}; +$.fn.droppable.methods={options:function(jq){ +return $.data(jq[0],"droppable").options; +},enable:function(jq){ +return jq.each(function(){ +$(this).droppable({disabled:false}); +}); +},disable:function(jq){ +return jq.each(function(){ +$(this).droppable({disabled:true}); +}); +}}; +$.fn.droppable.parseOptions=function(_71){ +var t=$(_71); +return $.extend({},$.parser.parseOptions(_71,["accept"]),{disabled:(t.attr("disabled")?true:undefined)}); +}; +$.fn.droppable.defaults={accept:null,disabled:false,onDragEnter:function(e,_72){ +},onDragOver:function(e,_73){ +},onDragLeave:function(e,_74){ +},onDrop:function(e,_75){ +}}; +})(jQuery); +(function($){ +$.fn.resizable=function(_76,_77){ +if(typeof _76=="string"){ +return $.fn.resizable.methods[_76](this,_77); +} +function _78(e){ +var _79=e.data; +var _7a=$.data(_79.target,"resizable").options; +if(_79.dir.indexOf("e")!=-1){ +var _7b=_79.startWidth+e.pageX-_79.startX; +_7b=Math.min(Math.max(_7b,_7a.minWidth),_7a.maxWidth); +_79.width=_7b; +} +if(_79.dir.indexOf("s")!=-1){ +var _7c=_79.startHeight+e.pageY-_79.startY; +_7c=Math.min(Math.max(_7c,_7a.minHeight),_7a.maxHeight); +_79.height=_7c; +} +if(_79.dir.indexOf("w")!=-1){ +var _7b=_79.startWidth-e.pageX+_79.startX; +_7b=Math.min(Math.max(_7b,_7a.minWidth),_7a.maxWidth); +_79.width=_7b; +_79.left=_79.startLeft+_79.startWidth-_79.width; +} +if(_79.dir.indexOf("n")!=-1){ +var _7c=_79.startHeight-e.pageY+_79.startY; +_7c=Math.min(Math.max(_7c,_7a.minHeight),_7a.maxHeight); +_79.height=_7c; +_79.top=_79.startTop+_79.startHeight-_79.height; +} +}; +function _7d(e){ +var _7e=e.data; +var t=$(_7e.target); +t.css({left:_7e.left,top:_7e.top}); +if(t.outerWidth()!=_7e.width){ +t._outerWidth(_7e.width); +} +if(t.outerHeight()!=_7e.height){ +t._outerHeight(_7e.height); +} +}; +function _7f(e){ +$.fn.resizable.isResizing=true; +$.data(e.data.target,"resizable").options.onStartResize.call(e.data.target,e); +return false; +}; +function _80(e){ +_78(e); +if($.data(e.data.target,"resizable").options.onResize.call(e.data.target,e)!=false){ +_7d(e); +} +return false; +}; +function _81(e){ +$.fn.resizable.isResizing=false; +_78(e,true); +_7d(e); +$.data(e.data.target,"resizable").options.onStopResize.call(e.data.target,e); +$(document).unbind(".resizable"); +$("body").css("cursor",""); +return false; +}; +return this.each(function(){ +var _82=null; +var _83=$.data(this,"resizable"); +if(_83){ +$(this).unbind(".resizable"); +_82=$.extend(_83.options,_76||{}); +}else{ +_82=$.extend({},$.fn.resizable.defaults,$.fn.resizable.parseOptions(this),_76||{}); +$.data(this,"resizable",{options:_82}); +} +if(_82.disabled==true){ +return; +} +$(this).bind("mousemove.resizable",{target:this},function(e){ +if($.fn.resizable.isResizing){ +return; +} +var dir=_84(e); +if(dir==""){ +$(e.data.target).css("cursor",""); +}else{ +$(e.data.target).css("cursor",dir+"-resize"); +} +}).bind("mouseleave.resizable",{target:this},function(e){ +$(e.data.target).css("cursor",""); +}).bind("mousedown.resizable",{target:this},function(e){ +var dir=_84(e); +if(dir==""){ +return; +} +function _85(css){ +var val=parseInt($(e.data.target).css(css)); +if(isNaN(val)){ +return 0; +}else{ +return val; +} +}; +var _86={target:e.data.target,dir:dir,startLeft:_85("left"),startTop:_85("top"),left:_85("left"),top:_85("top"),startX:e.pageX,startY:e.pageY,startWidth:$(e.data.target).outerWidth(),startHeight:$(e.data.target).outerHeight(),width:$(e.data.target).outerWidth(),height:$(e.data.target).outerHeight(),deltaWidth:$(e.data.target).outerWidth()-$(e.data.target).width(),deltaHeight:$(e.data.target).outerHeight()-$(e.data.target).height()}; +$(document).bind("mousedown.resizable",_86,_7f); +$(document).bind("mousemove.resizable",_86,_80); +$(document).bind("mouseup.resizable",_86,_81); +$("body").css("cursor",dir+"-resize"); +}); +function _84(e){ +var tt=$(e.data.target); +var dir=""; +var _87=tt.offset(); +var _88=tt.outerWidth(); +var _89=tt.outerHeight(); +var _8a=_82.edge; +if(e.pageY>_87.top&&e.pageY<_87.top+_8a){ +dir+="n"; +}else{ +if(e.pageY<_87.top+_89&&e.pageY>_87.top+_89-_8a){ +dir+="s"; +} +} +if(e.pageX>_87.left&&e.pageX<_87.left+_8a){ +dir+="w"; +}else{ +if(e.pageX<_87.left+_88&&e.pageX>_87.left+_88-_8a){ +dir+="e"; +} +} +var _8b=_82.handles.split(","); +for(var i=0;i<_8b.length;i++){ +var _8c=_8b[i].replace(/(^\s*)|(\s*$)/g,""); +if(_8c=="all"||_8c==dir){ +return dir; +} +} +return ""; +}; +}); +}; +$.fn.resizable.methods={options:function(jq){ +return $.data(jq[0],"resizable").options; +},enable:function(jq){ +return jq.each(function(){ +$(this).resizable({disabled:false}); +}); +},disable:function(jq){ +return jq.each(function(){ +$(this).resizable({disabled:true}); +}); +}}; +$.fn.resizable.parseOptions=function(_8d){ +var t=$(_8d); +return $.extend({},$.parser.parseOptions(_8d,["handles",{minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number",edge:"number"}]),{disabled:(t.attr("disabled")?true:undefined)}); +}; +$.fn.resizable.defaults={disabled:false,handles:"n, e, s, w, ne, se, sw, nw, all",minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000,edge:5,onStartResize:function(e){ +},onResize:function(e){ +},onStopResize:function(e){ +}}; +$.fn.resizable.isResizing=false; +})(jQuery); +(function($){ +function _8e(_8f,_90){ +var _91=$.data(_8f,"linkbutton").options; +if(_90){ +$.extend(_91,_90); +} +if(_91.width||_91.height||_91.fit){ +var btn=$(_8f); +var _92=btn.parent(); +var _93=btn.is(":visible"); +if(!_93){ +var _94=$("
").insertBefore(_8f); +var _95={position:btn.css("position"),display:btn.css("display"),left:btn.css("left")}; +btn.appendTo("body"); +btn.css({position:"absolute",display:"inline-block",left:-20000}); +} +btn._size(_91,_92); +var _96=btn.find(".l-btn-left"); +_96.css("margin-top",0); +_96.css("margin-top",parseInt((btn.height()-_96.height())/2)+"px"); +if(!_93){ +btn.insertAfter(_94); +btn.css(_95); +_94.remove(); +} +} +}; +function _97(_98){ +var _99=$.data(_98,"linkbutton").options; +var t=$(_98).empty(); +t.addClass("l-btn").removeClass("l-btn-plain l-btn-selected l-btn-plain-selected l-btn-outline"); +t.removeClass("l-btn-small l-btn-medium l-btn-large").addClass("l-btn-"+_99.size); +if(_99.plain){ +t.addClass("l-btn-plain"); +} +if(_99.outline){ +t.addClass("l-btn-outline"); +} +if(_99.selected){ +t.addClass(_99.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected"); +} +t.attr("group",_99.group||""); +t.attr("id",_99.id||""); +var _9a=$("").appendTo(t); +if(_99.text){ +$("").html(_99.text).appendTo(_9a); +}else{ +$(" ").appendTo(_9a); +} +if(_99.iconCls){ +$(" ").addClass(_99.iconCls).appendTo(_9a); +_9a.addClass("l-btn-icon-"+_99.iconAlign); +} +t.unbind(".linkbutton").bind("focus.linkbutton",function(){ +if(!_99.disabled){ +$(this).addClass("l-btn-focus"); +} +}).bind("blur.linkbutton",function(){ +$(this).removeClass("l-btn-focus"); +}).bind("click.linkbutton",function(){ +if(!_99.disabled){ +if(_99.toggle){ +if(_99.selected){ +$(this).linkbutton("unselect"); +}else{ +$(this).linkbutton("select"); +} +} +_99.onClick.call(this); +} +}); +_9b(_98,_99.selected); +_9c(_98,_99.disabled); +}; +function _9b(_9d,_9e){ +var _9f=$.data(_9d,"linkbutton").options; +if(_9e){ +if(_9f.group){ +$("a.l-btn[group=\""+_9f.group+"\"]").each(function(){ +var o=$(this).linkbutton("options"); +if(o.toggle){ +$(this).removeClass("l-btn-selected l-btn-plain-selected"); +o.selected=false; +} +}); +} +$(_9d).addClass(_9f.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected"); +_9f.selected=true; +}else{ +if(!_9f.group){ +$(_9d).removeClass("l-btn-selected l-btn-plain-selected"); +_9f.selected=false; +} +} +}; +function _9c(_a0,_a1){ +var _a2=$.data(_a0,"linkbutton"); +var _a3=_a2.options; +$(_a0).removeClass("l-btn-disabled l-btn-plain-disabled"); +if(_a1){ +_a3.disabled=true; +var _a4=$(_a0).attr("href"); +if(_a4){ +_a2.href=_a4; +$(_a0).attr("href","javascript:;"); +} +if(_a0.onclick){ +_a2.onclick=_a0.onclick; +_a0.onclick=null; +} +_a3.plain?$(_a0).addClass("l-btn-disabled l-btn-plain-disabled"):$(_a0).addClass("l-btn-disabled"); +}else{ +_a3.disabled=false; +if(_a2.href){ +$(_a0).attr("href",_a2.href); +} +if(_a2.onclick){ +_a0.onclick=_a2.onclick; +} +} +}; +$.fn.linkbutton=function(_a5,_a6){ +if(typeof _a5=="string"){ +return $.fn.linkbutton.methods[_a5](this,_a6); +} +_a5=_a5||{}; +return this.each(function(){ +var _a7=$.data(this,"linkbutton"); +if(_a7){ +$.extend(_a7.options,_a5); +}else{ +$.data(this,"linkbutton",{options:$.extend({},$.fn.linkbutton.defaults,$.fn.linkbutton.parseOptions(this),_a5)}); +$(this).removeAttr("disabled"); +$(this).bind("_resize",function(e,_a8){ +if($(this).hasClass("easyui-fluid")||_a8){ +_8e(this); +} +return false; +}); +} +_97(this); +_8e(this); +}); +}; +$.fn.linkbutton.methods={options:function(jq){ +return $.data(jq[0],"linkbutton").options; +},resize:function(jq,_a9){ +return jq.each(function(){ +_8e(this,_a9); +}); +},enable:function(jq){ +return jq.each(function(){ +_9c(this,false); +}); +},disable:function(jq){ +return jq.each(function(){ +_9c(this,true); +}); +},select:function(jq){ +return jq.each(function(){ +_9b(this,true); +}); +},unselect:function(jq){ +return jq.each(function(){ +_9b(this,false); +}); +}}; +$.fn.linkbutton.parseOptions=function(_aa){ +var t=$(_aa); +return $.extend({},$.parser.parseOptions(_aa,["id","iconCls","iconAlign","group","size","text",{plain:"boolean",toggle:"boolean",selected:"boolean",outline:"boolean"}]),{disabled:(t.attr("disabled")?true:undefined),text:($.trim(t.html())||undefined),iconCls:(t.attr("icon")||t.attr("iconCls"))}); +}; +$.fn.linkbutton.defaults={id:null,disabled:false,toggle:false,selected:false,outline:false,group:null,plain:false,text:"",iconCls:null,iconAlign:"left",size:"small",onClick:function(){ +}}; +})(jQuery); +(function($){ +function _ab(_ac){ +var _ad=$.data(_ac,"pagination"); +var _ae=_ad.options; +var bb=_ad.bb={}; +var _af=$(_ac).addClass("pagination").html("
"); +var tr=_af.find("tr"); +var aa=$.extend([],_ae.layout); +if(!_ae.showPageList){ +_b0(aa,"list"); +} +if(!_ae.showPageInfo){ +_b0(aa,"info"); +} +if(!_ae.showRefresh){ +_b0(aa,"refresh"); +} +if(aa[0]=="sep"){ +aa.shift(); +} +if(aa[aa.length-1]=="sep"){ +aa.pop(); +} +for(var _b1=0;_b1"); +ps.bind("change",function(){ +_ae.pageSize=parseInt($(this).val()); +_ae.onChangePageSize.call(_ac,_ae.pageSize); +_b8(_ac,_ae.pageNumber); +}); +for(var i=0;i<_ae.pageList.length;i++){ +$("").text(_ae.pageList[i]).appendTo(ps); +} +$("").append(ps).appendTo(tr); +}else{ +if(_b2=="sep"){ +$("
").appendTo(tr); +}else{ +if(_b2=="first"){ +bb.first=_b3("first"); +}else{ +if(_b2=="prev"){ +bb.prev=_b3("prev"); +}else{ +if(_b2=="next"){ +bb.next=_b3("next"); +}else{ +if(_b2=="last"){ +bb.last=_b3("last"); +}else{ +if(_b2=="manual"){ +$("").html(_ae.beforePageText).appendTo(tr).wrap(""); +bb.num=$("").appendTo(tr).wrap(""); +bb.num.unbind(".pagination").bind("keydown.pagination",function(e){ +if(e.keyCode==13){ +var _b4=parseInt($(this).val())||1; +_b8(_ac,_b4); +return false; +} +}); +bb.after=$("").appendTo(tr).wrap(""); +}else{ +if(_b2=="refresh"){ +bb.refresh=_b3("refresh"); +}else{ +if(_b2=="links"){ +$("").appendTo(tr); +}else{ +if(_b2=="info"){ +if(_b1==aa.length-1){ +$("
").appendTo(_af); +$("
").appendTo(_af); +}else{ +$("
").appendTo(tr); +} +} +} +} +} +} +} +} +} +} +} +} +if(_ae.buttons){ +$("
").appendTo(tr); +if($.isArray(_ae.buttons)){ +for(var i=0;i<_ae.buttons.length;i++){ +var btn=_ae.buttons[i]; +if(btn=="-"){ +$("
").appendTo(tr); +}else{ +var td=$("").appendTo(tr); +var a=$("").appendTo(td); +a[0].onclick=eval(btn.handler||function(){ +}); +a.linkbutton($.extend({},btn,{plain:true})); +} +} +}else{ +var td=$("").appendTo(tr); +$(_ae.buttons).appendTo(td).show(); +} +} +function _b3(_b5){ +var btn=_ae.nav[_b5]; +var a=$("").appendTo(tr); +a.wrap(""); +a.linkbutton({iconCls:btn.iconCls,plain:true}).unbind(".pagination").bind("click.pagination",function(){ +btn.handler.call(_ac); +}); +return a; +}; +function _b0(aa,_b6){ +var _b7=$.inArray(_b6,aa); +if(_b7>=0){ +aa.splice(_b7,1); +} +return aa; +}; +}; +function _b8(_b9,_ba){ +var _bb=$.data(_b9,"pagination").options; +_bc(_b9,{pageNumber:_ba}); +_bb.onSelectPage.call(_b9,_bb.pageNumber,_bb.pageSize); +}; +function _bc(_bd,_be){ +var _bf=$.data(_bd,"pagination"); +var _c0=_bf.options; +var bb=_bf.bb; +$.extend(_c0,_be||{}); +var ps=$(_bd).find("select.pagination-page-list"); +if(ps.length){ +ps.val(_c0.pageSize+""); +_c0.pageSize=parseInt(ps.val()); +} +var _c1=Math.ceil(_c0.total/_c0.pageSize)||1; +if(_c0.pageNumber<1){ +_c0.pageNumber=1; +} +if(_c0.pageNumber>_c1){ +_c0.pageNumber=_c1; +} +if(_c0.total==0){ +_c0.pageNumber=0; +_c1=0; +} +if(bb.num){ +bb.num.val(_c0.pageNumber); +} +if(bb.after){ +bb.after.html(_c0.afterPageText.replace(/{pages}/,_c1)); +} +var td=$(_bd).find("td.pagination-links"); +if(td.length){ +td.empty(); +var _c2=_c0.pageNumber-Math.floor(_c0.links/2); +if(_c2<1){ +_c2=1; +} +var _c3=_c2+_c0.links-1; +if(_c3>_c1){ +_c3=_c1; +} +_c2=_c3-_c0.links+1; +if(_c2<1){ +_c2=1; +} +for(var i=_c2;i<=_c3;i++){ +var a=$("").appendTo(td); +a.linkbutton({plain:true,text:i}); +if(i==_c0.pageNumber){ +a.linkbutton("select"); +}else{ +a.unbind(".pagination").bind("click.pagination",{pageNumber:i},function(e){ +_b8(_bd,e.data.pageNumber); +}); +} +} +} +var _c4=_c0.displayMsg; +_c4=_c4.replace(/{from}/,_c0.total==0?0:_c0.pageSize*(_c0.pageNumber-1)+1); +_c4=_c4.replace(/{to}/,Math.min(_c0.pageSize*(_c0.pageNumber),_c0.total)); +_c4=_c4.replace(/{total}/,_c0.total); +$(_bd).find("div.pagination-info").html(_c4); +if(bb.first){ +bb.first.linkbutton({disabled:((!_c0.total)||_c0.pageNumber==1)}); +} +if(bb.prev){ +bb.prev.linkbutton({disabled:((!_c0.total)||_c0.pageNumber==1)}); +} +if(bb.next){ +bb.next.linkbutton({disabled:(_c0.pageNumber==_c1)}); +} +if(bb.last){ +bb.last.linkbutton({disabled:(_c0.pageNumber==_c1)}); +} +_c5(_bd,_c0.loading); +}; +function _c5(_c6,_c7){ +var _c8=$.data(_c6,"pagination"); +var _c9=_c8.options; +_c9.loading=_c7; +if(_c9.showRefresh&&_c8.bb.refresh){ +_c8.bb.refresh.linkbutton({iconCls:(_c9.loading?"pagination-loading":"pagination-load")}); +} +}; +$.fn.pagination=function(_ca,_cb){ +if(typeof _ca=="string"){ +return $.fn.pagination.methods[_ca](this,_cb); +} +_ca=_ca||{}; +return this.each(function(){ +var _cc; +var _cd=$.data(this,"pagination"); +if(_cd){ +_cc=$.extend(_cd.options,_ca); +}else{ +_cc=$.extend({},$.fn.pagination.defaults,$.fn.pagination.parseOptions(this),_ca); +$.data(this,"pagination",{options:_cc}); +} +_ab(this); +_bc(this); +}); +}; +$.fn.pagination.methods={options:function(jq){ +return $.data(jq[0],"pagination").options; +},loading:function(jq){ +return jq.each(function(){ +_c5(this,true); +}); +},loaded:function(jq){ +return jq.each(function(){ +_c5(this,false); +}); +},refresh:function(jq,_ce){ +return jq.each(function(){ +_bc(this,_ce); +}); +},select:function(jq,_cf){ +return jq.each(function(){ +_b8(this,_cf); +}); +}}; +$.fn.pagination.parseOptions=function(_d0){ +var t=$(_d0); +return $.extend({},$.parser.parseOptions(_d0,[{total:"number",pageSize:"number",pageNumber:"number",links:"number"},{loading:"boolean",showPageList:"boolean",showPageInfo:"boolean",showRefresh:"boolean"}]),{pageList:(t.attr("pageList")?eval(t.attr("pageList")):undefined)}); +}; +$.fn.pagination.defaults={total:1,pageSize:10,pageNumber:1,pageList:[10,20,30,50],loading:false,buttons:null,showPageList:true,showPageInfo:true,showRefresh:true,links:10,layout:["list","sep","first","prev","sep","manual","sep","next","last","sep","refresh","info"],onSelectPage:function(_d1,_d2){ +},onBeforeRefresh:function(_d3,_d4){ +},onRefresh:function(_d5,_d6){ +},onChangePageSize:function(_d7){ +},beforePageText:"Page",afterPageText:"of {pages}",displayMsg:"Displaying {from} to {to} of {total} items",nav:{first:{iconCls:"pagination-first",handler:function(){ +var _d8=$(this).pagination("options"); +if(_d8.pageNumber>1){ +$(this).pagination("select",1); +} +}},prev:{iconCls:"pagination-prev",handler:function(){ +var _d9=$(this).pagination("options"); +if(_d9.pageNumber>1){ +$(this).pagination("select",_d9.pageNumber-1); +} +}},next:{iconCls:"pagination-next",handler:function(){ +var _da=$(this).pagination("options"); +var _db=Math.ceil(_da.total/_da.pageSize); +if(_da.pageNumber<_db){ +$(this).pagination("select",_da.pageNumber+1); +} +}},last:{iconCls:"pagination-last",handler:function(){ +var _dc=$(this).pagination("options"); +var _dd=Math.ceil(_dc.total/_dc.pageSize); +if(_dc.pageNumber<_dd){ +$(this).pagination("select",_dd); +} +}},refresh:{iconCls:"pagination-refresh",handler:function(){ +var _de=$(this).pagination("options"); +if(_de.onBeforeRefresh.call(this,_de.pageNumber,_de.pageSize)!=false){ +$(this).pagination("select",_de.pageNumber); +_de.onRefresh.call(this,_de.pageNumber,_de.pageSize); +} +}}}}; +})(jQuery); +(function($){ +function _df(_e0){ +var _e1=$(_e0); +_e1.addClass("tree"); +return _e1; +}; +function _e2(_e3){ +var _e4=$.data(_e3,"tree").options; +$(_e3).unbind().bind("mouseover",function(e){ +var tt=$(e.target); +var _e5=tt.closest("div.tree-node"); +if(!_e5.length){ +return; +} +_e5.addClass("tree-node-hover"); +if(tt.hasClass("tree-hit")){ +if(tt.hasClass("tree-expanded")){ +tt.addClass("tree-expanded-hover"); +}else{ +tt.addClass("tree-collapsed-hover"); +} +} +e.stopPropagation(); +}).bind("mouseout",function(e){ +var tt=$(e.target); +var _e6=tt.closest("div.tree-node"); +if(!_e6.length){ +return; +} +_e6.removeClass("tree-node-hover"); +if(tt.hasClass("tree-hit")){ +if(tt.hasClass("tree-expanded")){ +tt.removeClass("tree-expanded-hover"); +}else{ +tt.removeClass("tree-collapsed-hover"); +} +} +e.stopPropagation(); +}).bind("click",function(e){ +var tt=$(e.target); +var _e7=tt.closest("div.tree-node"); +if(!_e7.length){ +return; +} +if(tt.hasClass("tree-hit")){ +_145(_e3,_e7[0]); +return false; +}else{ +if(tt.hasClass("tree-checkbox")){ +_10c(_e3,_e7[0]); +return false; +}else{ +_188(_e3,_e7[0]); +_e4.onClick.call(_e3,_ea(_e3,_e7[0])); +} +} +e.stopPropagation(); +}).bind("dblclick",function(e){ +var _e8=$(e.target).closest("div.tree-node"); +if(!_e8.length){ +return; +} +_188(_e3,_e8[0]); +_e4.onDblClick.call(_e3,_ea(_e3,_e8[0])); +e.stopPropagation(); +}).bind("contextmenu",function(e){ +var _e9=$(e.target).closest("div.tree-node"); +if(!_e9.length){ +return; +} +_e4.onContextMenu.call(_e3,e,_ea(_e3,_e9[0])); +e.stopPropagation(); +}); +}; +function _eb(_ec){ +var _ed=$.data(_ec,"tree").options; +_ed.dnd=false; +var _ee=$(_ec).find("div.tree-node"); +_ee.draggable("disable"); +_ee.css("cursor","pointer"); +}; +function _ef(_f0){ +var _f1=$.data(_f0,"tree"); +var _f2=_f1.options; +var _f3=_f1.tree; +_f1.disabledNodes=[]; +_f2.dnd=true; +_f3.find("div.tree-node").draggable({disabled:false,revert:true,cursor:"pointer",proxy:function(_f4){ +var p=$("
").appendTo("body"); +p.html(" "+$(_f4).find(".tree-title").html()); +p.hide(); +return p; +},deltaX:15,deltaY:15,onBeforeDrag:function(e){ +if(_f2.onBeforeDrag.call(_f0,_ea(_f0,this))==false){ +return false; +} +if($(e.target).hasClass("tree-hit")||$(e.target).hasClass("tree-checkbox")){ +return false; +} +if(e.which!=1){ +return false; +} +var _f5=$(this).find("span.tree-indent"); +if(_f5.length){ +e.data.offsetWidth-=_f5.length*_f5.width(); +} +},onStartDrag:function(e){ +$(this).next("ul").find("div.tree-node").each(function(){ +$(this).droppable("disable"); +_f1.disabledNodes.push(this); +}); +$(this).draggable("proxy").css({left:-10000,top:-10000}); +_f2.onStartDrag.call(_f0,_ea(_f0,this)); +var _f6=_ea(_f0,this); +if(_f6.id==undefined){ +_f6.id="easyui_tree_node_id_temp"; +_12c(_f0,_f6); +} +_f1.draggingNodeId=_f6.id; +},onDrag:function(e){ +var x1=e.pageX,y1=e.pageY,x2=e.data.startX,y2=e.data.startY; +var d=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); +if(d>3){ +$(this).draggable("proxy").show(); +} +this.pageY=e.pageY; +},onStopDrag:function(){ +for(var i=0;i<_f1.disabledNodes.length;i++){ +$(_f1.disabledNodes[i]).droppable("enable"); +} +_f1.disabledNodes=[]; +var _f7=_182(_f0,_f1.draggingNodeId); +if(_f7&&_f7.id=="easyui_tree_node_id_temp"){ +_f7.id=""; +_12c(_f0,_f7); +} +_f2.onStopDrag.call(_f0,_f7); +}}).droppable({accept:"div.tree-node",onDragEnter:function(e,_f8){ +if(_f2.onDragEnter.call(_f0,this,_f9(_f8))==false){ +_fa(_f8,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +$(this).droppable("disable"); +_f1.disabledNodes.push(this); +} +},onDragOver:function(e,_fb){ +if($(this).droppable("options").disabled){ +return; +} +var _fc=_fb.pageY; +var top=$(this).offset().top; +var _fd=top+$(this).outerHeight(); +_fa(_fb,true); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +if(_fc>top+(_fd-top)/2){ +if(_fd-_fc<5){ +$(this).addClass("tree-node-bottom"); +}else{ +$(this).addClass("tree-node-append"); +} +}else{ +if(_fc-top<5){ +$(this).addClass("tree-node-top"); +}else{ +$(this).addClass("tree-node-append"); +} +} +if(_f2.onDragOver.call(_f0,this,_f9(_fb))==false){ +_fa(_fb,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +$(this).droppable("disable"); +_f1.disabledNodes.push(this); +} +},onDragLeave:function(e,_fe){ +_fa(_fe,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +_f2.onDragLeave.call(_f0,this,_f9(_fe)); +},onDrop:function(e,_ff){ +var dest=this; +var _100,_101; +if($(this).hasClass("tree-node-append")){ +_100=_102; +_101="append"; +}else{ +_100=_103; +_101=$(this).hasClass("tree-node-top")?"top":"bottom"; +} +if(_f2.onBeforeDrop.call(_f0,dest,_f9(_ff),_101)==false){ +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +return; +} +_100(_ff,dest,_101); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +}}); +function _f9(_104,pop){ +return $(_104).closest("ul.tree").tree(pop?"pop":"getData",_104); +}; +function _fa(_105,_106){ +var icon=$(_105).draggable("proxy").find("span.tree-dnd-icon"); +icon.removeClass("tree-dnd-yes tree-dnd-no").addClass(_106?"tree-dnd-yes":"tree-dnd-no"); +}; +function _102(_107,dest){ +if(_ea(_f0,dest).state=="closed"){ +_13d(_f0,dest,function(){ +_108(); +}); +}else{ +_108(); +} +function _108(){ +var node=_f9(_107,true); +$(_f0).tree("append",{parent:dest,data:[node]}); +_f2.onDrop.call(_f0,dest,node,"append"); +}; +}; +function _103(_109,dest,_10a){ +var _10b={}; +if(_10a=="top"){ +_10b.before=dest; +}else{ +_10b.after=dest; +} +var node=_f9(_109,true); +_10b.data=node; +$(_f0).tree("insert",_10b); +_f2.onDrop.call(_f0,dest,node,_10a); +}; +}; +function _10c(_10d,_10e,_10f,_110){ +var _111=$.data(_10d,"tree"); +var opts=_111.options; +if(!opts.checkbox){ +return; +} +var _112=_ea(_10d,_10e); +if(!_112.checkState){ +return; +} +var ck=$(_10e).find(".tree-checkbox"); +if(_10f==undefined){ +if(ck.hasClass("tree-checkbox1")){ +_10f=false; +}else{ +if(ck.hasClass("tree-checkbox0")){ +_10f=true; +}else{ +if(_112._checked==undefined){ +_112._checked=$(_10e).find(".tree-checkbox").hasClass("tree-checkbox1"); +} +_10f=!_112._checked; +} +} +} +_112._checked=_10f; +if(_10f){ +if(ck.hasClass("tree-checkbox1")){ +return; +} +}else{ +if(ck.hasClass("tree-checkbox0")){ +return; +} +} +if(!_110){ +if(opts.onBeforeCheck.call(_10d,_112,_10f)==false){ +return; +} +} +if(opts.cascadeCheck){ +_113(_10d,_112,_10f); +_114(_10d,_112); +}else{ +_115(_10d,_112,_10f?"1":"0"); +} +if(!_110){ +opts.onCheck.call(_10d,_112,_10f); +} +}; +function _113(_116,_117,_118){ +var opts=$.data(_116,"tree").options; +var flag=_118?1:0; +_115(_116,_117,flag); +if(opts.deepCheck){ +$.easyui.forEach(_117.children||[],true,function(n){ +_115(_116,n,flag); +}); +}else{ +var _119=[]; +if(_117.children&&_117.children.length){ +_119.push(_117); +} +$.easyui.forEach(_117.children||[],true,function(n){ +if(!n.hidden){ +_115(_116,n,flag); +if(n.children&&n.children.length){ +_119.push(n); +} +} +}); +for(var i=_119.length-1;i>=0;i--){ +var node=_119[i]; +_115(_116,node,_11a(node)); +} +} +}; +function _115(_11b,_11c,flag){ +var opts=$.data(_11b,"tree").options; +if(!_11c.checkState||flag==undefined){ +return; +} +if(_11c.hidden&&!opts.deepCheck){ +return; +} +var ck=$("#"+_11c.domId).find(".tree-checkbox"); +_11c.checkState=["unchecked","checked","indeterminate"][flag]; +_11c.checked=(_11c.checkState=="checked"); +ck.removeClass("tree-checkbox0 tree-checkbox1 tree-checkbox2"); +ck.addClass("tree-checkbox"+flag); +}; +function _114(_11d,_11e){ +var pd=_11f(_11d,$("#"+_11e.domId)[0]); +if(pd){ +_115(_11d,pd,_11a(pd)); +_114(_11d,pd); +} +}; +function _11a(row){ +var c0=0; +var c1=0; +var len=0; +$.easyui.forEach(row.children||[],false,function(r){ +if(r.checkState){ +len++; +if(r.checkState=="checked"){ +c1++; +}else{ +if(r.checkState=="unchecked"){ +c0++; +} +} +} +}); +if(len==0){ +return undefined; +} +var flag=0; +if(c0==len){ +flag=0; +}else{ +if(c1==len){ +flag=1; +}else{ +flag=2; +} +} +return flag; +}; +function _120(_121,_122){ +var opts=$.data(_121,"tree").options; +if(!opts.checkbox){ +return; +} +var node=$(_122); +var ck=node.find(".tree-checkbox"); +var _123=_ea(_121,_122); +if(opts.view.hasCheckbox(_121,_123)){ +if(!ck.length){ +_123.checkState=_123.checkState||"unchecked"; +$("").insertBefore(node.find(".tree-title")); +} +if(_123.checkState=="checked"){ +_10c(_121,_122,true,true); +}else{ +if(_123.checkState=="unchecked"){ +_10c(_121,_122,false,true); +}else{ +var flag=_11a(_123); +if(flag===0){ +_10c(_121,_122,false,true); +}else{ +if(flag===1){ +_10c(_121,_122,true,true); +} +} +} +} +}else{ +ck.remove(); +_123.checkState=undefined; +_123.checked=undefined; +_114(_121,_123); +} +}; +function _124(_125,ul,data,_126,_127){ +var _128=$.data(_125,"tree"); +var opts=_128.options; +var _129=$(ul).prevAll("div.tree-node:first"); +data=opts.loadFilter.call(_125,data,_129[0]); +var _12a=_12b(_125,"domId",_129.attr("id")); +if(!_126){ +_12a?_12a.children=data:_128.data=data; +$(ul).empty(); +}else{ +if(_12a){ +_12a.children?_12a.children=_12a.children.concat(data):_12a.children=data; +}else{ +_128.data=_128.data.concat(data); +} +} +opts.view.render.call(opts.view,_125,ul,data); +if(opts.dnd){ +_ef(_125); +} +if(_12a){ +_12c(_125,_12a); +} +for(var i=0;i<_128.tmpIds.length;i++){ +_10c(_125,$("#"+_128.tmpIds[i])[0],true,true); +} +_128.tmpIds=[]; +setTimeout(function(){ +_12d(_125,_125); +},0); +if(!_127){ +opts.onLoadSuccess.call(_125,_12a,data); +} +}; +function _12d(_12e,ul,_12f){ +var opts=$.data(_12e,"tree").options; +if(opts.lines){ +$(_12e).addClass("tree-lines"); +}else{ +$(_12e).removeClass("tree-lines"); +return; +} +if(!_12f){ +_12f=true; +$(_12e).find("span.tree-indent").removeClass("tree-line tree-join tree-joinbottom"); +$(_12e).find("div.tree-node").removeClass("tree-node-last tree-root-first tree-root-one"); +var _130=$(_12e).tree("getRoots"); +if(_130.length>1){ +$(_130[0].target).addClass("tree-root-first"); +}else{ +if(_130.length==1){ +$(_130[0].target).addClass("tree-root-one"); +} +} +} +$(ul).children("li").each(function(){ +var node=$(this).children("div.tree-node"); +var ul=node.next("ul"); +if(ul.length){ +if($(this).next().length){ +_131(node); +} +_12d(_12e,ul,_12f); +}else{ +_132(node); +} +}); +var _133=$(ul).children("li:last").children("div.tree-node").addClass("tree-node-last"); +_133.children("span.tree-join").removeClass("tree-join").addClass("tree-joinbottom"); +function _132(node,_134){ +var icon=node.find("span.tree-icon"); +icon.prev("span.tree-indent").addClass("tree-join"); +}; +function _131(node){ +var _135=node.find("span.tree-indent, span.tree-hit").length; +node.next().find("div.tree-node").each(function(){ +$(this).children("span:eq("+(_135-1)+")").addClass("tree-line"); +}); +}; +}; +function _136(_137,ul,_138,_139){ +var opts=$.data(_137,"tree").options; +_138=$.extend({},opts.queryParams,_138||{}); +var _13a=null; +if(_137!=ul){ +var node=$(ul).prev(); +_13a=_ea(_137,node[0]); +} +if(opts.onBeforeLoad.call(_137,_13a,_138)==false){ +return; +} +var _13b=$(ul).prev().children("span.tree-folder"); +_13b.addClass("tree-loading"); +var _13c=opts.loader.call(_137,_138,function(data){ +_13b.removeClass("tree-loading"); +_124(_137,ul,data); +if(_139){ +_139(); +} +},function(){ +_13b.removeClass("tree-loading"); +opts.onLoadError.apply(_137,arguments); +if(_139){ +_139(); +} +}); +if(_13c==false){ +_13b.removeClass("tree-loading"); +} +}; +function _13d(_13e,_13f,_140){ +var opts=$.data(_13e,"tree").options; +var hit=$(_13f).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-expanded")){ +return; +} +var node=_ea(_13e,_13f); +if(opts.onBeforeExpand.call(_13e,node)==false){ +return; +} +hit.removeClass("tree-collapsed tree-collapsed-hover").addClass("tree-expanded"); +hit.next().addClass("tree-folder-open"); +var ul=$(_13f).next(); +if(ul.length){ +if(opts.animate){ +ul.slideDown("normal",function(){ +node.state="open"; +opts.onExpand.call(_13e,node); +if(_140){ +_140(); +} +}); +}else{ +ul.css("display","block"); +node.state="open"; +opts.onExpand.call(_13e,node); +if(_140){ +_140(); +} +} +}else{ +var _141=$("
    ").insertAfter(_13f); +_136(_13e,_141[0],{id:node.id},function(){ +if(_141.is(":empty")){ +_141.remove(); +} +if(opts.animate){ +_141.slideDown("normal",function(){ +node.state="open"; +opts.onExpand.call(_13e,node); +if(_140){ +_140(); +} +}); +}else{ +_141.css("display","block"); +node.state="open"; +opts.onExpand.call(_13e,node); +if(_140){ +_140(); +} +} +}); +} +}; +function _142(_143,_144){ +var opts=$.data(_143,"tree").options; +var hit=$(_144).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-collapsed")){ +return; +} +var node=_ea(_143,_144); +if(opts.onBeforeCollapse.call(_143,node)==false){ +return; +} +hit.removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +hit.next().removeClass("tree-folder-open"); +var ul=$(_144).next(); +if(opts.animate){ +ul.slideUp("normal",function(){ +node.state="closed"; +opts.onCollapse.call(_143,node); +}); +}else{ +ul.css("display","none"); +node.state="closed"; +opts.onCollapse.call(_143,node); +} +}; +function _145(_146,_147){ +var hit=$(_147).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-expanded")){ +_142(_146,_147); +}else{ +_13d(_146,_147); +} +}; +function _148(_149,_14a){ +var _14b=_14c(_149,_14a); +if(_14a){ +_14b.unshift(_ea(_149,_14a)); +} +for(var i=0;i<_14b.length;i++){ +_13d(_149,_14b[i].target); +} +}; +function _14d(_14e,_14f){ +var _150=[]; +var p=_11f(_14e,_14f); +while(p){ +_150.unshift(p); +p=_11f(_14e,p.target); +} +for(var i=0;i<_150.length;i++){ +_13d(_14e,_150[i].target); +} +}; +function _151(_152,_153){ +var c=$(_152).parent(); +while(c[0].tagName!="BODY"&&c.css("overflow-y")!="auto"){ +c=c.parent(); +} +var n=$(_153); +var ntop=n.offset().top; +if(c[0].tagName!="BODY"){ +var ctop=c.offset().top; +if(ntopctop+c.outerHeight()-18){ +c.scrollTop(c.scrollTop()+ntop+n.outerHeight()-ctop-c.outerHeight()+18); +} +} +}else{ +c.scrollTop(ntop); +} +}; +function _154(_155,_156){ +var _157=_14c(_155,_156); +if(_156){ +_157.unshift(_ea(_155,_156)); +} +for(var i=0;i<_157.length;i++){ +_142(_155,_157[i].target); +} +}; +function _158(_159,_15a){ +var node=$(_15a.parent); +var data=_15a.data; +if(!data){ +return; +} +data=$.isArray(data)?data:[data]; +if(!data.length){ +return; +} +var ul; +if(node.length==0){ +ul=$(_159); +}else{ +if(_15b(_159,node[0])){ +var _15c=node.find("span.tree-icon"); +_15c.removeClass("tree-file").addClass("tree-folder tree-folder-open"); +var hit=$("").insertBefore(_15c); +if(hit.prev().length){ +hit.prev().remove(); +} +} +ul=node.next(); +if(!ul.length){ +ul=$("
      ").insertAfter(node); +} +} +_124(_159,ul[0],data,true,true); +}; +function _15d(_15e,_15f){ +var ref=_15f.before||_15f.after; +var _160=_11f(_15e,ref); +var data=_15f.data; +if(!data){ +return; +} +data=$.isArray(data)?data:[data]; +if(!data.length){ +return; +} +_158(_15e,{parent:(_160?_160.target:null),data:data}); +var _161=_160?_160.children:$(_15e).tree("getRoots"); +for(var i=0;i<_161.length;i++){ +if(_161[i].domId==$(ref).attr("id")){ +for(var j=data.length-1;j>=0;j--){ +_161.splice((_15f.before?i:(i+1)),0,data[j]); +} +_161.splice(_161.length-data.length,data.length); +break; +} +} +var li=$(); +for(var i=0;i").prependTo(node); +node.next().remove(); +} +_12c(_163,_165); +} +_12d(_163,_163); +function del(_166){ +var id=$(_166).attr("id"); +var _167=_11f(_163,_166); +var cc=_167?_167.children:$.data(_163,"tree").data; +for(var i=0;i").appendTo(nt); +_191.val(node.text).focus(); +_191.width(_190+20); +_191._outerHeight(18); +_191.bind("click",function(e){ +return false; +}).bind("mousedown",function(e){ +e.stopPropagation(); +}).bind("mousemove",function(e){ +e.stopPropagation(); +}).bind("keydown",function(e){ +if(e.keyCode==13){ +_192(_18e,_18f); +return false; +}else{ +if(e.keyCode==27){ +_196(_18e,_18f); +return false; +} +} +}).bind("blur",function(e){ +e.stopPropagation(); +_192(_18e,_18f); +}); +}; +function _192(_193,_194){ +var opts=$.data(_193,"tree").options; +$(_194).css("position",""); +var _195=$(_194).find("input.tree-editor"); +var val=_195.val(); +_195.remove(); +var node=_ea(_193,_194); +node.text=val; +_12c(_193,node); +opts.onAfterEdit.call(_193,node); +}; +function _196(_197,_198){ +var opts=$.data(_197,"tree").options; +$(_198).css("position",""); +$(_198).find("input.tree-editor").remove(); +var node=_ea(_197,_198); +_12c(_197,node); +opts.onCancelEdit.call(_197,node); +}; +function _199(_19a,q){ +var _19b=$.data(_19a,"tree"); +var opts=_19b.options; +var ids={}; +$.easyui.forEach(_19b.data,true,function(node){ +if(opts.filter.call(_19a,q,node)){ +$("#"+node.domId).removeClass("tree-node-hidden"); +ids[node.domId]=1; +node.hidden=false; +}else{ +$("#"+node.domId).addClass("tree-node-hidden"); +node.hidden=true; +} +}); +for(var id in ids){ +_19c(id); +} +function _19c(_19d){ +var p=$(_19a).tree("getParent",$("#"+_19d)[0]); +while(p){ +$(p.target).removeClass("tree-node-hidden"); +p.hidden=false; +p=$(_19a).tree("getParent",p.target); +} +}; +}; +$.fn.tree=function(_19e,_19f){ +if(typeof _19e=="string"){ +return $.fn.tree.methods[_19e](this,_19f); +} +var _19e=_19e||{}; +return this.each(function(){ +var _1a0=$.data(this,"tree"); +var opts; +if(_1a0){ +opts=$.extend(_1a0.options,_19e); +_1a0.options=opts; +}else{ +opts=$.extend({},$.fn.tree.defaults,$.fn.tree.parseOptions(this),_19e); +$.data(this,"tree",{options:opts,tree:_df(this),data:[],tmpIds:[]}); +var data=$.fn.tree.parseData(this); +if(data.length){ +_124(this,this,data); +} +} +_e2(this); +if(opts.data){ +_124(this,this,$.extend(true,[],opts.data)); +} +_136(this,this); +}); +}; +$.fn.tree.methods={options:function(jq){ +return $.data(jq[0],"tree").options; +},loadData:function(jq,data){ +return jq.each(function(){ +_124(this,this,data); +}); +},getNode:function(jq,_1a1){ +return _ea(jq[0],_1a1); +},getData:function(jq,_1a2){ +return _17d(jq[0],_1a2); +},reload:function(jq,_1a3){ +return jq.each(function(){ +if(_1a3){ +var node=$(_1a3); +var hit=node.children("span.tree-hit"); +hit.removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +node.next().remove(); +_13d(this,_1a3); +}else{ +$(this).empty(); +_136(this,this); +} +}); +},getRoot:function(jq,_1a4){ +return _16a(jq[0],_1a4); +},getRoots:function(jq){ +return _16e(jq[0]); +},getParent:function(jq,_1a5){ +return _11f(jq[0],_1a5); +},getChildren:function(jq,_1a6){ +return _14c(jq[0],_1a6); +},getChecked:function(jq,_1a7){ +return _177(jq[0],_1a7); +},getSelected:function(jq){ +return _17b(jq[0]); +},isLeaf:function(jq,_1a8){ +return _15b(jq[0],_1a8); +},find:function(jq,id){ +return _182(jq[0],id); +},select:function(jq,_1a9){ +return jq.each(function(){ +_188(this,_1a9); +}); +},check:function(jq,_1aa){ +return jq.each(function(){ +_10c(this,_1aa,true); +}); +},uncheck:function(jq,_1ab){ +return jq.each(function(){ +_10c(this,_1ab,false); +}); +},collapse:function(jq,_1ac){ +return jq.each(function(){ +_142(this,_1ac); +}); +},expand:function(jq,_1ad){ +return jq.each(function(){ +_13d(this,_1ad); +}); +},collapseAll:function(jq,_1ae){ +return jq.each(function(){ +_154(this,_1ae); +}); +},expandAll:function(jq,_1af){ +return jq.each(function(){ +_148(this,_1af); +}); +},expandTo:function(jq,_1b0){ +return jq.each(function(){ +_14d(this,_1b0); +}); +},scrollTo:function(jq,_1b1){ +return jq.each(function(){ +_151(this,_1b1); +}); +},toggle:function(jq,_1b2){ +return jq.each(function(){ +_145(this,_1b2); +}); +},append:function(jq,_1b3){ +return jq.each(function(){ +_158(this,_1b3); +}); +},insert:function(jq,_1b4){ +return jq.each(function(){ +_15d(this,_1b4); +}); +},remove:function(jq,_1b5){ +return jq.each(function(){ +_162(this,_1b5); +}); +},pop:function(jq,_1b6){ +var node=jq.tree("getData",_1b6); +jq.tree("remove",_1b6); +return node; +},update:function(jq,_1b7){ +return jq.each(function(){ +_12c(this,$.extend({},_1b7,{checkState:_1b7.checked?"checked":(_1b7.checked===false?"unchecked":undefined)})); +}); +},enableDnd:function(jq){ +return jq.each(function(){ +_ef(this); +}); +},disableDnd:function(jq){ +return jq.each(function(){ +_eb(this); +}); +},beginEdit:function(jq,_1b8){ +return jq.each(function(){ +_18d(this,_1b8); +}); +},endEdit:function(jq,_1b9){ +return jq.each(function(){ +_192(this,_1b9); +}); +},cancelEdit:function(jq,_1ba){ +return jq.each(function(){ +_196(this,_1ba); +}); +},doFilter:function(jq,q){ +return jq.each(function(){ +_199(this,q); +}); +}}; +$.fn.tree.parseOptions=function(_1bb){ +var t=$(_1bb); +return $.extend({},$.parser.parseOptions(_1bb,["url","method",{checkbox:"boolean",cascadeCheck:"boolean",onlyLeafCheck:"boolean"},{animate:"boolean",lines:"boolean",dnd:"boolean"}])); +}; +$.fn.tree.parseData=function(_1bc){ +var data=[]; +_1bd(data,$(_1bc)); +return data; +function _1bd(aa,tree){ +tree.children("li").each(function(){ +var node=$(this); +var item=$.extend({},$.parser.parseOptions(this,["id","iconCls","state"]),{checked:(node.attr("checked")?true:undefined)}); +item.text=node.children("span").html(); +if(!item.text){ +item.text=node.html(); +} +var _1be=node.children("ul"); +if(_1be.length){ +item.children=[]; +_1bd(item.children,_1be); +} +aa.push(item); +}); +}; +}; +var _1bf=1; +var _1c0={render:function(_1c1,ul,data){ +var _1c2=$.data(_1c1,"tree"); +var opts=_1c2.options; +var _1c3=$(ul).prev(".tree-node"); +var _1c4=_1c3.length?$(_1c1).tree("getNode",_1c3[0]):null; +var _1c5=_1c3.find("span.tree-indent, span.tree-hit").length; +var cc=_1c6.call(this,_1c5,data); +$(ul).append(cc.join("")); +function _1c6(_1c7,_1c8){ +var cc=[]; +for(var i=0;i<_1c8.length;i++){ +var item=_1c8[i]; +if(item.state!="open"&&item.state!="closed"){ +item.state="open"; +} +item.domId="_easyui_tree_"+_1bf++; +cc.push("
    • "); +cc.push("
      "); +for(var j=0;j<_1c7;j++){ +cc.push(""); +} +if(item.state=="closed"){ +cc.push(""); +cc.push(""); +}else{ +if(item.children&&item.children.length){ +cc.push(""); +cc.push(""); +}else{ +cc.push(""); +cc.push(""); +} +} +if(this.hasCheckbox(_1c1,item)){ +var flag=0; +if(_1c4&&_1c4.checkState=="checked"&&opts.cascadeCheck){ +flag=1; +item.checked=true; +}else{ +if(item.checked){ +$.easyui.addArrayItem(_1c2.tmpIds,item.domId); +} +} +item.checkState=flag?"checked":"unchecked"; +cc.push(""); +}else{ +item.checkState=undefined; +item.checked=undefined; +} +cc.push(""+opts.formatter.call(_1c1,item)+""); +cc.push("
      "); +if(item.children&&item.children.length){ +var tmp=_1c6.call(this,_1c7+1,item.children); +cc.push("
        "); +cc=cc.concat(tmp); +cc.push("
      "); +} +cc.push("
    • "); +} +return cc; +}; +},hasCheckbox:function(_1c9,item){ +var _1ca=$.data(_1c9,"tree"); +var opts=_1ca.options; +if(opts.checkbox){ +if($.isFunction(opts.checkbox)){ +if(opts.checkbox.call(_1c9,item)){ +return true; +}else{ +return false; +} +}else{ +if(opts.onlyLeafCheck){ +if(item.state=="open"&&!(item.children&&item.children.length)){ +return true; +} +}else{ +return true; +} +} +} +return false; +}}; +$.fn.tree.defaults={url:null,method:"post",animate:false,checkbox:false,cascadeCheck:true,onlyLeafCheck:false,lines:false,dnd:false,data:null,queryParams:{},formatter:function(node){ +return node.text; +},filter:function(q,node){ +var qq=[]; +$.map($.isArray(q)?q:[q],function(q){ +q=$.trim(q); +if(q){ +qq.push(q); +} +}); +for(var i=0;i=0){ +return true; +} +} +return !qq.length; +},loader:function(_1cc,_1cd,_1ce){ +var opts=$(this).tree("options"); +if(!opts.url){ +return false; +} +$.ajax({type:opts.method,url:opts.url,data:_1cc,dataType:"json",success:function(data){ +_1cd(data); +},error:function(){ +_1ce.apply(this,arguments); +}}); +},loadFilter:function(data,_1cf){ +return data; +},view:_1c0,onBeforeLoad:function(node,_1d0){ +},onLoadSuccess:function(node,data){ +},onLoadError:function(){ +},onClick:function(node){ +},onDblClick:function(node){ +},onBeforeExpand:function(node){ +},onExpand:function(node){ +},onBeforeCollapse:function(node){ +},onCollapse:function(node){ +},onBeforeCheck:function(node,_1d1){ +},onCheck:function(node,_1d2){ +},onBeforeSelect:function(node){ +},onSelect:function(node){ +},onContextMenu:function(e,node){ +},onBeforeDrag:function(node){ +},onStartDrag:function(node){ +},onStopDrag:function(node){ +},onDragEnter:function(_1d3,_1d4){ +},onDragOver:function(_1d5,_1d6){ +},onDragLeave:function(_1d7,_1d8){ +},onBeforeDrop:function(_1d9,_1da,_1db){ +},onDrop:function(_1dc,_1dd,_1de){ +},onBeforeEdit:function(node){ +},onAfterEdit:function(node){ +},onCancelEdit:function(node){ +}}; +})(jQuery); +(function($){ +function init(_1df){ +$(_1df).addClass("progressbar"); +$(_1df).html("
      "); +$(_1df).bind("_resize",function(e,_1e0){ +if($(this).hasClass("easyui-fluid")||_1e0){ +_1e1(_1df); +} +return false; +}); +return $(_1df); +}; +function _1e1(_1e2,_1e3){ +var opts=$.data(_1e2,"progressbar").options; +var bar=$.data(_1e2,"progressbar").bar; +if(_1e3){ +opts.width=_1e3; +} +bar._size(opts); +bar.find("div.progressbar-text").css("width",bar.width()); +bar.find("div.progressbar-text,div.progressbar-value").css({height:bar.height()+"px",lineHeight:bar.height()+"px"}); +}; +$.fn.progressbar=function(_1e4,_1e5){ +if(typeof _1e4=="string"){ +var _1e6=$.fn.progressbar.methods[_1e4]; +if(_1e6){ +return _1e6(this,_1e5); +} +} +_1e4=_1e4||{}; +return this.each(function(){ +var _1e7=$.data(this,"progressbar"); +if(_1e7){ +$.extend(_1e7.options,_1e4); +}else{ +_1e7=$.data(this,"progressbar",{options:$.extend({},$.fn.progressbar.defaults,$.fn.progressbar.parseOptions(this),_1e4),bar:init(this)}); +} +$(this).progressbar("setValue",_1e7.options.value); +_1e1(this); +}); +}; +$.fn.progressbar.methods={options:function(jq){ +return $.data(jq[0],"progressbar").options; +},resize:function(jq,_1e8){ +return jq.each(function(){ +_1e1(this,_1e8); +}); +},getValue:function(jq){ +return $.data(jq[0],"progressbar").options.value; +},setValue:function(jq,_1e9){ +if(_1e9<0){ +_1e9=0; +} +if(_1e9>100){ +_1e9=100; +} +return jq.each(function(){ +var opts=$.data(this,"progressbar").options; +var text=opts.text.replace(/{value}/,_1e9); +var _1ea=opts.value; +opts.value=_1e9; +$(this).find("div.progressbar-value").width(_1e9+"%"); +$(this).find("div.progressbar-text").html(text); +if(_1ea!=_1e9){ +opts.onChange.call(this,_1e9,_1ea); +} +}); +}}; +$.fn.progressbar.parseOptions=function(_1eb){ +return $.extend({},$.parser.parseOptions(_1eb,["width","height","text",{value:"number"}])); +}; +$.fn.progressbar.defaults={width:"auto",height:22,value:0,text:"{value}%",onChange:function(_1ec,_1ed){ +}}; +})(jQuery); +(function($){ +function init(_1ee){ +$(_1ee).addClass("tooltip-f"); +}; +function _1ef(_1f0){ +var opts=$.data(_1f0,"tooltip").options; +$(_1f0).unbind(".tooltip").bind(opts.showEvent+".tooltip",function(e){ +$(_1f0).tooltip("show",e); +}).bind(opts.hideEvent+".tooltip",function(e){ +$(_1f0).tooltip("hide",e); +}).bind("mousemove.tooltip",function(e){ +if(opts.trackMouse){ +opts.trackMouseX=e.pageX; +opts.trackMouseY=e.pageY; +$(_1f0).tooltip("reposition"); +} +}); +}; +function _1f1(_1f2){ +var _1f3=$.data(_1f2,"tooltip"); +if(_1f3.showTimer){ +clearTimeout(_1f3.showTimer); +_1f3.showTimer=null; +} +if(_1f3.hideTimer){ +clearTimeout(_1f3.hideTimer); +_1f3.hideTimer=null; +} +}; +function _1f4(_1f5){ +var _1f6=$.data(_1f5,"tooltip"); +if(!_1f6||!_1f6.tip){ +return; +} +var opts=_1f6.options; +var tip=_1f6.tip; +var pos={left:-100000,top:-100000}; +if($(_1f5).is(":visible")){ +pos=_1f7(opts.position); +if(opts.position=="top"&&pos.top<0){ +pos=_1f7("bottom"); +}else{ +if((opts.position=="bottom")&&(pos.top+tip._outerHeight()>$(window)._outerHeight()+$(document).scrollTop())){ +pos=_1f7("top"); +} +} +if(pos.left<0){ +if(opts.position=="left"){ +pos=_1f7("right"); +}else{ +$(_1f5).tooltip("arrow").css("left",tip._outerWidth()/2+pos.left); +pos.left=0; +} +}else{ +if(pos.left+tip._outerWidth()>$(window)._outerWidth()+$(document)._scrollLeft()){ +if(opts.position=="right"){ +pos=_1f7("left"); +}else{ +var left=pos.left; +pos.left=$(window)._outerWidth()+$(document)._scrollLeft()-tip._outerWidth(); +$(_1f5).tooltip("arrow").css("left",tip._outerWidth()/2-(pos.left-left)); +} +} +} +} +tip.css({left:pos.left,top:pos.top,zIndex:(opts.zIndex!=undefined?opts.zIndex:($.fn.window?$.fn.window.defaults.zIndex++:""))}); +opts.onPosition.call(_1f5,pos.left,pos.top); +function _1f7(_1f8){ +opts.position=_1f8||"bottom"; +tip.removeClass("tooltip-top tooltip-bottom tooltip-left tooltip-right").addClass("tooltip-"+opts.position); +var left,top; +var _1f9=$.isFunction(opts.deltaX)?opts.deltaX.call(_1f5,opts.position):opts.deltaX; +var _1fa=$.isFunction(opts.deltaY)?opts.deltaY.call(_1f5,opts.position):opts.deltaY; +if(opts.trackMouse){ +t=$(); +left=opts.trackMouseX+_1f9; +top=opts.trackMouseY+_1fa; +}else{ +var t=$(_1f5); +left=t.offset().left+_1f9; +top=t.offset().top+_1fa; +} +switch(opts.position){ +case "right": +left+=t._outerWidth()+12+(opts.trackMouse?12:0); +top-=(tip._outerHeight()-t._outerHeight())/2; +break; +case "left": +left-=tip._outerWidth()+12+(opts.trackMouse?12:0); +top-=(tip._outerHeight()-t._outerHeight())/2; +break; +case "top": +left-=(tip._outerWidth()-t._outerWidth())/2; +top-=tip._outerHeight()+12+(opts.trackMouse?12:0); +break; +case "bottom": +left-=(tip._outerWidth()-t._outerWidth())/2; +top+=t._outerHeight()+12+(opts.trackMouse?12:0); +break; +} +return {left:left,top:top}; +}; +}; +function _1fb(_1fc,e){ +var _1fd=$.data(_1fc,"tooltip"); +var opts=_1fd.options; +var tip=_1fd.tip; +if(!tip){ +tip=$("
      "+"
      "+"
      "+"
      "+"
      ").appendTo("body"); +_1fd.tip=tip; +_1fe(_1fc); +} +_1f1(_1fc); +_1fd.showTimer=setTimeout(function(){ +$(_1fc).tooltip("reposition"); +tip.show(); +opts.onShow.call(_1fc,e); +var _1ff=tip.children(".tooltip-arrow-outer"); +var _200=tip.children(".tooltip-arrow"); +var bc="border-"+opts.position+"-color"; +_1ff.add(_200).css({borderTopColor:"",borderBottomColor:"",borderLeftColor:"",borderRightColor:""}); +_1ff.css(bc,tip.css(bc)); +_200.css(bc,tip.css("backgroundColor")); +},opts.showDelay); +}; +function _201(_202,e){ +var _203=$.data(_202,"tooltip"); +if(_203&&_203.tip){ +_1f1(_202); +_203.hideTimer=setTimeout(function(){ +_203.tip.hide(); +_203.options.onHide.call(_202,e); +},_203.options.hideDelay); +} +}; +function _1fe(_204,_205){ +var _206=$.data(_204,"tooltip"); +var opts=_206.options; +if(_205){ +opts.content=_205; +} +if(!_206.tip){ +return; +} +var cc=typeof opts.content=="function"?opts.content.call(_204):opts.content; +_206.tip.children(".tooltip-content").html(cc); +opts.onUpdate.call(_204,cc); +}; +function _207(_208){ +var _209=$.data(_208,"tooltip"); +if(_209){ +_1f1(_208); +var opts=_209.options; +if(_209.tip){ +_209.tip.remove(); +} +if(opts._title){ +$(_208).attr("title",opts._title); +} +$.removeData(_208,"tooltip"); +$(_208).unbind(".tooltip").removeClass("tooltip-f"); +opts.onDestroy.call(_208); +} +}; +$.fn.tooltip=function(_20a,_20b){ +if(typeof _20a=="string"){ +return $.fn.tooltip.methods[_20a](this,_20b); +} +_20a=_20a||{}; +return this.each(function(){ +var _20c=$.data(this,"tooltip"); +if(_20c){ +$.extend(_20c.options,_20a); +}else{ +$.data(this,"tooltip",{options:$.extend({},$.fn.tooltip.defaults,$.fn.tooltip.parseOptions(this),_20a)}); +init(this); +} +_1ef(this); +_1fe(this); +}); +}; +$.fn.tooltip.methods={options:function(jq){ +return $.data(jq[0],"tooltip").options; +},tip:function(jq){ +return $.data(jq[0],"tooltip").tip; +},arrow:function(jq){ +return jq.tooltip("tip").children(".tooltip-arrow-outer,.tooltip-arrow"); +},show:function(jq,e){ +return jq.each(function(){ +_1fb(this,e); +}); +},hide:function(jq,e){ +return jq.each(function(){ +_201(this,e); +}); +},update:function(jq,_20d){ +return jq.each(function(){ +_1fe(this,_20d); +}); +},reposition:function(jq){ +return jq.each(function(){ +_1f4(this); +}); +},destroy:function(jq){ +return jq.each(function(){ +_207(this); +}); +}}; +$.fn.tooltip.parseOptions=function(_20e){ +var t=$(_20e); +var opts=$.extend({},$.parser.parseOptions(_20e,["position","showEvent","hideEvent","content",{trackMouse:"boolean",deltaX:"number",deltaY:"number",showDelay:"number",hideDelay:"number"}]),{_title:t.attr("title")}); +t.attr("title",""); +if(!opts.content){ +opts.content=opts._title; +} +return opts; +}; +$.fn.tooltip.defaults={position:"bottom",content:null,trackMouse:false,deltaX:0,deltaY:0,showEvent:"mouseenter",hideEvent:"mouseleave",showDelay:200,hideDelay:100,onShow:function(e){ +},onHide:function(e){ +},onUpdate:function(_20f){ +},onPosition:function(left,top){ +},onDestroy:function(){ +}}; +})(jQuery); +(function($){ +$.fn._remove=function(){ +return this.each(function(){ +$(this).remove(); +try{ +this.outerHTML=""; +} +catch(err){ +} +}); +}; +function _210(node){ +node._remove(); +}; +function _211(_212,_213){ +var _214=$.data(_212,"panel"); +var opts=_214.options; +var _215=_214.panel; +var _216=_215.children(".panel-header"); +var _217=_215.children(".panel-body"); +var _218=_215.children(".panel-footer"); +var _219=(opts.halign=="left"||opts.halign=="right"); +if(_213){ +$.extend(opts,{width:_213.width,height:_213.height,minWidth:_213.minWidth,maxWidth:_213.maxWidth,minHeight:_213.minHeight,maxHeight:_213.maxHeight,left:_213.left,top:_213.top}); +} +_215._size(opts); +if(!_219){ +_216._outerWidth(_215.width()); +} +_217._outerWidth(_215.width()); +if(!isNaN(parseInt(opts.height))){ +if(_219){ +if(opts.header){ +var _21a=$(opts.header)._outerWidth(); +}else{ +_216.css("width",""); +var _21a=_216._outerWidth(); +} +var _21b=_216.find(".panel-title"); +_21a+=Math.min(_21b._outerWidth(),_21b._outerHeight()); +var _21c=_215.height(); +_216._outerWidth(_21a)._outerHeight(_21c); +_21b._outerWidth(_216.height()); +_217._outerWidth(_215.width()-_21a-_218._outerWidth())._outerHeight(_21c); +_218._outerHeight(_21c); +_217.css({left:"",right:""}).css(opts.halign,(_216.position()[opts.halign]+_21a)+"px"); +opts.panelCssWidth=_215.css("width"); +if(opts.collapsed){ +_215._outerWidth(_21a+_218._outerWidth()); +} +}else{ +_217._outerHeight(_215.height()-_216._outerHeight()-_218._outerHeight()); +} +}else{ +_217.css("height",""); +var min=$.parser.parseValue("minHeight",opts.minHeight,_215.parent()); +var max=$.parser.parseValue("maxHeight",opts.maxHeight,_215.parent()); +var _21d=_216._outerHeight()+_218._outerHeight()+_215._outerHeight()-_215.height(); +_217._size("minHeight",min?(min-_21d):""); +_217._size("maxHeight",max?(max-_21d):""); +} +_215.css({height:(_219?undefined:""),minHeight:"",maxHeight:"",left:opts.left,top:opts.top}); +opts.onResize.apply(_212,[opts.width,opts.height]); +$(_212).panel("doLayout"); +}; +function _21e(_21f,_220){ +var _221=$.data(_21f,"panel"); +var opts=_221.options; +var _222=_221.panel; +if(_220){ +if(_220.left!=null){ +opts.left=_220.left; +} +if(_220.top!=null){ +opts.top=_220.top; +} +} +_222.css({left:opts.left,top:opts.top}); +_222.find(".tooltip-f").each(function(){ +$(this).tooltip("reposition"); +}); +opts.onMove.apply(_21f,[opts.left,opts.top]); +}; +function _223(_224){ +$(_224).addClass("panel-body")._size("clear"); +var _225=$("
      ").insertBefore(_224); +_225[0].appendChild(_224); +_225.bind("_resize",function(e,_226){ +if($(this).hasClass("easyui-fluid")||_226){ +_211(_224); +} +return false; +}); +return _225; +}; +function _227(_228){ +var _229=$.data(_228,"panel"); +var opts=_229.options; +var _22a=_229.panel; +_22a.css(opts.style); +_22a.addClass(opts.cls); +_22a.removeClass("panel-hleft panel-hright").addClass("panel-h"+opts.halign); +_22b(); +_22c(); +var _22d=$(_228).panel("header"); +var body=$(_228).panel("body"); +var _22e=$(_228).siblings(".panel-footer"); +if(opts.border){ +_22d.removeClass("panel-header-noborder"); +body.removeClass("panel-body-noborder"); +_22e.removeClass("panel-footer-noborder"); +}else{ +_22d.addClass("panel-header-noborder"); +body.addClass("panel-body-noborder"); +_22e.addClass("panel-footer-noborder"); +} +_22d.addClass(opts.headerCls); +body.addClass(opts.bodyCls); +$(_228).attr("id",opts.id||""); +if(opts.content){ +$(_228).panel("clear"); +$(_228).html(opts.content); +$.parser.parse($(_228)); +} +function _22b(){ +if(opts.noheader||(!opts.title&&!opts.header)){ +_210(_22a.children(".panel-header")); +_22a.children(".panel-body").addClass("panel-body-noheader"); +}else{ +if(opts.header){ +$(opts.header).addClass("panel-header").prependTo(_22a); +}else{ +var _22f=_22a.children(".panel-header"); +if(!_22f.length){ +_22f=$("
      ").prependTo(_22a); +} +if(!$.isArray(opts.tools)){ +_22f.find("div.panel-tool .panel-tool-a").appendTo(opts.tools); +} +_22f.empty(); +var _230=$("
      ").html(opts.title).appendTo(_22f); +if(opts.iconCls){ +_230.addClass("panel-with-icon"); +$("
      ").addClass(opts.iconCls).appendTo(_22f); +} +if(opts.halign=="left"||opts.halign=="right"){ +_230.addClass("panel-title-"+opts.titleDirection); +} +var tool=$("
      ").appendTo(_22f); +tool.bind("click",function(e){ +e.stopPropagation(); +}); +if(opts.tools){ +if($.isArray(opts.tools)){ +$.map(opts.tools,function(t){ +_231(tool,t.iconCls,eval(t.handler)); +}); +}else{ +$(opts.tools).children().each(function(){ +$(this).addClass($(this).attr("iconCls")).addClass("panel-tool-a").appendTo(tool); +}); +} +} +if(opts.collapsible){ +_231(tool,"panel-tool-collapse",function(){ +if(opts.collapsed==true){ +_251(_228,true); +}else{ +_242(_228,true); +} +}); +} +if(opts.minimizable){ +_231(tool,"panel-tool-min",function(){ +_257(_228); +}); +} +if(opts.maximizable){ +_231(tool,"panel-tool-max",function(){ +if(opts.maximized==true){ +_25a(_228); +}else{ +_241(_228); +} +}); +} +if(opts.closable){ +_231(tool,"panel-tool-close",function(){ +_243(_228); +}); +} +} +_22a.children("div.panel-body").removeClass("panel-body-noheader"); +} +}; +function _231(c,icon,_232){ +var a=$("").addClass(icon).appendTo(c); +a.bind("click",_232); +}; +function _22c(){ +if(opts.footer){ +$(opts.footer).addClass("panel-footer").appendTo(_22a); +$(_228).addClass("panel-body-nobottom"); +}else{ +_22a.children(".panel-footer").remove(); +$(_228).removeClass("panel-body-nobottom"); +} +}; +}; +function _233(_234,_235){ +var _236=$.data(_234,"panel"); +var opts=_236.options; +if(_237){ +opts.queryParams=_235; +} +if(!opts.href){ +return; +} +if(!_236.isLoaded||!opts.cache){ +var _237=$.extend({},opts.queryParams); +if(opts.onBeforeLoad.call(_234,_237)==false){ +return; +} +_236.isLoaded=false; +if(opts.loadingMessage){ +$(_234).panel("clear"); +$(_234).html($("
      ").html(opts.loadingMessage)); +} +opts.loader.call(_234,_237,function(data){ +var _238=opts.extractor.call(_234,data); +$(_234).panel("clear"); +$(_234).html(_238); +$.parser.parse($(_234)); +opts.onLoad.apply(_234,arguments); +_236.isLoaded=true; +},function(){ +opts.onLoadError.apply(_234,arguments); +}); +} +}; +function _239(_23a){ +var t=$(_23a); +t.find(".combo-f").each(function(){ +$(this).combo("destroy"); +}); +t.find(".m-btn").each(function(){ +$(this).menubutton("destroy"); +}); +t.find(".s-btn").each(function(){ +$(this).splitbutton("destroy"); +}); +t.find(".tooltip-f").each(function(){ +$(this).tooltip("destroy"); +}); +t.children("div").each(function(){ +$(this)._size("unfit"); +}); +t.empty(); +}; +function _23b(_23c){ +$(_23c).panel("doLayout",true); +}; +function _23d(_23e,_23f){ +var opts=$.data(_23e,"panel").options; +var _240=$.data(_23e,"panel").panel; +if(_23f!=true){ +if(opts.onBeforeOpen.call(_23e)==false){ +return; +} +} +_240.stop(true,true); +if($.isFunction(opts.openAnimation)){ +opts.openAnimation.call(_23e,cb); +}else{ +switch(opts.openAnimation){ +case "slide": +_240.slideDown(opts.openDuration,cb); +break; +case "fade": +_240.fadeIn(opts.openDuration,cb); +break; +case "show": +_240.show(opts.openDuration,cb); +break; +default: +_240.show(); +cb(); +} +} +function cb(){ +opts.closed=false; +opts.minimized=false; +var tool=_240.children(".panel-header").find("a.panel-tool-restore"); +if(tool.length){ +opts.maximized=true; +} +opts.onOpen.call(_23e); +if(opts.maximized==true){ +opts.maximized=false; +_241(_23e); +} +if(opts.collapsed==true){ +opts.collapsed=false; +_242(_23e); +} +if(!opts.collapsed){ +_233(_23e); +_23b(_23e); +} +}; +}; +function _243(_244,_245){ +var _246=$.data(_244,"panel"); +var opts=_246.options; +var _247=_246.panel; +if(_245!=true){ +if(opts.onBeforeClose.call(_244)==false){ +return; +} +} +_247.find(".tooltip-f").each(function(){ +$(this).tooltip("hide"); +}); +_247.stop(true,true); +_247._size("unfit"); +if($.isFunction(opts.closeAnimation)){ +opts.closeAnimation.call(_244,cb); +}else{ +switch(opts.closeAnimation){ +case "slide": +_247.slideUp(opts.closeDuration,cb); +break; +case "fade": +_247.fadeOut(opts.closeDuration,cb); +break; +case "hide": +_247.hide(opts.closeDuration,cb); +break; +default: +_247.hide(); +cb(); +} +} +function cb(){ +opts.closed=true; +opts.onClose.call(_244); +}; +}; +function _248(_249,_24a){ +var _24b=$.data(_249,"panel"); +var opts=_24b.options; +var _24c=_24b.panel; +if(_24a!=true){ +if(opts.onBeforeDestroy.call(_249)==false){ +return; +} +} +$(_249).panel("clear").panel("clear","footer"); +_210(_24c); +opts.onDestroy.call(_249); +}; +function _242(_24d,_24e){ +var opts=$.data(_24d,"panel").options; +var _24f=$.data(_24d,"panel").panel; +var body=_24f.children(".panel-body"); +var _250=_24f.children(".panel-header"); +var tool=_250.find("a.panel-tool-collapse"); +if(opts.collapsed==true){ +return; +} +body.stop(true,true); +if(opts.onBeforeCollapse.call(_24d)==false){ +return; +} +tool.addClass("panel-tool-expand"); +if(_24e==true){ +if(opts.halign=="left"||opts.halign=="right"){ +_24f.animate({width:_250._outerWidth()+_24f.children(".panel-footer")._outerWidth()},function(){ +cb(); +}); +}else{ +body.slideUp("normal",function(){ +cb(); +}); +} +}else{ +if(opts.halign=="left"||opts.halign=="right"){ +_24f._outerWidth(_250._outerWidth()+_24f.children(".panel-footer")._outerWidth()); +} +cb(); +} +function cb(){ +body.hide(); +opts.collapsed=true; +opts.onCollapse.call(_24d); +}; +}; +function _251(_252,_253){ +var opts=$.data(_252,"panel").options; +var _254=$.data(_252,"panel").panel; +var body=_254.children(".panel-body"); +var tool=_254.children(".panel-header").find("a.panel-tool-collapse"); +if(opts.collapsed==false){ +return; +} +body.stop(true,true); +if(opts.onBeforeExpand.call(_252)==false){ +return; +} +tool.removeClass("panel-tool-expand"); +if(_253==true){ +if(opts.halign=="left"||opts.halign=="right"){ +body.show(); +_254.animate({width:opts.panelCssWidth},function(){ +cb(); +}); +}else{ +body.slideDown("normal",function(){ +cb(); +}); +} +}else{ +if(opts.halign=="left"||opts.halign=="right"){ +_254.css("width",opts.panelCssWidth); +} +cb(); +} +function cb(){ +body.show(); +opts.collapsed=false; +opts.onExpand.call(_252); +_233(_252); +_23b(_252); +}; +}; +function _241(_255){ +var opts=$.data(_255,"panel").options; +var _256=$.data(_255,"panel").panel; +var tool=_256.children(".panel-header").find("a.panel-tool-max"); +if(opts.maximized==true){ +return; +} +tool.addClass("panel-tool-restore"); +if(!$.data(_255,"panel").original){ +$.data(_255,"panel").original={width:opts.width,height:opts.height,left:opts.left,top:opts.top,fit:opts.fit}; +} +opts.left=0; +opts.top=0; +opts.fit=true; +_211(_255); +opts.minimized=false; +opts.maximized=true; +opts.onMaximize.call(_255); +}; +function _257(_258){ +var opts=$.data(_258,"panel").options; +var _259=$.data(_258,"panel").panel; +_259._size("unfit"); +_259.hide(); +opts.minimized=true; +opts.maximized=false; +opts.onMinimize.call(_258); +}; +function _25a(_25b){ +var opts=$.data(_25b,"panel").options; +var _25c=$.data(_25b,"panel").panel; +var tool=_25c.children(".panel-header").find("a.panel-tool-max"); +if(opts.maximized==false){ +return; +} +_25c.show(); +tool.removeClass("panel-tool-restore"); +$.extend(opts,$.data(_25b,"panel").original); +_211(_25b); +opts.minimized=false; +opts.maximized=false; +$.data(_25b,"panel").original=null; +opts.onRestore.call(_25b); +}; +function _25d(_25e,_25f){ +$.data(_25e,"panel").options.title=_25f; +$(_25e).panel("header").find("div.panel-title").html(_25f); +}; +var _260=null; +$(window).unbind(".panel").bind("resize.panel",function(){ +if(_260){ +clearTimeout(_260); +} +_260=setTimeout(function(){ +var _261=$("body.layout"); +if(_261.length){ +_261.layout("resize"); +$("body").children(".easyui-fluid:visible").each(function(){ +$(this).triggerHandler("_resize"); +}); +}else{ +$("body").panel("doLayout"); +} +_260=null; +},100); +}); +$.fn.panel=function(_262,_263){ +if(typeof _262=="string"){ +return $.fn.panel.methods[_262](this,_263); +} +_262=_262||{}; +return this.each(function(){ +var _264=$.data(this,"panel"); +var opts; +if(_264){ +opts=$.extend(_264.options,_262); +_264.isLoaded=false; +}else{ +opts=$.extend({},$.fn.panel.defaults,$.fn.panel.parseOptions(this),_262); +$(this).attr("title",""); +_264=$.data(this,"panel",{options:opts,panel:_223(this),isLoaded:false}); +} +_227(this); +$(this).show(); +if(opts.doSize==true){ +_264.panel.css("display","block"); +_211(this); +} +if(opts.closed==true||opts.minimized==true){ +_264.panel.hide(); +}else{ +_23d(this); +} +}); +}; +$.fn.panel.methods={options:function(jq){ +return $.data(jq[0],"panel").options; +},panel:function(jq){ +return $.data(jq[0],"panel").panel; +},header:function(jq){ +return $.data(jq[0],"panel").panel.children(".panel-header"); +},footer:function(jq){ +return jq.panel("panel").children(".panel-footer"); +},body:function(jq){ +return $.data(jq[0],"panel").panel.children(".panel-body"); +},setTitle:function(jq,_265){ +return jq.each(function(){ +_25d(this,_265); +}); +},open:function(jq,_266){ +return jq.each(function(){ +_23d(this,_266); +}); +},close:function(jq,_267){ +return jq.each(function(){ +_243(this,_267); +}); +},destroy:function(jq,_268){ +return jq.each(function(){ +_248(this,_268); +}); +},clear:function(jq,type){ +return jq.each(function(){ +_239(type=="footer"?$(this).panel("footer"):this); +}); +},refresh:function(jq,href){ +return jq.each(function(){ +var _269=$.data(this,"panel"); +_269.isLoaded=false; +if(href){ +if(typeof href=="string"){ +_269.options.href=href; +}else{ +_269.options.queryParams=href; +} +} +_233(this); +}); +},resize:function(jq,_26a){ +return jq.each(function(){ +_211(this,_26a); +}); +},doLayout:function(jq,all){ +return jq.each(function(){ +_26b(this,"body"); +_26b($(this).siblings(".panel-footer")[0],"footer"); +function _26b(_26c,type){ +if(!_26c){ +return; +} +var _26d=_26c==$("body")[0]; +var s=$(_26c).find("div.panel:visible,div.accordion:visible,div.tabs-container:visible,div.layout:visible,.easyui-fluid:visible").filter(function(_26e,el){ +var p=$(el).parents(".panel-"+type+":first"); +return _26d?p.length==0:p[0]==_26c; +}); +s.each(function(){ +$(this).triggerHandler("_resize",[all||false]); +}); +}; +}); +},move:function(jq,_26f){ +return jq.each(function(){ +_21e(this,_26f); +}); +},maximize:function(jq){ +return jq.each(function(){ +_241(this); +}); +},minimize:function(jq){ +return jq.each(function(){ +_257(this); +}); +},restore:function(jq){ +return jq.each(function(){ +_25a(this); +}); +},collapse:function(jq,_270){ +return jq.each(function(){ +_242(this,_270); +}); +},expand:function(jq,_271){ +return jq.each(function(){ +_251(this,_271); +}); +}}; +$.fn.panel.parseOptions=function(_272){ +var t=$(_272); +var hh=t.children(".panel-header,header"); +var ff=t.children(".panel-footer,footer"); +return $.extend({},$.parser.parseOptions(_272,["id","width","height","left","top","title","iconCls","cls","headerCls","bodyCls","tools","href","method","header","footer","halign","titleDirection",{cache:"boolean",fit:"boolean",border:"boolean",noheader:"boolean"},{collapsible:"boolean",minimizable:"boolean",maximizable:"boolean"},{closable:"boolean",collapsed:"boolean",minimized:"boolean",maximized:"boolean",closed:"boolean"},"openAnimation","closeAnimation",{openDuration:"number",closeDuration:"number"},]),{loadingMessage:(t.attr("loadingMessage")!=undefined?t.attr("loadingMessage"):undefined),header:(hh.length?hh.removeClass("panel-header"):undefined),footer:(ff.length?ff.removeClass("panel-footer"):undefined)}); +}; +$.fn.panel.defaults={id:null,title:null,iconCls:null,width:"auto",height:"auto",left:null,top:null,cls:null,headerCls:null,bodyCls:null,style:{},href:null,cache:true,fit:false,border:true,doSize:true,noheader:false,content:null,halign:"top",titleDirection:"down",collapsible:false,minimizable:false,maximizable:false,closable:false,collapsed:false,minimized:false,maximized:false,closed:false,openAnimation:false,openDuration:400,closeAnimation:false,closeDuration:400,tools:null,footer:null,header:null,queryParams:{},method:"get",href:null,loadingMessage:"Loading...",loader:function(_273,_274,_275){ +var opts=$(this).panel("options"); +if(!opts.href){ +return false; +} +$.ajax({type:opts.method,url:opts.href,cache:false,data:_273,dataType:"html",success:function(data){ +_274(data); +},error:function(){ +_275.apply(this,arguments); +}}); +},extractor:function(data){ +var _276=/]*>((.|[\n\r])*)<\/body>/im; +var _277=_276.exec(data); +if(_277){ +return _277[1]; +}else{ +return data; +} +},onBeforeLoad:function(_278){ +},onLoad:function(){ +},onLoadError:function(){ +},onBeforeOpen:function(){ +},onOpen:function(){ +},onBeforeClose:function(){ +},onClose:function(){ +},onBeforeDestroy:function(){ +},onDestroy:function(){ +},onResize:function(_279,_27a){ +},onMove:function(left,top){ +},onMaximize:function(){ +},onRestore:function(){ +},onMinimize:function(){ +},onBeforeCollapse:function(){ +},onBeforeExpand:function(){ +},onCollapse:function(){ +},onExpand:function(){ +}}; +})(jQuery); +(function($){ +function _27b(_27c,_27d){ +var _27e=$.data(_27c,"window"); +if(_27d){ +if(_27d.left!=null){ +_27e.options.left=_27d.left; +} +if(_27d.top!=null){ +_27e.options.top=_27d.top; +} +} +$(_27c).panel("move",_27e.options); +if(_27e.shadow){ +_27e.shadow.css({left:_27e.options.left,top:_27e.options.top}); +} +}; +function _27f(_280,_281){ +var opts=$.data(_280,"window").options; +var pp=$(_280).window("panel"); +var _282=pp._outerWidth(); +if(opts.inline){ +var _283=pp.parent(); +opts.left=Math.ceil((_283.width()-_282)/2+_283.scrollLeft()); +}else{ +opts.left=Math.ceil(($(window)._outerWidth()-_282)/2+$(document).scrollLeft()); +} +if(_281){ +_27b(_280); +} +}; +function _284(_285,_286){ +var opts=$.data(_285,"window").options; +var pp=$(_285).window("panel"); +var _287=pp._outerHeight(); +if(opts.inline){ +var _288=pp.parent(); +opts.top=Math.ceil((_288.height()-_287)/2+_288.scrollTop()); +}else{ +opts.top=Math.ceil(($(window)._outerHeight()-_287)/2+$(document).scrollTop()); +} +if(_286){ +_27b(_285); +} +}; +function _289(_28a){ +var _28b=$.data(_28a,"window"); +var opts=_28b.options; +var win=$(_28a).panel($.extend({},_28b.options,{border:false,doSize:true,closed:true,cls:"window "+(!opts.border?"window-thinborder window-noborder ":(opts.border=="thin"?"window-thinborder ":""))+(opts.cls||""),headerCls:"window-header "+(opts.headerCls||""),bodyCls:"window-body "+(opts.noheader?"window-body-noheader ":" ")+(opts.bodyCls||""),onBeforeDestroy:function(){ +if(opts.onBeforeDestroy.call(_28a)==false){ +return false; +} +if(_28b.shadow){ +_28b.shadow.remove(); +} +if(_28b.mask){ +_28b.mask.remove(); +} +},onClose:function(){ +if(_28b.shadow){ +_28b.shadow.hide(); +} +if(_28b.mask){ +_28b.mask.hide(); +} +opts.onClose.call(_28a); +},onOpen:function(){ +if(_28b.mask){ +_28b.mask.css($.extend({display:"block",zIndex:$.fn.window.defaults.zIndex++},$.fn.window.getMaskSize(_28a))); +} +if(_28b.shadow){ +_28b.shadow.css({display:"block",zIndex:$.fn.window.defaults.zIndex++,left:opts.left,top:opts.top,width:_28b.window._outerWidth(),height:_28b.window._outerHeight()}); +} +_28b.window.css("z-index",$.fn.window.defaults.zIndex++); +opts.onOpen.call(_28a); +},onResize:function(_28c,_28d){ +var _28e=$(this).panel("options"); +$.extend(opts,{width:_28e.width,height:_28e.height,left:_28e.left,top:_28e.top}); +if(_28b.shadow){ +_28b.shadow.css({left:opts.left,top:opts.top,width:_28b.window._outerWidth(),height:_28b.window._outerHeight()}); +} +opts.onResize.call(_28a,_28c,_28d); +},onMinimize:function(){ +if(_28b.shadow){ +_28b.shadow.hide(); +} +if(_28b.mask){ +_28b.mask.hide(); +} +_28b.options.onMinimize.call(_28a); +},onBeforeCollapse:function(){ +if(opts.onBeforeCollapse.call(_28a)==false){ +return false; +} +if(_28b.shadow){ +_28b.shadow.hide(); +} +},onExpand:function(){ +if(_28b.shadow){ +_28b.shadow.show(); +} +opts.onExpand.call(_28a); +}})); +_28b.window=win.panel("panel"); +if(_28b.mask){ +_28b.mask.remove(); +} +if(opts.modal){ +_28b.mask=$("
      ").insertAfter(_28b.window); +} +if(_28b.shadow){ +_28b.shadow.remove(); +} +if(opts.shadow){ +_28b.shadow=$("
      ").insertAfter(_28b.window); +} +var _28f=opts.closed; +if(opts.left==null){ +_27f(_28a); +} +if(opts.top==null){ +_284(_28a); +} +_27b(_28a); +if(!_28f){ +win.window("open"); +} +}; +function _290(left,top,_291,_292){ +var _293=this; +var _294=$.data(_293,"window"); +var opts=_294.options; +if(!opts.constrain){ +return {}; +} +if($.isFunction(opts.constrain)){ +return opts.constrain.call(_293,left,top,_291,_292); +} +var win=$(_293).window("window"); +var _295=opts.inline?win.parent():$(window); +if(left<0){ +left=0; +} +if(top<_295.scrollTop()){ +top=_295.scrollTop(); +} +if(left+_291>_295.width()){ +if(_291==win.outerWidth()){ +left=_295.width()-_291; +}else{ +_291=_295.width()-left; +} +} +if(top-_295.scrollTop()+_292>_295.height()){ +if(_292==win.outerHeight()){ +top=_295.height()-_292+_295.scrollTop(); +}else{ +_292=_295.height()-top+_295.scrollTop(); +} +} +return {left:left,top:top,width:_291,height:_292}; +}; +function _296(_297){ +var _298=$.data(_297,"window"); +_298.window.draggable({handle:">div.panel-header>div.panel-title",disabled:_298.options.draggable==false,onBeforeDrag:function(e){ +if(_298.mask){ +_298.mask.css("z-index",$.fn.window.defaults.zIndex++); +} +if(_298.shadow){ +_298.shadow.css("z-index",$.fn.window.defaults.zIndex++); +} +_298.window.css("z-index",$.fn.window.defaults.zIndex++); +},onStartDrag:function(e){ +_299(e); +},onDrag:function(e){ +_29a(e); +return false; +},onStopDrag:function(e){ +_29b(e,"move"); +}}); +_298.window.resizable({disabled:_298.options.resizable==false,onStartResize:function(e){ +_299(e); +},onResize:function(e){ +_29a(e); +return false; +},onStopResize:function(e){ +_29b(e,"resize"); +}}); +function _299(e){ +if(_298.pmask){ +_298.pmask.remove(); +} +_298.pmask=$("
      ").insertAfter(_298.window); +_298.pmask.css({display:"none",zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top,width:_298.window._outerWidth(),height:_298.window._outerHeight()}); +if(_298.proxy){ +_298.proxy.remove(); +} +_298.proxy=$("
      ").insertAfter(_298.window); +_298.proxy.css({display:"none",zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top}); +_298.proxy._outerWidth(e.data.width)._outerHeight(e.data.height); +_298.proxy.hide(); +setTimeout(function(){ +if(_298.pmask){ +_298.pmask.show(); +} +if(_298.proxy){ +_298.proxy.show(); +} +},500); +}; +function _29a(e){ +$.extend(e.data,_290.call(_297,e.data.left,e.data.top,e.data.width,e.data.height)); +_298.pmask.show(); +_298.proxy.css({display:"block",left:e.data.left,top:e.data.top}); +_298.proxy._outerWidth(e.data.width); +_298.proxy._outerHeight(e.data.height); +}; +function _29b(e,_29c){ +$.extend(e.data,_290.call(_297,e.data.left,e.data.top,e.data.width+0.1,e.data.height+0.1)); +$(_297).window(_29c,e.data); +_298.pmask.remove(); +_298.pmask=null; +_298.proxy.remove(); +_298.proxy=null; +}; +}; +$(function(){ +if(!$._positionFixed){ +$(window).resize(function(){ +$("body>div.window-mask:visible").css({width:"",height:""}); +setTimeout(function(){ +$("body>div.window-mask:visible").css($.fn.window.getMaskSize()); +},50); +}); +} +}); +$.fn.window=function(_29d,_29e){ +if(typeof _29d=="string"){ +var _29f=$.fn.window.methods[_29d]; +if(_29f){ +return _29f(this,_29e); +}else{ +return this.panel(_29d,_29e); +} +} +_29d=_29d||{}; +return this.each(function(){ +var _2a0=$.data(this,"window"); +if(_2a0){ +$.extend(_2a0.options,_29d); +}else{ +_2a0=$.data(this,"window",{options:$.extend({},$.fn.window.defaults,$.fn.window.parseOptions(this),_29d)}); +if(!_2a0.options.inline){ +document.body.appendChild(this); +} +} +_289(this); +_296(this); +}); +}; +$.fn.window.methods={options:function(jq){ +var _2a1=jq.panel("options"); +var _2a2=$.data(jq[0],"window").options; +return $.extend(_2a2,{closed:_2a1.closed,collapsed:_2a1.collapsed,minimized:_2a1.minimized,maximized:_2a1.maximized}); +},window:function(jq){ +return $.data(jq[0],"window").window; +},move:function(jq,_2a3){ +return jq.each(function(){ +_27b(this,_2a3); +}); +},hcenter:function(jq){ +return jq.each(function(){ +_27f(this,true); +}); +},vcenter:function(jq){ +return jq.each(function(){ +_284(this,true); +}); +},center:function(jq){ +return jq.each(function(){ +_27f(this); +_284(this); +_27b(this); +}); +}}; +$.fn.window.getMaskSize=function(_2a4){ +var _2a5=$(_2a4).data("window"); +if(_2a5&&_2a5.options.inline){ +return {}; +}else{ +if($._positionFixed){ +return {position:"fixed"}; +}else{ +return {width:$(document).width(),height:$(document).height()}; +} +} +}; +$.fn.window.parseOptions=function(_2a6){ +return $.extend({},$.fn.panel.parseOptions(_2a6),$.parser.parseOptions(_2a6,[{draggable:"boolean",resizable:"boolean",shadow:"boolean",modal:"boolean",inline:"boolean"}])); +}; +$.fn.window.defaults=$.extend({},$.fn.panel.defaults,{zIndex:9000,draggable:true,resizable:true,shadow:true,modal:false,border:true,inline:false,title:"New Window",collapsible:true,minimizable:true,maximizable:true,closable:true,closed:false,constrain:false}); +})(jQuery); +(function($){ +function _2a7(_2a8){ +var opts=$.data(_2a8,"dialog").options; +opts.inited=false; +$(_2a8).window($.extend({},opts,{onResize:function(w,h){ +if(opts.inited){ +_2ad(this); +opts.onResize.call(this,w,h); +} +}})); +var win=$(_2a8).window("window"); +if(opts.toolbar){ +if($.isArray(opts.toolbar)){ +$(_2a8).siblings("div.dialog-toolbar").remove(); +var _2a9=$("
      ").appendTo(win); +var tr=_2a9.find("tr"); +for(var i=0;i
      ").appendTo(tr); +}else{ +var td=$("").appendTo(tr); +var tool=$("").appendTo(td); +tool[0].onclick=eval(btn.handler||function(){ +}); +tool.linkbutton($.extend({},btn,{plain:true})); +} +} +}else{ +$(opts.toolbar).addClass("dialog-toolbar").appendTo(win); +$(opts.toolbar).show(); +} +}else{ +$(_2a8).siblings("div.dialog-toolbar").remove(); +} +if(opts.buttons){ +if($.isArray(opts.buttons)){ +$(_2a8).siblings("div.dialog-button").remove(); +var _2aa=$("
      ").appendTo(win); +for(var i=0;i").appendTo(_2aa); +if(p.handler){ +_2ab[0].onclick=p.handler; +} +_2ab.linkbutton(p); +} +}else{ +$(opts.buttons).addClass("dialog-button").appendTo(win); +$(opts.buttons).show(); +} +}else{ +$(_2a8).siblings("div.dialog-button").remove(); +} +opts.inited=true; +var _2ac=opts.closed; +win.show(); +$(_2a8).window("resize"); +if(_2ac){ +win.hide(); +} +}; +function _2ad(_2ae,_2af){ +var t=$(_2ae); +var opts=t.dialog("options"); +var _2b0=opts.noheader; +var tb=t.siblings(".dialog-toolbar"); +var bb=t.siblings(".dialog-button"); +tb.insertBefore(_2ae).css({borderTopWidth:(_2b0?1:0),top:(_2b0?tb.length:0)}); +bb.insertAfter(_2ae); +tb.add(bb)._outerWidth(t._outerWidth()).find(".easyui-fluid:visible").each(function(){ +$(this).triggerHandler("_resize"); +}); +var _2b1=tb._outerHeight()+bb._outerHeight(); +if(!isNaN(parseInt(opts.height))){ +t._outerHeight(t._outerHeight()-_2b1); +}else{ +var _2b2=t._size("min-height"); +if(_2b2){ +t._size("min-height",_2b2-_2b1); +} +var _2b3=t._size("max-height"); +if(_2b3){ +t._size("max-height",_2b3-_2b1); +} +} +var _2b4=$.data(_2ae,"window").shadow; +if(_2b4){ +var cc=t.panel("panel"); +_2b4.css({width:cc._outerWidth(),height:cc._outerHeight()}); +} +}; +$.fn.dialog=function(_2b5,_2b6){ +if(typeof _2b5=="string"){ +var _2b7=$.fn.dialog.methods[_2b5]; +if(_2b7){ +return _2b7(this,_2b6); +}else{ +return this.window(_2b5,_2b6); +} +} +_2b5=_2b5||{}; +return this.each(function(){ +var _2b8=$.data(this,"dialog"); +if(_2b8){ +$.extend(_2b8.options,_2b5); +}else{ +$.data(this,"dialog",{options:$.extend({},$.fn.dialog.defaults,$.fn.dialog.parseOptions(this),_2b5)}); +} +_2a7(this); +}); +}; +$.fn.dialog.methods={options:function(jq){ +var _2b9=$.data(jq[0],"dialog").options; +var _2ba=jq.panel("options"); +$.extend(_2b9,{width:_2ba.width,height:_2ba.height,left:_2ba.left,top:_2ba.top,closed:_2ba.closed,collapsed:_2ba.collapsed,minimized:_2ba.minimized,maximized:_2ba.maximized}); +return _2b9; +},dialog:function(jq){ +return jq.window("window"); +}}; +$.fn.dialog.parseOptions=function(_2bb){ +var t=$(_2bb); +return $.extend({},$.fn.window.parseOptions(_2bb),$.parser.parseOptions(_2bb,["toolbar","buttons"]),{toolbar:(t.children(".dialog-toolbar").length?t.children(".dialog-toolbar").removeClass("dialog-toolbar"):undefined),buttons:(t.children(".dialog-button").length?t.children(".dialog-button").removeClass("dialog-button"):undefined)}); +}; +$.fn.dialog.defaults=$.extend({},$.fn.window.defaults,{title:"New Dialog",collapsible:false,minimizable:false,maximizable:false,resizable:false,toolbar:null,buttons:null}); +})(jQuery); +(function($){ +function _2bc(){ +$(document).unbind(".messager").bind("keydown.messager",function(e){ +if(e.keyCode==27){ +$("body").children("div.messager-window").children("div.messager-body").each(function(){ +$(this).dialog("close"); +}); +}else{ +if(e.keyCode==9){ +var win=$("body").children("div.messager-window"); +if(!win.length){ +return; +} +var _2bd=win.find(".messager-input,.messager-button .l-btn"); +for(var i=0;i<_2bd.length;i++){ +if($(_2bd[i]).is(":focus")){ +$(_2bd[i>=_2bd.length-1?0:i+1]).focus(); +return false; +} +} +}else{ +if(e.keyCode==13){ +var _2be=$(e.target).closest("input.messager-input"); +if(_2be.length){ +var dlg=_2be.closest(".messager-body"); +_2bf(dlg,_2be.val()); +} +} +} +} +}); +}; +function _2c0(){ +$(document).unbind(".messager"); +}; +function _2c1(_2c2){ +var opts=$.extend({},$.messager.defaults,{modal:false,shadow:false,draggable:false,resizable:false,closed:true,style:{left:"",top:"",right:0,zIndex:$.fn.window.defaults.zIndex++,bottom:-document.body.scrollTop-document.documentElement.scrollTop},title:"",width:250,height:100,minHeight:0,showType:"slide",showSpeed:600,content:_2c2.msg,timeout:4000},_2c2); +var dlg=$("
      ").appendTo("body"); +dlg.dialog($.extend({},opts,{noheader:(opts.title?false:true),openAnimation:(opts.showType),closeAnimation:(opts.showType=="show"?"hide":opts.showType),openDuration:opts.showSpeed,closeDuration:opts.showSpeed,onOpen:function(){ +dlg.dialog("dialog").hover(function(){ +if(opts.timer){ +clearTimeout(opts.timer); +} +},function(){ +_2c3(); +}); +_2c3(); +function _2c3(){ +if(opts.timeout>0){ +opts.timer=setTimeout(function(){ +if(dlg.length&&dlg.data("dialog")){ +dlg.dialog("close"); +} +},opts.timeout); +} +}; +if(_2c2.onOpen){ +_2c2.onOpen.call(this); +}else{ +opts.onOpen.call(this); +} +},onClose:function(){ +if(opts.timer){ +clearTimeout(opts.timer); +} +if(_2c2.onClose){ +_2c2.onClose.call(this); +}else{ +opts.onClose.call(this); +} +dlg.dialog("destroy"); +}})); +dlg.dialog("dialog").css(opts.style); +dlg.dialog("open"); +return dlg; +}; +function _2c4(_2c5){ +_2bc(); +var dlg=$("
      ").appendTo("body"); +dlg.dialog($.extend({},_2c5,{noheader:(_2c5.title?false:true),onClose:function(){ +_2c0(); +if(_2c5.onClose){ +_2c5.onClose.call(this); +} +setTimeout(function(){ +dlg.dialog("destroy"); +},100); +}})); +var win=dlg.dialog("dialog").addClass("messager-window"); +win.find(".dialog-button").addClass("messager-button").find("a:first").focus(); +return dlg; +}; +function _2bf(dlg,_2c6){ +dlg.dialog("close"); +dlg.dialog("options").fn(_2c6); +}; +$.messager={show:function(_2c7){ +return _2c1(_2c7); +},alert:function(_2c8,msg,icon,fn){ +var opts=typeof _2c8=="object"?_2c8:{title:_2c8,msg:msg,icon:icon,fn:fn}; +var cls=opts.icon?"messager-icon messager-"+opts.icon:""; +opts=$.extend({},$.messager.defaults,{content:"
      "+"
      "+opts.msg+"
      "+"
      "},opts); +if(!opts.buttons){ +opts.buttons=[{text:opts.ok,onClick:function(){ +_2bf(dlg); +}}]; +} +var dlg=_2c4(opts); +return dlg; +},confirm:function(_2c9,msg,fn){ +var opts=typeof _2c9=="object"?_2c9:{title:_2c9,msg:msg,fn:fn}; +opts=$.extend({},$.messager.defaults,{content:"
      "+"
      "+opts.msg+"
      "+"
      "},opts); +if(!opts.buttons){ +opts.buttons=[{text:opts.ok,onClick:function(){ +_2bf(dlg,true); +}},{text:opts.cancel,onClick:function(){ +_2bf(dlg,false); +}}]; +} +var dlg=_2c4(opts); +return dlg; +},prompt:function(_2ca,msg,fn){ +var opts=typeof _2ca=="object"?_2ca:{title:_2ca,msg:msg,fn:fn}; +opts=$.extend({},$.messager.defaults,{content:"
      "+"
      "+opts.msg+"
      "+"
      "+"
      "+"
      "},opts); +if(!opts.buttons){ +opts.buttons=[{text:opts.ok,onClick:function(){ +_2bf(dlg,dlg.find(".messager-input").val()); +}},{text:opts.cancel,onClick:function(){ +_2bf(dlg); +}}]; +} +var dlg=_2c4(opts); +dlg.find(".messager-input").focus(); +return dlg; +},progress:function(_2cb){ +var _2cc={bar:function(){ +return $("body>div.messager-window").find("div.messager-p-bar"); +},close:function(){ +var dlg=$("body>div.messager-window>div.messager-body:has(div.messager-progress)"); +if(dlg.length){ +dlg.dialog("close"); +} +}}; +if(typeof _2cb=="string"){ +var _2cd=_2cc[_2cb]; +return _2cd(); +} +_2cb=_2cb||{}; +var opts=$.extend({},{title:"",minHeight:0,content:undefined,msg:"",text:undefined,interval:300},_2cb); +var dlg=_2c4($.extend({},$.messager.defaults,{content:"
      "+opts.msg+"
      ",closable:false,doSize:false},opts,{onClose:function(){ +if(this.timer){ +clearInterval(this.timer); +} +if(_2cb.onClose){ +_2cb.onClose.call(this); +}else{ +$.messager.defaults.onClose.call(this); +} +}})); +var bar=dlg.find("div.messager-p-bar"); +bar.progressbar({text:opts.text}); +dlg.dialog("resize"); +if(opts.interval){ +dlg[0].timer=setInterval(function(){ +var v=bar.progressbar("getValue"); +v+=10; +if(v>100){ +v=0; +} +bar.progressbar("setValue",v); +},opts.interval); +} +return dlg; +}}; +$.messager.defaults=$.extend({},$.fn.dialog.defaults,{ok:"Ok",cancel:"Cancel",width:300,height:"auto",minHeight:150,modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,fn:function(){ +}}); +})(jQuery); +(function($){ +function _2ce(_2cf,_2d0){ +var _2d1=$.data(_2cf,"accordion"); +var opts=_2d1.options; +var _2d2=_2d1.panels; +var cc=$(_2cf); +var _2d3=(opts.halign=="left"||opts.halign=="right"); +cc.children(".panel-last").removeClass("panel-last"); +cc.children(".panel:last").addClass("panel-last"); +if(_2d0){ +$.extend(opts,{width:_2d0.width,height:_2d0.height}); +} +cc._size(opts); +var _2d4=0; +var _2d5="auto"; +var _2d6=cc.find(">.panel>.accordion-header"); +if(_2d6.length){ +if(_2d3){ +$(_2d2[0]).panel("resize",{width:cc.width(),height:cc.height()}); +_2d4=$(_2d6[0])._outerWidth(); +}else{ +_2d4=$(_2d6[0]).css("height","")._outerHeight(); +} +} +if(!isNaN(parseInt(opts.height))){ +if(_2d3){ +_2d5=cc.width()-_2d4*_2d6.length; +}else{ +_2d5=cc.height()-_2d4*_2d6.length; +} +} +_2d7(true,_2d5-_2d7(false)); +function _2d7(_2d8,_2d9){ +var _2da=0; +for(var i=0;i<_2d2.length;i++){ +var p=_2d2[i]; +if(_2d3){ +var h=p.panel("header")._outerWidth(_2d4); +}else{ +var h=p.panel("header")._outerHeight(_2d4); +} +if(p.panel("options").collapsible==_2d8){ +var _2db=isNaN(_2d9)?undefined:(_2d9+_2d4*h.length); +if(_2d3){ +p.panel("resize",{height:cc.height(),width:(_2d8?_2db:undefined)}); +_2da+=p.panel("panel")._outerWidth()-_2d4*h.length; +}else{ +p.panel("resize",{width:cc.width(),height:(_2d8?_2db:undefined)}); +_2da+=p.panel("panel").outerHeight()-_2d4*h.length; +} +} +} +return _2da; +}; +}; +function _2dc(_2dd,_2de,_2df,all){ +var _2e0=$.data(_2dd,"accordion").panels; +var pp=[]; +for(var i=0;i<_2e0.length;i++){ +var p=_2e0[i]; +if(_2de){ +if(p.panel("options")[_2de]==_2df){ +pp.push(p); +} +}else{ +if(p[0]==$(_2df)[0]){ +return i; +} +} +} +if(_2de){ +return all?pp:(pp.length?pp[0]:null); +}else{ +return -1; +} +}; +function _2e1(_2e2){ +return _2dc(_2e2,"collapsed",false,true); +}; +function _2e3(_2e4){ +var pp=_2e1(_2e4); +return pp.length?pp[0]:null; +}; +function _2e5(_2e6,_2e7){ +return _2dc(_2e6,null,_2e7); +}; +function _2e8(_2e9,_2ea){ +var _2eb=$.data(_2e9,"accordion").panels; +if(typeof _2ea=="number"){ +if(_2ea<0||_2ea>=_2eb.length){ +return null; +}else{ +return _2eb[_2ea]; +} +} +return _2dc(_2e9,"title",_2ea); +}; +function _2ec(_2ed){ +var opts=$.data(_2ed,"accordion").options; +var cc=$(_2ed); +if(opts.border){ +cc.removeClass("accordion-noborder"); +}else{ +cc.addClass("accordion-noborder"); +} +}; +function init(_2ee){ +var _2ef=$.data(_2ee,"accordion"); +var cc=$(_2ee); +cc.addClass("accordion"); +_2ef.panels=[]; +cc.children("div").each(function(){ +var opts=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)}); +var pp=$(this); +_2ef.panels.push(pp); +_2f1(_2ee,pp,opts); +}); +cc.bind("_resize",function(e,_2f0){ +if($(this).hasClass("easyui-fluid")||_2f0){ +_2ce(_2ee); +} +return false; +}); +}; +function _2f1(_2f2,pp,_2f3){ +var opts=$.data(_2f2,"accordion").options; +pp.panel($.extend({},{collapsible:true,minimizable:false,maximizable:false,closable:false,doSize:false,collapsed:true,headerCls:"accordion-header",bodyCls:"accordion-body",halign:opts.halign},_2f3,{onBeforeExpand:function(){ +if(_2f3.onBeforeExpand){ +if(_2f3.onBeforeExpand.call(this)==false){ +return false; +} +} +if(!opts.multiple){ +var all=$.grep(_2e1(_2f2),function(p){ +return p.panel("options").collapsible; +}); +for(var i=0;i.panel-last>.accordion-header").removeClass("accordion-header-border"); +if(_2f3.onExpand){ +_2f3.onExpand.call(this); +} +opts.onSelect.call(_2f2,$(this).panel("options").title,_2e5(_2f2,this)); +},onBeforeCollapse:function(){ +if(_2f3.onBeforeCollapse){ +if(_2f3.onBeforeCollapse.call(this)==false){ +return false; +} +} +$(_2f2).find(">.panel-last>.accordion-header").addClass("accordion-header-border"); +var _2f5=$(this).panel("header"); +_2f5.removeClass("accordion-header-selected"); +_2f5.find(".accordion-collapse").addClass("accordion-expand"); +},onCollapse:function(){ +if(isNaN(parseInt(opts.height))){ +$(_2f2).find(">.panel-last>.accordion-header").removeClass("accordion-header-border"); +} +if(_2f3.onCollapse){ +_2f3.onCollapse.call(this); +} +opts.onUnselect.call(_2f2,$(this).panel("options").title,_2e5(_2f2,this)); +}})); +var _2f6=pp.panel("header"); +var tool=_2f6.children("div.panel-tool"); +tool.children("a.panel-tool-collapse").hide(); +var t=$("").addClass("accordion-collapse accordion-expand").appendTo(tool); +t.bind("click",function(){ +_2f7(pp); +return false; +}); +pp.panel("options").collapsible?t.show():t.hide(); +if(opts.halign=="left"||opts.halign=="right"){ +t.hide(); +} +_2f6.click(function(){ +_2f7(pp); +return false; +}); +function _2f7(p){ +var _2f8=p.panel("options"); +if(_2f8.collapsible){ +var _2f9=_2e5(_2f2,p); +if(_2f8.collapsed){ +_2fa(_2f2,_2f9); +}else{ +_2fb(_2f2,_2f9); +} +} +}; +}; +function _2fa(_2fc,_2fd){ +var p=_2e8(_2fc,_2fd); +if(!p){ +return; +} +_2fe(_2fc); +var opts=$.data(_2fc,"accordion").options; +p.panel("expand",opts.animate); +}; +function _2fb(_2ff,_300){ +var p=_2e8(_2ff,_300); +if(!p){ +return; +} +_2fe(_2ff); +var opts=$.data(_2ff,"accordion").options; +p.panel("collapse",opts.animate); +}; +function _301(_302){ +var opts=$.data(_302,"accordion").options; +$(_302).find(">.panel-last>.accordion-header").addClass("accordion-header-border"); +var p=_2dc(_302,"selected",true); +if(p){ +_303(_2e5(_302,p)); +}else{ +_303(opts.selected); +} +function _303(_304){ +var _305=opts.animate; +opts.animate=false; +_2fa(_302,_304); +opts.animate=_305; +}; +}; +function _2fe(_306){ +var _307=$.data(_306,"accordion").panels; +for(var i=0;i<_307.length;i++){ +_307[i].stop(true,true); +} +}; +function add(_308,_309){ +var _30a=$.data(_308,"accordion"); +var opts=_30a.options; +var _30b=_30a.panels; +if(_309.selected==undefined){ +_309.selected=true; +} +_2fe(_308); +var pp=$("
      ").appendTo(_308); +_30b.push(pp); +_2f1(_308,pp,_309); +_2ce(_308); +opts.onAdd.call(_308,_309.title,_30b.length-1); +if(_309.selected){ +_2fa(_308,_30b.length-1); +} +}; +function _30c(_30d,_30e){ +var _30f=$.data(_30d,"accordion"); +var opts=_30f.options; +var _310=_30f.panels; +_2fe(_30d); +var _311=_2e8(_30d,_30e); +var _312=_311.panel("options").title; +var _313=_2e5(_30d,_311); +if(!_311){ +return; +} +if(opts.onBeforeRemove.call(_30d,_312,_313)==false){ +return; +} +_310.splice(_313,1); +_311.panel("destroy"); +if(_310.length){ +_2ce(_30d); +var curr=_2e3(_30d); +if(!curr){ +_2fa(_30d,0); +} +} +opts.onRemove.call(_30d,_312,_313); +}; +$.fn.accordion=function(_314,_315){ +if(typeof _314=="string"){ +return $.fn.accordion.methods[_314](this,_315); +} +_314=_314||{}; +return this.each(function(){ +var _316=$.data(this,"accordion"); +if(_316){ +$.extend(_316.options,_314); +}else{ +$.data(this,"accordion",{options:$.extend({},$.fn.accordion.defaults,$.fn.accordion.parseOptions(this),_314),accordion:$(this).addClass("accordion"),panels:[]}); +init(this); +} +_2ec(this); +_2ce(this); +_301(this); +}); +}; +$.fn.accordion.methods={options:function(jq){ +return $.data(jq[0],"accordion").options; +},panels:function(jq){ +return $.data(jq[0],"accordion").panels; +},resize:function(jq,_317){ +return jq.each(function(){ +_2ce(this,_317); +}); +},getSelections:function(jq){ +return _2e1(jq[0]); +},getSelected:function(jq){ +return _2e3(jq[0]); +},getPanel:function(jq,_318){ +return _2e8(jq[0],_318); +},getPanelIndex:function(jq,_319){ +return _2e5(jq[0],_319); +},select:function(jq,_31a){ +return jq.each(function(){ +_2fa(this,_31a); +}); +},unselect:function(jq,_31b){ +return jq.each(function(){ +_2fb(this,_31b); +}); +},add:function(jq,_31c){ +return jq.each(function(){ +add(this,_31c); +}); +},remove:function(jq,_31d){ +return jq.each(function(){ +_30c(this,_31d); +}); +}}; +$.fn.accordion.parseOptions=function(_31e){ +var t=$(_31e); +return $.extend({},$.parser.parseOptions(_31e,["width","height","halign",{fit:"boolean",border:"boolean",animate:"boolean",multiple:"boolean",selected:"number"}])); +}; +$.fn.accordion.defaults={width:"auto",height:"auto",fit:false,border:true,animate:true,multiple:false,selected:0,halign:"top",onSelect:function(_31f,_320){ +},onUnselect:function(_321,_322){ +},onAdd:function(_323,_324){ +},onBeforeRemove:function(_325,_326){ +},onRemove:function(_327,_328){ +}}; +})(jQuery); +(function($){ +function _329(c){ +var w=0; +$(c).children().each(function(){ +w+=$(this).outerWidth(true); +}); +return w; +}; +function _32a(_32b){ +var opts=$.data(_32b,"tabs").options; +if(opts.tabPosition=="left"||opts.tabPosition=="right"||!opts.showHeader){ +return; +} +var _32c=$(_32b).children("div.tabs-header"); +var tool=_32c.children("div.tabs-tool:not(.tabs-tool-hidden)"); +var _32d=_32c.children("div.tabs-scroller-left"); +var _32e=_32c.children("div.tabs-scroller-right"); +var wrap=_32c.children("div.tabs-wrap"); +var _32f=_32c.outerHeight(); +if(opts.plain){ +_32f-=_32f-_32c.height(); +} +tool._outerHeight(_32f); +var _330=_329(_32c.find("ul.tabs")); +var _331=_32c.width()-tool._outerWidth(); +if(_330>_331){ +_32d.add(_32e).show()._outerHeight(_32f); +if(opts.toolPosition=="left"){ +tool.css({left:_32d.outerWidth(),right:""}); +wrap.css({marginLeft:_32d.outerWidth()+tool._outerWidth(),marginRight:_32e._outerWidth(),width:_331-_32d.outerWidth()-_32e.outerWidth()}); +}else{ +tool.css({left:"",right:_32e.outerWidth()}); +wrap.css({marginLeft:_32d.outerWidth(),marginRight:_32e.outerWidth()+tool._outerWidth(),width:_331-_32d.outerWidth()-_32e.outerWidth()}); +} +}else{ +_32d.add(_32e).hide(); +if(opts.toolPosition=="left"){ +tool.css({left:0,right:""}); +wrap.css({marginLeft:tool._outerWidth(),marginRight:0,width:_331}); +}else{ +tool.css({left:"",right:0}); +wrap.css({marginLeft:0,marginRight:tool._outerWidth(),width:_331}); +} +} +}; +function _332(_333){ +var opts=$.data(_333,"tabs").options; +var _334=$(_333).children("div.tabs-header"); +if(opts.tools){ +if(typeof opts.tools=="string"){ +$(opts.tools).addClass("tabs-tool").appendTo(_334); +$(opts.tools).show(); +}else{ +_334.children("div.tabs-tool").remove(); +var _335=$("
      ").appendTo(_334); +var tr=_335.find("tr"); +for(var i=0;i").appendTo(tr); +var tool=$("").appendTo(td); +tool[0].onclick=eval(opts.tools[i].handler||function(){ +}); +tool.linkbutton($.extend({},opts.tools[i],{plain:true})); +} +} +}else{ +_334.children("div.tabs-tool").remove(); +} +}; +function _336(_337,_338){ +var _339=$.data(_337,"tabs"); +var opts=_339.options; +var cc=$(_337); +if(!opts.doSize){ +return; +} +if(_338){ +$.extend(opts,{width:_338.width,height:_338.height}); +} +cc._size(opts); +var _33a=cc.children("div.tabs-header"); +var _33b=cc.children("div.tabs-panels"); +var wrap=_33a.find("div.tabs-wrap"); +var ul=wrap.find(".tabs"); +ul.children("li").removeClass("tabs-first tabs-last"); +ul.children("li:first").addClass("tabs-first"); +ul.children("li:last").addClass("tabs-last"); +if(opts.tabPosition=="left"||opts.tabPosition=="right"){ +_33a._outerWidth(opts.showHeader?opts.headerWidth:0); +_33b._outerWidth(cc.width()-_33a.outerWidth()); +_33a.add(_33b)._size("height",isNaN(parseInt(opts.height))?"":cc.height()); +wrap._outerWidth(_33a.width()); +ul._outerWidth(wrap.width()).css("height",""); +}else{ +_33a.children("div.tabs-scroller-left,div.tabs-scroller-right,div.tabs-tool:not(.tabs-tool-hidden)").css("display",opts.showHeader?"block":"none"); +_33a._outerWidth(cc.width()).css("height",""); +if(opts.showHeader){ +_33a.css("background-color",""); +wrap.css("height",""); +}else{ +_33a.css("background-color","transparent"); +_33a._outerHeight(0); +wrap._outerHeight(0); +} +ul._outerHeight(opts.tabHeight).css("width",""); +ul._outerHeight(ul.outerHeight()-ul.height()-1+opts.tabHeight).css("width",""); +_33b._size("height",isNaN(parseInt(opts.height))?"":(cc.height()-_33a.outerHeight())); +_33b._size("width",cc.width()); +} +if(_339.tabs.length){ +var d1=ul.outerWidth(true)-ul.width(); +var li=ul.children("li:first"); +var d2=li.outerWidth(true)-li.width(); +var _33c=_33a.width()-_33a.children(".tabs-tool:not(.tabs-tool-hidden)")._outerWidth(); +var _33d=Math.floor((_33c-d1-d2*_339.tabs.length)/_339.tabs.length); +$.map(_339.tabs,function(p){ +_33e(p,(opts.justified&&$.inArray(opts.tabPosition,["top","bottom"])>=0)?_33d:undefined); +}); +if(opts.justified&&$.inArray(opts.tabPosition,["top","bottom"])>=0){ +var _33f=_33c-d1-_329(ul); +_33e(_339.tabs[_339.tabs.length-1],_33d+_33f); +} +} +_32a(_337); +function _33e(p,_340){ +var _341=p.panel("options"); +var p_t=_341.tab.find("a.tabs-inner"); +var _340=_340?_340:(parseInt(_341.tabWidth||opts.tabWidth||undefined)); +if(_340){ +p_t._outerWidth(_340); +}else{ +p_t.css("width",""); +} +p_t._outerHeight(opts.tabHeight); +p_t.css("lineHeight",p_t.height()+"px"); +p_t.find(".easyui-fluid:visible").triggerHandler("_resize"); +}; +}; +function _342(_343){ +var opts=$.data(_343,"tabs").options; +var tab=_344(_343); +if(tab){ +var _345=$(_343).children("div.tabs-panels"); +var _346=opts.width=="auto"?"auto":_345.width(); +var _347=opts.height=="auto"?"auto":_345.height(); +tab.panel("resize",{width:_346,height:_347}); +} +}; +function _348(_349){ +var tabs=$.data(_349,"tabs").tabs; +var cc=$(_349).addClass("tabs-container"); +var _34a=$("
      ").insertBefore(cc); +cc.children("div").each(function(){ +_34a[0].appendChild(this); +}); +cc[0].appendChild(_34a[0]); +$("
      "+"
      "+"
      "+"
      "+"
        "+"
        "+"
        ").prependTo(_349); +cc.children("div.tabs-panels").children("div").each(function(i){ +var opts=$.extend({},$.parser.parseOptions(this),{disabled:($(this).attr("disabled")?true:undefined),selected:($(this).attr("selected")?true:undefined)}); +_357(_349,opts,$(this)); +}); +cc.children("div.tabs-header").find(".tabs-scroller-left, .tabs-scroller-right").hover(function(){ +$(this).addClass("tabs-scroller-over"); +},function(){ +$(this).removeClass("tabs-scroller-over"); +}); +cc.bind("_resize",function(e,_34b){ +if($(this).hasClass("easyui-fluid")||_34b){ +_336(_349); +_342(_349); +} +return false; +}); +}; +function _34c(_34d){ +var _34e=$.data(_34d,"tabs"); +var opts=_34e.options; +$(_34d).children("div.tabs-header").unbind().bind("click",function(e){ +if($(e.target).hasClass("tabs-scroller-left")){ +$(_34d).tabs("scrollBy",-opts.scrollIncrement); +}else{ +if($(e.target).hasClass("tabs-scroller-right")){ +$(_34d).tabs("scrollBy",opts.scrollIncrement); +}else{ +var li=$(e.target).closest("li"); +if(li.hasClass("tabs-disabled")){ +return false; +} +var a=$(e.target).closest("a.tabs-close"); +if(a.length){ +_370(_34d,_34f(li)); +}else{ +if(li.length){ +var _350=_34f(li); +var _351=_34e.tabs[_350].panel("options"); +if(_351.collapsible){ +_351.closed?_367(_34d,_350):_384(_34d,_350); +}else{ +_367(_34d,_350); +} +} +} +return false; +} +} +}).bind("contextmenu",function(e){ +var li=$(e.target).closest("li"); +if(li.hasClass("tabs-disabled")){ +return; +} +if(li.length){ +opts.onContextMenu.call(_34d,e,li.find("span.tabs-title").html(),_34f(li)); +} +}); +function _34f(li){ +var _352=0; +li.parent().children("li").each(function(i){ +if(li[0]==this){ +_352=i; +return false; +} +}); +return _352; +}; +}; +function _353(_354){ +var opts=$.data(_354,"tabs").options; +var _355=$(_354).children("div.tabs-header"); +var _356=$(_354).children("div.tabs-panels"); +_355.removeClass("tabs-header-top tabs-header-bottom tabs-header-left tabs-header-right"); +_356.removeClass("tabs-panels-top tabs-panels-bottom tabs-panels-left tabs-panels-right"); +if(opts.tabPosition=="top"){ +_355.insertBefore(_356); +}else{ +if(opts.tabPosition=="bottom"){ +_355.insertAfter(_356); +_355.addClass("tabs-header-bottom"); +_356.addClass("tabs-panels-top"); +}else{ +if(opts.tabPosition=="left"){ +_355.addClass("tabs-header-left"); +_356.addClass("tabs-panels-right"); +}else{ +if(opts.tabPosition=="right"){ +_355.addClass("tabs-header-right"); +_356.addClass("tabs-panels-left"); +} +} +} +} +if(opts.plain==true){ +_355.addClass("tabs-header-plain"); +}else{ +_355.removeClass("tabs-header-plain"); +} +_355.removeClass("tabs-header-narrow").addClass(opts.narrow?"tabs-header-narrow":""); +var tabs=_355.find(".tabs"); +tabs.removeClass("tabs-pill").addClass(opts.pill?"tabs-pill":""); +tabs.removeClass("tabs-narrow").addClass(opts.narrow?"tabs-narrow":""); +tabs.removeClass("tabs-justified").addClass(opts.justified?"tabs-justified":""); +if(opts.border==true){ +_355.removeClass("tabs-header-noborder"); +_356.removeClass("tabs-panels-noborder"); +}else{ +_355.addClass("tabs-header-noborder"); +_356.addClass("tabs-panels-noborder"); +} +opts.doSize=true; +}; +function _357(_358,_359,pp){ +_359=_359||{}; +var _35a=$.data(_358,"tabs"); +var tabs=_35a.tabs; +if(_359.index==undefined||_359.index>tabs.length){ +_359.index=tabs.length; +} +if(_359.index<0){ +_359.index=0; +} +var ul=$(_358).children("div.tabs-header").find("ul.tabs"); +var _35b=$(_358).children("div.tabs-panels"); +var tab=$("
      • "+""+""+""+""+"
      • "); +if(!pp){ +pp=$("
        "); +} +if(_359.index>=tabs.length){ +tab.appendTo(ul); +pp.appendTo(_35b); +tabs.push(pp); +}else{ +tab.insertBefore(ul.children("li:eq("+_359.index+")")); +pp.insertBefore(_35b.children("div.panel:eq("+_359.index+")")); +tabs.splice(_359.index,0,pp); +} +pp.panel($.extend({},_359,{tab:tab,border:false,noheader:true,closed:true,doSize:false,iconCls:(_359.icon?_359.icon:undefined),onLoad:function(){ +if(_359.onLoad){ +_359.onLoad.call(this,arguments); +} +_35a.options.onLoad.call(_358,$(this)); +},onBeforeOpen:function(){ +if(_359.onBeforeOpen){ +if(_359.onBeforeOpen.call(this)==false){ +return false; +} +} +var p=$(_358).tabs("getSelected"); +if(p){ +if(p[0]!=this){ +$(_358).tabs("unselect",_362(_358,p)); +p=$(_358).tabs("getSelected"); +if(p){ +return false; +} +}else{ +_342(_358); +return false; +} +} +var _35c=$(this).panel("options"); +_35c.tab.addClass("tabs-selected"); +var wrap=$(_358).find(">div.tabs-header>div.tabs-wrap"); +var left=_35c.tab.position().left; +var _35d=left+_35c.tab.outerWidth(); +if(left<0||_35d>wrap.width()){ +var _35e=left-(wrap.width()-_35c.tab.width())/2; +$(_358).tabs("scrollBy",_35e); +}else{ +$(_358).tabs("scrollBy",0); +} +var _35f=$(this).panel("panel"); +_35f.css("display","block"); +_342(_358); +_35f.css("display","none"); +},onOpen:function(){ +if(_359.onOpen){ +_359.onOpen.call(this); +} +var _360=$(this).panel("options"); +_35a.selectHis.push(_360.title); +_35a.options.onSelect.call(_358,_360.title,_362(_358,this)); +},onBeforeClose:function(){ +if(_359.onBeforeClose){ +if(_359.onBeforeClose.call(this)==false){ +return false; +} +} +$(this).panel("options").tab.removeClass("tabs-selected"); +},onClose:function(){ +if(_359.onClose){ +_359.onClose.call(this); +} +var _361=$(this).panel("options"); +_35a.options.onUnselect.call(_358,_361.title,_362(_358,this)); +}})); +$(_358).tabs("update",{tab:pp,options:pp.panel("options"),type:"header"}); +}; +function _363(_364,_365){ +var _366=$.data(_364,"tabs"); +var opts=_366.options; +if(_365.selected==undefined){ +_365.selected=true; +} +_357(_364,_365); +opts.onAdd.call(_364,_365.title,_365.index); +if(_365.selected){ +_367(_364,_365.index); +} +}; +function _368(_369,_36a){ +_36a.type=_36a.type||"all"; +var _36b=$.data(_369,"tabs").selectHis; +var pp=_36a.tab; +var opts=pp.panel("options"); +var _36c=opts.title; +$.extend(opts,_36a.options,{iconCls:(_36a.options.icon?_36a.options.icon:undefined)}); +if(_36a.type=="all"||_36a.type=="body"){ +pp.panel(); +} +if(_36a.type=="all"||_36a.type=="header"){ +var tab=opts.tab; +if(opts.header){ +tab.find(".tabs-inner").html($(opts.header)); +}else{ +var _36d=tab.find("span.tabs-title"); +var _36e=tab.find("span.tabs-icon"); +_36d.html(opts.title); +_36e.attr("class","tabs-icon"); +tab.find("a.tabs-close").remove(); +if(opts.closable){ +_36d.addClass("tabs-closable"); +$("").appendTo(tab); +}else{ +_36d.removeClass("tabs-closable"); +} +if(opts.iconCls){ +_36d.addClass("tabs-with-icon"); +_36e.addClass(opts.iconCls); +}else{ +_36d.removeClass("tabs-with-icon"); +} +if(opts.tools){ +var _36f=tab.find("span.tabs-p-tool"); +if(!_36f.length){ +var _36f=$("").insertAfter(tab.find("a.tabs-inner")); +} +if($.isArray(opts.tools)){ +_36f.empty(); +for(var i=0;i").appendTo(_36f); +t.addClass(opts.tools[i].iconCls); +if(opts.tools[i].handler){ +t.bind("click",{handler:opts.tools[i].handler},function(e){ +if($(this).parents("li").hasClass("tabs-disabled")){ +return; +} +e.data.handler.call(this); +}); +} +} +}else{ +$(opts.tools).children().appendTo(_36f); +} +var pr=_36f.children().length*12; +if(opts.closable){ +pr+=8; +_36f.css("right",""); +}else{ +pr-=3; +_36f.css("right","5px"); +} +_36d.css("padding-right",pr+"px"); +}else{ +tab.find("span.tabs-p-tool").remove(); +_36d.css("padding-right",""); +} +} +if(_36c!=opts.title){ +for(var i=0;i<_36b.length;i++){ +if(_36b[i]==_36c){ +_36b[i]=opts.title; +} +} +} +} +if(opts.disabled){ +opts.tab.addClass("tabs-disabled"); +}else{ +opts.tab.removeClass("tabs-disabled"); +} +_336(_369); +$.data(_369,"tabs").options.onUpdate.call(_369,opts.title,_362(_369,pp)); +}; +function _370(_371,_372){ +var opts=$.data(_371,"tabs").options; +var tabs=$.data(_371,"tabs").tabs; +var _373=$.data(_371,"tabs").selectHis; +if(!_374(_371,_372)){ +return; +} +var tab=_375(_371,_372); +var _376=tab.panel("options").title; +var _377=_362(_371,tab); +if(opts.onBeforeClose.call(_371,_376,_377)==false){ +return; +} +var tab=_375(_371,_372,true); +tab.panel("options").tab.remove(); +tab.panel("destroy"); +opts.onClose.call(_371,_376,_377); +_336(_371); +for(var i=0;i<_373.length;i++){ +if(_373[i]==_376){ +_373.splice(i,1); +i--; +} +} +var _378=_373.pop(); +if(_378){ +_367(_371,_378); +}else{ +if(tabs.length){ +_367(_371,0); +} +} +}; +function _375(_379,_37a,_37b){ +var tabs=$.data(_379,"tabs").tabs; +var tab=null; +if(typeof _37a=="number"){ +if(_37a>=0&&_37a"); +for(var i=0;i.tabs-header>.tabs-tool"); +if(_38f){ +tool.removeClass("tabs-tool-hidden").show(); +}else{ +tool.addClass("tabs-tool-hidden").hide(); +} +$(_38e).tabs("resize").tabs("scrollBy",0); +}; +$.fn.tabs=function(_390,_391){ +if(typeof _390=="string"){ +return $.fn.tabs.methods[_390](this,_391); +} +_390=_390||{}; +return this.each(function(){ +var _392=$.data(this,"tabs"); +if(_392){ +$.extend(_392.options,_390); +}else{ +$.data(this,"tabs",{options:$.extend({},$.fn.tabs.defaults,$.fn.tabs.parseOptions(this),_390),tabs:[],selectHis:[]}); +_348(this); +} +_332(this); +_353(this); +_336(this); +_34c(this); +_37e(this); +}); +}; +$.fn.tabs.methods={options:function(jq){ +var cc=jq[0]; +var opts=$.data(cc,"tabs").options; +var s=_344(cc); +opts.selected=s?_362(cc,s):-1; +return opts; +},tabs:function(jq){ +return $.data(jq[0],"tabs").tabs; +},resize:function(jq,_393){ +return jq.each(function(){ +_336(this,_393); +_342(this); +}); +},add:function(jq,_394){ +return jq.each(function(){ +_363(this,_394); +}); +},close:function(jq,_395){ +return jq.each(function(){ +_370(this,_395); +}); +},getTab:function(jq,_396){ +return _375(jq[0],_396); +},getTabIndex:function(jq,tab){ +return _362(jq[0],tab); +},getSelected:function(jq){ +return _344(jq[0]); +},select:function(jq,_397){ +return jq.each(function(){ +_367(this,_397); +}); +},unselect:function(jq,_398){ +return jq.each(function(){ +_384(this,_398); +}); +},exists:function(jq,_399){ +return _374(jq[0],_399); +},update:function(jq,_39a){ +return jq.each(function(){ +_368(this,_39a); +}); +},enableTab:function(jq,_39b){ +return jq.each(function(){ +var opts=$(this).tabs("getTab",_39b).panel("options"); +opts.tab.removeClass("tabs-disabled"); +opts.disabled=false; +}); +},disableTab:function(jq,_39c){ +return jq.each(function(){ +var opts=$(this).tabs("getTab",_39c).panel("options"); +opts.tab.addClass("tabs-disabled"); +opts.disabled=true; +}); +},showHeader:function(jq){ +return jq.each(function(){ +_38a(this,true); +}); +},hideHeader:function(jq){ +return jq.each(function(){ +_38a(this,false); +}); +},showTool:function(jq){ +return jq.each(function(){ +_38d(this,true); +}); +},hideTool:function(jq){ +return jq.each(function(){ +_38d(this,false); +}); +},scrollBy:function(jq,_39d){ +return jq.each(function(){ +var opts=$(this).tabs("options"); +var wrap=$(this).find(">div.tabs-header>div.tabs-wrap"); +var pos=Math.min(wrap._scrollLeft()+_39d,_39e()); +wrap.animate({scrollLeft:pos},opts.scrollDuration); +function _39e(){ +var w=0; +var ul=wrap.children("ul"); +ul.children("li").each(function(){ +w+=$(this).outerWidth(true); +}); +return w-wrap.width()+(ul.outerWidth()-ul.width()); +}; +}); +}}; +$.fn.tabs.parseOptions=function(_39f){ +return $.extend({},$.parser.parseOptions(_39f,["tools","toolPosition","tabPosition",{fit:"boolean",border:"boolean",plain:"boolean"},{headerWidth:"number",tabWidth:"number",tabHeight:"number",selected:"number"},{showHeader:"boolean",justified:"boolean",narrow:"boolean",pill:"boolean"}])); +}; +$.fn.tabs.defaults={width:"auto",height:"auto",headerWidth:150,tabWidth:"auto",tabHeight:27,selected:0,showHeader:true,plain:false,fit:false,border:true,justified:false,narrow:false,pill:false,tools:null,toolPosition:"right",tabPosition:"top",scrollIncrement:100,scrollDuration:400,onLoad:function(_3a0){ +},onSelect:function(_3a1,_3a2){ +},onUnselect:function(_3a3,_3a4){ +},onBeforeClose:function(_3a5,_3a6){ +},onClose:function(_3a7,_3a8){ +},onAdd:function(_3a9,_3aa){ +},onUpdate:function(_3ab,_3ac){ +},onContextMenu:function(e,_3ad,_3ae){ +}}; +})(jQuery); +(function($){ +var _3af=false; +function _3b0(_3b1,_3b2){ +var _3b3=$.data(_3b1,"layout"); +var opts=_3b3.options; +var _3b4=_3b3.panels; +var cc=$(_3b1); +if(_3b2){ +$.extend(opts,{width:_3b2.width,height:_3b2.height}); +} +if(_3b1.tagName.toLowerCase()=="body"){ +cc._size("fit"); +}else{ +cc._size(opts); +} +var cpos={top:0,left:0,width:cc.width(),height:cc.height()}; +_3b5(_3b6(_3b4.expandNorth)?_3b4.expandNorth:_3b4.north,"n"); +_3b5(_3b6(_3b4.expandSouth)?_3b4.expandSouth:_3b4.south,"s"); +_3b7(_3b6(_3b4.expandEast)?_3b4.expandEast:_3b4.east,"e"); +_3b7(_3b6(_3b4.expandWest)?_3b4.expandWest:_3b4.west,"w"); +_3b4.center.panel("resize",cpos); +function _3b5(pp,type){ +if(!pp.length||!_3b6(pp)){ +return; +} +var opts=pp.panel("options"); +pp.panel("resize",{width:cc.width(),height:opts.height}); +var _3b8=pp.panel("panel").outerHeight(); +pp.panel("move",{left:0,top:(type=="n"?0:cc.height()-_3b8)}); +cpos.height-=_3b8; +if(type=="n"){ +cpos.top+=_3b8; +if(!opts.split&&opts.border){ +cpos.top--; +} +} +if(!opts.split&&opts.border){ +cpos.height++; +} +}; +function _3b7(pp,type){ +if(!pp.length||!_3b6(pp)){ +return; +} +var opts=pp.panel("options"); +pp.panel("resize",{width:opts.width,height:cpos.height}); +var _3b9=pp.panel("panel").outerWidth(); +pp.panel("move",{left:(type=="e"?cc.width()-_3b9:0),top:cpos.top}); +cpos.width-=_3b9; +if(type=="w"){ +cpos.left+=_3b9; +if(!opts.split&&opts.border){ +cpos.left--; +} +} +if(!opts.split&&opts.border){ +cpos.width++; +} +}; +}; +function init(_3ba){ +var cc=$(_3ba); +cc.addClass("layout"); +function _3bb(el){ +var _3bc=$.fn.layout.parsePanelOptions(el); +if("north,south,east,west,center".indexOf(_3bc.region)>=0){ +_3bf(_3ba,_3bc,el); +} +}; +var opts=cc.layout("options"); +var _3bd=opts.onAdd; +opts.onAdd=function(){ +}; +cc.find(">div,>form>div").each(function(){ +_3bb(this); +}); +opts.onAdd=_3bd; +cc.append("
        "); +cc.bind("_resize",function(e,_3be){ +if($(this).hasClass("easyui-fluid")||_3be){ +_3b0(_3ba); +} +return false; +}); +}; +function _3bf(_3c0,_3c1,el){ +_3c1.region=_3c1.region||"center"; +var _3c2=$.data(_3c0,"layout").panels; +var cc=$(_3c0); +var dir=_3c1.region; +if(_3c2[dir].length){ +return; +} +var pp=$(el); +if(!pp.length){ +pp=$("
        ").appendTo(cc); +} +var _3c3=$.extend({},$.fn.layout.paneldefaults,{width:(pp.length?parseInt(pp[0].style.width)||pp.outerWidth():"auto"),height:(pp.length?parseInt(pp[0].style.height)||pp.outerHeight():"auto"),doSize:false,collapsible:true,onOpen:function(){ +var tool=$(this).panel("header").children("div.panel-tool"); +tool.children("a.panel-tool-collapse").hide(); +var _3c4={north:"up",south:"down",east:"right",west:"left"}; +if(!_3c4[dir]){ +return; +} +var _3c5="layout-button-"+_3c4[dir]; +var t=tool.children("a."+_3c5); +if(!t.length){ +t=$("").addClass(_3c5).appendTo(tool); +t.bind("click",{dir:dir},function(e){ +_3dc(_3c0,e.data.dir); +return false; +}); +} +$(this).panel("options").collapsible?t.show():t.hide(); +}},_3c1,{cls:((_3c1.cls||"")+" layout-panel layout-panel-"+dir),bodyCls:((_3c1.bodyCls||"")+" layout-body")}); +pp.panel(_3c3); +_3c2[dir]=pp; +var _3c6={north:"s",south:"n",east:"w",west:"e"}; +var _3c7=pp.panel("panel"); +if(pp.panel("options").split){ +_3c7.addClass("layout-split-"+dir); +} +_3c7.resizable($.extend({},{handles:(_3c6[dir]||""),disabled:(!pp.panel("options").split),onStartResize:function(e){ +_3af=true; +if(dir=="north"||dir=="south"){ +var _3c8=$(">div.layout-split-proxy-v",_3c0); +}else{ +var _3c8=$(">div.layout-split-proxy-h",_3c0); +} +var top=0,left=0,_3c9=0,_3ca=0; +var pos={display:"block"}; +if(dir=="north"){ +pos.top=parseInt(_3c7.css("top"))+_3c7.outerHeight()-_3c8.height(); +pos.left=parseInt(_3c7.css("left")); +pos.width=_3c7.outerWidth(); +pos.height=_3c8.height(); +}else{ +if(dir=="south"){ +pos.top=parseInt(_3c7.css("top")); +pos.left=parseInt(_3c7.css("left")); +pos.width=_3c7.outerWidth(); +pos.height=_3c8.height(); +}else{ +if(dir=="east"){ +pos.top=parseInt(_3c7.css("top"))||0; +pos.left=parseInt(_3c7.css("left"))||0; +pos.width=_3c8.width(); +pos.height=_3c7.outerHeight(); +}else{ +if(dir=="west"){ +pos.top=parseInt(_3c7.css("top"))||0; +pos.left=_3c7.outerWidth()-_3c8.width(); +pos.width=_3c8.width(); +pos.height=_3c7.outerHeight(); +} +} +} +} +_3c8.css(pos); +$("
        ").css({left:0,top:0,width:cc.width(),height:cc.height()}).appendTo(cc); +},onResize:function(e){ +if(dir=="north"||dir=="south"){ +var _3cb=_3cc(this); +$(this).resizable("options").maxHeight=_3cb; +var _3cd=$(">div.layout-split-proxy-v",_3c0); +var top=dir=="north"?e.data.height-_3cd.height():$(_3c0).height()-e.data.height; +_3cd.css("top",top); +}else{ +var _3ce=_3cc(this); +$(this).resizable("options").maxWidth=_3ce; +var _3cd=$(">div.layout-split-proxy-h",_3c0); +var left=dir=="west"?e.data.width-_3cd.width():$(_3c0).width()-e.data.width; +_3cd.css("left",left); +} +return false; +},onStopResize:function(e){ +cc.children("div.layout-split-proxy-v,div.layout-split-proxy-h").hide(); +pp.panel("resize",e.data); +_3b0(_3c0); +_3af=false; +cc.find(">div.layout-mask").remove(); +}},_3c1)); +cc.layout("options").onAdd.call(_3c0,dir); +function _3cc(p){ +var _3cf="expand"+dir.substring(0,1).toUpperCase()+dir.substring(1); +var _3d0=_3c2["center"]; +var _3d1=(dir=="north"||dir=="south")?"minHeight":"minWidth"; +var _3d2=(dir=="north"||dir=="south")?"maxHeight":"maxWidth"; +var _3d3=(dir=="north"||dir=="south")?"_outerHeight":"_outerWidth"; +var _3d4=$.parser.parseValue(_3d2,_3c2[dir].panel("options")[_3d2],$(_3c0)); +var _3d5=$.parser.parseValue(_3d1,_3d0.panel("options")[_3d1],$(_3c0)); +var _3d6=_3d0.panel("panel")[_3d3]()-_3d5; +if(_3b6(_3c2[_3cf])){ +_3d6+=_3c2[_3cf][_3d3]()-1; +}else{ +_3d6+=$(p)[_3d3](); +} +if(_3d6>_3d4){ +_3d6=_3d4; +} +return _3d6; +}; +}; +function _3d7(_3d8,_3d9){ +var _3da=$.data(_3d8,"layout").panels; +if(_3da[_3d9].length){ +_3da[_3d9].panel("destroy"); +_3da[_3d9]=$(); +var _3db="expand"+_3d9.substring(0,1).toUpperCase()+_3d9.substring(1); +if(_3da[_3db]){ +_3da[_3db].panel("destroy"); +_3da[_3db]=undefined; +} +$(_3d8).layout("options").onRemove.call(_3d8,_3d9); +} +}; +function _3dc(_3dd,_3de,_3df){ +if(_3df==undefined){ +_3df="normal"; +} +var _3e0=$.data(_3dd,"layout").panels; +var p=_3e0[_3de]; +var _3e1=p.panel("options"); +if(_3e1.onBeforeCollapse.call(p)==false){ +return; +} +var _3e2="expand"+_3de.substring(0,1).toUpperCase()+_3de.substring(1); +if(!_3e0[_3e2]){ +_3e0[_3e2]=_3e3(_3de); +var ep=_3e0[_3e2].panel("panel"); +if(!_3e1.expandMode){ +ep.css("cursor","default"); +}else{ +ep.bind("click",function(){ +if(_3e1.expandMode=="dock"){ +_3ef(_3dd,_3de); +}else{ +p.panel("expand",false).panel("open"); +var _3e4=_3e5(); +p.panel("resize",_3e4.collapse); +p.panel("panel").animate(_3e4.expand,function(){ +$(this).unbind(".layout").bind("mouseleave.layout",{region:_3de},function(e){ +if(_3af==true){ +return; +} +if($("body>div.combo-p>div.combo-panel:visible").length){ +return; +} +_3dc(_3dd,e.data.region); +}); +$(_3dd).layout("options").onExpand.call(_3dd,_3de); +}); +} +return false; +}); +} +} +var _3e6=_3e5(); +if(!_3b6(_3e0[_3e2])){ +_3e0.center.panel("resize",_3e6.resizeC); +} +p.panel("panel").animate(_3e6.collapse,_3df,function(){ +p.panel("collapse",false).panel("close"); +_3e0[_3e2].panel("open").panel("resize",_3e6.expandP); +$(this).unbind(".layout"); +$(_3dd).layout("options").onCollapse.call(_3dd,_3de); +}); +function _3e3(dir){ +var _3e7={"east":"left","west":"right","north":"down","south":"up"}; +var isns=(_3e1.region=="north"||_3e1.region=="south"); +var icon="layout-button-"+_3e7[dir]; +var p=$("
        ").appendTo(_3dd); +p.panel($.extend({},$.fn.layout.paneldefaults,{cls:("layout-expand layout-expand-"+dir),title:" ",titleDirection:_3e1.titleDirection,iconCls:(_3e1.hideCollapsedContent?null:_3e1.iconCls),closed:true,minWidth:0,minHeight:0,doSize:false,region:_3e1.region,collapsedSize:_3e1.collapsedSize,noheader:(!isns&&_3e1.hideExpandTool),tools:((isns&&_3e1.hideExpandTool)?null:[{iconCls:icon,handler:function(){ +_3ef(_3dd,_3de); +return false; +}}]),onResize:function(){ +var _3e8=$(this).children(".layout-expand-title"); +if(_3e8.length){ +_3e8._outerWidth($(this).height()); +var left=($(this).width()-Math.min(_3e8._outerWidth(),_3e8._outerHeight()))/2; +var top=Math.max(_3e8._outerWidth(),_3e8._outerHeight()); +if(_3e8.hasClass("layout-expand-title-down")){ +left+=Math.min(_3e8._outerWidth(),_3e8._outerHeight()); +top=0; +} +_3e8.css({left:(left+"px"),top:(top+"px")}); +} +}})); +if(!_3e1.hideCollapsedContent){ +var _3e9=typeof _3e1.collapsedContent=="function"?_3e1.collapsedContent.call(p[0],_3e1.title):_3e1.collapsedContent; +isns?p.panel("setTitle",_3e9):p.html(_3e9); +} +p.panel("panel").hover(function(){ +$(this).addClass("layout-expand-over"); +},function(){ +$(this).removeClass("layout-expand-over"); +}); +return p; +}; +function _3e5(){ +var cc=$(_3dd); +var _3ea=_3e0.center.panel("options"); +var _3eb=_3e1.collapsedSize; +if(_3de=="east"){ +var _3ec=p.panel("panel")._outerWidth(); +var _3ed=_3ea.width+_3ec-_3eb; +if(_3e1.split||!_3e1.border){ +_3ed++; +} +return {resizeC:{width:_3ed},expand:{left:cc.width()-_3ec},expandP:{top:_3ea.top,left:cc.width()-_3eb,width:_3eb,height:_3ea.height},collapse:{left:cc.width(),top:_3ea.top,height:_3ea.height}}; +}else{ +if(_3de=="west"){ +var _3ec=p.panel("panel")._outerWidth(); +var _3ed=_3ea.width+_3ec-_3eb; +if(_3e1.split||!_3e1.border){ +_3ed++; +} +return {resizeC:{width:_3ed,left:_3eb-1},expand:{left:0},expandP:{left:0,top:_3ea.top,width:_3eb,height:_3ea.height},collapse:{left:-_3ec,top:_3ea.top,height:_3ea.height}}; +}else{ +if(_3de=="north"){ +var _3ee=p.panel("panel")._outerHeight(); +var hh=_3ea.height; +if(!_3b6(_3e0.expandNorth)){ +hh+=_3ee-_3eb+((_3e1.split||!_3e1.border)?1:0); +} +_3e0.east.add(_3e0.west).add(_3e0.expandEast).add(_3e0.expandWest).panel("resize",{top:_3eb-1,height:hh}); +return {resizeC:{top:_3eb-1,height:hh},expand:{top:0},expandP:{top:0,left:0,width:cc.width(),height:_3eb},collapse:{top:-_3ee,width:cc.width()}}; +}else{ +if(_3de=="south"){ +var _3ee=p.panel("panel")._outerHeight(); +var hh=_3ea.height; +if(!_3b6(_3e0.expandSouth)){ +hh+=_3ee-_3eb+((_3e1.split||!_3e1.border)?1:0); +} +_3e0.east.add(_3e0.west).add(_3e0.expandEast).add(_3e0.expandWest).panel("resize",{height:hh}); +return {resizeC:{height:hh},expand:{top:cc.height()-_3ee},expandP:{top:cc.height()-_3eb,left:0,width:cc.width(),height:_3eb},collapse:{top:cc.height(),width:cc.width()}}; +} +} +} +} +}; +}; +function _3ef(_3f0,_3f1){ +var _3f2=$.data(_3f0,"layout").panels; +var p=_3f2[_3f1]; +var _3f3=p.panel("options"); +if(_3f3.onBeforeExpand.call(p)==false){ +return; +} +var _3f4="expand"+_3f1.substring(0,1).toUpperCase()+_3f1.substring(1); +if(_3f2[_3f4]){ +_3f2[_3f4].panel("close"); +p.panel("panel").stop(true,true); +p.panel("expand",false).panel("open"); +var _3f5=_3f6(); +p.panel("resize",_3f5.collapse); +p.panel("panel").animate(_3f5.expand,function(){ +_3b0(_3f0); +$(_3f0).layout("options").onExpand.call(_3f0,_3f1); +}); +} +function _3f6(){ +var cc=$(_3f0); +var _3f7=_3f2.center.panel("options"); +if(_3f1=="east"&&_3f2.expandEast){ +return {collapse:{left:cc.width(),top:_3f7.top,height:_3f7.height},expand:{left:cc.width()-p.panel("panel")._outerWidth()}}; +}else{ +if(_3f1=="west"&&_3f2.expandWest){ +return {collapse:{left:-p.panel("panel")._outerWidth(),top:_3f7.top,height:_3f7.height},expand:{left:0}}; +}else{ +if(_3f1=="north"&&_3f2.expandNorth){ +return {collapse:{top:-p.panel("panel")._outerHeight(),width:cc.width()},expand:{top:0}}; +}else{ +if(_3f1=="south"&&_3f2.expandSouth){ +return {collapse:{top:cc.height(),width:cc.width()},expand:{top:cc.height()-p.panel("panel")._outerHeight()}}; +} +} +} +} +}; +}; +function _3b6(pp){ +if(!pp){ +return false; +} +if(pp.length){ +return pp.panel("panel").is(":visible"); +}else{ +return false; +} +}; +function _3f8(_3f9){ +var _3fa=$.data(_3f9,"layout"); +var opts=_3fa.options; +var _3fb=_3fa.panels; +var _3fc=opts.onCollapse; +opts.onCollapse=function(){ +}; +_3fd("east"); +_3fd("west"); +_3fd("north"); +_3fd("south"); +opts.onCollapse=_3fc; +function _3fd(_3fe){ +var p=_3fb[_3fe]; +if(p.length&&p.panel("options").collapsed){ +_3dc(_3f9,_3fe,0); +} +}; +}; +function _3ff(_400,_401,_402){ +var p=$(_400).layout("panel",_401); +p.panel("options").split=_402; +var cls="layout-split-"+_401; +var _403=p.panel("panel").removeClass(cls); +if(_402){ +_403.addClass(cls); +} +_403.resizable({disabled:(!_402)}); +_3b0(_400); +}; +$.fn.layout=function(_404,_405){ +if(typeof _404=="string"){ +return $.fn.layout.methods[_404](this,_405); +} +_404=_404||{}; +return this.each(function(){ +var _406=$.data(this,"layout"); +if(_406){ +$.extend(_406.options,_404); +}else{ +var opts=$.extend({},$.fn.layout.defaults,$.fn.layout.parseOptions(this),_404); +$.data(this,"layout",{options:opts,panels:{center:$(),north:$(),south:$(),east:$(),west:$()}}); +init(this); +} +_3b0(this); +_3f8(this); +}); +}; +$.fn.layout.methods={options:function(jq){ +return $.data(jq[0],"layout").options; +},resize:function(jq,_407){ +return jq.each(function(){ +_3b0(this,_407); +}); +},panel:function(jq,_408){ +return $.data(jq[0],"layout").panels[_408]; +},collapse:function(jq,_409){ +return jq.each(function(){ +_3dc(this,_409); +}); +},expand:function(jq,_40a){ +return jq.each(function(){ +_3ef(this,_40a); +}); +},add:function(jq,_40b){ +return jq.each(function(){ +_3bf(this,_40b); +_3b0(this); +if($(this).layout("panel",_40b.region).panel("options").collapsed){ +_3dc(this,_40b.region,0); +} +}); +},remove:function(jq,_40c){ +return jq.each(function(){ +_3d7(this,_40c); +_3b0(this); +}); +},split:function(jq,_40d){ +return jq.each(function(){ +_3ff(this,_40d,true); +}); +},unsplit:function(jq,_40e){ +return jq.each(function(){ +_3ff(this,_40e,false); +}); +}}; +$.fn.layout.parseOptions=function(_40f){ +return $.extend({},$.parser.parseOptions(_40f,[{fit:"boolean"}])); +}; +$.fn.layout.defaults={fit:false,onExpand:function(_410){ +},onCollapse:function(_411){ +},onAdd:function(_412){ +},onRemove:function(_413){ +}}; +$.fn.layout.parsePanelOptions=function(_414){ +var t=$(_414); +return $.extend({},$.fn.panel.parseOptions(_414),$.parser.parseOptions(_414,["region",{split:"boolean",collpasedSize:"number",minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number"}])); +}; +$.fn.layout.paneldefaults=$.extend({},$.fn.panel.defaults,{region:null,split:false,collapsedSize:28,expandMode:"float",hideExpandTool:false,hideCollapsedContent:true,collapsedContent:function(_415){ +var p=$(this); +var opts=p.panel("options"); +if(opts.region=="north"||opts.region=="south"){ +return _415; +} +var cc=[]; +if(opts.iconCls){ +cc.push("
        "); +} +cc.push("
        "); +cc.push(_415); +cc.push("
        "); +return cc.join(""); +},minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000}); +})(jQuery); +(function($){ +$(function(){ +$(document).unbind(".menu").bind("mousedown.menu",function(e){ +var m=$(e.target).closest("div.menu,div.combo-p"); +if(m.length){ +return; +} +$("body>div.menu-top:visible").not(".menu-inline").menu("hide"); +_416($("body>div.menu:visible").not(".menu-inline")); +}); +}); +function init(_417){ +var opts=$.data(_417,"menu").options; +$(_417).addClass("menu-top"); +opts.inline?$(_417).addClass("menu-inline"):$(_417).appendTo("body"); +$(_417).bind("_resize",function(e,_418){ +if($(this).hasClass("easyui-fluid")||_418){ +$(_417).menu("resize",_417); +} +return false; +}); +var _419=_41a($(_417)); +for(var i=0;i<_419.length;i++){ +_41d(_417,_419[i]); +} +function _41a(menu){ +var _41b=[]; +menu.addClass("menu"); +_41b.push(menu); +if(!menu.hasClass("menu-content")){ +menu.children("div").each(function(){ +var _41c=$(this).children("div"); +if(_41c.length){ +_41c.appendTo("body"); +this.submenu=_41c; +var mm=_41a(_41c); +_41b=_41b.concat(mm); +} +}); +} +return _41b; +}; +}; +function _41d(_41e,div){ +var menu=$(div).addClass("menu"); +if(!menu.data("menu")){ +menu.data("menu",{options:$.parser.parseOptions(menu[0],["width","height"])}); +} +if(!menu.hasClass("menu-content")){ +menu.children("div").each(function(){ +_41f(_41e,this); +}); +$("
        ").prependTo(menu); +} +_420(_41e,menu); +if(!menu.hasClass("menu-inline")){ +menu.hide(); +} +_421(_41e,menu); +}; +function _41f(_422,div,_423){ +var item=$(div); +var _424=$.extend({},$.parser.parseOptions(item[0],["id","name","iconCls","href",{separator:"boolean"}]),{disabled:(item.attr("disabled")?true:undefined),text:$.trim(item.html()),onclick:item[0].onclick},_423||{}); +_424.onclick=_424.onclick||_424.handler||null; +item.data("menuitem",{options:_424}); +if(_424.separator){ +item.addClass("menu-sep"); +} +if(!item.hasClass("menu-sep")){ +item.addClass("menu-item"); +item.empty().append($("
        ").html(_424.text)); +if(_424.iconCls){ +$("
        ").addClass(_424.iconCls).appendTo(item); +} +if(_424.id){ +item.attr("id",_424.id); +} +if(_424.onclick){ +if(typeof _424.onclick=="string"){ +item.attr("onclick",_424.onclick); +}else{ +item[0].onclick=eval(_424.onclick); +} +} +if(_424.disabled){ +_425(_422,item[0],true); +} +if(item[0].submenu){ +$("
        ").appendTo(item); +} +} +}; +function _420(_426,menu){ +var opts=$.data(_426,"menu").options; +var _427=menu.attr("style")||""; +var _428=menu.is(":visible"); +menu.css({display:"block",left:-10000,height:"auto",overflow:"hidden"}); +menu.find(".menu-item").each(function(){ +$(this)._outerHeight(opts.itemHeight); +$(this).find(".menu-text").css({height:(opts.itemHeight-2)+"px",lineHeight:(opts.itemHeight-2)+"px"}); +}); +menu.removeClass("menu-noline").addClass(opts.noline?"menu-noline":""); +var _429=menu.data("menu").options; +var _42a=_429.width; +var _42b=_429.height; +if(isNaN(parseInt(_42a))){ +_42a=0; +menu.find("div.menu-text").each(function(){ +if(_42a<$(this).outerWidth()){ +_42a=$(this).outerWidth(); +} +}); +_42a=_42a?_42a+40:""; +} +var _42c=menu.outerHeight(); +if(isNaN(parseInt(_42b))){ +_42b=_42c; +if(menu.hasClass("menu-top")&&opts.alignTo){ +var at=$(opts.alignTo); +var h1=at.offset().top-$(document).scrollTop(); +var h2=$(window)._outerHeight()+$(document).scrollTop()-at.offset().top-at._outerHeight(); +_42b=Math.min(_42b,Math.max(h1,h2)); +}else{ +if(_42b>$(window)._outerHeight()){ +_42b=$(window).height(); +} +} +} +menu.attr("style",_427); +menu.show(); +menu._size($.extend({},_429,{width:_42a,height:_42b,minWidth:_429.minWidth||opts.minWidth,maxWidth:_429.maxWidth||opts.maxWidth})); +menu.find(".easyui-fluid").triggerHandler("_resize",[true]); +menu.css("overflow",menu.outerHeight()<_42c?"auto":"hidden"); +menu.children("div.menu-line")._outerHeight(_42c-2); +if(!_428){ +menu.hide(); +} +}; +function _421(_42d,menu){ +var _42e=$.data(_42d,"menu"); +var opts=_42e.options; +menu.unbind(".menu"); +for(var _42f in opts.events){ +menu.bind(_42f+".menu",{target:_42d},opts.events[_42f]); +} +}; +function _430(e){ +var _431=e.data.target; +var _432=$.data(_431,"menu"); +if(_432.timer){ +clearTimeout(_432.timer); +_432.timer=null; +} +}; +function _433(e){ +var _434=e.data.target; +var _435=$.data(_434,"menu"); +if(_435.options.hideOnUnhover){ +_435.timer=setTimeout(function(){ +_436(_434,$(_434).hasClass("menu-inline")); +},_435.options.duration); +} +}; +function _437(e){ +var _438=e.data.target; +var item=$(e.target).closest(".menu-item"); +if(item.length){ +item.siblings().each(function(){ +if(this.submenu){ +_416(this.submenu); +} +$(this).removeClass("menu-active"); +}); +item.addClass("menu-active"); +if(item.hasClass("menu-item-disabled")){ +item.addClass("menu-active-disabled"); +return; +} +var _439=item[0].submenu; +if(_439){ +$(_438).menu("show",{menu:_439,parent:item}); +} +} +}; +function _43a(e){ +var item=$(e.target).closest(".menu-item"); +if(item.length){ +item.removeClass("menu-active menu-active-disabled"); +var _43b=item[0].submenu; +if(_43b){ +if(e.pageX>=parseInt(_43b.css("left"))){ +item.addClass("menu-active"); +}else{ +_416(_43b); +} +}else{ +item.removeClass("menu-active"); +} +} +}; +function _43c(e){ +var _43d=e.data.target; +var item=$(e.target).closest(".menu-item"); +if(item.length){ +var opts=$(_43d).data("menu").options; +var _43e=item.data("menuitem").options; +if(_43e.disabled){ +return; +} +if(!item[0].submenu){ +_436(_43d,opts.inline); +if(_43e.href){ +location.href=_43e.href; +} +} +item.trigger("mouseenter"); +opts.onClick.call(_43d,$(_43d).menu("getItem",item[0])); +} +}; +function _436(_43f,_440){ +var _441=$.data(_43f,"menu"); +if(_441){ +if($(_43f).is(":visible")){ +_416($(_43f)); +if(_440){ +$(_43f).show(); +}else{ +_441.options.onHide.call(_43f); +} +} +} +return false; +}; +function _442(_443,_444){ +_444=_444||{}; +var left,top; +var opts=$.data(_443,"menu").options; +var menu=$(_444.menu||_443); +$(_443).menu("resize",menu[0]); +if(menu.hasClass("menu-top")){ +$.extend(opts,_444); +left=opts.left; +top=opts.top; +if(opts.alignTo){ +var at=$(opts.alignTo); +left=at.offset().left; +top=at.offset().top+at._outerHeight(); +if(opts.align=="right"){ +left+=at.outerWidth()-menu.outerWidth(); +} +} +if(left+menu.outerWidth()>$(window)._outerWidth()+$(document)._scrollLeft()){ +left=$(window)._outerWidth()+$(document).scrollLeft()-menu.outerWidth()-5; +} +if(left<0){ +left=0; +} +top=_445(top,opts.alignTo); +}else{ +var _446=_444.parent; +left=_446.offset().left+_446.outerWidth()-2; +if(left+menu.outerWidth()+5>$(window)._outerWidth()+$(document).scrollLeft()){ +left=_446.offset().left-menu.outerWidth()+2; +} +top=_445(_446.offset().top-3); +} +function _445(top,_447){ +if(top+menu.outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){ +if(_447){ +top=$(_447).offset().top-menu._outerHeight(); +}else{ +top=$(window)._outerHeight()+$(document).scrollTop()-menu.outerHeight(); +} +} +if(top<0){ +top=0; +} +return top; +}; +menu.css(opts.position.call(_443,menu[0],left,top)); +menu.show(0,function(){ +if(!menu[0].shadow){ +menu[0].shadow=$("
        ").insertAfter(menu); +} +menu[0].shadow.css({display:(menu.hasClass("menu-inline")?"none":"block"),zIndex:$.fn.menu.defaults.zIndex++,left:menu.css("left"),top:menu.css("top"),width:menu.outerWidth(),height:menu.outerHeight()}); +menu.css("z-index",$.fn.menu.defaults.zIndex++); +if(menu.hasClass("menu-top")){ +opts.onShow.call(_443); +} +}); +}; +function _416(menu){ +if(menu&&menu.length){ +_448(menu); +menu.find("div.menu-item").each(function(){ +if(this.submenu){ +_416(this.submenu); +} +$(this).removeClass("menu-active"); +}); +} +function _448(m){ +m.stop(true,true); +if(m[0].shadow){ +m[0].shadow.hide(); +} +m.hide(); +}; +}; +function _449(_44a,text){ +var _44b=null; +var tmp=$("
        "); +function find(menu){ +menu.children("div.menu-item").each(function(){ +var item=$(_44a).menu("getItem",this); +var s=tmp.empty().html(item.text).text(); +if(text==$.trim(s)){ +_44b=item; +}else{ +if(this.submenu&&!_44b){ +find(this.submenu); +} +} +}); +}; +find($(_44a)); +tmp.remove(); +return _44b; +}; +function _425(_44c,_44d,_44e){ +var t=$(_44d); +if(t.hasClass("menu-item")){ +var opts=t.data("menuitem").options; +opts.disabled=_44e; +if(_44e){ +t.addClass("menu-item-disabled"); +t[0].onclick=null; +}else{ +t.removeClass("menu-item-disabled"); +t[0].onclick=opts.onclick; +} +} +}; +function _44f(_450,_451){ +var opts=$.data(_450,"menu").options; +var menu=$(_450); +if(_451.parent){ +if(!_451.parent.submenu){ +var _452=$("
        ").appendTo("body"); +_451.parent.submenu=_452; +$("
        ").appendTo(_451.parent); +_41d(_450,_452); +} +menu=_451.parent.submenu; +} +var div=$("
        ").appendTo(menu); +_41f(_450,div,_451); +}; +function _453(_454,_455){ +function _456(el){ +if(el.submenu){ +el.submenu.children("div.menu-item").each(function(){ +_456(this); +}); +var _457=el.submenu[0].shadow; +if(_457){ +_457.remove(); +} +el.submenu.remove(); +} +$(el).remove(); +}; +_456(_455); +}; +function _458(_459,_45a,_45b){ +var menu=$(_45a).parent(); +if(_45b){ +$(_45a).show(); +}else{ +$(_45a).hide(); +} +_420(_459,menu); +}; +function _45c(_45d){ +$(_45d).children("div.menu-item").each(function(){ +_453(_45d,this); +}); +if(_45d.shadow){ +_45d.shadow.remove(); +} +$(_45d).remove(); +}; +$.fn.menu=function(_45e,_45f){ +if(typeof _45e=="string"){ +return $.fn.menu.methods[_45e](this,_45f); +} +_45e=_45e||{}; +return this.each(function(){ +var _460=$.data(this,"menu"); +if(_460){ +$.extend(_460.options,_45e); +}else{ +_460=$.data(this,"menu",{options:$.extend({},$.fn.menu.defaults,$.fn.menu.parseOptions(this),_45e)}); +init(this); +} +$(this).css({left:_460.options.left,top:_460.options.top}); +}); +}; +$.fn.menu.methods={options:function(jq){ +return $.data(jq[0],"menu").options; +},show:function(jq,pos){ +return jq.each(function(){ +_442(this,pos); +}); +},hide:function(jq){ +return jq.each(function(){ +_436(this); +}); +},destroy:function(jq){ +return jq.each(function(){ +_45c(this); +}); +},setText:function(jq,_461){ +return jq.each(function(){ +var item=$(_461.target).data("menuitem").options; +item.text=_461.text; +$(_461.target).children("div.menu-text").html(_461.text); +}); +},setIcon:function(jq,_462){ +return jq.each(function(){ +var item=$(_462.target).data("menuitem").options; +item.iconCls=_462.iconCls; +$(_462.target).children("div.menu-icon").remove(); +if(_462.iconCls){ +$("
        ").addClass(_462.iconCls).appendTo(_462.target); +} +}); +},getItem:function(jq,_463){ +var item=$(_463).data("menuitem").options; +return $.extend({},item,{target:$(_463)[0]}); +},findItem:function(jq,text){ +return _449(jq[0],text); +},appendItem:function(jq,_464){ +return jq.each(function(){ +_44f(this,_464); +}); +},removeItem:function(jq,_465){ +return jq.each(function(){ +_453(this,_465); +}); +},enableItem:function(jq,_466){ +return jq.each(function(){ +_425(this,_466,false); +}); +},disableItem:function(jq,_467){ +return jq.each(function(){ +_425(this,_467,true); +}); +},showItem:function(jq,_468){ +return jq.each(function(){ +_458(this,_468,true); +}); +},hideItem:function(jq,_469){ +return jq.each(function(){ +_458(this,_469,false); +}); +},resize:function(jq,_46a){ +return jq.each(function(){ +_420(this,_46a?$(_46a):$(this)); +}); +}}; +$.fn.menu.parseOptions=function(_46b){ +return $.extend({},$.parser.parseOptions(_46b,[{minWidth:"number",itemHeight:"number",duration:"number",hideOnUnhover:"boolean"},{fit:"boolean",inline:"boolean",noline:"boolean"}])); +}; +$.fn.menu.defaults={zIndex:110000,left:0,top:0,alignTo:null,align:"left",minWidth:120,itemHeight:22,duration:100,hideOnUnhover:true,inline:false,fit:false,noline:false,events:{mouseenter:_430,mouseleave:_433,mouseover:_437,mouseout:_43a,click:_43c},position:function(_46c,left,top){ +return {left:left,top:top}; +},onShow:function(){ +},onHide:function(){ +},onClick:function(item){ +}}; +})(jQuery); +(function($){ +function init(_46d){ +var opts=$.data(_46d,"menubutton").options; +var btn=$(_46d); +btn.linkbutton(opts); +if(opts.hasDownArrow){ +btn.removeClass(opts.cls.btn1+" "+opts.cls.btn2).addClass("m-btn"); +btn.removeClass("m-btn-small m-btn-medium m-btn-large").addClass("m-btn-"+opts.size); +var _46e=btn.find(".l-btn-left"); +$("").addClass(opts.cls.arrow).appendTo(_46e); +$("").addClass("m-btn-line").appendTo(_46e); +} +$(_46d).menubutton("resize"); +if(opts.menu){ +$(opts.menu).menu({duration:opts.duration}); +var _46f=$(opts.menu).menu("options"); +var _470=_46f.onShow; +var _471=_46f.onHide; +$.extend(_46f,{onShow:function(){ +var _472=$(this).menu("options"); +var btn=$(_472.alignTo); +var opts=btn.menubutton("options"); +btn.addClass((opts.plain==true)?opts.cls.btn2:opts.cls.btn1); +_470.call(this); +},onHide:function(){ +var _473=$(this).menu("options"); +var btn=$(_473.alignTo); +var opts=btn.menubutton("options"); +btn.removeClass((opts.plain==true)?opts.cls.btn2:opts.cls.btn1); +_471.call(this); +}}); +} +}; +function _474(_475){ +var opts=$.data(_475,"menubutton").options; +var btn=$(_475); +var t=btn.find("."+opts.cls.trigger); +if(!t.length){ +t=btn; +} +t.unbind(".menubutton"); +var _476=null; +t.bind("click.menubutton",function(){ +if(!_477()){ +_478(_475); +return false; +} +}).bind("mouseenter.menubutton",function(){ +if(!_477()){ +_476=setTimeout(function(){ +_478(_475); +},opts.duration); +return false; +} +}).bind("mouseleave.menubutton",function(){ +if(_476){ +clearTimeout(_476); +} +$(opts.menu).triggerHandler("mouseleave"); +}); +function _477(){ +return $(_475).linkbutton("options").disabled; +}; +}; +function _478(_479){ +var opts=$(_479).menubutton("options"); +if(opts.disabled||!opts.menu){ +return; +} +$("body>div.menu-top").menu("hide"); +var btn=$(_479); +var mm=$(opts.menu); +if(mm.length){ +mm.menu("options").alignTo=btn; +mm.menu("show",{alignTo:btn,align:opts.menuAlign}); +} +btn.blur(); +}; +$.fn.menubutton=function(_47a,_47b){ +if(typeof _47a=="string"){ +var _47c=$.fn.menubutton.methods[_47a]; +if(_47c){ +return _47c(this,_47b); +}else{ +return this.linkbutton(_47a,_47b); +} +} +_47a=_47a||{}; +return this.each(function(){ +var _47d=$.data(this,"menubutton"); +if(_47d){ +$.extend(_47d.options,_47a); +}else{ +$.data(this,"menubutton",{options:$.extend({},$.fn.menubutton.defaults,$.fn.menubutton.parseOptions(this),_47a)}); +$(this).removeAttr("disabled"); +} +init(this); +_474(this); +}); +}; +$.fn.menubutton.methods={options:function(jq){ +var _47e=jq.linkbutton("options"); +return $.extend($.data(jq[0],"menubutton").options,{toggle:_47e.toggle,selected:_47e.selected,disabled:_47e.disabled}); +},destroy:function(jq){ +return jq.each(function(){ +var opts=$(this).menubutton("options"); +if(opts.menu){ +$(opts.menu).menu("destroy"); +} +$(this).remove(); +}); +}}; +$.fn.menubutton.parseOptions=function(_47f){ +var t=$(_47f); +return $.extend({},$.fn.linkbutton.parseOptions(_47f),$.parser.parseOptions(_47f,["menu",{plain:"boolean",hasDownArrow:"boolean",duration:"number"}])); +}; +$.fn.menubutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,hasDownArrow:true,menu:null,menuAlign:"left",duration:100,cls:{btn1:"m-btn-active",btn2:"m-btn-plain-active",arrow:"m-btn-downarrow",trigger:"m-btn"}}); +})(jQuery); +(function($){ +function init(_480){ +var opts=$.data(_480,"splitbutton").options; +$(_480).menubutton(opts); +$(_480).addClass("s-btn"); +}; +$.fn.splitbutton=function(_481,_482){ +if(typeof _481=="string"){ +var _483=$.fn.splitbutton.methods[_481]; +if(_483){ +return _483(this,_482); +}else{ +return this.menubutton(_481,_482); +} +} +_481=_481||{}; +return this.each(function(){ +var _484=$.data(this,"splitbutton"); +if(_484){ +$.extend(_484.options,_481); +}else{ +$.data(this,"splitbutton",{options:$.extend({},$.fn.splitbutton.defaults,$.fn.splitbutton.parseOptions(this),_481)}); +$(this).removeAttr("disabled"); +} +init(this); +}); +}; +$.fn.splitbutton.methods={options:function(jq){ +var _485=jq.menubutton("options"); +var _486=$.data(jq[0],"splitbutton").options; +$.extend(_486,{disabled:_485.disabled,toggle:_485.toggle,selected:_485.selected}); +return _486; +}}; +$.fn.splitbutton.parseOptions=function(_487){ +var t=$(_487); +return $.extend({},$.fn.linkbutton.parseOptions(_487),$.parser.parseOptions(_487,["menu",{plain:"boolean",duration:"number"}])); +}; +$.fn.splitbutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,menu:null,duration:100,cls:{btn1:"m-btn-active s-btn-active",btn2:"m-btn-plain-active s-btn-plain-active",arrow:"m-btn-downarrow",trigger:"m-btn-line"}}); +})(jQuery); +(function($){ +function init(_488){ +var _489=$(""+""+""+""+""+""+""+"").insertAfter(_488); +var t=$(_488); +t.addClass("switchbutton-f").hide(); +var name=t.attr("name"); +if(name){ +t.removeAttr("name").attr("switchbuttonName",name); +_489.find(".switchbutton-value").attr("name",name); +} +_489.bind("_resize",function(e,_48a){ +if($(this).hasClass("easyui-fluid")||_48a){ +_48b(_488); +} +return false; +}); +return _489; +}; +function _48b(_48c,_48d){ +var _48e=$.data(_48c,"switchbutton"); +var opts=_48e.options; +var _48f=_48e.switchbutton; +if(_48d){ +$.extend(opts,_48d); +} +var _490=_48f.is(":visible"); +if(!_490){ +_48f.appendTo("body"); +} +_48f._size(opts); +var w=_48f.width(); +var h=_48f.height(); +var w=_48f.outerWidth(); +var h=_48f.outerHeight(); +var _491=parseInt(opts.handleWidth)||_48f.height(); +var _492=w*2-_491; +_48f.find(".switchbutton-inner").css({width:_492+"px",height:h+"px",lineHeight:h+"px"}); +_48f.find(".switchbutton-handle")._outerWidth(_491)._outerHeight(h).css({marginLeft:-_491/2+"px"}); +_48f.find(".switchbutton-on").css({width:(w-_491/2)+"px",textIndent:(opts.reversed?"":"-")+_491/2+"px"}); +_48f.find(".switchbutton-off").css({width:(w-_491/2)+"px",textIndent:(opts.reversed?"-":"")+_491/2+"px"}); +opts.marginWidth=w-_491; +_493(_48c,opts.checked,false); +if(!_490){ +_48f.insertAfter(_48c); +} +}; +function _494(_495){ +var _496=$.data(_495,"switchbutton"); +var opts=_496.options; +var _497=_496.switchbutton; +var _498=_497.find(".switchbutton-inner"); +var on=_498.find(".switchbutton-on").html(opts.onText); +var off=_498.find(".switchbutton-off").html(opts.offText); +var _499=_498.find(".switchbutton-handle").html(opts.handleText); +if(opts.reversed){ +off.prependTo(_498); +on.insertAfter(_499); +}else{ +on.prependTo(_498); +off.insertAfter(_499); +} +_497.find(".switchbutton-value")._propAttr("checked",opts.checked); +_497.removeClass("switchbutton-disabled").addClass(opts.disabled?"switchbutton-disabled":""); +_497.removeClass("switchbutton-reversed").addClass(opts.reversed?"switchbutton-reversed":""); +_493(_495,opts.checked); +_49a(_495,opts.readonly); +$(_495).switchbutton("setValue",opts.value); +}; +function _493(_49b,_49c,_49d){ +var _49e=$.data(_49b,"switchbutton"); +var opts=_49e.options; +opts.checked=_49c; +var _49f=_49e.switchbutton.find(".switchbutton-inner"); +var _4a0=_49f.find(".switchbutton-on"); +var _4a1=opts.reversed?(opts.checked?opts.marginWidth:0):(opts.checked?0:opts.marginWidth); +var dir=_4a0.css("float").toLowerCase(); +var css={}; +css["margin-"+dir]=-_4a1+"px"; +_49d?_49f.animate(css,200):_49f.css(css); +var _4a2=_49f.find(".switchbutton-value"); +var ck=_4a2.is(":checked"); +$(_49b).add(_4a2)._propAttr("checked",opts.checked); +if(ck!=opts.checked){ +opts.onChange.call(_49b,opts.checked); +} +}; +function _4a3(_4a4,_4a5){ +var _4a6=$.data(_4a4,"switchbutton"); +var opts=_4a6.options; +var _4a7=_4a6.switchbutton; +var _4a8=_4a7.find(".switchbutton-value"); +if(_4a5){ +opts.disabled=true; +$(_4a4).add(_4a8).attr("disabled","disabled"); +_4a7.addClass("switchbutton-disabled"); +}else{ +opts.disabled=false; +$(_4a4).add(_4a8).removeAttr("disabled"); +_4a7.removeClass("switchbutton-disabled"); +} +}; +function _49a(_4a9,mode){ +var _4aa=$.data(_4a9,"switchbutton"); +var opts=_4aa.options; +opts.readonly=mode==undefined?true:mode; +_4aa.switchbutton.removeClass("switchbutton-readonly").addClass(opts.readonly?"switchbutton-readonly":""); +}; +function _4ab(_4ac){ +var _4ad=$.data(_4ac,"switchbutton"); +var opts=_4ad.options; +_4ad.switchbutton.unbind(".switchbutton").bind("click.switchbutton",function(){ +if(!opts.disabled&&!opts.readonly){ +_493(_4ac,opts.checked?false:true,true); +} +}); +}; +$.fn.switchbutton=function(_4ae,_4af){ +if(typeof _4ae=="string"){ +return $.fn.switchbutton.methods[_4ae](this,_4af); +} +_4ae=_4ae||{}; +return this.each(function(){ +var _4b0=$.data(this,"switchbutton"); +if(_4b0){ +$.extend(_4b0.options,_4ae); +}else{ +_4b0=$.data(this,"switchbutton",{options:$.extend({},$.fn.switchbutton.defaults,$.fn.switchbutton.parseOptions(this),_4ae),switchbutton:init(this)}); +} +_4b0.options.originalChecked=_4b0.options.checked; +_494(this); +_48b(this); +_4ab(this); +}); +}; +$.fn.switchbutton.methods={options:function(jq){ +var _4b1=jq.data("switchbutton"); +return $.extend(_4b1.options,{value:_4b1.switchbutton.find(".switchbutton-value").val()}); +},resize:function(jq,_4b2){ +return jq.each(function(){ +_48b(this,_4b2); +}); +},enable:function(jq){ +return jq.each(function(){ +_4a3(this,false); +}); +},disable:function(jq){ +return jq.each(function(){ +_4a3(this,true); +}); +},readonly:function(jq,mode){ +return jq.each(function(){ +_49a(this,mode); +}); +},check:function(jq){ +return jq.each(function(){ +_493(this,true); +}); +},uncheck:function(jq){ +return jq.each(function(){ +_493(this,false); +}); +},clear:function(jq){ +return jq.each(function(){ +_493(this,false); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).switchbutton("options"); +_493(this,opts.originalChecked); +}); +},setValue:function(jq,_4b3){ +return jq.each(function(){ +$(this).val(_4b3); +$.data(this,"switchbutton").switchbutton.find(".switchbutton-value").val(_4b3); +}); +}}; +$.fn.switchbutton.parseOptions=function(_4b4){ +var t=$(_4b4); +return $.extend({},$.parser.parseOptions(_4b4,["onText","offText","handleText",{handleWidth:"number",reversed:"boolean"}]),{value:(t.val()||undefined),checked:(t.attr("checked")?true:undefined),disabled:(t.attr("disabled")?true:undefined),readonly:(t.attr("readonly")?true:undefined)}); +}; +$.fn.switchbutton.defaults={handleWidth:"auto",width:60,height:26,checked:false,disabled:false,readonly:false,reversed:false,onText:"ON",offText:"OFF",handleText:"",value:"on",onChange:function(_4b5){ +}}; +})(jQuery); +(function($){ +function init(_4b6){ +$(_4b6).addClass("validatebox-text"); +}; +function _4b7(_4b8){ +var _4b9=$.data(_4b8,"validatebox"); +_4b9.validating=false; +if(_4b9.vtimer){ +clearTimeout(_4b9.vtimer); +} +if(_4b9.ftimer){ +clearTimeout(_4b9.ftimer); +} +$(_4b8).tooltip("destroy"); +$(_4b8).unbind(); +$(_4b8).remove(); +}; +function _4ba(_4bb){ +var opts=$.data(_4bb,"validatebox").options; +$(_4bb).unbind(".validatebox"); +if(opts.novalidate||opts.disabled){ +return; +} +for(var _4bc in opts.events){ +$(_4bb).bind(_4bc+".validatebox",{target:_4bb},opts.events[_4bc]); +} +}; +function _4bd(e){ +var _4be=e.data.target; +var _4bf=$.data(_4be,"validatebox"); +var opts=_4bf.options; +if($(_4be).attr("readonly")){ +return; +} +_4bf.validating=true; +_4bf.value=opts.val(_4be); +(function(){ +if(!$(_4be).is(":visible")){ +_4bf.validating=false; +} +if(_4bf.validating){ +var _4c0=opts.val(_4be); +if(_4bf.value!=_4c0){ +_4bf.value=_4c0; +if(_4bf.vtimer){ +clearTimeout(_4bf.vtimer); +} +_4bf.vtimer=setTimeout(function(){ +$(_4be).validatebox("validate"); +},opts.delay); +}else{ +if(_4bf.message){ +opts.err(_4be,_4bf.message); +} +} +_4bf.ftimer=setTimeout(arguments.callee,opts.interval); +} +})(); +}; +function _4c1(e){ +var _4c2=e.data.target; +var _4c3=$.data(_4c2,"validatebox"); +var opts=_4c3.options; +_4c3.validating=false; +if(_4c3.vtimer){ +clearTimeout(_4c3.vtimer); +_4c3.vtimer=undefined; +} +if(_4c3.ftimer){ +clearTimeout(_4c3.ftimer); +_4c3.ftimer=undefined; +} +if(opts.validateOnBlur){ +setTimeout(function(){ +$(_4c2).validatebox("validate"); +},0); +} +opts.err(_4c2,_4c3.message,"hide"); +}; +function _4c4(e){ +var _4c5=e.data.target; +var _4c6=$.data(_4c5,"validatebox"); +_4c6.options.err(_4c5,_4c6.message,"show"); +}; +function _4c7(e){ +var _4c8=e.data.target; +var _4c9=$.data(_4c8,"validatebox"); +if(!_4c9.validating){ +_4c9.options.err(_4c8,_4c9.message,"hide"); +} +}; +function _4ca(_4cb,_4cc,_4cd){ +var _4ce=$.data(_4cb,"validatebox"); +var opts=_4ce.options; +var t=$(_4cb); +if(_4cd=="hide"||!_4cc){ +t.tooltip("hide"); +}else{ +if((t.is(":focus")&&_4ce.validating)||_4cd=="show"){ +t.tooltip($.extend({},opts.tipOptions,{content:_4cc,position:opts.tipPosition,deltaX:opts.deltaX,deltaY:opts.deltaY})).tooltip("show"); +} +} +}; +function _4cf(_4d0){ +var _4d1=$.data(_4d0,"validatebox"); +var opts=_4d1.options; +var box=$(_4d0); +opts.onBeforeValidate.call(_4d0); +var _4d2=_4d3(); +_4d2?box.removeClass("validatebox-invalid"):box.addClass("validatebox-invalid"); +opts.err(_4d0,_4d1.message); +opts.onValidate.call(_4d0,_4d2); +return _4d2; +function _4d4(msg){ +_4d1.message=msg; +}; +function _4d5(_4d6,_4d7){ +var _4d8=opts.val(_4d0); +var _4d9=/([a-zA-Z_]+)(.*)/.exec(_4d6); +var rule=opts.rules[_4d9[1]]; +if(rule&&_4d8){ +var _4da=_4d7||opts.validParams||eval(_4d9[2]); +if(!rule["validator"].call(_4d0,_4d8,_4da)){ +var _4db=rule["message"]; +if(_4da){ +for(var i=0;i<_4da.length;i++){ +_4db=_4db.replace(new RegExp("\\{"+i+"\\}","g"),_4da[i]); +} +} +_4d4(opts.invalidMessage||_4db); +return false; +} +} +return true; +}; +function _4d3(){ +_4d4(""); +if(!opts._validateOnCreate){ +setTimeout(function(){ +opts._validateOnCreate=true; +},0); +return true; +} +if(opts.novalidate||opts.disabled){ +return true; +} +if(opts.required){ +if(opts.val(_4d0)==""){ +_4d4(opts.missingMessage); +return false; +} +} +if(opts.validType){ +if($.isArray(opts.validType)){ +for(var i=0;i=_4ee[0]&&len<=_4ee[1]; +},message:"Please enter a value between {0} and {1}."},remote:{validator:function(_4ef,_4f0){ +var data={}; +data[_4f0[1]]=_4ef; +var _4f1=$.ajax({url:_4f0[0],dataType:"json",data:data,async:false,cache:false,type:"post"}).responseText; +return _4f1=="true"; +},message:"Please fix this field."}},onBeforeValidate:function(){ +},onValidate:function(_4f2){ +}}; +})(jQuery); +(function($){ +var _4f3=0; +function init(_4f4){ +$(_4f4).addClass("textbox-f").hide(); +var span=$(""+""+""+"").insertAfter(_4f4); +var name=$(_4f4).attr("name"); +if(name){ +span.find("input.textbox-value").attr("name",name); +$(_4f4).removeAttr("name").attr("textboxName",name); +} +return span; +}; +function _4f5(_4f6){ +var _4f7=$.data(_4f6,"textbox"); +var opts=_4f7.options; +var tb=_4f7.textbox; +var _4f8="_easyui_textbox_input"+(++_4f3); +tb.addClass(opts.cls); +tb.find(".textbox-text").remove(); +if(opts.multiline){ +$("").prependTo(tb); +}else{ +$("").prependTo(tb); +} +$("#"+_4f8).attr("tabindex",$(_4f6).attr("tabindex")||"").css("text-align",_4f6.style.textAlign||""); +tb.find(".textbox-addon").remove(); +var bb=opts.icons?$.extend(true,[],opts.icons):[]; +if(opts.iconCls){ +bb.push({iconCls:opts.iconCls,disabled:true}); +} +if(bb.length){ +var bc=$("").prependTo(tb); +bc.addClass("textbox-addon-"+opts.iconAlign); +for(var i=0;i"); +} +} +tb.find(".textbox-button").remove(); +if(opts.buttonText||opts.buttonIcon){ +var btn=$("").prependTo(tb); +btn.addClass("textbox-button-"+opts.buttonAlign).linkbutton({text:opts.buttonText,iconCls:opts.buttonIcon,onClick:function(){ +var t=$(this).parent().prev(); +t.textbox("options").onClickButton.call(t[0]); +}}); +} +if(opts.label){ +if(typeof opts.label=="object"){ +_4f7.label=$(opts.label); +_4f7.label.attr("for",_4f8); +}else{ +$(_4f7.label).remove(); +_4f7.label=$("").html(opts.label); +_4f7.label.css("textAlign",opts.labelAlign).attr("for",_4f8); +if(opts.labelPosition=="after"){ +_4f7.label.insertAfter(tb); +}else{ +_4f7.label.insertBefore(_4f6); +} +_4f7.label.removeClass("textbox-label-left textbox-label-right textbox-label-top"); +_4f7.label.addClass("textbox-label-"+opts.labelPosition); +} +}else{ +$(_4f7.label).remove(); +} +_4f9(_4f6); +_4fa(_4f6,opts.disabled); +_4fb(_4f6,opts.readonly); +}; +function _4fc(_4fd){ +var _4fe=$.data(_4fd,"textbox"); +var tb=_4fe.textbox; +tb.find(".textbox-text").validatebox("destroy"); +tb.remove(); +$(_4fe.label).remove(); +$(_4fd).remove(); +}; +function _4ff(_500,_501){ +var _502=$.data(_500,"textbox"); +var opts=_502.options; +var tb=_502.textbox; +var _503=tb.parent(); +if(_501){ +if(typeof _501=="object"){ +$.extend(opts,_501); +}else{ +opts.width=_501; +} +} +if(isNaN(parseInt(opts.width))){ +var c=$(_500).clone(); +c.css("visibility","hidden"); +c.insertAfter(_500); +opts.width=c.outerWidth(); +c.remove(); +} +var _504=tb.is(":visible"); +if(!_504){ +tb.appendTo("body"); +} +var _505=tb.find(".textbox-text"); +var btn=tb.find(".textbox-button"); +var _506=tb.find(".textbox-addon"); +var _507=_506.find(".textbox-icon"); +if(opts.height=="auto"){ +_505.css({margin:"",paddingTop:"",paddingBottom:"",height:"",lineHeight:""}); +} +tb._size(opts,_503); +if(opts.label&&opts.labelPosition){ +if(opts.labelPosition=="top"){ +_502.label._size({width:opts.labelWidth=="auto"?tb.outerWidth():opts.labelWidth},tb); +if(opts.height!="auto"){ +tb._size("height",tb.outerHeight()-_502.label.outerHeight()); +} +}else{ +_502.label._size({width:opts.labelWidth,height:tb.outerHeight()},tb); +if(!opts.multiline){ +_502.label.css("lineHeight",_502.label.height()+"px"); +} +tb._size("width",tb.outerWidth()-_502.label.outerWidth()); +} +} +if(opts.buttonAlign=="left"||opts.buttonAlign=="right"){ +btn.linkbutton("resize",{height:tb.height()}); +}else{ +btn.linkbutton("resize",{width:"100%"}); +} +var _508=tb.width()-_507.length*opts.iconWidth-_509("left")-_509("right"); +var _50a=opts.height=="auto"?_505.outerHeight():(tb.height()-_509("top")-_509("bottom")); +_506.css(opts.iconAlign,_509(opts.iconAlign)+"px"); +_506.css("top",_509("top")+"px"); +_507.css({width:opts.iconWidth+"px",height:_50a+"px"}); +_505.css({paddingLeft:(_500.style.paddingLeft||""),paddingRight:(_500.style.paddingRight||""),marginLeft:_50b("left"),marginRight:_50b("right"),marginTop:_509("top"),marginBottom:_509("bottom")}); +if(opts.multiline){ +_505.css({paddingTop:(_500.style.paddingTop||""),paddingBottom:(_500.style.paddingBottom||"")}); +_505._outerHeight(_50a); +}else{ +_505.css({paddingTop:0,paddingBottom:0,height:_50a+"px",lineHeight:_50a+"px"}); +} +_505._outerWidth(_508); +opts.onResizing.call(_500,opts.width,opts.height); +if(!_504){ +tb.insertAfter(_500); +} +opts.onResize.call(_500,opts.width,opts.height); +function _50b(_50c){ +return (opts.iconAlign==_50c?_506._outerWidth():0)+_509(_50c); +}; +function _509(_50d){ +var w=0; +btn.filter(".textbox-button-"+_50d).each(function(){ +if(_50d=="left"||_50d=="right"){ +w+=$(this).outerWidth(); +}else{ +w+=$(this).outerHeight(); +} +}); +return w; +}; +}; +function _4f9(_50e){ +var opts=$(_50e).textbox("options"); +var _50f=$(_50e).textbox("textbox"); +_50f.validatebox($.extend({},opts,{deltaX:function(_510){ +return $(_50e).textbox("getTipX",_510); +},deltaY:function(_511){ +return $(_50e).textbox("getTipY",_511); +},onBeforeValidate:function(){ +opts.onBeforeValidate.call(_50e); +var box=$(this); +if(!box.is(":focus")){ +if(box.val()!==opts.value){ +opts.oldInputValue=box.val(); +box.val(opts.value); +} +} +},onValidate:function(_512){ +var box=$(this); +if(opts.oldInputValue!=undefined){ +box.val(opts.oldInputValue); +opts.oldInputValue=undefined; +} +var tb=box.parent(); +if(_512){ +tb.removeClass("textbox-invalid"); +}else{ +tb.addClass("textbox-invalid"); +} +opts.onValidate.call(_50e,_512); +}})); +}; +function _513(_514){ +var _515=$.data(_514,"textbox"); +var opts=_515.options; +var tb=_515.textbox; +var _516=tb.find(".textbox-text"); +_516.attr("placeholder",opts.prompt); +_516.unbind(".textbox"); +$(_515.label).unbind(".textbox"); +if(!opts.disabled&&!opts.readonly){ +if(_515.label){ +$(_515.label).bind("click.textbox",function(e){ +if(!opts.hasFocusMe){ +_516.focus(); +$(_514).textbox("setSelectionRange",{start:0,end:_516.val().length}); +} +}); +} +_516.bind("blur.textbox",function(e){ +if(!tb.hasClass("textbox-focused")){ +return; +} +opts.value=$(this).val(); +if(opts.value==""){ +$(this).val(opts.prompt).addClass("textbox-prompt"); +}else{ +$(this).removeClass("textbox-prompt"); +} +tb.removeClass("textbox-focused"); +}).bind("focus.textbox",function(e){ +opts.hasFocusMe=true; +if(tb.hasClass("textbox-focused")){ +return; +} +if($(this).val()!=opts.value){ +$(this).val(opts.value); +} +$(this).removeClass("textbox-prompt"); +tb.addClass("textbox-focused"); +}); +for(var _517 in opts.inputEvents){ +_516.bind(_517+".textbox",{target:_514},opts.inputEvents[_517]); +} +} +var _518=tb.find(".textbox-addon"); +_518.unbind().bind("click",{target:_514},function(e){ +var icon=$(e.target).closest("a.textbox-icon:not(.textbox-icon-disabled)"); +if(icon.length){ +var _519=parseInt(icon.attr("icon-index")); +var conf=opts.icons[_519]; +if(conf&&conf.handler){ +conf.handler.call(icon[0],e); +} +opts.onClickIcon.call(_514,_519); +} +}); +_518.find(".textbox-icon").each(function(_51a){ +var conf=opts.icons[_51a]; +var icon=$(this); +if(!conf||conf.disabled||opts.disabled||opts.readonly){ +icon.addClass("textbox-icon-disabled"); +}else{ +icon.removeClass("textbox-icon-disabled"); +} +}); +var btn=tb.find(".textbox-button"); +btn.linkbutton((opts.disabled||opts.readonly)?"disable":"enable"); +tb.unbind(".textbox").bind("_resize.textbox",function(e,_51b){ +if($(this).hasClass("easyui-fluid")||_51b){ +_4ff(_514); +} +return false; +}); +}; +function _4fa(_51c,_51d){ +var _51e=$.data(_51c,"textbox"); +var opts=_51e.options; +var tb=_51e.textbox; +var _51f=tb.find(".textbox-text"); +var ss=$(_51c).add(tb.find(".textbox-value")); +opts.disabled=_51d; +if(opts.disabled){ +_51f.blur(); +_51f.validatebox("disable"); +tb.addClass("textbox-disabled"); +ss.attr("disabled","disabled"); +$(_51e.label).addClass("textbox-label-disabled"); +}else{ +_51f.validatebox("enable"); +tb.removeClass("textbox-disabled"); +ss.removeAttr("disabled"); +$(_51e.label).removeClass("textbox-label-disabled"); +} +}; +function _4fb(_520,mode){ +var _521=$.data(_520,"textbox"); +var opts=_521.options; +var tb=_521.textbox; +var _522=tb.find(".textbox-text"); +opts.readonly=mode==undefined?true:mode; +if(opts.readonly){ +_522.triggerHandler("blur.textbox"); +} +_522.validatebox("readonly",opts.readonly); +tb.removeClass("textbox-readonly").addClass(opts.readonly?"textbox-readonly":""); +}; +$.fn.textbox=function(_523,_524){ +if(typeof _523=="string"){ +var _525=$.fn.textbox.methods[_523]; +if(_525){ +return _525(this,_524); +}else{ +return this.each(function(){ +var _526=$(this).textbox("textbox"); +_526.validatebox(_523,_524); +}); +} +} +_523=_523||{}; +return this.each(function(){ +var _527=$.data(this,"textbox"); +if(_527){ +$.extend(_527.options,_523); +if(_523.value!=undefined){ +_527.options.originalValue=_523.value; +} +}else{ +_527=$.data(this,"textbox",{options:$.extend({},$.fn.textbox.defaults,$.fn.textbox.parseOptions(this),_523),textbox:init(this)}); +_527.options.originalValue=_527.options.value; +} +_4f5(this); +_513(this); +if(_527.options.doSize){ +_4ff(this); +} +var _528=_527.options.value; +_527.options.value=""; +$(this).textbox("initValue",_528); +}); +}; +$.fn.textbox.methods={options:function(jq){ +return $.data(jq[0],"textbox").options; +},cloneFrom:function(jq,from){ +return jq.each(function(){ +var t=$(this); +if(t.data("textbox")){ +return; +} +if(!$(from).data("textbox")){ +$(from).textbox(); +} +var opts=$.extend(true,{},$(from).textbox("options")); +var name=t.attr("name")||""; +t.addClass("textbox-f").hide(); +t.removeAttr("name").attr("textboxName",name); +var span=$(from).next().clone().insertAfter(t); +var _529="_easyui_textbox_input"+(++_4f3); +span.find(".textbox-value").attr("name",name); +span.find(".textbox-text").attr("id",_529); +var _52a=$($(from).textbox("label")).clone(); +if(_52a.length){ +_52a.attr("for",_529); +if(opts.labelPosition=="after"){ +_52a.insertAfter(t.next()); +}else{ +_52a.insertBefore(t); +} +} +$.data(this,"textbox",{options:opts,textbox:span,label:(_52a.length?_52a:undefined)}); +var _52b=$(from).textbox("button"); +if(_52b.length){ +t.textbox("button").linkbutton($.extend(true,{},_52b.linkbutton("options"))); +} +_513(this); +_4f9(this); +}); +},textbox:function(jq){ +return $.data(jq[0],"textbox").textbox.find(".textbox-text"); +},button:function(jq){ +return $.data(jq[0],"textbox").textbox.find(".textbox-button"); +},label:function(jq){ +return $.data(jq[0],"textbox").label; +},destroy:function(jq){ +return jq.each(function(){ +_4fc(this); +}); +},resize:function(jq,_52c){ +return jq.each(function(){ +_4ff(this,_52c); +}); +},disable:function(jq){ +return jq.each(function(){ +_4fa(this,true); +_513(this); +}); +},enable:function(jq){ +return jq.each(function(){ +_4fa(this,false); +_513(this); +}); +},readonly:function(jq,mode){ +return jq.each(function(){ +_4fb(this,mode); +_513(this); +}); +},isValid:function(jq){ +return jq.textbox("textbox").validatebox("isValid"); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("setValue",""); +}); +},setText:function(jq,_52d){ +return jq.each(function(){ +var opts=$(this).textbox("options"); +var _52e=$(this).textbox("textbox"); +_52d=_52d==undefined?"":String(_52d); +if($(this).textbox("getText")!=_52d){ +_52e.val(_52d); +} +opts.value=_52d; +if(!_52e.is(":focus")){ +if(_52d){ +_52e.removeClass("textbox-prompt"); +}else{ +_52e.val(opts.prompt).addClass("textbox-prompt"); +} +} +$(this).textbox("validate"); +}); +},initValue:function(jq,_52f){ +return jq.each(function(){ +var _530=$.data(this,"textbox"); +$(this).textbox("setText",_52f); +_530.textbox.find(".textbox-value").val(_52f); +$(this).val(_52f); +}); +},setValue:function(jq,_531){ +return jq.each(function(){ +var opts=$.data(this,"textbox").options; +var _532=$(this).textbox("getValue"); +$(this).textbox("initValue",_531); +if(_532!=_531){ +opts.onChange.call(this,_531,_532); +$(this).closest("form").trigger("_change",[this]); +} +}); +},getText:function(jq){ +var _533=jq.textbox("textbox"); +if(_533.is(":focus")){ +return _533.val(); +}else{ +return jq.textbox("options").value; +} +},getValue:function(jq){ +return jq.data("textbox").textbox.find(".textbox-value").val(); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).textbox("options"); +$(this).textbox("textbox").val(opts.originalValue); +$(this).textbox("setValue",opts.originalValue); +}); +},getIcon:function(jq,_534){ +return jq.data("textbox").textbox.find(".textbox-icon:eq("+_534+")"); +},getTipX:function(jq,_535){ +var _536=jq.data("textbox"); +var opts=_536.options; +var tb=_536.textbox; +var _537=tb.find(".textbox-text"); +var _535=_535||opts.tipPosition; +var p1=tb.offset(); +var p2=_537.offset(); +var w1=tb.outerWidth(); +var w2=_537.outerWidth(); +if(_535=="right"){ +return w1-w2-p2.left+p1.left; +}else{ +if(_535=="left"){ +return p1.left-p2.left; +}else{ +return (w1-w2-p2.left+p1.left)/2-(p2.left-p1.left)/2; +} +} +},getTipY:function(jq,_538){ +var _539=jq.data("textbox"); +var opts=_539.options; +var tb=_539.textbox; +var _53a=tb.find(".textbox-text"); +var _538=_538||opts.tipPosition; +var p1=tb.offset(); +var p2=_53a.offset(); +var h1=tb.outerHeight(); +var h2=_53a.outerHeight(); +if(_538=="left"||_538=="right"){ +return (h1-h2-p2.top+p1.top)/2-(p2.top-p1.top)/2; +}else{ +if(_538=="bottom"){ +return (h1-h2-p2.top+p1.top); +}else{ +return (p1.top-p2.top); +} +} +},getSelectionStart:function(jq){ +return jq.textbox("getSelectionRange").start; +},getSelectionRange:function(jq){ +var _53b=jq.textbox("textbox")[0]; +var _53c=0; +var end=0; +if(typeof _53b.selectionStart=="number"){ +_53c=_53b.selectionStart; +end=_53b.selectionEnd; +}else{ +if(_53b.createTextRange){ +var s=document.selection.createRange(); +var _53d=_53b.createTextRange(); +_53d.setEndPoint("EndToStart",s); +_53c=_53d.text.length; +end=_53c+s.text.length; +} +} +return {start:_53c,end:end}; +},setSelectionRange:function(jq,_53e){ +return jq.each(function(){ +var _53f=$(this).textbox("textbox")[0]; +var _540=_53e.start; +var end=_53e.end; +if(_53f.setSelectionRange){ +_53f.setSelectionRange(_540,end); +}else{ +if(_53f.createTextRange){ +var _541=_53f.createTextRange(); +_541.collapse(); +_541.moveEnd("character",end); +_541.moveStart("character",_540); +_541.select(); +} +} +}); +}}; +$.fn.textbox.parseOptions=function(_542){ +var t=$(_542); +return $.extend({},$.fn.validatebox.parseOptions(_542),$.parser.parseOptions(_542,["prompt","iconCls","iconAlign","buttonText","buttonIcon","buttonAlign","label","labelPosition","labelAlign",{multiline:"boolean",iconWidth:"number",labelWidth:"number"}]),{value:(t.val()||undefined),type:(t.attr("type")?t.attr("type"):undefined)}); +}; +$.fn.textbox.defaults=$.extend({},$.fn.validatebox.defaults,{doSize:true,width:"auto",height:"auto",cls:null,prompt:"",value:"",type:"text",multiline:false,icons:[],iconCls:null,iconAlign:"right",iconWidth:18,buttonText:"",buttonIcon:null,buttonAlign:"right",label:null,labelWidth:"auto",labelPosition:"before",labelAlign:"left",inputEvents:{blur:function(e){ +var t=$(e.data.target); +var opts=t.textbox("options"); +if(t.textbox("getValue")!=opts.value){ +t.textbox("setValue",opts.value); +} +},keydown:function(e){ +if(e.keyCode==13){ +var t=$(e.data.target); +t.textbox("setValue",t.textbox("getText")); +} +}},onChange:function(_543,_544){ +},onResizing:function(_545,_546){ +},onResize:function(_547,_548){ +},onClickButton:function(){ +},onClickIcon:function(_549){ +}}); +})(jQuery); +(function($){ +function _54a(_54b){ +var _54c=$.data(_54b,"passwordbox"); +var opts=_54c.options; +var _54d=$.extend(true,[],opts.icons); +if(opts.showEye){ +_54d.push({iconCls:"passwordbox-open",handler:function(e){ +opts.revealed=!opts.revealed; +_54e(_54b); +}}); +} +$(_54b).addClass("passwordbox-f").textbox($.extend({},opts,{icons:_54d})); +_54e(_54b); +}; +function _54f(_550,_551,all){ +var t=$(_550); +var opts=t.passwordbox("options"); +if(opts.revealed){ +t.textbox("setValue",_551); +return; +} +var _552=unescape(opts.passwordChar); +var cc=_551.split(""); +var vv=t.passwordbox("getValue").split(""); +for(var i=0;i").appendTo(btn); +if(btn.linkbutton("options").disabled){ +file.attr("disabled","disabled"); +}else{ +file.removeAttr("disabled"); +} +} +}; +function _568(_569){ +var _56a=$.data(_569,"filebox"); +var opts=_56a.options; +_56a.filebox.find(".textbox-value").remove(); +opts.oldValue=""; +var file=$("").appendTo(_56a.filebox); +file.attr("id",opts.fileboxId).attr("name",$(_569).attr("textboxName")||""); +file.attr("accept",opts.accept); +file.attr("capture",opts.capture); +if(opts.multiple){ +file.attr("multiple","multiple"); +} +file.change(function(){ +var _56b=this.value; +if(this.files){ +_56b=$.map(this.files,function(file){ +return file.name; +}).join(opts.separator); +} +$(_569).filebox("setText",_56b); +opts.onChange.call(_569,_56b,opts.oldValue); +opts.oldValue=_56b; +}); +return file; +}; +$.fn.filebox=function(_56c,_56d){ +if(typeof _56c=="string"){ +var _56e=$.fn.filebox.methods[_56c]; +if(_56e){ +return _56e(this,_56d); +}else{ +return this.textbox(_56c,_56d); +} +} +_56c=_56c||{}; +return this.each(function(){ +var _56f=$.data(this,"filebox"); +if(_56f){ +$.extend(_56f.options,_56c); +}else{ +$.data(this,"filebox",{options:$.extend({},$.fn.filebox.defaults,$.fn.filebox.parseOptions(this),_56c)}); +} +_565(this); +}); +}; +$.fn.filebox.methods={options:function(jq){ +var opts=jq.textbox("options"); +return $.extend($.data(jq[0],"filebox").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("clear"); +_568(this); +}); +},reset:function(jq){ +return jq.each(function(){ +$(this).filebox("clear"); +}); +},setValue:function(jq){ +return jq; +},setValues:function(jq){ +return jq; +}}; +$.fn.filebox.parseOptions=function(_570){ +var t=$(_570); +return $.extend({},$.fn.textbox.parseOptions(_570),$.parser.parseOptions(_570,["accept","capture","separator"]),{multiple:(t.attr("multiple")?true:undefined)}); +}; +$.fn.filebox.defaults=$.extend({},$.fn.textbox.defaults,{buttonIcon:null,buttonText:"Choose File",buttonAlign:"right",inputEvents:{},accept:"",capture:"",separator:",",multiple:false}); +})(jQuery); +(function($){ +function _571(_572){ +var _573=$.data(_572,"searchbox"); +var opts=_573.options; +var _574=$.extend(true,[],opts.icons); +_574.push({iconCls:"searchbox-button",handler:function(e){ +var t=$(e.data.target); +var opts=t.searchbox("options"); +opts.searcher.call(e.data.target,t.searchbox("getValue"),t.searchbox("getName")); +}}); +_575(); +var _576=_577(); +$(_572).addClass("searchbox-f").textbox($.extend({},opts,{icons:_574,buttonText:(_576?_576.text:"")})); +$(_572).attr("searchboxName",$(_572).attr("textboxName")); +_573.searchbox=$(_572).next(); +_573.searchbox.addClass("searchbox"); +_578(_576); +function _575(){ +if(opts.menu){ +_573.menu=$(opts.menu).menu(); +var _579=_573.menu.menu("options"); +var _57a=_579.onClick; +_579.onClick=function(item){ +_578(item); +_57a.call(this,item); +}; +}else{ +if(_573.menu){ +_573.menu.menu("destroy"); +} +_573.menu=null; +} +}; +function _577(){ +if(_573.menu){ +var item=_573.menu.children("div.menu-item:first"); +_573.menu.children("div.menu-item").each(function(){ +var _57b=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)}); +if(_57b.selected){ +item=$(this); +return false; +} +}); +return _573.menu.menu("getItem",item[0]); +}else{ +return null; +} +}; +function _578(item){ +if(!item){ +return; +} +$(_572).textbox("button").menubutton({text:item.text,iconCls:(item.iconCls||null),menu:_573.menu,menuAlign:opts.buttonAlign,plain:false}); +_573.searchbox.find("input.textbox-value").attr("name",item.name||item.text); +$(_572).searchbox("resize"); +}; +}; +$.fn.searchbox=function(_57c,_57d){ +if(typeof _57c=="string"){ +var _57e=$.fn.searchbox.methods[_57c]; +if(_57e){ +return _57e(this,_57d); +}else{ +return this.textbox(_57c,_57d); +} +} +_57c=_57c||{}; +return this.each(function(){ +var _57f=$.data(this,"searchbox"); +if(_57f){ +$.extend(_57f.options,_57c); +}else{ +$.data(this,"searchbox",{options:$.extend({},$.fn.searchbox.defaults,$.fn.searchbox.parseOptions(this),_57c)}); +} +_571(this); +}); +}; +$.fn.searchbox.methods={options:function(jq){ +var opts=jq.textbox("options"); +return $.extend($.data(jq[0],"searchbox").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +},menu:function(jq){ +return $.data(jq[0],"searchbox").menu; +},getName:function(jq){ +return $.data(jq[0],"searchbox").searchbox.find("input.textbox-value").attr("name"); +},selectName:function(jq,name){ +return jq.each(function(){ +var menu=$.data(this,"searchbox").menu; +if(menu){ +menu.children("div.menu-item").each(function(){ +var item=menu.menu("getItem",this); +if(item.name==name){ +$(this).triggerHandler("click"); +return false; +} +}); +} +}); +},destroy:function(jq){ +return jq.each(function(){ +var menu=$(this).searchbox("menu"); +if(menu){ +menu.menu("destroy"); +} +$(this).textbox("destroy"); +}); +}}; +$.fn.searchbox.parseOptions=function(_580){ +var t=$(_580); +return $.extend({},$.fn.textbox.parseOptions(_580),$.parser.parseOptions(_580,["menu"]),{searcher:(t.attr("searcher")?eval(t.attr("searcher")):undefined)}); +}; +$.fn.searchbox.defaults=$.extend({},$.fn.textbox.defaults,{inputEvents:$.extend({},$.fn.textbox.defaults.inputEvents,{keydown:function(e){ +if(e.keyCode==13){ +e.preventDefault(); +var t=$(e.data.target); +var opts=t.searchbox("options"); +t.searchbox("setValue",$(this).val()); +opts.searcher.call(e.data.target,t.searchbox("getValue"),t.searchbox("getName")); +return false; +} +}}),buttonAlign:"left",menu:null,searcher:function(_581,name){ +}}); +})(jQuery); +(function($){ +function _582(_583,_584){ +var opts=$.data(_583,"form").options; +$.extend(opts,_584||{}); +var _585=$.extend({},opts.queryParams); +if(opts.onSubmit.call(_583,_585)==false){ +return; +} +var _586=$(_583).find(".textbox-text:focus"); +_586.triggerHandler("blur"); +_586.focus(); +var _587=null; +if(opts.dirty){ +var ff=[]; +$.map(opts.dirtyFields,function(f){ +if($(f).hasClass("textbox-f")){ +$(f).next().find(".textbox-value").each(function(){ +ff.push(this); +}); +}else{ +ff.push(f); +} +}); +_587=$(_583).find("input[name]:enabled,textarea[name]:enabled,select[name]:enabled").filter(function(){ +return $.inArray(this,ff)==-1; +}); +_587.attr("disabled","disabled"); +} +if(opts.ajax){ +if(opts.iframe){ +_588(_583,_585); +}else{ +if(window.FormData!==undefined){ +_589(_583,_585); +}else{ +_588(_583,_585); +} +} +}else{ +$(_583).submit(); +} +if(opts.dirty){ +_587.removeAttr("disabled"); +} +}; +function _588(_58a,_58b){ +var opts=$.data(_58a,"form").options; +var _58c="easyui_frame_"+(new Date().getTime()); +var _58d=$("").appendTo("body"); +_58d.attr("src",window.ActiveXObject?"javascript:false":"about:blank"); +_58d.css({position:"absolute",top:-1000,left:-1000}); +_58d.bind("load",cb); +_58e(_58b); +function _58e(_58f){ +var form=$(_58a); +if(opts.url){ +form.attr("action",opts.url); +} +var t=form.attr("target"),a=form.attr("action"); +form.attr("target",_58c); +var _590=$(); +try{ +for(var n in _58f){ +var _591=$("").val(_58f[n]).appendTo(form); +_590=_590.add(_591); +} +_592(); +form[0].submit(); +} +finally{ +form.attr("action",a); +t?form.attr("target",t):form.removeAttr("target"); +_590.remove(); +} +}; +function _592(){ +var f=$("#"+_58c); +if(!f.length){ +return; +} +try{ +var s=f.contents()[0].readyState; +if(s&&s.toLowerCase()=="uninitialized"){ +setTimeout(_592,100); +} +} +catch(e){ +cb(); +} +}; +var _593=10; +function cb(){ +var f=$("#"+_58c); +if(!f.length){ +return; +} +f.unbind(); +var data=""; +try{ +var body=f.contents().find("body"); +data=body.html(); +if(data==""){ +if(--_593){ +setTimeout(cb,100); +return; +} +} +var ta=body.find(">textarea"); +if(ta.length){ +data=ta.val(); +}else{ +var pre=body.find(">pre"); +if(pre.length){ +data=pre.html(); +} +} +} +catch(e){ +} +opts.success.call(_58a,data); +setTimeout(function(){ +f.unbind(); +f.remove(); +},100); +}; +}; +function _589(_594,_595){ +var opts=$.data(_594,"form").options; +var _596=new FormData($(_594)[0]); +for(var name in _595){ +_596.append(name,_595[name]); +} +$.ajax({url:opts.url,type:"post",xhr:function(){ +var xhr=$.ajaxSettings.xhr(); +if(xhr.upload){ +xhr.upload.addEventListener("progress",function(e){ +if(e.lengthComputable){ +var _597=e.total; +var _598=e.loaded||e.position; +var _599=Math.ceil(_598*100/_597); +opts.onProgress.call(_594,_599); +} +},false); +} +return xhr; +},data:_596,dataType:"html",cache:false,contentType:false,processData:false,complete:function(res){ +opts.success.call(_594,res.responseText); +}}); +}; +function load(_59a,data){ +var opts=$.data(_59a,"form").options; +if(typeof data=="string"){ +var _59b={}; +if(opts.onBeforeLoad.call(_59a,_59b)==false){ +return; +} +$.ajax({url:data,data:_59b,dataType:"json",success:function(data){ +_59c(data); +},error:function(){ +opts.onLoadError.apply(_59a,arguments); +}}); +}else{ +_59c(data); +} +function _59c(data){ +var form=$(_59a); +for(var name in data){ +var val=data[name]; +if(!_59d(name,val)){ +if(!_59e(name,val)){ +form.find("input[name=\""+name+"\"]").val(val); +form.find("textarea[name=\""+name+"\"]").val(val); +form.find("select[name=\""+name+"\"]").val(val); +} +} +} +opts.onLoadSuccess.call(_59a,data); +form.form("validate"); +}; +function _59d(name,val){ +var cc=$(_59a).find("[switchbuttonName=\""+name+"\"]"); +if(cc.length){ +cc.switchbutton("uncheck"); +cc.each(function(){ +if(_59f($(this).switchbutton("options").value,val)){ +$(this).switchbutton("check"); +} +}); +return true; +} +cc=$(_59a).find("input[name=\""+name+"\"][type=radio], input[name=\""+name+"\"][type=checkbox]"); +if(cc.length){ +cc._propAttr("checked",false); +cc.each(function(){ +if(_59f($(this).val(),val)){ +$(this)._propAttr("checked",true); +} +}); +return true; +} +return false; +}; +function _59f(v,val){ +if(v==String(val)||$.inArray(v,$.isArray(val)?val:[val])>=0){ +return true; +}else{ +return false; +} +}; +function _59e(name,val){ +var _5a0=$(_59a).find("[textboxName=\""+name+"\"],[sliderName=\""+name+"\"]"); +if(_5a0.length){ +for(var i=0;i=0;i--){ +var type=opts.fieldTypes[i]; +var _5a8=form.find("."+type+"-f"); +if(_5a8.length&&_5a8[type]){ +_5a8[type]("reset"); +} +} +form.form("validate"); +}; +function _5a9(_5aa){ +var _5ab=$.data(_5aa,"form").options; +$(_5aa).unbind(".form"); +if(_5ab.ajax){ +$(_5aa).bind("submit.form",function(){ +setTimeout(function(){ +_582(_5aa,_5ab); +},0); +return false; +}); +} +$(_5aa).bind("_change.form",function(e,t){ +if($.inArray(t,_5ab.dirtyFields)==-1){ +_5ab.dirtyFields.push(t); +} +_5ab.onChange.call(this,t); +}).bind("change.form",function(e){ +var t=e.target; +if(!$(t).hasClass("textbox-text")){ +if($.inArray(t,_5ab.dirtyFields)==-1){ +_5ab.dirtyFields.push(t); +} +_5ab.onChange.call(this,t); +} +}); +_5ac(_5aa,_5ab.novalidate); +}; +function _5ad(_5ae,_5af){ +_5af=_5af||{}; +var _5b0=$.data(_5ae,"form"); +if(_5b0){ +$.extend(_5b0.options,_5af); +}else{ +$.data(_5ae,"form",{options:$.extend({},$.fn.form.defaults,$.fn.form.parseOptions(_5ae),_5af)}); +} +}; +function _5b1(_5b2){ +if($.fn.validatebox){ +var t=$(_5b2); +t.find(".validatebox-text:not(:disabled)").validatebox("validate"); +var _5b3=t.find(".validatebox-invalid"); +_5b3.filter(":not(:disabled):first").focus(); +return _5b3.length==0; +} +return true; +}; +function _5ac(_5b4,_5b5){ +var opts=$.data(_5b4,"form").options; +opts.novalidate=_5b5; +$(_5b4).find(".validatebox-text:not(:disabled)").validatebox(_5b5?"disableValidation":"enableValidation"); +}; +$.fn.form=function(_5b6,_5b7){ +if(typeof _5b6=="string"){ +this.each(function(){ +_5ad(this); +}); +return $.fn.form.methods[_5b6](this,_5b7); +} +return this.each(function(){ +_5ad(this,_5b6); +_5a9(this); +}); +}; +$.fn.form.methods={options:function(jq){ +return $.data(jq[0],"form").options; +},submit:function(jq,_5b8){ +return jq.each(function(){ +_582(this,_5b8); +}); +},load:function(jq,data){ +return jq.each(function(){ +load(this,data); +}); +},clear:function(jq){ +return jq.each(function(){ +_5a2(this); +}); +},reset:function(jq){ +return jq.each(function(){ +_5a6(this); +}); +},validate:function(jq){ +return _5b1(jq[0]); +},disableValidation:function(jq){ +return jq.each(function(){ +_5ac(this,true); +}); +},enableValidation:function(jq){ +return jq.each(function(){ +_5ac(this,false); +}); +},resetValidation:function(jq){ +return jq.each(function(){ +$(this).find(".validatebox-text:not(:disabled)").validatebox("resetValidation"); +}); +},resetDirty:function(jq){ +return jq.each(function(){ +$(this).form("options").dirtyFields=[]; +}); +}}; +$.fn.form.parseOptions=function(_5b9){ +var t=$(_5b9); +return $.extend({},$.parser.parseOptions(_5b9,[{ajax:"boolean",dirty:"boolean"}]),{url:(t.attr("action")?t.attr("action"):undefined)}); +}; +$.fn.form.defaults={fieldTypes:["combobox","combotree","combogrid","combotreegrid","datetimebox","datebox","combo","datetimespinner","timespinner","numberspinner","spinner","slider","searchbox","numberbox","passwordbox","filebox","textbox","switchbutton"],novalidate:false,ajax:true,iframe:true,dirty:false,dirtyFields:[],url:null,queryParams:{},onSubmit:function(_5ba){ +return $(this).form("validate"); +},onProgress:function(_5bb){ +},success:function(data){ +},onBeforeLoad:function(_5bc){ +},onLoadSuccess:function(data){ +},onLoadError:function(){ +},onChange:function(_5bd){ +}}; +})(jQuery); +(function($){ +function _5be(_5bf){ +var _5c0=$.data(_5bf,"numberbox"); +var opts=_5c0.options; +$(_5bf).addClass("numberbox-f").textbox(opts); +$(_5bf).textbox("textbox").css({imeMode:"disabled"}); +$(_5bf).attr("numberboxName",$(_5bf).attr("textboxName")); +_5c0.numberbox=$(_5bf).next(); +_5c0.numberbox.addClass("numberbox"); +var _5c1=opts.parser.call(_5bf,opts.value); +var _5c2=opts.formatter.call(_5bf,_5c1); +$(_5bf).numberbox("initValue",_5c1).numberbox("setText",_5c2); +}; +function _5c3(_5c4,_5c5){ +var _5c6=$.data(_5c4,"numberbox"); +var opts=_5c6.options; +opts.value=parseFloat(_5c5); +var _5c5=opts.parser.call(_5c4,_5c5); +var text=opts.formatter.call(_5c4,_5c5); +opts.value=_5c5; +$(_5c4).textbox("setText",text).textbox("setValue",_5c5); +text=opts.formatter.call(_5c4,$(_5c4).textbox("getValue")); +$(_5c4).textbox("setText",text); +}; +$.fn.numberbox=function(_5c7,_5c8){ +if(typeof _5c7=="string"){ +var _5c9=$.fn.numberbox.methods[_5c7]; +if(_5c9){ +return _5c9(this,_5c8); +}else{ +return this.textbox(_5c7,_5c8); +} +} +_5c7=_5c7||{}; +return this.each(function(){ +var _5ca=$.data(this,"numberbox"); +if(_5ca){ +$.extend(_5ca.options,_5c7); +}else{ +_5ca=$.data(this,"numberbox",{options:$.extend({},$.fn.numberbox.defaults,$.fn.numberbox.parseOptions(this),_5c7)}); +} +_5be(this); +}); +}; +$.fn.numberbox.methods={options:function(jq){ +var opts=jq.data("textbox")?jq.textbox("options"):{}; +return $.extend($.data(jq[0],"numberbox").options,{width:opts.width,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +},fix:function(jq){ +return jq.each(function(){ +var opts=$(this).numberbox("options"); +opts.value=null; +var _5cb=opts.parser.call(this,$(this).numberbox("getText")); +$(this).numberbox("setValue",_5cb); +}); +},setValue:function(jq,_5cc){ +return jq.each(function(){ +_5c3(this,_5cc); +}); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("clear"); +$(this).numberbox("options").value=""; +}); +},reset:function(jq){ +return jq.each(function(){ +$(this).textbox("reset"); +$(this).numberbox("setValue",$(this).numberbox("getValue")); +}); +}}; +$.fn.numberbox.parseOptions=function(_5cd){ +var t=$(_5cd); +return $.extend({},$.fn.textbox.parseOptions(_5cd),$.parser.parseOptions(_5cd,["decimalSeparator","groupSeparator","suffix",{min:"number",max:"number",precision:"number"}]),{prefix:(t.attr("prefix")?t.attr("prefix"):undefined)}); +}; +$.fn.numberbox.defaults=$.extend({},$.fn.textbox.defaults,{inputEvents:{keypress:function(e){ +var _5ce=e.data.target; +var opts=$(_5ce).numberbox("options"); +return opts.filter.call(_5ce,e); +},blur:function(e){ +$(e.data.target).numberbox("fix"); +},keydown:function(e){ +if(e.keyCode==13){ +$(e.data.target).numberbox("fix"); +} +}},min:null,max:null,precision:0,decimalSeparator:".",groupSeparator:"",prefix:"",suffix:"",filter:function(e){ +var opts=$(this).numberbox("options"); +var s=$(this).numberbox("getText"); +if(e.metaKey||e.ctrlKey){ +return true; +} +if($.inArray(String(e.which),["46","8","13","0"])>=0){ +return true; +} +var tmp=$(""); +tmp.html(String.fromCharCode(e.which)); +var c=tmp.text(); +tmp.remove(); +if(!c){ +return true; +} +if(c=="-"||c==opts.decimalSeparator){ +return (s.indexOf(c)==-1)?true:false; +}else{ +if(c==opts.groupSeparator){ +return true; +}else{ +if("0123456789".indexOf(c)>=0){ +return true; +}else{ +return false; +} +} +} +},formatter:function(_5cf){ +if(!_5cf){ +return _5cf; +} +_5cf=_5cf+""; +var opts=$(this).numberbox("options"); +var s1=_5cf,s2=""; +var dpos=_5cf.indexOf("."); +if(dpos>=0){ +s1=_5cf.substring(0,dpos); +s2=_5cf.substring(dpos+1,_5cf.length); +} +if(opts.groupSeparator){ +var p=/(\d+)(\d{3})/; +while(p.test(s1)){ +s1=s1.replace(p,"$1"+opts.groupSeparator+"$2"); +} +} +if(s2){ +return opts.prefix+s1+opts.decimalSeparator+s2+opts.suffix; +}else{ +return opts.prefix+s1+opts.suffix; +} +},parser:function(s){ +s=s+""; +var opts=$(this).numberbox("options"); +if(opts.prefix){ +s=$.trim(s.replace(new RegExp("\\"+$.trim(opts.prefix),"g"),"")); +} +if(opts.suffix){ +s=$.trim(s.replace(new RegExp("\\"+$.trim(opts.suffix),"g"),"")); +} +if(parseFloat(s)!=opts.value){ +if(opts.groupSeparator){ +s=$.trim(s.replace(new RegExp("\\"+opts.groupSeparator,"g"),"")); +} +if(opts.decimalSeparator){ +s=$.trim(s.replace(new RegExp("\\"+opts.decimalSeparator,"g"),".")); +} +s=s.replace(/\s/g,""); +} +var val=parseFloat(s).toFixed(opts.precision); +if(isNaN(val)){ +val=""; +}else{ +if(typeof (opts.min)=="number"&&valopts.max){ +val=opts.max.toFixed(opts.precision); +} +} +} +return val; +}}); +})(jQuery); +(function($){ +function _5d0(_5d1,_5d2){ +var opts=$.data(_5d1,"calendar").options; +var t=$(_5d1); +if(_5d2){ +$.extend(opts,{width:_5d2.width,height:_5d2.height}); +} +t._size(opts,t.parent()); +t.find(".calendar-body")._outerHeight(t.height()-t.find(".calendar-header")._outerHeight()); +if(t.find(".calendar-menu").is(":visible")){ +_5d3(_5d1); +} +}; +function init(_5d4){ +$(_5d4).addClass("calendar").html("
        "+"
        "+"
        "+"
        "+"
        "+"
        "+""+"
        "+"
        "+"
        "+"
        "+"
        "+""+""+""+"
        "+"
        "+"
        "+"
        "+"
        "); +$(_5d4).bind("_resize",function(e,_5d5){ +if($(this).hasClass("easyui-fluid")||_5d5){ +_5d0(_5d4); +} +return false; +}); +}; +function _5d6(_5d7){ +var opts=$.data(_5d7,"calendar").options; +var menu=$(_5d7).find(".calendar-menu"); +menu.find(".calendar-menu-year").unbind(".calendar").bind("keypress.calendar",function(e){ +if(e.keyCode==13){ +_5d8(true); +} +}); +$(_5d7).unbind(".calendar").bind("mouseover.calendar",function(e){ +var t=_5d9(e.target); +if(t.hasClass("calendar-nav")||t.hasClass("calendar-text")||(t.hasClass("calendar-day")&&!t.hasClass("calendar-disabled"))){ +t.addClass("calendar-nav-hover"); +} +}).bind("mouseout.calendar",function(e){ +var t=_5d9(e.target); +if(t.hasClass("calendar-nav")||t.hasClass("calendar-text")||(t.hasClass("calendar-day")&&!t.hasClass("calendar-disabled"))){ +t.removeClass("calendar-nav-hover"); +} +}).bind("click.calendar",function(e){ +var t=_5d9(e.target); +if(t.hasClass("calendar-menu-next")||t.hasClass("calendar-nextyear")){ +_5da(1); +}else{ +if(t.hasClass("calendar-menu-prev")||t.hasClass("calendar-prevyear")){ +_5da(-1); +}else{ +if(t.hasClass("calendar-menu-month")){ +menu.find(".calendar-selected").removeClass("calendar-selected"); +t.addClass("calendar-selected"); +_5d8(true); +}else{ +if(t.hasClass("calendar-prevmonth")){ +_5db(-1); +}else{ +if(t.hasClass("calendar-nextmonth")){ +_5db(1); +}else{ +if(t.hasClass("calendar-text")){ +if(menu.is(":visible")){ +menu.hide(); +}else{ +_5d3(_5d7); +} +}else{ +if(t.hasClass("calendar-day")){ +if(t.hasClass("calendar-disabled")){ +return; +} +var _5dc=opts.current; +t.closest("div.calendar-body").find(".calendar-selected").removeClass("calendar-selected"); +t.addClass("calendar-selected"); +var _5dd=t.attr("abbr").split(","); +var y=parseInt(_5dd[0]); +var m=parseInt(_5dd[1]); +var d=parseInt(_5dd[2]); +opts.current=new Date(y,m-1,d); +opts.onSelect.call(_5d7,opts.current); +if(!_5dc||_5dc.getTime()!=opts.current.getTime()){ +opts.onChange.call(_5d7,opts.current,_5dc); +} +if(opts.year!=y||opts.month!=m){ +opts.year=y; +opts.month=m; +show(_5d7); +} +} +} +} +} +} +} +} +}); +function _5d9(t){ +var day=$(t).closest(".calendar-day"); +if(day.length){ +return day; +}else{ +return $(t); +} +}; +function _5d8(_5de){ +var menu=$(_5d7).find(".calendar-menu"); +var year=menu.find(".calendar-menu-year").val(); +var _5df=menu.find(".calendar-selected").attr("abbr"); +if(!isNaN(year)){ +opts.year=parseInt(year); +opts.month=parseInt(_5df); +show(_5d7); +} +if(_5de){ +menu.hide(); +} +}; +function _5da(_5e0){ +opts.year+=_5e0; +show(_5d7); +menu.find(".calendar-menu-year").val(opts.year); +}; +function _5db(_5e1){ +opts.month+=_5e1; +if(opts.month>12){ +opts.year++; +opts.month=1; +}else{ +if(opts.month<1){ +opts.year--; +opts.month=12; +} +} +show(_5d7); +menu.find("td.calendar-selected").removeClass("calendar-selected"); +menu.find("td:eq("+(opts.month-1)+")").addClass("calendar-selected"); +}; +}; +function _5d3(_5e2){ +var opts=$.data(_5e2,"calendar").options; +$(_5e2).find(".calendar-menu").show(); +if($(_5e2).find(".calendar-menu-month-inner").is(":empty")){ +$(_5e2).find(".calendar-menu-month-inner").empty(); +var t=$("
        ").appendTo($(_5e2).find(".calendar-menu-month-inner")); +var idx=0; +for(var i=0;i<3;i++){ +var tr=$("").appendTo(t); +for(var j=0;j<4;j++){ +$("").html(opts.months[idx++]).attr("abbr",idx).appendTo(tr); +} +} +} +var body=$(_5e2).find(".calendar-body"); +var sele=$(_5e2).find(".calendar-menu"); +var _5e3=sele.find(".calendar-menu-year-inner"); +var _5e4=sele.find(".calendar-menu-month-inner"); +_5e3.find("input").val(opts.year).focus(); +_5e4.find("td.calendar-selected").removeClass("calendar-selected"); +_5e4.find("td:eq("+(opts.month-1)+")").addClass("calendar-selected"); +sele._outerWidth(body._outerWidth()); +sele._outerHeight(body._outerHeight()); +_5e4._outerHeight(sele.height()-_5e3._outerHeight()); +}; +function _5e5(_5e6,year,_5e7){ +var opts=$.data(_5e6,"calendar").options; +var _5e8=[]; +var _5e9=new Date(year,_5e7,0).getDate(); +for(var i=1;i<=_5e9;i++){ +_5e8.push([year,_5e7,i]); +} +var _5ea=[],week=[]; +var _5eb=-1; +while(_5e8.length>0){ +var date=_5e8.shift(); +week.push(date); +var day=new Date(date[0],date[1]-1,date[2]).getDay(); +if(_5eb==day){ +day=0; +}else{ +if(day==(opts.firstDay==0?7:opts.firstDay)-1){ +_5ea.push(week); +week=[]; +} +} +_5eb=day; +} +if(week.length){ +_5ea.push(week); +} +var _5ec=_5ea[0]; +if(_5ec.length<7){ +while(_5ec.length<7){ +var _5ed=_5ec[0]; +var date=new Date(_5ed[0],_5ed[1]-1,_5ed[2]-1); +_5ec.unshift([date.getFullYear(),date.getMonth()+1,date.getDate()]); +} +}else{ +var _5ed=_5ec[0]; +var week=[]; +for(var i=1;i<=7;i++){ +var date=new Date(_5ed[0],_5ed[1]-1,_5ed[2]-i); +week.unshift([date.getFullYear(),date.getMonth()+1,date.getDate()]); +} +_5ea.unshift(week); +} +var _5ee=_5ea[_5ea.length-1]; +while(_5ee.length<7){ +var _5ef=_5ee[_5ee.length-1]; +var date=new Date(_5ef[0],_5ef[1]-1,_5ef[2]+1); +_5ee.push([date.getFullYear(),date.getMonth()+1,date.getDate()]); +} +if(_5ea.length<6){ +var _5ef=_5ee[_5ee.length-1]; +var week=[]; +for(var i=1;i<=7;i++){ +var date=new Date(_5ef[0],_5ef[1]-1,_5ef[2]+i); +week.push([date.getFullYear(),date.getMonth()+1,date.getDate()]); +} +_5ea.push(week); +} +return _5ea; +}; +function show(_5f0){ +var opts=$.data(_5f0,"calendar").options; +if(opts.current&&!opts.validator.call(_5f0,opts.current)){ +opts.current=null; +} +var now=new Date(); +var _5f1=now.getFullYear()+","+(now.getMonth()+1)+","+now.getDate(); +var _5f2=opts.current?(opts.current.getFullYear()+","+(opts.current.getMonth()+1)+","+opts.current.getDate()):""; +var _5f3=6-opts.firstDay; +var _5f4=_5f3+1; +if(_5f3>=7){ +_5f3-=7; +} +if(_5f4>=7){ +_5f4-=7; +} +$(_5f0).find(".calendar-title span").html(opts.months[opts.month-1]+" "+opts.year); +var body=$(_5f0).find("div.calendar-body"); +body.children("table").remove(); +var data=[""]; +data.push(""); +if(opts.showWeek){ +data.push(""); +} +for(var i=opts.firstDay;i"+opts.weeks[i]+""); +} +for(var i=0;i"+opts.weeks[i]+""); +} +data.push(""); +data.push(""); +var _5f5=_5e5(_5f0,opts.year,opts.month); +for(var i=0;i<_5f5.length;i++){ +var week=_5f5[i]; +var cls=""; +if(i==0){ +cls="calendar-first"; +}else{ +if(i==_5f5.length-1){ +cls="calendar-last"; +} +} +data.push(""); +if(opts.showWeek){ +var _5f6=opts.getWeekNumber(new Date(week[0][0],parseInt(week[0][1])-1,week[0][2])); +data.push(""); +} +for(var j=0;j"+d+""); +} +data.push(""); +} +data.push(""); +data.push("
        "+opts.weekNumberHeader+"
        "+_5f6+"
        "); +body.append(data.join("")); +body.children("table.calendar-dtable").prependTo(body); +opts.onNavigate.call(_5f0,opts.year,opts.month); +}; +$.fn.calendar=function(_5fa,_5fb){ +if(typeof _5fa=="string"){ +return $.fn.calendar.methods[_5fa](this,_5fb); +} +_5fa=_5fa||{}; +return this.each(function(){ +var _5fc=$.data(this,"calendar"); +if(_5fc){ +$.extend(_5fc.options,_5fa); +}else{ +_5fc=$.data(this,"calendar",{options:$.extend({},$.fn.calendar.defaults,$.fn.calendar.parseOptions(this),_5fa)}); +init(this); +} +if(_5fc.options.border==false){ +$(this).addClass("calendar-noborder"); +} +_5d0(this); +_5d6(this); +show(this); +$(this).find("div.calendar-menu").hide(); +}); +}; +$.fn.calendar.methods={options:function(jq){ +return $.data(jq[0],"calendar").options; +},resize:function(jq,_5fd){ +return jq.each(function(){ +_5d0(this,_5fd); +}); +},moveTo:function(jq,date){ +return jq.each(function(){ +if(!date){ +var now=new Date(); +$(this).calendar({year:now.getFullYear(),month:now.getMonth()+1,current:date}); +return; +} +var opts=$(this).calendar("options"); +if(opts.validator.call(this,date)){ +var _5fe=opts.current; +$(this).calendar({year:date.getFullYear(),month:date.getMonth()+1,current:date}); +if(!_5fe||_5fe.getTime()!=date.getTime()){ +opts.onChange.call(this,opts.current,_5fe); +} +} +}); +}}; +$.fn.calendar.parseOptions=function(_5ff){ +var t=$(_5ff); +return $.extend({},$.parser.parseOptions(_5ff,["weekNumberHeader",{firstDay:"number",fit:"boolean",border:"boolean",showWeek:"boolean"}])); +}; +$.fn.calendar.defaults={width:180,height:180,fit:false,border:true,showWeek:false,firstDay:0,weeks:["S","M","T","W","T","F","S"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],year:new Date().getFullYear(),month:new Date().getMonth()+1,current:(function(){ +var d=new Date(); +return new Date(d.getFullYear(),d.getMonth(),d.getDate()); +})(),weekNumberHeader:"",getWeekNumber:function(date){ +var _600=new Date(date.getTime()); +_600.setDate(_600.getDate()+4-(_600.getDay()||7)); +var time=_600.getTime(); +_600.setMonth(0); +_600.setDate(1); +return Math.floor(Math.round((time-_600)/86400000)/7)+1; +},formatter:function(date){ +return date.getDate(); +},styler:function(date){ +return ""; +},validator:function(date){ +return true; +},onSelect:function(date){ +},onChange:function(_601,_602){ +},onNavigate:function(year,_603){ +}}; +})(jQuery); +(function($){ +function _604(_605){ +var _606=$.data(_605,"spinner"); +var opts=_606.options; +var _607=$.extend(true,[],opts.icons); +if(opts.spinAlign=="left"||opts.spinAlign=="right"){ +opts.spinArrow=true; +opts.iconAlign=opts.spinAlign; +var _608={iconCls:"spinner-arrow",handler:function(e){ +var spin=$(e.target).closest(".spinner-arrow-up,.spinner-arrow-down"); +_612(e.data.target,spin.hasClass("spinner-arrow-down")); +}}; +if(opts.spinAlign=="left"){ +_607.unshift(_608); +}else{ +_607.push(_608); +} +}else{ +opts.spinArrow=false; +if(opts.spinAlign=="vertical"){ +if(opts.buttonAlign!="top"){ +opts.buttonAlign="bottom"; +} +opts.clsLeft="textbox-button-bottom"; +opts.clsRight="textbox-button-top"; +}else{ +opts.clsLeft="textbox-button-left"; +opts.clsRight="textbox-button-right"; +} +} +$(_605).addClass("spinner-f").textbox($.extend({},opts,{icons:_607,doSize:false,onResize:function(_609,_60a){ +if(!opts.spinArrow){ +var span=$(this).next(); +var btn=span.find(".textbox-button:not(.spinner-button)"); +if(btn.length){ +var _60b=btn.outerWidth(); +var _60c=btn.outerHeight(); +var _60d=span.find(".spinner-button."+opts.clsLeft); +var _60e=span.find(".spinner-button."+opts.clsRight); +if(opts.buttonAlign=="right"){ +_60e.css("marginRight",_60b+"px"); +}else{ +if(opts.buttonAlign=="left"){ +_60d.css("marginLeft",_60b+"px"); +}else{ +if(opts.buttonAlign=="top"){ +_60e.css("marginTop",_60c+"px"); +}else{ +_60d.css("marginBottom",_60c+"px"); +} +} +} +} +} +opts.onResize.call(this,_609,_60a); +}})); +$(_605).attr("spinnerName",$(_605).attr("textboxName")); +_606.spinner=$(_605).next(); +_606.spinner.addClass("spinner"); +if(opts.spinArrow){ +var _60f=_606.spinner.find(".spinner-arrow"); +_60f.append(""); +_60f.append(""); +}else{ +var _610=$("").addClass(opts.clsLeft).appendTo(_606.spinner); +var _611=$("").addClass(opts.clsRight).appendTo(_606.spinner); +_610.linkbutton({iconCls:opts.reversed?"spinner-button-up":"spinner-button-down",onClick:function(){ +_612(_605,!opts.reversed); +}}); +_611.linkbutton({iconCls:opts.reversed?"spinner-button-down":"spinner-button-up",onClick:function(){ +_612(_605,opts.reversed); +}}); +if(opts.disabled){ +$(_605).spinner("disable"); +} +if(opts.readonly){ +$(_605).spinner("readonly"); +} +} +$(_605).spinner("resize"); +}; +function _612(_613,down){ +var opts=$(_613).spinner("options"); +opts.spin.call(_613,down); +opts[down?"onSpinDown":"onSpinUp"].call(_613); +$(_613).spinner("validate"); +}; +$.fn.spinner=function(_614,_615){ +if(typeof _614=="string"){ +var _616=$.fn.spinner.methods[_614]; +if(_616){ +return _616(this,_615); +}else{ +return this.textbox(_614,_615); +} +} +_614=_614||{}; +return this.each(function(){ +var _617=$.data(this,"spinner"); +if(_617){ +$.extend(_617.options,_614); +}else{ +_617=$.data(this,"spinner",{options:$.extend({},$.fn.spinner.defaults,$.fn.spinner.parseOptions(this),_614)}); +} +_604(this); +}); +}; +$.fn.spinner.methods={options:function(jq){ +var opts=jq.textbox("options"); +return $.extend($.data(jq[0],"spinner").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +}}; +$.fn.spinner.parseOptions=function(_618){ +return $.extend({},$.fn.textbox.parseOptions(_618),$.parser.parseOptions(_618,["min","max","spinAlign",{increment:"number",reversed:"boolean"}])); +}; +$.fn.spinner.defaults=$.extend({},$.fn.textbox.defaults,{min:null,max:null,increment:1,spinAlign:"right",reversed:false,spin:function(down){ +},onSpinUp:function(){ +},onSpinDown:function(){ +}}); +})(jQuery); +(function($){ +function _619(_61a){ +$(_61a).addClass("numberspinner-f"); +var opts=$.data(_61a,"numberspinner").options; +$(_61a).numberbox($.extend({},opts,{doSize:false})).spinner(opts); +$(_61a).numberbox("setValue",opts.value); +}; +function _61b(_61c,down){ +var opts=$.data(_61c,"numberspinner").options; +var v=parseFloat($(_61c).numberbox("getValue")||opts.value)||0; +if(down){ +v-=opts.increment; +}else{ +v+=opts.increment; +} +$(_61c).numberbox("setValue",v); +}; +$.fn.numberspinner=function(_61d,_61e){ +if(typeof _61d=="string"){ +var _61f=$.fn.numberspinner.methods[_61d]; +if(_61f){ +return _61f(this,_61e); +}else{ +return this.numberbox(_61d,_61e); +} +} +_61d=_61d||{}; +return this.each(function(){ +var _620=$.data(this,"numberspinner"); +if(_620){ +$.extend(_620.options,_61d); +}else{ +$.data(this,"numberspinner",{options:$.extend({},$.fn.numberspinner.defaults,$.fn.numberspinner.parseOptions(this),_61d)}); +} +_619(this); +}); +}; +$.fn.numberspinner.methods={options:function(jq){ +var opts=jq.numberbox("options"); +return $.extend($.data(jq[0],"numberspinner").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +}}; +$.fn.numberspinner.parseOptions=function(_621){ +return $.extend({},$.fn.spinner.parseOptions(_621),$.fn.numberbox.parseOptions(_621),{}); +}; +$.fn.numberspinner.defaults=$.extend({},$.fn.spinner.defaults,$.fn.numberbox.defaults,{spin:function(down){ +_61b(this,down); +}}); +})(jQuery); +(function($){ +function _622(_623){ +var opts=$.data(_623,"timespinner").options; +$(_623).addClass("timespinner-f").spinner(opts); +var _624=opts.formatter.call(_623,opts.parser.call(_623,opts.value)); +$(_623).timespinner("initValue",_624); +}; +function _625(e){ +var _626=e.data.target; +var opts=$.data(_626,"timespinner").options; +var _627=$(_626).timespinner("getSelectionStart"); +for(var i=0;i=_628[0]&&_627<=_628[1]){ +_629(_626,i); +return; +} +} +}; +function _629(_62a,_62b){ +var opts=$.data(_62a,"timespinner").options; +if(_62b!=undefined){ +opts.highlight=_62b; +} +var _62c=opts.selections[opts.highlight]; +if(_62c){ +var tb=$(_62a).timespinner("textbox"); +$(_62a).timespinner("setSelectionRange",{start:_62c[0],end:_62c[1]}); +tb.focus(); +} +}; +function _62d(_62e,_62f){ +var opts=$.data(_62e,"timespinner").options; +var _62f=opts.parser.call(_62e,_62f); +var text=opts.formatter.call(_62e,_62f); +$(_62e).spinner("setValue",text); +}; +function _630(_631,down){ +var opts=$.data(_631,"timespinner").options; +var s=$(_631).timespinner("getValue"); +var _632=opts.selections[opts.highlight]; +var s1=s.substring(0,_632[0]); +var s2=s.substring(_632[0],_632[1]); +var s3=s.substring(_632[1]); +var v=s1+((parseInt(s2,10)||0)+opts.increment*(down?-1:1))+s3; +$(_631).timespinner("setValue",v); +_629(_631); +}; +$.fn.timespinner=function(_633,_634){ +if(typeof _633=="string"){ +var _635=$.fn.timespinner.methods[_633]; +if(_635){ +return _635(this,_634); +}else{ +return this.spinner(_633,_634); +} +} +_633=_633||{}; +return this.each(function(){ +var _636=$.data(this,"timespinner"); +if(_636){ +$.extend(_636.options,_633); +}else{ +$.data(this,"timespinner",{options:$.extend({},$.fn.timespinner.defaults,$.fn.timespinner.parseOptions(this),_633)}); +} +_622(this); +}); +}; +$.fn.timespinner.methods={options:function(jq){ +var opts=jq.data("spinner")?jq.spinner("options"):{}; +return $.extend($.data(jq[0],"timespinner").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +},setValue:function(jq,_637){ +return jq.each(function(){ +_62d(this,_637); +}); +},getHours:function(jq){ +var opts=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(opts.separator); +return parseInt(vv[0],10); +},getMinutes:function(jq){ +var opts=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(opts.separator); +return parseInt(vv[1],10); +},getSeconds:function(jq){ +var opts=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(opts.separator); +return parseInt(vv[2],10)||0; +}}; +$.fn.timespinner.parseOptions=function(_638){ +return $.extend({},$.fn.spinner.parseOptions(_638),$.parser.parseOptions(_638,["separator",{showSeconds:"boolean",highlight:"number"}])); +}; +$.fn.timespinner.defaults=$.extend({},$.fn.spinner.defaults,{inputEvents:$.extend({},$.fn.spinner.defaults.inputEvents,{click:function(e){ +_625.call(this,e); +},blur:function(e){ +var t=$(e.data.target); +t.timespinner("setValue",t.timespinner("getText")); +},keydown:function(e){ +if(e.keyCode==13){ +var t=$(e.data.target); +t.timespinner("setValue",t.timespinner("getText")); +} +}}),formatter:function(date){ +if(!date){ +return ""; +} +var opts=$(this).timespinner("options"); +var tt=[_639(date.getHours()),_639(date.getMinutes())]; +if(opts.showSeconds){ +tt.push(_639(date.getSeconds())); +} +return tt.join(opts.separator); +function _639(_63a){ +return (_63a<10?"0":"")+_63a; +}; +},parser:function(s){ +var opts=$(this).timespinner("options"); +var date=_63b(s); +if(date){ +var min=_63b(opts.min); +var max=_63b(opts.max); +if(min&&min>date){ +date=min; +} +if(max&&max"]; +for(var i=0;i<_650.length;i++){ +_64f.cache[_650[i][0]]={width:_650[i][1]}; +} +var _651=0; +for(var s in _64f.cache){ +var item=_64f.cache[s]; +item.index=_651++; +ss.push(s+"{width:"+item.width+"}"); +} +ss.push(""); +$(ss.join("\n")).appendTo(cc); +cc.children("style[easyui]:not(:last)").remove(); +},getRule:function(_652){ +var _653=cc.children("style[easyui]:last")[0]; +var _654=_653.styleSheet?_653.styleSheet:(_653.sheet||document.styleSheets[document.styleSheets.length-1]); +var _655=_654.cssRules||_654.rules; +return _655[_652]; +},set:function(_656,_657){ +var item=_64f.cache[_656]; +if(item){ +item.width=_657; +var rule=this.getRule(item.index); +if(rule){ +rule.style["width"]=_657; +} +} +},remove:function(_658){ +var tmp=[]; +for(var s in _64f.cache){ +if(s.indexOf(_658)==-1){ +tmp.push([s,_64f.cache[s].width]); +} +} +_64f.cache={}; +this.add(tmp); +},dirty:function(_659){ +if(_659){ +_64f.dirty.push(_659); +} +},clean:function(){ +for(var i=0;i<_64f.dirty.length;i++){ +this.remove(_64f.dirty[i]); +} +_64f.dirty=[]; +}}; +}; +function _65a(_65b,_65c){ +var _65d=$.data(_65b,"datagrid"); +var opts=_65d.options; +var _65e=_65d.panel; +if(_65c){ +$.extend(opts,_65c); +} +if(opts.fit==true){ +var p=_65e.panel("panel").parent(); +opts.width=p.width(); +opts.height=p.height(); +} +_65e.panel("resize",opts); +}; +function _65f(_660){ +var _661=$.data(_660,"datagrid"); +var opts=_661.options; +var dc=_661.dc; +var wrap=_661.panel; +var _662=wrap.width(); +var _663=wrap.height(); +var view=dc.view; +var _664=dc.view1; +var _665=dc.view2; +var _666=_664.children("div.datagrid-header"); +var _667=_665.children("div.datagrid-header"); +var _668=_666.find("table"); +var _669=_667.find("table"); +view.width(_662); +var _66a=_666.children("div.datagrid-header-inner").show(); +_664.width(_66a.find("table").width()); +if(!opts.showHeader){ +_66a.hide(); +} +_665.width(_662-_664._outerWidth()); +_664.children()._outerWidth(_664.width()); +_665.children()._outerWidth(_665.width()); +var all=_666.add(_667).add(_668).add(_669); +all.css("height",""); +var hh=Math.max(_668.height(),_669.height()); +all._outerHeight(hh); +view.children(".datagrid-empty").css("top",hh+"px"); +dc.body1.add(dc.body2).children("table.datagrid-btable-frozen").css({position:"absolute",top:dc.header2._outerHeight()}); +var _66b=dc.body2.children("table.datagrid-btable-frozen")._outerHeight(); +var _66c=_66b+_667._outerHeight()+_665.children(".datagrid-footer")._outerHeight(); +wrap.children(":not(.datagrid-view,.datagrid-mask,.datagrid-mask-msg)").each(function(){ +_66c+=$(this)._outerHeight(); +}); +var _66d=wrap.outerHeight()-wrap.height(); +var _66e=wrap._size("minHeight")||""; +var _66f=wrap._size("maxHeight")||""; +_664.add(_665).children("div.datagrid-body").css({marginTop:_66b,height:(isNaN(parseInt(opts.height))?"":(_663-_66c)),minHeight:(_66e?_66e-_66d-_66c:""),maxHeight:(_66f?_66f-_66d-_66c:"")}); +view.height(_665.height()); +}; +function _670(_671,_672,_673){ +var rows=$.data(_671,"datagrid").data.rows; +var opts=$.data(_671,"datagrid").options; +var dc=$.data(_671,"datagrid").dc; +if(!dc.body1.is(":empty")&&(!opts.nowrap||opts.autoRowHeight||_673)){ +if(_672!=undefined){ +var tr1=opts.finder.getTr(_671,_672,"body",1); +var tr2=opts.finder.getTr(_671,_672,"body",2); +_674(tr1,tr2); +}else{ +var tr1=opts.finder.getTr(_671,0,"allbody",1); +var tr2=opts.finder.getTr(_671,0,"allbody",2); +_674(tr1,tr2); +if(opts.showFooter){ +var tr1=opts.finder.getTr(_671,0,"allfooter",1); +var tr2=opts.finder.getTr(_671,0,"allfooter",2); +_674(tr1,tr2); +} +} +} +_65f(_671); +if(opts.height=="auto"){ +var _675=dc.body1.parent(); +var _676=dc.body2; +var _677=_678(_676); +var _679=_677.height; +if(_677.width>_676.width()){ +_679+=18; +} +_679-=parseInt(_676.css("marginTop"))||0; +_675.height(_679); +_676.height(_679); +dc.view.height(dc.view2.height()); +} +dc.body2.triggerHandler("scroll"); +function _674(trs1,trs2){ +for(var i=0;i"); +} +_681(true); +_681(false); +_65f(_67e); +function _681(_682){ +var _683=_682?1:2; +var tr=opts.finder.getTr(_67e,_67f,"body",_683); +(_682?dc.body1:dc.body2).children("table.datagrid-btable-frozen").append(tr); +}; +}; +function _684(_685,_686){ +function _687(){ +var _688=[]; +var _689=[]; +$(_685).children("thead").each(function(){ +var opt=$.parser.parseOptions(this,[{frozen:"boolean"}]); +$(this).find("tr").each(function(){ +var cols=[]; +$(this).find("th").each(function(){ +var th=$(this); +var col=$.extend({},$.parser.parseOptions(this,["id","field","align","halign","order","width",{sortable:"boolean",checkbox:"boolean",resizable:"boolean",fixed:"boolean"},{rowspan:"number",colspan:"number"}]),{title:(th.html()||undefined),hidden:(th.attr("hidden")?true:undefined),formatter:(th.attr("formatter")?eval(th.attr("formatter")):undefined),styler:(th.attr("styler")?eval(th.attr("styler")):undefined),sorter:(th.attr("sorter")?eval(th.attr("sorter")):undefined)}); +if(col.width&&String(col.width).indexOf("%")==-1){ +col.width=parseInt(col.width); +} +if(th.attr("editor")){ +var s=$.trim(th.attr("editor")); +if(s.substr(0,1)=="{"){ +col.editor=eval("("+s+")"); +}else{ +col.editor=s; +} +} +cols.push(col); +}); +opt.frozen?_688.push(cols):_689.push(cols); +}); +}); +return [_688,_689]; +}; +var _68a=$("
        "+"
        "+"
        "+"
        "+"
        "+"
        "+"
        "+"
        "+"
        "+"
        "+""+"
        "+"
        "+"
        "+"
        "+"
        "+"
        "+"
        "+"
        "+""+"
        "+"
        "+"
        "+"
        ").insertAfter(_685); +_68a.panel({doSize:false,cls:"datagrid"}); +$(_685).addClass("datagrid-f").hide().appendTo(_68a.children("div.datagrid-view")); +var cc=_687(); +var view=_68a.children("div.datagrid-view"); +var _68b=view.children("div.datagrid-view1"); +var _68c=view.children("div.datagrid-view2"); +return {panel:_68a,frozenColumns:cc[0],columns:cc[1],dc:{view:view,view1:_68b,view2:_68c,header1:_68b.children("div.datagrid-header").children("div.datagrid-header-inner"),header2:_68c.children("div.datagrid-header").children("div.datagrid-header-inner"),body1:_68b.children("div.datagrid-body").children("div.datagrid-body-inner"),body2:_68c.children("div.datagrid-body"),footer1:_68b.children("div.datagrid-footer").children("div.datagrid-footer-inner"),footer2:_68c.children("div.datagrid-footer").children("div.datagrid-footer-inner")}}; +}; +function _68d(_68e){ +var _68f=$.data(_68e,"datagrid"); +var opts=_68f.options; +var dc=_68f.dc; +var _690=_68f.panel; +_68f.ss=$(_68e).datagrid("createStyleSheet"); +_690.panel($.extend({},opts,{id:null,doSize:false,onResize:function(_691,_692){ +if($.data(_68e,"datagrid")){ +_65f(_68e); +$(_68e).datagrid("fitColumns"); +opts.onResize.call(_690,_691,_692); +} +},onExpand:function(){ +if($.data(_68e,"datagrid")){ +$(_68e).datagrid("fixRowHeight").datagrid("fitColumns"); +opts.onExpand.call(_690); +} +}})); +_68f.rowIdPrefix="datagrid-row-r"+(++_645); +_68f.cellClassPrefix="datagrid-cell-c"+_645; +_693(dc.header1,opts.frozenColumns,true); +_693(dc.header2,opts.columns,false); +_694(); +dc.header1.add(dc.header2).css("display",opts.showHeader?"block":"none"); +dc.footer1.add(dc.footer2).css("display",opts.showFooter?"block":"none"); +if(opts.toolbar){ +if($.isArray(opts.toolbar)){ +$("div.datagrid-toolbar",_690).remove(); +var tb=$("
        ").prependTo(_690); +var tr=tb.find("tr"); +for(var i=0;i
        ").appendTo(tr); +}else{ +var td=$("").appendTo(tr); +var tool=$("").appendTo(td); +tool[0].onclick=eval(btn.handler||function(){ +}); +tool.linkbutton($.extend({},btn,{plain:true})); +} +} +}else{ +$(opts.toolbar).addClass("datagrid-toolbar").prependTo(_690); +$(opts.toolbar).show(); +} +}else{ +$("div.datagrid-toolbar",_690).remove(); +} +$("div.datagrid-pager",_690).remove(); +if(opts.pagination){ +var _695=$("
        "); +if(opts.pagePosition=="bottom"){ +_695.appendTo(_690); +}else{ +if(opts.pagePosition=="top"){ +_695.addClass("datagrid-pager-top").prependTo(_690); +}else{ +var ptop=$("
        ").prependTo(_690); +_695.appendTo(_690); +_695=_695.add(ptop); +} +} +_695.pagination({total:0,pageNumber:opts.pageNumber,pageSize:opts.pageSize,pageList:opts.pageList,onSelectPage:function(_696,_697){ +opts.pageNumber=_696||1; +opts.pageSize=_697; +_695.pagination("refresh",{pageNumber:_696,pageSize:_697}); +_6df(_68e); +}}); +opts.pageSize=_695.pagination("options").pageSize; +} +function _693(_698,_699,_69a){ +if(!_699){ +return; +} +$(_698).show(); +$(_698).empty(); +var tmp=$("
        ").appendTo("body"); +tmp._outerWidth(99); +var _69b=100-parseInt(tmp[0].style.width); +tmp.remove(); +var _69c=[]; +var _69d=[]; +var _69e=[]; +if(opts.sortName){ +_69c=opts.sortName.split(","); +_69d=opts.sortOrder.split(","); +} +var t=$("
        ").appendTo(_698); +for(var i=0;i<_699.length;i++){ +var tr=$("").appendTo($("tbody",t)); +var cols=_699[i]; +for(var j=0;j").appendTo(tr); +if(col.checkbox){ +td.attr("field",col.field); +$("
        ").html("").appendTo(td); +}else{ +if(col.field){ +td.attr("field",col.field); +td.append("
        "); +td.find("span:first").html(col.title); +var cell=td.find("div.datagrid-cell"); +var pos=_646(_69c,col.field); +if(pos>=0){ +cell.addClass("datagrid-sort-"+_69d[pos]); +} +if(col.sortable){ +cell.addClass("datagrid-sort"); +} +if(col.resizable==false){ +cell.attr("resizable","false"); +} +if(col.width){ +var _69f=$.parser.parseValue("width",col.width,dc.view,opts.scrollbarSize+(opts.rownumbers?opts.rownumberWidth:0)); +col.deltaWidth=_69b; +col.boxWidth=_69f-_69b; +}else{ +col.auto=true; +} +cell.css("text-align",(col.halign||col.align||"")); +col.cellClass=_68f.cellClassPrefix+"-"+col.field.replace(/[\.|\s]/g,"-"); +cell.addClass(col.cellClass); +}else{ +$("
        ").html(col.title).appendTo(td); +} +} +if(col.hidden){ +td.hide(); +_69e.push(col.field); +} +} +} +if(_69a&&opts.rownumbers){ +var td=$("
        "); +if($("tr",t).length==0){ +td.wrap("").parent().appendTo($("tbody",t)); +}else{ +td.prependTo($("tr:first",t)); +} +} +for(var i=0;i<_69e.length;i++){ +_6e1(_68e,_69e[i],-1); +} +}; +function _694(){ +var _6a0=[[".datagrid-header-rownumber",(opts.rownumberWidth-1)+"px"],[".datagrid-cell-rownumber",(opts.rownumberWidth-1)+"px"]]; +var _6a1=_6a2(_68e,true).concat(_6a2(_68e)); +for(var i=0;i<_6a1.length;i++){ +var col=_6a3(_68e,_6a1[i]); +if(col&&!col.checkbox){ +_6a0.push(["."+col.cellClass,col.boxWidth?col.boxWidth+"px":"auto"]); +} +} +_68f.ss.add(_6a0); +_68f.ss.dirty(_68f.cellSelectorPrefix); +_68f.cellSelectorPrefix="."+_68f.cellClassPrefix; +}; +}; +function _6a4(_6a5){ +var _6a6=$.data(_6a5,"datagrid"); +var _6a7=_6a6.panel; +var opts=_6a6.options; +var dc=_6a6.dc; +var _6a8=dc.header1.add(dc.header2); +_6a8.unbind(".datagrid"); +for(var _6a9 in opts.headerEvents){ +_6a8.bind(_6a9+".datagrid",opts.headerEvents[_6a9]); +} +var _6aa=_6a8.find("div.datagrid-cell"); +var _6ab=opts.resizeHandle=="right"?"e":(opts.resizeHandle=="left"?"w":"e,w"); +_6aa.each(function(){ +$(this).resizable({handles:_6ab,disabled:($(this).attr("resizable")?$(this).attr("resizable")=="false":false),minWidth:25,onStartResize:function(e){ +_6a6.resizing=true; +_6a8.css("cursor",$("body").css("cursor")); +if(!_6a6.proxy){ +_6a6.proxy=$("
        ").appendTo(dc.view); +} +_6a6.proxy.css({left:e.pageX-$(_6a7).offset().left-1,display:"none"}); +setTimeout(function(){ +if(_6a6.proxy){ +_6a6.proxy.show(); +} +},500); +},onResize:function(e){ +_6a6.proxy.css({left:e.pageX-$(_6a7).offset().left-1,display:"block"}); +return false; +},onStopResize:function(e){ +_6a8.css("cursor",""); +$(this).css("height",""); +var _6ac=$(this).parent().attr("field"); +var col=_6a3(_6a5,_6ac); +col.width=$(this)._outerWidth(); +col.boxWidth=col.width-col.deltaWidth; +col.auto=undefined; +$(this).css("width",""); +$(_6a5).datagrid("fixColumnSize",_6ac); +_6a6.proxy.remove(); +_6a6.proxy=null; +if($(this).parents("div:first.datagrid-header").parent().hasClass("datagrid-view1")){ +_65f(_6a5); +} +$(_6a5).datagrid("fitColumns"); +opts.onResizeColumn.call(_6a5,_6ac,col.width); +setTimeout(function(){ +_6a6.resizing=false; +},0); +}}); +}); +var bb=dc.body1.add(dc.body2); +bb.unbind(); +for(var _6a9 in opts.rowEvents){ +bb.bind(_6a9,opts.rowEvents[_6a9]); +} +dc.body1.bind("mousewheel DOMMouseScroll",function(e){ +e.preventDefault(); +var e1=e.originalEvent||window.event; +var _6ad=e1.wheelDelta||e1.detail*(-1); +if("deltaY" in e1){ +_6ad=e1.deltaY*-1; +} +var dg=$(e.target).closest("div.datagrid-view").children(".datagrid-f"); +var dc=dg.data("datagrid").dc; +dc.body2.scrollTop(dc.body2.scrollTop()-_6ad); +}); +dc.body2.bind("scroll",function(){ +var b1=dc.view1.children("div.datagrid-body"); +b1.scrollTop($(this).scrollTop()); +var c1=dc.body1.children(":first"); +var c2=dc.body2.children(":first"); +if(c1.length&&c2.length){ +var top1=c1.offset().top; +var top2=c2.offset().top; +if(top1!=top2){ +b1.scrollTop(b1.scrollTop()+top1-top2); +} +} +dc.view2.children("div.datagrid-header,div.datagrid-footer")._scrollLeft($(this)._scrollLeft()); +dc.body2.children("table.datagrid-btable-frozen").css("left",-$(this)._scrollLeft()); +}); +}; +function _6ae(_6af){ +return function(e){ +var td=$(e.target).closest("td[field]"); +if(td.length){ +var _6b0=_6b1(td); +if(!$(_6b0).data("datagrid").resizing&&_6af){ +td.addClass("datagrid-header-over"); +}else{ +td.removeClass("datagrid-header-over"); +} +} +}; +}; +function _6b2(e){ +var _6b3=_6b1(e.target); +var opts=$(_6b3).datagrid("options"); +var ck=$(e.target).closest("input[type=checkbox]"); +if(ck.length){ +if(opts.singleSelect&&opts.selectOnCheck){ +return false; +} +if(ck.is(":checked")){ +_6b4(_6b3); +}else{ +_6b5(_6b3); +} +e.stopPropagation(); +}else{ +var cell=$(e.target).closest(".datagrid-cell"); +if(cell.length){ +var p1=cell.offset().left+5; +var p2=cell.offset().left+cell._outerWidth()-5; +if(e.pageXp1){ +_6b6(_6b3,cell.parent().attr("field")); +} +} +} +}; +function _6b7(e){ +var _6b8=_6b1(e.target); +var opts=$(_6b8).datagrid("options"); +var cell=$(e.target).closest(".datagrid-cell"); +if(cell.length){ +var p1=cell.offset().left+5; +var p2=cell.offset().left+cell._outerWidth()-5; +var cond=opts.resizeHandle=="right"?(e.pageX>p2):(opts.resizeHandle=="left"?(e.pageXp2)); +if(cond){ +var _6b9=cell.parent().attr("field"); +var col=_6a3(_6b8,_6b9); +if(col.resizable==false){ +return; +} +$(_6b8).datagrid("autoSizeColumn",_6b9); +col.auto=false; +} +} +}; +function _6ba(e){ +var _6bb=_6b1(e.target); +var opts=$(_6bb).datagrid("options"); +var td=$(e.target).closest("td[field]"); +opts.onHeaderContextMenu.call(_6bb,e,td.attr("field")); +}; +function _6bc(_6bd){ +return function(e){ +var tr=_6be(e.target); +if(!tr){ +return; +} +var _6bf=_6b1(tr); +if($.data(_6bf,"datagrid").resizing){ +return; +} +var _6c0=_6c1(tr); +if(_6bd){ +_6c2(_6bf,_6c0); +}else{ +var opts=$.data(_6bf,"datagrid").options; +opts.finder.getTr(_6bf,_6c0).removeClass("datagrid-row-over"); +} +}; +}; +function _6c3(e){ +var tr=_6be(e.target); +if(!tr){ +return; +} +var _6c4=_6b1(tr); +var opts=$.data(_6c4,"datagrid").options; +var _6c5=_6c1(tr); +var tt=$(e.target); +if(tt.parent().hasClass("datagrid-cell-check")){ +if(opts.singleSelect&&opts.selectOnCheck){ +tt._propAttr("checked",!tt.is(":checked")); +_6c6(_6c4,_6c5); +}else{ +if(tt.is(":checked")){ +tt._propAttr("checked",false); +_6c6(_6c4,_6c5); +}else{ +tt._propAttr("checked",true); +_6c7(_6c4,_6c5); +} +} +}else{ +var row=opts.finder.getRow(_6c4,_6c5); +var td=tt.closest("td[field]",tr); +if(td.length){ +var _6c8=td.attr("field"); +opts.onClickCell.call(_6c4,_6c5,_6c8,row[_6c8]); +} +if(opts.singleSelect==true){ +_6c9(_6c4,_6c5); +}else{ +if(opts.ctrlSelect){ +if(e.metaKey||e.ctrlKey){ +if(tr.hasClass("datagrid-row-selected")){ +_6ca(_6c4,_6c5); +}else{ +_6c9(_6c4,_6c5); +} +}else{ +if(e.shiftKey){ +$(_6c4).datagrid("clearSelections"); +var _6cb=Math.min(opts.lastSelectedIndex||0,_6c5); +var _6cc=Math.max(opts.lastSelectedIndex||0,_6c5); +for(var i=_6cb;i<=_6cc;i++){ +_6c9(_6c4,i); +} +}else{ +$(_6c4).datagrid("clearSelections"); +_6c9(_6c4,_6c5); +opts.lastSelectedIndex=_6c5; +} +} +}else{ +if(tr.hasClass("datagrid-row-selected")){ +_6ca(_6c4,_6c5); +}else{ +_6c9(_6c4,_6c5); +} +} +} +opts.onClickRow.apply(_6c4,_649(_6c4,[_6c5,row])); +} +}; +function _6cd(e){ +var tr=_6be(e.target); +if(!tr){ +return; +} +var _6ce=_6b1(tr); +var opts=$.data(_6ce,"datagrid").options; +var _6cf=_6c1(tr); +var row=opts.finder.getRow(_6ce,_6cf); +var td=$(e.target).closest("td[field]",tr); +if(td.length){ +var _6d0=td.attr("field"); +opts.onDblClickCell.call(_6ce,_6cf,_6d0,row[_6d0]); +} +opts.onDblClickRow.apply(_6ce,_649(_6ce,[_6cf,row])); +}; +function _6d1(e){ +var tr=_6be(e.target); +if(tr){ +var _6d2=_6b1(tr); +var opts=$.data(_6d2,"datagrid").options; +var _6d3=_6c1(tr); +var row=opts.finder.getRow(_6d2,_6d3); +opts.onRowContextMenu.call(_6d2,e,_6d3,row); +}else{ +var body=_6be(e.target,".datagrid-body"); +if(body){ +var _6d2=_6b1(body); +var opts=$.data(_6d2,"datagrid").options; +opts.onRowContextMenu.call(_6d2,e,-1,null); +} +} +}; +function _6b1(t){ +return $(t).closest("div.datagrid-view").children(".datagrid-f")[0]; +}; +function _6be(t,_6d4){ +var tr=$(t).closest(_6d4||"tr.datagrid-row"); +if(tr.length&&tr.parent().length){ +return tr; +}else{ +return undefined; +} +}; +function _6c1(tr){ +if(tr.attr("datagrid-row-index")){ +return parseInt(tr.attr("datagrid-row-index")); +}else{ +return tr.attr("node-id"); +} +}; +function _6b6(_6d5,_6d6){ +var _6d7=$.data(_6d5,"datagrid"); +var opts=_6d7.options; +_6d6=_6d6||{}; +var _6d8={sortName:opts.sortName,sortOrder:opts.sortOrder}; +if(typeof _6d6=="object"){ +$.extend(_6d8,_6d6); +} +var _6d9=[]; +var _6da=[]; +if(_6d8.sortName){ +_6d9=_6d8.sortName.split(","); +_6da=_6d8.sortOrder.split(","); +} +if(typeof _6d6=="string"){ +var _6db=_6d6; +var col=_6a3(_6d5,_6db); +if(!col.sortable||_6d7.resizing){ +return; +} +var _6dc=col.order||"asc"; +var pos=_646(_6d9,_6db); +if(pos>=0){ +var _6dd=_6da[pos]=="asc"?"desc":"asc"; +if(opts.multiSort&&_6dd==_6dc){ +_6d9.splice(pos,1); +_6da.splice(pos,1); +}else{ +_6da[pos]=_6dd; +} +}else{ +if(opts.multiSort){ +_6d9.push(_6db); +_6da.push(_6dc); +}else{ +_6d9=[_6db]; +_6da=[_6dc]; +} +} +_6d8.sortName=_6d9.join(","); +_6d8.sortOrder=_6da.join(","); +} +if(opts.onBeforeSortColumn.call(_6d5,_6d8.sortName,_6d8.sortOrder)==false){ +return; +} +$.extend(opts,_6d8); +var dc=_6d7.dc; +var _6de=dc.header1.add(dc.header2); +_6de.find("div.datagrid-cell").removeClass("datagrid-sort-asc datagrid-sort-desc"); +for(var i=0;i<_6d9.length;i++){ +var col=_6a3(_6d5,_6d9[i]); +_6de.find("div."+col.cellClass).addClass("datagrid-sort-"+_6da[i]); +} +if(opts.remoteSort){ +_6df(_6d5); +}else{ +_6e0(_6d5,$(_6d5).datagrid("getData")); +} +opts.onSortColumn.call(_6d5,opts.sortName,opts.sortOrder); +}; +function _6e1(_6e2,_6e3,_6e4){ +_6e5(true); +_6e5(false); +function _6e5(_6e6){ +var aa=_6e7(_6e2,_6e6); +if(aa.length){ +var _6e8=aa[aa.length-1]; +var _6e9=_646(_6e8,_6e3); +if(_6e9>=0){ +for(var _6ea=0;_6ea=_6ef.find("table").width()){ +dc.body2.css("overflow-x","hidden"); +} +function _6f2(){ +if(!opts.fitColumns){ +return; +} +if(!_6ee.leftWidth){ +_6ee.leftWidth=0; +} +var _6f3=0; +var cc=[]; +var _6f4=_6a2(_6ed,false); +for(var i=0;i<_6f4.length;i++){ +var col=_6a3(_6ed,_6f4[i]); +if(_6f5(col)){ +_6f3+=col.width; +cc.push({field:col.field,col:col,addingWidth:0}); +} +} +if(!_6f3){ +return; +} +cc[cc.length-1].addingWidth-=_6ee.leftWidth; +var _6f6=_6ef.children("div.datagrid-header-inner").show(); +var _6f7=_6ef.width()-_6ef.find("table").width()-opts.scrollbarSize+_6ee.leftWidth; +var rate=_6f7/_6f3; +if(!opts.showHeader){ +_6f6.hide(); +} +for(var i=0;i0){ +c.col.boxWidth+=c.addingWidth; +c.col.width+=c.addingWidth; +} +} +_6ee.leftWidth=_6f7; +$(_6ed).datagrid("fixColumnSize"); +}; +function _6f1(){ +var _6f9=false; +var _6fa=_6a2(_6ed,true).concat(_6a2(_6ed,false)); +$.map(_6fa,function(_6fb){ +var col=_6a3(_6ed,_6fb); +if(String(col.width||"").indexOf("%")>=0){ +var _6fc=$.parser.parseValue("width",col.width,dc.view,opts.scrollbarSize+(opts.rownumbers?opts.rownumberWidth:0))-col.deltaWidth; +if(_6fc>0){ +col.boxWidth=_6fc; +_6f9=true; +} +} +}); +if(_6f9){ +$(_6ed).datagrid("fixColumnSize"); +} +}; +function _6f0(fit){ +var _6fd=dc.header1.add(dc.header2).find(".datagrid-cell-group"); +if(_6fd.length){ +_6fd.each(function(){ +$(this)._outerWidth(fit?$(this).parent().width():10); +}); +if(fit){ +_65f(_6ed); +} +} +}; +function _6f5(col){ +if(String(col.width||"").indexOf("%")>=0){ +return false; +} +if(!col.hidden&&!col.checkbox&&!col.auto&&!col.fixed){ +return true; +} +}; +}; +function _6fe(_6ff,_700){ +var _701=$.data(_6ff,"datagrid"); +var opts=_701.options; +var dc=_701.dc; +var tmp=$("
        ").appendTo("body"); +if(_700){ +_65a(_700); +$(_6ff).datagrid("fitColumns"); +}else{ +var _702=false; +var _703=_6a2(_6ff,true).concat(_6a2(_6ff,false)); +for(var i=0;i<_703.length;i++){ +var _700=_703[i]; +var col=_6a3(_6ff,_700); +if(col.auto){ +_65a(_700); +_702=true; +} +} +if(_702){ +$(_6ff).datagrid("fitColumns"); +} +} +tmp.remove(); +function _65a(_704){ +var _705=dc.view.find("div.datagrid-header td[field=\""+_704+"\"] div.datagrid-cell"); +_705.css("width",""); +var col=$(_6ff).datagrid("getColumnOption",_704); +col.width=undefined; +col.boxWidth=undefined; +col.auto=true; +$(_6ff).datagrid("fixColumnSize",_704); +var _706=Math.max(_707("header"),_707("allbody"),_707("allfooter"))+1; +_705._outerWidth(_706-1); +col.width=_706; +col.boxWidth=parseInt(_705[0].style.width); +col.deltaWidth=_706-col.boxWidth; +_705.css("width",""); +$(_6ff).datagrid("fixColumnSize",_704); +opts.onResizeColumn.call(_6ff,_704,col.width); +function _707(type){ +var _708=0; +if(type=="header"){ +_708=_709(_705); +}else{ +opts.finder.getTr(_6ff,0,type).find("td[field=\""+_704+"\"] div.datagrid-cell").each(function(){ +var w=_709($(this)); +if(_7081){ +var col=_6a3(_712,td.attr("field")); +var _714=col.boxWidth+col.deltaWidth-1; +for(var i=1;i<_713;i++){ +td=td.next(); +col=_6a3(_712,td.attr("field")); +_714+=col.boxWidth+col.deltaWidth; +} +$(this).children("div.datagrid-cell")._outerWidth(_714); +} +}); +}; +function _710(_715){ +var dc=$.data(_715,"datagrid").dc; +dc.view.find("div.datagrid-editable").each(function(){ +var cell=$(this); +var _716=cell.parent().attr("field"); +var col=$(_715).datagrid("getColumnOption",_716); +cell._outerWidth(col.boxWidth+col.deltaWidth-1); +var ed=$.data(this,"datagrid.editor"); +if(ed.actions.resize){ +ed.actions.resize(ed.target,cell.width()); +} +}); +}; +function _6a3(_717,_718){ +function find(_719){ +if(_719){ +for(var i=0;i<_719.length;i++){ +var cc=_719[i]; +for(var j=0;j=0){ +var _722=col.field||col.id||""; +for(var c=0;c<(col.colspan||1);c++){ +for(var r=0;r<(col.rowspan||1);r++){ +aa[_71f+r][_720]=_722; +} +_720++; +} +} +}); +} +return aa; +function _71e(){ +var _723=0; +$.map(_71c[0]||[],function(col){ +_723+=col.colspan||1; +}); +return _723; +}; +function _721(a){ +for(var i=0;ib?1:-1); +}; +r=_72a(r1[sn],r2[sn])*(so=="asc"?1:-1); +if(r!=0){ +return r; +} +} +return r; +}); +} +if(opts.view.onBeforeRender){ +opts.view.onBeforeRender.call(opts.view,_726,data.rows); +} +opts.view.render.call(opts.view,_726,dc.body2,false); +opts.view.render.call(opts.view,_726,dc.body1,true); +if(opts.showFooter){ +opts.view.renderFooter.call(opts.view,_726,dc.footer2,false); +opts.view.renderFooter.call(opts.view,_726,dc.footer1,true); +} +if(opts.view.onAfterRender){ +opts.view.onAfterRender.call(opts.view,_726); +} +_727.ss.clean(); +var _72b=$(_726).datagrid("getPager"); +if(_72b.length){ +var _72c=_72b.pagination("options"); +if(_72c.total!=data.total){ +_72b.pagination("refresh",{total:data.total}); +if(opts.pageNumber!=_72c.pageNumber&&_72c.pageNumber>0){ +opts.pageNumber=_72c.pageNumber; +_6df(_726); +} +} +} +_670(_726); +dc.body2.triggerHandler("scroll"); +$(_726).datagrid("setSelectionState"); +$(_726).datagrid("autoSizeColumn"); +opts.onLoadSuccess.call(_726,data); +}; +function _72d(_72e){ +var _72f=$.data(_72e,"datagrid"); +var opts=_72f.options; +var dc=_72f.dc; +dc.header1.add(dc.header2).find("input[type=checkbox]")._propAttr("checked",false); +if(opts.idField){ +var _730=$.data(_72e,"treegrid")?true:false; +var _731=opts.onSelect; +var _732=opts.onCheck; +opts.onSelect=opts.onCheck=function(){ +}; +var rows=opts.finder.getRows(_72e); +for(var i=0;i_743.height()-_744){ +_743.scrollTop(_743.scrollTop()+top+tr._outerHeight()-_743.height()+_744); +} +} +} +}; +function _6c2(_746,_747){ +var _748=$.data(_746,"datagrid"); +var opts=_748.options; +opts.finder.getTr(_746,_748.highlightIndex).removeClass("datagrid-row-over"); +opts.finder.getTr(_746,_747).addClass("datagrid-row-over"); +_748.highlightIndex=_747; +}; +function _6c9(_749,_74a,_74b,_74c){ +var _74d=$.data(_749,"datagrid"); +var opts=_74d.options; +var row=opts.finder.getRow(_749,_74a); +if(!row){ +return; +} +if(opts.onBeforeSelect.apply(_749,_649(_749,[_74a,row]))==false){ +return; +} +if(opts.singleSelect){ +_74e(_749,true); +_74d.selectedRows=[]; +} +if(!_74b&&opts.checkOnSelect){ +_6c6(_749,_74a,true); +} +if(opts.idField){ +_648(_74d.selectedRows,opts.idField,row); +} +opts.finder.getTr(_749,_74a).addClass("datagrid-row-selected"); +opts.onSelect.apply(_749,_649(_749,[_74a,row])); +if(!_74c&&opts.scrollOnSelect){ +_73e(_749,_74a); +} +}; +function _6ca(_74f,_750,_751){ +var _752=$.data(_74f,"datagrid"); +var dc=_752.dc; +var opts=_752.options; +var row=opts.finder.getRow(_74f,_750); +if(!row){ +return; +} +if(opts.onBeforeUnselect.apply(_74f,_649(_74f,[_750,row]))==false){ +return; +} +if(!_751&&opts.checkOnSelect){ +_6c7(_74f,_750,true); +} +opts.finder.getTr(_74f,_750).removeClass("datagrid-row-selected"); +if(opts.idField){ +_647(_752.selectedRows,opts.idField,row[opts.idField]); +} +opts.onUnselect.apply(_74f,_649(_74f,[_750,row])); +}; +function _753(_754,_755){ +var _756=$.data(_754,"datagrid"); +var opts=_756.options; +var rows=opts.finder.getRows(_754); +var _757=$.data(_754,"datagrid").selectedRows; +if(!_755&&opts.checkOnSelect){ +_6b4(_754,true); +} +opts.finder.getTr(_754,"","allbody").addClass("datagrid-row-selected"); +if(opts.idField){ +for(var _758=0;_758"); +cell.children("table").bind("click dblclick contextmenu",function(e){ +e.stopPropagation(); +}); +$.data(cell[0],"datagrid.editor",{actions:_78d,target:_78d.init(cell.find("td"),$.extend({height:opts.editorHeight},_78c)),field:_78a,type:_78b,oldHtml:_78e}); +} +} +}); +_670(_788,_789,true); +}; +function _77f(_790,_791){ +var opts=$.data(_790,"datagrid").options; +var tr=opts.finder.getTr(_790,_791); +tr.children("td").each(function(){ +var cell=$(this).find("div.datagrid-editable"); +if(cell.length){ +var ed=$.data(cell[0],"datagrid.editor"); +if(ed.actions.destroy){ +ed.actions.destroy(ed.target); +} +cell.html(ed.oldHtml); +$.removeData(cell[0],"datagrid.editor"); +cell.removeClass("datagrid-editable"); +cell.css("width",""); +} +}); +}; +function _772(_792,_793){ +var tr=$.data(_792,"datagrid").options.finder.getTr(_792,_793); +if(!tr.hasClass("datagrid-row-editing")){ +return true; +} +var vbox=tr.find(".validatebox-text"); +vbox.validatebox("validate"); +vbox.trigger("mouseleave"); +var _794=tr.find(".validatebox-invalid"); +return _794.length==0; +}; +function _795(_796,_797){ +var _798=$.data(_796,"datagrid").insertedRows; +var _799=$.data(_796,"datagrid").deletedRows; +var _79a=$.data(_796,"datagrid").updatedRows; +if(!_797){ +var rows=[]; +rows=rows.concat(_798); +rows=rows.concat(_799); +rows=rows.concat(_79a); +return rows; +}else{ +if(_797=="inserted"){ +return _798; +}else{ +if(_797=="deleted"){ +return _799; +}else{ +if(_797=="updated"){ +return _79a; +} +} +} +} +return []; +}; +function _79b(_79c,_79d){ +var _79e=$.data(_79c,"datagrid"); +var opts=_79e.options; +var data=_79e.data; +var _79f=_79e.insertedRows; +var _7a0=_79e.deletedRows; +$(_79c).datagrid("cancelEdit",_79d); +var row=opts.finder.getRow(_79c,_79d); +if(_646(_79f,row)>=0){ +_647(_79f,row); +}else{ +_7a0.push(row); +} +_647(_79e.selectedRows,opts.idField,row[opts.idField]); +_647(_79e.checkedRows,opts.idField,row[opts.idField]); +opts.view.deleteRow.call(opts.view,_79c,_79d); +if(opts.height=="auto"){ +_670(_79c); +} +$(_79c).datagrid("getPager").pagination("refresh",{total:data.total}); +}; +function _7a1(_7a2,_7a3){ +var data=$.data(_7a2,"datagrid").data; +var view=$.data(_7a2,"datagrid").options.view; +var _7a4=$.data(_7a2,"datagrid").insertedRows; +view.insertRow.call(view,_7a2,_7a3.index,_7a3.row); +_7a4.push(_7a3.row); +$(_7a2).datagrid("getPager").pagination("refresh",{total:data.total}); +}; +function _7a5(_7a6,row){ +var data=$.data(_7a6,"datagrid").data; +var view=$.data(_7a6,"datagrid").options.view; +var _7a7=$.data(_7a6,"datagrid").insertedRows; +view.insertRow.call(view,_7a6,null,row); +_7a7.push(row); +$(_7a6).datagrid("getPager").pagination("refresh",{total:data.total}); +}; +function _7a8(_7a9,_7aa){ +var _7ab=$.data(_7a9,"datagrid"); +var opts=_7ab.options; +var row=opts.finder.getRow(_7a9,_7aa.index); +var _7ac=false; +_7aa.row=_7aa.row||{}; +for(var _7ad in _7aa.row){ +if(row[_7ad]!==_7aa.row[_7ad]){ +_7ac=true; +break; +} +} +if(_7ac){ +if(_646(_7ab.insertedRows,row)==-1){ +if(_646(_7ab.updatedRows,row)==-1){ +_7ab.updatedRows.push(row); +} +} +opts.view.updateRow.call(opts.view,_7a9,_7aa.index,_7aa.row); +} +}; +function _7ae(_7af){ +var _7b0=$.data(_7af,"datagrid"); +var data=_7b0.data; +var rows=data.rows; +var _7b1=[]; +for(var i=0;i=0){ +(_7be=="s"?_6c9:_6c6)(_7b5,_7bf,true); +} +} +}; +for(var i=0;i0){ +$(this).datagrid("loadData",data); +}else{ +opts.view.setEmptyMsg(this); +$(this).datagrid("autoSizeColumn"); +} +} +_6df(this); +}); +}; +function _7cf(_7d0){ +var _7d1={}; +$.map(_7d0,function(name){ +_7d1[name]=_7d2(name); +}); +return _7d1; +function _7d2(name){ +function isA(_7d3){ +return $.data($(_7d3)[0],name)!=undefined; +}; +return {init:function(_7d4,_7d5){ +var _7d6=$("").appendTo(_7d4); +if(_7d6[name]&&name!="text"){ +return _7d6[name](_7d5); +}else{ +return _7d6; +} +},destroy:function(_7d7){ +if(isA(_7d7,name)){ +$(_7d7)[name]("destroy"); +} +},getValue:function(_7d8){ +if(isA(_7d8,name)){ +var opts=$(_7d8)[name]("options"); +if(opts.multiple){ +return $(_7d8)[name]("getValues").join(opts.separator); +}else{ +return $(_7d8)[name]("getValue"); +} +}else{ +return $(_7d8).val(); +} +},setValue:function(_7d9,_7da){ +if(isA(_7d9,name)){ +var opts=$(_7d9)[name]("options"); +if(opts.multiple){ +if(_7da){ +$(_7d9)[name]("setValues",_7da.split(opts.separator)); +}else{ +$(_7d9)[name]("clear"); +} +}else{ +$(_7d9)[name]("setValue",_7da); +} +}else{ +$(_7d9).val(_7da); +} +},resize:function(_7db,_7dc){ +if(isA(_7db,name)){ +$(_7db)[name]("resize",_7dc); +}else{ +$(_7db)._size({width:_7dc,height:$.fn.datagrid.defaults.editorHeight}); +} +}}; +}; +}; +var _7dd=$.extend({},_7cf(["text","textbox","passwordbox","filebox","numberbox","numberspinner","combobox","combotree","combogrid","combotreegrid","datebox","datetimebox","timespinner","datetimespinner"]),{textarea:{init:function(_7de,_7df){ +var _7e0=$("").appendTo(_7de); +_7e0.css("vertical-align","middle")._outerHeight(_7df.height); +return _7e0; +},getValue:function(_7e1){ +return $(_7e1).val(); +},setValue:function(_7e2,_7e3){ +$(_7e2).val(_7e3); +},resize:function(_7e4,_7e5){ +$(_7e4)._outerWidth(_7e5); +}},checkbox:{init:function(_7e6,_7e7){ +var _7e8=$("").appendTo(_7e6); +_7e8.val(_7e7.on); +_7e8.attr("offval",_7e7.off); +return _7e8; +},getValue:function(_7e9){ +if($(_7e9).is(":checked")){ +return $(_7e9).val(); +}else{ +return $(_7e9).attr("offval"); +} +},setValue:function(_7ea,_7eb){ +var _7ec=false; +if($(_7ea).val()==_7eb){ +_7ec=true; +} +$(_7ea)._propAttr("checked",_7ec); +}},validatebox:{init:function(_7ed,_7ee){ +var _7ef=$("").appendTo(_7ed); +_7ef.validatebox(_7ee); +return _7ef; +},destroy:function(_7f0){ +$(_7f0).validatebox("destroy"); +},getValue:function(_7f1){ +return $(_7f1).val(); +},setValue:function(_7f2,_7f3){ +$(_7f2).val(_7f3); +},resize:function(_7f4,_7f5){ +$(_7f4)._outerWidth(_7f5)._outerHeight($.fn.datagrid.defaults.editorHeight); +}}}); +$.fn.datagrid.methods={options:function(jq){ +var _7f6=$.data(jq[0],"datagrid").options; +var _7f7=$.data(jq[0],"datagrid").panel.panel("options"); +var opts=$.extend(_7f6,{width:_7f7.width,height:_7f7.height,closed:_7f7.closed,collapsed:_7f7.collapsed,minimized:_7f7.minimized,maximized:_7f7.maximized}); +return opts; +},setSelectionState:function(jq){ +return jq.each(function(){ +_72d(this); +}); +},createStyleSheet:function(jq){ +return _64b(jq[0]); +},getPanel:function(jq){ +return $.data(jq[0],"datagrid").panel; +},getPager:function(jq){ +return $.data(jq[0],"datagrid").panel.children("div.datagrid-pager"); +},getColumnFields:function(jq,_7f8){ +return _6a2(jq[0],_7f8); +},getColumnOption:function(jq,_7f9){ +return _6a3(jq[0],_7f9); +},resize:function(jq,_7fa){ +return jq.each(function(){ +_65a(this,_7fa); +}); +},load:function(jq,_7fb){ +return jq.each(function(){ +var opts=$(this).datagrid("options"); +if(typeof _7fb=="string"){ +opts.url=_7fb; +_7fb=null; +} +opts.pageNumber=1; +var _7fc=$(this).datagrid("getPager"); +_7fc.pagination("refresh",{pageNumber:1}); +_6df(this,_7fb); +}); +},reload:function(jq,_7fd){ +return jq.each(function(){ +var opts=$(this).datagrid("options"); +if(typeof _7fd=="string"){ +opts.url=_7fd; +_7fd=null; +} +_6df(this,_7fd); +}); +},reloadFooter:function(jq,_7fe){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +var dc=$.data(this,"datagrid").dc; +if(_7fe){ +$.data(this,"datagrid").footer=_7fe; +} +if(opts.showFooter){ +opts.view.renderFooter.call(opts.view,this,dc.footer2,false); +opts.view.renderFooter.call(opts.view,this,dc.footer1,true); +if(opts.view.onAfterRender){ +opts.view.onAfterRender.call(opts.view,this); +} +$(this).datagrid("fixRowHeight"); +} +}); +},loading:function(jq){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +$(this).datagrid("getPager").pagination("loading"); +if(opts.loadMsg){ +var _7ff=$(this).datagrid("getPanel"); +if(!_7ff.children("div.datagrid-mask").length){ +$("
        ").appendTo(_7ff); +var msg=$("
        ").html(opts.loadMsg).appendTo(_7ff); +msg._outerHeight(40); +msg.css({marginLeft:(-msg.outerWidth()/2),lineHeight:(msg.height()+"px")}); +} +} +}); +},loaded:function(jq){ +return jq.each(function(){ +$(this).datagrid("getPager").pagination("loaded"); +var _800=$(this).datagrid("getPanel"); +_800.children("div.datagrid-mask-msg").remove(); +_800.children("div.datagrid-mask").remove(); +}); +},fitColumns:function(jq){ +return jq.each(function(){ +_6ec(this); +}); +},fixColumnSize:function(jq,_801){ +return jq.each(function(){ +_70a(this,_801); +}); +},fixRowHeight:function(jq,_802){ +return jq.each(function(){ +_670(this,_802); +}); +},freezeRow:function(jq,_803){ +return jq.each(function(){ +_67d(this,_803); +}); +},autoSizeColumn:function(jq,_804){ +return jq.each(function(){ +_6fe(this,_804); +}); +},loadData:function(jq,data){ +return jq.each(function(){ +_6e0(this,data); +_7ae(this); +}); +},getData:function(jq){ +return $.data(jq[0],"datagrid").data; +},getRows:function(jq){ +return $.data(jq[0],"datagrid").data.rows; +},getFooterRows:function(jq){ +return $.data(jq[0],"datagrid").footer; +},getRowIndex:function(jq,id){ +return _735(jq[0],id); +},getChecked:function(jq){ +return _73b(jq[0]); +},getSelected:function(jq){ +var rows=_738(jq[0]); +return rows.length>0?rows[0]:null; +},getSelections:function(jq){ +return _738(jq[0]); +},clearSelections:function(jq){ +return jq.each(function(){ +var _805=$.data(this,"datagrid"); +var _806=_805.selectedRows; +var _807=_805.checkedRows; +_806.splice(0,_806.length); +_74e(this); +if(_805.options.checkOnSelect){ +_807.splice(0,_807.length); +} +}); +},clearChecked:function(jq){ +return jq.each(function(){ +var _808=$.data(this,"datagrid"); +var _809=_808.selectedRows; +var _80a=_808.checkedRows; +_80a.splice(0,_80a.length); +_6b5(this); +if(_808.options.selectOnCheck){ +_809.splice(0,_809.length); +} +}); +},scrollTo:function(jq,_80b){ +return jq.each(function(){ +_73e(this,_80b); +}); +},highlightRow:function(jq,_80c){ +return jq.each(function(){ +_6c2(this,_80c); +_73e(this,_80c); +}); +},selectAll:function(jq){ +return jq.each(function(){ +_753(this); +}); +},unselectAll:function(jq){ +return jq.each(function(){ +_74e(this); +}); +},selectRow:function(jq,_80d){ +return jq.each(function(){ +_6c9(this,_80d); +}); +},selectRecord:function(jq,id){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +if(opts.idField){ +var _80e=_735(this,id); +if(_80e>=0){ +$(this).datagrid("selectRow",_80e); +} +} +}); +},unselectRow:function(jq,_80f){ +return jq.each(function(){ +_6ca(this,_80f); +}); +},checkRow:function(jq,_810){ +return jq.each(function(){ +_6c6(this,_810); +}); +},uncheckRow:function(jq,_811){ +return jq.each(function(){ +_6c7(this,_811); +}); +},checkAll:function(jq){ +return jq.each(function(){ +_6b4(this); +}); +},uncheckAll:function(jq){ +return jq.each(function(){ +_6b5(this); +}); +},beginEdit:function(jq,_812){ +return jq.each(function(){ +_76d(this,_812); +}); +},endEdit:function(jq,_813){ +return jq.each(function(){ +_773(this,_813,false); +}); +},cancelEdit:function(jq,_814){ +return jq.each(function(){ +_773(this,_814,true); +}); +},getEditors:function(jq,_815){ +return _780(jq[0],_815); +},getEditor:function(jq,_816){ +return _784(jq[0],_816); +},refreshRow:function(jq,_817){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +opts.view.refreshRow.call(opts.view,this,_817); +}); +},validateRow:function(jq,_818){ +return _772(jq[0],_818); +},updateRow:function(jq,_819){ +return jq.each(function(){ +_7a8(this,_819); +}); +},appendRow:function(jq,row){ +return jq.each(function(){ +_7a5(this,row); +}); +},insertRow:function(jq,_81a){ +return jq.each(function(){ +_7a1(this,_81a); +}); +},deleteRow:function(jq,_81b){ +return jq.each(function(){ +_79b(this,_81b); +}); +},getChanges:function(jq,_81c){ +return _795(jq[0],_81c); +},acceptChanges:function(jq){ +return jq.each(function(){ +_7b2(this); +}); +},rejectChanges:function(jq){ +return jq.each(function(){ +_7b4(this); +}); +},mergeCells:function(jq,_81d){ +return jq.each(function(){ +_7c6(this,_81d); +}); +},showColumn:function(jq,_81e){ +return jq.each(function(){ +var col=$(this).datagrid("getColumnOption",_81e); +if(col.hidden){ +col.hidden=false; +$(this).datagrid("getPanel").find("td[field=\""+_81e+"\"]").show(); +_6e1(this,_81e,1); +$(this).datagrid("fitColumns"); +} +}); +},hideColumn:function(jq,_81f){ +return jq.each(function(){ +var col=$(this).datagrid("getColumnOption",_81f); +if(!col.hidden){ +col.hidden=true; +$(this).datagrid("getPanel").find("td[field=\""+_81f+"\"]").hide(); +_6e1(this,_81f,-1); +$(this).datagrid("fitColumns"); +} +}); +},sort:function(jq,_820){ +return jq.each(function(){ +_6b6(this,_820); +}); +},gotoPage:function(jq,_821){ +return jq.each(function(){ +var _822=this; +var page,cb; +if(typeof _821=="object"){ +page=_821.page; +cb=_821.callback; +}else{ +page=_821; +} +$(_822).datagrid("options").pageNumber=page; +$(_822).datagrid("getPager").pagination("refresh",{pageNumber:page}); +_6df(_822,null,function(){ +if(cb){ +cb.call(_822,page); +} +}); +}); +}}; +$.fn.datagrid.parseOptions=function(_823){ +var t=$(_823); +return $.extend({},$.fn.panel.parseOptions(_823),$.parser.parseOptions(_823,["url","toolbar","idField","sortName","sortOrder","pagePosition","resizeHandle",{sharedStyleSheet:"boolean",fitColumns:"boolean",autoRowHeight:"boolean",striped:"boolean",nowrap:"boolean"},{rownumbers:"boolean",singleSelect:"boolean",ctrlSelect:"boolean",checkOnSelect:"boolean",selectOnCheck:"boolean"},{pagination:"boolean",pageSize:"number",pageNumber:"number"},{multiSort:"boolean",remoteSort:"boolean",showHeader:"boolean",showFooter:"boolean"},{scrollbarSize:"number",scrollOnSelect:"boolean"}]),{pageList:(t.attr("pageList")?eval(t.attr("pageList")):undefined),loadMsg:(t.attr("loadMsg")!=undefined?t.attr("loadMsg"):undefined),rowStyler:(t.attr("rowStyler")?eval(t.attr("rowStyler")):undefined)}); +}; +$.fn.datagrid.parseData=function(_824){ +var t=$(_824); +var data={total:0,rows:[]}; +var _825=t.datagrid("getColumnFields",true).concat(t.datagrid("getColumnFields",false)); +t.find("tbody tr").each(function(){ +data.total++; +var row={}; +$.extend(row,$.parser.parseOptions(this,["iconCls","state"])); +for(var i=0;i<_825.length;i++){ +row[_825[i]]=$(this).find("td:eq("+i+")").html(); +} +data.rows.push(row); +}); +return data; +}; +var _826={render:function(_827,_828,_829){ +var rows=$(_827).datagrid("getRows"); +$(_828).html(this.renderTable(_827,0,rows,_829)); +},renderFooter:function(_82a,_82b,_82c){ +var opts=$.data(_82a,"datagrid").options; +var rows=$.data(_82a,"datagrid").footer||[]; +var _82d=$(_82a).datagrid("getColumnFields",_82c); +var _82e=[""]; +for(var i=0;i"); +_82e.push(this.renderRow.call(this,_82a,_82d,_82c,i,rows[i])); +_82e.push(""); +} +_82e.push("
        "); +$(_82b).html(_82e.join("")); +},renderTable:function(_82f,_830,rows,_831){ +var _832=$.data(_82f,"datagrid"); +var opts=_832.options; +if(_831){ +if(!(opts.rownumbers||(opts.frozenColumns&&opts.frozenColumns.length))){ +return ""; +} +} +var _833=$(_82f).datagrid("getColumnFields",_831); +var _834=[""]; +for(var i=0;i"); +_834.push(this.renderRow.call(this,_82f,_833,_831,_830,row)); +_834.push(""); +_830++; +} +_834.push("
        "); +return _834.join(""); +},renderRow:function(_837,_838,_839,_83a,_83b){ +var opts=$.data(_837,"datagrid").options; +var cc=[]; +if(_839&&opts.rownumbers){ +var _83c=_83a+1; +if(opts.pagination){ +_83c+=(opts.pageNumber-1)*opts.pageSize; +} +cc.push("
        "+_83c+"
        "); +} +for(var i=0;i<_838.length;i++){ +var _83d=_838[i]; +var col=$(_837).datagrid("getColumnOption",_83d); +if(col){ +var _83e=_83b[_83d]; +var css=col.styler?(col.styler.call(_837,_83e,_83b,_83a)||""):""; +var cs=this.getStyleValue(css); +var cls=cs.c?"class=\""+cs.c+"\"":""; +var _83f=col.hidden?"style=\"display:none;"+cs.s+"\"":(cs.s?"style=\""+cs.s+"\"":""); +cc.push(""); +var _83f=""; +if(!col.checkbox){ +if(col.align){ +_83f+="text-align:"+col.align+";"; +} +if(!opts.nowrap){ +_83f+="white-space:normal;height:auto;"; +}else{ +if(opts.autoRowHeight){ +_83f+="height:auto;"; +} +} +} +cc.push("
        "); +if(col.checkbox){ +cc.push(""); +}else{ +if(col.formatter){ +cc.push(col.formatter(_83e,_83b,_83a)); +}else{ +cc.push(_83e); +} +} +cc.push("
        "); +cc.push(""); +} +} +return cc.join(""); +},getStyleValue:function(css){ +var _840=""; +var _841=""; +if(typeof css=="string"){ +_841=css; +}else{ +if(css){ +_840=css["class"]||""; +_841=css["style"]||""; +} +} +return {c:_840,s:_841}; +},refreshRow:function(_842,_843){ +this.updateRow.call(this,_842,_843,{}); +},updateRow:function(_844,_845,row){ +var opts=$.data(_844,"datagrid").options; +var _846=opts.finder.getRow(_844,_845); +$.extend(_846,row); +var cs=_847.call(this,_845); +var _848=cs.s; +var cls="datagrid-row "+(_845%2&&opts.striped?"datagrid-row-alt ":" ")+cs.c; +function _847(_849){ +var css=opts.rowStyler?opts.rowStyler.call(_844,_849,_846):""; +return this.getStyleValue(css); +}; +function _84a(_84b){ +var tr=opts.finder.getTr(_844,_845,"body",(_84b?1:2)); +if(!tr.length){ +return; +} +var _84c=$(_844).datagrid("getColumnFields",_84b); +var _84d=tr.find("div.datagrid-cell-check input[type=checkbox]").is(":checked"); +tr.html(this.renderRow.call(this,_844,_84c,_84b,_845,_846)); +var _84e=(tr.hasClass("datagrid-row-checked")?" datagrid-row-checked":"")+(tr.hasClass("datagrid-row-selected")?" datagrid-row-selected":""); +tr.attr("style",_848).attr("class",cls+_84e); +if(_84d){ +tr.find("div.datagrid-cell-check input[type=checkbox]")._propAttr("checked",true); +} +}; +_84a.call(this,true); +_84a.call(this,false); +$(_844).datagrid("fixRowHeight",_845); +},insertRow:function(_84f,_850,row){ +var _851=$.data(_84f,"datagrid"); +var opts=_851.options; +var dc=_851.dc; +var data=_851.data; +if(_850==undefined||_850==null){ +_850=data.rows.length; +} +if(_850>data.rows.length){ +_850=data.rows.length; +} +function _852(_853){ +var _854=_853?1:2; +for(var i=data.rows.length-1;i>=_850;i--){ +var tr=opts.finder.getTr(_84f,i,"body",_854); +tr.attr("datagrid-row-index",i+1); +tr.attr("id",_851.rowIdPrefix+"-"+_854+"-"+(i+1)); +if(_853&&opts.rownumbers){ +var _855=i+2; +if(opts.pagination){ +_855+=(opts.pageNumber-1)*opts.pageSize; +} +tr.find("div.datagrid-cell-rownumber").html(_855); +} +if(opts.striped){ +tr.removeClass("datagrid-row-alt").addClass((i+1)%2?"datagrid-row-alt":""); +} +} +}; +function _856(_857){ +var _858=_857?1:2; +var _859=$(_84f).datagrid("getColumnFields",_857); +var _85a=_851.rowIdPrefix+"-"+_858+"-"+_850; +var tr=""; +if(_850>=data.rows.length){ +if(data.rows.length){ +opts.finder.getTr(_84f,"","last",_858).after(tr); +}else{ +var cc=_857?dc.body1:dc.body2; +cc.html(""+tr+"
        "); +} +}else{ +opts.finder.getTr(_84f,_850+1,"body",_858).before(tr); +} +}; +_852.call(this,true); +_852.call(this,false); +_856.call(this,true); +_856.call(this,false); +data.total+=1; +data.rows.splice(_850,0,row); +this.setEmptyMsg(_84f); +this.refreshRow.call(this,_84f,_850); +},deleteRow:function(_85b,_85c){ +var _85d=$.data(_85b,"datagrid"); +var opts=_85d.options; +var data=_85d.data; +function _85e(_85f){ +var _860=_85f?1:2; +for(var i=_85c+1;i
        ").appendTo(_867.dc.view); +d.html(opts.emptyMsg).css("top",h+"px"); +} +} +},renderEmptyRow:function(_869){ +var cols=$.map($(_869).datagrid("getColumnFields"),function(_86a){ +return $(_869).datagrid("getColumnOption",_86a); +}); +$.map(cols,function(col){ +col.formatter1=col.formatter; +col.styler1=col.styler; +col.formatter=col.styler=undefined; +}); +var _86b=$.data(_869,"datagrid").dc.body2; +_86b.html(this.renderTable(_869,0,[{}],false)); +_86b.find("tbody *").css({height:1,borderColor:"transparent",background:"transparent"}); +var tr=_86b.find(".datagrid-row"); +tr.removeClass("datagrid-row").removeAttr("datagrid-row-index"); +tr.find(".datagrid-cell,.datagrid-cell-check").empty(); +$.map(cols,function(col){ +col.formatter=col.formatter1; +col.styler=col.styler1; +col.formatter1=col.styler1=undefined; +}); +}}; +$.fn.datagrid.defaults=$.extend({},$.fn.panel.defaults,{sharedStyleSheet:false,frozenColumns:undefined,columns:undefined,fitColumns:false,resizeHandle:"right",autoRowHeight:true,toolbar:null,striped:false,method:"post",nowrap:true,idField:null,url:null,data:null,loadMsg:"Processing, please wait ...",emptyMsg:"",rownumbers:false,singleSelect:false,ctrlSelect:false,selectOnCheck:true,checkOnSelect:true,pagination:false,pagePosition:"bottom",pageNumber:1,pageSize:10,pageList:[10,20,30,40,50],queryParams:{},sortName:null,sortOrder:"asc",multiSort:false,remoteSort:true,showHeader:true,showFooter:false,scrollOnSelect:true,scrollbarSize:18,rownumberWidth:30,editorHeight:24,headerEvents:{mouseover:_6ae(true),mouseout:_6ae(false),click:_6b2,dblclick:_6b7,contextmenu:_6ba},rowEvents:{mouseover:_6bc(true),mouseout:_6bc(false),click:_6c3,dblclick:_6cd,contextmenu:_6d1},rowStyler:function(_86c,_86d){ +},loader:function(_86e,_86f,_870){ +var opts=$(this).datagrid("options"); +if(!opts.url){ +return false; +} +$.ajax({type:opts.method,url:opts.url,data:_86e,dataType:"json",success:function(data){ +_86f(data); +},error:function(){ +_870.apply(this,arguments); +}}); +},loadFilter:function(data){ +return data; +},editors:_7dd,finder:{getTr:function(_871,_872,type,_873){ +type=type||"body"; +_873=_873||0; +var _874=$.data(_871,"datagrid"); +var dc=_874.dc; +var opts=_874.options; +if(_873==0){ +var tr1=opts.finder.getTr(_871,_872,type,1); +var tr2=opts.finder.getTr(_871,_872,type,2); +return tr1.add(tr2); +}else{ +if(type=="body"){ +var tr=$("#"+_874.rowIdPrefix+"-"+_873+"-"+_872); +if(!tr.length){ +tr=(_873==1?dc.body1:dc.body2).find(">table>tbody>tr[datagrid-row-index="+_872+"]"); +} +return tr; +}else{ +if(type=="footer"){ +return (_873==1?dc.footer1:dc.footer2).find(">table>tbody>tr[datagrid-row-index="+_872+"]"); +}else{ +if(type=="selected"){ +return (_873==1?dc.body1:dc.body2).find(">table>tbody>tr.datagrid-row-selected"); +}else{ +if(type=="highlight"){ +return (_873==1?dc.body1:dc.body2).find(">table>tbody>tr.datagrid-row-over"); +}else{ +if(type=="checked"){ +return (_873==1?dc.body1:dc.body2).find(">table>tbody>tr.datagrid-row-checked"); +}else{ +if(type=="editing"){ +return (_873==1?dc.body1:dc.body2).find(">table>tbody>tr.datagrid-row-editing"); +}else{ +if(type=="last"){ +return (_873==1?dc.body1:dc.body2).find(">table>tbody>tr[datagrid-row-index]:last"); +}else{ +if(type=="allbody"){ +return (_873==1?dc.body1:dc.body2).find(">table>tbody>tr[datagrid-row-index]"); +}else{ +if(type=="allfooter"){ +return (_873==1?dc.footer1:dc.footer2).find(">table>tbody>tr[datagrid-row-index]"); +} +} +} +} +} +} +} +} +} +} +},getRow:function(_875,p){ +var _876=(typeof p=="object")?p.attr("datagrid-row-index"):p; +return $.data(_875,"datagrid").data.rows[parseInt(_876)]; +},getRows:function(_877){ +return $(_877).datagrid("getRows"); +}},view:_826,onBeforeLoad:function(_878){ +},onLoadSuccess:function(){ +},onLoadError:function(){ +},onClickRow:function(_879,_87a){ +},onDblClickRow:function(_87b,_87c){ +},onClickCell:function(_87d,_87e,_87f){ +},onDblClickCell:function(_880,_881,_882){ +},onBeforeSortColumn:function(sort,_883){ +},onSortColumn:function(sort,_884){ +},onResizeColumn:function(_885,_886){ +},onBeforeSelect:function(_887,_888){ +},onSelect:function(_889,_88a){ +},onBeforeUnselect:function(_88b,_88c){ +},onUnselect:function(_88d,_88e){ +},onSelectAll:function(rows){ +},onUnselectAll:function(rows){ +},onBeforeCheck:function(_88f,_890){ +},onCheck:function(_891,_892){ +},onBeforeUncheck:function(_893,_894){ +},onUncheck:function(_895,_896){ +},onCheckAll:function(rows){ +},onUncheckAll:function(rows){ +},onBeforeEdit:function(_897,_898){ +},onBeginEdit:function(_899,_89a){ +},onEndEdit:function(_89b,_89c,_89d){ +},onAfterEdit:function(_89e,_89f,_8a0){ +},onCancelEdit:function(_8a1,_8a2){ +},onHeaderContextMenu:function(e,_8a3){ +},onRowContextMenu:function(e,_8a4,_8a5){ +}}); +})(jQuery); +(function($){ +var _8a6; +$(document).unbind(".propertygrid").bind("mousedown.propertygrid",function(e){ +var p=$(e.target).closest("div.datagrid-view,div.combo-panel"); +if(p.length){ +return; +} +_8a7(_8a6); +_8a6=undefined; +}); +function _8a8(_8a9){ +var _8aa=$.data(_8a9,"propertygrid"); +var opts=$.data(_8a9,"propertygrid").options; +$(_8a9).datagrid($.extend({},opts,{cls:"propertygrid",view:(opts.showGroup?opts.groupView:opts.view),onBeforeEdit:function(_8ab,row){ +if(opts.onBeforeEdit.call(_8a9,_8ab,row)==false){ +return false; +} +var dg=$(this); +var row=dg.datagrid("getRows")[_8ab]; +var col=dg.datagrid("getColumnOption","value"); +col.editor=row.editor; +},onClickCell:function(_8ac,_8ad,_8ae){ +if(_8a6!=this){ +_8a7(_8a6); +_8a6=this; +} +if(opts.editIndex!=_8ac){ +_8a7(_8a6); +$(this).datagrid("beginEdit",_8ac); +var ed=$(this).datagrid("getEditor",{index:_8ac,field:_8ad}); +if(!ed){ +ed=$(this).datagrid("getEditor",{index:_8ac,field:"value"}); +} +if(ed){ +var t=$(ed.target); +var _8af=t.data("textbox")?t.textbox("textbox"):t; +_8af.focus(); +opts.editIndex=_8ac; +} +} +opts.onClickCell.call(_8a9,_8ac,_8ad,_8ae); +},loadFilter:function(data){ +_8a7(this); +return opts.loadFilter.call(this,data); +}})); +}; +function _8a7(_8b0){ +var t=$(_8b0); +if(!t.length){ +return; +} +var opts=$.data(_8b0,"propertygrid").options; +opts.finder.getTr(_8b0,null,"editing").each(function(){ +var _8b1=parseInt($(this).attr("datagrid-row-index")); +if(t.datagrid("validateRow",_8b1)){ +t.datagrid("endEdit",_8b1); +}else{ +t.datagrid("cancelEdit",_8b1); +} +}); +opts.editIndex=undefined; +}; +$.fn.propertygrid=function(_8b2,_8b3){ +if(typeof _8b2=="string"){ +var _8b4=$.fn.propertygrid.methods[_8b2]; +if(_8b4){ +return _8b4(this,_8b3); +}else{ +return this.datagrid(_8b2,_8b3); +} +} +_8b2=_8b2||{}; +return this.each(function(){ +var _8b5=$.data(this,"propertygrid"); +if(_8b5){ +$.extend(_8b5.options,_8b2); +}else{ +var opts=$.extend({},$.fn.propertygrid.defaults,$.fn.propertygrid.parseOptions(this),_8b2); +opts.frozenColumns=$.extend(true,[],opts.frozenColumns); +opts.columns=$.extend(true,[],opts.columns); +$.data(this,"propertygrid",{options:opts}); +} +_8a8(this); +}); +}; +$.fn.propertygrid.methods={options:function(jq){ +return $.data(jq[0],"propertygrid").options; +}}; +$.fn.propertygrid.parseOptions=function(_8b6){ +return $.extend({},$.fn.datagrid.parseOptions(_8b6),$.parser.parseOptions(_8b6,[{showGroup:"boolean"}])); +}; +var _8b7=$.extend({},$.fn.datagrid.defaults.view,{render:function(_8b8,_8b9,_8ba){ +var _8bb=[]; +var _8bc=this.groups; +for(var i=0;i<_8bc.length;i++){ +_8bb.push(this.renderGroup.call(this,_8b8,i,_8bc[i],_8ba)); +} +$(_8b9).html(_8bb.join("")); +},renderGroup:function(_8bd,_8be,_8bf,_8c0){ +var _8c1=$.data(_8bd,"datagrid"); +var opts=_8c1.options; +var _8c2=$(_8bd).datagrid("getColumnFields",_8c0); +var _8c3=[]; +_8c3.push("
        "); +if((_8c0&&(opts.rownumbers||opts.frozenColumns.length))||(!_8c0&&!(opts.rownumbers||opts.frozenColumns.length))){ +_8c3.push(""); +_8c3.push(" "); +_8c3.push(""); +} +if(!_8c0){ +_8c3.push(""); +_8c3.push(opts.groupFormatter.call(_8bd,_8bf.value,_8bf.rows)); +_8c3.push(""); +} +_8c3.push("
        "); +_8c3.push(""); +var _8c4=_8bf.startIndex; +for(var j=0;j<_8bf.rows.length;j++){ +var css=opts.rowStyler?opts.rowStyler.call(_8bd,_8c4,_8bf.rows[j]):""; +var _8c5=""; +var _8c6=""; +if(typeof css=="string"){ +_8c6=css; +}else{ +if(css){ +_8c5=css["class"]||""; +_8c6=css["style"]||""; +} +} +var cls="class=\"datagrid-row "+(_8c4%2&&opts.striped?"datagrid-row-alt ":" ")+_8c5+"\""; +var _8c7=_8c6?"style=\""+_8c6+"\"":""; +var _8c8=_8c1.rowIdPrefix+"-"+(_8c0?1:2)+"-"+_8c4; +_8c3.push(""); +_8c3.push(this.renderRow.call(this,_8bd,_8c2,_8c0,_8c4,_8bf.rows[j])); +_8c3.push(""); +_8c4++; +} +_8c3.push("
        "); +return _8c3.join(""); +},bindEvents:function(_8c9){ +var _8ca=$.data(_8c9,"datagrid"); +var dc=_8ca.dc; +var body=dc.body1.add(dc.body2); +var _8cb=($.data(body[0],"events")||$._data(body[0],"events")).click[0].handler; +body.unbind("click").bind("click",function(e){ +var tt=$(e.target); +var _8cc=tt.closest("span.datagrid-row-expander"); +if(_8cc.length){ +var _8cd=_8cc.closest("div.datagrid-group").attr("group-index"); +if(_8cc.hasClass("datagrid-row-collapse")){ +$(_8c9).datagrid("collapseGroup",_8cd); +}else{ +$(_8c9).datagrid("expandGroup",_8cd); +} +}else{ +_8cb(e); +} +e.stopPropagation(); +}); +},onBeforeRender:function(_8ce,rows){ +var _8cf=$.data(_8ce,"datagrid"); +var opts=_8cf.options; +_8d0(); +var _8d1=[]; +for(var i=0;i"+".datagrid-group{height:"+opts.groupHeight+"px;overflow:hidden;font-weight:bold;border-bottom:1px solid #ccc;}"+".datagrid-group-title,.datagrid-group-expander{display:inline-block;vertical-align:bottom;height:100%;line-height:"+opts.groupHeight+"px;padding:0 4px;}"+".datagrid-group-expander{width:"+opts.expanderWidth+"px;text-align:center;padding:0}"+".datagrid-row-expander{margin:"+Math.floor((opts.groupHeight-16)/2)+"px 0;display:inline-block;width:16px;height:16px;cursor:pointer}"+""); +} +}; +}}); +$.extend($.fn.datagrid.methods,{groups:function(jq){ +return jq.datagrid("options").view.groups; +},expandGroup:function(jq,_8d8){ +return jq.each(function(){ +var view=$.data(this,"datagrid").dc.view; +var _8d9=view.find(_8d8!=undefined?"div.datagrid-group[group-index=\""+_8d8+"\"]":"div.datagrid-group"); +var _8da=_8d9.find("span.datagrid-row-expander"); +if(_8da.hasClass("datagrid-row-expand")){ +_8da.removeClass("datagrid-row-expand").addClass("datagrid-row-collapse"); +_8d9.next("table").show(); +} +$(this).datagrid("fixRowHeight"); +}); +},collapseGroup:function(jq,_8db){ +return jq.each(function(){ +var view=$.data(this,"datagrid").dc.view; +var _8dc=view.find(_8db!=undefined?"div.datagrid-group[group-index=\""+_8db+"\"]":"div.datagrid-group"); +var _8dd=_8dc.find("span.datagrid-row-expander"); +if(_8dd.hasClass("datagrid-row-collapse")){ +_8dd.removeClass("datagrid-row-collapse").addClass("datagrid-row-expand"); +_8dc.next("table").hide(); +} +$(this).datagrid("fixRowHeight"); +}); +}}); +$.extend(_8b7,{refreshGroupTitle:function(_8de,_8df){ +var _8e0=$.data(_8de,"datagrid"); +var opts=_8e0.options; +var dc=_8e0.dc; +var _8e1=this.groups[_8df]; +var span=dc.body2.children("div.datagrid-group[group-index="+_8df+"]").find("span.datagrid-group-title"); +span.html(opts.groupFormatter.call(_8de,_8e1.value,_8e1.rows)); +},insertRow:function(_8e2,_8e3,row){ +var _8e4=$.data(_8e2,"datagrid"); +var opts=_8e4.options; +var dc=_8e4.dc; +var _8e5=null; +var _8e6; +if(!_8e4.data.rows.length){ +$(_8e2).datagrid("loadData",[row]); +return; +} +for(var i=0;i_8e5.startIndex+_8e5.rows.length){ +_8e3=_8e5.startIndex+_8e5.rows.length; +} +} +$.fn.datagrid.defaults.view.insertRow.call(this,_8e2,_8e3,row); +if(_8e3>=_8e5.startIndex+_8e5.rows.length){ +_8e7(_8e3,true); +_8e7(_8e3,false); +} +_8e5.rows.splice(_8e3-_8e5.startIndex,0,row); +}else{ +_8e5={value:row[opts.groupField],rows:[row],startIndex:_8e4.data.rows.length}; +_8e6=this.groups.length; +dc.body1.append(this.renderGroup.call(this,_8e2,_8e6,_8e5,true)); +dc.body2.append(this.renderGroup.call(this,_8e2,_8e6,_8e5,false)); +this.groups.push(_8e5); +_8e4.data.rows.push(row); +} +this.refreshGroupTitle(_8e2,_8e6); +function _8e7(_8e8,_8e9){ +var _8ea=_8e9?1:2; +var _8eb=opts.finder.getTr(_8e2,_8e8-1,"body",_8ea); +var tr=opts.finder.getTr(_8e2,_8e8,"body",_8ea); +tr.insertAfter(_8eb); +}; +},updateRow:function(_8ec,_8ed,row){ +var opts=$.data(_8ec,"datagrid").options; +$.fn.datagrid.defaults.view.updateRow.call(this,_8ec,_8ed,row); +var tb=opts.finder.getTr(_8ec,_8ed,"body",2).closest("table.datagrid-btable"); +var _8ee=parseInt(tb.prev().attr("group-index")); +this.refreshGroupTitle(_8ec,_8ee); +},deleteRow:function(_8ef,_8f0){ +var _8f1=$.data(_8ef,"datagrid"); +var opts=_8f1.options; +var dc=_8f1.dc; +var body=dc.body1.add(dc.body2); +var tb=opts.finder.getTr(_8ef,_8f0,"body",2).closest("table.datagrid-btable"); +var _8f2=parseInt(tb.prev().attr("group-index")); +$.fn.datagrid.defaults.view.deleteRow.call(this,_8ef,_8f0); +var _8f3=this.groups[_8f2]; +if(_8f3.rows.length>1){ +_8f3.rows.splice(_8f0-_8f3.startIndex,1); +this.refreshGroupTitle(_8ef,_8f2); +}else{ +body.children("div.datagrid-group[group-index="+_8f2+"]").remove(); +for(var i=_8f2+1;i").insertBefore(tr.find(".tree-title")); +} +if(row.checkState=="checked"){ +_917(_92b,_92c,true,true); +}else{ +if(row.checkState=="unchecked"){ +_917(_92b,_92c,false,true); +}else{ +var flag=_929(row); +if(flag===0){ +_917(_92b,_92c,false,true); +}else{ +if(flag===1){ +_917(_92b,_92c,true,true); +} +} +} +} +}else{ +ck.remove(); +row.checkState=undefined; +row.checked=undefined; +_920(_92b,row); +} +}; +function _92d(_92e,_92f){ +var opts=$.data(_92e,"treegrid").options; +var tr1=opts.finder.getTr(_92e,_92f,"body",1); +var tr2=opts.finder.getTr(_92e,_92f,"body",2); +var _930=$(_92e).datagrid("getColumnFields",true).length+(opts.rownumbers?1:0); +var _931=$(_92e).datagrid("getColumnFields",false).length; +_932(tr1,_930); +_932(tr2,_931); +function _932(tr,_933){ +$(""+""+"
        "+""+"").insertAfter(tr); +}; +}; +function _934(_935,_936,data,_937,_938){ +var _939=$.data(_935,"treegrid"); +var opts=_939.options; +var dc=_939.dc; +data=opts.loadFilter.call(_935,data,_936); +var node=find(_935,_936); +if(node){ +var _93a=opts.finder.getTr(_935,_936,"body",1); +var _93b=opts.finder.getTr(_935,_936,"body",2); +var cc1=_93a.next("tr.treegrid-tr-tree").children("td").children("div"); +var cc2=_93b.next("tr.treegrid-tr-tree").children("td").children("div"); +if(!_937){ +node.children=[]; +} +}else{ +var cc1=dc.body1; +var cc2=dc.body2; +if(!_937){ +_939.data=[]; +} +} +if(!_937){ +cc1.empty(); +cc2.empty(); +} +if(opts.view.onBeforeRender){ +opts.view.onBeforeRender.call(opts.view,_935,_936,data); +} +opts.view.render.call(opts.view,_935,cc1,true); +opts.view.render.call(opts.view,_935,cc2,false); +if(opts.showFooter){ +opts.view.renderFooter.call(opts.view,_935,dc.footer1,true); +opts.view.renderFooter.call(opts.view,_935,dc.footer2,false); +} +if(opts.view.onAfterRender){ +opts.view.onAfterRender.call(opts.view,_935); +} +if(!_936&&opts.pagination){ +var _93c=$.data(_935,"treegrid").total; +var _93d=$(_935).datagrid("getPager"); +if(_93d.pagination("options").total!=_93c){ +_93d.pagination({total:_93c}); +} +} +_906(_935); +_90e(_935); +$(_935).treegrid("showLines"); +$(_935).treegrid("setSelectionState"); +$(_935).treegrid("autoSizeColumn"); +if(!_938){ +opts.onLoadSuccess.call(_935,node,data); +} +}; +function _905(_93e,_93f,_940,_941,_942){ +var opts=$.data(_93e,"treegrid").options; +var body=$(_93e).datagrid("getPanel").find("div.datagrid-body"); +if(_93f==undefined&&opts.queryParams){ +opts.queryParams.id=undefined; +} +if(_940){ +opts.queryParams=_940; +} +var _943=$.extend({},opts.queryParams); +if(opts.pagination){ +$.extend(_943,{page:opts.pageNumber,rows:opts.pageSize}); +} +if(opts.sortName){ +$.extend(_943,{sort:opts.sortName,order:opts.sortOrder}); +} +var row=find(_93e,_93f); +if(opts.onBeforeLoad.call(_93e,row,_943)==false){ +return; +} +var _944=body.find("tr[node-id=\""+_93f+"\"] span.tree-folder"); +_944.addClass("tree-loading"); +$(_93e).treegrid("loading"); +var _945=opts.loader.call(_93e,_943,function(data){ +_944.removeClass("tree-loading"); +$(_93e).treegrid("loaded"); +_934(_93e,_93f,data,_941); +if(_942){ +_942(); +} +},function(){ +_944.removeClass("tree-loading"); +$(_93e).treegrid("loaded"); +opts.onLoadError.apply(_93e,arguments); +if(_942){ +_942(); +} +}); +if(_945==false){ +_944.removeClass("tree-loading"); +$(_93e).treegrid("loaded"); +} +}; +function _946(_947){ +var _948=_949(_947); +return _948.length?_948[0]:null; +}; +function _949(_94a){ +return $.data(_94a,"treegrid").data; +}; +function _928(_94b,_94c){ +var row=find(_94b,_94c); +if(row._parentId){ +return find(_94b,row._parentId); +}else{ +return null; +} +}; +function _90a(_94d,_94e){ +var data=$.data(_94d,"treegrid").data; +if(_94e){ +var _94f=find(_94d,_94e); +data=_94f?(_94f.children||[]):[]; +} +var _950=[]; +$.easyui.forEach(data,true,function(node){ +_950.push(node); +}); +return _950; +}; +function _951(_952,_953){ +var opts=$.data(_952,"treegrid").options; +var tr=opts.finder.getTr(_952,_953); +var node=tr.children("td[field=\""+opts.treeField+"\"]"); +return node.find("span.tree-indent,span.tree-hit").length; +}; +function find(_954,_955){ +var _956=$.data(_954,"treegrid"); +var opts=_956.options; +var _957=null; +$.easyui.forEach(_956.data,true,function(node){ +if(node[opts.idField]==_955){ +_957=node; +return false; +} +}); +return _957; +}; +function _958(_959,_95a){ +var opts=$.data(_959,"treegrid").options; +var row=find(_959,_95a); +var tr=opts.finder.getTr(_959,_95a); +var hit=tr.find("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-collapsed")){ +return; +} +if(opts.onBeforeCollapse.call(_959,row)==false){ +return; +} +hit.removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +hit.next().removeClass("tree-folder-open"); +row.state="closed"; +tr=tr.next("tr.treegrid-tr-tree"); +var cc=tr.children("td").children("div"); +if(opts.animate){ +cc.slideUp("normal",function(){ +$(_959).treegrid("autoSizeColumn"); +_906(_959,_95a); +opts.onCollapse.call(_959,row); +}); +}else{ +cc.hide(); +$(_959).treegrid("autoSizeColumn"); +_906(_959,_95a); +opts.onCollapse.call(_959,row); +} +}; +function _95b(_95c,_95d){ +var opts=$.data(_95c,"treegrid").options; +var tr=opts.finder.getTr(_95c,_95d); +var hit=tr.find("span.tree-hit"); +var row=find(_95c,_95d); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-expanded")){ +return; +} +if(opts.onBeforeExpand.call(_95c,row)==false){ +return; +} +hit.removeClass("tree-collapsed tree-collapsed-hover").addClass("tree-expanded"); +hit.next().addClass("tree-folder-open"); +var _95e=tr.next("tr.treegrid-tr-tree"); +if(_95e.length){ +var cc=_95e.children("td").children("div"); +_95f(cc); +}else{ +_92d(_95c,row[opts.idField]); +var _95e=tr.next("tr.treegrid-tr-tree"); +var cc=_95e.children("td").children("div"); +cc.hide(); +var _960=$.extend({},opts.queryParams||{}); +_960.id=row[opts.idField]; +_905(_95c,row[opts.idField],_960,true,function(){ +if(cc.is(":empty")){ +_95e.remove(); +}else{ +_95f(cc); +} +}); +} +function _95f(cc){ +row.state="open"; +if(opts.animate){ +cc.slideDown("normal",function(){ +$(_95c).treegrid("autoSizeColumn"); +_906(_95c,_95d); +opts.onExpand.call(_95c,row); +}); +}else{ +cc.show(); +$(_95c).treegrid("autoSizeColumn"); +_906(_95c,_95d); +opts.onExpand.call(_95c,row); +} +}; +}; +function _916(_961,_962){ +var opts=$.data(_961,"treegrid").options; +var tr=opts.finder.getTr(_961,_962); +var hit=tr.find("span.tree-hit"); +if(hit.hasClass("tree-expanded")){ +_958(_961,_962); +}else{ +_95b(_961,_962); +} +}; +function _963(_964,_965){ +var opts=$.data(_964,"treegrid").options; +var _966=_90a(_964,_965); +if(_965){ +_966.unshift(find(_964,_965)); +} +for(var i=0;i<_966.length;i++){ +_958(_964,_966[i][opts.idField]); +} +}; +function _967(_968,_969){ +var opts=$.data(_968,"treegrid").options; +var _96a=_90a(_968,_969); +if(_969){ +_96a.unshift(find(_968,_969)); +} +for(var i=0;i<_96a.length;i++){ +_95b(_968,_96a[i][opts.idField]); +} +}; +function _96b(_96c,_96d){ +var opts=$.data(_96c,"treegrid").options; +var ids=[]; +var p=_928(_96c,_96d); +while(p){ +var id=p[opts.idField]; +ids.unshift(id); +p=_928(_96c,id); +} +for(var i=0;i").insertBefore(_972); +if(hit.prev().length){ +hit.prev().remove(); +} +} +} +_934(_96f,_970.parent,_970.data,_971.data.length>0,true); +}; +function _973(_974,_975){ +var ref=_975.before||_975.after; +var opts=$.data(_974,"treegrid").options; +var _976=_928(_974,ref); +_96e(_974,{parent:(_976?_976[opts.idField]:null),data:[_975.data]}); +var _977=_976?_976.children:$(_974).treegrid("getRoots"); +for(var i=0;i<_977.length;i++){ +if(_977[i][opts.idField]==ref){ +var _978=_977[_977.length-1]; +_977.splice(_975.before?i:(i+1),0,_978); +_977.splice(_977.length-1,1); +break; +} +} +_979(true); +_979(false); +_90e(_974); +$(_974).treegrid("showLines"); +function _979(_97a){ +var _97b=_97a?1:2; +var tr=opts.finder.getTr(_974,_975.data[opts.idField],"body",_97b); +var _97c=tr.closest("table.datagrid-btable"); +tr=tr.parent().children(); +var dest=opts.finder.getTr(_974,ref,"body",_97b); +if(_975.before){ +tr.insertBefore(dest); +}else{ +var sub=dest.next("tr.treegrid-tr-tree"); +tr.insertAfter(sub.length?sub:dest); +} +_97c.remove(); +}; +}; +function _97d(_97e,_97f){ +var _980=$.data(_97e,"treegrid"); +var opts=_980.options; +var prow=_928(_97e,_97f); +$(_97e).datagrid("deleteRow",_97f); +$.easyui.removeArrayItem(_980.checkedRows,opts.idField,_97f); +_90e(_97e); +if(prow){ +_92a(_97e,prow[opts.idField]); +} +_980.total-=1; +$(_97e).datagrid("getPager").pagination("refresh",{total:_980.total}); +$(_97e).treegrid("showLines"); +}; +function _981(_982){ +var t=$(_982); +var opts=t.treegrid("options"); +if(opts.lines){ +t.treegrid("getPanel").addClass("tree-lines"); +}else{ +t.treegrid("getPanel").removeClass("tree-lines"); +return; +} +t.treegrid("getPanel").find("span.tree-indent").removeClass("tree-line tree-join tree-joinbottom"); +t.treegrid("getPanel").find("div.datagrid-cell").removeClass("tree-node-last tree-root-first tree-root-one"); +var _983=t.treegrid("getRoots"); +if(_983.length>1){ +_984(_983[0]).addClass("tree-root-first"); +}else{ +if(_983.length==1){ +_984(_983[0]).addClass("tree-root-one"); +} +} +_985(_983); +_986(_983); +function _985(_987){ +$.map(_987,function(node){ +if(node.children&&node.children.length){ +_985(node.children); +}else{ +var cell=_984(node); +cell.find(".tree-icon").prev().addClass("tree-join"); +} +}); +if(_987.length){ +var cell=_984(_987[_987.length-1]); +cell.addClass("tree-node-last"); +cell.find(".tree-join").removeClass("tree-join").addClass("tree-joinbottom"); +} +}; +function _986(_988){ +$.map(_988,function(node){ +if(node.children&&node.children.length){ +_986(node.children); +} +}); +for(var i=0;i<_988.length-1;i++){ +var node=_988[i]; +var _989=t.treegrid("getLevel",node[opts.idField]); +var tr=opts.finder.getTr(_982,node[opts.idField]); +var cc=tr.next().find("tr.datagrid-row td[field=\""+opts.treeField+"\"] div.datagrid-cell"); +cc.find("span:eq("+(_989-1)+")").addClass("tree-line"); +} +}; +function _984(node){ +var tr=opts.finder.getTr(_982,node[opts.idField]); +var cell=tr.find("td[field=\""+opts.treeField+"\"] div.datagrid-cell"); +return cell; +}; +}; +$.fn.treegrid=function(_98a,_98b){ +if(typeof _98a=="string"){ +var _98c=$.fn.treegrid.methods[_98a]; +if(_98c){ +return _98c(this,_98b); +}else{ +return this.datagrid(_98a,_98b); +} +} +_98a=_98a||{}; +return this.each(function(){ +var _98d=$.data(this,"treegrid"); +if(_98d){ +$.extend(_98d.options,_98a); +}else{ +_98d=$.data(this,"treegrid",{options:$.extend({},$.fn.treegrid.defaults,$.fn.treegrid.parseOptions(this),_98a),data:[],checkedRows:[],tmpIds:[]}); +} +_8f5(this); +if(_98d.options.data){ +$(this).treegrid("loadData",_98d.options.data); +} +_905(this); +}); +}; +$.fn.treegrid.methods={options:function(jq){ +return $.data(jq[0],"treegrid").options; +},resize:function(jq,_98e){ +return jq.each(function(){ +$(this).datagrid("resize",_98e); +}); +},fixRowHeight:function(jq,_98f){ +return jq.each(function(){ +_906(this,_98f); +}); +},loadData:function(jq,data){ +return jq.each(function(){ +_934(this,data.parent,data); +}); +},load:function(jq,_990){ +return jq.each(function(){ +$(this).treegrid("options").pageNumber=1; +$(this).treegrid("getPager").pagination({pageNumber:1}); +$(this).treegrid("reload",_990); +}); +},reload:function(jq,id){ +return jq.each(function(){ +var opts=$(this).treegrid("options"); +var _991={}; +if(typeof id=="object"){ +_991=id; +}else{ +_991=$.extend({},opts.queryParams); +_991.id=id; +} +if(_991.id){ +var node=$(this).treegrid("find",_991.id); +if(node.children){ +node.children.splice(0,node.children.length); +} +opts.queryParams=_991; +var tr=opts.finder.getTr(this,_991.id); +tr.next("tr.treegrid-tr-tree").remove(); +tr.find("span.tree-hit").removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +_95b(this,_991.id); +}else{ +_905(this,null,_991); +} +}); +},reloadFooter:function(jq,_992){ +return jq.each(function(){ +var opts=$.data(this,"treegrid").options; +var dc=$.data(this,"datagrid").dc; +if(_992){ +$.data(this,"treegrid").footer=_992; +} +if(opts.showFooter){ +opts.view.renderFooter.call(opts.view,this,dc.footer1,true); +opts.view.renderFooter.call(opts.view,this,dc.footer2,false); +if(opts.view.onAfterRender){ +opts.view.onAfterRender.call(opts.view,this); +} +$(this).treegrid("fixRowHeight"); +} +}); +},getData:function(jq){ +return $.data(jq[0],"treegrid").data; +},getFooterRows:function(jq){ +return $.data(jq[0],"treegrid").footer; +},getRoot:function(jq){ +return _946(jq[0]); +},getRoots:function(jq){ +return _949(jq[0]); +},getParent:function(jq,id){ +return _928(jq[0],id); +},getChildren:function(jq,id){ +return _90a(jq[0],id); +},getLevel:function(jq,id){ +return _951(jq[0],id); +},find:function(jq,id){ +return find(jq[0],id); +},isLeaf:function(jq,id){ +var opts=$.data(jq[0],"treegrid").options; +var tr=opts.finder.getTr(jq[0],id); +var hit=tr.find("span.tree-hit"); +return hit.length==0; +},select:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("selectRow",id); +}); +},unselect:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("unselectRow",id); +}); +},collapse:function(jq,id){ +return jq.each(function(){ +_958(this,id); +}); +},expand:function(jq,id){ +return jq.each(function(){ +_95b(this,id); +}); +},toggle:function(jq,id){ +return jq.each(function(){ +_916(this,id); +}); +},collapseAll:function(jq,id){ +return jq.each(function(){ +_963(this,id); +}); +},expandAll:function(jq,id){ +return jq.each(function(){ +_967(this,id); +}); +},expandTo:function(jq,id){ +return jq.each(function(){ +_96b(this,id); +}); +},append:function(jq,_993){ +return jq.each(function(){ +_96e(this,_993); +}); +},insert:function(jq,_994){ +return jq.each(function(){ +_973(this,_994); +}); +},remove:function(jq,id){ +return jq.each(function(){ +_97d(this,id); +}); +},pop:function(jq,id){ +var row=jq.treegrid("find",id); +jq.treegrid("remove",id); +return row; +},refresh:function(jq,id){ +return jq.each(function(){ +var opts=$.data(this,"treegrid").options; +opts.view.refreshRow.call(opts.view,this,id); +}); +},update:function(jq,_995){ +return jq.each(function(){ +var opts=$.data(this,"treegrid").options; +var row=_995.row; +opts.view.updateRow.call(opts.view,this,_995.id,row); +if(row.checked!=undefined){ +row=find(this,_995.id); +$.extend(row,{checkState:row.checked?"checked":(row.checked===false?"unchecked":undefined)}); +_92a(this,_995.id); +} +}); +},beginEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("beginEdit",id); +$(this).treegrid("fixRowHeight",id); +}); +},endEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("endEdit",id); +}); +},cancelEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("cancelEdit",id); +}); +},showLines:function(jq){ +return jq.each(function(){ +_981(this); +}); +},setSelectionState:function(jq){ +return jq.each(function(){ +$(this).datagrid("setSelectionState"); +var _996=$(this).data("treegrid"); +for(var i=0;i<_996.tmpIds.length;i++){ +_917(this,_996.tmpIds[i],true,true); +} +_996.tmpIds=[]; +}); +},getCheckedNodes:function(jq,_997){ +_997=_997||"checked"; +var rows=[]; +$.easyui.forEach(jq.data("treegrid").checkedRows,false,function(row){ +if(row.checkState==_997){ +rows.push(row); +} +}); +return rows; +},checkNode:function(jq,id){ +return jq.each(function(){ +_917(this,id,true); +}); +},uncheckNode:function(jq,id){ +return jq.each(function(){ +_917(this,id,false); +}); +},clearChecked:function(jq){ +return jq.each(function(){ +var _998=this; +var opts=$(_998).treegrid("options"); +$(_998).datagrid("clearChecked"); +$.map($(_998).treegrid("getCheckedNodes"),function(row){ +_917(_998,row[opts.idField],false,true); +}); +}); +}}; +$.fn.treegrid.parseOptions=function(_999){ +return $.extend({},$.fn.datagrid.parseOptions(_999),$.parser.parseOptions(_999,["treeField",{checkbox:"boolean",cascadeCheck:"boolean",onlyLeafCheck:"boolean"},{animate:"boolean"}])); +}; +var _99a=$.extend({},$.fn.datagrid.defaults.view,{render:function(_99b,_99c,_99d){ +var opts=$.data(_99b,"treegrid").options; +var _99e=$(_99b).datagrid("getColumnFields",_99d); +var _99f=$.data(_99b,"datagrid").rowIdPrefix; +if(_99d){ +if(!(opts.rownumbers||(opts.frozenColumns&&opts.frozenColumns.length))){ +return; +} +} +var view=this; +if(this.treeNodes&&this.treeNodes.length){ +var _9a0=_9a1.call(this,_99d,this.treeLevel,this.treeNodes); +$(_99c).append(_9a0.join("")); +} +function _9a1(_9a2,_9a3,_9a4){ +var _9a5=$(_99b).treegrid("getParent",_9a4[0][opts.idField]); +var _9a6=(_9a5?_9a5.children.length:$(_99b).treegrid("getRoots").length)-_9a4.length; +var _9a7=[""]; +for(var i=0;i<_9a4.length;i++){ +var row=_9a4[i]; +if(row.state!="open"&&row.state!="closed"){ +row.state="open"; +} +var css=opts.rowStyler?opts.rowStyler.call(_99b,row):""; +var cs=this.getStyleValue(css); +var cls="class=\"datagrid-row "+(_9a6++%2&&opts.striped?"datagrid-row-alt ":" ")+cs.c+"\""; +var _9a8=cs.s?"style=\""+cs.s+"\"":""; +var _9a9=_99f+"-"+(_9a2?1:2)+"-"+row[opts.idField]; +_9a7.push(""); +_9a7=_9a7.concat(view.renderRow.call(view,_99b,_99e,_9a2,_9a3,row)); +_9a7.push(""); +if(row.children&&row.children.length){ +var tt=_9a1.call(this,_9a2,_9a3+1,row.children); +var v=row.state=="closed"?"none":"block"; +_9a7.push(""); +} +} +_9a7.push("
        "); +_9a7=_9a7.concat(tt); +_9a7.push("
        "); +return _9a7; +}; +},renderFooter:function(_9aa,_9ab,_9ac){ +var opts=$.data(_9aa,"treegrid").options; +var rows=$.data(_9aa,"treegrid").footer||[]; +var _9ad=$(_9aa).datagrid("getColumnFields",_9ac); +var _9ae=[""]; +for(var i=0;i"); +_9ae.push(this.renderRow.call(this,_9aa,_9ad,_9ac,0,row)); +_9ae.push(""); +} +_9ae.push("
        "); +$(_9ab).html(_9ae.join("")); +},renderRow:function(_9af,_9b0,_9b1,_9b2,row){ +var _9b3=$.data(_9af,"treegrid"); +var opts=_9b3.options; +var cc=[]; +if(_9b1&&opts.rownumbers){ +cc.push("
        0
        "); +} +for(var i=0;i<_9b0.length;i++){ +var _9b4=_9b0[i]; +var col=$(_9af).datagrid("getColumnOption",_9b4); +if(col){ +var css=col.styler?(col.styler(row[_9b4],row)||""):""; +var cs=this.getStyleValue(css); +var cls=cs.c?"class=\""+cs.c+"\"":""; +var _9b5=col.hidden?"style=\"display:none;"+cs.s+"\"":(cs.s?"style=\""+cs.s+"\"":""); +cc.push(""); +var _9b5=""; +if(!col.checkbox){ +if(col.align){ +_9b5+="text-align:"+col.align+";"; +} +if(!opts.nowrap){ +_9b5+="white-space:normal;height:auto;"; +}else{ +if(opts.autoRowHeight){ +_9b5+="height:auto;"; +} +} +} +cc.push("
        "); +if(col.checkbox){ +if(row.checked){ +cc.push(""); +}else{ +var val=null; +if(col.formatter){ +val=col.formatter(row[_9b4],row); +}else{ +val=row[_9b4]; +} +if(_9b4==opts.treeField){ +for(var j=0;j<_9b2;j++){ +cc.push(""); +} +if(row.state=="closed"){ +cc.push(""); +cc.push(""); +}else{ +if(row.children&&row.children.length){ +cc.push(""); +cc.push(""); +}else{ +cc.push(""); +cc.push(""); +} +} +if(this.hasCheckbox(_9af,row)){ +var flag=0; +var crow=$.easyui.getArrayItem(_9b3.checkedRows,opts.idField,row[opts.idField]); +if(crow){ +flag=crow.checkState=="checked"?1:2; +row.checkState=crow.checkState; +row.checked=crow.checked; +$.easyui.addArrayItem(_9b3.checkedRows,opts.idField,row); +}else{ +var prow=$.easyui.getArrayItem(_9b3.checkedRows,opts.idField,row._parentId); +if(prow&&prow.checkState=="checked"&&opts.cascadeCheck){ +flag=1; +row.checked=true; +$.easyui.addArrayItem(_9b3.checkedRows,opts.idField,row); +}else{ +if(row.checked){ +$.easyui.addArrayItem(_9b3.tmpIds,row[opts.idField]); +} +} +row.checkState=flag?"checked":"unchecked"; +} +cc.push(""); +}else{ +row.checkState=undefined; +row.checked=undefined; +} +cc.push(""+val+""); +}else{ +cc.push(val); +} +} +cc.push("
        "); +cc.push(""); +} +} +return cc.join(""); +},hasCheckbox:function(_9b6,row){ +var opts=$.data(_9b6,"treegrid").options; +if(opts.checkbox){ +if($.isFunction(opts.checkbox)){ +if(opts.checkbox.call(_9b6,row)){ +return true; +}else{ +return false; +} +}else{ +if(opts.onlyLeafCheck){ +if(row.state=="open"&&!(row.children&&row.children.length)){ +return true; +} +}else{ +return true; +} +} +} +return false; +},refreshRow:function(_9b7,id){ +this.updateRow.call(this,_9b7,id,{}); +},updateRow:function(_9b8,id,row){ +var opts=$.data(_9b8,"treegrid").options; +var _9b9=$(_9b8).treegrid("find",id); +$.extend(_9b9,row); +var _9ba=$(_9b8).treegrid("getLevel",id)-1; +var _9bb=opts.rowStyler?opts.rowStyler.call(_9b8,_9b9):""; +var _9bc=$.data(_9b8,"datagrid").rowIdPrefix; +var _9bd=_9b9[opts.idField]; +function _9be(_9bf){ +var _9c0=$(_9b8).treegrid("getColumnFields",_9bf); +var tr=opts.finder.getTr(_9b8,id,"body",(_9bf?1:2)); +var _9c1=tr.find("div.datagrid-cell-rownumber").html(); +var _9c2=tr.find("div.datagrid-cell-check input[type=checkbox]").is(":checked"); +tr.html(this.renderRow(_9b8,_9c0,_9bf,_9ba,_9b9)); +tr.attr("style",_9bb||""); +tr.find("div.datagrid-cell-rownumber").html(_9c1); +if(_9c2){ +tr.find("div.datagrid-cell-check input[type=checkbox]")._propAttr("checked",true); +} +if(_9bd!=id){ +tr.attr("id",_9bc+"-"+(_9bf?1:2)+"-"+_9bd); +tr.attr("node-id",_9bd); +} +}; +_9be.call(this,true); +_9be.call(this,false); +$(_9b8).treegrid("fixRowHeight",id); +},deleteRow:function(_9c3,id){ +var opts=$.data(_9c3,"treegrid").options; +var tr=opts.finder.getTr(_9c3,id); +tr.next("tr.treegrid-tr-tree").remove(); +tr.remove(); +var _9c4=del(id); +if(_9c4){ +if(_9c4.children.length==0){ +tr=opts.finder.getTr(_9c3,_9c4[opts.idField]); +tr.next("tr.treegrid-tr-tree").remove(); +var cell=tr.children("td[field=\""+opts.treeField+"\"]").children("div.datagrid-cell"); +cell.find(".tree-icon").removeClass("tree-folder").addClass("tree-file"); +cell.find(".tree-hit").remove(); +$("").prependTo(cell); +} +} +this.setEmptyMsg(_9c3); +function del(id){ +var cc; +var _9c5=$(_9c3).treegrid("getParent",id); +if(_9c5){ +cc=_9c5.children; +}else{ +cc=$(_9c3).treegrid("getData"); +} +for(var i=0;ib?1:-1); +}; +r=_9d0(r1[sn],r2[sn])*(so=="asc"?1:-1); +if(r!=0){ +return r; +} +} +return r; +}); +for(var i=0;i"); +if(!_9f3){ +_9f6.push(""); +_9f6.push(opts.groupFormatter.call(_9f0,_9f2.value,_9f2.rows)); +_9f6.push(""); +} +_9f6.push("
        "); +_9f6.push(this.renderTable(_9f0,_9f2.startIndex,_9f2.rows,_9f3)); +return _9f6.join(""); +},groupRows:function(_9f7,rows){ +var _9f8=$.data(_9f7,"datagrid"); +var opts=_9f8.options; +var _9f9=[]; +for(var i=0;idiv.combo-p>div.combo-panel:visible").panel("close"); +}); +}); +function _a09(_a0a){ +var _a0b=$.data(_a0a,"combo"); +var opts=_a0b.options; +if(!_a0b.panel){ +_a0b.panel=$("
        ").appendTo("body"); +_a0b.panel.panel({minWidth:opts.panelMinWidth,maxWidth:opts.panelMaxWidth,minHeight:opts.panelMinHeight,maxHeight:opts.panelMaxHeight,doSize:false,closed:true,cls:"combo-p",style:{position:"absolute",zIndex:10},onOpen:function(){ +var _a0c=$(this).panel("options").comboTarget; +var _a0d=$.data(_a0c,"combo"); +if(_a0d){ +_a0d.options.onShowPanel.call(_a0c); +} +},onBeforeClose:function(){ +_a08($(this).parent()); +},onClose:function(){ +var _a0e=$(this).panel("options").comboTarget; +var _a0f=$(_a0e).data("combo"); +if(_a0f){ +_a0f.options.onHidePanel.call(_a0e); +} +}}); +} +var _a10=$.extend(true,[],opts.icons); +if(opts.hasDownArrow){ +_a10.push({iconCls:"combo-arrow",handler:function(e){ +_a14(e.data.target); +}}); +} +$(_a0a).addClass("combo-f").textbox($.extend({},opts,{icons:_a10,onChange:function(){ +}})); +$(_a0a).attr("comboName",$(_a0a).attr("textboxName")); +_a0b.combo=$(_a0a).next(); +_a0b.combo.addClass("combo"); +}; +function _a11(_a12){ +var _a13=$.data(_a12,"combo"); +var opts=_a13.options; +var p=_a13.panel; +if(p.is(":visible")){ +p.panel("close"); +} +if(!opts.cloned){ +p.panel("destroy"); +} +$(_a12).textbox("destroy"); +}; +function _a14(_a15){ +var _a16=$.data(_a15,"combo").panel; +if(_a16.is(":visible")){ +var _a17=_a16.combo("combo"); +_a18(_a17); +if(_a17!=_a15){ +$(_a15).combo("showPanel"); +} +}else{ +var p=$(_a15).closest("div.combo-p").children(".combo-panel"); +$("div.combo-panel:visible").not(_a16).not(p).panel("close"); +$(_a15).combo("showPanel"); +} +$(_a15).combo("textbox").focus(); +}; +function _a08(_a19){ +$(_a19).find(".combo-f").each(function(){ +var p=$(this).combo("panel"); +if(p.is(":visible")){ +p.panel("close"); +} +}); +}; +function _a1a(e){ +var _a1b=e.data.target; +var _a1c=$.data(_a1b,"combo"); +var opts=_a1c.options; +if(!opts.editable){ +_a14(_a1b); +}else{ +var p=$(_a1b).closest("div.combo-p").children(".combo-panel"); +$("div.combo-panel:visible").not(p).each(function(){ +var _a1d=$(this).combo("combo"); +if(_a1d!=_a1b){ +_a18(_a1d); +} +}); +} +}; +function _a1e(e){ +var _a1f=e.data.target; +var t=$(_a1f); +var _a20=t.data("combo"); +var opts=t.combo("options"); +_a20.panel.panel("options").comboTarget=_a1f; +switch(e.keyCode){ +case 38: +opts.keyHandler.up.call(_a1f,e); +break; +case 40: +opts.keyHandler.down.call(_a1f,e); +break; +case 37: +opts.keyHandler.left.call(_a1f,e); +break; +case 39: +opts.keyHandler.right.call(_a1f,e); +break; +case 13: +e.preventDefault(); +opts.keyHandler.enter.call(_a1f,e); +return false; +case 9: +case 27: +_a18(_a1f); +break; +default: +if(opts.editable){ +if(_a20.timer){ +clearTimeout(_a20.timer); +} +_a20.timer=setTimeout(function(){ +var q=t.combo("getText"); +if(_a20.previousText!=q){ +_a20.previousText=q; +t.combo("showPanel"); +opts.keyHandler.query.call(_a1f,q,e); +t.combo("validate"); +} +},opts.delay); +} +} +}; +function _a21(_a22){ +var _a23=$.data(_a22,"combo"); +var _a24=_a23.combo; +var _a25=_a23.panel; +var opts=$(_a22).combo("options"); +var _a26=_a25.panel("options"); +_a26.comboTarget=_a22; +if(_a26.closed){ +_a25.panel("panel").show().css({zIndex:($.fn.menu?$.fn.menu.defaults.zIndex++:($.fn.window?$.fn.window.defaults.zIndex++:99)),left:-999999}); +_a25.panel("resize",{width:(opts.panelWidth?opts.panelWidth:_a24._outerWidth()),height:opts.panelHeight}); +_a25.panel("panel").hide(); +_a25.panel("open"); +} +(function(){ +if(_a26.comboTarget==_a22&&_a25.is(":visible")){ +_a25.panel("move",{left:_a27(),top:_a28()}); +setTimeout(arguments.callee,200); +} +})(); +function _a27(){ +var left=_a24.offset().left; +if(opts.panelAlign=="right"){ +left+=_a24._outerWidth()-_a25._outerWidth(); +} +if(left+_a25._outerWidth()>$(window)._outerWidth()+$(document).scrollLeft()){ +left=$(window)._outerWidth()+$(document).scrollLeft()-_a25._outerWidth(); +} +if(left<0){ +left=0; +} +return left; +}; +function _a28(){ +var top=_a24.offset().top+_a24._outerHeight(); +if(top+_a25._outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){ +top=_a24.offset().top-_a25._outerHeight(); +} +if(top<$(document).scrollTop()){ +top=_a24.offset().top+_a24._outerHeight(); +} +return top; +}; +}; +function _a18(_a29){ +var _a2a=$.data(_a29,"combo").panel; +_a2a.panel("close"); +}; +function _a2b(_a2c,text){ +var _a2d=$.data(_a2c,"combo"); +var _a2e=$(_a2c).textbox("getText"); +if(_a2e!=text){ +$(_a2c).textbox("setText",text); +} +_a2d.previousText=text; +}; +function _a2f(_a30){ +var _a31=$.data(_a30,"combo"); +var opts=_a31.options; +var _a32=$(_a30).next(); +var _a33=[]; +_a32.find(".textbox-value").each(function(){ +_a33.push($(this).val()); +}); +if(opts.multivalue){ +return _a33; +}else{ +return _a33.length?_a33[0].split(opts.separator):_a33; +} +}; +function _a34(_a35,_a36){ +var _a37=$.data(_a35,"combo"); +var _a38=_a37.combo; +var opts=$(_a35).combo("options"); +if(!$.isArray(_a36)){ +_a36=_a36.split(opts.separator); +} +var _a39=_a2f(_a35); +_a38.find(".textbox-value").remove(); +if(_a36.length){ +if(opts.multivalue){ +for(var i=0;i<_a36.length;i++){ +_a3a(_a36[i]); +} +}else{ +_a3a(_a36.join(opts.separator)); +} +} +function _a3a(_a3b){ +var name=$(_a35).attr("textboxName")||""; +var _a3c=$("").appendTo(_a38); +_a3c.attr("name",name); +if(opts.disabled){ +_a3c.attr("disabled","disabled"); +} +_a3c.val(_a3b); +}; +var _a3d=(function(){ +if(_a39.length!=_a36.length){ +return true; +} +for(var i=0;i<_a36.length;i++){ +if(_a36[i]!=_a39[i]){ +return true; +} +} +return false; +})(); +if(_a3d){ +$(_a35).val(_a36.join(opts.separator)); +if(opts.multiple){ +opts.onChange.call(_a35,_a36,_a39); +}else{ +opts.onChange.call(_a35,_a36[0],_a39[0]); +} +$(_a35).closest("form").trigger("_change",[_a35]); +} +}; +function _a3e(_a3f){ +var _a40=_a2f(_a3f); +return _a40[0]; +}; +function _a41(_a42,_a43){ +_a34(_a42,[_a43]); +}; +function _a44(_a45){ +var opts=$.data(_a45,"combo").options; +var _a46=opts.onChange; +opts.onChange=function(){ +}; +if(opts.multiple){ +_a34(_a45,opts.value?opts.value:[]); +}else{ +_a41(_a45,opts.value); +} +opts.onChange=_a46; +}; +$.fn.combo=function(_a47,_a48){ +if(typeof _a47=="string"){ +var _a49=$.fn.combo.methods[_a47]; +if(_a49){ +return _a49(this,_a48); +}else{ +return this.textbox(_a47,_a48); +} +} +_a47=_a47||{}; +return this.each(function(){ +var _a4a=$.data(this,"combo"); +if(_a4a){ +$.extend(_a4a.options,_a47); +if(_a47.value!=undefined){ +_a4a.options.originalValue=_a47.value; +} +}else{ +_a4a=$.data(this,"combo",{options:$.extend({},$.fn.combo.defaults,$.fn.combo.parseOptions(this),_a47),previousText:""}); +_a4a.options.originalValue=_a4a.options.value; +} +_a09(this); +_a44(this); +}); +}; +$.fn.combo.methods={options:function(jq){ +var opts=jq.textbox("options"); +return $.extend($.data(jq[0],"combo").options,{width:opts.width,height:opts.height,disabled:opts.disabled,readonly:opts.readonly}); +},cloneFrom:function(jq,from){ +return jq.each(function(){ +$(this).textbox("cloneFrom",from); +$.data(this,"combo",{options:$.extend(true,{cloned:true},$(from).combo("options")),combo:$(this).next(),panel:$(from).combo("panel")}); +$(this).addClass("combo-f").attr("comboName",$(this).attr("textboxName")); +}); +},combo:function(jq){ +return jq.closest(".combo-panel").panel("options").comboTarget; +},panel:function(jq){ +return $.data(jq[0],"combo").panel; +},destroy:function(jq){ +return jq.each(function(){ +_a11(this); +}); +},showPanel:function(jq){ +return jq.each(function(){ +_a21(this); +}); +},hidePanel:function(jq){ +return jq.each(function(){ +_a18(this); +}); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("setText",""); +var opts=$.data(this,"combo").options; +if(opts.multiple){ +$(this).combo("setValues",[]); +}else{ +$(this).combo("setValue",""); +} +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$.data(this,"combo").options; +if(opts.multiple){ +$(this).combo("setValues",opts.originalValue); +}else{ +$(this).combo("setValue",opts.originalValue); +} +}); +},setText:function(jq,text){ +return jq.each(function(){ +_a2b(this,text); +}); +},getValues:function(jq){ +return _a2f(jq[0]); +},setValues:function(jq,_a4b){ +return jq.each(function(){ +_a34(this,_a4b); +}); +},getValue:function(jq){ +return _a3e(jq[0]); +},setValue:function(jq,_a4c){ +return jq.each(function(){ +_a41(this,_a4c); +}); +}}; +$.fn.combo.parseOptions=function(_a4d){ +var t=$(_a4d); +return $.extend({},$.fn.textbox.parseOptions(_a4d),$.parser.parseOptions(_a4d,["separator","panelAlign",{panelWidth:"number",hasDownArrow:"boolean",delay:"number",reversed:"boolean",multivalue:"boolean",selectOnNavigation:"boolean"},{panelMinWidth:"number",panelMaxWidth:"number",panelMinHeight:"number",panelMaxHeight:"number"}]),{panelHeight:(t.attr("panelHeight")=="auto"?"auto":parseInt(t.attr("panelHeight"))||undefined),multiple:(t.attr("multiple")?true:undefined)}); +}; +$.fn.combo.defaults=$.extend({},$.fn.textbox.defaults,{inputEvents:{click:_a1a,keydown:_a1e,paste:_a1e,drop:_a1e},panelWidth:null,panelHeight:200,panelMinWidth:null,panelMaxWidth:null,panelMinHeight:null,panelMaxHeight:null,panelAlign:"left",reversed:false,multiple:false,multivalue:true,selectOnNavigation:true,separator:",",hasDownArrow:true,delay:200,keyHandler:{up:function(e){ +},down:function(e){ +},left:function(e){ +},right:function(e){ +},enter:function(e){ +},query:function(q,e){ +}},onShowPanel:function(){ +},onHidePanel:function(){ +},onChange:function(_a4e,_a4f){ +}}); +})(jQuery); +(function($){ +function _a50(_a51,_a52){ +var _a53=$.data(_a51,"combobox"); +return $.easyui.indexOfArray(_a53.data,_a53.options.valueField,_a52); +}; +function _a54(_a55,_a56){ +var opts=$.data(_a55,"combobox").options; +var _a57=$(_a55).combo("panel"); +var item=opts.finder.getEl(_a55,_a56); +if(item.length){ +if(item.position().top<=0){ +var h=_a57.scrollTop()+item.position().top; +_a57.scrollTop(h); +}else{ +if(item.position().top+item.outerHeight()>_a57.height()){ +var h=_a57.scrollTop()+item.position().top+item.outerHeight()-_a57.height(); +_a57.scrollTop(h); +} +} +} +_a57.triggerHandler("scroll"); +}; +function nav(_a58,dir){ +var opts=$.data(_a58,"combobox").options; +var _a59=$(_a58).combobox("panel"); +var item=_a59.children("div.combobox-item-hover"); +if(!item.length){ +item=_a59.children("div.combobox-item-selected"); +} +item.removeClass("combobox-item-hover"); +var _a5a="div.combobox-item:visible:not(.combobox-item-disabled):first"; +var _a5b="div.combobox-item:visible:not(.combobox-item-disabled):last"; +if(!item.length){ +item=_a59.children(dir=="next"?_a5a:_a5b); +}else{ +if(dir=="next"){ +item=item.nextAll(_a5a); +if(!item.length){ +item=_a59.children(_a5a); +} +}else{ +item=item.prevAll(_a5a); +if(!item.length){ +item=_a59.children(_a5b); +} +} +} +if(item.length){ +item.addClass("combobox-item-hover"); +var row=opts.finder.getRow(_a58,item); +if(row){ +$(_a58).combobox("scrollTo",row[opts.valueField]); +if(opts.selectOnNavigation){ +_a5c(_a58,row[opts.valueField]); +} +} +} +}; +function _a5c(_a5d,_a5e,_a5f){ +var opts=$.data(_a5d,"combobox").options; +var _a60=$(_a5d).combo("getValues"); +if($.inArray(_a5e+"",_a60)==-1){ +if(opts.multiple){ +_a60.push(_a5e); +}else{ +_a60=[_a5e]; +} +_a61(_a5d,_a60,_a5f); +} +}; +function _a62(_a63,_a64){ +var opts=$.data(_a63,"combobox").options; +var _a65=$(_a63).combo("getValues"); +var _a66=$.inArray(_a64+"",_a65); +if(_a66>=0){ +_a65.splice(_a66,1); +_a61(_a63,_a65); +} +}; +function _a61(_a67,_a68,_a69){ +var opts=$.data(_a67,"combobox").options; +var _a6a=$(_a67).combo("panel"); +if(!$.isArray(_a68)){ +_a68=_a68.split(opts.separator); +} +if(!opts.multiple){ +_a68=_a68.length?[_a68[0]]:[""]; +} +var _a6b=$(_a67).combo("getValues"); +if(_a6a.is(":visible")){ +_a6a.find(".combobox-item-selected").each(function(){ +var row=opts.finder.getRow(_a67,$(this)); +if(row){ +if($.easyui.indexOfArray(_a6b,row[opts.valueField])==-1){ +$(this).removeClass("combobox-item-selected"); +} +} +}); +} +$.map(_a6b,function(v){ +if($.easyui.indexOfArray(_a68,v)==-1){ +var el=opts.finder.getEl(_a67,v); +if(el.hasClass("combobox-item-selected")){ +el.removeClass("combobox-item-selected"); +opts.onUnselect.call(_a67,opts.finder.getRow(_a67,v)); +} +} +}); +var _a6c=null; +var vv=[],ss=[]; +for(var i=0;i<_a68.length;i++){ +var v=_a68[i]; +var s=v; +var row=opts.finder.getRow(_a67,v); +if(row){ +s=row[opts.textField]; +_a6c=row; +var el=opts.finder.getEl(_a67,v); +if(!el.hasClass("combobox-item-selected")){ +el.addClass("combobox-item-selected"); +opts.onSelect.call(_a67,row); +} +} +vv.push(v); +ss.push(s); +} +if(!_a69){ +$(_a67).combo("setText",ss.join(opts.separator)); +} +if(opts.showItemIcon){ +var tb=$(_a67).combobox("textbox"); +tb.removeClass("textbox-bgicon "+opts.textboxIconCls); +if(_a6c&&_a6c.iconCls){ +tb.addClass("textbox-bgicon "+_a6c.iconCls); +opts.textboxIconCls=_a6c.iconCls; +} +} +$(_a67).combo("setValues",vv); +_a6a.triggerHandler("scroll"); +}; +function _a6d(_a6e,data,_a6f){ +var _a70=$.data(_a6e,"combobox"); +var opts=_a70.options; +_a70.data=opts.loadFilter.call(_a6e,data); +opts.view.render.call(opts.view,_a6e,$(_a6e).combo("panel"),_a70.data); +var vv=$(_a6e).combobox("getValues"); +$.easyui.forEach(_a70.data,false,function(row){ +if(row["selected"]){ +$.easyui.addArrayItem(vv,row[opts.valueField]+""); +} +}); +if(opts.multiple){ +_a61(_a6e,vv,_a6f); +}else{ +_a61(_a6e,vv.length?[vv[vv.length-1]]:[],_a6f); +} +opts.onLoadSuccess.call(_a6e,data); +}; +function _a71(_a72,url,_a73,_a74){ +var opts=$.data(_a72,"combobox").options; +if(url){ +opts.url=url; +} +_a73=$.extend({},opts.queryParams,_a73||{}); +if(opts.onBeforeLoad.call(_a72,_a73)==false){ +return; +} +opts.loader.call(_a72,_a73,function(data){ +_a6d(_a72,data,_a74); +},function(){ +opts.onLoadError.apply(this,arguments); +}); +}; +function _a75(_a76,q){ +var _a77=$.data(_a76,"combobox"); +var opts=_a77.options; +var _a78=$(); +var qq=opts.multiple?q.split(opts.separator):[q]; +if(opts.mode=="remote"){ +_a79(qq); +_a71(_a76,null,{q:q},true); +}else{ +var _a7a=$(_a76).combo("panel"); +_a7a.find(".combobox-item-hover").removeClass("combobox-item-hover"); +_a7a.find(".combobox-item,.combobox-group").hide(); +var data=_a77.data; +var vv=[]; +$.map(qq,function(q){ +q=$.trim(q); +var _a7b=q; +var _a7c=undefined; +_a78=$(); +for(var i=0;i=0){ +vv.push(v); +} +}); +t.combobox("setValues",vv); +if(!opts.multiple){ +t.combobox("hidePanel"); +} +}; +function _a81(_a82){ +var _a83=$.data(_a82,"combobox"); +var opts=_a83.options; +$(_a82).addClass("combobox-f"); +$(_a82).combo($.extend({},opts,{onShowPanel:function(){ +$(this).combo("panel").find("div.combobox-item:hidden,div.combobox-group:hidden").show(); +_a61(this,$(this).combobox("getValues"),true); +$(this).combobox("scrollTo",$(this).combobox("getValue")); +opts.onShowPanel.call(this); +}})); +var p=$(_a82).combo("panel"); +p.unbind(".combobox"); +for(var _a84 in opts.panelEvents){ +p.bind(_a84+".combobox",{target:_a82},opts.panelEvents[_a84]); +} +}; +function _a85(e){ +$(this).children("div.combobox-item-hover").removeClass("combobox-item-hover"); +var item=$(e.target).closest("div.combobox-item"); +if(!item.hasClass("combobox-item-disabled")){ +item.addClass("combobox-item-hover"); +} +e.stopPropagation(); +}; +function _a86(e){ +$(e.target).closest("div.combobox-item").removeClass("combobox-item-hover"); +e.stopPropagation(); +}; +function _a87(e){ +var _a88=$(this).panel("options").comboTarget; +if(!_a88){ +return; +} +var opts=$(_a88).combobox("options"); +var item=$(e.target).closest("div.combobox-item"); +if(!item.length||item.hasClass("combobox-item-disabled")){ +return; +} +var row=opts.finder.getRow(_a88,item); +if(!row){ +return; +} +if(opts.blurTimer){ +clearTimeout(opts.blurTimer); +opts.blurTimer=null; +} +opts.onClick.call(_a88,row); +var _a89=row[opts.valueField]; +if(opts.multiple){ +if(item.hasClass("combobox-item-selected")){ +_a62(_a88,_a89); +}else{ +_a5c(_a88,_a89); +} +}else{ +$(_a88).combobox("setValue",_a89).combobox("hidePanel"); +} +e.stopPropagation(); +}; +function _a8a(e){ +var _a8b=$(this).panel("options").comboTarget; +if(!_a8b){ +return; +} +var opts=$(_a8b).combobox("options"); +if(opts.groupPosition=="sticky"){ +var _a8c=$(this).children(".combobox-stick"); +if(!_a8c.length){ +_a8c=$("
        ").appendTo(this); +} +_a8c.hide(); +var _a8d=$(_a8b).data("combobox"); +$(this).children(".combobox-group:visible").each(function(){ +var g=$(this); +var _a8e=opts.finder.getGroup(_a8b,g); +var _a8f=_a8d.data[_a8e.startIndex+_a8e.count-1]; +var last=opts.finder.getEl(_a8b,_a8f[opts.valueField]); +if(g.position().top<0&&last.position().top>0){ +_a8c.show().html(g.html()); +return false; +} +}); +} +}; +$.fn.combobox=function(_a90,_a91){ +if(typeof _a90=="string"){ +var _a92=$.fn.combobox.methods[_a90]; +if(_a92){ +return _a92(this,_a91); +}else{ +return this.combo(_a90,_a91); +} +} +_a90=_a90||{}; +return this.each(function(){ +var _a93=$.data(this,"combobox"); +if(_a93){ +$.extend(_a93.options,_a90); +}else{ +_a93=$.data(this,"combobox",{options:$.extend({},$.fn.combobox.defaults,$.fn.combobox.parseOptions(this),_a90),data:[]}); +} +_a81(this); +if(_a93.options.data){ +_a6d(this,_a93.options.data); +}else{ +var data=$.fn.combobox.parseData(this); +if(data.length){ +_a6d(this,data); +} +} +_a71(this); +}); +}; +$.fn.combobox.methods={options:function(jq){ +var _a94=jq.combo("options"); +return $.extend($.data(jq[0],"combobox").options,{width:_a94.width,height:_a94.height,originalValue:_a94.originalValue,disabled:_a94.disabled,readonly:_a94.readonly}); +},cloneFrom:function(jq,from){ +return jq.each(function(){ +$(this).combo("cloneFrom",from); +$.data(this,"combobox",$(from).data("combobox")); +$(this).addClass("combobox-f").attr("comboboxName",$(this).attr("textboxName")); +}); +},getData:function(jq){ +return $.data(jq[0],"combobox").data; +},setValues:function(jq,_a95){ +return jq.each(function(){ +_a61(this,_a95); +}); +},setValue:function(jq,_a96){ +return jq.each(function(){ +_a61(this,$.isArray(_a96)?_a96:[_a96]); +}); +},clear:function(jq){ +return jq.each(function(){ +_a61(this,[]); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).combobox("options"); +if(opts.multiple){ +$(this).combobox("setValues",opts.originalValue); +}else{ +$(this).combobox("setValue",opts.originalValue); +} +}); +},loadData:function(jq,data){ +return jq.each(function(){ +_a6d(this,data); +}); +},reload:function(jq,url){ +return jq.each(function(){ +if(typeof url=="string"){ +_a71(this,url); +}else{ +if(url){ +var opts=$(this).combobox("options"); +opts.queryParams=url; +} +_a71(this); +} +}); +},select:function(jq,_a97){ +return jq.each(function(){ +_a5c(this,_a97); +}); +},unselect:function(jq,_a98){ +return jq.each(function(){ +_a62(this,_a98); +}); +},scrollTo:function(jq,_a99){ +return jq.each(function(){ +_a54(this,_a99); +}); +}}; +$.fn.combobox.parseOptions=function(_a9a){ +var t=$(_a9a); +return $.extend({},$.fn.combo.parseOptions(_a9a),$.parser.parseOptions(_a9a,["valueField","textField","groupField","groupPosition","mode","method","url",{showItemIcon:"boolean",limitToList:"boolean"}])); +}; +$.fn.combobox.parseData=function(_a9b){ +var data=[]; +var opts=$(_a9b).combobox("options"); +$(_a9b).children().each(function(){ +if(this.tagName.toLowerCase()=="optgroup"){ +var _a9c=$(this).attr("label"); +$(this).children().each(function(){ +_a9d(this,_a9c); +}); +}else{ +_a9d(this); +} +}); +return data; +function _a9d(el,_a9e){ +var t=$(el); +var row={}; +row[opts.valueField]=t.attr("value")!=undefined?t.attr("value"):t.text(); +row[opts.textField]=t.text(); +row["selected"]=t.is(":selected"); +row["disabled"]=t.is(":disabled"); +if(_a9e){ +opts.groupField=opts.groupField||"group"; +row[opts.groupField]=_a9e; +} +data.push(row); +}; +}; +var _a9f=0; +var _aa0={render:function(_aa1,_aa2,data){ +var _aa3=$.data(_aa1,"combobox"); +var opts=_aa3.options; +_a9f++; +_aa3.itemIdPrefix="_easyui_combobox_i"+_a9f; +_aa3.groupIdPrefix="_easyui_combobox_g"+_a9f; +_aa3.groups=[]; +var dd=[]; +var _aa4=undefined; +for(var i=0;i"); +dd.push(opts.groupFormatter?opts.groupFormatter.call(_aa1,g):g); +dd.push("
        "); +}else{ +_aa3.groups[_aa3.groups.length-1].count++; +} +}else{ +_aa4=undefined; +} +var cls="combobox-item"+(row.disabled?" combobox-item-disabled":"")+(g?" combobox-gitem":""); +dd.push("
        "); +if(opts.showItemIcon&&row.iconCls){ +dd.push(""); +} +dd.push(opts.formatter?opts.formatter.call(_aa1,row):s); +dd.push("
        "); +} +$(_aa2).html(dd.join("")); +}}; +$.fn.combobox.defaults=$.extend({},$.fn.combo.defaults,{valueField:"value",textField:"text",groupPosition:"static",groupField:null,groupFormatter:function(_aa5){ +return _aa5; +},mode:"local",method:"post",url:null,data:null,queryParams:{},showItemIcon:false,limitToList:false,view:_aa0,keyHandler:{up:function(e){ +nav(this,"prev"); +e.preventDefault(); +},down:function(e){ +nav(this,"next"); +e.preventDefault(); +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_a7d(this); +},query:function(q,e){ +_a75(this,q); +}},inputEvents:$.extend({},$.fn.combo.defaults.inputEvents,{blur:function(e){ +var _aa6=e.data.target; +var opts=$(_aa6).combobox("options"); +if(opts.reversed||opts.limitToList){ +if(opts.blurTimer){ +clearTimeout(opts.blurTimer); +} +opts.blurTimer=setTimeout(function(){ +var _aa7=$(_aa6).parent().length; +if(_aa7){ +if(opts.reversed){ +$(_aa6).combobox("setValues",$(_aa6).combobox("getValues")); +}else{ +if(opts.limitToList){ +_a7d(_aa6); +} +} +opts.blurTimer=null; +} +},50); +} +}}),panelEvents:{mouseover:_a85,mouseout:_a86,click:_a87,scroll:_a8a},filter:function(q,row){ +var opts=$(this).combobox("options"); +return row[opts.textField].toLowerCase().indexOf(q.toLowerCase())>=0; +},formatter:function(row){ +var opts=$(this).combobox("options"); +return row[opts.textField]; +},loader:function(_aa8,_aa9,_aaa){ +var opts=$(this).combobox("options"); +if(!opts.url){ +return false; +} +$.ajax({type:opts.method,url:opts.url,data:_aa8,dataType:"json",success:function(data){ +_aa9(data); +},error:function(){ +_aaa.apply(this,arguments); +}}); +},loadFilter:function(data){ +return data; +},finder:{getEl:function(_aab,_aac){ +var _aad=_a50(_aab,_aac); +var id=$.data(_aab,"combobox").itemIdPrefix+"_"+_aad; +return $("#"+id); +},getGroupEl:function(_aae,_aaf){ +var _ab0=$.data(_aae,"combobox"); +var _ab1=$.easyui.indexOfArray(_ab0.groups,"value",_aaf); +var id=_ab0.groupIdPrefix+"_"+_ab1; +return $("#"+id); +},getGroup:function(_ab2,p){ +var _ab3=$.data(_ab2,"combobox"); +var _ab4=p.attr("id").substr(_ab3.groupIdPrefix.length+1); +return _ab3.groups[parseInt(_ab4)]; +},getRow:function(_ab5,p){ +var _ab6=$.data(_ab5,"combobox"); +var _ab7=(p instanceof $)?p.attr("id").substr(_ab6.itemIdPrefix.length+1):_a50(_ab5,p); +return _ab6.data[parseInt(_ab7)]; +}},onBeforeLoad:function(_ab8){ +},onLoadSuccess:function(data){ +},onLoadError:function(){ +},onSelect:function(_ab9){ +},onUnselect:function(_aba){ +},onClick:function(_abb){ +}}); +})(jQuery); +(function($){ +function _abc(_abd){ +var _abe=$.data(_abd,"combotree"); +var opts=_abe.options; +var tree=_abe.tree; +$(_abd).addClass("combotree-f"); +$(_abd).combo($.extend({},opts,{onShowPanel:function(){ +if(opts.editable){ +tree.tree("doFilter",""); +} +opts.onShowPanel.call(this); +}})); +var _abf=$(_abd).combo("panel"); +if(!tree){ +tree=$("
          ").appendTo(_abf); +_abe.tree=tree; +} +tree.tree($.extend({},opts,{checkbox:opts.multiple,onLoadSuccess:function(node,data){ +var _ac0=$(_abd).combotree("getValues"); +if(opts.multiple){ +$.map(tree.tree("getChecked"),function(node){ +$.easyui.addArrayItem(_ac0,node.id); +}); +} +_ac5(_abd,_ac0,_abe.remainText); +opts.onLoadSuccess.call(this,node,data); +},onClick:function(node){ +if(opts.multiple){ +$(this).tree(node.checked?"uncheck":"check",node.target); +}else{ +$(_abd).combo("hidePanel"); +} +_abe.remainText=false; +_ac2(_abd); +opts.onClick.call(this,node); +},onCheck:function(node,_ac1){ +_abe.remainText=false; +_ac2(_abd); +opts.onCheck.call(this,node,_ac1); +}})); +}; +function _ac2(_ac3){ +var _ac4=$.data(_ac3,"combotree"); +var opts=_ac4.options; +var tree=_ac4.tree; +var vv=[]; +if(opts.multiple){ +vv=$.map(tree.tree("getChecked"),function(node){ +return node.id; +}); +}else{ +var node=tree.tree("getSelected"); +if(node){ +vv.push(node.id); +} +} +vv=vv.concat(opts.unselectedValues); +_ac5(_ac3,vv,_ac4.remainText); +}; +function _ac5(_ac6,_ac7,_ac8){ +var _ac9=$.data(_ac6,"combotree"); +var opts=_ac9.options; +var tree=_ac9.tree; +var _aca=tree.tree("options"); +var _acb=_aca.onBeforeCheck; +var _acc=_aca.onCheck; +var _acd=_aca.onSelect; +_aca.onBeforeCheck=_aca.onCheck=_aca.onSelect=function(){ +}; +if(!$.isArray(_ac7)){ +_ac7=_ac7.split(opts.separator); +} +if(!opts.multiple){ +_ac7=_ac7.length?[_ac7[0]]:[""]; +} +var vv=$.map(_ac7,function(_ace){ +return String(_ace); +}); +tree.find("div.tree-node-selected").removeClass("tree-node-selected"); +$.map(tree.tree("getChecked"),function(node){ +if($.inArray(String(node.id),vv)==-1){ +tree.tree("uncheck",node.target); +} +}); +var ss=[]; +opts.unselectedValues=[]; +$.map(vv,function(v){ +var node=tree.tree("find",v); +if(node){ +tree.tree("check",node.target).tree("select",node.target); +ss.push(_acf(node)); +}else{ +ss.push(_ad0(v,opts.mappingRows)||v); +opts.unselectedValues.push(v); +} +}); +if(opts.multiple){ +$.map(tree.tree("getChecked"),function(node){ +var id=String(node.id); +if($.inArray(id,vv)==-1){ +vv.push(id); +ss.push(_acf(node)); +} +}); +} +_aca.onBeforeCheck=_acb; +_aca.onCheck=_acc; +_aca.onSelect=_acd; +if(!_ac8){ +var s=ss.join(opts.separator); +if($(_ac6).combo("getText")!=s){ +$(_ac6).combo("setText",s); +} +} +$(_ac6).combo("setValues",vv); +function _ad0(_ad1,a){ +var item=$.easyui.getArrayItem(a,"id",_ad1); +return item?_acf(item):undefined; +}; +function _acf(node){ +return node[opts.textField||""]||node.text; +}; +}; +function _ad2(_ad3,q){ +var _ad4=$.data(_ad3,"combotree"); +var opts=_ad4.options; +var tree=_ad4.tree; +_ad4.remainText=true; +tree.tree("doFilter",opts.multiple?q.split(opts.separator):q); +}; +function _ad5(_ad6){ +var _ad7=$.data(_ad6,"combotree"); +_ad7.remainText=false; +$(_ad6).combotree("setValues",$(_ad6).combotree("getValues")); +$(_ad6).combotree("hidePanel"); +}; +$.fn.combotree=function(_ad8,_ad9){ +if(typeof _ad8=="string"){ +var _ada=$.fn.combotree.methods[_ad8]; +if(_ada){ +return _ada(this,_ad9); +}else{ +return this.combo(_ad8,_ad9); +} +} +_ad8=_ad8||{}; +return this.each(function(){ +var _adb=$.data(this,"combotree"); +if(_adb){ +$.extend(_adb.options,_ad8); +}else{ +$.data(this,"combotree",{options:$.extend({},$.fn.combotree.defaults,$.fn.combotree.parseOptions(this),_ad8)}); +} +_abc(this); +}); +}; +$.fn.combotree.methods={options:function(jq){ +var _adc=jq.combo("options"); +return $.extend($.data(jq[0],"combotree").options,{width:_adc.width,height:_adc.height,originalValue:_adc.originalValue,disabled:_adc.disabled,readonly:_adc.readonly}); +},clone:function(jq,_add){ +var t=jq.combo("clone",_add); +t.data("combotree",{options:$.extend(true,{},jq.combotree("options")),tree:jq.combotree("tree")}); +return t; +},tree:function(jq){ +return $.data(jq[0],"combotree").tree; +},loadData:function(jq,data){ +return jq.each(function(){ +var opts=$.data(this,"combotree").options; +opts.data=data; +var tree=$.data(this,"combotree").tree; +tree.tree("loadData",data); +}); +},reload:function(jq,url){ +return jq.each(function(){ +var opts=$.data(this,"combotree").options; +var tree=$.data(this,"combotree").tree; +if(url){ +opts.url=url; +} +tree.tree({url:opts.url}); +}); +},setValues:function(jq,_ade){ +return jq.each(function(){ +var opts=$(this).combotree("options"); +if($.isArray(_ade)){ +_ade=$.map(_ade,function(_adf){ +if(_adf&&typeof _adf=="object"){ +$.easyui.addArrayItem(opts.mappingRows,"id",_adf); +return _adf.id; +}else{ +return _adf; +} +}); +} +_ac5(this,_ade); +}); +},setValue:function(jq,_ae0){ +return jq.each(function(){ +$(this).combotree("setValues",$.isArray(_ae0)?_ae0:[_ae0]); +}); +},clear:function(jq){ +return jq.each(function(){ +$(this).combotree("setValues",[]); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).combotree("options"); +if(opts.multiple){ +$(this).combotree("setValues",opts.originalValue); +}else{ +$(this).combotree("setValue",opts.originalValue); +} +}); +}}; +$.fn.combotree.parseOptions=function(_ae1){ +return $.extend({},$.fn.combo.parseOptions(_ae1),$.fn.tree.parseOptions(_ae1)); +}; +$.fn.combotree.defaults=$.extend({},$.fn.combo.defaults,$.fn.tree.defaults,{editable:false,textField:null,unselectedValues:[],mappingRows:[],keyHandler:{up:function(e){ +},down:function(e){ +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_ad5(this); +},query:function(q,e){ +_ad2(this,q); +}}}); +})(jQuery); +(function($){ +function _ae2(_ae3){ +var _ae4=$.data(_ae3,"combogrid"); +var opts=_ae4.options; +var grid=_ae4.grid; +$(_ae3).addClass("combogrid-f").combo($.extend({},opts,{onShowPanel:function(){ +_af9(this,$(this).combogrid("getValues"),true); +var p=$(this).combogrid("panel"); +var _ae5=p.outerHeight()-p.height(); +var _ae6=p._size("minHeight"); +var _ae7=p._size("maxHeight"); +var dg=$(this).combogrid("grid"); +dg.datagrid("resize",{width:"100%",height:(isNaN(parseInt(opts.panelHeight))?"auto":"100%"),minHeight:(_ae6?_ae6-_ae5:""),maxHeight:(_ae7?_ae7-_ae5:"")}); +var row=dg.datagrid("getSelected"); +if(row){ +dg.datagrid("scrollTo",dg.datagrid("getRowIndex",row)); +} +opts.onShowPanel.call(this); +}})); +var _ae8=$(_ae3).combo("panel"); +if(!grid){ +grid=$("
          ").appendTo(_ae8); +_ae4.grid=grid; +} +grid.datagrid($.extend({},opts,{border:false,singleSelect:(!opts.multiple),onLoadSuccess:_ae9,onClickRow:_aea,onSelect:_aeb("onSelect"),onUnselect:_aeb("onUnselect"),onSelectAll:_aeb("onSelectAll"),onUnselectAll:_aeb("onUnselectAll")})); +function _aec(dg){ +return $(dg).closest(".combo-panel").panel("options").comboTarget||_ae3; +}; +function _ae9(data){ +var _aed=_aec(this); +var _aee=$(_aed).data("combogrid"); +var opts=_aee.options; +var _aef=$(_aed).combo("getValues"); +_af9(_aed,_aef,_aee.remainText); +opts.onLoadSuccess.call(this,data); +}; +function _aea(_af0,row){ +var _af1=_aec(this); +var _af2=$(_af1).data("combogrid"); +var opts=_af2.options; +_af2.remainText=false; +_af3.call(this); +if(!opts.multiple){ +$(_af1).combo("hidePanel"); +} +opts.onClickRow.call(this,_af0,row); +}; +function _aeb(_af4){ +return function(_af5,row){ +var _af6=_aec(this); +var opts=$(_af6).combogrid("options"); +if(_af4=="onUnselectAll"){ +if(opts.multiple){ +_af3.call(this); +} +}else{ +_af3.call(this); +} +opts[_af4].call(this,_af5,row); +}; +}; +function _af3(){ +var dg=$(this); +var _af7=_aec(dg); +var _af8=$(_af7).data("combogrid"); +var opts=_af8.options; +var vv=$.map(dg.datagrid("getSelections"),function(row){ +return row[opts.idField]; +}); +vv=vv.concat(opts.unselectedValues); +_af9(_af7,vv,_af8.remainText); +}; +}; +function nav(_afa,dir){ +var _afb=$.data(_afa,"combogrid"); +var opts=_afb.options; +var grid=_afb.grid; +var _afc=grid.datagrid("getRows").length; +if(!_afc){ +return; +} +var tr=opts.finder.getTr(grid[0],null,"highlight"); +if(!tr.length){ +tr=opts.finder.getTr(grid[0],null,"selected"); +} +var _afd; +if(!tr.length){ +_afd=(dir=="next"?0:_afc-1); +}else{ +var _afd=parseInt(tr.attr("datagrid-row-index")); +_afd+=(dir=="next"?1:-1); +if(_afd<0){ +_afd=_afc-1; +} +if(_afd>=_afc){ +_afd=0; +} +} +grid.datagrid("highlightRow",_afd); +if(opts.selectOnNavigation){ +_afb.remainText=false; +grid.datagrid("selectRow",_afd); +} +}; +function _af9(_afe,_aff,_b00){ +var _b01=$.data(_afe,"combogrid"); +var opts=_b01.options; +var grid=_b01.grid; +var _b02=$(_afe).combo("getValues"); +var _b03=$(_afe).combo("options"); +var _b04=_b03.onChange; +_b03.onChange=function(){ +}; +var _b05=grid.datagrid("options"); +var _b06=_b05.onSelect; +var _b07=_b05.onUnselectAll; +_b05.onSelect=_b05.onUnselectAll=function(){ +}; +if(!$.isArray(_aff)){ +_aff=_aff.split(opts.separator); +} +if(!opts.multiple){ +_aff=_aff.length?[_aff[0]]:[""]; +} +var vv=$.map(_aff,function(_b08){ +return String(_b08); +}); +vv=$.grep(vv,function(v,_b09){ +return _b09===$.inArray(v,vv); +}); +var _b0a=$.grep(grid.datagrid("getSelections"),function(row,_b0b){ +return $.inArray(String(row[opts.idField]),vv)>=0; +}); +grid.datagrid("clearSelections"); +grid.data("datagrid").selectedRows=_b0a; +var ss=[]; +opts.unselectedValues=[]; +$.map(vv,function(v){ +var _b0c=grid.datagrid("getRowIndex",v); +if(_b0c>=0){ +grid.datagrid("selectRow",_b0c); +}else{ +opts.unselectedValues.push(v); +} +ss.push(_b0d(v,grid.datagrid("getRows"))||_b0d(v,_b0a)||_b0d(v,opts.mappingRows)||v); +}); +$(_afe).combo("setValues",_b02); +_b03.onChange=_b04; +_b05.onSelect=_b06; +_b05.onUnselectAll=_b07; +if(!_b00){ +var s=ss.join(opts.separator); +if($(_afe).combo("getText")!=s){ +$(_afe).combo("setText",s); +} +} +$(_afe).combo("setValues",_aff); +function _b0d(_b0e,a){ +var item=$.easyui.getArrayItem(a,opts.idField,_b0e); +return item?item[opts.textField]:undefined; +}; +}; +function _b0f(_b10,q){ +var _b11=$.data(_b10,"combogrid"); +var opts=_b11.options; +var grid=_b11.grid; +_b11.remainText=true; +var qq=opts.multiple?q.split(opts.separator):[q]; +qq=$.grep(qq,function(q){ +return $.trim(q)!=""; +}); +if(opts.mode=="remote"){ +_b12(qq); +grid.datagrid("load",$.extend({},opts.queryParams,{q:q})); +}else{ +grid.datagrid("highlightRow",-1); +var rows=grid.datagrid("getRows"); +var vv=[]; +$.map(qq,function(q){ +q=$.trim(q); +var _b13=q; +_b14(opts.mappingRows,q); +_b14(grid.datagrid("getSelections"),q); +var _b15=_b14(rows,q); +if(_b15>=0){ +if(opts.reversed){ +grid.datagrid("highlightRow",_b15); +} +}else{ +$.map(rows,function(row,i){ +if(opts.filter.call(_b10,q,row)){ +grid.datagrid("highlightRow",i); +} +}); +} +}); +_b12(vv); +} +function _b14(rows,q){ +for(var i=0;i=0){ +$.easyui.addArrayItem(vv,v); +} +}); +$(_b17).combogrid("setValues",vv); +if(!opts.multiple){ +$(_b17).combogrid("hidePanel"); +} +}; +$.fn.combogrid=function(_b1a,_b1b){ +if(typeof _b1a=="string"){ +var _b1c=$.fn.combogrid.methods[_b1a]; +if(_b1c){ +return _b1c(this,_b1b); +}else{ +return this.combo(_b1a,_b1b); +} +} +_b1a=_b1a||{}; +return this.each(function(){ +var _b1d=$.data(this,"combogrid"); +if(_b1d){ +$.extend(_b1d.options,_b1a); +}else{ +_b1d=$.data(this,"combogrid",{options:$.extend({},$.fn.combogrid.defaults,$.fn.combogrid.parseOptions(this),_b1a)}); +} +_ae2(this); +}); +}; +$.fn.combogrid.methods={options:function(jq){ +var _b1e=jq.combo("options"); +return $.extend($.data(jq[0],"combogrid").options,{width:_b1e.width,height:_b1e.height,originalValue:_b1e.originalValue,disabled:_b1e.disabled,readonly:_b1e.readonly}); +},cloneFrom:function(jq,from){ +return jq.each(function(){ +$(this).combo("cloneFrom",from); +$.data(this,"combogrid",{options:$.extend(true,{cloned:true},$(from).combogrid("options")),combo:$(this).next(),panel:$(from).combo("panel"),grid:$(from).combogrid("grid")}); +}); +},grid:function(jq){ +return $.data(jq[0],"combogrid").grid; +},setValues:function(jq,_b1f){ +return jq.each(function(){ +var opts=$(this).combogrid("options"); +if($.isArray(_b1f)){ +_b1f=$.map(_b1f,function(_b20){ +if(_b20&&typeof _b20=="object"){ +$.easyui.addArrayItem(opts.mappingRows,opts.idField,_b20); +return _b20[opts.idField]; +}else{ +return _b20; +} +}); +} +_af9(this,_b1f); +}); +},setValue:function(jq,_b21){ +return jq.each(function(){ +$(this).combogrid("setValues",$.isArray(_b21)?_b21:[_b21]); +}); +},clear:function(jq){ +return jq.each(function(){ +$(this).combogrid("setValues",[]); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).combogrid("options"); +if(opts.multiple){ +$(this).combogrid("setValues",opts.originalValue); +}else{ +$(this).combogrid("setValue",opts.originalValue); +} +}); +}}; +$.fn.combogrid.parseOptions=function(_b22){ +var t=$(_b22); +return $.extend({},$.fn.combo.parseOptions(_b22),$.fn.datagrid.parseOptions(_b22),$.parser.parseOptions(_b22,["idField","textField","mode"])); +}; +$.fn.combogrid.defaults=$.extend({},$.fn.combo.defaults,$.fn.datagrid.defaults,{loadMsg:null,idField:null,textField:null,unselectedValues:[],mappingRows:[],mode:"local",keyHandler:{up:function(e){ +nav(this,"prev"); +e.preventDefault(); +},down:function(e){ +nav(this,"next"); +e.preventDefault(); +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_b16(this); +},query:function(q,e){ +_b0f(this,q); +}},inputEvents:$.extend({},$.fn.combo.defaults.inputEvents,{blur:function(e){ +var _b23=e.data.target; +var opts=$(_b23).combogrid("options"); +if(opts.reversed){ +$(_b23).combogrid("setValues",$(_b23).combogrid("getValues")); +} +}}),filter:function(q,row){ +var opts=$(this).combogrid("options"); +return (row[opts.textField]||"").toLowerCase().indexOf(q.toLowerCase())>=0; +}}); +})(jQuery); +(function($){ +function _b24(_b25){ +var _b26=$.data(_b25,"combotreegrid"); +var opts=_b26.options; +$(_b25).addClass("combotreegrid-f").combo($.extend({},opts,{onShowPanel:function(){ +var p=$(this).combotreegrid("panel"); +var _b27=p.outerHeight()-p.height(); +var _b28=p._size("minHeight"); +var _b29=p._size("maxHeight"); +var dg=$(this).combotreegrid("grid"); +dg.treegrid("resize",{width:"100%",height:(isNaN(parseInt(opts.panelHeight))?"auto":"100%"),minHeight:(_b28?_b28-_b27:""),maxHeight:(_b29?_b29-_b27:"")}); +var row=dg.treegrid("getSelected"); +if(row){ +dg.treegrid("scrollTo",row[opts.idField]); +} +opts.onShowPanel.call(this); +}})); +if(!_b26.grid){ +var _b2a=$(_b25).combo("panel"); +_b26.grid=$("
          ").appendTo(_b2a); +} +_b26.grid.treegrid($.extend({},opts,{border:false,checkbox:opts.multiple,onLoadSuccess:function(row,data){ +var _b2b=$(_b25).combotreegrid("getValues"); +if(opts.multiple){ +$.map($(this).treegrid("getCheckedNodes"),function(row){ +$.easyui.addArrayItem(_b2b,row[opts.idField]); +}); +} +_b30(_b25,_b2b); +opts.onLoadSuccess.call(this,row,data); +_b26.remainText=false; +},onClickRow:function(row){ +if(opts.multiple){ +$(this).treegrid(row.checked?"uncheckNode":"checkNode",row[opts.idField]); +$(this).treegrid("unselect",row[opts.idField]); +}else{ +$(_b25).combo("hidePanel"); +} +_b2d(_b25); +opts.onClickRow.call(this,row); +},onCheckNode:function(row,_b2c){ +_b2d(_b25); +opts.onCheckNode.call(this,row,_b2c); +}})); +}; +function _b2d(_b2e){ +var _b2f=$.data(_b2e,"combotreegrid"); +var opts=_b2f.options; +var grid=_b2f.grid; +var vv=[]; +if(opts.multiple){ +vv=$.map(grid.treegrid("getCheckedNodes"),function(row){ +return row[opts.idField]; +}); +}else{ +var row=grid.treegrid("getSelected"); +if(row){ +vv.push(row[opts.idField]); +} +} +vv=vv.concat(opts.unselectedValues); +_b30(_b2e,vv); +}; +function _b30(_b31,_b32){ +var _b33=$.data(_b31,"combotreegrid"); +var opts=_b33.options; +var grid=_b33.grid; +if(!$.isArray(_b32)){ +_b32=_b32.split(opts.separator); +} +if(!opts.multiple){ +_b32=_b32.length?[_b32[0]]:[""]; +} +var vv=$.map(_b32,function(_b34){ +return String(_b34); +}); +vv=$.grep(vv,function(v,_b35){ +return _b35===$.inArray(v,vv); +}); +var _b36=grid.treegrid("getSelected"); +if(_b36){ +grid.treegrid("unselect",_b36[opts.idField]); +} +$.map(grid.treegrid("getCheckedNodes"),function(row){ +if($.inArray(String(row[opts.idField]),vv)==-1){ +grid.treegrid("uncheckNode",row[opts.idField]); +} +}); +var ss=[]; +opts.unselectedValues=[]; +$.map(vv,function(v){ +var row=grid.treegrid("find",v); +if(row){ +if(opts.multiple){ +grid.treegrid("checkNode",v); +}else{ +grid.treegrid("select",v); +} +ss.push(_b37(row)); +}else{ +ss.push(_b38(v,opts.mappingRows)||v); +opts.unselectedValues.push(v); +} +}); +if(opts.multiple){ +$.map(grid.treegrid("getCheckedNodes"),function(row){ +var id=String(row[opts.idField]); +if($.inArray(id,vv)==-1){ +vv.push(id); +ss.push(_b37(row)); +} +}); +} +if(!_b33.remainText){ +var s=ss.join(opts.separator); +if($(_b31).combo("getText")!=s){ +$(_b31).combo("setText",s); +} +} +$(_b31).combo("setValues",vv); +function _b38(_b39,a){ +var item=$.easyui.getArrayItem(a,opts.idField,_b39); +return item?_b37(item):undefined; +}; +function _b37(row){ +return row[opts.textField||""]||row[opts.treeField]; +}; +}; +function _b3a(_b3b,q){ +var _b3c=$.data(_b3b,"combotreegrid"); +var opts=_b3c.options; +var grid=_b3c.grid; +_b3c.remainText=true; +grid.treegrid("clearSelections").treegrid("clearChecked").treegrid("highlightRow",-1); +if(opts.mode=="remote"){ +$(_b3b).combotreegrid("clear"); +grid.treegrid("load",$.extend({},opts.queryParams,{q:q})); +}else{ +if(q){ +var data=grid.treegrid("getData"); +var vv=[]; +var qq=opts.multiple?q.split(opts.separator):[q]; +$.map(qq,function(q){ +q=$.trim(q); +if(q){ +var v=undefined; +$.easyui.forEach(data,true,function(row){ +if(q.toLowerCase()==String(row[opts.treeField]).toLowerCase()){ +v=row[opts.idField]; +return false; +}else{ +if(opts.filter.call(_b3b,q,row)){ +grid.treegrid("expandTo",row[opts.idField]); +grid.treegrid("highlightRow",row[opts.idField]); +return false; +} +} +}); +if(v==undefined){ +$.easyui.forEach(opts.mappingRows,false,function(row){ +if(q.toLowerCase()==String(row[opts.treeField])){ +v=row[opts.idField]; +return false; +} +}); +} +if(v!=undefined){ +vv.push(v); +} +} +}); +_b30(_b3b,vv); +_b3c.remainText=false; +} +} +}; +function _b3d(_b3e){ +_b2d(_b3e); +}; +$.fn.combotreegrid=function(_b3f,_b40){ +if(typeof _b3f=="string"){ +var _b41=$.fn.combotreegrid.methods[_b3f]; +if(_b41){ +return _b41(this,_b40); +}else{ +return this.combo(_b3f,_b40); +} +} +_b3f=_b3f||{}; +return this.each(function(){ +var _b42=$.data(this,"combotreegrid"); +if(_b42){ +$.extend(_b42.options,_b3f); +}else{ +_b42=$.data(this,"combotreegrid",{options:$.extend({},$.fn.combotreegrid.defaults,$.fn.combotreegrid.parseOptions(this),_b3f)}); +} +_b24(this); +}); +}; +$.fn.combotreegrid.methods={options:function(jq){ +var _b43=jq.combo("options"); +return $.extend($.data(jq[0],"combotreegrid").options,{width:_b43.width,height:_b43.height,originalValue:_b43.originalValue,disabled:_b43.disabled,readonly:_b43.readonly}); +},grid:function(jq){ +return $.data(jq[0],"combotreegrid").grid; +},setValues:function(jq,_b44){ +return jq.each(function(){ +var opts=$(this).combotreegrid("options"); +if($.isArray(_b44)){ +_b44=$.map(_b44,function(_b45){ +if(_b45&&typeof _b45=="object"){ +$.easyui.addArrayItem(opts.mappingRows,opts.idField,_b45); +return _b45[opts.idField]; +}else{ +return _b45; +} +}); +} +_b30(this,_b44); +}); +},setValue:function(jq,_b46){ +return jq.each(function(){ +$(this).combotreegrid("setValues",$.isArray(_b46)?_b46:[_b46]); +}); +},clear:function(jq){ +return jq.each(function(){ +$(this).combotreegrid("setValues",[]); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).combotreegrid("options"); +if(opts.multiple){ +$(this).combotreegrid("setValues",opts.originalValue); +}else{ +$(this).combotreegrid("setValue",opts.originalValue); +} +}); +}}; +$.fn.combotreegrid.parseOptions=function(_b47){ +var t=$(_b47); +return $.extend({},$.fn.combo.parseOptions(_b47),$.fn.treegrid.parseOptions(_b47),$.parser.parseOptions(_b47,["mode",{limitToGrid:"boolean"}])); +}; +$.fn.combotreegrid.defaults=$.extend({},$.fn.combo.defaults,$.fn.treegrid.defaults,{editable:false,singleSelect:true,limitToGrid:false,unselectedValues:[],mappingRows:[],mode:"local",textField:null,keyHandler:{up:function(e){ +},down:function(e){ +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_b3d(this); +},query:function(q,e){ +_b3a(this,q); +}},inputEvents:$.extend({},$.fn.combo.defaults.inputEvents,{blur:function(e){ +var _b48=e.data.target; +var opts=$(_b48).combotreegrid("options"); +if(opts.limitToGrid){ +_b3d(_b48); +} +}}),filter:function(q,row){ +var opts=$(this).combotreegrid("options"); +return (row[opts.treeField]||"").toLowerCase().indexOf(q.toLowerCase())>=0; +}}); +})(jQuery); +(function($){ +function _b49(_b4a){ +var _b4b=$.data(_b4a,"tagbox"); +var opts=_b4b.options; +$(_b4a).addClass("tagbox-f").combobox($.extend({},opts,{cls:"tagbox",reversed:true,onChange:function(_b4c,_b4d){ +_b4e(); +$(this).combobox("hidePanel"); +opts.onChange.call(_b4a,_b4c,_b4d); +},onResizing:function(_b4f,_b50){ +var _b51=$(this).combobox("textbox"); +var tb=$(this).data("textbox").textbox; +tb.css({height:"",paddingLeft:_b51.css("marginLeft"),paddingRight:_b51.css("marginRight")}); +_b51.css("margin",0); +tb._size({width:opts.width},$(this).parent()); +_b64(_b4a); +_b56(this); +opts.onResizing.call(_b4a,_b4f,_b50); +},onLoadSuccess:function(data){ +_b4e(); +opts.onLoadSuccess.call(_b4a,data); +}})); +_b4e(); +_b64(_b4a); +function _b4e(){ +$(_b4a).next().find(".tagbox-label").remove(); +var _b52=$(_b4a).tagbox("textbox"); +var ss=[]; +$.map($(_b4a).tagbox("getValues"),function(_b53,_b54){ +var row=opts.finder.getRow(_b4a,_b53); +var text=opts.tagFormatter.call(_b4a,_b53,row); +var cs={}; +var css=opts.tagStyler.call(_b4a,_b53,row)||""; +if(typeof css=="string"){ +cs={s:css}; +}else{ +cs={c:css["class"]||"",s:css["style"]||""}; +} +var _b55=$("").insertBefore(_b52).html(text); +_b55.attr("tagbox-index",_b54); +_b55.attr("style",cs.s).addClass(cs.c); +$("").appendTo(_b55); +}); +_b56(_b4a); +$(_b4a).combobox("setText",""); +}; +}; +function _b56(_b57,_b58){ +var span=$(_b57).next(); +var _b59=_b58?$(_b58):span.find(".tagbox-label"); +if(_b59.length){ +var _b5a=$(_b57).tagbox("textbox"); +var _b5b=$(_b59[0]); +var _b5c=_b5b.outerHeight(true)-_b5b.outerHeight(); +var _b5d=_b5a.outerHeight()-_b5c*2; +_b59.css({height:_b5d+"px",lineHeight:_b5d+"px"}); +var _b5e=span.find(".textbox-addon").css("height","100%"); +_b5e.find(".textbox-icon").css("height","100%"); +span.find(".textbox-button").linkbutton("resize",{height:"100%"}); +} +}; +function _b5f(_b60){ +var span=$(_b60).next(); +span.unbind(".tagbox").bind("click.tagbox",function(e){ +var opts=$(_b60).tagbox("options"); +if(opts.disabled||opts.readonly){ +return; +} +if($(e.target).hasClass("tagbox-remove")){ +var _b61=parseInt($(e.target).parent().attr("tagbox-index")); +var _b62=$(_b60).tagbox("getValues"); +if(opts.onBeforeRemoveTag.call(_b60,_b62[_b61])==false){ +return; +} +opts.onRemoveTag.call(_b60,_b62[_b61]); +_b62.splice(_b61,1); +$(_b60).tagbox("setValues",_b62); +}else{ +var _b63=$(e.target).closest(".tagbox-label"); +if(_b63.length){ +var _b61=parseInt(_b63.attr("tagbox-index")); +var _b62=$(_b60).tagbox("getValues"); +opts.onClickTag.call(_b60,_b62[_b61]); +} +} +$(this).find(".textbox-text").focus(); +}).bind("keyup.tagbox",function(e){ +_b64(_b60); +}).bind("mouseover.tagbox",function(e){ +if($(e.target).closest(".textbox-button,.textbox-addon,.tagbox-label").length){ +$(this).triggerHandler("mouseleave"); +}else{ +$(this).find(".textbox-text").triggerHandler("mouseenter"); +} +}).bind("mouseleave.tagbox",function(e){ +$(this).find(".textbox-text").triggerHandler("mouseleave"); +}); +}; +function _b64(_b65){ +var opts=$(_b65).tagbox("options"); +var _b66=$(_b65).tagbox("textbox"); +var span=$(_b65).next(); +var tmp=$("").appendTo("body"); +tmp.attr("style",_b66.attr("style")); +tmp.css({position:"absolute",top:-9999,left:-9999,width:"auto",fontFamily:_b66.css("fontFamily"),fontSize:_b66.css("fontSize"),fontWeight:_b66.css("fontWeight"),whiteSpace:"nowrap"}); +var _b67=_b68(_b66.val()); +var _b69=_b68(opts.prompt||""); +tmp.remove(); +var _b6a=Math.min(Math.max(_b67,_b69)+20,span.width()); +_b66._outerWidth(_b6a); +span.find(".textbox-button").linkbutton("resize",{height:"100%"}); +function _b68(val){ +var s=val.replace(/&/g,"&").replace(/\s/g," ").replace(//g,">"); +tmp.html(s); +return tmp.outerWidth(); +}; +}; +function _b6b(_b6c){ +var t=$(_b6c); +var opts=t.tagbox("options"); +if(opts.limitToList){ +var _b6d=t.tagbox("panel"); +var item=_b6d.children("div.combobox-item-hover"); +if(item.length){ +item.removeClass("combobox-item-hover"); +var row=opts.finder.getRow(_b6c,item); +var _b6e=row[opts.valueField]; +$(_b6c).tagbox(item.hasClass("combobox-item-selected")?"unselect":"select",_b6e); +} +$(_b6c).tagbox("hidePanel"); +}else{ +var v=$.trim($(_b6c).tagbox("getText")); +if(v!==""){ +var _b6f=$(_b6c).tagbox("getValues"); +_b6f.push(v); +$(_b6c).tagbox("setValues",_b6f); +} +} +}; +function _b70(_b71,_b72){ +$(_b71).combobox("setText",""); +_b64(_b71); +$(_b71).combobox("setValues",_b72); +$(_b71).combobox("setText",""); +$(_b71).tagbox("validate"); +}; +$.fn.tagbox=function(_b73,_b74){ +if(typeof _b73=="string"){ +var _b75=$.fn.tagbox.methods[_b73]; +if(_b75){ +return _b75(this,_b74); +}else{ +return this.combobox(_b73,_b74); +} +} +_b73=_b73||{}; +return this.each(function(){ +var _b76=$.data(this,"tagbox"); +if(_b76){ +$.extend(_b76.options,_b73); +}else{ +$.data(this,"tagbox",{options:$.extend({},$.fn.tagbox.defaults,$.fn.tagbox.parseOptions(this),_b73)}); +} +_b49(this); +_b5f(this); +}); +}; +$.fn.tagbox.methods={options:function(jq){ +var _b77=jq.combobox("options"); +return $.extend($.data(jq[0],"tagbox").options,{width:_b77.width,height:_b77.height,originalValue:_b77.originalValue,disabled:_b77.disabled,readonly:_b77.readonly}); +},setValues:function(jq,_b78){ +return jq.each(function(){ +_b70(this,_b78); +}); +}}; +$.fn.tagbox.parseOptions=function(_b79){ +return $.extend({},$.fn.combobox.parseOptions(_b79),$.parser.parseOptions(_b79,[])); +}; +$.fn.tagbox.defaults=$.extend({},$.fn.combobox.defaults,{hasDownArrow:false,multiple:true,reversed:true,selectOnNavigation:false,tipOptions:$.extend({},$.fn.textbox.defaults.tipOptions,{showDelay:200}),val:function(_b7a){ +var vv=$(_b7a).parent().prev().tagbox("getValues"); +if($(_b7a).is(":focus")){ +vv.push($(_b7a).val()); +} +return vv.join(","); +},inputEvents:$.extend({},$.fn.combo.defaults.inputEvents,{blur:function(e){ +var _b7b=e.data.target; +var opts=$(_b7b).tagbox("options"); +if(opts.limitToList){ +_b6b(_b7b); +} +}}),keyHandler:$.extend({},$.fn.combobox.defaults.keyHandler,{enter:function(e){ +_b6b(this); +},query:function(q,e){ +var opts=$(this).tagbox("options"); +if(opts.limitToList){ +$.fn.combobox.defaults.keyHandler.query.call(this,q,e); +}else{ +$(this).combobox("hidePanel"); +} +}}),tagFormatter:function(_b7c,row){ +var opts=$(this).tagbox("options"); +return row?row[opts.textField]:_b7c; +},tagStyler:function(_b7d,row){ +return ""; +},onClickTag:function(_b7e){ +},onBeforeRemoveTag:function(_b7f){ +},onRemoveTag:function(_b80){ +}}); +})(jQuery); +(function($){ +function _b81(_b82){ +var _b83=$.data(_b82,"datebox"); +var opts=_b83.options; +$(_b82).addClass("datebox-f").combo($.extend({},opts,{onShowPanel:function(){ +_b84(this); +_b85(this); +_b86(this); +_b94(this,$(this).datebox("getText"),true); +opts.onShowPanel.call(this); +}})); +if(!_b83.calendar){ +var _b87=$(_b82).combo("panel").css("overflow","hidden"); +_b87.panel("options").onBeforeDestroy=function(){ +var c=$(this).find(".calendar-shared"); +if(c.length){ +c.insertBefore(c[0].pholder); +} +}; +var cc=$("
          ").prependTo(_b87); +if(opts.sharedCalendar){ +var c=$(opts.sharedCalendar); +if(!c[0].pholder){ +c[0].pholder=$("
          ").insertAfter(c); +} +c.addClass("calendar-shared").appendTo(cc); +if(!c.hasClass("calendar")){ +c.calendar(); +} +_b83.calendar=c; +}else{ +_b83.calendar=$("
          ").appendTo(cc).calendar(); +} +$.extend(_b83.calendar.calendar("options"),{fit:true,border:false,onSelect:function(date){ +var _b88=this.target; +var opts=$(_b88).datebox("options"); +_b94(_b88,opts.formatter.call(_b88,date)); +$(_b88).combo("hidePanel"); +opts.onSelect.call(_b88,date); +}}); +} +$(_b82).combo("textbox").parent().addClass("datebox"); +$(_b82).datebox("initValue",opts.value); +function _b84(_b89){ +var opts=$(_b89).datebox("options"); +var _b8a=$(_b89).combo("panel"); +_b8a.unbind(".datebox").bind("click.datebox",function(e){ +if($(e.target).hasClass("datebox-button-a")){ +var _b8b=parseInt($(e.target).attr("datebox-button-index")); +opts.buttons[_b8b].handler.call(e.target,_b89); +} +}); +}; +function _b85(_b8c){ +var _b8d=$(_b8c).combo("panel"); +if(_b8d.children("div.datebox-button").length){ +return; +} +var _b8e=$("
          ").appendTo(_b8d); +var tr=_b8e.find("tr"); +for(var i=0;i").appendTo(tr); +var btn=opts.buttons[i]; +var t=$("").html($.isFunction(btn.text)?btn.text(_b8c):btn.text).appendTo(td); +t.attr("datebox-button-index",i); +} +tr.find("td").css("width",(100/opts.buttons.length)+"%"); +}; +function _b86(_b8f){ +var _b90=$(_b8f).combo("panel"); +var cc=_b90.children("div.datebox-calendar-inner"); +_b90.children()._outerWidth(_b90.width()); +_b83.calendar.appendTo(cc); +_b83.calendar[0].target=_b8f; +if(opts.panelHeight!="auto"){ +var _b91=_b90.height(); +_b90.children().not(cc).each(function(){ +_b91-=$(this).outerHeight(); +}); +cc._outerHeight(_b91); +} +_b83.calendar.calendar("resize"); +}; +}; +function _b92(_b93,q){ +_b94(_b93,q,true); +}; +function _b95(_b96){ +var _b97=$.data(_b96,"datebox"); +var opts=_b97.options; +var _b98=_b97.calendar.calendar("options").current; +if(_b98){ +_b94(_b96,opts.formatter.call(_b96,_b98)); +$(_b96).combo("hidePanel"); +} +}; +function _b94(_b99,_b9a,_b9b){ +var _b9c=$.data(_b99,"datebox"); +var opts=_b9c.options; +var _b9d=_b9c.calendar; +_b9d.calendar("moveTo",opts.parser.call(_b99,_b9a)); +if(_b9b){ +$(_b99).combo("setValue",_b9a); +}else{ +if(_b9a){ +_b9a=opts.formatter.call(_b99,_b9d.calendar("options").current); +} +$(_b99).combo("setText",_b9a).combo("setValue",_b9a); +} +}; +$.fn.datebox=function(_b9e,_b9f){ +if(typeof _b9e=="string"){ +var _ba0=$.fn.datebox.methods[_b9e]; +if(_ba0){ +return _ba0(this,_b9f); +}else{ +return this.combo(_b9e,_b9f); +} +} +_b9e=_b9e||{}; +return this.each(function(){ +var _ba1=$.data(this,"datebox"); +if(_ba1){ +$.extend(_ba1.options,_b9e); +}else{ +$.data(this,"datebox",{options:$.extend({},$.fn.datebox.defaults,$.fn.datebox.parseOptions(this),_b9e)}); +} +_b81(this); +}); +}; +$.fn.datebox.methods={options:function(jq){ +var _ba2=jq.combo("options"); +return $.extend($.data(jq[0],"datebox").options,{width:_ba2.width,height:_ba2.height,originalValue:_ba2.originalValue,disabled:_ba2.disabled,readonly:_ba2.readonly}); +},cloneFrom:function(jq,from){ +return jq.each(function(){ +$(this).combo("cloneFrom",from); +$.data(this,"datebox",{options:$.extend(true,{},$(from).datebox("options")),calendar:$(from).datebox("calendar")}); +$(this).addClass("datebox-f"); +}); +},calendar:function(jq){ +return $.data(jq[0],"datebox").calendar; +},initValue:function(jq,_ba3){ +return jq.each(function(){ +var opts=$(this).datebox("options"); +var _ba4=opts.value; +if(_ba4){ +_ba4=opts.formatter.call(this,opts.parser.call(this,_ba4)); +} +$(this).combo("initValue",_ba4).combo("setText",_ba4); +}); +},setValue:function(jq,_ba5){ +return jq.each(function(){ +_b94(this,_ba5); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).datebox("options"); +$(this).datebox("setValue",opts.originalValue); +}); +}}; +$.fn.datebox.parseOptions=function(_ba6){ +return $.extend({},$.fn.combo.parseOptions(_ba6),$.parser.parseOptions(_ba6,["sharedCalendar"])); +}; +$.fn.datebox.defaults=$.extend({},$.fn.combo.defaults,{panelWidth:180,panelHeight:"auto",sharedCalendar:null,keyHandler:{up:function(e){ +},down:function(e){ +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_b95(this); +},query:function(q,e){ +_b92(this,q); +}},currentText:"Today",closeText:"Close",okText:"Ok",buttons:[{text:function(_ba7){ +return $(_ba7).datebox("options").currentText; +},handler:function(_ba8){ +var now=new Date(); +$(_ba8).datebox("calendar").calendar({year:now.getFullYear(),month:now.getMonth()+1,current:new Date(now.getFullYear(),now.getMonth(),now.getDate())}); +_b95(_ba8); +}},{text:function(_ba9){ +return $(_ba9).datebox("options").closeText; +},handler:function(_baa){ +$(this).closest("div.combo-panel").panel("close"); +}}],formatter:function(date){ +var y=date.getFullYear(); +var m=date.getMonth()+1; +var d=date.getDate(); +return (m<10?("0"+m):m)+"/"+(d<10?("0"+d):d)+"/"+y; +},parser:function(s){ +if(!s){ +return new Date(); +} +var ss=s.split("/"); +var m=parseInt(ss[0],10); +var d=parseInt(ss[1],10); +var y=parseInt(ss[2],10); +if(!isNaN(y)&&!isNaN(m)&&!isNaN(d)){ +return new Date(y,m-1,d); +}else{ +return new Date(); +} +},onSelect:function(date){ +}}); +})(jQuery); +(function($){ +function _bab(_bac){ +var _bad=$.data(_bac,"datetimebox"); +var opts=_bad.options; +$(_bac).datebox($.extend({},opts,{onShowPanel:function(){ +var _bae=$(this).datetimebox("getValue"); +_bb4(this,_bae,true); +opts.onShowPanel.call(this); +},formatter:$.fn.datebox.defaults.formatter,parser:$.fn.datebox.defaults.parser})); +$(_bac).removeClass("datebox-f").addClass("datetimebox-f"); +$(_bac).datebox("calendar").calendar({onSelect:function(date){ +opts.onSelect.call(this.target,date); +}}); +if(!_bad.spinner){ +var _baf=$(_bac).datebox("panel"); +var p=$("
          ").insertAfter(_baf.children("div.datebox-calendar-inner")); +_bad.spinner=p.children("input"); +} +_bad.spinner.timespinner({width:opts.spinnerWidth,showSeconds:opts.showSeconds,separator:opts.timeSeparator}); +$(_bac).datetimebox("initValue",opts.value); +}; +function _bb0(_bb1){ +var c=$(_bb1).datetimebox("calendar"); +var t=$(_bb1).datetimebox("spinner"); +var date=c.calendar("options").current; +return new Date(date.getFullYear(),date.getMonth(),date.getDate(),t.timespinner("getHours"),t.timespinner("getMinutes"),t.timespinner("getSeconds")); +}; +function _bb2(_bb3,q){ +_bb4(_bb3,q,true); +}; +function _bb5(_bb6){ +var opts=$.data(_bb6,"datetimebox").options; +var date=_bb0(_bb6); +_bb4(_bb6,opts.formatter.call(_bb6,date)); +$(_bb6).combo("hidePanel"); +}; +function _bb4(_bb7,_bb8,_bb9){ +var opts=$.data(_bb7,"datetimebox").options; +$(_bb7).combo("setValue",_bb8); +if(!_bb9){ +if(_bb8){ +var date=opts.parser.call(_bb7,_bb8); +$(_bb7).combo("setText",opts.formatter.call(_bb7,date)); +$(_bb7).combo("setValue",opts.formatter.call(_bb7,date)); +}else{ +$(_bb7).combo("setText",_bb8); +} +} +var date=opts.parser.call(_bb7,_bb8); +$(_bb7).datetimebox("calendar").calendar("moveTo",date); +$(_bb7).datetimebox("spinner").timespinner("setValue",_bba(date)); +function _bba(date){ +function _bbb(_bbc){ +return (_bbc<10?"0":"")+_bbc; +}; +var tt=[_bbb(date.getHours()),_bbb(date.getMinutes())]; +if(opts.showSeconds){ +tt.push(_bbb(date.getSeconds())); +} +return tt.join($(_bb7).datetimebox("spinner").timespinner("options").separator); +}; +}; +$.fn.datetimebox=function(_bbd,_bbe){ +if(typeof _bbd=="string"){ +var _bbf=$.fn.datetimebox.methods[_bbd]; +if(_bbf){ +return _bbf(this,_bbe); +}else{ +return this.datebox(_bbd,_bbe); +} +} +_bbd=_bbd||{}; +return this.each(function(){ +var _bc0=$.data(this,"datetimebox"); +if(_bc0){ +$.extend(_bc0.options,_bbd); +}else{ +$.data(this,"datetimebox",{options:$.extend({},$.fn.datetimebox.defaults,$.fn.datetimebox.parseOptions(this),_bbd)}); +} +_bab(this); +}); +}; +$.fn.datetimebox.methods={options:function(jq){ +var _bc1=jq.datebox("options"); +return $.extend($.data(jq[0],"datetimebox").options,{originalValue:_bc1.originalValue,disabled:_bc1.disabled,readonly:_bc1.readonly}); +},cloneFrom:function(jq,from){ +return jq.each(function(){ +$(this).datebox("cloneFrom",from); +$.data(this,"datetimebox",{options:$.extend(true,{},$(from).datetimebox("options")),spinner:$(from).datetimebox("spinner")}); +$(this).removeClass("datebox-f").addClass("datetimebox-f"); +}); +},spinner:function(jq){ +return $.data(jq[0],"datetimebox").spinner; +},initValue:function(jq,_bc2){ +return jq.each(function(){ +var opts=$(this).datetimebox("options"); +var _bc3=opts.value; +if(_bc3){ +_bc3=opts.formatter.call(this,opts.parser.call(this,_bc3)); +} +$(this).combo("initValue",_bc3).combo("setText",_bc3); +}); +},setValue:function(jq,_bc4){ +return jq.each(function(){ +_bb4(this,_bc4); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).datetimebox("options"); +$(this).datetimebox("setValue",opts.originalValue); +}); +}}; +$.fn.datetimebox.parseOptions=function(_bc5){ +var t=$(_bc5); +return $.extend({},$.fn.datebox.parseOptions(_bc5),$.parser.parseOptions(_bc5,["timeSeparator","spinnerWidth",{showSeconds:"boolean"}])); +}; +$.fn.datetimebox.defaults=$.extend({},$.fn.datebox.defaults,{spinnerWidth:"100%",showSeconds:true,timeSeparator:":",keyHandler:{up:function(e){ +},down:function(e){ +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_bb5(this); +},query:function(q,e){ +_bb2(this,q); +}},buttons:[{text:function(_bc6){ +return $(_bc6).datetimebox("options").currentText; +},handler:function(_bc7){ +var opts=$(_bc7).datetimebox("options"); +_bb4(_bc7,opts.formatter.call(_bc7,new Date())); +$(_bc7).datetimebox("hidePanel"); +}},{text:function(_bc8){ +return $(_bc8).datetimebox("options").okText; +},handler:function(_bc9){ +_bb5(_bc9); +}},{text:function(_bca){ +return $(_bca).datetimebox("options").closeText; +},handler:function(_bcb){ +$(_bcb).datetimebox("hidePanel"); +}}],formatter:function(date){ +var h=date.getHours(); +var M=date.getMinutes(); +var s=date.getSeconds(); +function _bcc(_bcd){ +return (_bcd<10?"0":"")+_bcd; +}; +var _bce=$(this).datetimebox("spinner").timespinner("options").separator; +var r=$.fn.datebox.defaults.formatter(date)+" "+_bcc(h)+_bce+_bcc(M); +if($(this).datetimebox("options").showSeconds){ +r+=_bce+_bcc(s); +} +return r; +},parser:function(s){ +if($.trim(s)==""){ +return new Date(); +} +var dt=s.split(" "); +var d=$.fn.datebox.defaults.parser(dt[0]); +if(dt.length<2){ +return d; +} +var _bcf=$(this).datetimebox("spinner").timespinner("options").separator; +var tt=dt[1].split(_bcf); +var hour=parseInt(tt[0],10)||0; +var _bd0=parseInt(tt[1],10)||0; +var _bd1=parseInt(tt[2],10)||0; +return new Date(d.getFullYear(),d.getMonth(),d.getDate(),hour,_bd0,_bd1); +}}); +})(jQuery); +(function($){ +function init(_bd2){ +var _bd3=$("
          "+"
          "+""+""+"
          "+"
          "+"
          "+"
          "+""+"
          ").insertAfter(_bd2); +var t=$(_bd2); +t.addClass("slider-f").hide(); +var name=t.attr("name"); +if(name){ +_bd3.find("input.slider-value").attr("name",name); +t.removeAttr("name").attr("sliderName",name); +} +_bd3.bind("_resize",function(e,_bd4){ +if($(this).hasClass("easyui-fluid")||_bd4){ +_bd5(_bd2); +} +return false; +}); +return _bd3; +}; +function _bd5(_bd6,_bd7){ +var _bd8=$.data(_bd6,"slider"); +var opts=_bd8.options; +var _bd9=_bd8.slider; +if(_bd7){ +if(_bd7.width){ +opts.width=_bd7.width; +} +if(_bd7.height){ +opts.height=_bd7.height; +} +} +_bd9._size(opts); +if(opts.mode=="h"){ +_bd9.css("height",""); +_bd9.children("div").css("height",""); +}else{ +_bd9.css("width",""); +_bd9.children("div").css("width",""); +_bd9.children("div.slider-rule,div.slider-rulelabel,div.slider-inner")._outerHeight(_bd9._outerHeight()); +} +_bda(_bd6); +}; +function _bdb(_bdc){ +var _bdd=$.data(_bdc,"slider"); +var opts=_bdd.options; +var _bde=_bdd.slider; +var aa=opts.mode=="h"?opts.rule:opts.rule.slice(0).reverse(); +if(opts.reversed){ +aa=aa.slice(0).reverse(); +} +_bdf(aa); +function _bdf(aa){ +var rule=_bde.find("div.slider-rule"); +var _be0=_bde.find("div.slider-rulelabel"); +rule.empty(); +_be0.empty(); +for(var i=0;i").appendTo(rule); +span.css((opts.mode=="h"?"left":"top"),_be1); +if(aa[i]!="|"){ +span=$("").appendTo(_be0); +span.html(aa[i]); +if(opts.mode=="h"){ +span.css({left:_be1,marginLeft:-Math.round(span.outerWidth()/2)}); +}else{ +span.css({top:_be1,marginTop:-Math.round(span.outerHeight()/2)}); +} +} +} +}; +}; +function _be2(_be3){ +var _be4=$.data(_be3,"slider"); +var opts=_be4.options; +var _be5=_be4.slider; +_be5.removeClass("slider-h slider-v slider-disabled"); +_be5.addClass(opts.mode=="h"?"slider-h":"slider-v"); +_be5.addClass(opts.disabled?"slider-disabled":""); +var _be6=_be5.find(".slider-inner"); +_be6.html(""+""); +if(opts.range){ +_be6.append(""+""); +} +_be5.find("a.slider-handle").draggable({axis:opts.mode,cursor:"pointer",disabled:opts.disabled,onDrag:function(e){ +var left=e.data.left; +var _be7=_be5.width(); +if(opts.mode!="h"){ +left=e.data.top; +_be7=_be5.height(); +} +if(left<0||left>_be7){ +return false; +}else{ +_be8(left,this); +return false; +} +},onStartDrag:function(){ +_be4.isDragging=true; +opts.onSlideStart.call(_be3,opts.value); +},onStopDrag:function(e){ +_be8(opts.mode=="h"?e.data.left:e.data.top,this); +opts.onSlideEnd.call(_be3,opts.value); +opts.onComplete.call(_be3,opts.value); +_be4.isDragging=false; +}}); +_be5.find("div.slider-inner").unbind(".slider").bind("mousedown.slider",function(e){ +if(_be4.isDragging||opts.disabled){ +return; +} +var pos=$(this).offset(); +_be8(opts.mode=="h"?(e.pageX-pos.left):(e.pageY-pos.top)); +opts.onComplete.call(_be3,opts.value); +}); +function _be8(pos,_be9){ +var _bea=_beb(_be3,pos); +var s=Math.abs(_bea%opts.step); +if(s0; +if(_bea<=v2&&_bec){ +v1=_bea; +}else{ +if(_bea>=v1&&(!_bec)){ +v2=_bea; +} +} +}else{ +if(_beav2){ +v2=_bea; +}else{ +_beaopts.max){ +_bf4=opts.max; +} +var _bf5=$("").appendTo(_bf1); +_bf5.attr("name",name); +_bf5.val(_bf4); +_bf3.push(_bf4); +var _bf6=_bf1.find(".slider-handle:eq("+i+")"); +var tip=_bf6.next(); +var pos=_bf7(_bee,_bf4); +if(opts.showTip){ +tip.show(); +tip.html(opts.tipFormatter.call(_bee,_bf4)); +}else{ +tip.hide(); +} +if(opts.mode=="h"){ +var _bf8="left:"+pos+"px;"; +_bf6.attr("style",_bf8); +tip.attr("style",_bf8+"margin-left:"+(-Math.round(tip.outerWidth()/2))+"px"); +}else{ +var _bf8="top:"+pos+"px;"; +_bf6.attr("style",_bf8); +tip.attr("style",_bf8+"margin-left:"+(-Math.round(tip.outerWidth()))+"px"); +} +} +opts.value=opts.range?_bf3:_bf3[0]; +$(_bee).val(opts.range?_bf3.join(opts.separator):_bf3[0]); +if(_bf2.join(",")!=_bf3.join(",")){ +opts.onChange.call(_bee,opts.value,(opts.range?_bf2:_bf2[0])); +} +}; +function _bda(_bf9){ +var opts=$.data(_bf9,"slider").options; +var fn=opts.onChange; +opts.onChange=function(){ +}; +_bed(_bf9,opts.value); +opts.onChange=fn; +}; +function _bf7(_bfa,_bfb){ +var _bfc=$.data(_bfa,"slider"); +var opts=_bfc.options; +var _bfd=_bfc.slider; +var size=opts.mode=="h"?_bfd.width():_bfd.height(); +var pos=opts.converter.toPosition.call(_bfa,_bfb,size); +if(opts.mode=="v"){ +pos=_bfd.height()-pos; +} +if(opts.reversed){ +pos=size-pos; +} +return pos.toFixed(0); +}; +function _beb(_bfe,pos){ +var _bff=$.data(_bfe,"slider"); +var opts=_bff.options; +var _c00=_bff.slider; +var size=opts.mode=="h"?_c00.width():_c00.height(); +var pos=opts.mode=="h"?(opts.reversed?(size-pos):pos):(opts.reversed?pos:(size-pos)); +var _c01=opts.converter.toValue.call(_bfe,pos,size); +return _c01.toFixed(0); +}; +$.fn.slider=function(_c02,_c03){ +if(typeof _c02=="string"){ +return $.fn.slider.methods[_c02](this,_c03); +} +_c02=_c02||{}; +return this.each(function(){ +var _c04=$.data(this,"slider"); +if(_c04){ +$.extend(_c04.options,_c02); +}else{ +_c04=$.data(this,"slider",{options:$.extend({},$.fn.slider.defaults,$.fn.slider.parseOptions(this),_c02),slider:init(this)}); +$(this).removeAttr("disabled"); +} +var opts=_c04.options; +opts.min=parseFloat(opts.min); +opts.max=parseFloat(opts.max); +if(opts.range){ +if(!$.isArray(opts.value)){ +opts.value=$.map(String(opts.value).split(opts.separator),function(v){ +return parseFloat(v); +}); +} +if(opts.value.length<2){ +opts.value.push(opts.max); +} +}else{ +opts.value=parseFloat(opts.value); +} +opts.step=parseFloat(opts.step); +opts.originalValue=opts.value; +_be2(this); +_bdb(this); +_bd5(this); +}); +}; +$.fn.slider.methods={options:function(jq){ +return $.data(jq[0],"slider").options; +},destroy:function(jq){ +return jq.each(function(){ +$.data(this,"slider").slider.remove(); +$(this).remove(); +}); +},resize:function(jq,_c05){ +return jq.each(function(){ +_bd5(this,_c05); +}); +},getValue:function(jq){ +return jq.slider("options").value; +},getValues:function(jq){ +return jq.slider("options").value; +},setValue:function(jq,_c06){ +return jq.each(function(){ +_bed(this,[_c06]); +}); +},setValues:function(jq,_c07){ +return jq.each(function(){ +_bed(this,_c07); +}); +},clear:function(jq){ +return jq.each(function(){ +var opts=$(this).slider("options"); +_bed(this,opts.range?[opts.min,opts.max]:[opts.min]); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).slider("options"); +$(this).slider(opts.range?"setValues":"setValue",opts.originalValue); +}); +},enable:function(jq){ +return jq.each(function(){ +$.data(this,"slider").options.disabled=false; +_be2(this); +}); +},disable:function(jq){ +return jq.each(function(){ +$.data(this,"slider").options.disabled=true; +_be2(this); +}); +}}; +$.fn.slider.parseOptions=function(_c08){ +var t=$(_c08); +return $.extend({},$.parser.parseOptions(_c08,["width","height","mode",{reversed:"boolean",showTip:"boolean",range:"boolean",min:"number",max:"number",step:"number"}]),{value:(t.val()||undefined),disabled:(t.attr("disabled")?true:undefined),rule:(t.attr("rule")?eval(t.attr("rule")):undefined)}); +}; +$.fn.slider.defaults={width:"auto",height:"auto",mode:"h",reversed:false,showTip:false,disabled:false,range:false,value:0,separator:",",min:0,max:100,step:1,rule:[],tipFormatter:function(_c09){ +return _c09; +},converter:{toPosition:function(_c0a,size){ +var opts=$(this).slider("options"); +return (_c0a-opts.min)/(opts.max-opts.min)*size; +},toValue:function(pos,size){ +var opts=$(this).slider("options"); +return opts.min+(opts.max-opts.min)*(pos/size); +}},onChange:function(_c0b,_c0c){ +},onSlideStart:function(_c0d){ +},onSlideEnd:function(_c0e){ +},onComplete:function(_c0f){ +}}; +})(jQuery); + diff --git a/src/main/resources/static/easyui/jquery.min.js b/src/main/resources/static/easyui/jquery.min.js new file mode 100644 index 0000000000000000000000000000000000000000..0f60b7bd0d9c395e1748cc962810d2dee9bb9fc2 --- /dev/null +++ b/src/main/resources/static/easyui/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
          a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
          ","
          "],area:[1,"",""],param:[1,"",""],thead:[1,"","
          "],tr:[2,"","
          "],col:[2,"","
          "],td:[3,"","
          "],_default:k.htmlSerialize?[0,"",""]:[1,"X
          ","
          "]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m(" - + + + @@ -49,8 +51,8 @@ height: calc(100vh - 139px);overflow-x: hidden; -
          -
          + + diff --git a/src/main/resources/templates/admin/sysDepartment/edit.html b/src/main/resources/templates/admin/sysDepartment/edit.html index e7ed86b1da4b010cdd5e0836c3ce9d63c7ab3881..e17d3d31082f11c47cd8eabf0213430e9abb84d4 100644 --- a/src/main/resources/templates/admin/sysDepartment/edit.html +++ b/src/main/resources/templates/admin/sysDepartment/edit.html @@ -50,7 +50,12 @@
          - + + +
          diff --git a/src/main/resources/templates/admin/user/add.html b/src/main/resources/templates/admin/user/add.html index cfdc1bf5ca5fb00d63bd791432e1b990aac36828..786eff293d2ad6a4017629027d2958246eb51618 100644 --- a/src/main/resources/templates/admin/user/add.html +++ b/src/main/resources/templates/admin/user/add.html @@ -45,6 +45,15 @@ +
          + +
          + + +
          +
          diff --git a/src/main/resources/templates/admin/user/edit.html b/src/main/resources/templates/admin/user/edit.html index 87148467d11c931ec4ea86ba1ddc2d851a442923..6033c3b962416eedaeac53c6ba492a1c6231281c 100644 --- a/src/main/resources/templates/admin/user/edit.html +++ b/src/main/resources/templates/admin/user/edit.html @@ -42,6 +42,16 @@
          +
          + +
          + + +
          +
          diff --git a/src/main/resources/templates/admin/user/list.html b/src/main/resources/templates/admin/user/list.html index db32b44e5961ab73951deaa803dd007058e25d75..14ff720645fb853eb12548672bea10803ffe3888 100644 --- a/src/main/resources/templates/admin/user/list.html +++ b/src/main/resources/templates/admin/user/list.html @@ -57,8 +57,8 @@
          - - + +
          @@ -153,8 +153,13 @@ var exportUrl=window.rootPath+"/UserController/export"; }, { field: 'id', - title: '序号' - }, + title: '序号', + visible: false + }, + { + field: 'deptName', + title: '所属部门' + }, { field: 'nickname', title: '昵称' diff --git a/src/main/resources/templates/gen/test/add.html b/src/main/resources/templates/gen/test/add.html new file mode 100644 index 0000000000000000000000000000000000000000..3d3d5fdaee3dae7d7a2ced497e3c11d0b0a196f7 --- /dev/null +++ b/src/main/resources/templates/gen/test/add.html @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + + +
          +
          + + +
          +
          + +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/gen/test/edit.html b/src/main/resources/templates/gen/test/edit.html new file mode 100644 index 0000000000000000000000000000000000000000..ada050c7dcbabf80f26f5424592ddd5dbaabed7c --- /dev/null +++ b/src/main/resources/templates/gen/test/edit.html @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          +
          + + +
          +
          + +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/gen/test/list.html b/src/main/resources/templates/gen/test/list.html new file mode 100644 index 0000000000000000000000000000000000000000..639ad70fb1eb3c522566fed20246c2dc97fc1dac --- /dev/null +++ b/src/main/resources/templates/gen/test/list.html @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + +
          + +
          +
          + + +
          +
          +
          搜索条件
          +
          + + + +
          +
          + + + +
          +
          + + +
          + + +
          +
          +
          表单
          +
          + + + +
          +
          + + + +
          +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index 908bebd7a3d5b52c2573081f3eb57d9499d9dc99..8ee6bd2edb5e773fee720082a5aebfafd1aca88e 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -2,10 +2,10 @@ -SpringBoot_v2 +中山市生态环境局执法任务管理系统 - - + + @@ -55,13 +55,18 @@ .refreshIcon { top: -50px; font-size: 1.8rem; +} +.login-wrapper { + margin: 200px auto 0; + position: relative; + z-index: 5; }
          - Fork me on Gitee +
          @@ -70,12 +75,12 @@
          -
          +
          -

          SpringBoot - v2 +

          任务管理系统 +

          @@ -85,17 +90,17 @@
          +
          @@ -191,7 +201,8 @@ - + + \ No newline at end of file diff --git a/src/main/resources/templates/taskmanage/controlForLeader.html b/src/main/resources/templates/taskmanage/controlForLeader.html new file mode 100644 index 0000000000000000000000000000000000000000..4297e105401ee3a0e35b4222bf417974c21be72d --- /dev/null +++ b/src/main/resources/templates/taskmanage/controlForLeader.html @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + + +
          +
          +
          + +
          + +
          +
          + + +
          +
          + +
          +
          +
          +

          +

          执法一科

          +
          +
          + +
          + 更多 + +
          +
          + +
          +
          +
          +

          +

          执法二科

          +
          +
          + +
          + 更多 + +
          +
          + +
          +
          +
          +

          +

          执法三科

          +
          +
          + +
          + 更多 + +
          +
          +
          +
          + + + +
          +
          +
          + +
          +
          +
          +

          + 已完成任务量统计 +

          +
          + +
          + +
          + +
          + +
          + + + +
          + + + + + +
          +
          +
          +
          + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/controlForProcessExecutor.html b/src/main/resources/templates/taskmanage/controlForProcessExecutor.html new file mode 100644 index 0000000000000000000000000000000000000000..b7433de4a8033acf82d5b77ab9348525f01a1fd7 --- /dev/null +++ b/src/main/resources/templates/taskmanage/controlForProcessExecutor.html @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + + +
          +
          + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          +
          + + + +
          +
          +
          + +
          +
          +
          +

          + 任务完成排行 +

          +
          + +
          + +
          + +
          + +
          + + + +
          + + + + + +
          +
          +
          +
          + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/controlForProcessLeader.html b/src/main/resources/templates/taskmanage/controlForProcessLeader.html new file mode 100644 index 0000000000000000000000000000000000000000..c89a80859e6422c8e01929c437ecc4c849fdfbbc --- /dev/null +++ b/src/main/resources/templates/taskmanage/controlForProcessLeader.html @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + + +
          +
          + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          +
          + + + +
          +
          +
          + +
          +
          +
          +

          + 任务完成排行 +

          +
          + +
          + +
          + +
          + +
          + + + +
          + + + + + +
          +
          +
          +
          + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/controlForTaskStart.html b/src/main/resources/templates/taskmanage/controlForTaskStart.html new file mode 100644 index 0000000000000000000000000000000000000000..6e62e8ff43136170088b13952b8f5bda28876b3a --- /dev/null +++ b/src/main/resources/templates/taskmanage/controlForTaskStart.html @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + + +
          +
          + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          +
          + + + +
          +
          +
          + +
          +
          +
          +

          + 任务完成排行 +

          +
          + +
          + +
          + +
          + +
          + + + +
          + + + + + +
          +
          +
          +
          + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskfileInfo/add0.html b/src/main/resources/templates/taskmanage/taskfileInfo/add0.html new file mode 100644 index 0000000000000000000000000000000000000000..dd53c2625f65cb54646e04c5e04323a9447924fd --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskfileInfo/add0.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskfileInfo/addfile.html b/src/main/resources/templates/taskmanage/taskfileInfo/addfile.html new file mode 100644 index 0000000000000000000000000000000000000000..2170f94b228b54bfa2e98284dd39359597dbe983 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskfileInfo/addfile.html @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          + +
          + + + +
          +
          +
          + +
          + +
          +
          +
          +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskfileInfo/edit0.html b/src/main/resources/templates/taskmanage/taskfileInfo/edit0.html new file mode 100644 index 0000000000000000000000000000000000000000..05da9093665194a402ccbba2ba091cce87c8e712 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskfileInfo/edit0.html @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskfileInfo/list0.html b/src/main/resources/templates/taskmanage/taskfileInfo/list0.html new file mode 100644 index 0000000000000000000000000000000000000000..a6e2d971289a08d023c602bed71586e04a16551f --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskfileInfo/list0.html @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + +
          + +
          +
          + + +
          +
          +
          搜索条件
          +
          + + + +
          +
          + + + +
          +
          + + +
          + + +
          +
          +
          表单
          +
          + + + +
          +
          + + + +
          +
          + +
          + + + + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + + + + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskfileInfo/viewfile.html b/src/main/resources/templates/taskmanage/taskfileInfo/viewfile.html new file mode 100644 index 0000000000000000000000000000000000000000..64213fddafcdb545478300e292f665cbca807bb4 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskfileInfo/viewfile.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/add.html b/src/main/resources/templates/taskmanage/taskinfo/add.html new file mode 100644 index 0000000000000000000000000000000000000000..5fd7c0132e53d451bad7df741c6a88f3a77f029e --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/add.html @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + + +
          + +
          + + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + + +
          +
          + + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/addnewTask.html b/src/main/resources/templates/taskmanage/taskinfo/addnewTask.html new file mode 100644 index 0000000000000000000000000000000000000000..43b20942eedfe1c65455ff0a3792071cdb6296e1 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/addnewTask.html @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + +
          + +
          + + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + +
          + +
          + + + + + +
          +
          +
          + +
          + + +
          +
          +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/addnewTaskForLeader.html b/src/main/resources/templates/taskmanage/taskinfo/addnewTaskForLeader.html new file mode 100644 index 0000000000000000000000000000000000000000..70cc256f1d03b9ef45edad16b8ffed6a60114434 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/addnewTaskForLeader.html @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + +
          + +
          + + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + +
          + +
          + + + + + +
          +
          +
          + +
          + + +
          +
          +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/assignToExecutor.html b/src/main/resources/templates/taskmanage/taskinfo/assignToExecutor.html new file mode 100644 index 0000000000000000000000000000000000000000..b464620b59de0e895c705cacf1c9106a9590cc6f --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/assignToExecutor.html @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + + + + + + + +
          +
          + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          +
          + + +
          +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/edit.html b/src/main/resources/templates/taskmanage/taskinfo/edit.html new file mode 100644 index 0000000000000000000000000000000000000000..71d87c971e08281a150abf119f256de56ad33672 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/edit.html @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + + + + + + + +
          +
          + +
          + +
          + + +
          +
          + + +
          + +
          + + +
          +
          +
          +
          +
          附件上传
          +
          + + + +
          +
          + +
          + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/list.html b/src/main/resources/templates/taskmanage/taskinfo/list.html new file mode 100644 index 0000000000000000000000000000000000000000..75916461de2691f602988e406300665ba50adffd --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/list.html @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + +
          + +
          +
          + + +
          +
          +
          搜索条件
          +
          + + + +
          +
          + + + +
          +
          + + +
          + + +
          +
          +
          表单
          +
          + + + +
          +
          + + + +
          +
          + +
          + + + + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + + + + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/listForView.html b/src/main/resources/templates/taskmanage/taskinfo/listForView.html new file mode 100644 index 0000000000000000000000000000000000000000..938cc0349622887dbff8447a1131a3efc7a3133a --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/listForView.html @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + +
          + +
          +
          + + + + + +
          +
          +
          待处理中任务列表
          +
          + + + +
          +
          + +
          + + + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + + + + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/taskProcessListForExecutor.html b/src/main/resources/templates/taskmanage/taskinfo/taskProcessListForExecutor.html new file mode 100644 index 0000000000000000000000000000000000000000..22f4472594b1f82e1e4b828e193347cffb190c95 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/taskProcessListForExecutor.html @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + +
          + +
          +
          + + +
          +
          +
          搜索条件
          +
          + + + +
          +
          + + + +
          +
          + + +
          + + +
          +
          +
          表单
          +
          + + + +
          +
          + + + +
          +
          + +
          + + + + + + + + + + + + +
          +
          + +
          +
          + +
          + +
          +
          +
          + + + + + + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/taskProcessListForLeader.html b/src/main/resources/templates/taskmanage/taskinfo/taskProcessListForLeader.html new file mode 100644 index 0000000000000000000000000000000000000000..66ae7b823697c7b128f368c5ac30f3ce0df5183e --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/taskProcessListForLeader.html @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + +
          + +
          +
          + + +
          +
          +
          搜索条件
          +
          + + + +
          +
          + + + +
          +
          + +
          + + +
          +
          +
          表单
          +
          + + + +
          +
          + + + +
          +
          + +
          + + + + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + + + + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskinfo/tasklistForLeader.html b/src/main/resources/templates/taskmanage/taskinfo/tasklistForLeader.html new file mode 100644 index 0000000000000000000000000000000000000000..e0aed285c5fe47f51af9fae08f88d1b8cc44aa67 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskinfo/tasklistForLeader.html @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + +
          +
          + + +
          +
          + +
          + +
          +
          + + +
          +
          +
          搜索条件
          +
          + + + +
          +
          + + + +
          +
          + + +
          + + +
          +
          +
          表单
          +
          + + + +
          +
          + + + +
          +
          + +
          + + + + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + + + + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskprocessInfo/add.html b/src/main/resources/templates/taskmanage/taskprocessInfo/add.html new file mode 100644 index 0000000000000000000000000000000000000000..2f0809d20f58d7d6cd3bc50d8660b2d55416417f --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskprocessInfo/add.html @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          +
          附件上传
          +
          + + + +
          +
          +
          + + + + +
          +
          +
          + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskprocessInfo/assignBack.html b/src/main/resources/templates/taskmanage/taskprocessInfo/assignBack.html new file mode 100644 index 0000000000000000000000000000000000000000..28d0fd1c66e71f25c162053625a27e7fb50239e4 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskprocessInfo/assignBack.html @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + +
          +
          +
          + +
          + +
          +
          + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskprocessInfo/completeBack.html b/src/main/resources/templates/taskmanage/taskprocessInfo/completeBack.html new file mode 100644 index 0000000000000000000000000000000000000000..ff413f596999daf1db45bd3f4f7ca666c69b2a07 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskprocessInfo/completeBack.html @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + +
          +
          +
          + +
          + +
          +
          + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskprocessInfo/edit.html b/src/main/resources/templates/taskmanage/taskprocessInfo/edit.html new file mode 100644 index 0000000000000000000000000000000000000000..5b936b5359809e81b4b8d1854cc1ec0fba850063 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskprocessInfo/edit.html @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          + +
          + +
          +
          + + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          + +
          + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskprocessInfo/taskProcessInfo.html b/src/main/resources/templates/taskmanage/taskprocessInfo/taskProcessInfo.html new file mode 100644 index 0000000000000000000000000000000000000000..7a82a6870600a81370bb858fdc8126a26f65615f --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskprocessInfo/taskProcessInfo.html @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + +
          +
          +
          + +
          +
          + + +
          +
          +
          任务信息详情
          +
          + + + +
          +
          + + +
          + + +
          +
          +
          任务处理信息
          +
          + + + +
          +
          + +
          + + + + + +
          +
          +
          +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/taskmanage/taskprocessInfo/taskProcessInfoView.html b/src/main/resources/templates/taskmanage/taskprocessInfo/taskProcessInfoView.html new file mode 100644 index 0000000000000000000000000000000000000000..95eadb23d7e62edf675ed1ada1c1ee953dd2eb50 --- /dev/null +++ b/src/main/resources/templates/taskmanage/taskprocessInfo/taskProcessInfoView.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + +
          +
          +
          + +
          +
          + +
          + +
          + + +
          +
          +
          任务处理信息
          +
          + + + +
          +
          + +
          + + + + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + + + + + + + + +
          + +
          + + + +
          + +
          + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/test/taskinfoTest.java b/src/test/java/test/taskinfoTest.java new file mode 100644 index 0000000000000000000000000000000000000000..d2d42c788f4405f9b8de195bc7d4d180e43c477f --- /dev/null +++ b/src/test/java/test/taskinfoTest.java @@ -0,0 +1,13 @@ +package test; + +public class taskinfoTest { + + public static void main(String[] args) { + final String filename = "abcd"; + int index = filename.indexOf("."); + final String aa = filename.substring(0).toLowerCase(); + System.out.println(index); + System.out.println(aa); + + } +}