Commit e2c9cfb8 authored by Administrator's avatar Administrator

生成受理库和制证库实体

配置受理库和制证库数据源
parents c07b8ca8 b1c3a667
......@@ -10,7 +10,9 @@ import com.yxproject.start.utils.YXJSONResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JSONString;
import com.yxproject.start.service.SysRoleService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authz.annotation.RequiresPermissions;
......@@ -23,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.core.Context;
import java.text.SimpleDateFormat;
......@@ -40,6 +43,9 @@ public class ShiroApi {
@Autowired
private UtilService utilService;
@Autowired
private SysRoleService sysRoleService;
@RequestMapping(value={"/","/index"})
public String index(Map<String,Object> map){
System.out.println("HomeController.index()");
......@@ -50,6 +56,15 @@ public class ShiroApi {
return "/index";
}
@RequestMapping("/welcome")
public String welcome(Map<String,Object> map){
//获取到用户信息;
Subject subject = SecurityUtils.getSubject();
UserInfo ui = (UserInfo) subject.getPrincipal();
map.put("userInfo",ui);
return "/welcome";
}
@RequestMapping("/userLogin")
public String login(HttpServletRequest request, Map<String, Object> map) throws Exception {
System.out.println("HomeController.login()");
......@@ -60,17 +75,15 @@ public class ShiroApi {
String msg = "";
if (exception != null) {
if (UnknownAccountException.class.getName().equals(exception)) {
System.out.println("UnknownAccountException -- > 账号不存在:");
msg = "UnknownAccountException -- > 账号不存在:";
msg = "账号不存在!";
} else if (IncorrectCredentialsException.class.getName().equals(exception)) {
System.out.println("IncorrectCredentialsException -- > 密码不正确:");
msg = "IncorrectCredentialsException -- > 密码不正确:";
msg = "密码不正确!";
} else if ("kaptchaValidateFailed".equals(exception)) {
System.out.println("kaptchaValidateFailed -- > 验证码错误");
msg = "kaptchaValidateFailed -- > 验证码错误";
} else {
msg = "else >> " + exception;
System.out.println("else -- >" + exception);
msg = "验证码错误!";
} else if(AuthenticationException.class.getName().equals(exception)){
msg = "用户名密码不能为空!";
}else{
msg = exception;
}
}
map.put("msg", msg);
......@@ -97,7 +110,10 @@ public class ShiroApi {
*/
@RequestMapping("/permissionAdd")
@RequiresPermissions("permission.add")//权限管理;
public String permissionAdd(){
public String permissionAdd(Map<String,Object> map){
Subject subject = SecurityUtils.getSubject();
UserInfo ui = (UserInfo) subject.getPrincipal();
map.put("roleInfo",ui.getRoleList().get(0));
return "permissionAdd";
}
......@@ -107,7 +123,9 @@ public class ShiroApi {
*/
@RequestMapping("/userAdd")
@RequiresPermissions("userInfo.add")//权限管理;
public String userInfoAdd(){
public String userInfoAdd(Map<String,Object> map){
List<SysRole> list = sysRoleService.getAllActiveRoleInfo();
map.put("activeRoleList",list);
return "userInfoAdd";
}
......@@ -117,7 +135,10 @@ public class ShiroApi {
*/
@RequestMapping("/userList")
@RequiresPermissions("userInfo.view")//权限管理;
public String userInfo(){
public String userInfo(Map<String,Object> map){
Subject subject = SecurityUtils.getSubject();
UserInfo ui = (UserInfo) subject.getPrincipal();
map.put("userInfo",ui);
return "userInfo";
}
......
......@@ -7,19 +7,27 @@ import com.yxproject.start.service.ProductionTaskListService;
import com.yxproject.start.service.SysPermissionService;
import com.yxproject.start.service.SysRoleService;
import com.yxproject.start.service.UserInfoService;
import com.yxproject.start.service.impl.UserInfoServiceImpl;
import com.yxproject.start.utils.Md5Utils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authz.Permission;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.HashMap;
import java.util.LinkedHashMap;
......@@ -72,12 +80,27 @@ public class UserInfoApi {
}
@RequestMapping(value="/permissionAdd",method= RequestMethod.POST)
@POST
@Path("permissionAdd")
@RequiresPermissions("permission.add")
@ResponseBody
public Map<String, String> userAdd(@ModelAttribute SysPermission sysPermission) {
public String userAdd(@FormParam("name") String name,@FormParam("resourceType") String resourceType,@FormParam("url") String url,
@FormParam("permission")String permission,@FormParam("parentId")String parentId,@Context HttpServletResponse resp){
resp.setCharacterEncoding("UTF-8");
Map<String,String> map = new HashMap<>();
boolean flag = false;
String str = "0";
SysPermission sysPermission = new SysPermission();
sysPermission.setName(name);
sysPermission.setResourceType(resourceType);
sysPermission.setUrl(url);
sysPermission.setPermission(permission);
sysPermission.setParentId(Long.parseLong(parentId));
if(parentId.equals(str)){
sysPermission.setParentIds(parentId+"/");
}else{
sysPermission.setParentIds(str+"/"+parentId);
}
System.out.println(sysPermission);
flag = sysPermissionService.addPermission(sysPermission);
if (flag){
map.put("resultMsg","添加成功");
......@@ -85,52 +108,85 @@ public class UserInfoApi {
}else {
map.put("resultMsg","添加失败");
}
return map;
return map.toString();
}
/**
* 用户添加;
* @return
*/
@RequestMapping(value = "/userInfoAdd",method = RequestMethod.POST)
@POST
@Path("userInfoAdd")
@RequiresPermissions("userInfo.add")
@ResponseBody
public Map<String, String> userInfoAdd(@ModelAttribute UserInfo userInfo){
String pwd = userInfo.getPassword();
public String userInfoAdd(@FormParam("username") String username,@FormParam("name") String name,@FormParam("password") String password,
@FormParam("roleId")String roleId,@Context HttpServletResponse resp){
resp.setCharacterEncoding("UTF-8");
String salt = UUID.randomUUID().toString();
userInfo.setPassword(Md5Utils.entryptPassword(pwd,salt));
UserInfo userInfo = new UserInfo();
userInfo.setPassword(Md5Utils.entryptPassword(password,salt));
userInfo.setSalt(salt);
userInfo.setUsername(username);
userInfo.setName(name);
Map<String,String> map = new HashMap<>();
System.out.println(userInfo.getUsername());
System.out.println(userInfo.getPassword());
System.out.println(userInfo.getSalt());
boolean flag = false;
flag = userInfoService.addUser(userInfo);
flag = userInfoService.addUser(userInfo,Integer.parseInt(roleId));
if (flag){
map.put("resultMsg","添加成功");
}else {
map.put("resultMsg","添加失败");
}
return map;
return map.toString();
}
// /**
// * 用户删除;
// * @return
// */
// @RequestMapping(value = "/userDel",method = RequestMethod.POST)
// @RequiresPermissions("userInfo.del")//权限管理;
// public String userInfoDel(@QueryParam("username") String username, @QueryParam("password") String password){
// System.out.println("username------"+username+" -----password-----"+password);
// UserInfoService systemUserService = new UserInfoServiceImpl();
// int i = systemUserService.delUsername(new UserInfo());
//// int i = 0;
// System.out.println(i+"------返回值");
// return i+"userInfoAdd";
// }
/**
* 用户删除;
* @return
*/
@GET
@Path("userDel")
@RequiresPermissions("userInfo.del")
public String userInfoDel(@QueryParam("userId") String userId,@Context HttpServletResponse response){
response.setCharacterEncoding("UTF-8");
Map map = new HashMap();
boolean flag = false;
flag = userInfoService.deleteUserInfo(Integer.parseInt(userId));
return map.toString();
}
/**
* 角色删除;
* @return
*/
@GET
@Path("roleDel")
@RequiresPermissions("role.del")
public String roleDel(@QueryParam("roleId") String roleId,@Context HttpServletResponse response){
response.setCharacterEncoding("UTF-8");
Map map = new HashMap();
boolean flag = false;
flag = sysRoleService.deleteRole(Integer.parseInt(roleId));
return map.toString();
}
/**
* 权限删除;
* @return
*/
@GET
@Path("permissionDel")
@RequiresPermissions("permission.del")
public String permissionDel(@QueryParam("permissionId") String permissionId,@Context HttpServletResponse response){
response.setCharacterEncoding("UTF-8");
Map map = new HashMap();
boolean flag = false;
flag = sysPermissionService.deletePermission(Integer.parseInt(permissionId));
return map.toString();
}
//
// /**
// * 用户更新;
......@@ -147,26 +203,54 @@ public class UserInfoApi {
// return i+"userInfoAdd";
// }
@RequestMapping(value="/roleInfoAdd",method= RequestMethod.POST)
@POST
@Path("roleInfoAdd")
@RequiresPermissions("role.add")
@ResponseBody
public Map<String, String> roleAdd(@ModelAttribute SysRole sysRole) {
public String roleAdd(@FormParam("role") String role,@FormParam("description") String description,
@Context HttpServletRequest request,@Context HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
Map<String,String> map = new HashMap<>();
boolean flag = false;
flag = sysRoleService.addRole(sysRole);
System.out.println(sysRole.getId());
SysRole sysRole = new SysRole();
sysRole.setRole(role);
sysRole.setDescription(description);
String[] permissionIds = request.getParameterValues("permissions");
flag = sysRoleService.addRole(sysRole,permissionIds);
if (flag){
map.put("resultMsg","添加成功");
}else {
map.put("resultMsg","添加失败");
}
return map;
return map.toString();
}
@GET
@RequestMapping("selectAllUser")
@Produces(MediaType.APPLICATION_JSON)
public List<UserInfo> selectAllUser() {
List<UserInfo> list = userInfoService.getAllUserInfo();
return list;
}
@GET
@Path("selectAllRole")
@Produces(MediaType.APPLICATION_JSON)
public List<SysRole> selectAllRole() {
List<SysRole> list = sysRoleService.getAllRoleInfo();
return list;
}
@GET
@Path("selectAllPermission")
@Produces(MediaType.APPLICATION_JSON)
public List<SysPermission> selectAllPermission() {
List<SysPermission> list = sysPermissionService.getAllPermission();
return list;
}
}
package com.yxproject.start.config;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import javax.sql.DataSource;
/**
* @项目名称:wyait-common
* @包名:com.wyait.manage.config
* @类描述:数据源配置
* @创建人:wyait
* @创建时间:2018-02-27 13:33
* @version:V1.0
*/
@Configuration
//指明了扫描dao层,并且给dao层注入指定的SqlSessionTemplate
@MapperScan(basePackages = "com.yxproject.start.mapper", sqlSessionTemplateRef = "testSqlSessionTemplate")
public class DataSourceConfig {
/**
* 创建datasource对象
* @return
*/
@Bean(name = "testDataSource")
@ConfigurationProperties(prefix = "slave.datasource.test")// prefix值必须是application.properteis中对应属性的前缀
@Primary
public DataSource testDataSource() {
return DataSourceBuilder.create().build();
}
/**
* 创建sql工程
* @param dataSource
* @return
* @throws Exception
*/
@Bean(name = "testSqlSessionFactory")
@Primary
public SqlSessionFactory testSqlSessionFactory(@Qualifier("testDataSource") DataSource dataSource) throws Exception {
SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
bean.setDataSource(dataSource);
//对应mybatis.type-aliases-package配置
bean.setTypeAliasesPackage("com.yxproject.start.entity");
//对应mybatis.mapper-locations配置
bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/*.xml"));
//开启驼峰映射
bean.getObject().getConfiguration().setMapUnderscoreToCamelCase(true);
return bean.getObject();
}
/**
* 配置事务管理
* @param dataSource
* @return
*/
@Bean(name = "testTransactionManager")
@Primary
public DataSourceTransactionManager testTransactionManager(@Qualifier("testDataSource") DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
/**
* sqlSession模版,用于配置自动扫描pojo实体类
* @param sqlSessionFactory
* @return
* @throws Exception
*/
@Bean(name = "testSqlSessionTemplate")
@Primary
public SqlSessionTemplate testSqlSessionTemplate(@Qualifier("testSqlSessionFactory") SqlSessionFactory sqlSessionFactory) throws Exception {
return new SqlSessionTemplate(sqlSessionFactory);
}
}
......@@ -63,7 +63,7 @@ public class MyShiroRealm extends AuthorizingRealm {
//通过username从数据库中查找 User对象,如果找到,没找到.
//实际项目中,这里可以根据实际情况做缓存,如果不做,Shiro自己也是有时间间隔机制,2分钟内不会重复执行该方法
UserInfo user = loginService.findByUsername(username);
if(user == null){
if(user == null || user.getState()==1){
return null;
}
SimpleAuthenticationInfo authenticationInfo = new SimpleAuthenticationInfo(
......
......@@ -46,6 +46,13 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/js/**", "anon");
filterChainDefinitionMap.put("/fonts/**", "anon");
filterChainDefinitionMap.put("/images/**", "anon");
filterChainDefinitionMap.put("/lib/**", "anon");
filterChainDefinitionMap.put("/layui/**", "anon");
filterChainDefinitionMap.put("/modules/**", "anon");
filterChainDefinitionMap.put("/laydate/**", "anon");
filterChainDefinitionMap.put("/default/**", "anon");
filterChainDefinitionMap.put("/layer/**", "anon");
filterChainDefinitionMap.put("/lay/**", "anon");
//配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了
filterChainDefinitionMap.put("/logout", "logout");
//<!-- 过滤链定义,从上向下顺序执行,一般将/**放在最为下边 -->:这是一个坑呢,一不小心代码就不好使了;
......
......@@ -78,13 +78,4 @@ public class UserInfo implements Serializable {
public void setRoleList(List<SysRole> roleList) {
this.roleList = roleList;
}
/**
* 密码盐.
* @return
*/
public String getCredentialsSalt(){
return this.username+this.salt;
}
//重新对盐重新进行了定义,用户名+salt,这样就更加不容易被破解
}
\ No newline at end of file
package com.yxproject.start.entity.accu;
import javax.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "ACC_CARD_T", schema = "ACC_DBA", catalog = "")
public class AccCardTEntity {
private String uploadNo;
private String acceptNo;
private String photoNo;
private String name;
private String sexNo;
private String nationNo;
private String birthday;
private String idNo;
private String addr1;
private String addr2;
private String addr3;
private String address1;
private String signGovt;
private String expireDate;
private String beginDate;
private String applyReason;
private String statusNo;
@Basic
@Column(name = "UPLOAD_NO", nullable = false, length = 22)
public String getUploadNo() {
return uploadNo;
}
public void setUploadNo(String uploadNo) {
this.uploadNo = uploadNo;
}
@Id
@Column(name = "ACCEPT_NO", nullable = false, length = 12)
public String getAcceptNo() {
return acceptNo;
}
public void setAcceptNo(String acceptNo) {
this.acceptNo = acceptNo;
}
@Basic
@Column(name = "PHOTO_NO", nullable = true, length = 12)
public String getPhotoNo() {
return photoNo;
}
public void setPhotoNo(String photoNo) {
this.photoNo = photoNo;
}
@Basic
@Column(name = "NAME", nullable = false, length = 45)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Basic
@Column(name = "SEX_NO", nullable = false, length = 1)
public String getSexNo() {
return sexNo;
}
public void setSexNo(String sexNo) {
this.sexNo = sexNo;
}
@Basic
@Column(name = "NATION_NO", nullable = false, length = 2)
public String getNationNo() {
return nationNo;
}
public void setNationNo(String nationNo) {
this.nationNo = nationNo;
}
@Basic
@Column(name = "BIRTHDAY", nullable = false, length = 8)
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
@Basic
@Column(name = "ID_NO", nullable = false, length = 18)
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
@Basic
@Column(name = "ADDR1", nullable = false, length = 36)
public String getAddr1() {
return addr1;
}
public void setAddr1(String addr1) {
this.addr1 = addr1;
}
@Basic
@Column(name = "ADDR2", nullable = true, length = 36)
public String getAddr2() {
return addr2;
}
public void setAddr2(String addr2) {
this.addr2 = addr2;
}
@Basic
@Column(name = "ADDR3", nullable = true, length = 36)
public String getAddr3() {
return addr3;
}
public void setAddr3(String addr3) {
this.addr3 = addr3;
}
@Basic
@Column(name = "ADDRESS1", nullable = true, length = 105)
public String getAddress1() {
return address1;
}
public void setAddress1(String address1) {
this.address1 = address1;
}
@Basic
@Column(name = "SIGN_GOVT", nullable = false, length = 45)
public String getSignGovt() {
return signGovt;
}
public void setSignGovt(String signGovt) {
this.signGovt = signGovt;
}
@Basic
@Column(name = "EXPIRE_DATE", nullable = false, length = 8)
public String getExpireDate() {
return expireDate;
}
public void setExpireDate(String expireDate) {
this.expireDate = expireDate;
}
@Basic
@Column(name = "BEGIN_DATE", nullable = false, length = 8)
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
@Basic
@Column(name = "APPLY_REASON", nullable = false, length = 2)
public String getApplyReason() {
return applyReason;
}
public void setApplyReason(String applyReason) {
this.applyReason = applyReason;
}
@Basic
@Column(name = "STATUS_NO", nullable = true, length = 1)
public String getStatusNo() {
return statusNo;
}
public void setStatusNo(String statusNo) {
this.statusNo = statusNo;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AccCardTEntity that = (AccCardTEntity) o;
return Objects.equals(uploadNo, that.uploadNo) &&
Objects.equals(acceptNo, that.acceptNo) &&
Objects.equals(photoNo, that.photoNo) &&
Objects.equals(name, that.name) &&
Objects.equals(sexNo, that.sexNo) &&
Objects.equals(nationNo, that.nationNo) &&
Objects.equals(birthday, that.birthday) &&
Objects.equals(idNo, that.idNo) &&
Objects.equals(addr1, that.addr1) &&
Objects.equals(addr2, that.addr2) &&
Objects.equals(addr3, that.addr3) &&
Objects.equals(address1, that.address1) &&
Objects.equals(signGovt, that.signGovt) &&
Objects.equals(expireDate, that.expireDate) &&
Objects.equals(beginDate, that.beginDate) &&
Objects.equals(applyReason, that.applyReason) &&
Objects.equals(statusNo, that.statusNo);
}
@Override
public int hashCode() {
return Objects.hash(uploadNo, acceptNo, photoNo, name, sexNo, nationNo, birthday, idNo, addr1, addr2, addr3, address1, signGovt, expireDate, beginDate, applyReason, statusNo);
}
}
package com.yxproject.start.entity.accu;
import javax.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "ACC_GROUP_RELATION_T", schema = "ACC_DBA", catalog = "")
public class AccGroupRelationTEntity {
private String groupNo;
private String originalNo;
private String dealStatus;
private String dealDate;
private String uploadUnitNo;
@Id
@Column(name = "GROUP_NO", nullable = false, length = 10)
public String getGroupNo() {
return groupNo;
}
public void setGroupNo(String groupNo) {
this.groupNo = groupNo;
}
@Basic
@Column(name = "ORIGINAL_NO", nullable = false, length = 25)
public String getOriginalNo() {
return originalNo;
}
public void setOriginalNo(String originalNo) {
this.originalNo = originalNo;
}
@Basic
@Column(name = "DEAL_STATUS", nullable = true, length = 1)
public String getDealStatus() {
return dealStatus;
}
public void setDealStatus(String dealStatus) {
this.dealStatus = dealStatus;
}
@Basic
@Column(name = "DEAL_DATE", nullable = false, length = 8)
public String getDealDate() {
return dealDate;
}
public void setDealDate(String dealDate) {
this.dealDate = dealDate;
}
@Basic
@Column(name = "UPLOAD_UNIT_NO", nullable = false, length = 12)
public String getUploadUnitNo() {
return uploadUnitNo;
}
public void setUploadUnitNo(String uploadUnitNo) {
this.uploadUnitNo = uploadUnitNo;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AccGroupRelationTEntity that = (AccGroupRelationTEntity) o;
return Objects.equals(groupNo, that.groupNo) &&
Objects.equals(originalNo, that.originalNo) &&
Objects.equals(dealStatus, that.dealStatus) &&
Objects.equals(dealDate, that.dealDate) &&
Objects.equals(uploadUnitNo, that.uploadUnitNo);
}
@Override
public int hashCode() {
return Objects.hash(groupNo, originalNo, dealStatus, dealDate, uploadUnitNo);
}
}
package com.yxproject.start.entity.accu;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
@Entity
@Table(name = "ACC_GROUP_T", schema = "ACC_DBA", catalog = "")
public class AccGroupTEntity {
private String groupNo;
private String userCode;
private Time importTime;
private String dealFlag;
private Byte validCount;
private Byte invalidCount;
private Time submitDate;
private String submitCode;
@Id
@Column(name = "GROUP_NO", nullable = false, length = 10)
public String getGroupNo() {
return groupNo;
}
public void setGroupNo(String groupNo) {
this.groupNo = groupNo;
}
@Basic
@Column(name = "USER_CODE", nullable = true, length = 8)
public String getUserCode() {
return userCode;
}
public void setUserCode(String userCode) {
this.userCode = userCode;
}
@Basic
@Column(name = "IMPORT_TIME", nullable = true)
public Time getImportTime() {
return importTime;
}
public void setImportTime(Time importTime) {
this.importTime = importTime;
}
@Basic
@Column(name = "DEAL_FLAG", nullable = false, length = 1)
public String getDealFlag() {
return dealFlag;
}
public void setDealFlag(String dealFlag) {
this.dealFlag = dealFlag;
}
@Basic
@Column(name = "VALID_COUNT", nullable = true, precision = 0)
public Byte getValidCount() {
return validCount;
}
public void setValidCount(Byte validCount) {
this.validCount = validCount;
}
@Basic
@Column(name = "INVALID_COUNT", nullable = true, precision = 0)
public Byte getInvalidCount() {
return invalidCount;
}
public void setInvalidCount(Byte invalidCount) {
this.invalidCount = invalidCount;
}
@Basic
@Column(name = "SUBMIT_DATE", nullable = true)
public Time getSubmitDate() {
return submitDate;
}
public void setSubmitDate(Time submitDate) {
this.submitDate = submitDate;
}
@Basic
@Column(name = "SUBMIT_CODE", nullable = true, length = 8)
public String getSubmitCode() {
return submitCode;
}
public void setSubmitCode(String submitCode) {
this.submitCode = submitCode;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AccGroupTEntity that = (AccGroupTEntity) o;
return Objects.equals(groupNo, that.groupNo) &&
Objects.equals(userCode, that.userCode) &&
Objects.equals(importTime, that.importTime) &&
Objects.equals(dealFlag, that.dealFlag) &&
Objects.equals(validCount, that.validCount) &&
Objects.equals(invalidCount, that.invalidCount) &&
Objects.equals(submitDate, that.submitDate) &&
Objects.equals(submitCode, that.submitCode);
}
@Override
public int hashCode() {
return Objects.hash(groupNo, userCode, importTime, dealFlag, validCount, invalidCount, submitDate, submitCode);
}
}
package com.yxproject.start.entity.prod;
import javax.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "PROD_APPLY_INFO_T", schema = "PROD_DBA", catalog = "")
public class ProdApplyInfoTEntity {
private String uploadNo;
private String acceptNo;
private String makeType;
private String applyName;
private String applyPhone;
private String applyPostcode;
private String applyAddress;
private String drawType;
private String provinceNo;
@Basic
@Column(name = "UPLOAD_NO", nullable = false, length = 22)
public String getUploadNo() {
return uploadNo;
}
public void setUploadNo(String uploadNo) {
this.uploadNo = uploadNo;
}
@Id
@Column(name = "ACCEPT_NO", nullable = false, length = 12)
public String getAcceptNo() {
return acceptNo;
}
public void setAcceptNo(String acceptNo) {
this.acceptNo = acceptNo;
}
@Basic
@Column(name = "MAKE_TYPE", nullable = true, length = 1)
public String getMakeType() {
return makeType;
}
public void setMakeType(String makeType) {
this.makeType = makeType;
}
@Basic
@Column(name = "APPLY_NAME", nullable = true, length = 45)
public String getApplyName() {
return applyName;
}
public void setApplyName(String applyName) {
this.applyName = applyName;
}
@Basic
@Column(name = "APPLY_PHONE", nullable = true, length = 20)
public String getApplyPhone() {
return applyPhone;
}
public void setApplyPhone(String applyPhone) {
this.applyPhone = applyPhone;
}
@Basic
@Column(name = "APPLY_POSTCODE", nullable = true, length = 6)
public String getApplyPostcode() {
return applyPostcode;
}
public void setApplyPostcode(String applyPostcode) {
this.applyPostcode = applyPostcode;
}
@Basic
@Column(name = "APPLY_ADDRESS", nullable = true, length = 105)
public String getApplyAddress() {
return applyAddress;
}
public void setApplyAddress(String applyAddress) {
this.applyAddress = applyAddress;
}
@Basic
@Column(name = "DRAW_TYPE", nullable = false, length = 2)
public String getDrawType() {
return drawType;
}
public void setDrawType(String drawType) {
this.drawType = drawType;
}
@Basic
@Column(name = "PROVINCE_NO", nullable = true, length = 6)
public String getProvinceNo() {
return provinceNo;
}
public void setProvinceNo(String provinceNo) {
this.provinceNo = provinceNo;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProdApplyInfoTEntity that = (ProdApplyInfoTEntity) o;
return Objects.equals(uploadNo, that.uploadNo) &&
Objects.equals(acceptNo, that.acceptNo) &&
Objects.equals(makeType, that.makeType) &&
Objects.equals(applyName, that.applyName) &&
Objects.equals(applyPhone, that.applyPhone) &&
Objects.equals(applyPostcode, that.applyPostcode) &&
Objects.equals(applyAddress, that.applyAddress) &&
Objects.equals(drawType, that.drawType) &&
Objects.equals(provinceNo, that.provinceNo);
}
@Override
public int hashCode() {
return Objects.hash(uploadNo, acceptNo, makeType, applyName, applyPhone, applyPostcode, applyAddress, drawType, provinceNo);
}
}
package com.yxproject.start.entity.prod;
import javax.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "PROD_CARD_T", schema = "PROD_DBA", catalog = "")
public class ProdCardTEntity {
private String uploadNo;
private String acceptNo;
private String photoNo;
private String name;
private String sexNo;
private String nationNo;
private String birthday;
private String idNo;
private String addr1;
private String addr2;
private String addr3;
private String address1;
private String signGovt;
private String expireDate;
private String beginDate;
private String applyReason;
private String statusNo;
private String cardSerial;
@Basic
@Column(name = "UPLOAD_NO", nullable = false, length = 22)
public String getUploadNo() {
return uploadNo;
}
public void setUploadNo(String uploadNo) {
this.uploadNo = uploadNo;
}
@Id
@Column(name = "ACCEPT_NO", nullable = false, length = 12)
public String getAcceptNo() {
return acceptNo;
}
public void setAcceptNo(String acceptNo) {
this.acceptNo = acceptNo;
}
@Basic
@Column(name = "PHOTO_NO", nullable = true, length = 12)
public String getPhotoNo() {
return photoNo;
}
public void setPhotoNo(String photoNo) {
this.photoNo = photoNo;
}
@Basic
@Column(name = "NAME", nullable = false, length = 45)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Basic
@Column(name = "SEX_NO", nullable = false, length = 1)
public String getSexNo() {
return sexNo;
}
public void setSexNo(String sexNo) {
this.sexNo = sexNo;
}
@Basic
@Column(name = "NATION_NO", nullable = false, length = 2)
public String getNationNo() {
return nationNo;
}
public void setNationNo(String nationNo) {
this.nationNo = nationNo;
}
@Basic
@Column(name = "BIRTHDAY", nullable = false, length = 8)
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
@Basic
@Column(name = "ID_NO", nullable = false, length = 18)
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
@Basic
@Column(name = "ADDR1", nullable = false, length = 36)
public String getAddr1() {
return addr1;
}
public void setAddr1(String addr1) {
this.addr1 = addr1;
}
@Basic
@Column(name = "ADDR2", nullable = true, length = 36)
public String getAddr2() {
return addr2;
}
public void setAddr2(String addr2) {
this.addr2 = addr2;
}
@Basic
@Column(name = "ADDR3", nullable = true, length = 36)
public String getAddr3() {
return addr3;
}
public void setAddr3(String addr3) {
this.addr3 = addr3;
}
@Basic
@Column(name = "ADDRESS1", nullable = true, length = 105)
public String getAddress1() {
return address1;
}
public void setAddress1(String address1) {
this.address1 = address1;
}
@Basic
@Column(name = "SIGN_GOVT", nullable = false, length = 45)
public String getSignGovt() {
return signGovt;
}
public void setSignGovt(String signGovt) {
this.signGovt = signGovt;
}
@Basic
@Column(name = "EXPIRE_DATE", nullable = false, length = 8)
public String getExpireDate() {
return expireDate;
}
public void setExpireDate(String expireDate) {
this.expireDate = expireDate;
}
@Basic
@Column(name = "BEGIN_DATE", nullable = false, length = 8)
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
@Basic
@Column(name = "APPLY_REASON", nullable = false, length = 2)
public String getApplyReason() {
return applyReason;
}
public void setApplyReason(String applyReason) {
this.applyReason = applyReason;
}
@Basic
@Column(name = "STATUS_NO", nullable = false, length = 1)
public String getStatusNo() {
return statusNo;
}
public void setStatusNo(String statusNo) {
this.statusNo = statusNo;
}
@Basic
@Column(name = "CARD_SERIAL", nullable = true, length = 32)
public String getCardSerial() {
return cardSerial;
}
public void setCardSerial(String cardSerial) {
this.cardSerial = cardSerial;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProdCardTEntity that = (ProdCardTEntity) o;
return Objects.equals(uploadNo, that.uploadNo) &&
Objects.equals(acceptNo, that.acceptNo) &&
Objects.equals(photoNo, that.photoNo) &&
Objects.equals(name, that.name) &&
Objects.equals(sexNo, that.sexNo) &&
Objects.equals(nationNo, that.nationNo) &&
Objects.equals(birthday, that.birthday) &&
Objects.equals(idNo, that.idNo) &&
Objects.equals(addr1, that.addr1) &&
Objects.equals(addr2, that.addr2) &&
Objects.equals(addr3, that.addr3) &&
Objects.equals(address1, that.address1) &&
Objects.equals(signGovt, that.signGovt) &&
Objects.equals(expireDate, that.expireDate) &&
Objects.equals(beginDate, that.beginDate) &&
Objects.equals(applyReason, that.applyReason) &&
Objects.equals(statusNo, that.statusNo) &&
Objects.equals(cardSerial, that.cardSerial);
}
@Override
public int hashCode() {
return Objects.hash(uploadNo, acceptNo, photoNo, name, sexNo, nationNo, birthday, idNo, addr1, addr2, addr3, address1, signGovt, expireDate, beginDate, applyReason, statusNo, cardSerial);
}
}
package com.yxproject.start.entity.prod;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
@Entity
@Table(name = "PROD_GROUP_T", schema = "PROD_DBA", catalog = "")
public class ProdGroupTEntity {
private String groupNo;
private Byte validCount;
private Byte invalidCount;
private Time submitDate;
private String submitCode;
private Time exportDate;
private String exportCode;
private String downloadFlag;
private Byte downloadCount;
private Time downloadDate;
private String ewriteFlag;
private Byte ewriteCount;
private Time ewriteDate;
private String checkFlag;
private Byte checkCount;
private Time checkDate;
private String sendFlag;
private Byte sendCount;
private Time sendDate;
private String moveFlag;
private Byte moveCount;
private Time moveDate;
@Id
@Column(name = "GROUP_NO", nullable = false, length = 10)
public String getGroupNo() {
return groupNo;
}
public void setGroupNo(String groupNo) {
this.groupNo = groupNo;
}
@Basic
@Column(name = "VALID_COUNT", nullable = true, precision = 0)
public Byte getValidCount() {
return validCount;
}
public void setValidCount(Byte validCount) {
this.validCount = validCount;
}
@Basic
@Column(name = "INVALID_COUNT", nullable = true, precision = 0)
public Byte getInvalidCount() {
return invalidCount;
}
public void setInvalidCount(Byte invalidCount) {
this.invalidCount = invalidCount;
}
@Basic
@Column(name = "SUBMIT_DATE", nullable = true)
public Time getSubmitDate() {
return submitDate;
}
public void setSubmitDate(Time submitDate) {
this.submitDate = submitDate;
}
@Basic
@Column(name = "SUBMIT_CODE", nullable = true, length = 8)
public String getSubmitCode() {
return submitCode;
}
public void setSubmitCode(String submitCode) {
this.submitCode = submitCode;
}
@Basic
@Column(name = "EXPORT_DATE", nullable = true)
public Time getExportDate() {
return exportDate;
}
public void setExportDate(Time exportDate) {
this.exportDate = exportDate;
}
@Basic
@Column(name = "EXPORT_CODE", nullable = true, length = 8)
public String getExportCode() {
return exportCode;
}
public void setExportCode(String exportCode) {
this.exportCode = exportCode;
}
@Basic
@Column(name = "DOWNLOAD_FLAG", nullable = true, length = 1)
public String getDownloadFlag() {
return downloadFlag;
}
public void setDownloadFlag(String downloadFlag) {
this.downloadFlag = downloadFlag;
}
@Basic
@Column(name = "DOWNLOAD_COUNT", nullable = true, precision = 0)
public Byte getDownloadCount() {
return downloadCount;
}
public void setDownloadCount(Byte downloadCount) {
this.downloadCount = downloadCount;
}
@Basic
@Column(name = "DOWNLOAD_DATE", nullable = true)
public Time getDownloadDate() {
return downloadDate;
}
public void setDownloadDate(Time downloadDate) {
this.downloadDate = downloadDate;
}
@Basic
@Column(name = "EWRITE_FLAG", nullable = true, length = 1)
public String getEwriteFlag() {
return ewriteFlag;
}
public void setEwriteFlag(String ewriteFlag) {
this.ewriteFlag = ewriteFlag;
}
@Basic
@Column(name = "EWRITE_COUNT", nullable = true, precision = 0)
public Byte getEwriteCount() {
return ewriteCount;
}
public void setEwriteCount(Byte ewriteCount) {
this.ewriteCount = ewriteCount;
}
@Basic
@Column(name = "EWRITE_DATE", nullable = true)
public Time getEwriteDate() {
return ewriteDate;
}
public void setEwriteDate(Time ewriteDate) {
this.ewriteDate = ewriteDate;
}
@Basic
@Column(name = "CHECK_FLAG", nullable = true, length = 1)
public String getCheckFlag() {
return checkFlag;
}
public void setCheckFlag(String checkFlag) {
this.checkFlag = checkFlag;
}
@Basic
@Column(name = "CHECK_COUNT", nullable = true, precision = 0)
public Byte getCheckCount() {
return checkCount;
}
public void setCheckCount(Byte checkCount) {
this.checkCount = checkCount;
}
@Basic
@Column(name = "CHECK_DATE", nullable = true)
public Time getCheckDate() {
return checkDate;
}
public void setCheckDate(Time checkDate) {
this.checkDate = checkDate;
}
@Basic
@Column(name = "SEND_FLAG", nullable = true, length = 1)
public String getSendFlag() {
return sendFlag;
}
public void setSendFlag(String sendFlag) {
this.sendFlag = sendFlag;
}
@Basic
@Column(name = "SEND_COUNT", nullable = true, precision = 0)
public Byte getSendCount() {
return sendCount;
}
public void setSendCount(Byte sendCount) {
this.sendCount = sendCount;
}
@Basic
@Column(name = "SEND_DATE", nullable = true)
public Time getSendDate() {
return sendDate;
}
public void setSendDate(Time sendDate) {
this.sendDate = sendDate;
}
@Basic
@Column(name = "MOVE_FLAG", nullable = true, length = 1)
public String getMoveFlag() {
return moveFlag;
}
public void setMoveFlag(String moveFlag) {
this.moveFlag = moveFlag;
}
@Basic
@Column(name = "MOVE_COUNT", nullable = true, precision = 0)
public Byte getMoveCount() {
return moveCount;
}
public void setMoveCount(Byte moveCount) {
this.moveCount = moveCount;
}
@Basic
@Column(name = "MOVE_DATE", nullable = true)
public Time getMoveDate() {
return moveDate;
}
public void setMoveDate(Time moveDate) {
this.moveDate = moveDate;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProdGroupTEntity that = (ProdGroupTEntity) o;
return Objects.equals(groupNo, that.groupNo) &&
Objects.equals(validCount, that.validCount) &&
Objects.equals(invalidCount, that.invalidCount) &&
Objects.equals(submitDate, that.submitDate) &&
Objects.equals(submitCode, that.submitCode) &&
Objects.equals(exportDate, that.exportDate) &&
Objects.equals(exportCode, that.exportCode) &&
Objects.equals(downloadFlag, that.downloadFlag) &&
Objects.equals(downloadCount, that.downloadCount) &&
Objects.equals(downloadDate, that.downloadDate) &&
Objects.equals(ewriteFlag, that.ewriteFlag) &&
Objects.equals(ewriteCount, that.ewriteCount) &&
Objects.equals(ewriteDate, that.ewriteDate) &&
Objects.equals(checkFlag, that.checkFlag) &&
Objects.equals(checkCount, that.checkCount) &&
Objects.equals(checkDate, that.checkDate) &&
Objects.equals(sendFlag, that.sendFlag) &&
Objects.equals(sendCount, that.sendCount) &&
Objects.equals(sendDate, that.sendDate) &&
Objects.equals(moveFlag, that.moveFlag) &&
Objects.equals(moveCount, that.moveCount) &&
Objects.equals(moveDate, that.moveDate);
}
@Override
public int hashCode() {
return Objects.hash(groupNo, validCount, invalidCount, submitDate, submitCode, exportDate, exportCode, downloadFlag, downloadCount, downloadDate, ewriteFlag, ewriteCount, ewriteDate, checkFlag, checkCount, checkDate, sendFlag, sendCount, sendDate, moveFlag, moveCount, moveDate);
}
}
package com.yxproject.start.entity.prod;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
@Entity
@Table(name = "PROD_TRACE_T", schema = "PROD_DBA", catalog = "")
public class ProdTraceTEntity {
private String acceptNo;
private String photoerNo;
private Time photoDate;
private String exportNo;
private Time exportDate;
private String downloadNo;
private Time downloadDate;
private String electricWriterNo;
private Time electricWriteDate;
private String checkerNo;
private Time checkDate;
private String moverNo;
private Time moveDate;
@Id
@Column(name = "ACCEPT_NO", nullable = false, length = 12)
public String getAcceptNo() {
return acceptNo;
}
public void setAcceptNo(String acceptNo) {
this.acceptNo = acceptNo;
}
@Basic
@Column(name = "PHOTOER_NO", nullable = true, length = 8)
public String getPhotoerNo() {
return photoerNo;
}
public void setPhotoerNo(String photoerNo) {
this.photoerNo = photoerNo;
}
@Basic
@Column(name = "PHOTO_DATE", nullable = true)
public Time getPhotoDate() {
return photoDate;
}
public void setPhotoDate(Time photoDate) {
this.photoDate = photoDate;
}
@Basic
@Column(name = "EXPORT_NO", nullable = true, length = 8)
public String getExportNo() {
return exportNo;
}
public void setExportNo(String exportNo) {
this.exportNo = exportNo;
}
@Basic
@Column(name = "EXPORT_DATE", nullable = true)
public Time getExportDate() {
return exportDate;
}
public void setExportDate(Time exportDate) {
this.exportDate = exportDate;
}
@Basic
@Column(name = "DOWNLOAD_NO", nullable = true, length = 8)
public String getDownloadNo() {
return downloadNo;
}
public void setDownloadNo(String downloadNo) {
this.downloadNo = downloadNo;
}
@Basic
@Column(name = "DOWNLOAD_DATE", nullable = true)
public Time getDownloadDate() {
return downloadDate;
}
public void setDownloadDate(Time downloadDate) {
this.downloadDate = downloadDate;
}
@Basic
@Column(name = "ELECTRIC_WRITER_NO", nullable = true, length = 8)
public String getElectricWriterNo() {
return electricWriterNo;
}
public void setElectricWriterNo(String electricWriterNo) {
this.electricWriterNo = electricWriterNo;
}
@Basic
@Column(name = "ELECTRIC_WRITE_DATE", nullable = true)
public Time getElectricWriteDate() {
return electricWriteDate;
}
public void setElectricWriteDate(Time electricWriteDate) {
this.electricWriteDate = electricWriteDate;
}
@Basic
@Column(name = "CHECKER_NO", nullable = true, length = 8)
public String getCheckerNo() {
return checkerNo;
}
public void setCheckerNo(String checkerNo) {
this.checkerNo = checkerNo;
}
@Basic
@Column(name = "CHECK_DATE", nullable = true)
public Time getCheckDate() {
return checkDate;
}
public void setCheckDate(Time checkDate) {
this.checkDate = checkDate;
}
@Basic
@Column(name = "MOVER_NO", nullable = true, length = 8)
public String getMoverNo() {
return moverNo;
}
public void setMoverNo(String moverNo) {
this.moverNo = moverNo;
}
@Basic
@Column(name = "MOVE_DATE", nullable = true)
public Time getMoveDate() {
return moveDate;
}
public void setMoveDate(Time moveDate) {
this.moveDate = moveDate;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProdTraceTEntity that = (ProdTraceTEntity) o;
return Objects.equals(acceptNo, that.acceptNo) &&
Objects.equals(photoerNo, that.photoerNo) &&
Objects.equals(photoDate, that.photoDate) &&
Objects.equals(exportNo, that.exportNo) &&
Objects.equals(exportDate, that.exportDate) &&
Objects.equals(downloadNo, that.downloadNo) &&
Objects.equals(downloadDate, that.downloadDate) &&
Objects.equals(electricWriterNo, that.electricWriterNo) &&
Objects.equals(electricWriteDate, that.electricWriteDate) &&
Objects.equals(checkerNo, that.checkerNo) &&
Objects.equals(checkDate, that.checkDate) &&
Objects.equals(moverNo, that.moverNo) &&
Objects.equals(moveDate, that.moveDate);
}
@Override
public int hashCode() {
return Objects.hash(acceptNo, photoerNo, photoDate, exportNo, exportDate, downloadNo, downloadDate, electricWriterNo, electricWriteDate, checkerNo, checkDate, moverNo, moveDate);
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.SysPermission;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
*/
@Mapper
public interface SysPermissionMapper {
public interface SysPermissionMapper{
/**
* 新增权限
* @param sysPermission
......@@ -20,4 +19,18 @@ public interface SysPermissionMapper {
// @Insert("INSERT INTO sys_permission (id,available,name,parent_id,parent_ids,permission,resource_type,url)\n" +
// "VALUES (PERMISSION_seq.nextval,0,#{name},#{parentId},#{parentIds},#{permission},#{resourceType},#{url})")
public void addPermissionByMap(SysPermission sysPermission);
/**
* 查询所有用户
* @return
*/
@Select("select * from SYS_PERMISSION")
public List<SysPermission> selectAllPermission();
/**
* 删除角色
* @param permissionId
*/
@Update("UPDATE FROM SYS_PERMISSION SET AVAILABLE = 1 WHERE ID=#{permissionId}")
public void delPermission(@Param("permissionId") Integer permissionId);
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.SysRole;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author liboyang
*/
......@@ -14,7 +15,37 @@ public interface SysRoleMapper {
* 添加角色
* @param sysRole
*/
// @Insert({"INSERT INTO DAHAI.SYS_ROLE(ID,AVAILABLE,DESCRIPTION,ROLE)\n" +
// "VALUES(PERMISSION_seq.nextval,0,#{description},#{role})"})
@Insert("INSERT INTO DAHAI.SYS_ROLE(ID,AVAILABLE,DESCRIPTION,ROLE)\n" +
"VALUES(PERMISSION_seq.nextval,0,#{description},#{role})")
@Options(useGeneratedKeys = true, keyProperty = "id",keyColumn = "id")
public void addRoleByMap(SysRole sysRole);
/**
* 添加角色和权限
* @param roleId
* @param permissionId
*/
@Insert("INSERT INTO DAHAI.SYS_ROLE_PERMISSION(ROLE_ID,PERMISSION_ID)VALUES(#{roleId},#{permissionId})")
public void addRolePermission(@Param("roleId")Integer roleId,@Param("permissionId") Integer permissionId);
/**
* 查询所有用户
* @return
*/
@Select("select * from SYS_ROLE")
public List<SysRole> selectAllRole();
/**
* 查询所有用户
* @return
*/
@Select("select * from SYS_ROLE WHERE AVAILABLE=0")
public List<SysRole> selectAllActiveRole();
/**
* 删除角色
* @param roleId
*/
@Update("UPDATE FROM SYS_ROLE SET AVAILABLE = 1 WHERE ID=#{roleId}")
public void delRole(@Param("roleId") Integer roleId);
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.*;
import java.util.List;
/**
* @author liboyang
......@@ -12,11 +13,35 @@ public interface UserInfoMapper {
/**
* 新增用户
* @param userinfo
* @return
*/
// @Insert("INSERT INTO DAHAI.USER_INFO(ID, NAME, PASSWORD, STATE, USERNAME, SALT) " +
// "VALUES(USER_INFO_seq.nextval,#{name},#{password},0,#{username},#{salt})\n")
@Insert("INSERT INTO DAHAI.USER_INFO(ID, NAME, PASSWORD, STATE, USERNAME, SALT) " +
"VALUES(USER_INFO_seq.nextval,#{name},#{password},0,#{username},#{salt})\n")
@Options(useGeneratedKeys = true, keyProperty = "id",keyColumn = "id")
public void saveUserInfo(UserInfo userinfo);
// public int delUserInfo(int userInfoID);
// public int updateUserInfo(UserInfo userInfo);
public UserInfo findUserByUsername(String userName);
/**
* 添加用户角色关系表
* @param userId
* @param roleId
*/
@Insert("INSERT INTO SYS_USER_ROLE(USER_ID,ROLE_ID)VALUES(#{userId},#{roleId})\n")
public void saveUserRole(@Param("userId") Integer userId, @Param("roleId")Integer roleId);
/**
* 查询所有用户
* @return
*/
@Select("select * from USER_INFO")
public List<UserInfo> selectAllUserInfo();
/**
* 删除用户
* @param userId
*/
@Update("UPDATE FROM USER_INFO SET STATE = 1 WHERE ID=#{userId}")
public void delUserInfo(@Param("userId") Integer userId);
public void updateUserInfo(UserInfo userInfo);
}
......@@ -3,11 +3,29 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.SysPermission;
import java.util.List;
import java.util.Map;
public interface SysPermissionService {
/**
* 新增权限
* @param sysPermission
* @return
*/
public boolean addPermission(SysPermission sysPermission);
/**
* 查询所有权限
* @return
*/
public List<SysPermission> getAllPermission();
/**
* 删除权限
* @param permissionId
* @return
*/
public boolean deletePermission(Integer permissionId);
}
......@@ -2,14 +2,36 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.SysRole;
import java.util.List;
/**
* @author liboyang
*/
public interface SysRoleService {
/**
* 角色添加
* 添加角色并分配权限
* @param sysRole
* @param ids
* @return
*/
public boolean addRole(SysRole sysRole,String[] ids);
/**
* 查询所有角色
* @return
*/
public List<SysRole> getAllRoleInfo();
/**
* 查询所有可用的角色
* @return
*/
public List<SysRole> getAllActiveRoleInfo();
/**
* 删除角色
* @param roleId
* @return
*/
public boolean addRole(SysRole sysRole);
public boolean deleteRole(Integer roleId);
}
......@@ -2,18 +2,33 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.UserInfo;
import java.util.List;
import java.util.Map;
/**
* @author liboyang
*/
public interface UserInfoService {
public interface UserInfoService{
/**
* 新增用户
* @param userinfo
* @param roleId
* @return
*/
public boolean addUser(UserInfo userinfo);
public boolean addUser(UserInfo userinfo,Integer roleId);
/**
* 查询所有用户
* @return
*/
public List<UserInfo> getAllUserInfo();
/**
* 删除用户
* @param userId
* @return
*/
public boolean deleteUserInfo(Integer userId);
// int delUsername( UserInfo userInfo);
// int updateUsername(UserInfo userInfo);
}
......@@ -6,6 +6,7 @@ import com.yxproject.start.service.SysPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
......@@ -23,5 +24,18 @@ public class SysPermissionServiceImpl implements SysPermissionService{
return true;
}
@Override
public List<SysPermission> getAllPermission() {
List<SysPermission> list = sysPermissionMapper.selectAllPermission();
return list;
}
@Override
public boolean deletePermission(Integer permissionId) {
sysPermissionMapper.delPermission(permissionId);
return true;
}
}
......@@ -10,17 +10,55 @@ import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
* @author liboyang
*/
@Service
@Transactional(rollbackFor=Exception.class)
public class SysRoleServiceImpl implements SysRoleService {
@Autowired
private SysRoleMapper sysRoleMapper;
@Override
public boolean addRole(SysRole sysRole) {
@Transactional(rollbackFor=Exception.class)
public boolean addRole(SysRole sysRole,String[] ids) {
sysRoleMapper.addRoleByMap(sysRole);
Integer roleId = sysRole.getId();
for (int i=0;i<ids.length;i++){
sysRoleMapper.addRolePermission(roleId,Integer.parseInt(ids[i]));
}
return true;
}
@Override
public List<SysRole> getAllRoleInfo() {
List<SysRole> list = sysRoleMapper.selectAllRole();
return list;
}
/**
* 查询所有可用的角色
*
* @return
*/
@Override
public List<SysRole> getAllActiveRoleInfo() {
List<SysRole> list = sysRoleMapper.selectAllActiveRole();
return list;
}
/**
* 删除角色
*
* @param roleId
* @return
*/
@Override
public boolean deleteRole(Integer roleId) {
sysRoleMapper.delRole(roleId);
return true;
}
}
......@@ -7,19 +7,39 @@ import com.yxproject.start.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @author liboyang
*/
@Service
public class UserInfoServiceImpl implements UserInfoService {
@Autowired
private UserInfoMapper userInfoMapper;
@Override
public boolean addUser(UserInfo userinfo) {
System.out.println("SystemUserService.addUser(UserInfo userInfo)");
@Transactional(rollbackFor=Exception.class)
public boolean addUser(UserInfo userinfo,Integer roleId) {
userInfoMapper.saveUserInfo(userinfo);
if(roleId==-1){
return true;
}
userInfoMapper.saveUserRole(userinfo.getId(),roleId);
return true;
}
@Override
public List<UserInfo> getAllUserInfo() {
List<UserInfo> list = userInfoMapper.selectAllUserInfo();
return list;
}
@Override
public boolean deleteUserInfo(Integer userId) {
return true;
}
//
......
@font-face {
font-family: 'iconfont';
src: url('../fonts/iconfont.eot');
src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/iconfont.woff') format('woff'),
url('../fonts/iconfont.ttf') format('truetype'),
url('../fonts/iconfont.svg#iconfont') format('svg');
}
.iconfont{
font-family:"iconfont" !important;
font-size:16px;font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
a{
text-decoration:none;
}
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
function Cp(){
this.xxk = function(){
$(".xxk").css('display','none');
$(".xxk:eq(0)").css('display','block');
$('.xxknav').on('click',function(){
var index = $('.xxknav').index($(this));
$(".xxk").css('display','none');
$(".xxk:eq("+index+")").css('display','block');
$('.xxknav').removeClass('active');
$(this).addClass('active');
})
}
this.AddYs = function(){
var This = this;
$('#addysbtn').on('click',function(){
var viewstr = '<div class="yswrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">颜色图片</label>'+
'<div class="col-xs-4">'+
'<input type="file" class="form-control" name="ystp">'+
'</div>'+
'<label class="col-xs-2 control-label">颜色主图</label>'+
'<div class="col-xs-4">'+
'<input type="file" class="form-control" name="yszt">'+
'</div>'+
' </div>'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">颜色名称</label>'+
'<div class="col-xs-4">'+
'<input type="text" class="form-control" name="ysmc">'+
' </div>'+
'<div class="col-xs-4 col-xs-offset-2">'+
'<a class="btn btn-danger ysdel">删除</a>'+
'</div>'+
'</div>'+
'</div>';
var newob = $(viewstr);
$('#yscontainer').append(newob);
This.ysDel();
})
}
this.ysDel = function(){
$(".ysdel").on('click',function(){
var wrapper = $(this).parent().parent().parent();
wrapper.remove();
})
}
this.AddCC = function(){
var This = this;
$('#addccbtn').on('click',function(){
var viewstr = '<div class="ccwrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">尺寸</label>'+
'<div class="col-xs-6">'+
'<input type="text" class="form-control" name="ccmc">'+
'</div>'+
'<div class="col-xs-4">'+
'<a class="btn btn-danger ccdel">删除</a>'+
'</div>'+
' </div>'+
'</div>';
var newob = $(viewstr);
$('#cccontainer').append(newob);
This.delCC();
})
}
this.delCC = function(){
$('.ccdel').on('click',function(){
$(this).parent().parent().parent().remove();
})
}
this.AddXt = function(){
var This = this;
$('#addxtbtn').on('click',function(){
var viewstr = '<div class="xtwrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">产品详图</label>'+
'<div class="col-xs-6">'+
'<input type="file" class="form-control" name="cpxt">'+
'</div>'+
'<div class="col-xs-4">'+
'<a class="btn btn-danger xtdel">删除</a>'+
'</div>'+
' </div>'+
'</div>';
var newob = $(viewstr);
$('#xtcontainer').append(newob);
This.delXT();
})
}
this.delXT = function(){
$('.xtdel').on('click',function(){
$(this).parent().parent().parent().remove();
})
}
this.AddQm = function(){
var This = this;
$('#addqmbtn').on('click',function(){
var viewstr = '<div class="qmwrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">签名价格</label>'+
'<div class="col-xs-4">'+
'<input type="text" class="form-control" name="qmjg">'+
'</div>'+
'<label class="col-xs-2 control-label">签名周期</label>'+
'<div class="col-xs-4">'+
'<input type="number" class="form-control" name="qmzq" value="1">'+
'</div>'+
' </div>'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">签名描述</label>'+
'<div class="col-xs-4">'+
'<input type="text" class="form-control" name="qmms">'+
' </div>'+
'<div class="col-xs-4 col-xs-offset-2">'+
'<a class="btn btn-danger qmdel">删除</a>'+
'</div>'+
'</div>'+
'</div>';
var newob = $(viewstr);
$('#qmcontainer').append(newob);
This.qmDel();
})
}
this.qmDel = function(){
$(".qmdel").on('click',function(){
var wrapper = $(this).parent().parent().parent();
wrapper.remove();
})
}
this.addCllb = function(){
var This = this;
$('#addcllbbtn').on('click',function(){
var viewstr = '<div id="clwrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-3 control-label">材料类别名称</label>'+
'<div class="col-xs-5">'+
'<input type="text" class="form-control" name="cllbmc">'+
'</div>'+
'<div class="col-xs-4">'+
'<a class="cllbdel btn btn-danger" style="width:40%;margin-right:10px">删除</a>'+
'<a class="addclxqbtn btn btn-danger" style="width:40%">添加材料详情</a>'+
'</div>'+
'</div>'+
'</div>';
var newob = $(viewstr);
$('#clcontainer').append(newob);
This.addClxq();
This.delCllb();
})
}
this.addClxq = function(){
var This = this;
$(".addclxqbtn").on('click',function(){
var viewstr ='<div class="form-group">'+
'<label class="col-xs-1 control-label">图片</label>'+
'<div class="col-xs-3">'+
'<input type="file" class="form-control" name="cltp">'+
'</div>'+
'<label class="col-xs-1 control-label">名称</label>'+
'<div class="col-xs-2">'+
'<input type="text" class="form-control" name="clmc">'+
'</div>'+
'<label class="col-xs-1 control-label">描述</label>'+
'<div class="col-xs-2">'+
'<input type="text" class="form-control" name="clms">'+
'</div>'+
'<div class="col-xs-2">'+
'<a class="btn btn-danger delclxqbtn">删除</a>'+
'</div>'+
'</div>';
var newob = $(viewstr);
$(this).parent().parent().parent().append(newob);
This.delClXq();
})
}
this.delClXq = function(){
$('.delclxqbtn').on('click',function(){
$(this).parent().parent().remove();
})
}
this.delCllb = function(){
$(".cllbdel").on('click',function(){
$(this).parent().parent().parent().remove();
})
}
}
\ No newline at end of file
function Lx(){
this.CheckForm = function(){
var This = this;
$('#sbutton').on('click',function(){
var promise = This.getPromise();
promise.done(function(res){
if(res){
$('#f').submit();
}
else{
$('#viewmessage').html("父类选择错误,不应选择其子孙类");
}
})
})
}
this.getPromise = function(){
var promise = $.ajax({
url:'CheckUpdateLx',
Type:'POST',
dataType:'json',
data:{
sid:$('#iv').val(),
pid:$('#ip').val()
}
});
return promise;
}
}
\ No newline at end of file
function Sj(){
this.getPromise = function(url,params){
var promise = $.ajax({
url:url,
dataType:'json',
type:'POST',
data:params
})
return promise;
}
this.ComPageView = function(url,params,id,id2){
var This = this;
var promise = this.getPromise(url,params);
promise.done(function(res){
var pagecount = res.pagecounts;
var currpage = res.currpage;
This.comPageNav(pagecount,id,currpage);
This.comSjTable(res.sjs,id2);
This.ListenerNb();
This.ListenerNlAndNr(currpage,pagecount);
});
}
this.comPageNav = function(pagecount,id,currpage){
var str = "";
str+='<li>'+
'<a href="#" aria-label="Previous" id="nl">'+
'<span aria-hidden="true">&laquo;</span>'+
'</a>'+
'</li>';
for(var i=1;i<=pagecount;i++){
if(i==currpage){
str+='<li class="active nb"><a href="#">'+i+'</a></li>';
}
else{
str+='<li class="nb"><a href="#">'+i+'</a></li>';
}
}
str+='<li>'+
'<a href="#" aria-label="Next" id="nr">'+
'<span aria-hidden="true">&raquo;</span>'+
'</a>'+
'</li>';
$(id).html(str);
}
this.comSjTable = function(arr,id){
var str = "";
str+='<tr>'+
'<th>图片</th>'+
'<th>名称</th>'+
'<th>操作</th>'+
'</tr>';
for(var i=0;i<arr.length;i++){
var ob = arr[i];
var sjmc = ob.sjmc;
var sjtp = ob.sjtp;
str+='<tr>'+
'<td><img src="'+sjtp+'"/></td>'+
'<td>'+sjmc+'</td>'+
'<td><a href="ForwardUpdateSj?sjid='+ob.id+'" class="btn btn-warning" >操作</a></td>'+
'</tr>';
}
console.log(str);
$(id).html(str);
}
this.ListenerNb = function(){
var This = this;
$('.nb').on('click',function(){
var c = $('.nb').index($(this))+1;
This.ComPageView("SjQueryPage",{page:c},'#nav','#sjdata');
})
}
this.ListenerNlAndNr = function(currpage,pagecounts){
var This = this;
$("#nl").on('click',function(){
if(currpage>1){
var c = --currpage;
This.ComPageView("SjQueryPage",{page:c},'#nav','#sjdata');
}
})
$("#nr").on('click',function(){
if(currpage<pagecounts){
var c = ++currpage;
This.ComPageView("SjQueryPage",{page:c},'#nav','#sjdata');
}
})
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(function(e,t){function n(e,t){var n=e.createElement("p"),i=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",i.insertBefore(n.lastChild,i.firstChild)}function i(){var e=m.elements;return"string"==typeof e?e.split(" "):e}function r(e){var t={},n=e.createElement,r=e.createDocumentFragment,o=r();e.createElement=function(e){m.shivMethods||n(e);var i;return i=t[e]?t[e].cloneNode():g.test(e)?(t[e]=n(e)).cloneNode():n(e),i.canHaveChildren&&!f.test(e)?o.appendChild(i):i},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(e){return t[e]=n(e),o.createElement(e),'c("'+e+'")'})+");return n}")(m,o)}function o(e){var t;return e.documentShived?e:(m.shivCSS&&!d&&(t=!!n(e,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),h||(t=!r(e)),t&&(e.documentShived=t),e)}function a(e){for(var t,n=e.getElementsByTagName("*"),r=n.length,o=RegExp("^(?:"+i().join("|")+")$","i"),a=[];r--;)t=n[r],o.test(t.nodeName)&&a.push(t.applyElement(s(t)));return a}function s(e){for(var t,n=e.attributes,i=n.length,r=e.ownerDocument.createElement(b+":"+e.nodeName);i--;)t=n[i],t.specified&&r.setAttribute(t.nodeName,t.nodeValue);return r.style.cssText=e.style.cssText,r}function l(e){for(var t,n=e.split("{"),r=n.length,o=RegExp("(^|[\\s,>+~])("+i().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+b+"\\:$2";r--;)t=n[r]=n[r].split("}"),t[t.length-1]=t[t.length-1].replace(o,a),n[r]=t.join("}");return n.join("{")}function c(e){for(var t=e.length;t--;)e[t].removeNode()}function u(e){var t,i,r=e.namespaces,o=e.parentWindow;return!y||e.printShived?e:(r[b]===void 0&&r.add(b),o.attachEvent("onbeforeprint",function(){for(var r,o,s,c=e.styleSheets,u=[],d=c.length,h=Array(d);d--;)h[d]=c[d];for(;s=h.pop();)if(!s.disabled&&v.test(s.media)){for(r=s.imports,d=0,o=r.length;o>d;d++)h.push(r[d]);try{u.push(s.cssText)}catch(p){}}u=l(u.reverse().join("")),i=a(e),t=n(e,u)}),o.attachEvent("onafterprint",function(){c(i),t.removeNode(!0)}),e.printShived=!0,e)}var d,h,p=e.html5||{},f=/^<|^(?:button|form|map|select|textarea|object|iframe)$/i,g=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i;(function(){var n=t.createElement("a");n.innerHTML="<xyz></xyz>",d="hidden"in n,d&&"function"==typeof injectElementWithStyles&&injectElementWithStyles("#modernizr{}",function(t){t.hidden=!0,d="none"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).display}),h=1==n.childNodes.length||function(){try{t.createElement("a")}catch(e){return!0}var n=t.createDocumentFragment();return n.cloneNode===void 0||n.createDocumentFragment===void 0||n.createElement===void 0}()})();var m={elements:p.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:p.shivCSS!==!1,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:o};e.html5=m,o(t);var v=/^$|\b(?:all|print)\b/,b="html5shiv",y=!h&&function(){var n=t.documentElement;return t.namespaces!==void 0&&t.parentWindow!==void 0&&n.applyElement!==void 0&&n.removeNode!==void 0&&e.attachEvent!==void 0}();m.type+=" print",m.shivPrint=u,u(t)})(this,document);
\ No newline at end of file
This diff is collapsed.
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
\ No newline at end of file
$(function () {
//加载弹出层
layui.use(['form','element'],
function() {
layer = layui.layer;
element = layui.element;
});
//触发事件
var tab = {
tabAdd: function(title,url,id){
//新增一个Tab项
element.tabAdd('xbs_tab', {
title: title
,content: '<iframe tab-id="'+id+'" frameborder="0" src="'+url+'" scrolling="yes" class="x-iframe"></iframe>'
,id: id
})
}
,tabDelete: function(othis){
//删除指定Tab项
element.tabDelete('xbs_tab', '44'); //删除:“商品管理”
othis.addClass('layui-btn-disabled');
}
,tabChange: function(id){
//切换到指定Tab项
element.tabChange('xbs_tab', id); //切换到:用户管理
}
};
tableCheck = {
init:function () {
$(".layui-form-checkbox").click(function(event) {
if($(this).hasClass('layui-form-checked')){
$(this).removeClass('layui-form-checked');
if($(this).hasClass('header')){
$(".layui-form-checkbox").removeClass('layui-form-checked');
}
}else{
$(this).addClass('layui-form-checked');
if($(this).hasClass('header')){
$(".layui-form-checkbox").addClass('layui-form-checked');
}
}
});
},
getData:function () {
var obj = $(".layui-form-checked").not('.header');
var arr=[];
obj.each(function(index, el) {
arr.push(obj.eq(index).attr('data-id'));
});
return arr;
}
}
//开启表格多选
tableCheck.init();
$('.container .left_open i').click(function(event) {
if($('.left-nav').css('left')=='0px'){
$('.left-nav').animate({left: '-221px'}, 100);
$('.page-content').animate({left: '0px'}, 100);
$('.page-content-bg').hide();
}else{
$('.left-nav').animate({left: '0px'}, 100);
$('.page-content').animate({left: '221px'}, 100);
if($(window).width()<768){
$('.page-content-bg').show();
}
}
});
$('.page-content-bg').click(function(event) {
$('.left-nav').animate({left: '-221px'}, 100);
$('.page-content').animate({left: '0px'}, 100);
$(this).hide();
});
$('.layui-tab-close').click(function(event) {
$('.layui-tab-title li').eq(0).find('i').remove();
});
$("tbody.x-cate tr[fid!='0']").hide();
// 栏目多级显示效果
$('.x-show').click(function () {
if($(this).attr('status')=='true'){
$(this).html('&#xe625;');
$(this).attr('status','false');
cateId = $(this).parents('tr').attr('cate-id');
$("tbody tr[fid="+cateId+"]").show();
}else{
cateIds = [];
$(this).html('&#xe623;');
$(this).attr('status','true');
cateId = $(this).parents('tr').attr('cate-id');
getCateId(cateId);
for (var i in cateIds) {
$("tbody tr[cate-id="+cateIds[i]+"]").hide().find('.x-show').html('&#xe623;').attr('status','true');
}
}
})
//左侧菜单效果
// $('#content').bind("click",function(event){
$('.left-nav #nav li').click(function (event) {
if($(this).children('.sub-menu').length){
if($(this).hasClass('open')){
$(this).removeClass('open');
$(this).find('.nav_right').html('&#xe697;');
$(this).children('.sub-menu').stop().slideUp();
$(this).siblings().children('.sub-menu').slideUp();
}else{
$(this).addClass('open');
$(this).children('a').find('.nav_right').html('&#xe6a6;');
$(this).children('.sub-menu').stop().slideDown();
$(this).siblings().children('.sub-menu').stop().slideUp();
$(this).siblings().find('.nav_right').html('&#xe697;');
$(this).siblings().removeClass('open');
}
}else{
var url = $(this).children('a').attr('_href');
var title = $(this).find('cite').html();
var index = $('.left-nav #nav li').index($(this));
for (var i = 0; i <$('.x-iframe').length; i++) {
if($('.x-iframe').eq(i).attr('tab-id')==index+1){
tab.tabChange(index+1);
event.stopPropagation();
return;
}
};
tab.tabAdd(title,url,index+1);
tab.tabChange(index+1);
}
event.stopPropagation();
})
})
var cateIds = [];
function getCateId(cateId) {
$("tbody tr[fid="+cateId+"]").each(function(index, el) {
id = $(el).attr('cate-id');
cateIds.push(id);
getCateId(id);
});
}
/*弹出层*/
/*
参数解释:
title 标题
url 请求的url
id 需要操作的数据id
w 弹出层宽度(缺省调默认值)
h 弹出层高度(缺省调默认值)
*/
function x_admin_show(title,url,w,h){
if (title == null || title == '') {
title=false;
};
if (url == null || url == '') {
url="404.html";
};
if (w == null || w == '') {
w=($(window).width()*0.9);
};
if (h == null || h == '') {
h=($(window).height() - 50);
};
layer.open({
type: 2,
area: [w+'px', h +'px'],
fix: false, //不固定
maxmin: true,
shadeClose: true,
shade:0.4,
title: title,
content: url
});
}
/*关闭弹出框口*/
function x_admin_close(){
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}
This diff is collapsed.
/** layui-v2.2.6 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
\ No newline at end of file
/** layui-v2.2.6 MIT License By https://www.layui.com */
.laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['<button class="layui-icon '+u+'" lay-type="sub">'+("updown"===n.anim?"&#xe619;":"&#xe603;")+"</button>",'<button class="layui-icon '+u+'" lay-type="add">'+("updown"===n.anim?"&#xe61a;":"&#xe602;")+"</button>"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['<div class="'+c+'"><ul>',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("<li"+(n.index===e?' class="layui-this"':"")+"></li>")}),i.join("")}(),"</ul></div>"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a<n.index&&e.slide("sub",n.index-a)})},m.prototype.slide=function(e,i){var n=this,l=n.elemItem,u=n.config,c=u.index,m=u.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),l.eq(u.index).addClass(d),setTimeout(function(){l.eq(c).addClass(r),l.eq(u.index).addClass(r)},50)):(n.addIndex(i),l.eq(u.index).addClass(s),setTimeout(function(){l.eq(c).addClass(o),l.eq(u.index).addClass(o)},50)),setTimeout(function(){l.removeClass(a+" "+d+" "+s+" "+o+" "+r),l.eq(u.index).addClass(a),n.haveSlide=!1},300),n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a),n.haveSlide=!0,layui.event.call(this,t,"change("+m+")",{index:u.index,prevIndex:c,item:l.eq(u.index)}))},m.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){clearInterval(e.timer)}).on("mouseleave",function(){e.autoplay()}),i.elem.data("haveEvents",!0))},n.render=function(e){var i=new m(e);return i},e(t,n)});
\ No newline at end of file
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")),c.html('<ol class="layui-code-ol"><li>'+o.replace(/[\r\t\n]+/g,"</li><li>")+"</li></ol>"),c.find(">.layui-code-h3")[0]||c.prepend('<h3 class="layui-code-h3">'+(c.attr("lay-title")||e.title||"code")+(e.about?'<a href="'+l+'" target="_blank">layui.code</a>':"")+"</h3>");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss");
\ No newline at end of file
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='<li lay-id="'+(i.id||"")+'"'+(i.attr?' lay-attr="'+i.attr+'"':"")+">"+(i.title||"unnaming")+"</li>";return s[0]?s.before(r):n.append(r),o.append('<div class="layui-tab-item">'+(i.content||"")+"</div>"),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('<span class="layui-unselect layui-tab-bar" '+r+"><i "+r+' class="layui-icon">&#xe61a;</i></span>');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('<i class="layui-icon layui-unselect '+l+'">&#x1006;</i>');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html("&#xe602;"),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"&#xe61a;":"&#xe602;"),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a('<span class="'+c+'"></span>'),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append('<span class="'+y+'"></span>'),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after("<span "+i+">"+e+"</span>")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html('<span class="'+t+'-text">'+l+"</span>")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append('<i class="layui-icon layui-colla-icon">'+(l?"&#xe602;":"&#xe61a;")+"</i>"),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)});
\ No newline at end of file
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon ">&#xe63e;</i>';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="<cite>加载更多</cite>",h=l('<div class="layui-flow-more"><a href="javascript:;">'+d+"</a></div>");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;s<t.lazyimg.elem.length;s++){var v=t.lazyimg.elem.eq(s),y=a?function(){return v.offset().top-n.offset().top+m}():v.offset().top;if(c(v,f),i=s,y>u)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});
\ No newline at end of file
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",u="layui-disabled",c=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};c.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},c.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},c.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},c.prototype.render=function(e,i){var n=this,c=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=c.find("select"),y=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},h=function(i,c,f){var h=t(this),p=i.find("."+n),m=p.find("input"),k=i.find("dl"),g=k.children("dd");if(!c){var x=function(){var e=i.offset().top+i.outerHeight()+5-v.scrollTop(),t=k.outerHeight();i.addClass(a+"ed"),g.removeClass(o),e+t>v.height()&&e>=t&&i.addClass(a+"up")},b=function(e){i.removeClass(a+"ed "+a+"up"),m.blur(),e||C(m.val(),function(e){e&&(d=k.find("."+s).html(),m&&m.val(d))})};p.on("click",function(e){i.hasClass(a+"ed")?b():(y(e,!0),x()),k.find("."+r).remove()}),p.find(".layui-edge").on("click",function(){m.focus()}),m.on("keyup",function(e){var t=e.keyCode;9===t&&x()}).on("keydown",function(e){var t=e.keyCode;9===t?b():13===t&&e.preventDefault()});var C=function(e,i,a){var n=0;layui.each(g,function(){var i=t(this),l=i.text(),r=l.indexOf(e)===-1;(""===e||"blur"===a?e!==l:r)&&n++,"keyup"===a&&i[r?"addClass":"removeClass"](o)});var l=n===g.length;return i(l),l},w=function(e){var t=this.value,i=e.keyCode;return 9!==i&&13!==i&&37!==i&&38!==i&&39!==i&&40!==i&&(C(t,function(e){e?k.find("."+r)[0]||k.append('<p class="'+r+'">无匹配项</p>'):k.find("."+r).remove()},"keyup"),void(""===t&&k.find("."+r).remove()))};f&&m.on("keyup",w).on("blur",function(t){e=m,d=k.find("."+s).html(),setTimeout(function(){C(m.val(),function(e){d||m.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=h.attr("lay-filter");return!e.hasClass(u)&&(e.hasClass("layui-select-tips")?m.val(""):(m.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),h.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:h[0],value:a,othis:i}),b(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",y).on("click",y)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),c=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),y=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var v="string"==typeof r.attr("lay-search"),p=y?y.value?i:y.innerHTML||i:i,m=t(['<div class="'+(v?"":"layui-unselect ")+a+(c?" layui-select-disabled":"")+'">','<div class="'+n+'"><input type="text" placeholder="'+p+'" value="'+(d?f.html():"")+'" '+(v?"":"readonly")+' class="layui-input'+(v?"":" layui-unselect")+(c?" "+u:"")+'">','<i class="layui-edge"></i></div>','<dl class="layui-anim layui-anim-upbit'+(r.find("optgroup")[0]?" layui-select-group":"")+'">'+function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("<dt>"+a.label+"</dt>"):t.push('<dd lay-value="'+a.value+'" class="'+(d===a.value?s:"")+(a.disabled?" "+u:"")+'">'+a.innerHTML+"</dd>"):t.push('<dd lay-value="" class="layui-select-tips">'+(a.innerHTML||i)+"</dd>")}),0===t.length&&t.push('<dd lay-value="" class="'+u+'">没有选项</dd>'),t.join("")}(r.find("*"))+"</dl>","</div>"].join(""));o[0]&&o.remove(),r.after(m),h.call(this,m,c,v)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=c.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var c=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+c[0]),f=t(['<div class="layui-unselect '+c[0]+(n.checked?" "+c[1]:"")+(o?" layui-checkbox-disbaled "+u:"")+'" lay-skin="'+(r||"")+'">',{_switch:"<em>"+((n.checked?s[0]:s[1])||"")+"</em><i></i>"}[r]||(n.title.replace(/\s/g,"")?"<span>"+n.title+"</span>":"")+'<i class="layui-icon">'+(r?"&#xe605;":"&#xe618;")+"</i>","</div>"].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,c)})},radio:function(){var e="layui-form-radio",i=["&#xe643;","&#xe63f;"],a=c.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,u=n.parents(r),c=n.attr("lay-filter"),d=u.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+c+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var c=t(['<div class="layui-unselect '+e+(l.checked?" "+e+"ed":"")+(o?" layui-radio-disbaled "+u:"")+'">','<i class="layui-anim layui-icon">'+i[l.checked?0:1]+"</i>","<div>"+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"</div>","</div>"].join(""));r.after(c),n.call(this,c)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",u={},c=e.parents(r),d=c.find("*[lay-verify]"),y=e.parents("form")[0],v=c.find("input,select,textarea"),h=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),u=r.attr("lay-verify").split("|"),c=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(u,function(e,t){var u,f="",y="function"==typeof a[t];if(a[t]){var u=y?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],u)return"tips"===c?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===c?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(v,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(u[t.name]=t.value)}}),layui.event.call(this,l,"submit("+h+")",{elem:this,form:y,field:u})},f=new c,y=t(document),v=t(window);f.render(),y.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),y.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"&#x4E0A;&#x4E00;&#x9875;",a.next="next"in a?a.next:"&#x4E0B;&#x4E00;&#x9875;";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?'<a href="javascript:;" class="layui-laypage-prev'+(1==a.curr?" "+r:"")+'" data-page="'+(a.curr-1)+'">'+a.prev+"</a>":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push('<a href="javascript:;" class="layui-laypage-first" data-page="1" title="&#x9996;&#x9875;">'+(a.first||1)+"</a>");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r<t-1&&(r=u-t+1),a.first!==!1&&r>2&&e.push('<span class="layui-laypage-spr">&#x2026;</span>');r<=u;r++)r===a.curr?e.push('<span class="layui-laypage-curr"><em class="layui-laypage-em" '+(/^#/.test(a.theme)?'style="background-color:'+a.theme+';"':"")+"></em><em>"+r+"</em></span>"):e.push('<a href="javascript:;" data-page="'+r+'">'+r+"</a>");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1<a.pages&&e.push('<span class="layui-laypage-spr">&#x2026;</span>'),0!==t&&e.push('<a href="javascript:;" class="layui-laypage-last" title="&#x5C3E;&#x9875;" data-page="'+a.pages+'">'+(a.last||a.pages)+"</a>")),e.join("")}(),next:function(){return a.next?'<a href="javascript:;" class="layui-laypage-next'+(a.curr==a.pages?" "+r:"")+'" data-page="'+(a.curr+1)+'">'+a.next+"</a>":""}(),count:'<span class="layui-laypage-count">共 '+a.count+" 条</span>",limit:function(){var e=['<span class="layui-laypage-limits"><select lay-ignore>'];return layui.each(a.limits,function(t,n){e.push('<option value="'+n+'"'+(n===a.limit?"selected":"")+">"+n+" 条/页</option>")}),e.join("")+"</select></span>"}(),skip:function(){return['<span class="layui-laypage-skip">&#x5230;&#x7B2C;','<input type="text" min="1" value="'+a.curr+'" class="layui-input">','&#x9875;<button type="button" class="layui-laypage-btn">&#x786e;&#x5b9a;</button>',"</span>"].join("")}()};return['<div class="layui-box layui-laypage layui-laypage-'+(a.theme?/^#/.test(a.theme)?"molv":a.theme:"default")+'" id="layui-laypage-'+a.index+'">',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"</div>"].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;o<y;o++)"a"===r[o].nodeName.toLowerCase()&&s.on(r[o],"click",function(){var e=0|this.getAttribute("data-page");e<1||e>i.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)});
\ No newline at end of file
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["&#xe623;","&#xe625;"],checkbox:["&#xe626;","&#xe627;"],radio:["&#xe62b;","&#xe62a;"],branch:["&#xe622;","&#xe624;"],leaf:"&#xe621;"};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('<ul class="'+(n.spread?"layui-show":"")+'"></ul>'),s=o(["<li "+(n.spread?'data-spread="'+n.spread+'"':"")+">",function(){return l?'<i class="layui-icon layui-tree-spread">'+(n.spread?t.arrow[1]:t.arrow[0])+"</i>":""}(),function(){return r.check?'<i class="layui-icon layui-tree-check">'+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"</i>":""}(),function(){return'<a href="'+(n.href||"javascript:;")+'" '+(r.target&&n.href?'target="'+r.target+'"':"")+">"+('<i class="layui-icon layui-tree-'+(l?"branch":"leaf")+'">'+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"</i>")+("<cite>"+(n.name||"未命名")+"</cite></a>")}(),"</li>"].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('<div class="layui-box '+t+'"></div>'));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})});
\ No newline at end of file
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,r,e,t)}},l=function(){var e=this;return{upload:function(t){e.upload.call(e,t)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var i=this;i.config=t.extend({},i.config,o.config,e),i.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var i=this,e=i.config;e.elem=t(e.elem),e.bindAction=t(e.bindAction),i.file(),i.events()},p.prototype.file=function(){var e=this,i=e.config,n=e.elemFile=t(['<input class="'+u+'" type="file" accept="'+i.acceptMime+'" name="'+i.field+'"',i.multiple?" multiple":"",">"].join("")),o=i.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&i.elem.wrap('<div class="layui-upload-wrap"></div>'),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,i=e.config,n=t('<iframe id="'+f+'" class="'+f+'" name="'+f+'" frameborder="0"></iframe>'),a=t(['<form target="'+f+'" class="'+c+'" method="'+i.method,'" key="set-mine" enctype="multipart/form-data" action="'+i.url+'">',"</form>"].join(""));t("#"+f)[0]||t("body").append(n),i.elem.next().hasClass(f)||(e.elemFile.wrap(a),i.elem.next("."+f).append(function(){var e=[];return layui.each(i.data,function(t,i){i="function"==typeof i?i():i,e.push('<input type="hidden" name="'+t+'" value="'+i+'">')}),e.join("")}()))},p.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var t=this;window.FileReader&&layui.each(t.chooseFiles,function(t,i){var n=new FileReader;n.readAsDataURL(i),n.onload=function(){e&&e(t,i,this.result)}})},p.prototype.upload=function(e,i){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var i=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&i+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:i,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,t){t="function"==typeof t?t():t,r.append(e,t)}),t.ajax({url:l.url,type:l.method,data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(t){i++,d(e,t),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=t("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var t,i=e.contents().find("body");try{t=i.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}t&&(clearInterval(p.timer),i.html(""),d(0,t))},30)},d=function(e,t){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof t)try{t=JSON.parse(t)}catch(i){return t={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(t,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var t=[];return layui.each(e||o.chooseFiles,function(e,i){t.push(i.name)}),t}(),g={preview:function(e){o.preview(e)},upload:function(e,t){var i={};i[e]=t,o.upload(i)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,t){o.files[e]=t}),o.files}},y=function(){return"choose"===i?l.choose&&l.choose(g):(l.before&&l.before(g),a.ie?a.ie>9?u():c():void u())};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,t){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(t))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var t=0,i=e||o.files||o.chooseFiles||r.files;return layui.each(i,function(){t++}),t}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,t){if(t.size>1024*l.size){var i=l.size/1024;i=i>=1?Math.floor(i)+(i%1>0?i.toFixed(1):0)+"MB":l.size+"KB",r.value="",F=i}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,i=e.config,o=function(t){e.chooseFiles={},layui.each(t,function(t,i){var n=(new Date).getTime();e.chooseFiles[n+"-"+t]=i})},l=function(t,n){var a=e.elemFile,o=t.length>1?t.length+"个文件":(t[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||i.choose||a.after('<span class="layui-inline '+s+'">'+o+"</span>")};i.elem.off("upload.start").on("upload.start",function(){var a=t(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=t.extend({},i,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||i.elem.off("upload.over").on("upload.over",function(){var e=t(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=t(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=t(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),i.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var t=this.files||[];o(t),i.auto?e.upload():l(t)}),i.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),i.elem.data("haveEvents")||(e.elemFile.on("change",function(){t(this).trigger("upload.change")}),i.elem.on("click",function(){e.isFile()||t(this).trigger("upload.start")}),i.drag&&i.elem.on("dragover",function(e){e.preventDefault(),t(this).trigger("upload.over")}).on("dragleave",function(e){t(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),t(this).trigger("upload.drop",e)}),i.bindAction.on("click",function(){t(this).trigger("upload.action")}),i.elem.data("haveEvents",!0))},o.render=function(e){var t=new p(e);return l.call(t)},e(r,o)});
\ No newline at end of file
/** layui-v2.2.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,o,a="layui-fixbar",r="layui-fixbar-top",n=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"&#xe606;":e.bar1,e.bar2=e.bar2===!0?"&#xe607;":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,"&#xe604;"],g=t(['<ul class="'+a+'">',e.bar1?'<li class="layui-icon" lay-type="bar1" style="'+e.bgcolor+'">'+c[0]+"</li>":"",e.bar2?'<li class="layui-icon" lay-type="bar2" style="'+e.bgcolor+'">'+c[1]+"</li>":"",'<li class="layui-icon '+r+'" lay-type="top" style="'+e.bgcolor+'">'+c[2]+"</li>","</ul>"].join("")),s=g.find("."+r),u=function(){var t=n.scrollTop();t>=e.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&g.css(e.css),l.append(g),u(),g.find("li").on("click",function(){var i=t(this),o=i.attr("lay-type");"top"===o&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,o)}),n.on("scroll",function(){clearTimeout(o),o=setTimeout(function(){u()},100)}))},countdown:function(e,t,i){var o=this,a="function"==typeof t,r=new Date(e).getTime(),n=new Date(!t||a?(new Date).getTime():t).getTime(),l=r-n,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var g=setTimeout(function(){o.countdown(e,n+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,g),l<=0&&clearTimeout(g),g},timeAgo:function(e,t){var i=this,o=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>6912e5?(a=new Date(e),o[0][0]=i.digit(a.getFullYear(),4),o[0][1]=i.digit(a.getMonth()+1),o[0][2]=i.digit(a.getDate()),t||(o[1][0]=i.digit(a.getHours()),o[1][1]=i.digit(a.getMinutes()),o[1][2]=i.digit(a.getSeconds())),o[0].join("-")+" "+o[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var o=e.length;o<t;o++)i+="0";return e<Math.pow(10,t)?i+(0|e):e},toDateString:function(e,t){var i=this,o=new Date(e||new Date),a=[i.digit(o.getFullYear(),4),i.digit(o.getMonth()+1),i.digit(o.getDate())],r=[i.digit(o.getHours()),i.digit(o.getMinutes()),i.digit(o.getSeconds())];return t=t||"yyyy-MM-dd HH:mm:ss",t.replace(/yyyy/g,a[0]).replace(/MM/g,a[1]).replace(/dd/g,a[2]).replace(/HH/g,r[0]).replace(/mm/g,r[1]).replace(/ss/g,r[2])}};e("util",i)});
\ No newline at end of file
This diff is collapsed.
/** layui-v2.2.6 MIT License By https://www.layui.com */
;!function(e){"use strict";var t=document,n={modules:{},status:{},timeout:10,event:{}},o=function(){this.v="2.2.6"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,n=t.scripts,o=n.length-1,r=o;r>0;r--)if("interactive"===n[r].readyState){e=n[r].src;break}return e||n[o].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),a=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},i="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",util:"modules/util",flow:"modules/flow",carousel:"modules/carousel",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};o.prototype.cache=n,o.prototype.define=function(e,t){var o=this,r="function"==typeof e,a=function(){var e=function(e,t){layui[e]=t,n.status[e]=!0};return"function"==typeof t&&t(function(o,r){e(o,r),n.callback[o]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?a.call(o):(o.use(e,a),o)},o.prototype.use=function(e,o,l){function s(e,t){var o="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||o.test((e.currentTarget||e.srcElement).readyState))&&(n.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*n.timeout/4?a(f+" is not a valid module"):void(n.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),o,l):"function"==typeof o&&o.apply(layui,l)}var y=this,p=n.dir=n.dir?n.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],n.host=n.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(n.modules[f])!function g(){return++m>1e3*n.timeout/4?a(f+" is not a valid module"):void("string"==typeof n.modules[f]&&n.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":n.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=n.version===!0?n.v||(new Date).getTime():n.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||i?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),n.modules[f]=h}return y},o.prototype.getStyle=function(t,n){var o=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return o[o.getPropertyValue?"getPropertyValue":"getAttribute"](n)},o.prototype.link=function(e,o,r){var i=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof o&&(r=o);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(n.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof o?i:(function p(){return++y>1e3*n.timeout/100?a(e+" timeout"):void(1989===parseInt(i.getStyle(t.getElementById(c),"width"))?function(){o()}():setTimeout(p,100))}(),i)},n.callback={},o.prototype.factory=function(e){if(layui[e])return"function"==typeof n.callback[e]?n.callback[e]:null},o.prototype.addcss=function(e,t,o){return layui.link(n.dir+"css/"+e,t,o)},o.prototype.img=function(e,t,n){var o=new Image;return o.src=e,o.complete?t(o):(o.onload=function(){o.onload=null,t(o)},void(o.onerror=function(e){o.onerror=null,n(e)}))},o.prototype.config=function(e){e=e||{};for(var t in e)n[t]=e[t];return this},o.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),o.prototype.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?a("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},o.prototype.router=function(e){var t=this,e=e||location.hash,n={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),n.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),n.search[t[0]]=t[1]}():n.path.push(t)}),n):n},o.prototype.data=function(t,n,o){if(t=t||"layui",o=o||localStorage,e.JSON&&e.JSON.parse){if(null===n)return delete o[t];n="object"==typeof n?n:{key:n};try{var r=JSON.parse(o[t])}catch(a){var r={}}return"value"in n&&(r[n.key]=n.value),n.remove&&delete r[n.key],o[t]=JSON.stringify(r),n.key?r[n.key]:r}},o.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},o.prototype.device=function(t){var n=navigator.userAgent.toLowerCase(),o=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(n.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((n.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:o("micromessenger")};return t&&!r[t]&&(r[t]=o(t)),r.android=/android/.test(n),r.ios="ios"===r.os,r},o.prototype.hint=function(){return{error:a}},o.prototype.each=function(e,t){var n,o=this;if("function"!=typeof t)return o;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;n<e.length&&!t.call(e[n],n,e[n]);n++);return o},o.prototype.sort=function(e,t,n){var o=JSON.parse(JSON.stringify(e||[]));return t?(o.sort(function(e,n){var o=/^-?\d+$/,r=e[t],a=n[t];return o.test(r)&&(r=parseFloat(r)),o.test(a)&&(a=parseFloat(a)),r&&!a?1:!r&&a?-1:r>a?1:r<a?-1:0}),n&&o.reverse(),o):o},o.prototype.stope=function(t){t=t||e.event;try{t.stopPropagation()}catch(n){t.cancelBubble=!0}},o.prototype.onevent=function(e,t,n){return"string"!=typeof e||"function"!=typeof n?this:o.event(e,t,null,n)},o.prototype.event=o.event=function(e,t,o,r){var a=this,i=null,u=t.match(/\((.*)\)$/)||[],l=(e+"."+t).replace(u[0],""),s=u[1]||"",c=function(e,t){var n=t&&t.call(a,o);n===!1&&null===i&&(i=!1)};return r?(n.event[l]=n.event[l]||{},n.event[l][s]=[r],this):(layui.each(n.event[l],function(e,t){return"{*}"===s?void layui.each(t,c):(""===e&&layui.each(t,c),void(e===s&&layui.each(t,c)))}),i)},e.layui=new o}(window);
\ No newline at end of file
<!DOCTYPE html>
<html xmlns:shiro="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8"/>
<title>Insert title here</title>
</head>
<body>
<h3>主界面--<span th:text="'登录账号:'+${userInfo.username}+'--名称:'+${userInfo.name}">user</span></h3> <a href="/logout">退出</a>
<hr />
<meta charset="UTF-8">
<title>后台管理</title>
<!-- 这些实际从数据库中进行查询,可以在 -->
<h5>这是通过shiro标签的方式;</h5>
<p shiro:hasRole="admin">
<a>管理员角色</a>
</p>
<p shiro:hasRole="zhangsan">
<a>张三</a>
</p>
<p shiro:hasPermission="userInfo.list">
<a href="/userList">用户查询</a>
</p>
<p shiro:hasPermission="userInfo.add">
<a href="/userAdd">用户添加</a>
</p>
<p shiro:hasPermission="permission.add">
<a href="/permissionAdd">权限添加</a>
</p>
<link rel="stylesheet" th:href="@{/css/font.css}">
<link rel="stylesheet" th:href="@{/css/xadmin.css}">
<link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}">
<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
<script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
<script type="text/javascript" th:src="@{/lib/layui/lay/modules/form.js}"></script>
</head>
<body>
<!-- 顶部开始 -->
<div class="container">
<div class="logo"><a href="/index">Admin</a></div>
<!--<div class="left_open">-->
<!--<i title="展开左侧栏" class="layui-icon">&#xe699;</i>-->
<!--</div>-->
<ul class="layui-nav right" lay-filter="">
<li class="layui-nav-item">
<a href="javascript:;"><span th:text="${userInfo.username}">user</span></a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/logout">退出</a></dd>
</dl>
</li>
</ul>
</div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div class="left-nav">
<div id="side-nav">
<ul id="nav">
<li>
<a _href="/userList">
<cite>用户列表</cite>
</a>
</li >
<li>
<a _href="/roleList">
<cite>角色列表</cite>
</a>
</li >
<li>
<a _href="/permissionList">
<cite>权限列表</cite>
</a>
</li >
</ul>
</div>
</div>
<!-- <div class="x-slide_left"></div> -->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
<div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
<ul class="layui-tab-title">
<li class="home"><i class="layui-icon">&#xe68e;</i>欢迎主页</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<iframe src='/welcome' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
</div>
</div>
</div>
</div>
<div class="page-content-bg"></div>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
<!-- 底部开始 -->
<div class="footer">
<div class="copyright">国投盈信秦皇岛科技有限公司 Copyright ©2017 All Rights Reserved</div>
</div>
<!-- 底部结束 -->
<hr />
<h5>从数据库加载菜单</h5>
<div th:each="roleList:${userInfo.roleList}">
<span th:text="${roleList.description}"></span>
<!-- 角色下所有的所有菜单,实际开发中,只需要获取所有的权限就可以了,无所谓是哪个角色的; -->
<p style="color:blue;margin-left:30px;" th:each="permission:${roleList.permissions}">
<a th:href="${permission.url}" th:text="${permission.name}"></a>
</p>
</div>
</body>
</html>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html xmlns:shiro="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8"/>
<title>Insert title here</title>
</head>
<body>
<h3>主界面--<span th:text="'登录账号:'+${userInfo.username}+'--名称:'+${userInfo.name}">user</span></h3> <a href="/logout">退出</a>
<hr/>
<div th:each="roleList:${userInfo.roleList}" style="width: 300px;">
<!--<span th:text="${roleList.description}"></span>-->
<!-- 角色下所有的所有菜单,实际开发中,只需要获取所有的权限就可以了,无所谓是哪个角色的; -->
<p style="color:blue;margin-left:30px;" th:each="permission:${roleList.permissions}">
<a th:href="${permission.url}" th:text="${permission.name}"></a>
</p>
</div>
</body>
</html>
\ No newline at end of file
......@@ -27,7 +27,8 @@
<div class="panel-body" style="background: rgba(0, 0, 0, 0.1); box-shadow: 10px 10px 5px #888888">
<form class="form-horizontal" action="userLogin" method="POST">
<div class="form-group">
<h4 th:text="${msg}"></h4>
<label class="col-xs-3 control-label"></label>
<label style="color: red;" class="col-xs-9" th:text="${msg}"></label>
</div>
<div class="form-group">
<label class="col-xs-3 control-label">用户名</label>
......
......@@ -6,14 +6,20 @@
</head>
<body>
<h3>权限添加界面</h3>
<form action="" th:action="@{/permissionAdd}" method="post">
<form action="" th:action="@{rest/user/permissionAdd}" method="post">
<p>名称:<input type="text" name="name" value="名称"/></p>
<p>资源类型:<input type="radio" name="resourceType" value="menu"/>menu
<input type="radio" name="resourceType" value="button"/>button</p>
<p>资源路径:<input type="text" name="url" value="userAdd"/></p>
<p>权限字符串:<input type="text" name="permission" value="userInfo.add"/></p>
<p>父编号:<input type="text" name="parentId" value="1"/></p>
<p>父编号列表:<input type="text" name="parentIds" value="0/1"/></p>
<p>父类: <select name="parentId">
<option value="0"></option>
<option th:each="permission:${roleInfo.permissions}" th:value="${permission.id}">
<span th:text="${permission.name}"></span>
</option>
</select>
</p>
</select>
<p><input type="submit" value="添加"/></p>
</form>
</body>
......
......@@ -6,13 +6,13 @@
</head>
<body>
<h3>角色添加界面</h3>
<form action="" th:action="@{/roleInfoAdd}" method="post">
<form action="" th:action="@{rest/user/roleInfoAdd}" method="post">
<p>角色名称:<input type="text" name="role" value="vip"/></p>
<p>角色描述:<input type="text" name="description" value="会员"/></p>
<p><input type="hidden" name="permissions"/></p>
<!--<p><input type="hidden" name="permissions"/></p>-->
<p>分配权限:<span th:each="roleList:${userInfo.roleList}">
<span th:each="permList:${roleList.permissions}">
<input type="checkbox" name="${permList.name}" value="${permList.id}"><span th:text="${permList.name}"></span>
<input type="checkbox" th:name="permissions" th:value="${permList.id}"><span th:text="${permList.name}"></span>
</span>
</span>
</p>
......
<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>UserInfo</title>
<title>用户管理页面</title>
<link rel="stylesheet" th:href="@{/css/font.css}">
<link rel="stylesheet" th:href="@{/css/xadmin.css}">
<link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}">
<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
<script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
<script type="text/javascript" th:src="@{/lib/layui/lay/modules/form.js}"></script>
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
<!--[if lt IE 9]>
<script th:src="@{/js/html5.min.js}"></script>
<script th:src="@{/js/respond.min.js}"></script>
<![endif]-->
</head>
<body>
<h3>用户查询界面</h3>
<body class="layui-anim layui-anim-up">
<div class="x-body">
<xblock>
<button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>
<button class="layui-btn" onclick="x_admin_show('添加用户','/userAdd',600,400)"><i class="layui-icon"></i>添加</button>
<!--<span class="x-right" style="line-height:40px">共有数据:88 条</span>-->
</xblock>
<table class="layui-table">
<thead>
<tr>
<th>
<div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
</th>
<th>ID</th>
<th>用户名</th>
<th>别名</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr th:each="userInfo:${userInfo}">
<td>
<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
</td>
<td><span th:text="${userInfo.id}"></span></td>
<td><span th:text="${userInfo.username}"></span></td>
<td><span th:text="${userInfo.name}"></span></td>
<td class="td-status">
<span th:if="${userInfo.state}==1" class="layui-btn layui-btn-normal layui-btn-mini layui-btn-disabled">已停用</span>
<span th:if="${userInfo.state}==0" class="layui-btn layui-btn-normal layui-btn-mini">已启用</span>
</td>
<td>
<a class="layui-btn layui-btn" href="/updateUserInfo/${userInfo.id}">修改</a>
<a class="layui-btn layui-btn-danger" href="/delUserInfo/${userInfo.id}">删除</a>
</td>
<!--<td class="td-manage">-->
<!--<a onclick="member_stop(this,'10001')" href="javascript:;" title="启用">-->
<!--<i class="layui-icon">&#xe601;</i>-->
<!--</a>-->
<!--<a title="编辑" onclick="x_admin_show('编辑','member-edit.html',600,400)" href="javascript:;">-->
<!--<i class="layui-icon">&#xe642;</i>-->
<!--</a>-->
<!--<a onclick="x_admin_show('修改密码','member-password.html',600,400)" title="修改密码" href="javascript:;">-->
<!--<i class="layui-icon">&#xe631;</i>-->
<!--</a>-->
<!--<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">-->
<!--<i class="layui-icon">&#xe640;</i>-->
<!--</a>-->
<!--</td>-->
</tr>
</tbody>
</table>
</div>
<script>
layui.use('laydate', function(){
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#start' //指定元素
});
//执行一个laydate实例
laydate.render({
elem: '#end' //指定元素
});
});
/*用户-停用*/
function member_stop(obj,id){
layer.confirm('确认要停用吗?',function(index){
if($(obj).attr('title')=='启用'){
//发异步把用户状态进行更改
$(obj).attr('title','停用')
$(obj).find('i').html('&#xe62f;');
$(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
layer.msg('已停用!',{icon: 5,time:1000});
}else{
$(obj).attr('title','启用')
$(obj).find('i').html('&#xe601;');
$(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
layer.msg('已启用!',{icon: 5,time:1000});
}
});
}
/*用户-删除*/
function member_del(obj,id){
layer.confirm('确认要删除吗?',function(index){
//发异步删除数据
$(obj).parents("tr").remove();
layer.msg('已删除!',{icon:1,time:1000});
});
}
function delAll (argument) {
var data = tableCheck.getData();
layer.confirm('确认要删除吗?'+data,function(index){
//捉到所有被选中的,发异步进行删除
layer.msg('删除成功', {icon: 1});
$(".layui-form-checked").not('.header').parents('tr').remove();
});
}
</script>
</body>
</html>
\ No newline at end of file
......@@ -4,13 +4,111 @@
<meta charset="UTF-8">
<title>Add</title>
</head>
<link rel="stylesheet" th:href="@{/css/font.css}">
<link rel="stylesheet" th:href="@{/css/xadmin.css}">
<link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}">
<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
<script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
<script type="text/javascript" th:src="@{/lib/layui/lay/modules/form.js}"></script>
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
<!--[if lt IE 9]>
<script th:src="@{/js/html5.min.js}"></script>
<script th:src="@{/js/respond.min.js}"></script>
<![endif]-->
<body>
<h3>用户添加界面</h3>
<form action="" th:action="@{/userInfoAdd}" method="post">
<p>用户名:<input type="text" name="username" value="用户名"/></p>
<p>名称:<input type="text" name="name" value="会员"/></p>
<p>密码:<input type="password" name="password" value="123456"/></p>
<p><input type="submit" value="添加"/></p>
<!--<h3>用户添加界面</h3>-->
<!--<form th:action="@{rest/user/userInfoAdd}" method="post">-->
<!--<p>用户名:<input type="text" name="username" value="用户名"/></p>-->
<!--<p>名称:<input type="text" name="name" value="会员"/></p>-->
<!--<p>密码:<input type="password" name="password" value="123456"/></p>-->
<!--<p>角色:<select name="roleId">-->
<!--&lt;!&ndash;<option value="-1">不分配角色</option>&ndash;&gt;-->
<!--<option th:each="roleList:${roleList}" th:value="${roleList.id}">-->
<!--<span th:text="${roleList.role}"></span>-->
<!--</option>-->
<!--</select>-->
<!--</p>-->
<!--<p><input type="submit" value="添加"/></p>-->
<!--</form>-->
<div class="x-body layui-anim layui-anim-up">
<form class="layui-form" th:action="@{rest/user/userInfoAdd}" method="post">
<div class="layui-form-item">
<label for="L_username" class="layui-form-label">
<span class="x-red">*</span>用户名
</label>
<div class="layui-input-inline">
<input type="text" id="L_username" name="username" required=""
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label for="L_name" class="layui-form-label">
<span class="x-red">*</span>昵称
</label>
<div class="layui-input-inline">
<input type="text" id="L_name" name="name" required="" lay-verify="nikename"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label for="L_pass" class="layui-form-label">
<span class="x-red">*</span>密码
</label>
<div class="layui-input-inline">
<input type="password" id="L_pass" name="password" required="" lay-verify="pass"
autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">
6到16个字符
</div>
</div>
<div class="layui-form-item">
<label for="L_repass" class="layui-form-label">
<span class="x-red">*</span>确认密码
</label>
<div class="layui-input-inline">
<input type="password" id="L_repass" name="repass" required="" lay-verify="repass"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label for="role" class="layui-form-label">
<span class="x-red">*</span>角色
</label>
<div class="layui-input-inline">
<select name="roleId" id="role">
<option th:each="roleList:${activeRoleList}" th:value="${roleList.id}">
<span th:text="${roleList.role}"></span>
</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label for="L_repass" class="layui-form-label">
</label>
<input type="submit" class="layui-btn" value="添加"/>
</div>
</form>
</div>
<script>
layui.use(['form','layer'], function(){
$ = layui.jquery;
var form = layui.form
,layer = layui.layer;
//自定义验证规则
form.verify({
pass: [/(.+){6,12}$/, '密码必须6到12位']
,repass: function(value){
if($('#L_pass').val()!=$('#L_repass').val()){
return '两次密码不一致';
}
}
});
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>欢迎页面-X-admin2.0</title>
<link rel="stylesheet" th:href="@{/css/font.css}">
<link rel="stylesheet" th:href="@{/css/xadmin.css}">
</head>
<body>
<div class="x-body layui-anim layui-anim-up">
<blockquote class="layui-elem-quote">欢迎管理员:
<span class="x-red" th:text="${userInfo.username}"></span>
</blockquote>
</div>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment